
int so_peercred(int fd,int *pid,int *uid,int *gid)

{
  undefined *puVar1;
  int iVar2;
  int iVar3;
  socklen_t crlen;
  ucred cr;
  
  puVar1 = PTR___stack_chk_guard_00079930;
  crlen = 0xc;
  iVar2 = *(int *)PTR___stack_chk_guard_00079930;
  iVar3 = (*(code *)PTR_getsockopt_000797dc)(fd,0xffff,0x12,&cr,&crlen);
  if (iVar3 == 0) {
    *pid = cr.pid;
    *uid = cr.uid;
    *gid = cr.gid;
  }
  if (iVar2 != *(int *)puVar1) {
    iVar2 = (*(code *)PTR___stack_chk_fail_000797f0)();
    return iVar2;
  }
  return (uint)(iVar3 == 0);
}



uint so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)

{
  undefined *puVar1;
  int iVar2;
  uint uVar3;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  int local_1c;
  
  puVar1 = PTR___stack_chk_guard_00079930;
  local_2c = 0xc;
  local_1c = *(int *)PTR___stack_chk_guard_00079930;
  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);
  if (iVar2 == 0) {
    *param_2 = local_28;
    *param_3 = local_24;
    *param_4 = local_20;
  }
  if (local_1c != *(int *)puVar1) {
    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();
    return uVar3;
  }
  return (uint)(iVar2 == 0);
}


lui gp,0x3
addiu gp,gp,-0x3aa0
addu gp,gp,t9
addiu sp,sp,-0x50
lw t9,-0x7894(gp)
li v1,0xc
addiu v0,sp,0x24
sw s0,0x3c(sp)
sw v0,0x10(sp)
lw s0,-0x7740(gp)
sw s3,0x48(sp)
or s3,a1,zero
sw s2,0x44(sp)
ori a1,zero,0xffff
sw s1,0x40(sp)
or s2,a2,zero
sw gp,0x18(sp)
or s1,a3,zero
sw ra,0x4c(sp)
addiu a3,sp,0x28
sw v1,0x24(sp)
li a2,0x12
lw v0,0x0(s0)
sw v0,0x34(sp)
jalr t9
_nop
beq v0,zero,0x00054bac
_lw gp,0x18(sp)
or v0,zero,zero
lw a0,0x34(sp)
lw v1,0x0(s0)
bne a0,v1,0x00054bcc
_lw ra,0x4c(sp)
lw s3,0x48(sp)
lw s2,0x44(sp)
lw s1,0x40(sp)
lw s0,0x3c(sp)
jr ra
_addiu sp,sp,0x50
lw v1,0x28(sp)
li v0,0x1
sw v1,0x0(s3)
lw v1,0x2c(sp)
sw v1,0x0(s2)
lw v1,0x30(sp)
b 0x00054b84
_sw v1,0x0(s1)
lw t9,-0x7880(gp)
jalr t9
_nop
nop
nop
jr ra
_nop
(translation_unit "uint so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  local_2c = 0xc;\n  local_1c = *(int *)PTR___stack_chk_guard_00079930;\n  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);\n  if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }\n  if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }\n  return (uint)(iVar2 == 0);\n}\n\n" (function_definition "uint so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  local_2c = 0xc;\n  local_1c = *(int *)PTR___stack_chk_guard_00079930;\n  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);\n  if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }\n  if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }\n  return (uint)(iVar2 == 0);\n}" type_identifier (function_declarator "so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  local_2c = 0xc;\n  local_1c = *(int *)PTR___stack_chk_guard_00079930;\n  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);\n  if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }\n  if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }\n  return (uint)(iVar2 == 0);\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "undefined4 local_20;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00079930;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00079930" identifier = identifier) ;) (expression_statement "local_2c = 0xc;" (assignment_expression "local_2c = 0xc" identifier = number_literal) ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_00079930;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_00079930" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00079930" * (cast_expression "(int *)PTR___stack_chk_guard_00079930" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);" (assignment_expression "iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c)" identifier = (call_expression "(*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c)" (parenthesized_expression "(*(code *)PTR_getsockopt_000797dc)" ( (pointer_expression "*(code *)PTR_getsockopt_000797dc" * (cast_expression "(code *)PTR_getsockopt_000797dc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0xffff,0x12,&local_28,&local_2c)" ( identifier , number_literal , number_literal , (pointer_expression "&local_28" & identifier) , (pointer_expression "&local_2c" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }" { (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "*param_3 = local_24;" (assignment_expression "*param_3 = local_24" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "*param_4 = local_20;" (assignment_expression "*param_4 = local_20" (pointer_expression "*param_4" * identifier) = identifier) ;) })) (if_statement "if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }" if (parenthesized_expression "(local_1c != *(int *)puVar1)" ( (binary_expression "local_1c != *(int *)puVar1" identifier != (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }" { (expression_statement "uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();" (assignment_expression "uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)()" identifier = (call_expression "(*(code *)PTR___stack_chk_fail_000797f0)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000797f0)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000797f0" * (cast_expression "(code *)PTR___stack_chk_fail_000797f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar3;" return identifier ;) })) (return_statement "return (uint)(iVar2 == 0);" return (call_expression "(uint)(iVar2 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) ))) ;) })))
(translation_unit "int so_peercred(int fd,int *pid,int *uid,int *gid)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  socklen_t crlen;\n  ucred cr;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  crlen = 0xc;\n  iVar2 = *(int *)PTR___stack_chk_guard_00079930;\n  iVar3 = (*(code *)PTR_getsockopt_000797dc)(fd,0xffff,0x12,&cr,&crlen);\n  if (iVar3 == 0) {\n    *pid = cr.pid;\n    *uid = cr.uid;\n    *gid = cr.gid;\n  }\n  if (iVar2 != *(int *)puVar1) {\n    iVar2 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return iVar2;\n  }\n  return (uint)(iVar3 == 0);\n}\n\n" (function_definition "int so_peercred(int fd,int *pid,int *uid,int *gid)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  socklen_t crlen;\n  ucred cr;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  crlen = 0xc;\n  iVar2 = *(int *)PTR___stack_chk_guard_00079930;\n  iVar3 = (*(code *)PTR_getsockopt_000797dc)(fd,0xffff,0x12,&cr,&crlen);\n  if (iVar3 == 0) {\n    *pid = cr.pid;\n    *uid = cr.uid;\n    *gid = cr.gid;\n  }\n  if (iVar2 != *(int *)puVar1) {\n    iVar2 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return iVar2;\n  }\n  return (uint)(iVar3 == 0);\n}" primitive_type (function_declarator "so_peercred(int fd,int *pid,int *uid,int *gid)" identifier (parameter_list "(int fd,int *pid,int *uid,int *gid)" ( (parameter_declaration "int fd" primitive_type identifier) , (parameter_declaration "int *pid" primitive_type (pointer_declarator "*pid" * identifier)) , (parameter_declaration "int *uid" primitive_type (pointer_declarator "*uid" * identifier)) , (parameter_declaration "int *gid" primitive_type (pointer_declarator "*gid" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  int iVar3;\n  socklen_t crlen;\n  ucred cr;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  crlen = 0xc;\n  iVar2 = *(int *)PTR___stack_chk_guard_00079930;\n  iVar3 = (*(code *)PTR_getsockopt_000797dc)(fd,0xffff,0x12,&cr,&crlen);\n  if (iVar3 == 0) {\n    *pid = cr.pid;\n    *uid = cr.uid;\n    *gid = cr.gid;\n  }\n  if (iVar2 != *(int *)puVar1) {\n    iVar2 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return iVar2;\n  }\n  return (uint)(iVar3 == 0);\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "socklen_t crlen;" type_identifier identifier ;) (declaration "ucred cr;" type_identifier identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00079930;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00079930" identifier = identifier) ;) (expression_statement "crlen = 0xc;" (assignment_expression "crlen = 0xc" identifier = number_literal) ;) (expression_statement "iVar2 = *(int *)PTR___stack_chk_guard_00079930;" (assignment_expression "iVar2 = *(int *)PTR___stack_chk_guard_00079930" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00079930" * (cast_expression "(int *)PTR___stack_chk_guard_00079930" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar3 = (*(code *)PTR_getsockopt_000797dc)(fd,0xffff,0x12,&cr,&crlen);" (assignment_expression "iVar3 = (*(code *)PTR_getsockopt_000797dc)(fd,0xffff,0x12,&cr,&crlen)" identifier = (call_expression "(*(code *)PTR_getsockopt_000797dc)(fd,0xffff,0x12,&cr,&crlen)" (parenthesized_expression "(*(code *)PTR_getsockopt_000797dc)" ( (pointer_expression "*(code *)PTR_getsockopt_000797dc" * (cast_expression "(code *)PTR_getsockopt_000797dc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(fd,0xffff,0x12,&cr,&crlen)" ( identifier , number_literal , number_literal , (pointer_expression "&cr" & identifier) , (pointer_expression "&crlen" & identifier) )))) ;) (if_statement "if (iVar3 == 0) {\n    *pid = cr.pid;\n    *uid = cr.uid;\n    *gid = cr.gid;\n  }" if (parenthesized_expression "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) )) (compound_statement "{\n    *pid = cr.pid;\n    *uid = cr.uid;\n    *gid = cr.gid;\n  }" { (expression_statement "*pid = cr.pid;" (assignment_expression "*pid = cr.pid" (pointer_expression "*pid" * identifier) = (field_expression "cr.pid" identifier . field_identifier)) ;) (expression_statement "*uid = cr.uid;" (assignment_expression "*uid = cr.uid" (pointer_expression "*uid" * identifier) = (field_expression "cr.uid" identifier . field_identifier)) ;) (expression_statement "*gid = cr.gid;" (assignment_expression "*gid = cr.gid" (pointer_expression "*gid" * identifier) = (field_expression "cr.gid" identifier . field_identifier)) ;) })) (if_statement "if (iVar2 != *(int *)puVar1) {\n    iVar2 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return iVar2;\n  }" if (parenthesized_expression "(iVar2 != *(int *)puVar1)" ( (binary_expression "iVar2 != *(int *)puVar1" identifier != (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    iVar2 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return iVar2;\n  }" { (expression_statement "iVar2 = (*(code *)PTR___stack_chk_fail_000797f0)();" (assignment_expression "iVar2 = (*(code *)PTR___stack_chk_fail_000797f0)()" identifier = (call_expression "(*(code *)PTR___stack_chk_fail_000797f0)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000797f0)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000797f0" * (cast_expression "(code *)PTR___stack_chk_fail_000797f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return iVar2;" return identifier ;) })) (return_statement "return (uint)(iVar3 == 0);" return (call_expression "(uint)(iVar3 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar3 == 0)" ( (binary_expression "iVar3 == 0" identifier == number_literal) ))) ;) })))
(translation_unit "uint so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  local_2c = 0xc;\n  local_1c = *(int *)PTR___stack_chk_guard_00079930;\n  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);\n  if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }\n  if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }\n  return (uint)(iVar2 == 0);\n}\n\n" (function_definition "uint so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  local_2c = 0xc;\n  local_1c = *(int *)PTR___stack_chk_guard_00079930;\n  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);\n  if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }\n  if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }\n  return (uint)(iVar2 == 0);\n}" type_identifier (function_declarator "so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)" identifier (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)" ( (parameter_declaration "undefined4 param_1" type_identifier identifier) , (parameter_declaration "undefined4 *param_2" type_identifier (pointer_declarator "*param_2" * identifier)) , (parameter_declaration "undefined4 *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "undefined4 *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  local_2c = 0xc;\n  local_1c = *(int *)PTR___stack_chk_guard_00079930;\n  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);\n  if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }\n  if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }\n  return (uint)(iVar2 == 0);\n}" { (declaration "undefined *puVar1;" type_identifier (pointer_declarator "*puVar1" * identifier) ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "undefined4 local_2c;" type_identifier identifier ;) (declaration "undefined4 local_28;" type_identifier identifier ;) (declaration "undefined4 local_24;" type_identifier identifier ;) (declaration "undefined4 local_20;" type_identifier identifier ;) (declaration "int local_1c;" primitive_type identifier ;) (expression_statement "puVar1 = PTR___stack_chk_guard_00079930;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00079930" identifier = identifier) ;) (expression_statement "local_2c = 0xc;" (assignment_expression "local_2c = 0xc" identifier = number_literal) ;) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_00079930;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_00079930" identifier = (pointer_expression "*(int *)PTR___stack_chk_guard_00079930" * (cast_expression "(int *)PTR___stack_chk_guard_00079930" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) ;) (expression_statement "iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);" (assignment_expression "iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c)" identifier = (call_expression "(*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c)" (parenthesized_expression "(*(code *)PTR_getsockopt_000797dc)" ( (pointer_expression "*(code *)PTR_getsockopt_000797dc" * (cast_expression "(code *)PTR_getsockopt_000797dc" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "(param_1,0xffff,0x12,&local_28,&local_2c)" ( identifier , number_literal , number_literal , (pointer_expression "&local_28" & identifier) , (pointer_expression "&local_2c" & identifier) )))) ;) (if_statement "if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }" { (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" * identifier) = identifier) ;) (expression_statement "*param_3 = local_24;" (assignment_expression "*param_3 = local_24" (pointer_expression "*param_3" * identifier) = identifier) ;) (expression_statement "*param_4 = local_20;" (assignment_expression "*param_4 = local_20" (pointer_expression "*param_4" * identifier) = identifier) ;) })) (if_statement "if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }" if (parenthesized_expression "(local_1c != *(int *)puVar1)" ( (binary_expression "local_1c != *(int *)puVar1" identifier != (pointer_expression "*(int *)puVar1" * (cast_expression "(int *)puVar1" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier))) )) (compound_statement "{\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }" { (expression_statement "uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();" (assignment_expression "uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)()" identifier = (call_expression "(*(code *)PTR___stack_chk_fail_000797f0)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000797f0)" ( (pointer_expression "*(code *)PTR___stack_chk_fail_000797f0" * (cast_expression "(code *)PTR___stack_chk_fail_000797f0" ( (type_descriptor "code *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) )) (argument_list "()" ( )))) ;) (return_statement "return uVar3;" return identifier ;) })) (return_statement "return (uint)(iVar2 == 0);" return (call_expression "(uint)(iVar2 == 0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) ;) (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( IDENT , LIT , LIT , (pointer_expression & IDENT) , (pointer_expression & IDENT) )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = IDENT) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT))) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT)) )) (argument_list ( )))) ;) (return_statement return IDENT ;) })) (return_statement return (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT == LIT) ))) ;) })))
(function_definition "uint so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)\n\n{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  local_2c = 0xc;\n  local_1c = *(int *)PTR___stack_chk_guard_00079930;\n  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);\n  if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }\n  if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }\n  return (uint)(iVar2 == 0);\n}" (type_identifier "uint") (function_declarator "so_peercred(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)" (identifier "so_peercred") (parameter_list "(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)" (( "(") (parameter_declaration "undefined4 param_1" (type_identifier "undefined4") (identifier "param_1")) (, ",") (parameter_declaration "undefined4 *param_2" (type_identifier "undefined4") (pointer_declarator "*param_2" (* "*") (identifier "param_2"))) (, ",") (parameter_declaration "undefined4 *param_3" (type_identifier "undefined4") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "undefined4 *param_4" (type_identifier "undefined4") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  undefined *puVar1;\n  int iVar2;\n  uint uVar3;\n  undefined4 local_2c;\n  undefined4 local_28;\n  undefined4 local_24;\n  undefined4 local_20;\n  int local_1c;\n  \n  puVar1 = PTR___stack_chk_guard_00079930;\n  local_2c = 0xc;\n  local_1c = *(int *)PTR___stack_chk_guard_00079930;\n  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);\n  if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }\n  if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }\n  return (uint)(iVar2 == 0);\n}" ({ "{") (declaration "undefined *puVar1;" (type_identifier "undefined") (pointer_declarator "*puVar1" (* "*") (identifier "puVar1")) (; ";")) (declaration "int iVar2;" (primitive_type "int") (identifier "iVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "undefined4 local_2c;" (type_identifier "undefined4") (identifier "local_2c") (; ";")) (declaration "undefined4 local_28;" (type_identifier "undefined4") (identifier "local_28") (; ";")) (declaration "undefined4 local_24;" (type_identifier "undefined4") (identifier "local_24") (; ";")) (declaration "undefined4 local_20;" (type_identifier "undefined4") (identifier "local_20") (; ";")) (declaration "int local_1c;" (primitive_type "int") (identifier "local_1c") (; ";")) (expression_statement "puVar1 = PTR___stack_chk_guard_00079930;" (assignment_expression "puVar1 = PTR___stack_chk_guard_00079930" (identifier "puVar1") (= "=") (identifier "PTR___stack_chk_guard_00079930")) (; ";")) (expression_statement "local_2c = 0xc;" (assignment_expression "local_2c = 0xc" (identifier "local_2c") (= "=") (number_literal "0xc")) (; ";")) (expression_statement "local_1c = *(int *)PTR___stack_chk_guard_00079930;" (assignment_expression "local_1c = *(int *)PTR___stack_chk_guard_00079930" (identifier "local_1c") (= "=") (pointer_expression "*(int *)PTR___stack_chk_guard_00079930" (* "*") (cast_expression "(int *)PTR___stack_chk_guard_00079930" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_guard_00079930")))) (; ";")) (expression_statement "iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);" (assignment_expression "iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c)" (identifier "iVar2") (= "=") (call_expression "(*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c)" (parenthesized_expression "(*(code *)PTR_getsockopt_000797dc)" (( "(") (pointer_expression "*(code *)PTR_getsockopt_000797dc" (* "*") (cast_expression "(code *)PTR_getsockopt_000797dc" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR_getsockopt_000797dc"))) () ")")) (argument_list "(param_1,0xffff,0x12,&local_28,&local_2c)" (( "(") (identifier "param_1") (, ",") (number_literal "0xffff") (, ",") (number_literal "0x12") (, ",") (pointer_expression "&local_28" (& "&") (identifier "local_28")) (, ",") (pointer_expression "&local_2c" (& "&") (identifier "local_2c")) () ")")))) (; ";")) (if_statement "if (iVar2 == 0) {\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }" (if "if") (parenthesized_expression "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    *param_2 = local_28;\n    *param_3 = local_24;\n    *param_4 = local_20;\n  }" ({ "{") (expression_statement "*param_2 = local_28;" (assignment_expression "*param_2 = local_28" (pointer_expression "*param_2" (* "*") (identifier "param_2")) (= "=") (identifier "local_28")) (; ";")) (expression_statement "*param_3 = local_24;" (assignment_expression "*param_3 = local_24" (pointer_expression "*param_3" (* "*") (identifier "param_3")) (= "=") (identifier "local_24")) (; ";")) (expression_statement "*param_4 = local_20;" (assignment_expression "*param_4 = local_20" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (= "=") (identifier "local_20")) (; ";")) (} "}"))) (if_statement "if (local_1c != *(int *)puVar1) {\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }" (if "if") (parenthesized_expression "(local_1c != *(int *)puVar1)" (( "(") (binary_expression "local_1c != *(int *)puVar1" (identifier "local_1c") (!= "!=") (pointer_expression "*(int *)puVar1" (* "*") (cast_expression "(int *)puVar1" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "puVar1")))) () ")")) (compound_statement "{\n    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();\n    return uVar3;\n  }" ({ "{") (expression_statement "uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();" (assignment_expression "uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)()" (identifier "uVar3") (= "=") (call_expression "(*(code *)PTR___stack_chk_fail_000797f0)()" (parenthesized_expression "(*(code *)PTR___stack_chk_fail_000797f0)" (( "(") (pointer_expression "*(code *)PTR___stack_chk_fail_000797f0" (* "*") (cast_expression "(code *)PTR___stack_chk_fail_000797f0" (( "(") (type_descriptor "code *" (type_identifier "code") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "PTR___stack_chk_fail_000797f0"))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (return_statement "return uVar3;" (return "return") (identifier "uVar3") (; ";")) (} "}"))) (return_statement "return (uint)(iVar2 == 0);" (return "return") (call_expression "(uint)(iVar2 == 0)" (parenthesized_expression "(uint)" (( "(") (identifier "uint") () ")")) (argument_list "(iVar2 == 0)" (( "(") (binary_expression "iVar2 == 0" (identifier "iVar2") (== "==") (number_literal "0")) () ")"))) (; ";")) (} "}")))
(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (parameter_declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))))) body: (compound_statement (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (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: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list (identifier) (number_literal) (number_literal) (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (identifier)) right: (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: (identifier))))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (parenthesized_expression (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (identifier)))) arguments: (argument_list)))) (return_statement (identifier)))) (return_statement (call_expression function: (parenthesized_expression (identifier)) arguments: (argument_list (binary_expression left: (identifier) right: (number_literal))))))))

uint MASKED(undefined4 param_1,undefined4 *param_2,undefined4 *param_3,undefined4 *param_4)

{
  undefined *puVar1;
  int iVar2;
  uint uVar3;
  undefined4 local_2c;
  undefined4 local_28;
  undefined4 local_24;
  undefined4 local_20;
  int local_1c;
  
  puVar1 = PTR___stack_chk_guard_00079930;
  local_2c = 0xc;
  local_1c = *(int *)PTR___stack_chk_guard_00079930;
  iVar2 = (*(code *)PTR_getsockopt_000797dc)(param_1,0xffff,0x12,&local_28,&local_2c);
  if (iVar2 == 0) {
    *param_2 = local_28;
    *param_3 = local_24;
    *param_4 = local_20;
  }
  if (local_1c != *(int *)puVar1) {
    uVar3 = (*(code *)PTR___stack_chk_fail_000797f0)();
    return uVar3;
  }
  return (uint)(iVar2 == 0);
}

