
/* DWARF original prototype: bool init(Plugin_recorder * this) */

int __thiscall gold::Plugin_recorder::init(Plugin_recorder *this,EVP_PKEY_CTX *ctx)

{
  ulong __n;
  char *pcVar1;
  uint uVar2;
  uint uVar3;
  char *pcVar4;
  size_t sVar5;
  FILE *pFVar6;
  char *format;
  uint *puVar7;
  uint *puVar8;
  bool bVar9;
  char dir_template [22];
  string logname;
  
  builtin_strncpy(dir_template + 0x10,"XXXXX",6);
  dir_template._0_8_ = s_gold_recording_X______gold_reads_00382b50._0_8_;
  dir_template._8_8_ = s_gold_recording_X______gold_reads_00382b50._8_8_;
  pcVar4 = mkdtemp(dir_template);
  puVar8 = (uint *)dir_template;
  if (pcVar4 == (char *)0x0) {
    return 0;
  }
  do {
    puVar7 = puVar8;
    uVar2 = *puVar7 + 0xfefefeff & ~*puVar7;
    uVar3 = uVar2 & 0x80808080;
    puVar8 = puVar7 + 1;
  } while (uVar3 == 0);
  bVar9 = (uVar2 & 0x8080) == 0;
  if (bVar9) {
    uVar3 = uVar3 >> 0x10;
  }
  if (bVar9) {
    puVar8 = (uint *)((long)puVar7 + 6);
  }
  __n = (long)puVar8 + (-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;
  pcVar4 = (char *)operator_new__(__n);
  strncpy(pcVar4,dir_template,__n);
  logname._M_dataplus._M_p = (pointer)&logname.field_2;
  sVar5 = strlen(pcVar4);
  std::__cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::
  _M_construct<char_const*>(&logname,pcVar4,pcVar4 + sVar5);
  if (0x7fffffffffffffff - logname._M_string_length < 4) {
                    /* WARNING: Subroutine does not return */
    std::__throw_length_error("basic_string::append");
  }
                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */
  std::string::_M_append((string *)&logname,"/log",4);
  pFVar6 = fopen64(logname._M_dataplus._M_p,"w");
  if (pFVar6 != (FILE *)0x0) {
    this->tempdir_ = pcVar4;
    this->logfile_ = (FILE *)pFVar6;
    pcVar1 = program_name;
    format = (char *)gettext("%s: recording to %s");
    gold_info(format,pcVar1,pcVar4);
  }
  if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9
       *)logname._M_dataplus._M_p != &logname.field_2) {
    operator_delete(logname._M_dataplus._M_p);
  }
  return (uint)(pFVar6 != (FILE *)0x0);
}



bool FUN_0023a160(long param_1)

{
  undefined8 uVar1;
  uint uVar2;
  uint uVar3;
  char *pcVar4;
  size_t sVar5;
  FILE *pFVar6;
  undefined8 uVar7;
  uint *puVar8;
  uint *puVar9;
  bool bVar10;
  uint local_68 [2];
  char acStack_60 [8];
  undefined4 local_58;
  undefined2 local_54;
  char *local_48;
  long local_40;
  char local_38 [24];
  
  local_58 = 0x58585858;
  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;
  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;
  local_54 = 0x58;
  pcVar4 = mkdtemp((char *)local_68);
  puVar9 = local_68;
  if (pcVar4 == (char *)0x0) {
    return false;
  }
  do {
    puVar8 = puVar9;
    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;
    uVar3 = uVar2 & 0x80808080;
    puVar9 = puVar8 + 1;
  } while (uVar3 == 0);
  bVar10 = (uVar2 & 0x8080) == 0;
  if (bVar10) {
    uVar3 = uVar3 >> 0x10;
  }
  if (bVar10) {
    puVar9 = (uint *)((long)puVar8 + 6);
  }
  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;
  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);
  strncpy(pcVar4,(char *)local_68,sVar5);
  local_48 = local_38;
  sVar5 = strlen(pcVar4);
  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);
  if (0x7fffffffffffffffU - local_40 < 4) {
                    /* WARNING: Subroutine does not return */
    FUN_00319590("basic_string::append");
  }
                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */
  FUN_002e2ee0(&local_48,&DAT_00381da3,4);
  pFVar6 = fopen64(local_48,"w");
  if (pFVar6 != (FILE *)0x0) {
    *(char **)(param_1 + 8) = pcVar4;
    *(FILE **)(param_1 + 0x10) = pFVar6;
    uVar1 = DAT_0043e8e8;
    uVar7 = gettext("%s: recording to %s");
    FUN_00178480(uVar7,uVar1,pcVar4);
  }
  if (local_48 != local_38) {
    FUN_002dac60();
  }
  return pFVar6 != (FILE *)0x0;
}


PUSH R13
MOV EAX,0x58
PUSH R12
MOV R12,RDI
PUSH RBP
PUSH RBX
SUB RSP,0x48
MOVDQA XMM0,xmmword ptr [0x00382b50]
MOV R13,RSP
MOV dword ptr [RSP + 0x10],0x58585858
MOV RDI,R13
MOVAPS xmmword ptr [RSP],XMM0
MOV word ptr [RSP + 0x14],AX
CALL 0x00147830
TEST RAX,RAX
JZ 0x0023a2c0
MOV RDX,R13
MOV ECX,dword ptr [RDX]
ADD RDX,0x4
LEA EAX,[RCX + -0x1010101]
NOT ECX
AND EAX,ECX
AND EAX,0x80808080
JZ 0x0023a1a2
MOV ECX,EAX
SHR ECX,0x10
TEST EAX,0x8080
CMOVZ EAX,ECX
LEA RCX,[RDX + 0x2]
CMOVZ RDX,RCX
MOV ESI,EAX
ADD SIL,AL
SBB RDX,0x3
SUB RDX,R13
LEA RBX,[RDX + 0x1]
MOV RDI,RBX
CALL 0x002d9430
MOV RDX,RBX
MOV RSI,R13
LEA RBX,[RSP + 0x20]
MOV RBP,RAX
MOV RDI,RAX
CALL 0x001478b0
LEA RAX,[RBX + 0x10]
MOV RDI,RBP
MOV qword ptr [RSP + 0x20],RAX
CALL 0x00147490
MOV RSI,RBP
MOV RDI,RBX
LEA RDX,[RBP + RAX*0x1]
CALL 0x001665c0
MOV RAX,0x7fffffffffffffff
SUB RAX,qword ptr [RSP + 0x28]
CMP RAX,0x3
JBE 0x0023a2cf
MOV EDX,0x4
LEA RSI,[0x381da3]
MOV RDI,RBX
CALL 0x002e2ee0
MOV RDI,qword ptr [RSP + 0x20]
LEA RSI,[0x386789]
CALL 0x00147980
TEST RAX,RAX
JZ 0x0023a2b8
MOV qword ptr [R12 + 0x8],RBP
LEA RDI,[0x381da8]
MOV qword ptr [R12 + 0x10],RAX
MOV R12,qword ptr [0x0043e8e8]
CALL 0x00147320
MOV RDX,RBP
MOV RSI,R12
MOV RDI,RAX
XOR EAX,EAX
CALL 0x00178480
MOV EBP,0x1
MOV RDI,qword ptr [RSP + 0x20]
ADD RBX,0x10
CMP RDI,RBX
JZ 0x0023a2a5
CALL 0x002dac60
ADD RSP,0x48
MOV EAX,EBP
POP RBX
POP RBP
POP R12
POP R13
RET
XOR EBP,EBP
JMP 0x0023a292
ADD RSP,0x48
XOR EBP,EBP
POP RBX
MOV EAX,EBP
POP RBP
POP R12
POP R13
RET
LEA RDI,[0x371fa2]
CALL 0x00319590
(translation_unit "bool FUN_0023a160(long param_1)\n\n{\n  undefined8 uVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  undefined8 uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  bool bVar10;\n  uint local_68 [2];\n  char acStack_60 [8];\n  undefined4 local_58;\n  undefined2 local_54;\n  char *local_48;\n  long local_40;\n  char local_38 [24];\n  \n  local_58 = 0x58585858;\n  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;\n  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;\n  local_54 = 0x58;\n  pcVar4 = mkdtemp((char *)local_68);\n  puVar9 = local_68;\n  if (pcVar4 == (char *)0x0) {\n    return false;\n  }\n  do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);\n  bVar10 = (uVar2 & 0x8080) == 0;\n  if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }\n  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);\n  strncpy(pcVar4,(char *)local_68,sVar5);\n  local_48 = local_38;\n  sVar5 = strlen(pcVar4);\n  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffffU - local_40 < 4) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00319590("basic_string::append");\n  }\n                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */\n  FUN_002e2ee0(&local_48,&DAT_00381da3,4);\n  pFVar6 = fopen64(local_48,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }\n  if (local_48 != local_38) {\n    FUN_002dac60();\n  }\n  return pFVar6 != (FILE *)0x0;\n}\n\n" (function_definition "bool FUN_0023a160(long param_1)\n\n{\n  undefined8 uVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  undefined8 uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  bool bVar10;\n  uint local_68 [2];\n  char acStack_60 [8];\n  undefined4 local_58;\n  undefined2 local_54;\n  char *local_48;\n  long local_40;\n  char local_38 [24];\n  \n  local_58 = 0x58585858;\n  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;\n  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;\n  local_54 = 0x58;\n  pcVar4 = mkdtemp((char *)local_68);\n  puVar9 = local_68;\n  if (pcVar4 == (char *)0x0) {\n    return false;\n  }\n  do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);\n  bVar10 = (uVar2 & 0x8080) == 0;\n  if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }\n  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);\n  strncpy(pcVar4,(char *)local_68,sVar5);\n  local_48 = local_38;\n  sVar5 = strlen(pcVar4);\n  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffffU - local_40 < 4) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00319590("basic_string::append");\n  }\n                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */\n  FUN_002e2ee0(&local_48,&DAT_00381da3,4);\n  pFVar6 = fopen64(local_48,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }\n  if (local_48 != local_38) {\n    FUN_002dac60();\n  }\n  return pFVar6 != (FILE *)0x0;\n}" primitive_type (function_declarator "FUN_0023a160(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  undefined8 uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  bool bVar10;\n  uint local_68 [2];\n  char acStack_60 [8];\n  undefined4 local_58;\n  undefined2 local_54;\n  char *local_48;\n  long local_40;\n  char local_38 [24];\n  \n  local_58 = 0x58585858;\n  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;\n  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;\n  local_54 = 0x58;\n  pcVar4 = mkdtemp((char *)local_68);\n  puVar9 = local_68;\n  if (pcVar4 == (char *)0x0) {\n    return false;\n  }\n  do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);\n  bVar10 = (uVar2 & 0x8080) == 0;\n  if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }\n  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);\n  strncpy(pcVar4,(char *)local_68,sVar5);\n  local_48 = local_38;\n  sVar5 = strlen(pcVar4);\n  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffffU - local_40 < 4) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00319590("basic_string::append");\n  }\n                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */\n  FUN_002e2ee0(&local_48,&DAT_00381da3,4);\n  pFVar6 = fopen64(local_48,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }\n  if (local_48 != local_38) {\n    FUN_002dac60();\n  }\n  return pFVar6 != (FILE *)0x0;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "FILE *pFVar6;" type_identifier (pointer_declarator "*pFVar6" * identifier) ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "uint local_68 [2];" type_identifier (array_declarator "local_68 [2]" identifier [ number_literal ]) ;) (declaration "char acStack_60 [8];" primitive_type (array_declarator "acStack_60 [8]" identifier [ number_literal ]) ;) (declaration "undefined4 local_58;" type_identifier identifier ;) (declaration "undefined2 local_54;" type_identifier identifier ;) (declaration "char *local_48;" primitive_type (pointer_declarator "*local_48" * identifier) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (declaration "char local_38 [24];" primitive_type (array_declarator "local_38 [24]" identifier [ number_literal ]) ;) (expression_statement "local_58 = 0x58585858;" (assignment_expression "local_58 = 0x58585858" identifier = number_literal) ;) (expression_statement "local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;" (assignment_expression "local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_" identifier = (cast_expression "(uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_" ( (type_descriptor "uint  [2]" type_identifier (abstract_array_declarator "[2]" [ number_literal ])) ) (field_expression "s_gold_recording_X______gold_reads_00382b50._0_8_" identifier . field_identifier))) ;) (expression_statement "acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;" (assignment_expression "acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_" identifier = (cast_expression "(char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_" ( (type_descriptor "char  [8]" primitive_type (abstract_array_declarator "[8]" [ number_literal ])) ) (field_expression "s_gold_recording_X______gold_reads_00382b50._8_8_" identifier . field_identifier))) ;) (expression_statement "local_54 = 0x58;" (assignment_expression "local_54 = 0x58" identifier = number_literal) ;) (expression_statement "pcVar4 = mkdtemp((char *)local_68);" (assignment_expression "pcVar4 = mkdtemp((char *)local_68)" identifier = (call_expression "mkdtemp((char *)local_68)" identifier (argument_list "((char *)local_68)" ( (cast_expression "(char *)local_68" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "puVar9 = local_68;" (assignment_expression "puVar9 = local_68" identifier = identifier) ;) (if_statement "if (pcVar4 == (char *)0x0) {\n    return false;\n  }" if (parenthesized_expression "(pcVar4 == (char *)0x0)" ( (binary_expression "pcVar4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return false;\n  }" { (return_statement "return false;" return false ;) })) (do_statement "do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);" do (compound_statement "{\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  }" { (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" identifier = identifier) ;) (expression_statement "uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;" (assignment_expression "uVar2 = *puVar8 + 0xfefefeff & ~*puVar8" identifier = (binary_expression "*puVar8 + 0xfefefeff & ~*puVar8" (binary_expression "*puVar8 + 0xfefefeff" (pointer_expression "*puVar8" * identifier) + number_literal) & (unary_expression "~*puVar8" ~ (pointer_expression "*puVar8" * identifier)))) ;) (expression_statement "uVar3 = uVar2 & 0x80808080;" (assignment_expression "uVar3 = uVar2 & 0x80808080" identifier = (binary_expression "uVar2 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar9 = puVar8 + 1;" (assignment_expression "puVar9 = puVar8 + 1" identifier = (binary_expression "puVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) ;) (expression_statement "bVar10 = (uVar2 & 0x8080) == 0;" (assignment_expression "bVar10 = (uVar2 & 0x8080) == 0" identifier = (binary_expression "(uVar2 & 0x8080) == 0" (parenthesized_expression "(uVar2 & 0x8080)" ( (binary_expression "uVar2 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n    uVar3 = uVar3 >> 0x10;\n  }" { (expression_statement "uVar3 = uVar3 >> 0x10;" (assignment_expression "uVar3 = uVar3 >> 0x10" identifier = (binary_expression "uVar3 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }" { (expression_statement "puVar9 = (uint *)((long)puVar8 + 6);" (assignment_expression "puVar9 = (uint *)((long)puVar8 + 6)" identifier = (cast_expression "(uint *)((long)puVar8 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar8 + 6)" ( (binary_expression "(long)puVar8 + 6" (cast_expression "(long)puVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) ;) })) (expression_statement "sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;" (assignment_expression "sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2" identifier = (binary_expression "(long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2" (binary_expression "(long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3))" (cast_expression "(long)puVar9" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (parenthesized_expression "(-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3))" ( (binary_expression "-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)" (unary_expression "-(long)local_68" - (cast_expression "(long)local_68" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) - (cast_expression "(ulong)CARRY1((byte)uVar3,(byte)uVar3)" ( (type_descriptor "ulong" type_identifier) ) (call_expression "CARRY1((byte)uVar3,(byte)uVar3)" identifier (argument_list "((byte)uVar3,(byte)uVar3)" ( (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) ))) + number_literal)) ;) (expression_statement "pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);" (assignment_expression "pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" identifier = (cast_expression "(char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" identifier (argument_list "(sVar5,uVar3 & 0xffffff00)" ( identifier , (binary_expression "uVar3 & 0xffffff00" identifier & number_literal) ))))) ;) (expression_statement "strncpy(pcVar4,(char *)local_68,sVar5);" (call_expression "strncpy(pcVar4,(char *)local_68,sVar5)" identifier (argument_list "(pcVar4,(char *)local_68,sVar5)" ( identifier , (cast_expression "(char *)local_68" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "local_48 = local_38;" (assignment_expression "local_48 = local_38" identifier = identifier) ;) (expression_statement "sVar5 = strlen(pcVar4);" (assignment_expression "sVar5 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);" (call_expression "FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5)" identifier (argument_list "(&local_48,pcVar4,pcVar4 + sVar5)" ( (pointer_expression "&local_48" & identifier) , identifier , (binary_expression "pcVar4 + sVar5" identifier + identifier) ))) ;) (if_statement "if (0x7fffffffffffffffU - local_40 < 4) {\n                    /* WARNING: Subroutine does not return */\n    FUN_00319590("basic_string::append");\n  }" if (parenthesized_expression "(0x7fffffffffffffffU - local_40 < 4)" ( (binary_expression "0x7fffffffffffffffU - local_40 < 4" (binary_expression "0x7fffffffffffffffU - local_40" number_literal - identifier) < number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    FUN_00319590("basic_string::append");\n  }" { comment (expression_statement "FUN_00319590("basic_string::append");" (call_expression "FUN_00319590("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) comment (expression_statement "FUN_002e2ee0(&local_48,&DAT_00381da3,4);" (call_expression "FUN_002e2ee0(&local_48,&DAT_00381da3,4)" identifier (argument_list "(&local_48,&DAT_00381da3,4)" ( (pointer_expression "&local_48" & identifier) , (pointer_expression "&DAT_00381da3" & identifier) , number_literal ))) ;) (expression_statement "pFVar6 = fopen64(local_48,"w");" (assignment_expression "pFVar6 = fopen64(local_48,"w")" identifier = (call_expression "fopen64(local_48,"w")" identifier (argument_list "(local_48,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }" if (parenthesized_expression "(pFVar6 != (FILE *)0x0)" ( (binary_expression "pFVar6 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }" { (expression_statement "*(char **)(param_1 + 8) = pcVar4;" (assignment_expression "*(char **)(param_1 + 8) = pcVar4" (pointer_expression "*(char **)(param_1 + 8)" * (cast_expression "(char **)(param_1 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(FILE **)(param_1 + 0x10) = pFVar6;" (assignment_expression "*(FILE **)(param_1 + 0x10) = pFVar6" (pointer_expression "*(FILE **)(param_1 + 0x10)" * (cast_expression "(FILE **)(param_1 + 0x10)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar1 = DAT_0043e8e8;" (assignment_expression "uVar1 = DAT_0043e8e8" identifier = identifier) ;) (expression_statement "uVar7 = gettext("%s: recording to %s");" (assignment_expression "uVar7 = gettext("%s: recording to %s")" identifier = (call_expression "gettext("%s: recording to %s")" identifier (argument_list "("%s: recording to %s")" ( (string_literal ""%s: recording to %s"" " string_content ") )))) ;) (expression_statement "FUN_00178480(uVar7,uVar1,pcVar4);" (call_expression "FUN_00178480(uVar7,uVar1,pcVar4)" identifier (argument_list "(uVar7,uVar1,pcVar4)" ( identifier , identifier , identifier ))) ;) })) (if_statement "if (local_48 != local_38) {\n    FUN_002dac60();\n  }" if (parenthesized_expression "(local_48 != local_38)" ( (binary_expression "local_48 != local_38" identifier != identifier) )) (compound_statement "{\n    FUN_002dac60();\n  }" { (expression_statement "FUN_002dac60();" (call_expression "FUN_002dac60()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return pFVar6 != (FILE *)0x0;" return (binary_expression "pFVar6 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })))
(translation_unit "/* DWARF original prototype: bool init(Plugin_recorder * this) */\n\nint __thiscall gold::Plugin_recorder::init(Plugin_recorder *this,EVP_PKEY_CTX *ctx)\n\n{\n  ulong __n;\n  char *pcVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  char *format;\n  uint *puVar7;\n  uint *puVar8;\n  bool bVar9;\n  char dir_template [22];\n  string logname;\n  \n  builtin_strncpy(dir_template + 0x10,"XXXXX",6);\n  dir_template._0_8_ = s_gold_recording_X______gold_reads_00382b50._0_8_;\n  dir_template._8_8_ = s_gold_recording_X______gold_reads_00382b50._8_8_;\n  pcVar4 = mkdtemp(dir_template);\n  puVar8 = (uint *)dir_template;\n  if (pcVar4 == (char *)0x0) {\n    return 0;\n  }\n  do {\n    puVar7 = puVar8;\n    uVar2 = *puVar7 + 0xfefefeff & ~*puVar7;\n    uVar3 = uVar2 & 0x80808080;\n    puVar8 = puVar7 + 1;\n  } while (uVar3 == 0);\n  bVar9 = (uVar2 & 0x8080) == 0;\n  if (bVar9) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar9) {\n    puVar8 = (uint *)((long)puVar7 + 6);\n  }\n  __n = (long)puVar8 + (-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)operator_new__(__n);\n  strncpy(pcVar4,dir_template,__n);\n  logname._M_dataplus._M_p = (pointer)&logname.field_2;\n  sVar5 = strlen(pcVar4);\n  std::__cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::\n  _M_construct<char_const*>(&logname,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffff - logname._M_string_length < 4) {\n                    /* WARNING: Subroutine does not return */\n    std::__throw_length_error("basic_string::append");\n  }\n                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */\n  std::string::_M_append((string *)&logname,"/log",4);\n  pFVar6 = fopen64(logname._M_dataplus._M_p,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    this->tempdir_ = pcVar4;\n    this->logfile_ = (FILE *)pFVar6;\n    pcVar1 = program_name;\n    format = (char *)gettext("%s: recording to %s");\n    gold_info(format,pcVar1,pcVar4);\n  }\n  if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)logname._M_dataplus._M_p != &logname.field_2) {\n    operator_delete(logname._M_dataplus._M_p);\n  }\n  return (uint)(pFVar6 != (FILE *)0x0);\n}\n\n" comment (function_definition "int __thiscall gold::Plugin_recorder::init(Plugin_recorder *this,EVP_PKEY_CTX *ctx)\n\n{\n  ulong __n;\n  char *pcVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  char *format;\n  uint *puVar7;\n  uint *puVar8;\n  bool bVar9;\n  char dir_template [22];\n  string logname;\n  \n  builtin_strncpy(dir_template + 0x10,"XXXXX",6);\n  dir_template._0_8_ = s_gold_recording_X______gold_reads_00382b50._0_8_;\n  dir_template._8_8_ = s_gold_recording_X______gold_reads_00382b50._8_8_;\n  pcVar4 = mkdtemp(dir_template);\n  puVar8 = (uint *)dir_template;\n  if (pcVar4 == (char *)0x0) {\n    return 0;\n  }\n  do {\n    puVar7 = puVar8;\n    uVar2 = *puVar7 + 0xfefefeff & ~*puVar7;\n    uVar3 = uVar2 & 0x80808080;\n    puVar8 = puVar7 + 1;\n  } while (uVar3 == 0);\n  bVar9 = (uVar2 & 0x8080) == 0;\n  if (bVar9) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar9) {\n    puVar8 = (uint *)((long)puVar7 + 6);\n  }\n  __n = (long)puVar8 + (-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)operator_new__(__n);\n  strncpy(pcVar4,dir_template,__n);\n  logname._M_dataplus._M_p = (pointer)&logname.field_2;\n  sVar5 = strlen(pcVar4);\n  std::__cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::\n  _M_construct<char_const*>(&logname,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffff - logname._M_string_length < 4) {\n                    /* WARNING: Subroutine does not return */\n    std::__throw_length_error("basic_string::append");\n  }\n                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */\n  std::string::_M_append((string *)&logname,"/log",4);\n  pFVar6 = fopen64(logname._M_dataplus._M_p,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    this->tempdir_ = pcVar4;\n    this->logfile_ = (FILE *)pFVar6;\n    pcVar1 = program_name;\n    format = (char *)gettext("%s: recording to %s");\n    gold_info(format,pcVar1,pcVar4);\n  }\n  if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)logname._M_dataplus._M_p != &logname.field_2) {\n    operator_delete(logname._M_dataplus._M_p);\n  }\n  return (uint)(pFVar6 != (FILE *)0x0);\n}" primitive_type (ms_call_modifier "__thiscall" __thiscall) (ERROR "gold::Plugin_recorder::" identifier : : identifier : :) (function_declarator "init(Plugin_recorder *this,EVP_PKEY_CTX *ctx)" identifier (parameter_list "(Plugin_recorder *this,EVP_PKEY_CTX *ctx)" ( (parameter_declaration "Plugin_recorder *this" type_identifier (pointer_declarator "*this" * identifier)) , (parameter_declaration "EVP_PKEY_CTX *ctx" type_identifier (pointer_declarator "*ctx" * identifier)) ))) (compound_statement "{\n  ulong __n;\n  char *pcVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  char *format;\n  uint *puVar7;\n  uint *puVar8;\n  bool bVar9;\n  char dir_template [22];\n  string logname;\n  \n  builtin_strncpy(dir_template + 0x10,"XXXXX",6);\n  dir_template._0_8_ = s_gold_recording_X______gold_reads_00382b50._0_8_;\n  dir_template._8_8_ = s_gold_recording_X______gold_reads_00382b50._8_8_;\n  pcVar4 = mkdtemp(dir_template);\n  puVar8 = (uint *)dir_template;\n  if (pcVar4 == (char *)0x0) {\n    return 0;\n  }\n  do {\n    puVar7 = puVar8;\n    uVar2 = *puVar7 + 0xfefefeff & ~*puVar7;\n    uVar3 = uVar2 & 0x80808080;\n    puVar8 = puVar7 + 1;\n  } while (uVar3 == 0);\n  bVar9 = (uVar2 & 0x8080) == 0;\n  if (bVar9) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar9) {\n    puVar8 = (uint *)((long)puVar7 + 6);\n  }\n  __n = (long)puVar8 + (-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)operator_new__(__n);\n  strncpy(pcVar4,dir_template,__n);\n  logname._M_dataplus._M_p = (pointer)&logname.field_2;\n  sVar5 = strlen(pcVar4);\n  std::__cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::\n  _M_construct<char_const*>(&logname,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffff - logname._M_string_length < 4) {\n                    /* WARNING: Subroutine does not return */\n    std::__throw_length_error("basic_string::append");\n  }\n                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */\n  std::string::_M_append((string *)&logname,"/log",4);\n  pFVar6 = fopen64(logname._M_dataplus._M_p,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    this->tempdir_ = pcVar4;\n    this->logfile_ = (FILE *)pFVar6;\n    pcVar1 = program_name;\n    format = (char *)gettext("%s: recording to %s");\n    gold_info(format,pcVar1,pcVar4);\n  }\n  if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)logname._M_dataplus._M_p != &logname.field_2) {\n    operator_delete(logname._M_dataplus._M_p);\n  }\n  return (uint)(pFVar6 != (FILE *)0x0);\n}" { (declaration "ulong __n;" type_identifier identifier ;) (declaration "char *pcVar1;" primitive_type (pointer_declarator "*pcVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "FILE *pFVar6;" type_identifier (pointer_declarator "*pFVar6" * identifier) ;) (declaration "char *format;" primitive_type (pointer_declarator "*format" * identifier) ;) (declaration "uint *puVar7;" type_identifier (pointer_declarator "*puVar7" * identifier) ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "bool bVar9;" primitive_type identifier ;) (declaration "char dir_template [22];" primitive_type (array_declarator "dir_template [22]" identifier [ number_literal ]) ;) (declaration "string logname;" type_identifier identifier ;) (expression_statement "builtin_strncpy(dir_template + 0x10,"XXXXX",6);" (call_expression "builtin_strncpy(dir_template + 0x10,"XXXXX",6)" identifier (argument_list "(dir_template + 0x10,"XXXXX",6)" ( (binary_expression "dir_template + 0x10" identifier + number_literal) , (string_literal ""XXXXX"" " string_content ") , number_literal ))) ;) (expression_statement "dir_template._0_8_ = s_gold_recording_X______gold_reads_00382b50._0_8_;" (assignment_expression "dir_template._0_8_ = s_gold_recording_X______gold_reads_00382b50._0_8_" (field_expression "dir_template._0_8_" identifier . field_identifier) = (field_expression "s_gold_recording_X______gold_reads_00382b50._0_8_" identifier . field_identifier)) ;) (expression_statement "dir_template._8_8_ = s_gold_recording_X______gold_reads_00382b50._8_8_;" (assignment_expression "dir_template._8_8_ = s_gold_recording_X______gold_reads_00382b50._8_8_" (field_expression "dir_template._8_8_" identifier . field_identifier) = (field_expression "s_gold_recording_X______gold_reads_00382b50._8_8_" identifier . field_identifier)) ;) (expression_statement "pcVar4 = mkdtemp(dir_template);" (assignment_expression "pcVar4 = mkdtemp(dir_template)" identifier = (call_expression "mkdtemp(dir_template)" identifier (argument_list "(dir_template)" ( identifier )))) ;) (expression_statement "puVar8 = (uint *)dir_template;" (assignment_expression "puVar8 = (uint *)dir_template" identifier = (cast_expression "(uint *)dir_template" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (if_statement "if (pcVar4 == (char *)0x0) {\n    return 0;\n  }" if (parenthesized_expression "(pcVar4 == (char *)0x0)" ( (binary_expression "pcVar4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return 0;\n  }" { (return_statement "return 0;" return number_literal ;) })) (do_statement "do {\n    puVar7 = puVar8;\n    uVar2 = *puVar7 + 0xfefefeff & ~*puVar7;\n    uVar3 = uVar2 & 0x80808080;\n    puVar8 = puVar7 + 1;\n  } while (uVar3 == 0);" do (compound_statement "{\n    puVar7 = puVar8;\n    uVar2 = *puVar7 + 0xfefefeff & ~*puVar7;\n    uVar3 = uVar2 & 0x80808080;\n    puVar8 = puVar7 + 1;\n  }" { (expression_statement "puVar7 = puVar8;" (assignment_expression "puVar7 = puVar8" identifier = identifier) ;) (expression_statement "uVar2 = *puVar7 + 0xfefefeff & ~*puVar7;" (assignment_expression "uVar2 = *puVar7 + 0xfefefeff & ~*puVar7" identifier = (binary_expression "*puVar7 + 0xfefefeff & ~*puVar7" (binary_expression "*puVar7 + 0xfefefeff" (pointer_expression "*puVar7" * identifier) + number_literal) & (unary_expression "~*puVar7" ~ (pointer_expression "*puVar7" * identifier)))) ;) (expression_statement "uVar3 = uVar2 & 0x80808080;" (assignment_expression "uVar3 = uVar2 & 0x80808080" identifier = (binary_expression "uVar2 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar8 = puVar7 + 1;" (assignment_expression "puVar8 = puVar7 + 1" identifier = (binary_expression "puVar7 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) ;) (expression_statement "bVar9 = (uVar2 & 0x8080) == 0;" (assignment_expression "bVar9 = (uVar2 & 0x8080) == 0" identifier = (binary_expression "(uVar2 & 0x8080) == 0" (parenthesized_expression "(uVar2 & 0x8080)" ( (binary_expression "uVar2 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar9) {\n    uVar3 = uVar3 >> 0x10;\n  }" if (parenthesized_expression "(bVar9)" ( identifier )) (compound_statement "{\n    uVar3 = uVar3 >> 0x10;\n  }" { (expression_statement "uVar3 = uVar3 >> 0x10;" (assignment_expression "uVar3 = uVar3 >> 0x10" identifier = (binary_expression "uVar3 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar9) {\n    puVar8 = (uint *)((long)puVar7 + 6);\n  }" if (parenthesized_expression "(bVar9)" ( identifier )) (compound_statement "{\n    puVar8 = (uint *)((long)puVar7 + 6);\n  }" { (expression_statement "puVar8 = (uint *)((long)puVar7 + 6);" (assignment_expression "puVar8 = (uint *)((long)puVar7 + 6)" identifier = (cast_expression "(uint *)((long)puVar7 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar7 + 6)" ( (binary_expression "(long)puVar7 + 6" (cast_expression "(long)puVar7" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) ;) })) (expression_statement "__n = (long)puVar8 + (-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;" (assignment_expression "__n = (long)puVar8 + (-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2" identifier = (binary_expression "(long)puVar8 + (-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2" (binary_expression "(long)puVar8 + (-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3))" (cast_expression "(long)puVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (parenthesized_expression "(-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3))" ( (binary_expression "-(long)dir_template - (ulong)CARRY1((byte)uVar3,(byte)uVar3)" (unary_expression "-(long)dir_template" - (cast_expression "(long)dir_template" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) - (cast_expression "(ulong)CARRY1((byte)uVar3,(byte)uVar3)" ( (type_descriptor "ulong" type_identifier) ) (call_expression "CARRY1((byte)uVar3,(byte)uVar3)" identifier (argument_list "((byte)uVar3,(byte)uVar3)" ( (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) ))) + number_literal)) ;) (expression_statement "pcVar4 = (char *)operator_new__(__n);" (assignment_expression "pcVar4 = (char *)operator_new__(__n)" identifier = (cast_expression "(char *)operator_new__(__n)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "operator_new__(__n)" identifier (argument_list "(__n)" ( identifier ))))) ;) (expression_statement "strncpy(pcVar4,dir_template,__n);" (call_expression "strncpy(pcVar4,dir_template,__n)" identifier (argument_list "(pcVar4,dir_template,__n)" ( identifier , identifier , identifier ))) ;) (expression_statement "logname._M_dataplus._M_p = (pointer)&logname.field_2;" (assignment_expression "logname._M_dataplus._M_p = (pointer)&logname.field_2" (field_expression "logname._M_dataplus._M_p" (field_expression "logname._M_dataplus" identifier . field_identifier) . field_identifier) = (binary_expression "(pointer)&logname.field_2" (parenthesized_expression "(pointer)" ( identifier )) & (field_expression "logname.field_2" identifier . field_identifier))) ;) (expression_statement "sVar5 = strlen(pcVar4);" (assignment_expression "sVar5 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (labeled_statement "std::__cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>::\n  _M_construct<char_const*>(&logname,pcVar4,pcVar4 + sVar5);" statement_identifier (ERROR "::__cxx11::basic_string<char,_std::char_traits<char>,_std::allocator<char>_>:" : : (comma_expression "__cxx11::basic_string<char,_std::char_traits<char>,_std" identifier (ERROR "::basic_string<char,_std::char_traits<char>" : : (comma_expression "basic_string<char,_std" (binary_expression "basic_string<char" identifier < identifier) , identifier) : : (binary_expression "char_traits<char" identifier < identifier) >) , identifier) : : (binary_expression "allocator<char>_" (binary_expression "allocator<char" identifier < identifier) > identifier) > :) : (expression_statement "_M_construct<char_const*>(&logname,pcVar4,pcVar4 + sVar5);" (binary_expression "_M_construct<char_const*>(&logname,pcVar4,pcVar4 + sVar5)" (binary_expression "_M_construct<char_const" identifier < identifier) (ERROR "*" *) > (parenthesized_expression "(&logname,pcVar4,pcVar4 + sVar5)" ( (comma_expression "&logname,pcVar4,pcVar4 + sVar5" (pointer_expression "&logname" & identifier) , (comma_expression "pcVar4,pcVar4 + sVar5" identifier , (binary_expression "pcVar4 + sVar5" identifier + identifier))) ))) ;)) (if_statement "if (0x7fffffffffffffff - logname._M_string_length < 4) {\n                    /* WARNING: Subroutine does not return */\n    std::__throw_length_error("basic_string::append");\n  }" if (parenthesized_expression "(0x7fffffffffffffff - logname._M_string_length < 4)" ( (binary_expression "0x7fffffffffffffff - logname._M_string_length < 4" (binary_expression "0x7fffffffffffffff - logname._M_string_length" number_literal - (field_expression "logname._M_string_length" identifier . field_identifier)) < number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    std::__throw_length_error("basic_string::append");\n  }" { comment (labeled_statement "std::__throw_length_error("basic_string::append");" statement_identifier : (ERROR ":" :) (expression_statement "__throw_length_error("basic_string::append");" (call_expression "__throw_length_error("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;)) })) comment (labeled_statement "std::string::_M_append((string *)&logname,"/log",4);" statement_identifier : (ERROR ":" :) (labeled_statement "string::_M_append((string *)&logname,"/log",4);" statement_identifier : (ERROR ":" :) (expression_statement "_M_append((string *)&logname,"/log",4);" (call_expression "_M_append((string *)&logname,"/log",4)" identifier (argument_list "((string *)&logname,"/log",4)" ( (cast_expression "(string *)&logname" ( (type_descriptor "string *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "&logname" & identifier)) , (string_literal ""/log"" " string_content ") , number_literal ))) ;))) (expression_statement "pFVar6 = fopen64(logname._M_dataplus._M_p,"w");" (assignment_expression "pFVar6 = fopen64(logname._M_dataplus._M_p,"w")" identifier = (call_expression "fopen64(logname._M_dataplus._M_p,"w")" identifier (argument_list "(logname._M_dataplus._M_p,"w")" ( (field_expression "logname._M_dataplus._M_p" (field_expression "logname._M_dataplus" identifier . field_identifier) . field_identifier) , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (pFVar6 != (FILE *)0x0) {\n    this->tempdir_ = pcVar4;\n    this->logfile_ = (FILE *)pFVar6;\n    pcVar1 = program_name;\n    format = (char *)gettext("%s: recording to %s");\n    gold_info(format,pcVar1,pcVar4);\n  }" if (parenthesized_expression "(pFVar6 != (FILE *)0x0)" ( (binary_expression "pFVar6 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    this->tempdir_ = pcVar4;\n    this->logfile_ = (FILE *)pFVar6;\n    pcVar1 = program_name;\n    format = (char *)gettext("%s: recording to %s");\n    gold_info(format,pcVar1,pcVar4);\n  }" { (expression_statement "this->tempdir_ = pcVar4;" (assignment_expression "this->tempdir_ = pcVar4" (field_expression "this->tempdir_" identifier -> field_identifier) = identifier) ;) (expression_statement "this->logfile_ = (FILE *)pFVar6;" (assignment_expression "this->logfile_ = (FILE *)pFVar6" (field_expression "this->logfile_" identifier -> field_identifier) = (cast_expression "(FILE *)pFVar6" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier)) ;) (expression_statement "pcVar1 = program_name;" (assignment_expression "pcVar1 = program_name" identifier = identifier) ;) (expression_statement "format = (char *)gettext("%s: recording to %s");" (assignment_expression "format = (char *)gettext("%s: recording to %s")" identifier = (cast_expression "(char *)gettext("%s: recording to %s")" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "gettext("%s: recording to %s")" identifier (argument_list "("%s: recording to %s")" ( (string_literal ""%s: recording to %s"" " string_content ") ))))) ;) (expression_statement "gold_info(format,pcVar1,pcVar4);" (call_expression "gold_info(format,pcVar1,pcVar4)" identifier (argument_list "(format,pcVar1,pcVar4)" ( identifier , identifier , identifier ))) ;) })) (if_statement "if ((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)logname._M_dataplus._M_p != &logname.field_2) {\n    operator_delete(logname._M_dataplus._M_p);\n  }" if (parenthesized_expression "((anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)logname._M_dataplus._M_p != &logname.field_2)" ( (parenthesized_expression "(anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::allocator<char>_>_9\n       *)logname._M_dataplus._M_p != &logname.field_2)" ( (ERROR "anon_union_16_2_edb7204a_for_basic_string<char,_std::char_traits<char>,_std::" (comma_expression "anon_union_16_2_edb7204a_for_basic_string<char,_std" (binary_expression "anon_union_16_2_edb7204a_for_basic_string<char" identifier < identifier) , identifier) : : (binary_expression "char_traits<char>,_std" (binary_expression "char_traits<char" identifier < identifier) > (ERROR "," ,) identifier) : :) (binary_expression "allocator<char>_>_9\n       *)logname._M_dataplus._M_p != &logname.field_2" (binary_expression "allocator<char>_>_9\n       *)logname._M_dataplus._M_p" (binary_expression "allocator<char>_" (binary_expression "allocator<char" identifier < identifier) > identifier) > (binary_expression "_9\n       *)logname._M_dataplus._M_p" identifier * (ERROR ")" )) (field_expression "logname._M_dataplus._M_p" (field_expression "logname._M_dataplus" identifier . field_identifier) . field_identifier))) != (pointer_expression "&logname.field_2" & (field_expression "logname.field_2" identifier . field_identifier))) )) )) (compound_statement "{\n    operator_delete(logname._M_dataplus._M_p);\n  }" { (expression_statement "operator_delete(logname._M_dataplus._M_p);" (call_expression "operator_delete(logname._M_dataplus._M_p)" identifier (argument_list "(logname._M_dataplus._M_p)" ( (field_expression "logname._M_dataplus._M_p" (field_expression "logname._M_dataplus" identifier . field_identifier) . field_identifier) ))) ;) })) (return_statement "return (uint)(pFVar6 != (FILE *)0x0);" return (call_expression "(uint)(pFVar6 != (FILE *)0x0)" (parenthesized_expression "(uint)" ( identifier )) (argument_list "(pFVar6 != (FILE *)0x0)" ( (binary_expression "pFVar6 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ))) ;) })))
(translation_unit "bool FUN_0023a160(long param_1)\n\n{\n  undefined8 uVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  undefined8 uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  bool bVar10;\n  uint local_68 [2];\n  char acStack_60 [8];\n  undefined4 local_58;\n  undefined2 local_54;\n  char *local_48;\n  long local_40;\n  char local_38 [24];\n  \n  local_58 = 0x58585858;\n  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;\n  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;\n  local_54 = 0x58;\n  pcVar4 = mkdtemp((char *)local_68);\n  puVar9 = local_68;\n  if (pcVar4 == (char *)0x0) {\n    return false;\n  }\n  do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);\n  bVar10 = (uVar2 & 0x8080) == 0;\n  if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }\n  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);\n  strncpy(pcVar4,(char *)local_68,sVar5);\n  local_48 = local_38;\n  sVar5 = strlen(pcVar4);\n  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffffU - local_40 < 4) {\n                    \n    FUN_00319590("basic_string::append");\n  }\n                    \n  FUN_002e2ee0(&local_48,&DAT_00381da3,4);\n  pFVar6 = fopen64(local_48,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }\n  if (local_48 != local_38) {\n    FUN_002dac60();\n  }\n  return pFVar6 != (FILE *)0x0;\n}\n\n" (function_definition "bool FUN_0023a160(long param_1)\n\n{\n  undefined8 uVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  undefined8 uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  bool bVar10;\n  uint local_68 [2];\n  char acStack_60 [8];\n  undefined4 local_58;\n  undefined2 local_54;\n  char *local_48;\n  long local_40;\n  char local_38 [24];\n  \n  local_58 = 0x58585858;\n  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;\n  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;\n  local_54 = 0x58;\n  pcVar4 = mkdtemp((char *)local_68);\n  puVar9 = local_68;\n  if (pcVar4 == (char *)0x0) {\n    return false;\n  }\n  do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);\n  bVar10 = (uVar2 & 0x8080) == 0;\n  if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }\n  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);\n  strncpy(pcVar4,(char *)local_68,sVar5);\n  local_48 = local_38;\n  sVar5 = strlen(pcVar4);\n  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffffU - local_40 < 4) {\n                    \n    FUN_00319590("basic_string::append");\n  }\n                    \n  FUN_002e2ee0(&local_48,&DAT_00381da3,4);\n  pFVar6 = fopen64(local_48,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }\n  if (local_48 != local_38) {\n    FUN_002dac60();\n  }\n  return pFVar6 != (FILE *)0x0;\n}" primitive_type (function_declarator "FUN_0023a160(long param_1)" identifier (parameter_list "(long param_1)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) ))) (compound_statement "{\n  undefined8 uVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  undefined8 uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  bool bVar10;\n  uint local_68 [2];\n  char acStack_60 [8];\n  undefined4 local_58;\n  undefined2 local_54;\n  char *local_48;\n  long local_40;\n  char local_38 [24];\n  \n  local_58 = 0x58585858;\n  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;\n  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;\n  local_54 = 0x58;\n  pcVar4 = mkdtemp((char *)local_68);\n  puVar9 = local_68;\n  if (pcVar4 == (char *)0x0) {\n    return false;\n  }\n  do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);\n  bVar10 = (uVar2 & 0x8080) == 0;\n  if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }\n  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);\n  strncpy(pcVar4,(char *)local_68,sVar5);\n  local_48 = local_38;\n  sVar5 = strlen(pcVar4);\n  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffffU - local_40 < 4) {\n                    \n    FUN_00319590("basic_string::append");\n  }\n                    \n  FUN_002e2ee0(&local_48,&DAT_00381da3,4);\n  pFVar6 = fopen64(local_48,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }\n  if (local_48 != local_38) {\n    FUN_002dac60();\n  }\n  return pFVar6 != (FILE *)0x0;\n}" { (declaration "undefined8 uVar1;" type_identifier identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "char *pcVar4;" primitive_type (pointer_declarator "*pcVar4" * identifier) ;) (declaration "size_t sVar5;" primitive_type identifier ;) (declaration "FILE *pFVar6;" type_identifier (pointer_declarator "*pFVar6" * identifier) ;) (declaration "undefined8 uVar7;" type_identifier identifier ;) (declaration "uint *puVar8;" type_identifier (pointer_declarator "*puVar8" * identifier) ;) (declaration "uint *puVar9;" type_identifier (pointer_declarator "*puVar9" * identifier) ;) (declaration "bool bVar10;" primitive_type identifier ;) (declaration "uint local_68 [2];" type_identifier (array_declarator "local_68 [2]" identifier [ number_literal ]) ;) (declaration "char acStack_60 [8];" primitive_type (array_declarator "acStack_60 [8]" identifier [ number_literal ]) ;) (declaration "undefined4 local_58;" type_identifier identifier ;) (declaration "undefined2 local_54;" type_identifier identifier ;) (declaration "char *local_48;" primitive_type (pointer_declarator "*local_48" * identifier) ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (declaration "char local_38 [24];" primitive_type (array_declarator "local_38 [24]" identifier [ number_literal ]) ;) (expression_statement "local_58 = 0x58585858;" (assignment_expression "local_58 = 0x58585858" identifier = number_literal) ;) (expression_statement "local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;" (assignment_expression "local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_" identifier = (cast_expression "(uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_" ( (type_descriptor "uint  [2]" type_identifier (abstract_array_declarator "[2]" [ number_literal ])) ) (field_expression "s_gold_recording_X______gold_reads_00382b50._0_8_" identifier . field_identifier))) ;) (expression_statement "acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;" (assignment_expression "acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_" identifier = (cast_expression "(char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_" ( (type_descriptor "char  [8]" primitive_type (abstract_array_declarator "[8]" [ number_literal ])) ) (field_expression "s_gold_recording_X______gold_reads_00382b50._8_8_" identifier . field_identifier))) ;) (expression_statement "local_54 = 0x58;" (assignment_expression "local_54 = 0x58" identifier = number_literal) ;) (expression_statement "pcVar4 = mkdtemp((char *)local_68);" (assignment_expression "pcVar4 = mkdtemp((char *)local_68)" identifier = (call_expression "mkdtemp((char *)local_68)" identifier (argument_list "((char *)local_68)" ( (cast_expression "(char *)local_68" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) )))) ;) (expression_statement "puVar9 = local_68;" (assignment_expression "puVar9 = local_68" identifier = identifier) ;) (if_statement "if (pcVar4 == (char *)0x0) {\n    return false;\n  }" if (parenthesized_expression "(pcVar4 == (char *)0x0)" ( (binary_expression "pcVar4 == (char *)0x0" identifier == (cast_expression "(char *)0x0" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    return false;\n  }" { (return_statement "return false;" return false ;) })) (do_statement "do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);" do (compound_statement "{\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  }" { (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" identifier = identifier) ;) (expression_statement "uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;" (assignment_expression "uVar2 = *puVar8 + 0xfefefeff & ~*puVar8" identifier = (binary_expression "*puVar8 + 0xfefefeff & ~*puVar8" (binary_expression "*puVar8 + 0xfefefeff" (pointer_expression "*puVar8" * identifier) + number_literal) & (unary_expression "~*puVar8" ~ (pointer_expression "*puVar8" * identifier)))) ;) (expression_statement "uVar3 = uVar2 & 0x80808080;" (assignment_expression "uVar3 = uVar2 & 0x80808080" identifier = (binary_expression "uVar2 & 0x80808080" identifier & number_literal)) ;) (expression_statement "puVar9 = puVar8 + 1;" (assignment_expression "puVar9 = puVar8 + 1" identifier = (binary_expression "puVar8 + 1" identifier + number_literal)) ;) }) while (parenthesized_expression "(uVar3 == 0)" ( (binary_expression "uVar3 == 0" identifier == number_literal) )) ;) (expression_statement "bVar10 = (uVar2 & 0x8080) == 0;" (assignment_expression "bVar10 = (uVar2 & 0x8080) == 0" identifier = (binary_expression "(uVar2 & 0x8080) == 0" (parenthesized_expression "(uVar2 & 0x8080)" ( (binary_expression "uVar2 & 0x8080" identifier & number_literal) )) == number_literal)) ;) (if_statement "if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n    uVar3 = uVar3 >> 0x10;\n  }" { (expression_statement "uVar3 = uVar3 >> 0x10;" (assignment_expression "uVar3 = uVar3 >> 0x10" identifier = (binary_expression "uVar3 >> 0x10" identifier >> number_literal)) ;) })) (if_statement "if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }" if (parenthesized_expression "(bVar10)" ( identifier )) (compound_statement "{\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }" { (expression_statement "puVar9 = (uint *)((long)puVar8 + 6);" (assignment_expression "puVar9 = (uint *)((long)puVar8 + 6)" identifier = (cast_expression "(uint *)((long)puVar8 + 6)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)puVar8 + 6)" ( (binary_expression "(long)puVar8 + 6" (cast_expression "(long)puVar8" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) ;) })) (expression_statement "sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;" (assignment_expression "sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2" identifier = (binary_expression "(long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2" (binary_expression "(long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3))" (cast_expression "(long)puVar9" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (parenthesized_expression "(-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3))" ( (binary_expression "-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)" (unary_expression "-(long)local_68" - (cast_expression "(long)local_68" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier)) - (cast_expression "(ulong)CARRY1((byte)uVar3,(byte)uVar3)" ( (type_descriptor "ulong" type_identifier) ) (call_expression "CARRY1((byte)uVar3,(byte)uVar3)" identifier (argument_list "((byte)uVar3,(byte)uVar3)" ( (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier) , (cast_expression "(byte)uVar3" ( (type_descriptor "byte" type_identifier) ) identifier) ))))) ))) + number_literal)) ;) (expression_statement "pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);" (assignment_expression "pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" identifier = (cast_expression "(char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (call_expression "thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" identifier (argument_list "(sVar5,uVar3 & 0xffffff00)" ( identifier , (binary_expression "uVar3 & 0xffffff00" identifier & number_literal) ))))) ;) (expression_statement "strncpy(pcVar4,(char *)local_68,sVar5);" (call_expression "strncpy(pcVar4,(char *)local_68,sVar5)" identifier (argument_list "(pcVar4,(char *)local_68,sVar5)" ( identifier , (cast_expression "(char *)local_68" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) identifier) , identifier ))) ;) (expression_statement "local_48 = local_38;" (assignment_expression "local_48 = local_38" identifier = identifier) ;) (expression_statement "sVar5 = strlen(pcVar4);" (assignment_expression "sVar5 = strlen(pcVar4)" identifier = (call_expression "strlen(pcVar4)" identifier (argument_list "(pcVar4)" ( identifier )))) ;) (expression_statement "FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);" (call_expression "FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5)" identifier (argument_list "(&local_48,pcVar4,pcVar4 + sVar5)" ( (pointer_expression "&local_48" & identifier) , identifier , (binary_expression "pcVar4 + sVar5" identifier + identifier) ))) ;) (if_statement "if (0x7fffffffffffffffU - local_40 < 4) {\n                    \n    FUN_00319590("basic_string::append");\n  }" if (parenthesized_expression "(0x7fffffffffffffffU - local_40 < 4)" ( (binary_expression "0x7fffffffffffffffU - local_40 < 4" (binary_expression "0x7fffffffffffffffU - local_40" number_literal - identifier) < number_literal) )) (compound_statement "{\n                    \n    FUN_00319590("basic_string::append");\n  }" { (expression_statement "FUN_00319590("basic_string::append");" (call_expression "FUN_00319590("basic_string::append")" identifier (argument_list "("basic_string::append")" ( (string_literal ""basic_string::append"" " string_content ") ))) ;) })) (expression_statement "FUN_002e2ee0(&local_48,&DAT_00381da3,4);" (call_expression "FUN_002e2ee0(&local_48,&DAT_00381da3,4)" identifier (argument_list "(&local_48,&DAT_00381da3,4)" ( (pointer_expression "&local_48" & identifier) , (pointer_expression "&DAT_00381da3" & identifier) , number_literal ))) ;) (expression_statement "pFVar6 = fopen64(local_48,"w");" (assignment_expression "pFVar6 = fopen64(local_48,"w")" identifier = (call_expression "fopen64(local_48,"w")" identifier (argument_list "(local_48,"w")" ( identifier , (string_literal ""w"" " string_content ") )))) ;) (if_statement "if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }" if (parenthesized_expression "(pFVar6 != (FILE *)0x0)" ( (binary_expression "pFVar6 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }" { (expression_statement "*(char **)(param_1 + 8) = pcVar4;" (assignment_expression "*(char **)(param_1 + 8) = pcVar4" (pointer_expression "*(char **)(param_1 + 8)" * (cast_expression "(char **)(param_1 + 8)" ( (type_descriptor "char **" primitive_type (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 8)" ( (binary_expression "param_1 + 8" identifier + number_literal) )))) = identifier) ;) (expression_statement "*(FILE **)(param_1 + 0x10) = pFVar6;" (assignment_expression "*(FILE **)(param_1 + 0x10) = pFVar6" (pointer_expression "*(FILE **)(param_1 + 0x10)" * (cast_expression "(FILE **)(param_1 + 0x10)" ( (type_descriptor "FILE **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = identifier) ;) (expression_statement "uVar1 = DAT_0043e8e8;" (assignment_expression "uVar1 = DAT_0043e8e8" identifier = identifier) ;) (expression_statement "uVar7 = gettext("%s: recording to %s");" (assignment_expression "uVar7 = gettext("%s: recording to %s")" identifier = (call_expression "gettext("%s: recording to %s")" identifier (argument_list "("%s: recording to %s")" ( (string_literal ""%s: recording to %s"" " string_content ") )))) ;) (expression_statement "FUN_00178480(uVar7,uVar1,pcVar4);" (call_expression "FUN_00178480(uVar7,uVar1,pcVar4)" identifier (argument_list "(uVar7,uVar1,pcVar4)" ( identifier , identifier , identifier ))) ;) })) (if_statement "if (local_48 != local_38) {\n    FUN_002dac60();\n  }" if (parenthesized_expression "(local_48 != local_38)" ( (binary_expression "local_48 != local_38" identifier != identifier) )) (compound_statement "{\n    FUN_002dac60();\n  }" { (expression_statement "FUN_002dac60();" (call_expression "FUN_002dac60()" identifier (argument_list "()" ( ))) ;) })) (return_statement "return pFVar6 != (FILE *)0x0;" return (binary_expression "pFVar6 != (FILE *)0x0" identifier != (cast_expression "(FILE *)0x0" ( (type_descriptor "FILE *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (array_declarator IDENT [ LIT ]) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_array_declarator [ LIT ])) ) (field_expression IDENT . field_identifier))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_array_declarator [ LIT ])) ) (field_expression IDENT . field_identifier))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) )))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (return_statement return BOOL ;) })) (do_statement do (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (pointer_expression * IDENT) + LIT) & (unary_expression ~ (pointer_expression * IDENT)))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) }) while (parenthesized_expression ( (binary_expression IDENT == LIT) )) ;) (expression_statement (assignment_expression IDENT = (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT)) ;) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) })) (if_statement if (parenthesized_expression ( IDENT )) (compound_statement { (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + LIT) )))) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (parenthesized_expression ( (binary_expression (unary_expression - (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT)) - (cast_expression ( (type_descriptor TYPE) ) (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE) ) IDENT) , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))))) ))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT & LIT) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) IDENT) , IDENT ))) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , IDENT , (binary_expression IDENT + IDENT) ))) ;) (if_statement if (parenthesized_expression ( (binary_expression (binary_expression LIT - IDENT) < LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") ))) ;) })) (expression_statement (call_expression IDENT (argument_list ( (pointer_expression & IDENT) , (pointer_expression & IDENT) , LIT ))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = IDENT) ;) (expression_statement (assignment_expression IDENT = IDENT) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( (string_literal " string_content ") )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( ))) ;) })) (return_statement return (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) ;) })))
(function_definition "bool FUN_0023a160(long param_1)\n\n{\n  undefined8 uVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  undefined8 uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  bool bVar10;\n  uint local_68 [2];\n  char acStack_60 [8];\n  undefined4 local_58;\n  undefined2 local_54;\n  char *local_48;\n  long local_40;\n  char local_38 [24];\n  \n  local_58 = 0x58585858;\n  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;\n  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;\n  local_54 = 0x58;\n  pcVar4 = mkdtemp((char *)local_68);\n  puVar9 = local_68;\n  if (pcVar4 == (char *)0x0) {\n    return false;\n  }\n  do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);\n  bVar10 = (uVar2 & 0x8080) == 0;\n  if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }\n  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);\n  strncpy(pcVar4,(char *)local_68,sVar5);\n  local_48 = local_38;\n  sVar5 = strlen(pcVar4);\n  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffffU - local_40 < 4) {\n                    \n    FUN_00319590("basic_string::append");\n  }\n                    \n  FUN_002e2ee0(&local_48,&DAT_00381da3,4);\n  pFVar6 = fopen64(local_48,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }\n  if (local_48 != local_38) {\n    FUN_002dac60();\n  }\n  return pFVar6 != (FILE *)0x0;\n}" (primitive_type "bool") (function_declarator "FUN_0023a160(long param_1)" (identifier "FUN_0023a160") (parameter_list "(long param_1)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) () ")"))) (compound_statement "{\n  undefined8 uVar1;\n  uint uVar2;\n  uint uVar3;\n  char *pcVar4;\n  size_t sVar5;\n  FILE *pFVar6;\n  undefined8 uVar7;\n  uint *puVar8;\n  uint *puVar9;\n  bool bVar10;\n  uint local_68 [2];\n  char acStack_60 [8];\n  undefined4 local_58;\n  undefined2 local_54;\n  char *local_48;\n  long local_40;\n  char local_38 [24];\n  \n  local_58 = 0x58585858;\n  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;\n  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;\n  local_54 = 0x58;\n  pcVar4 = mkdtemp((char *)local_68);\n  puVar9 = local_68;\n  if (pcVar4 == (char *)0x0) {\n    return false;\n  }\n  do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);\n  bVar10 = (uVar2 & 0x8080) == 0;\n  if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }\n  if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }\n  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;\n  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);\n  strncpy(pcVar4,(char *)local_68,sVar5);\n  local_48 = local_38;\n  sVar5 = strlen(pcVar4);\n  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);\n  if (0x7fffffffffffffffU - local_40 < 4) {\n                    \n    FUN_00319590("basic_string::append");\n  }\n                    \n  FUN_002e2ee0(&local_48,&DAT_00381da3,4);\n  pFVar6 = fopen64(local_48,"w");\n  if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }\n  if (local_48 != local_38) {\n    FUN_002dac60();\n  }\n  return pFVar6 != (FILE *)0x0;\n}" ({ "{") (declaration "undefined8 uVar1;" (type_identifier "undefined8") (identifier "uVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "char *pcVar4;" (primitive_type "char") (pointer_declarator "*pcVar4" (* "*") (identifier "pcVar4")) (; ";")) (declaration "size_t sVar5;" (primitive_type "size_t") (identifier "sVar5") (; ";")) (declaration "FILE *pFVar6;" (type_identifier "FILE") (pointer_declarator "*pFVar6" (* "*") (identifier "pFVar6")) (; ";")) (declaration "undefined8 uVar7;" (type_identifier "undefined8") (identifier "uVar7") (; ";")) (declaration "uint *puVar8;" (type_identifier "uint") (pointer_declarator "*puVar8" (* "*") (identifier "puVar8")) (; ";")) (declaration "uint *puVar9;" (type_identifier "uint") (pointer_declarator "*puVar9" (* "*") (identifier "puVar9")) (; ";")) (declaration "bool bVar10;" (primitive_type "bool") (identifier "bVar10") (; ";")) (declaration "uint local_68 [2];" (type_identifier "uint") (array_declarator "local_68 [2]" (identifier "local_68") ([ "[") (number_literal "2") (] "]")) (; ";")) (declaration "char acStack_60 [8];" (primitive_type "char") (array_declarator "acStack_60 [8]" (identifier "acStack_60") ([ "[") (number_literal "8") (] "]")) (; ";")) (declaration "undefined4 local_58;" (type_identifier "undefined4") (identifier "local_58") (; ";")) (declaration "undefined2 local_54;" (type_identifier "undefined2") (identifier "local_54") (; ";")) (declaration "char *local_48;" (primitive_type "char") (pointer_declarator "*local_48" (* "*") (identifier "local_48")) (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (declaration "char local_38 [24];" (primitive_type "char") (array_declarator "local_38 [24]" (identifier "local_38") ([ "[") (number_literal "24") (] "]")) (; ";")) (expression_statement "local_58 = 0x58585858;" (assignment_expression "local_58 = 0x58585858" (identifier "local_58") (= "=") (number_literal "0x58585858")) (; ";")) (expression_statement "local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;" (assignment_expression "local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_" (identifier "local_68") (= "=") (cast_expression "(uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_" (( "(") (type_descriptor "uint  [2]" (type_identifier "uint") (abstract_array_declarator "[2]" ([ "[") (number_literal "2") (] "]"))) () ")") (field_expression "s_gold_recording_X______gold_reads_00382b50._0_8_" (identifier "s_gold_recording_X______gold_reads_00382b50") (. ".") (field_identifier "_0_8_")))) (; ";")) (expression_statement "acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;" (assignment_expression "acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_" (identifier "acStack_60") (= "=") (cast_expression "(char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_" (( "(") (type_descriptor "char  [8]" (primitive_type "char") (abstract_array_declarator "[8]" ([ "[") (number_literal "8") (] "]"))) () ")") (field_expression "s_gold_recording_X______gold_reads_00382b50._8_8_" (identifier "s_gold_recording_X______gold_reads_00382b50") (. ".") (field_identifier "_8_8_")))) (; ";")) (expression_statement "local_54 = 0x58;" (assignment_expression "local_54 = 0x58" (identifier "local_54") (= "=") (number_literal "0x58")) (; ";")) (expression_statement "pcVar4 = mkdtemp((char *)local_68);" (assignment_expression "pcVar4 = mkdtemp((char *)local_68)" (identifier "pcVar4") (= "=") (call_expression "mkdtemp((char *)local_68)" (identifier "mkdtemp") (argument_list "((char *)local_68)" (( "(") (cast_expression "(char *)local_68" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_68")) () ")")))) (; ";")) (expression_statement "puVar9 = local_68;" (assignment_expression "puVar9 = local_68" (identifier "puVar9") (= "=") (identifier "local_68")) (; ";")) (if_statement "if (pcVar4 == (char *)0x0) {\n    return false;\n  }" (if "if") (parenthesized_expression "(pcVar4 == (char *)0x0)" (( "(") (binary_expression "pcVar4 == (char *)0x0" (identifier "pcVar4") (== "==") (cast_expression "(char *)0x0" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    return false;\n  }" ({ "{") (return_statement "return false;" (return "return") (false "false") (; ";")) (} "}"))) (do_statement "do {\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  } while (uVar3 == 0);" (do "do") (compound_statement "{\n    puVar8 = puVar9;\n    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;\n    uVar3 = uVar2 & 0x80808080;\n    puVar9 = puVar8 + 1;\n  }" ({ "{") (expression_statement "puVar8 = puVar9;" (assignment_expression "puVar8 = puVar9" (identifier "puVar8") (= "=") (identifier "puVar9")) (; ";")) (expression_statement "uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;" (assignment_expression "uVar2 = *puVar8 + 0xfefefeff & ~*puVar8" (identifier "uVar2") (= "=") (binary_expression "*puVar8 + 0xfefefeff & ~*puVar8" (binary_expression "*puVar8 + 0xfefefeff" (pointer_expression "*puVar8" (* "*") (identifier "puVar8")) (+ "+") (number_literal "0xfefefeff")) (& "&") (unary_expression "~*puVar8" (~ "~") (pointer_expression "*puVar8" (* "*") (identifier "puVar8"))))) (; ";")) (expression_statement "uVar3 = uVar2 & 0x80808080;" (assignment_expression "uVar3 = uVar2 & 0x80808080" (identifier "uVar3") (= "=") (binary_expression "uVar2 & 0x80808080" (identifier "uVar2") (& "&") (number_literal "0x80808080"))) (; ";")) (expression_statement "puVar9 = puVar8 + 1;" (assignment_expression "puVar9 = puVar8 + 1" (identifier "puVar9") (= "=") (binary_expression "puVar8 + 1" (identifier "puVar8") (+ "+") (number_literal "1"))) (; ";")) (} "}")) (while "while") (parenthesized_expression "(uVar3 == 0)" (( "(") (binary_expression "uVar3 == 0" (identifier "uVar3") (== "==") (number_literal "0")) () ")")) (; ";")) (expression_statement "bVar10 = (uVar2 & 0x8080) == 0;" (assignment_expression "bVar10 = (uVar2 & 0x8080) == 0" (identifier "bVar10") (= "=") (binary_expression "(uVar2 & 0x8080) == 0" (parenthesized_expression "(uVar2 & 0x8080)" (( "(") (binary_expression "uVar2 & 0x8080" (identifier "uVar2") (& "&") (number_literal "0x8080")) () ")")) (== "==") (number_literal "0"))) (; ";")) (if_statement "if (bVar10) {\n    uVar3 = uVar3 >> 0x10;\n  }" (if "if") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (compound_statement "{\n    uVar3 = uVar3 >> 0x10;\n  }" ({ "{") (expression_statement "uVar3 = uVar3 >> 0x10;" (assignment_expression "uVar3 = uVar3 >> 0x10" (identifier "uVar3") (= "=") (binary_expression "uVar3 >> 0x10" (identifier "uVar3") (>> ">>") (number_literal "0x10"))) (; ";")) (} "}"))) (if_statement "if (bVar10) {\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }" (if "if") (parenthesized_expression "(bVar10)" (( "(") (identifier "bVar10") () ")")) (compound_statement "{\n    puVar9 = (uint *)((long)puVar8 + 6);\n  }" ({ "{") (expression_statement "puVar9 = (uint *)((long)puVar8 + 6);" (assignment_expression "puVar9 = (uint *)((long)puVar8 + 6)" (identifier "puVar9") (= "=") (cast_expression "(uint *)((long)puVar8 + 6)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)puVar8 + 6)" (( "(") (binary_expression "(long)puVar8 + 6" (cast_expression "(long)puVar8" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar8")) (+ "+") (number_literal "6")) () ")")))) (; ";")) (} "}"))) (expression_statement "sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;" (assignment_expression "sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2" (identifier "sVar5") (= "=") (binary_expression "(long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2" (binary_expression "(long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3))" (cast_expression "(long)puVar9" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "puVar9")) (+ "+") (parenthesized_expression "(-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3))" (( "(") (binary_expression "-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)" (unary_expression "-(long)local_68" (- "-") (cast_expression "(long)local_68" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "local_68"))) (- "-") (cast_expression "(ulong)CARRY1((byte)uVar3,(byte)uVar3)" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (call_expression "CARRY1((byte)uVar3,(byte)uVar3)" (identifier "CARRY1") (argument_list "((byte)uVar3,(byte)uVar3)" (( "(") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3")) (, ",") (cast_expression "(byte)uVar3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "uVar3")) () ")"))))) () ")"))) (+ "+") (number_literal "-2"))) (; ";")) (expression_statement "pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);" (assignment_expression "pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" (identifier "pcVar4") (= "=") (cast_expression "(char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (call_expression "thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00)" (identifier "thunk_FUN_002d9490") (argument_list "(sVar5,uVar3 & 0xffffff00)" (( "(") (identifier "sVar5") (, ",") (binary_expression "uVar3 & 0xffffff00" (identifier "uVar3") (& "&") (number_literal "0xffffff00")) () ")"))))) (; ";")) (expression_statement "strncpy(pcVar4,(char *)local_68,sVar5);" (call_expression "strncpy(pcVar4,(char *)local_68,sVar5)" (identifier "strncpy") (argument_list "(pcVar4,(char *)local_68,sVar5)" (( "(") (identifier "pcVar4") (, ",") (cast_expression "(char *)local_68" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (identifier "local_68")) (, ",") (identifier "sVar5") () ")"))) (; ";")) (expression_statement "local_48 = local_38;" (assignment_expression "local_48 = local_38" (identifier "local_48") (= "=") (identifier "local_38")) (; ";")) (expression_statement "sVar5 = strlen(pcVar4);" (assignment_expression "sVar5 = strlen(pcVar4)" (identifier "sVar5") (= "=") (call_expression "strlen(pcVar4)" (identifier "strlen") (argument_list "(pcVar4)" (( "(") (identifier "pcVar4") () ")")))) (; ";")) (expression_statement "FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);" (call_expression "FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5)" (identifier "FUN_001665c0") (argument_list "(&local_48,pcVar4,pcVar4 + sVar5)" (( "(") (pointer_expression "&local_48" (& "&") (identifier "local_48")) (, ",") (identifier "pcVar4") (, ",") (binary_expression "pcVar4 + sVar5" (identifier "pcVar4") (+ "+") (identifier "sVar5")) () ")"))) (; ";")) (if_statement "if (0x7fffffffffffffffU - local_40 < 4) {\n                    \n    FUN_00319590("basic_string::append");\n  }" (if "if") (parenthesized_expression "(0x7fffffffffffffffU - local_40 < 4)" (( "(") (binary_expression "0x7fffffffffffffffU - local_40 < 4" (binary_expression "0x7fffffffffffffffU - local_40" (number_literal "0x7fffffffffffffffU") (- "-") (identifier "local_40")) (< "<") (number_literal "4")) () ")")) (compound_statement "{\n                    \n    FUN_00319590("basic_string::append");\n  }" ({ "{") (expression_statement "FUN_00319590("basic_string::append");" (call_expression "FUN_00319590("basic_string::append")" (identifier "FUN_00319590") (argument_list "("basic_string::append")" (( "(") (string_literal ""basic_string::append"" (" """) (string_content "basic_string::append") (" """)) () ")"))) (; ";")) (} "}"))) (expression_statement "FUN_002e2ee0(&local_48,&DAT_00381da3,4);" (call_expression "FUN_002e2ee0(&local_48,&DAT_00381da3,4)" (identifier "FUN_002e2ee0") (argument_list "(&local_48,&DAT_00381da3,4)" (( "(") (pointer_expression "&local_48" (& "&") (identifier "local_48")) (, ",") (pointer_expression "&DAT_00381da3" (& "&") (identifier "DAT_00381da3")) (, ",") (number_literal "4") () ")"))) (; ";")) (expression_statement "pFVar6 = fopen64(local_48,"w");" (assignment_expression "pFVar6 = fopen64(local_48,"w")" (identifier "pFVar6") (= "=") (call_expression "fopen64(local_48,"w")" (identifier "fopen64") (argument_list "(local_48,"w")" (( "(") (identifier "local_48") (, ",") (string_literal ""w"" (" """) (string_content "w") (" """)) () ")")))) (; ";")) (if_statement "if (pFVar6 != (FILE *)0x0) {\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }" (if "if") (parenthesized_expression "(pFVar6 != (FILE *)0x0)" (( "(") (binary_expression "pFVar6 != (FILE *)0x0" (identifier "pFVar6") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n    *(char **)(param_1 + 8) = pcVar4;\n    *(FILE **)(param_1 + 0x10) = pFVar6;\n    uVar1 = DAT_0043e8e8;\n    uVar7 = gettext("%s: recording to %s");\n    FUN_00178480(uVar7,uVar1,pcVar4);\n  }" ({ "{") (expression_statement "*(char **)(param_1 + 8) = pcVar4;" (assignment_expression "*(char **)(param_1 + 8) = pcVar4" (pointer_expression "*(char **)(param_1 + 8)" (* "*") (cast_expression "(char **)(param_1 + 8)" (( "(") (type_descriptor "char **" (primitive_type "char") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 8)" (( "(") (binary_expression "param_1 + 8" (identifier "param_1") (+ "+") (number_literal "8")) () ")")))) (= "=") (identifier "pcVar4")) (; ";")) (expression_statement "*(FILE **)(param_1 + 0x10) = pFVar6;" (assignment_expression "*(FILE **)(param_1 + 0x10) = pFVar6" (pointer_expression "*(FILE **)(param_1 + 0x10)" (* "*") (cast_expression "(FILE **)(param_1 + 0x10)" (( "(") (type_descriptor "FILE **" (type_identifier "FILE") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (identifier "pFVar6")) (; ";")) (expression_statement "uVar1 = DAT_0043e8e8;" (assignment_expression "uVar1 = DAT_0043e8e8" (identifier "uVar1") (= "=") (identifier "DAT_0043e8e8")) (; ";")) (expression_statement "uVar7 = gettext("%s: recording to %s");" (assignment_expression "uVar7 = gettext("%s: recording to %s")" (identifier "uVar7") (= "=") (call_expression "gettext("%s: recording to %s")" (identifier "gettext") (argument_list "("%s: recording to %s")" (( "(") (string_literal ""%s: recording to %s"" (" """) (string_content "%s: recording to %s") (" """)) () ")")))) (; ";")) (expression_statement "FUN_00178480(uVar7,uVar1,pcVar4);" (call_expression "FUN_00178480(uVar7,uVar1,pcVar4)" (identifier "FUN_00178480") (argument_list "(uVar7,uVar1,pcVar4)" (( "(") (identifier "uVar7") (, ",") (identifier "uVar1") (, ",") (identifier "pcVar4") () ")"))) (; ";")) (} "}"))) (if_statement "if (local_48 != local_38) {\n    FUN_002dac60();\n  }" (if "if") (parenthesized_expression "(local_48 != local_38)" (( "(") (binary_expression "local_48 != local_38" (identifier "local_48") (!= "!=") (identifier "local_38")) () ")")) (compound_statement "{\n    FUN_002dac60();\n  }" ({ "{") (expression_statement "FUN_002dac60();" (call_expression "FUN_002dac60()" (identifier "FUN_002dac60") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}"))) (return_statement "return pFVar6 != (FILE *)0x0;" (return "return") (binary_expression "pFVar6 != (FILE *)0x0" (identifier "pFVar6") (!= "!=") (cast_expression "(FILE *)0x0" (( "(") (type_descriptor "FILE *" (type_identifier "FILE") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) (; ";")) (} "}")))

/* DWARF original prototype: bool init(Plugin_recorder * this) */

int __thiscall gold::type_1::function_1(type_1 *this,type_2 *ctx)

{
  type_3 __n;
  char *pcVar1;
  type_4 var_5;
  type_4 var_7;
  char *var_4;
  size_t var_14;
  type_5 *var_18;
  char *format;
  type_4 *var_6;
  type_4 *puVar8;
  bool bVar9;
  char var_2 [22];
  type_6 logname;
  
  var_1(var_2 + 0x10,"XXXXX",6);
  var_2._0_8_ = s_gold_recording_X______gold_reads_00382b50._0_8_;
  var_2._8_8_ = s_gold_recording_X______gold_reads_00382b50._8_8_;
  var_4 = var_3(var_2);
  puVar8 = (type_4 *)var_2;
  if (var_4 == (char *)0x0) {
    return 0;
  }
  do {
    var_6 = puVar8;
    var_5 = *var_6 + 0xfefefeff & ~*var_6;
    var_7 = var_5 & 0x80808080;
    puVar8 = var_6 + 1;
  } while (var_7 == 0);
  bVar9 = (var_5 & 0x8080) == 0;
  if (bVar9) {
    var_7 = var_7 >> 0x10;
  }
  if (bVar9) {
    puVar8 = (type_4 *)((long)var_6 + 6);
  }
  __n = (long)puVar8 + (-(long)var_2 - (type_3)var_8((type_7)var_7,(type_7)var_7)) + -2;
  var_4 = (char *)var_9(__n);
  var_10(var_4,var_2,__n);
  logname._M_dataplus._M_p = (pointer)&logname.field_2;
  var_14 = var_11(var_4);
  std::__cxx11::basic_string<var_22,_std::char_traits<var_22>,_std::var_21<var_22>var_23>::
  var_12<var_13*>(&logname,var_4,var_4 + var_14);
  if (0x7fffffffffffffff - logname._M_string_length < 4) {
                    /* WARNING: Subroutine does not return */
    std::var_15("basic_string::append");
  }
                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */
  std::string::var_16((type_6 *)&logname,"/log",4);
  var_18 = var_17(logname._M_dataplus._M_p,"w");
  if (var_18 != (type_5 *)0x0) {
    this->tempdir_ = var_4;
    this->logfile_ = (type_5 *)var_18;
    pcVar1 = program_name;
    format = (char *)var_19("%s: recording to %s");
    var_20(format,pcVar1,var_4);
  }
  if ((anon_union_16_2_edb7204a_for_basic_string<var_22,_std::char_traits<var_22>,_std::var_21<var_22>var_23>var_24
       *)logname._M_dataplus._M_p != &logname.field_2) {
    var_25(logname._M_dataplus._M_p);
  }
  return (type_4)(var_18 != (type_5 *)0x0);
}


(translation_unit (function_definition type: (primitive_type) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (sized_type_specifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (type_identifier) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (array_declarator declarator: (identifier) size: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_array_declarator size: (number_literal))) value: (field_expression argument: (identifier) field: (field_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_array_declarator size: (number_literal))) value: (field_expression argument: (identifier) field: (field_identifier))))) (expression_statement (assignment_expression left: (identifier) right: (number_literal))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (return_statement (false)))) (do_statement body: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (pointer_expression argument: (identifier)) right: (number_literal)) right: (unary_expression argument: (pointer_expression argument: (identifier)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) right: (number_literal)))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (number_literal)))))) (if_statement condition: (parenthesized_expression (identifier)) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal)))))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (parenthesized_expression (binary_expression left: (unary_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier))) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (call_expression function: (identifier) arguments: (argument_list (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)) (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))))) right: (number_literal)))) (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 (identifier) (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (identifier)) (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (identifier) (binary_expression left: (identifier) right: (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (number_literal) right: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content))))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (pointer_expression argument: (identifier)) (pointer_expression argument: (identifier)) (number_literal)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (string_literal (string_content)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))) consequence: (compound_statement (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (pointer_expression argument: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator declarator: (abstract_pointer_declarator))) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (string_literal (string_content)))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) consequence: (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list))))) (return_statement (binary_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier) declarator: (abstract_pointer_declarator)) value: (number_literal)))))))

bool MASKED(long param_1)

{
  undefined8 uVar1;
  uint uVar2;
  uint uVar3;
  char *pcVar4;
  size_t sVar5;
  FILE *pFVar6;
  undefined8 uVar7;
  uint *puVar8;
  uint *puVar9;
  bool bVar10;
  uint local_68 [2];
  char acStack_60 [8];
  undefined4 local_58;
  undefined2 local_54;
  char *local_48;
  long local_40;
  char local_38 [24];
  
  local_58 = 0x58585858;
  local_68 = (uint  [2])s_gold_recording_X______gold_reads_00382b50._0_8_;
  acStack_60 = (char  [8])s_gold_recording_X______gold_reads_00382b50._8_8_;
  local_54 = 0x58;
  pcVar4 = mkdtemp((char *)local_68);
  puVar9 = local_68;
  if (pcVar4 == (char *)0x0) {
    return false;
  }
  do {
    puVar8 = puVar9;
    uVar2 = *puVar8 + 0xfefefeff & ~*puVar8;
    uVar3 = uVar2 & 0x80808080;
    puVar9 = puVar8 + 1;
  } while (uVar3 == 0);
  bVar10 = (uVar2 & 0x8080) == 0;
  if (bVar10) {
    uVar3 = uVar3 >> 0x10;
  }
  if (bVar10) {
    puVar9 = (uint *)((long)puVar8 + 6);
  }
  sVar5 = (long)puVar9 + (-(long)local_68 - (ulong)CARRY1((byte)uVar3,(byte)uVar3)) + -2;
  pcVar4 = (char *)thunk_FUN_002d9490(sVar5,uVar3 & 0xffffff00);
  strncpy(pcVar4,(char *)local_68,sVar5);
  local_48 = local_38;
  sVar5 = strlen(pcVar4);
  FUN_001665c0(&local_48,pcVar4,pcVar4 + sVar5);
  if (0x7fffffffffffffffU - local_40 < 4) {
                    /* WARNING: Subroutine does not return */
    FUN_00319590("basic_string::append");
  }
                    /* try { // try from 0023a245 to 0023a2da has its CatchHandler @ 0023a2db */
  FUN_002e2ee0(&local_48,&DAT_00381da3,4);
  pFVar6 = fopen64(local_48,"w");
  if (pFVar6 != (FILE *)0x0) {
    *(char **)(param_1 + 8) = pcVar4;
    *(FILE **)(param_1 + 0x10) = pFVar6;
    uVar1 = DAT_0043e8e8;
    uVar7 = gettext("%s: recording to %s");
    FUN_00178480(uVar7,uVar1,pcVar4);
  }
  if (local_48 != local_38) {
    FUN_002dac60();
  }
  return pFVar6 != (FILE *)0x0;
}

