
/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "GIOFlags": Some values do not have unique names */

void uxsel_set(int fd,int rwx,uxsel_callback_fn callback)

{
  void *e;
  int *e_00;
  uxsel_id *puVar1;
  int in_GS_OFFSET;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x73a69;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (fd < 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");
  }
  local_24 = fd;
  e = find234(fds,&local_24,uxsel_fd_findcmp);
  if (e != (void *)0x0) {
    if (*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0) {
      uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));
    }
    del234(fds,e);
    safefree(e);
  }
  if (rwx != 0) {
    e_00 = (int *)safemalloc(1,0x10);
    *e_00 = fd;
    e_00[2] = (int)callback;
    e_00[1] = rwx;
    puVar1 = uxsel_input_add(fd,rwx);
    e_00[3] = (int)puVar1;
    add234(fds,e_00);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail_local();
}



/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void FUN_00073a60(int param_1,int param_2,int param_3)

{
  int iVar1;
  int *piVar2;
  int in_GS_OFFSET;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x73a69;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 < 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");
  }
  local_24 = param_1;
  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);
  if (iVar1 != 0) {
    if (*(int *)(iVar1 + 0xc) != 0) {
      FUN_00057e80(*(int *)(iVar1 + 0xc));
    }
    FUN_00054470(DAT_000c625c,iVar1);
    FUN_00031580(iVar1);
  }
  if (param_2 != 0) {
    piVar2 = (int *)FUN_000313e0(1,0x10);
    *piVar2 = param_1;
    piVar2[2] = param_3;
    piVar2[1] = param_2;
    iVar1 = FUN_00057e00(param_1,param_2);
    piVar2[3] = iVar1;
    FUN_00053fe0(DAT_000c625c,piVar2);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00077880();
}


PUSH EBP
PUSH EDI
PUSH ESI
PUSH EBX
CALL 0x0001b410
ADD EBX,0x51d3b
SUB ESP,0x1c
MOV EAX,GS:[0x14]
MOV dword ptr [ESP + 0xc],EAX
XOR EAX,EAX
MOV ESI,dword ptr [ESP + 0x30]
MOV EBP,dword ptr [ESP + 0x38]
TEST ESI,ESI
JS 0x00073b3c
MOV dword ptr [ESP + 0x8],ESI
LEA EAX,[EBX + 0xfffae26c]
SUB ESP,0x4
PUSH EAX
LEA EAX,[ESP + 0x10]
PUSH EAX
PUSH dword ptr [EBX + 0xab8]
CALL 0x000543c0
ADD ESP,0x10
MOV EDI,EAX
TEST EAX,EAX
JZ 0x00073ae2
MOV EAX,dword ptr [EAX + 0xc]
TEST EAX,EAX
JZ 0x00073ac8
SUB ESP,0xc
PUSH EAX
CALL 0x00057e80
ADD ESP,0x10
SUB ESP,0x8
PUSH EDI
PUSH dword ptr [EBX + 0xab8]
CALL 0x00054470
MOV dword ptr [ESP],EDI
CALL 0x00031580
ADD ESP,0x10
MOV EDI,dword ptr [ESP + 0x34]
TEST EDI,EDI
JNZ 0x00073b00
MOV EAX,dword ptr [ESP + 0xc]
XOR EAX,dword ptr GS:[0x14]
JNZ 0x00073b58
ADD ESP,0x1c
POP EBX
POP ESI
POP EDI
POP EBP
RET
SUB ESP,0x8
PUSH 0x10
PUSH 0x1
CALL 0x000313e0
MOV dword ptr [EAX],ESI
MOV EDI,EAX
MOV EAX,dword ptr [ESP + 0x44]
MOV dword ptr [EDI + 0x8],EBP
MOV dword ptr [EDI + 0x4],EAX
POP EAX
POP EDX
PUSH dword ptr [ESP + 0x3c]
PUSH ESI
CALL 0x00057e00
MOV dword ptr [EDI + 0xc],EAX
POP ECX
POP ESI
PUSH EDI
PUSH dword ptr [EBX + 0xab8]
CALL 0x00053fe0
ADD ESP,0x10
JMP 0x00073aea
LEA EAX,[EBX + 0xfffd13f0]
PUSH EAX
LEA EAX,[EBX + 0xfffd13e0]
PUSH 0x43
PUSH EAX
LEA EAX,[EBX + 0xfffd1547]
PUSH EAX
CALL 0x0001af20
CALL 0x00077880
(translation_unit "/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n\nvoid FUN_00073a60(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 < 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = param_1;\n  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }\n  if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00077880();\n}\n\n" comment (function_definition "void FUN_00073a60(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 < 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = param_1;\n  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }\n  if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00077880();\n}" primitive_type (function_declarator "FUN_00073a60(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 < 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = param_1;\n  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }\n  if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  FUN_00077880();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x73a69;" (assignment_expression "uStack_14 = 0x73a69" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 < 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }" if (parenthesized_expression "(param_1 < 0)" ( (binary_expression "param_1 < 0" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }" { comment (expression_statement "__assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");" (call_expression "__assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set")" identifier (argument_list "("fd >= 0","unix/uxsel.c",0x43,"uxsel_set")" ( (string_literal ""fd >= 0"" " string_content ") , (string_literal ""unix/uxsel.c"" " string_content ") , number_literal , (string_literal ""uxsel_set"" " string_content ") ))) ;) })) (expression_statement "local_24 = param_1;" (assignment_expression "local_24 = param_1" identifier = identifier) ;) (expression_statement "iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);" (assignment_expression "iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10)" identifier = (call_expression "FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10)" identifier (argument_list "(DAT_000c625c,&local_24,FUN_00073a10)" ( identifier , (pointer_expression "&local_24" & identifier) , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }" { (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }" { (expression_statement "FUN_00057e80(*(int *)(iVar1 + 0xc));" (call_expression "FUN_00057e80(*(int *)(iVar1 + 0xc))" identifier (argument_list "(*(int *)(iVar1 + 0xc))" ( (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "FUN_00054470(DAT_000c625c,iVar1);" (call_expression "FUN_00054470(DAT_000c625c,iVar1)" identifier (argument_list "(DAT_000c625c,iVar1)" ( identifier , identifier ))) ;) (expression_statement "FUN_00031580(iVar1);" (call_expression "FUN_00031580(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) })) (if_statement "if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }" { (expression_statement "piVar2 = (int *)FUN_000313e0(1,0x10);" (assignment_expression "piVar2 = (int *)FUN_000313e0(1,0x10)" identifier = (cast_expression "(int *)FUN_000313e0(1,0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000313e0(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "piVar2[2] = param_3;" (assignment_expression "piVar2[2] = param_3" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2[1] = param_2;" (assignment_expression "piVar2[1] = param_2" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = FUN_00057e00(param_1,param_2);" (assignment_expression "iVar1 = FUN_00057e00(param_1,param_2)" identifier = (call_expression "FUN_00057e00(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (expression_statement "piVar2[3] = iVar1;" (assignment_expression "piVar2[3] = iVar1" (subscript_expression "piVar2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_00053fe0(DAT_000c625c,piVar2);" (call_expression "FUN_00053fe0(DAT_000c625c,piVar2)" identifier (argument_list "(DAT_000c625c,piVar2)" ( identifier , identifier ))) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */\n/* WARNING: Unknown calling convention */\n/* WARNING: Enum "GIOFlags": Some values do not have unique names */\n\nvoid uxsel_set(int fd,int rwx,uxsel_callback_fn callback)\n\n{\n  void *e;\n  int *e_00;\n  uxsel_id *puVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (fd < 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = fd;\n  e = find234(fds,&local_24,uxsel_fd_findcmp);\n  if (e != (void *)0x0) {\n    if (*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0) {\n      uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));\n    }\n    del234(fds,e);\n    safefree(e);\n  }\n  if (rwx != 0) {\n    e_00 = (int *)safemalloc(1,0x10);\n    *e_00 = fd;\n    e_00[2] = (int)callback;\n    e_00[1] = rwx;\n    puVar1 = uxsel_input_add(fd,rwx);\n    e_00[3] = (int)puVar1;\n    add234(fds,e_00);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}\n\n" comment comment comment (function_definition "void uxsel_set(int fd,int rwx,uxsel_callback_fn callback)\n\n{\n  void *e;\n  int *e_00;\n  uxsel_id *puVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (fd < 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = fd;\n  e = find234(fds,&local_24,uxsel_fd_findcmp);\n  if (e != (void *)0x0) {\n    if (*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0) {\n      uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));\n    }\n    del234(fds,e);\n    safefree(e);\n  }\n  if (rwx != 0) {\n    e_00 = (int *)safemalloc(1,0x10);\n    *e_00 = fd;\n    e_00[2] = (int)callback;\n    e_00[1] = rwx;\n    puVar1 = uxsel_input_add(fd,rwx);\n    e_00[3] = (int)puVar1;\n    add234(fds,e_00);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" primitive_type (function_declarator "uxsel_set(int fd,int rwx,uxsel_callback_fn callback)" identifier (parameter_list "(int fd,int rwx,uxsel_callback_fn callback)" ( (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "int rwx" primitive_type identifier) , (parameter_declaration "uxsel_callback_fn callback" type_identifier identifier) ))) (compound_statement "{\n  void *e;\n  int *e_00;\n  uxsel_id *puVar1;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (fd < 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = fd;\n  e = find234(fds,&local_24,uxsel_fd_findcmp);\n  if (e != (void *)0x0) {\n    if (*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0) {\n      uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));\n    }\n    del234(fds,e);\n    safefree(e);\n  }\n  if (rwx != 0) {\n    e_00 = (int *)safemalloc(1,0x10);\n    *e_00 = fd;\n    e_00[2] = (int)callback;\n    e_00[1] = rwx;\n    puVar1 = uxsel_input_add(fd,rwx);\n    e_00[3] = (int)puVar1;\n    add234(fds,e_00);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail_local();\n}" { (declaration "void *e;" primitive_type (pointer_declarator "*e" * identifier) ;) (declaration "int *e_00;" primitive_type (pointer_declarator "*e_00" * identifier) ;) (declaration "uxsel_id *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x73a69;" (assignment_expression "uStack_14 = 0x73a69" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (fd < 0) {\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }" if (parenthesized_expression "(fd < 0)" ( (binary_expression "fd < 0" identifier < number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }" { comment (expression_statement "__assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");" (call_expression "__assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set")" identifier (argument_list "("fd >= 0","unix/uxsel.c",0x43,"uxsel_set")" ( (string_literal ""fd >= 0"" " string_content ") , (string_literal ""unix/uxsel.c"" " string_content ") , number_literal , (string_literal ""uxsel_set"" " string_content ") ))) ;) })) (expression_statement "local_24 = fd;" (assignment_expression "local_24 = fd" identifier = identifier) ;) (expression_statement "e = find234(fds,&local_24,uxsel_fd_findcmp);" (assignment_expression "e = find234(fds,&local_24,uxsel_fd_findcmp)" identifier = (call_expression "find234(fds,&local_24,uxsel_fd_findcmp)" identifier (argument_list "(fds,&local_24,uxsel_fd_findcmp)" ( identifier , (pointer_expression "&local_24" & identifier) , identifier )))) ;) (if_statement "if (e != (void *)0x0) {\n    if (*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0) {\n      uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));\n    }\n    del234(fds,e);\n    safefree(e);\n  }" if (parenthesized_expression "(e != (void *)0x0)" ( (binary_expression "e != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    if (*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0) {\n      uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));\n    }\n    del234(fds,e);\n    safefree(e);\n  }" { (if_statement "if (*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0) {\n      uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));\n    }" if (parenthesized_expression "(*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0)" ( (binary_expression "*(uxsel_id **)((int)e + 0xc) != (uxsel_id *)0x0" (pointer_expression "*(uxsel_id **)((int)e + 0xc)" * (cast_expression "(uxsel_id **)((int)e + 0xc)" ( (type_descriptor "uxsel_id **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)e + 0xc)" ( (binary_expression "(int)e + 0xc" (cast_expression "(int)e" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) != (cast_expression "(uxsel_id *)0x0" ( (type_descriptor "uxsel_id *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));\n    }" { (expression_statement "uxsel_input_remove(*(uxsel_id **)((int)e + 0xc));" (call_expression "uxsel_input_remove(*(uxsel_id **)((int)e + 0xc))" identifier (argument_list "(*(uxsel_id **)((int)e + 0xc))" ( (pointer_expression "*(uxsel_id **)((int)e + 0xc)" * (cast_expression "(uxsel_id **)((int)e + 0xc)" ( (type_descriptor "uxsel_id **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "((int)e + 0xc)" ( (binary_expression "(int)e + 0xc" (cast_expression "(int)e" ( (type_descriptor "int" primitive_type) ) identifier) + number_literal) )))) ))) ;) })) (expression_statement "del234(fds,e);" (call_expression "del234(fds,e)" identifier (argument_list "(fds,e)" ( identifier , identifier ))) ;) (expression_statement "safefree(e);" (call_expression "safefree(e)" identifier (argument_list "(e)" ( identifier ))) ;) })) (if_statement "if (rwx != 0) {\n    e_00 = (int *)safemalloc(1,0x10);\n    *e_00 = fd;\n    e_00[2] = (int)callback;\n    e_00[1] = rwx;\n    puVar1 = uxsel_input_add(fd,rwx);\n    e_00[3] = (int)puVar1;\n    add234(fds,e_00);\n  }" if (parenthesized_expression "(rwx != 0)" ( (binary_expression "rwx != 0" identifier != number_literal) )) (compound_statement "{\n    e_00 = (int *)safemalloc(1,0x10);\n    *e_00 = fd;\n    e_00[2] = (int)callback;\n    e_00[1] = rwx;\n    puVar1 = uxsel_input_add(fd,rwx);\n    e_00[3] = (int)puVar1;\n    add234(fds,e_00);\n  }" { (expression_statement "e_00 = (int *)safemalloc(1,0x10);" (assignment_expression "e_00 = (int *)safemalloc(1,0x10)" identifier = (cast_expression "(int *)safemalloc(1,0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "safemalloc(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "*e_00 = fd;" (assignment_expression "*e_00 = fd" (pointer_expression "*e_00" * identifier) = identifier) ;) (expression_statement "e_00[2] = (int)callback;" (assignment_expression "e_00[2] = (int)callback" (subscript_expression "e_00[2]" identifier [ number_literal ]) = (cast_expression "(int)callback" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "e_00[1] = rwx;" (assignment_expression "e_00[1] = rwx" (subscript_expression "e_00[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "puVar1 = uxsel_input_add(fd,rwx);" (assignment_expression "puVar1 = uxsel_input_add(fd,rwx)" identifier = (call_expression "uxsel_input_add(fd,rwx)" identifier (argument_list "(fd,rwx)" ( identifier , identifier )))) ;) (expression_statement "e_00[3] = (int)puVar1;" (assignment_expression "e_00[3] = (int)puVar1" (subscript_expression "e_00[3]" identifier [ number_literal ]) = (cast_expression "(int)puVar1" ( (type_descriptor "int" primitive_type) ) identifier)) ;) (expression_statement "add234(fds,e_00);" (call_expression "add234(fds,e_00)" identifier (argument_list "(fds,e_00)" ( identifier , identifier ))) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) comment (expression_statement "__stack_chk_fail_local();" (call_expression "__stack_chk_fail_local()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "void FUN_00073a60(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 < 0) {\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = param_1;\n  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }\n  if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00077880();\n}\n\n" (function_definition "void FUN_00073a60(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 < 0) {\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = param_1;\n  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }\n  if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00077880();\n}" primitive_type (function_declarator "FUN_00073a60(int param_1,int param_2,int param_3)" identifier (parameter_list "(int param_1,int param_2,int param_3)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "int param_2" primitive_type identifier) , (parameter_declaration "int param_3" primitive_type identifier) ))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 < 0) {\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = param_1;\n  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }\n  if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00077880();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int *piVar2;" primitive_type (pointer_declarator "*piVar2" * identifier) ;) (declaration "int in_GS_OFFSET;" primitive_type identifier ;) (declaration "int local_24;" primitive_type identifier ;) (declaration "int local_20;" primitive_type identifier ;) (declaration "undefined4 uStack_14;" type_identifier identifier ;) (expression_statement "uStack_14 = 0x73a69;" (assignment_expression "uStack_14 = 0x73a69" identifier = number_literal) ;) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" identifier = (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) ;) (if_statement "if (param_1 < 0) {\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }" if (parenthesized_expression "(param_1 < 0)" ( (binary_expression "param_1 < 0" identifier < number_literal) )) (compound_statement "{\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }" { (expression_statement "__assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");" (call_expression "__assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set")" identifier (argument_list "("fd >= 0","unix/uxsel.c",0x43,"uxsel_set")" ( (string_literal ""fd >= 0"" " string_content ") , (string_literal ""unix/uxsel.c"" " string_content ") , number_literal , (string_literal ""uxsel_set"" " string_content ") ))) ;) })) (expression_statement "local_24 = param_1;" (assignment_expression "local_24 = param_1" identifier = identifier) ;) (expression_statement "iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);" (assignment_expression "iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10)" identifier = (call_expression "FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10)" identifier (argument_list "(DAT_000c625c,&local_24,FUN_00073a10)" ( identifier , (pointer_expression "&local_24" & identifier) , identifier )))) ;) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }" if (parenthesized_expression "(iVar1 != 0)" ( (binary_expression "iVar1 != 0" identifier != number_literal) )) (compound_statement "{\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }" { (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }" if (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" ( (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) != number_literal) )) (compound_statement "{\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }" { (expression_statement "FUN_00057e80(*(int *)(iVar1 + 0xc));" (call_expression "FUN_00057e80(*(int *)(iVar1 + 0xc))" identifier (argument_list "(*(int *)(iVar1 + 0xc))" ( (pointer_expression "*(int *)(iVar1 + 0xc)" * (cast_expression "(int *)(iVar1 + 0xc)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(iVar1 + 0xc)" ( (binary_expression "iVar1 + 0xc" identifier + number_literal) )))) ))) ;) })) (expression_statement "FUN_00054470(DAT_000c625c,iVar1);" (call_expression "FUN_00054470(DAT_000c625c,iVar1)" identifier (argument_list "(DAT_000c625c,iVar1)" ( identifier , identifier ))) ;) (expression_statement "FUN_00031580(iVar1);" (call_expression "FUN_00031580(iVar1)" identifier (argument_list "(iVar1)" ( identifier ))) ;) })) (if_statement "if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }" if (parenthesized_expression "(param_2 != 0)" ( (binary_expression "param_2 != 0" identifier != number_literal) )) (compound_statement "{\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }" { (expression_statement "piVar2 = (int *)FUN_000313e0(1,0x10);" (assignment_expression "piVar2 = (int *)FUN_000313e0(1,0x10)" identifier = (cast_expression "(int *)FUN_000313e0(1,0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "FUN_000313e0(1,0x10)" identifier (argument_list "(1,0x10)" ( number_literal , number_literal ))))) ;) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" * identifier) = identifier) ;) (expression_statement "piVar2[2] = param_3;" (assignment_expression "piVar2[2] = param_3" (subscript_expression "piVar2[2]" identifier [ number_literal ]) = identifier) ;) (expression_statement "piVar2[1] = param_2;" (assignment_expression "piVar2[1] = param_2" (subscript_expression "piVar2[1]" identifier [ number_literal ]) = identifier) ;) (expression_statement "iVar1 = FUN_00057e00(param_1,param_2);" (assignment_expression "iVar1 = FUN_00057e00(param_1,param_2)" identifier = (call_expression "FUN_00057e00(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier )))) ;) (expression_statement "piVar2[3] = iVar1;" (assignment_expression "piVar2[3] = iVar1" (subscript_expression "piVar2[3]" identifier [ number_literal ]) = identifier) ;) (expression_statement "FUN_00053fe0(DAT_000c625c,piVar2);" (call_expression "FUN_00053fe0(DAT_000c625c,piVar2)" identifier (argument_list "(DAT_000c625c,piVar2)" ( identifier , identifier ))) ;) })) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" if (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" ( (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" identifier == (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" * (cast_expression "(int *)(in_GS_OFFSET + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_GS_OFFSET + 0x14)" ( (binary_expression "in_GS_OFFSET + 0x14" identifier + number_literal) ))))) )) (compound_statement "{\n    return;\n  }" { (return_statement "return;" return ;) })) (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT , (string_literal " string_content ") ))) ;) })) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( LIT , LIT ))))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT )))) ;) (expression_statement (assignment_expression (subscript_expression IDENT [ LIT ]) = IDENT) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "void FUN_00073a60(int param_1,int param_2,int param_3)\n\n{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 < 0) {\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = param_1;\n  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }\n  if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00077880();\n}" (primitive_type "void") (function_declarator "FUN_00073a60(int param_1,int param_2,int param_3)" (identifier "FUN_00073a60") (parameter_list "(int param_1,int param_2,int param_3)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "int param_2" (primitive_type "int") (identifier "param_2")) (, ",") (parameter_declaration "int param_3" (primitive_type "int") (identifier "param_3")) () ")"))) (compound_statement "{\n  int iVar1;\n  int *piVar2;\n  int in_GS_OFFSET;\n  int local_24;\n  int local_20;\n  undefined4 uStack_14;\n  \n  uStack_14 = 0x73a69;\n  local_20 = *(int *)(in_GS_OFFSET + 0x14);\n  if (param_1 < 0) {\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }\n  local_24 = param_1;\n  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);\n  if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }\n  if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }\n  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }\n                    \n  FUN_00077880();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "int *piVar2;" (primitive_type "int") (pointer_declarator "*piVar2" (* "*") (identifier "piVar2")) (; ";")) (declaration "int in_GS_OFFSET;" (primitive_type "int") (identifier "in_GS_OFFSET") (; ";")) (declaration "int local_24;" (primitive_type "int") (identifier "local_24") (; ";")) (declaration "int local_20;" (primitive_type "int") (identifier "local_20") (; ";")) (declaration "undefined4 uStack_14;" (type_identifier "undefined4") (identifier "uStack_14") (; ";")) (expression_statement "uStack_14 = 0x73a69;" (assignment_expression "uStack_14 = 0x73a69" (identifier "uStack_14") (= "=") (number_literal "0x73a69")) (; ";")) (expression_statement "local_20 = *(int *)(in_GS_OFFSET + 0x14);" (assignment_expression "local_20 = *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (= "=") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) (; ";")) (if_statement "if (param_1 < 0) {\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }" (if "if") (parenthesized_expression "(param_1 < 0)" (( "(") (binary_expression "param_1 < 0" (identifier "param_1") (< "<") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");\n  }" ({ "{") (expression_statement "__assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");" (call_expression "__assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set")" (identifier "__assert_fail") (argument_list "("fd >= 0","unix/uxsel.c",0x43,"uxsel_set")" (( "(") (string_literal ""fd >= 0"" (" """) (string_content "fd >= 0") (" """)) (, ",") (string_literal ""unix/uxsel.c"" (" """) (string_content "unix/uxsel.c") (" """)) (, ",") (number_literal "0x43") (, ",") (string_literal ""uxsel_set"" (" """) (string_content "uxsel_set") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "local_24 = param_1;" (assignment_expression "local_24 = param_1" (identifier "local_24") (= "=") (identifier "param_1")) (; ";")) (expression_statement "iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);" (assignment_expression "iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10)" (identifier "iVar1") (= "=") (call_expression "FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10)" (identifier "FUN_000543c0") (argument_list "(DAT_000c625c,&local_24,FUN_00073a10)" (( "(") (identifier "DAT_000c625c") (, ",") (pointer_expression "&local_24" (& "&") (identifier "local_24")) (, ",") (identifier "FUN_00073a10") () ")")))) (; ";")) (if_statement "if (iVar1 != 0) {\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }" (if "if") (parenthesized_expression "(iVar1 != 0)" (( "(") (binary_expression "iVar1 != 0" (identifier "iVar1") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }\n    FUN_00054470(DAT_000c625c,iVar1);\n    FUN_00031580(iVar1);\n  }" ({ "{") (if_statement "if (*(int *)(iVar1 + 0xc) != 0) {\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }" (if "if") (parenthesized_expression "(*(int *)(iVar1 + 0xc) != 0)" (( "(") (binary_expression "*(int *)(iVar1 + 0xc) != 0" (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      FUN_00057e80(*(int *)(iVar1 + 0xc));\n    }" ({ "{") (expression_statement "FUN_00057e80(*(int *)(iVar1 + 0xc));" (call_expression "FUN_00057e80(*(int *)(iVar1 + 0xc))" (identifier "FUN_00057e80") (argument_list "(*(int *)(iVar1 + 0xc))" (( "(") (pointer_expression "*(int *)(iVar1 + 0xc)" (* "*") (cast_expression "(int *)(iVar1 + 0xc)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(iVar1 + 0xc)" (( "(") (binary_expression "iVar1 + 0xc" (identifier "iVar1") (+ "+") (number_literal "0xc")) () ")")))) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_00054470(DAT_000c625c,iVar1);" (call_expression "FUN_00054470(DAT_000c625c,iVar1)" (identifier "FUN_00054470") (argument_list "(DAT_000c625c,iVar1)" (( "(") (identifier "DAT_000c625c") (, ",") (identifier "iVar1") () ")"))) (; ";")) (expression_statement "FUN_00031580(iVar1);" (call_expression "FUN_00031580(iVar1)" (identifier "FUN_00031580") (argument_list "(iVar1)" (( "(") (identifier "iVar1") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 != 0) {\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }" (if "if") (parenthesized_expression "(param_2 != 0)" (( "(") (binary_expression "param_2 != 0" (identifier "param_2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n    piVar2 = (int *)FUN_000313e0(1,0x10);\n    *piVar2 = param_1;\n    piVar2[2] = param_3;\n    piVar2[1] = param_2;\n    iVar1 = FUN_00057e00(param_1,param_2);\n    piVar2[3] = iVar1;\n    FUN_00053fe0(DAT_000c625c,piVar2);\n  }" ({ "{") (expression_statement "piVar2 = (int *)FUN_000313e0(1,0x10);" (assignment_expression "piVar2 = (int *)FUN_000313e0(1,0x10)" (identifier "piVar2") (= "=") (cast_expression "(int *)FUN_000313e0(1,0x10)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "FUN_000313e0(1,0x10)" (identifier "FUN_000313e0") (argument_list "(1,0x10)" (( "(") (number_literal "1") (, ",") (number_literal "0x10") () ")"))))) (; ";")) (expression_statement "*piVar2 = param_1;" (assignment_expression "*piVar2 = param_1" (pointer_expression "*piVar2" (* "*") (identifier "piVar2")) (= "=") (identifier "param_1")) (; ";")) (expression_statement "piVar2[2] = param_3;" (assignment_expression "piVar2[2] = param_3" (subscript_expression "piVar2[2]" (identifier "piVar2") ([ "[") (number_literal "2") (] "]")) (= "=") (identifier "param_3")) (; ";")) (expression_statement "piVar2[1] = param_2;" (assignment_expression "piVar2[1] = param_2" (subscript_expression "piVar2[1]" (identifier "piVar2") ([ "[") (number_literal "1") (] "]")) (= "=") (identifier "param_2")) (; ";")) (expression_statement "iVar1 = FUN_00057e00(param_1,param_2);" (assignment_expression "iVar1 = FUN_00057e00(param_1,param_2)" (identifier "iVar1") (= "=") (call_expression "FUN_00057e00(param_1,param_2)" (identifier "FUN_00057e00") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")")))) (; ";")) (expression_statement "piVar2[3] = iVar1;" (assignment_expression "piVar2[3] = iVar1" (subscript_expression "piVar2[3]" (identifier "piVar2") ([ "[") (number_literal "3") (] "]")) (= "=") (identifier "iVar1")) (; ";")) (expression_statement "FUN_00053fe0(DAT_000c625c,piVar2);" (call_expression "FUN_00053fe0(DAT_000c625c,piVar2)" (identifier "FUN_00053fe0") (argument_list "(DAT_000c625c,piVar2)" (( "(") (identifier "DAT_000c625c") (, ",") (identifier "piVar2") () ")"))) (; ";")) (} "}"))) (if_statement "if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {\n    return;\n  }" (if "if") (parenthesized_expression "(local_20 == *(int *)(in_GS_OFFSET + 0x14))" (( "(") (binary_expression "local_20 == *(int *)(in_GS_OFFSET + 0x14)" (identifier "local_20") (== "==") (pointer_expression "*(int *)(in_GS_OFFSET + 0x14)" (* "*") (cast_expression "(int *)(in_GS_OFFSET + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_GS_OFFSET + 0x14)" (( "(") (binary_expression "in_GS_OFFSET + 0x14" (identifier "in_GS_OFFSET") (+ "+") (number_literal "0x14")) () ")"))))) () ")")) (compound_statement "{\n    return;\n  }" ({ "{") (return_statement "return;" (return "return") (; ";")) (} "}"))) (expression_statement "FUN_00077880();" (call_expression "FUN_00077880()" (identifier "FUN_00077880") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

/* WARNING: Function: __x86.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */
/* WARNING: Unknown calling convention */
/* WARNING: Enum "GIOFlags": Some values do not have unique names */

void function_1(int var_2,int var_9,type_1 callback)

{
  void *var_5;
  int *e_00;
  type_2 *puVar1;
  int var_1;
  int local_24;
  int var_13;
  type_3 uStack_14;
  
  uStack_14 = 0x73a69;
  var_13 = *(int *)(var_1 + 0x14);
  if (var_2 < 0) {
                    /* WARNING: Subroutine does not return */
    var_3("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");
  }
  local_24 = var_2;
  var_5 = var_4(fds,&local_24,uxsel_fd_findcmp);
  if (var_5 != (void *)0x0) {
    if (*(type_2 **)((int)var_5 + 0xc) != (type_2 *)0x0) {
      var_6(*(type_2 **)((int)var_5 + 0xc));
    }
    var_7(fds,var_5);
    var_8(var_5);
  }
  if (var_9 != 0) {
    e_00 = (int *)var_10(1,0x10);
    *e_00 = var_2;
    e_00[2] = (int)callback;
    e_00[1] = var_9;
    puVar1 = var_11(var_2,var_9);
    e_00[3] = (int)puVar1;
    var_12(fds,e_00);
  }
  if (var_13 == *(int *)(var_1 + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  var_14();
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (primitive_type) declarator: (identifier)))) body: (compound_statement (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)) (string_literal (string_content)) (number_literal) (string_literal (string_content))))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (pointer_expression argument: (identifier)) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (if_statement condition: (parenthesized_expression (binary_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (call_expression function: (identifier) arguments: (argument_list (number_literal) (number_literal)))))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier))))) (expression_statement (assignment_expression left: (subscript_expression argument: (identifier) index: (number_literal)) right: (identifier))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

/* WARNING: Function: __i686.get_pc_thunk.bx replaced with injection: get_pc_thunk_bx */

void MASKED(int param_1,int param_2,int param_3)

{
  int iVar1;
  int *piVar2;
  int in_GS_OFFSET;
  int local_24;
  int local_20;
  undefined4 uStack_14;
  
  uStack_14 = 0x73a69;
  local_20 = *(int *)(in_GS_OFFSET + 0x14);
  if (param_1 < 0) {
                    /* WARNING: Subroutine does not return */
    __assert_fail("fd >= 0","unix/uxsel.c",0x43,"uxsel_set");
  }
  local_24 = param_1;
  iVar1 = FUN_000543c0(DAT_000c625c,&local_24,FUN_00073a10);
  if (iVar1 != 0) {
    if (*(int *)(iVar1 + 0xc) != 0) {
      FUN_00057e80(*(int *)(iVar1 + 0xc));
    }
    FUN_00054470(DAT_000c625c,iVar1);
    FUN_00031580(iVar1);
  }
  if (param_2 != 0) {
    piVar2 = (int *)FUN_000313e0(1,0x10);
    *piVar2 = param_1;
    piVar2[2] = param_3;
    piVar2[1] = param_2;
    iVar1 = FUN_00057e00(param_1,param_2);
    piVar2[3] = iVar1;
    FUN_00053fe0(DAT_000c625c,piVar2);
  }
  if (local_20 == *(int *)(in_GS_OFFSET + 0x14)) {
    return;
  }
                    /* WARNING: Subroutine does not return */
  FUN_00077880();
}

