
int hkdf(int hash_idx,uchar *salt,ulong saltlen,uchar *info,ulong infolen,uchar *in,ulong inlen,
        uchar *out,ulong outlen)

{
  int iVar1;
  uchar *out_00;
  long in_FS_OFFSET;
  ulong hashsize;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  iVar1 = hash_is_valid(hash_idx);
  if (iVar1 == 0) {
    hashsize = *(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10);
    out_00 = (uchar *)malloc(hashsize);
    if (out_00 == (uchar *)0x0) {
      iVar1 = 0xd;
    }
    else {
      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);
      if (iVar1 == 0) {
        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);
        zeromem(out_00,hashsize);
        free(out_00);
      }
      else {
        zeromem(out_00,hashsize);
        free(out_00);
      }
    }
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar1;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



ulong hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,
          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)

{
  uint uVar1;
  ulong uVar2;
  void *__ptr;
  undefined8 extraout_RDX;
  long in_FS_OFFSET;
  size_t *psVar3;
  size_t local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  uVar2 = hash_is_valid();
  if ((int)uVar2 == 0) {
    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);
    __ptr = malloc(local_48);
    if (__ptr == (void *)0x0) {
      uVar2 = 0xd;
    }
    else {
      psVar3 = &local_48;
      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);
      if (uVar1 == 0) {
        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);
        zeromem(__ptr,local_48);
        free(__ptr);
        uVar2 = (ulong)uVar1;
      }
      else {
        zeromem(__ptr,local_48,extraout_RDX,psVar3);
        free(__ptr);
        uVar2 = (ulong)uVar1;
      }
    }
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R15
PUSH R14
PUSH R13
MOV R13,R9
PUSH R12
MOV R12,RDX
PUSH RBP
MOV RBP,RSI
PUSH RBX
MOV EBX,EDI
SUB RSP,0x28
MOV qword ptr [RSP],RCX
MOV R15,qword ptr [RSP + 0x68]
MOV qword ptr [RSP + 0x8],R8
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x18],RAX
XOR EAX,EAX
CALL 0x00113bd0
TEST EAX,EAX
JZ 0x001719f8
MOV RCX,qword ptr [RSP + 0x18]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x00171aca
ADD RSP,0x28
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
MOVSXD RAX,EBX
LEA RDX,[RAX + RAX*0x2]
LEA RCX,[RAX + RDX*0x4]
SHL RCX,0x4
ADD RCX,qword ptr [0x001ecea0]
MOV RDI,qword ptr [RCX + 0x10]
MOV qword ptr [RSP + 0x10],RDI
CALL 0x001141b0
MOV R14,RAX
TEST RAX,RAX
JZ 0x00171ac0
SUB RSP,0x8
MOV RCX,R13
MOV R9,RAX
MOV RDX,R12
LEA RSI,[RSP + 0x18]
MOV EDI,EBX
PUSH RSI
MOV R8,qword ptr [RSP + 0x70]
MOV RSI,RBP
CALL 0x00113920
POP RCX
POP RSI
TEST EAX,EAX
JNZ 0x00171aa0
SUB RSP,0x8
MOV R9,R15
MOV RCX,R14
MOV EDI,EBX
PUSH qword ptr [RSP + 0x78]
MOV R8,qword ptr [RSP + 0x20]
MOV RDX,qword ptr [RSP + 0x18]
MOV RSI,qword ptr [RSP + 0x10]
CALL 0x00114590
MOV RSI,qword ptr [RSP + 0x20]
MOV RDI,R14
MOV dword ptr [RSP + 0x10],EAX
CALL 0x00114e10
MOV RDI,R14
CALL 0x00113130
POP RAX
POP RDX
MOV EAX,dword ptr [RSP]
JMP 0x001719d0
MOV RSI,qword ptr [RSP + 0x10]
MOV RDI,R14
MOV dword ptr [RSP],EAX
CALL 0x00114e10
MOV RDI,R14
CALL 0x00113130
MOV EAX,dword ptr [RSP]
JMP 0x001719d0
MOV EAX,0xd
JMP 0x001719d0
CALL 0x00113880
(translation_unit "ulong hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  void *__ptr;\n  undefined8 extraout_RDX;\n  long in_FS_OFFSET;\n  size_t *psVar3;\n  size_t local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar2 = hash_is_valid();\n  if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "ulong hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  void *__ptr;\n  undefined8 extraout_RDX;\n  long in_FS_OFFSET;\n  size_t *psVar3;\n  size_t local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar2 = hash_is_valid();\n  if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (function_declarator "hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)" identifier (parameter_list "(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "undefined8 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "undefined8 param_8" type_identifier identifier) , (parameter_declaration "undefined8 param_9" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  ulong uVar2;\n  void *__ptr;\n  undefined8 extraout_RDX;\n  long in_FS_OFFSET;\n  size_t *psVar3;\n  size_t local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar2 = hash_is_valid();\n  if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined8 extraout_RDX;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "size_t *psVar3;" primitive_type (pointer_declarator "*psVar3" * identifier) ;) (declaration "size_t local_48;" primitive_type identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = hash_is_valid();" (assignment_expression "uVar2 = hash_is_valid()" identifier = (call_expression "hash_is_valid()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }" if (parenthesized_expression "((int)uVar2 == 0)" ( (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }" { (expression_statement "local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);" (assignment_expression "local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" identifier = (pointer_expression "*(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" * (cast_expression "(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" ( (binary_expression "PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10" (binary_expression "PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0" identifier + (binary_expression "(long)param_1 * 0xd0" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) + number_literal) ))))) ;) (expression_statement "__ptr = malloc(local_48);" (assignment_expression "__ptr = malloc(local_48)" identifier = (call_expression "malloc(local_48)" identifier (argument_list "(local_48)" ( identifier )))) ;) (if_statement "if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" if (parenthesized_expression "(__ptr == (void *)0x0)" ( (binary_expression "__ptr == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uVar2 = 0xd;\n    }" { (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" else (compound_statement "{\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" { (expression_statement "psVar3 = &local_48;" (assignment_expression "psVar3 = &local_48" identifier = (pointer_expression "&local_48" & identifier)) ;) (expression_statement "uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);" (assignment_expression "uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr)" identifier = (call_expression "hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr)" identifier (argument_list "(param_1,param_2,param_3,param_6,param_7,__ptr)" ( identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" { (expression_statement "uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);" (assignment_expression "uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" identifier = (call_expression "hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" identifier (argument_list "(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (expression_statement "zeromem(__ptr,local_48);" (call_expression "zeromem(__ptr,local_48)" identifier (argument_list "(__ptr,local_48)" ( identifier , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }) (else_clause "else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" else (compound_statement "{\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" { (expression_statement "zeromem(__ptr,local_48,extraout_RDX,psVar3);" (call_expression "zeromem(__ptr,local_48,extraout_RDX,psVar3)" identifier (argument_list "(__ptr,local_48,extraout_RDX,psVar3)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }))) }))) })) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int hkdf(int hash_idx,uchar *salt,ulong saltlen,uchar *info,ulong infolen,uchar *in,ulong inlen,\n        uchar *out,ulong outlen)\n\n{\n  int iVar1;\n  uchar *out_00;\n  long in_FS_OFFSET;\n  ulong hashsize;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = hash_is_valid(hash_idx);\n  if (iVar1 == 0) {\n    hashsize = *(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10);\n    out_00 = (uchar *)malloc(hashsize);\n    if (out_00 == (uchar *)0x0) {\n      iVar1 = 0xd;\n    }\n    else {\n      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);\n      if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int hkdf(int hash_idx,uchar *salt,ulong saltlen,uchar *info,ulong infolen,uchar *in,ulong inlen,\n        uchar *out,ulong outlen)\n\n{\n  int iVar1;\n  uchar *out_00;\n  long in_FS_OFFSET;\n  ulong hashsize;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = hash_is_valid(hash_idx);\n  if (iVar1 == 0) {\n    hashsize = *(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10);\n    out_00 = (uchar *)malloc(hashsize);\n    if (out_00 == (uchar *)0x0) {\n      iVar1 = 0xd;\n    }\n    else {\n      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);\n      if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "hkdf(int hash_idx,uchar *salt,ulong saltlen,uchar *info,ulong infolen,uchar *in,ulong inlen,\n        uchar *out,ulong outlen)" identifier (parameter_list "(int hash_idx,uchar *salt,ulong saltlen,uchar *info,ulong infolen,uchar *in,ulong inlen,\n        uchar *out,ulong outlen)" ( (parameter_declaration "int hash_idx" primitive_type identifier) , (parameter_declaration "uchar *salt" type_identifier (pointer_declarator "*salt" * identifier)) , (parameter_declaration "ulong saltlen" type_identifier identifier) , (parameter_declaration "uchar *info" type_identifier (pointer_declarator "*info" * identifier)) , (parameter_declaration "ulong infolen" type_identifier identifier) , (parameter_declaration "uchar *in" type_identifier (pointer_declarator "*in" * identifier)) , (parameter_declaration "ulong inlen" type_identifier identifier) , (parameter_declaration "uchar *out" type_identifier (pointer_declarator "*out" * identifier)) , (parameter_declaration "ulong outlen" type_identifier identifier) ))) (compound_statement "{\n  int iVar1;\n  uchar *out_00;\n  long in_FS_OFFSET;\n  ulong hashsize;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  iVar1 = hash_is_valid(hash_idx);\n  if (iVar1 == 0) {\n    hashsize = *(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10);\n    out_00 = (uchar *)malloc(hashsize);\n    if (out_00 == (uchar *)0x0) {\n      iVar1 = 0xd;\n    }\n    else {\n      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);\n      if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uchar *out_00;" type_identifier (pointer_declarator "*out_00" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong hashsize;" type_identifier identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "iVar1 = hash_is_valid(hash_idx);" (assignment_expression "iVar1 = hash_is_valid(hash_idx)" identifier = (call_expression "hash_is_valid(hash_idx)" identifier (argument_list "(hash_idx)" ( identifier )))) ;) (if_statement "if (iVar1 == 0) {\n    hashsize = *(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10);\n    out_00 = (uchar *)malloc(hashsize);\n    if (out_00 == (uchar *)0x0) {\n      iVar1 = 0xd;\n    }\n    else {\n      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);\n      if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n    }\n  }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n    hashsize = *(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10);\n    out_00 = (uchar *)malloc(hashsize);\n    if (out_00 == (uchar *)0x0) {\n      iVar1 = 0xd;\n    }\n    else {\n      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);\n      if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n    }\n  }" { (expression_statement "hashsize = *(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10);" (assignment_expression "hashsize = *(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10)" identifier = (pointer_expression "*(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10)" * (cast_expression "(ulong *)(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10)" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10)" ( (binary_expression "PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0 + 0x10" (binary_expression "PTR_hash_descriptor_001ecea0 + (long)hash_idx * 0xd0" identifier + (binary_expression "(long)hash_idx * 0xd0" (cast_expression "(long)hash_idx" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) + number_literal) ))))) ;) (expression_statement "out_00 = (uchar *)malloc(hashsize);" (assignment_expression "out_00 = (uchar *)malloc(hashsize)" identifier = (cast_expression "(uchar *)malloc(hashsize)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(hashsize)" identifier (argument_list "(hashsize)" ( identifier ))))) ;) (if_statement "if (out_00 == (uchar *)0x0) {\n      iVar1 = 0xd;\n    }\n    else {\n      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);\n      if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n    }" if (parenthesized_expression "(out_00 == (uchar *)0x0)" ( (binary_expression "out_00 == (uchar *)0x0" identifier == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar1 = 0xd;\n    }" { (expression_statement "iVar1 = 0xd;" (assignment_expression "iVar1 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);\n      if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n    }" else (compound_statement "{\n      iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);\n      if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n    }" { (expression_statement "iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize);" (assignment_expression "iVar1 = hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize)" identifier = (call_expression "hkdf_extract(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize)" identifier (argument_list "(hash_idx,salt,saltlen,in,inlen,out_00,&hashsize)" ( identifier , identifier , identifier , identifier , identifier , identifier , (pointer_expression "&hashsize" & identifier) )))) ;) (if_statement "if (iVar1 == 0) {\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }\n      else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }" if (parenthesized_expression "(iVar1 == 0)" ( (binary_expression "iVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }" { (expression_statement "iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen);" (assignment_expression "iVar1 = hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen)" identifier = (call_expression "hkdf_expand(hash_idx,info,infolen,out_00,hashsize,out,outlen)" identifier (argument_list "(hash_idx,info,infolen,out_00,hashsize,out,outlen)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (expression_statement "zeromem(out_00,hashsize);" (call_expression "zeromem(out_00,hashsize)" identifier (argument_list "(out_00,hashsize)" ( identifier , identifier ))) ;) (expression_statement "free(out_00);" (call_expression "free(out_00)" identifier (argument_list "(out_00)" ( identifier ))) ;) }) (else_clause "else {\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }" else (compound_statement "{\n        zeromem(out_00,hashsize);\n        free(out_00);\n      }" { (expression_statement "zeromem(out_00,hashsize);" (call_expression "zeromem(out_00,hashsize)" identifier (argument_list "(out_00,hashsize)" ( identifier , identifier ))) ;) (expression_statement "free(out_00);" (call_expression "free(out_00)" identifier (argument_list "(out_00)" ( identifier ))) ;) }))) }))) })) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar1;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar1;\n  }" { (return_statement "return iVar1;" return identifier ;) })) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "ulong hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  void *__ptr;\n  undefined8 extraout_RDX;\n  long in_FS_OFFSET;\n  size_t *psVar3;\n  size_t local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar2 = hash_is_valid();\n  if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "ulong hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  void *__ptr;\n  undefined8 extraout_RDX;\n  long in_FS_OFFSET;\n  size_t *psVar3;\n  size_t local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar2 = hash_is_valid();\n  if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" type_identifier (function_declarator "hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)" identifier (parameter_list "(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)" ( (parameter_declaration "int param_1" primitive_type identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) , (parameter_declaration "undefined8 param_3" type_identifier identifier) , (parameter_declaration "undefined8 param_4" type_identifier identifier) , (parameter_declaration "undefined8 param_5" type_identifier identifier) , (parameter_declaration "undefined8 param_6" type_identifier identifier) , (parameter_declaration "undefined8 param_7" type_identifier identifier) , (parameter_declaration "undefined8 param_8" type_identifier identifier) , (parameter_declaration "undefined8 param_9" type_identifier identifier) ))) (compound_statement "{\n  uint uVar1;\n  ulong uVar2;\n  void *__ptr;\n  undefined8 extraout_RDX;\n  long in_FS_OFFSET;\n  size_t *psVar3;\n  size_t local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar2 = hash_is_valid();\n  if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "undefined8 extraout_RDX;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "size_t *psVar3;" primitive_type (pointer_declarator "*psVar3" * identifier) ;) (declaration "size_t local_48;" primitive_type identifier ;) (declaration "long local_40;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "uVar2 = hash_is_valid();" (assignment_expression "uVar2 = hash_is_valid()" identifier = (call_expression "hash_is_valid()" identifier (argument_list "()" ( )))) ;) (if_statement "if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }" if (parenthesized_expression "((int)uVar2 == 0)" ( (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }" { (expression_statement "local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);" (assignment_expression "local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" identifier = (pointer_expression "*(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" * (cast_expression "(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" ( (type_descriptor "size_t *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" ( (binary_expression "PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10" (binary_expression "PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0" identifier + (binary_expression "(long)param_1 * 0xd0" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) * number_literal)) + number_literal) ))))) ;) (expression_statement "__ptr = malloc(local_48);" (assignment_expression "__ptr = malloc(local_48)" identifier = (call_expression "malloc(local_48)" identifier (argument_list "(local_48)" ( identifier )))) ;) (if_statement "if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" if (parenthesized_expression "(__ptr == (void *)0x0)" ( (binary_expression "__ptr == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uVar2 = 0xd;\n    }" { (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" identifier = number_literal) ;) }) (else_clause "else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" else (compound_statement "{\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" { (expression_statement "psVar3 = &local_48;" (assignment_expression "psVar3 = &local_48" identifier = (pointer_expression "&local_48" & identifier)) ;) (expression_statement "uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);" (assignment_expression "uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr)" identifier = (call_expression "hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr)" identifier (argument_list "(param_1,param_2,param_3,param_6,param_7,__ptr)" ( identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (if_statement "if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" if (parenthesized_expression "(uVar1 == 0)" ( (binary_expression "uVar1 == 0" identifier == number_literal) )) (compound_statement "{\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" { (expression_statement "uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);" (assignment_expression "uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" identifier = (call_expression "hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" identifier (argument_list "(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" ( identifier , identifier , identifier , identifier , identifier , identifier , identifier )))) ;) (expression_statement "zeromem(__ptr,local_48);" (call_expression "zeromem(__ptr,local_48)" identifier (argument_list "(__ptr,local_48)" ( identifier , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }) (else_clause "else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" else (compound_statement "{\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" { (expression_statement "zeromem(__ptr,local_48,extraout_RDX,psVar3);" (call_expression "zeromem(__ptr,local_48,extraout_RDX,psVar3)" identifier (argument_list "(__ptr,local_48,extraout_RDX,psVar3)" ( identifier , identifier , identifier , identifier ))) ;) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" identifier = (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ;) }))) }))) })) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) })) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) * LIT)) + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression & IDENT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , IDENT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , IDENT , IDENT , IDENT )))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE) ) IDENT)) ;) }))) }))) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) })) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "ulong hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)\n\n{\n  uint uVar1;\n  ulong uVar2;\n  void *__ptr;\n  undefined8 extraout_RDX;\n  long in_FS_OFFSET;\n  size_t *psVar3;\n  size_t local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar2 = hash_is_valid();\n  if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" (type_identifier "ulong") (function_declarator "hkdf(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)" (identifier "hkdf") (parameter_list "(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,\n          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)" (( "(") (parameter_declaration "int param_1" (primitive_type "int") (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) (, ",") (parameter_declaration "undefined8 param_3" (type_identifier "undefined8") (identifier "param_3")) (, ",") (parameter_declaration "undefined8 param_4" (type_identifier "undefined8") (identifier "param_4")) (, ",") (parameter_declaration "undefined8 param_5" (type_identifier "undefined8") (identifier "param_5")) (, ",") (parameter_declaration "undefined8 param_6" (type_identifier "undefined8") (identifier "param_6")) (, ",") (parameter_declaration "undefined8 param_7" (type_identifier "undefined8") (identifier "param_7")) (, ",") (parameter_declaration "undefined8 param_8" (type_identifier "undefined8") (identifier "param_8")) (, ",") (parameter_declaration "undefined8 param_9" (type_identifier "undefined8") (identifier "param_9")) () ")"))) (compound_statement "{\n  uint uVar1;\n  ulong uVar2;\n  void *__ptr;\n  undefined8 extraout_RDX;\n  long in_FS_OFFSET;\n  size_t *psVar3;\n  size_t local_48;\n  long local_40;\n  \n  local_40 = *(long *)(in_FS_OFFSET + 0x28);\n  uVar2 = hash_is_valid();\n  if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }\n  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "uint uVar1;" (type_identifier "uint") (identifier "uVar1") (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "undefined8 extraout_RDX;" (type_identifier "undefined8") (identifier "extraout_RDX") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "size_t *psVar3;" (primitive_type "size_t") (pointer_declarator "*psVar3" (* "*") (identifier "psVar3")) (; ";")) (declaration "size_t local_48;" (primitive_type "size_t") (identifier "local_48") (; ";")) (declaration "long local_40;" (sized_type_specifier "long" (long "long")) (identifier "local_40") (; ";")) (expression_statement "local_40 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_40 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "uVar2 = hash_is_valid();" (assignment_expression "uVar2 = hash_is_valid()" (identifier "uVar2") (= "=") (call_expression "hash_is_valid()" (identifier "hash_is_valid") (argument_list "()" (( "(") () ")")))) (; ";")) (if_statement "if ((int)uVar2 == 0) {\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }" (if "if") (parenthesized_expression "((int)uVar2 == 0)" (( "(") (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);\n    __ptr = malloc(local_48);\n    if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }\n  }" ({ "{") (expression_statement "local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);" (assignment_expression "local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" (identifier "local_48") (= "=") (pointer_expression "*(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" (* "*") (cast_expression "(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" (( "(") (type_descriptor "size_t *" (primitive_type "size_t") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10)" (( "(") (binary_expression "PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10" (binary_expression "PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0" (identifier "PTR_hash_descriptor_001ecea0") (+ "+") (binary_expression "(long)param_1 * 0xd0" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (* "*") (number_literal "0xd0"))) (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "__ptr = malloc(local_48);" (assignment_expression "__ptr = malloc(local_48)" (identifier "__ptr") (= "=") (call_expression "malloc(local_48)" (identifier "malloc") (argument_list "(local_48)" (( "(") (identifier "local_48") () ")")))) (; ";")) (if_statement "if (__ptr == (void *)0x0) {\n      uVar2 = 0xd;\n    }\n    else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" (if "if") (parenthesized_expression "(__ptr == (void *)0x0)" (( "(") (binary_expression "__ptr == (void *)0x0" (identifier "__ptr") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      uVar2 = 0xd;\n    }" ({ "{") (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" (identifier "uVar2") (= "=") (number_literal "0xd")) (; ";")) (} "}")) (else_clause "else {\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" (else "else") (compound_statement "{\n      psVar3 = &local_48;\n      uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);\n      if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n    }" ({ "{") (expression_statement "psVar3 = &local_48;" (assignment_expression "psVar3 = &local_48" (identifier "psVar3") (= "=") (pointer_expression "&local_48" (& "&") (identifier "local_48"))) (; ";")) (expression_statement "uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr);" (assignment_expression "uVar1 = hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr)" (identifier "uVar1") (= "=") (call_expression "hkdf_extract(param_1,param_2,param_3,param_6,param_7,__ptr)" (identifier "hkdf_extract") (argument_list "(param_1,param_2,param_3,param_6,param_7,__ptr)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_6") (, ",") (identifier "param_7") (, ",") (identifier "__ptr") () ")")))) (; ";")) (if_statement "if (uVar1 == 0) {\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }\n      else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" (if "if") (parenthesized_expression "(uVar1 == 0)" (( "(") (binary_expression "uVar1 == 0" (identifier "uVar1") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);\n        zeromem(__ptr,local_48);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" ({ "{") (expression_statement "uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);" (assignment_expression "uVar1 = hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" (identifier "uVar1") (= "=") (call_expression "hkdf_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" (identifier "hkdf_expand") (argument_list "(param_1,param_4,param_5,__ptr,local_48,param_8,param_9)" (( "(") (identifier "param_1") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (identifier "__ptr") (, ",") (identifier "local_48") (, ",") (identifier "param_8") (, ",") (identifier "param_9") () ")")))) (; ";")) (expression_statement "zeromem(__ptr,local_48);" (call_expression "zeromem(__ptr,local_48)" (identifier "zeromem") (argument_list "(__ptr,local_48)" (( "(") (identifier "__ptr") (, ",") (identifier "local_48") () ")"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" (identifier "uVar2") (= "=") (cast_expression "(ulong)uVar1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar1"))) (; ";")) (} "}")) (else_clause "else {\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" (else "else") (compound_statement "{\n        zeromem(__ptr,local_48,extraout_RDX,psVar3);\n        free(__ptr);\n        uVar2 = (ulong)uVar1;\n      }" ({ "{") (expression_statement "zeromem(__ptr,local_48,extraout_RDX,psVar3);" (call_expression "zeromem(__ptr,local_48,extraout_RDX,psVar3)" (identifier "zeromem") (argument_list "(__ptr,local_48,extraout_RDX,psVar3)" (( "(") (identifier "__ptr") (, ",") (identifier "local_48") (, ",") (identifier "extraout_RDX") (, ",") (identifier "psVar3") () ")"))) (; ";")) (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (expression_statement "uVar2 = (ulong)uVar1;" (assignment_expression "uVar2 = (ulong)uVar1" (identifier "uVar2") (= "=") (cast_expression "(ulong)uVar1" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar1"))) (; ";")) (} "}")))) (} "}")))) (} "}"))) (if_statement "if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_40 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_40 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_40") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}"))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

int function_1(int hash_idx,type_1 *salt,type_2 saltlen,type_1 *info,type_2 infolen,type_1 *in,type_2 inlen,
        type_1 *out,type_2 outlen)

{
  int var_3;
  type_1 *var_6;
  long var_1;
  type_2 hashsize;
  long var_11;
  
  var_11 = *(long *)(var_1 + 0x28);
  var_3 = var_2(hash_idx);
  if (var_3 == 0) {
    hashsize = *(type_2 *)(var_4 + (long)hash_idx * 0xd0 + 0x10);
    var_6 = (type_1 *)var_5(hashsize);
    if (var_6 == (type_1 *)0x0) {
      var_3 = 0xd;
    }
    else {
      var_3 = var_7(hash_idx,salt,saltlen,in,inlen,var_6,&hashsize);
      if (var_3 == 0) {
        var_3 = var_8(hash_idx,info,infolen,var_6,hashsize,out,outlen);
        var_9(var_6,hashsize);
        var_10(var_6);
      }
      else {
        var_9(var_6,hashsize);
        var_10(var_6);
      }
    }
  }
  if (var_11 == *(long *)(var_1 + 0x28)) {
    return var_3;
  }
                    /* WARNING: Subroutine does not return */
  var_12();
}


(translation_unit (function_definition type: (type_identifier) declarator: (function_declarator declarator: (identifier) parameters: (parameter_list (parameter_declaration type: (primitive_type) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)) (parameter_declaration type: (type_identifier) declarator: (identifier)))) body: (compound_statement (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (type_identifier) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (declaration type: (primitive_type) declarator: (pointer_declarator declarator: (identifier))) (declaration type: (primitive_type) declarator: (identifier)) (declaration type: (sized_type_specifier) declarator: (identifier)) (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list)))) (if_statement condition: (parenthesized_expression (binary_expression left: (cast_expression type: (type_descriptor type: (primitive_type)) value: (identifier)) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (primitive_type) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (binary_expression left: (cast_expression type: (type_descriptor type: (sized_type_specifier)) value: (identifier)) right: (number_literal))) right: (number_literal))))))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (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 (expression_statement (assignment_expression left: (identifier) right: (number_literal)))) alternative: (else_clause (compound_statement (expression_statement (assignment_expression left: (identifier) right: (pointer_expression argument: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (identifier) (identifier))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))) consequence: (compound_statement (expression_statement (assignment_expression left: (identifier) right: (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier) (identifier) (identifier) (identifier))))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier))))) alternative: (else_clause (compound_statement (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier) (identifier) (identifier) (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (type_descriptor type: (type_identifier)) value: (identifier)))))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (pointer_expression argument: (cast_expression type: (type_descriptor type: (sized_type_specifier) declarator: (abstract_pointer_declarator)) value: (parenthesized_expression (binary_expression left: (identifier) right: (number_literal))))))) consequence: (compound_statement (return_statement (identifier)))) (expression_statement (call_expression function: (identifier) arguments: (argument_list))))))

ulong MASKED(int param_1,undefined8 param_2,undefined8 param_3,undefined8 param_4,undefined8 param_5,
          undefined8 param_6,undefined8 param_7,undefined8 param_8,undefined8 param_9)

{
  uint uVar1;
  ulong uVar2;
  void *__ptr;
  undefined8 extraout_RDX;
  long in_FS_OFFSET;
  size_t *psVar3;
  size_t local_48;
  long local_40;
  
  local_40 = *(long *)(in_FS_OFFSET + 0x28);
  uVar2 = hash_is_valid();
  if ((int)uVar2 == 0) {
    local_48 = *(size_t *)(PTR_hash_descriptor_001ecea0 + (long)param_1 * 0xd0 + 0x10);
    __ptr = malloc(local_48);
    if (__ptr == (void *)0x0) {
      uVar2 = 0xd;
    }
    else {
      psVar3 = &local_48;
      uVar1 = MASKED_extract(param_1,param_2,param_3,param_6,param_7,__ptr);
      if (uVar1 == 0) {
        uVar1 = MASKED_expand(param_1,param_4,param_5,__ptr,local_48,param_8,param_9);
        zeromem(__ptr,local_48);
        free(__ptr);
        uVar2 = (ulong)uVar1;
      }
      else {
        zeromem(__ptr,local_48,extraout_RDX,psVar3);
        free(__ptr);
        uVar2 = (ulong)uVar1;
      }
    }
  }
  if (local_40 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

