
void * md5_finish_ctx(md5_ctx *ctx,void *resbuf)

{
  long lVar1;
  uint uVar2;
  uint uVar3;
  void *pvVar4;
  uint uVar5;
  
  uVar2 = ctx->buflen;
  uVar5 = ctx->total[0];
  ctx->total[0] = uVar2 + ctx->total[0];
  if (CARRY4(uVar2,uVar5)) {
    ctx->total[1] = ctx->total[1] + 1;
  }
  if (uVar2 < 0x38) {
    uVar5 = 0x38 - uVar2;
  }
  else {
    uVar5 = 0x78 - uVar2;
  }
  memcpy(ctx->buffer + uVar2,fillbuf,(ulong)uVar5);
  uVar3 = ctx->total[0];
  lVar1 = (ulong)uVar5 + (ulong)uVar2;
  *(uint *)(ctx->buffer + lVar1) = uVar3 * 8;
  *(md5_uint32 *)(ctx->buffer + lVar1 + 4) = ctx->total[1] << 3 | uVar3 >> 0x1d;
  md5_process_block(ctx->buffer,lVar1 + 8,ctx);
  pvVar4 = md5_read_ctx(ctx,resbuf);
  return pvVar4;
}



void FUN_0015a5a0(long param_1,undefined8 param_2)

{
  long lVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  
  uVar2 = *(uint *)(param_1 + 0x18);
  uVar4 = *(uint *)(param_1 + 0x10);
  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);
  if (CARRY4(uVar2,uVar4)) {
    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;
  }
  if (uVar2 < 0x38) {
    uVar4 = 0x38 - uVar2;
  }
  else {
    uVar4 = 0x78 - uVar2;
  }
  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);
  uVar3 = *(uint *)(param_1 + 0x10);
  lVar1 = (ulong)uVar4 + (ulong)uVar2;
  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;
  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;
  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);
  FUN_00159e10(param_1,param_2);
  return;
}


PUSH R13
PUSH R12
MOV R12,RSI
PUSH RBP
PUSH RBX
MOV RBX,RDI
SUB RSP,0x8
MOV EAX,dword ptr [RDI + 0x18]
MOV EDX,EAX
ADD EDX,dword ptr [RDI + 0x10]
MOV dword ptr [RDI + 0x10],EDX
JNC 0x0015a5c1
ADD dword ptr [RDI + 0x14],0x1
CMP EAX,0x37
JBE 0x0015a630
MOV ESI,0x78
MOV EBP,ESI
SUB EBP,EAX
MOV R13D,EAX
MOV RDX,RBP
LEA RSI,[0x29fec0]
LEA RDI,[RBX + R13*0x1 + 0x1c]
CALL 0x0010d740
MOV EDX,dword ptr [RBX + 0x10]
LEA RSI,[RBP + R13*0x1]
LEA RDI,[RBX + 0x1c]
LEA EAX,[RDX*0x8]
SHR EDX,0x1d
MOV dword ptr [RBX + RSI*0x1 + 0x1c],EAX
MOV EAX,dword ptr [RBX + 0x14]
SHL EAX,0x3
OR EAX,EDX
MOV RDX,RBX
MOV dword ptr [RBX + RSI*0x1 + 0x20],EAX
ADD RSI,0x8
CALL 0x00159e30
ADD RSP,0x8
MOV RSI,R12
MOV RDI,RBX
POP RBX
POP RBP
POP R12
POP R13
JMP 0x00159e10
MOV ESI,0x38
MOV EBP,ESI
SUB EBP,EAX
JMP 0x0015a5cf
(translation_unit "void FUN_0015a5a0(long param_1,undefined8 param_2)\n\n{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = *(uint *)(param_1 + 0x18);\n  uVar4 = *(uint *)(param_1 + 0x10);\n  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);\n  if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }\n  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);\n  uVar3 = *(uint *)(param_1 + 0x10);\n  lVar1 = (ulong)uVar4 + (ulong)uVar2;\n  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;\n  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;\n  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);\n  FUN_00159e10(param_1,param_2);\n  return;\n}\n\n" (function_definition "void FUN_0015a5a0(long param_1,undefined8 param_2)\n\n{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = *(uint *)(param_1 + 0x18);\n  uVar4 = *(uint *)(param_1 + 0x10);\n  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);\n  if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }\n  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);\n  uVar3 = *(uint *)(param_1 + 0x10);\n  lVar1 = (ulong)uVar4 + (ulong)uVar2;\n  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;\n  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;\n  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);\n  FUN_00159e10(param_1,param_2);\n  return;\n}" primitive_type (function_declarator "FUN_0015a5a0(long param_1,undefined8 param_2)" identifier (parameter_list "(long param_1,undefined8 param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = *(uint *)(param_1 + 0x18);\n  uVar4 = *(uint *)(param_1 + 0x10);\n  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);\n  if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }\n  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);\n  uVar3 = *(uint *)(param_1 + 0x10);\n  lVar1 = (ulong)uVar4 + (ulong)uVar2;\n  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;\n  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;\n  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);\n  FUN_00159e10(param_1,param_2);\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar2 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x18)" identifier = (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0x10)" identifier = (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "*(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);" (assignment_expression "*(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10)" (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "uVar2 + *(uint *)(param_1 + 0x10)" identifier + (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))))) ;) (if_statement "if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }" if (parenthesized_expression "(CARRY4(uVar2,uVar4))" ( (call_expression "CARRY4(uVar2,uVar4)" identifier (argument_list "(uVar2,uVar4)" ( identifier , identifier ))) )) (compound_statement "{\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }" { (expression_statement "*(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;" (assignment_expression "*(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x14) + 1" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) + number_literal)) ;) })) (if_statement "if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }" if (parenthesized_expression "(uVar2 < 0x38)" ( (binary_expression "uVar2 < 0x38" identifier < number_literal) )) (compound_statement "{\n    uVar4 = 0x38 - uVar2;\n  }" { (expression_statement "uVar4 = 0x38 - uVar2;" (assignment_expression "uVar4 = 0x38 - uVar2" identifier = (binary_expression "0x38 - uVar2" number_literal - identifier)) ;) }) (else_clause "else {\n    uVar4 = 0x78 - uVar2;\n  }" else (compound_statement "{\n    uVar4 = 0x78 - uVar2;\n  }" { (expression_statement "uVar4 = 0x78 - uVar2;" (assignment_expression "uVar4 = 0x78 - uVar2" identifier = (binary_expression "0x78 - uVar2" number_literal - identifier)) ;) }))) (expression_statement "memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);" (call_expression "memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4)" identifier (argument_list "((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4)" ( (cast_expression "(void *)(param_1 + 0x1c + (ulong)uVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c + (ulong)uVar2)" ( (binary_expression "param_1 + 0x1c + (ulong)uVar2" (binary_expression "param_1 + 0x1c" identifier + number_literal) + (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ))) , (pointer_expression "&DAT_0029fec0" & identifier) , (cast_expression "(ulong)uVar4" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "uVar3 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x10)" identifier = (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "lVar1 = (ulong)uVar4 + (ulong)uVar2;" (assignment_expression "lVar1 = (ulong)uVar4 + (ulong)uVar2" identifier = (binary_expression "(ulong)uVar4 + (ulong)uVar2" (cast_expression "(ulong)uVar4" ( (type_descriptor "ulong" type_identifier) ) identifier) + (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier))) ;) (expression_statement "*(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;" (assignment_expression "*(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8" (pointer_expression "*(uint *)(param_1 + 0x1c + lVar1)" * (cast_expression "(uint *)(param_1 + 0x1c + lVar1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c + lVar1)" ( (binary_expression "param_1 + 0x1c + lVar1" (binary_expression "param_1 + 0x1c" identifier + number_literal) + identifier) )))) = (binary_expression "uVar3 * 8" identifier * number_literal)) ;) (expression_statement "*(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;" (assignment_expression "*(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d" (pointer_expression "*(uint *)(param_1 + 0x20 + lVar1)" * (cast_expression "(uint *)(param_1 + 0x20 + lVar1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20 + lVar1)" ( (binary_expression "param_1 + 0x20 + lVar1" (binary_expression "param_1 + 0x20" identifier + number_literal) + identifier) )))) = (binary_expression "*(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d" (binary_expression "*(int *)(param_1 + 0x14) << 3" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) << number_literal) | (binary_expression "uVar3 >> 0x1d" identifier >> number_literal))) ;) (expression_statement "FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);" (call_expression "FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1)" identifier (argument_list "(param_1 + 0x1c,lVar1 + 8,param_1)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) , (binary_expression "lVar1 + 8" identifier + number_literal) , identifier ))) ;) (expression_statement "FUN_00159e10(param_1,param_2);" (call_expression "FUN_00159e10(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void * md5_finish_ctx(md5_ctx *ctx,void *resbuf)\n\n{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  void *pvVar4;\n  uint uVar5;\n  \n  uVar2 = ctx->buflen;\n  uVar5 = ctx->total[0];\n  ctx->total[0] = uVar2 + ctx->total[0];\n  if (CARRY4(uVar2,uVar5)) {\n    ctx->total[1] = ctx->total[1] + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar5 = 0x38 - uVar2;\n  }\n  else {\n    uVar5 = 0x78 - uVar2;\n  }\n  memcpy(ctx->buffer + uVar2,fillbuf,(ulong)uVar5);\n  uVar3 = ctx->total[0];\n  lVar1 = (ulong)uVar5 + (ulong)uVar2;\n  *(uint *)(ctx->buffer + lVar1) = uVar3 * 8;\n  *(md5_uint32 *)(ctx->buffer + lVar1 + 4) = ctx->total[1] << 3 | uVar3 >> 0x1d;\n  md5_process_block(ctx->buffer,lVar1 + 8,ctx);\n  pvVar4 = md5_read_ctx(ctx,resbuf);\n  return pvVar4;\n}\n\n" (function_definition "void * md5_finish_ctx(md5_ctx *ctx,void *resbuf)\n\n{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  void *pvVar4;\n  uint uVar5;\n  \n  uVar2 = ctx->buflen;\n  uVar5 = ctx->total[0];\n  ctx->total[0] = uVar2 + ctx->total[0];\n  if (CARRY4(uVar2,uVar5)) {\n    ctx->total[1] = ctx->total[1] + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar5 = 0x38 - uVar2;\n  }\n  else {\n    uVar5 = 0x78 - uVar2;\n  }\n  memcpy(ctx->buffer + uVar2,fillbuf,(ulong)uVar5);\n  uVar3 = ctx->total[0];\n  lVar1 = (ulong)uVar5 + (ulong)uVar2;\n  *(uint *)(ctx->buffer + lVar1) = uVar3 * 8;\n  *(md5_uint32 *)(ctx->buffer + lVar1 + 4) = ctx->total[1] << 3 | uVar3 >> 0x1d;\n  md5_process_block(ctx->buffer,lVar1 + 8,ctx);\n  pvVar4 = md5_read_ctx(ctx,resbuf);\n  return pvVar4;\n}" primitive_type (pointer_declarator "* md5_finish_ctx(md5_ctx *ctx,void *resbuf)" * (function_declarator "md5_finish_ctx(md5_ctx *ctx,void *resbuf)" identifier (parameter_list "(md5_ctx *ctx,void *resbuf)" ( (parameter_declaration "md5_ctx *ctx" type_identifier (pointer_declarator "*ctx" * identifier)) , (parameter_declaration "void *resbuf" primitive_type (pointer_declarator "*resbuf" * identifier)) )))) (compound_statement "{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  void *pvVar4;\n  uint uVar5;\n  \n  uVar2 = ctx->buflen;\n  uVar5 = ctx->total[0];\n  ctx->total[0] = uVar2 + ctx->total[0];\n  if (CARRY4(uVar2,uVar5)) {\n    ctx->total[1] = ctx->total[1] + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar5 = 0x38 - uVar2;\n  }\n  else {\n    uVar5 = 0x78 - uVar2;\n  }\n  memcpy(ctx->buffer + uVar2,fillbuf,(ulong)uVar5);\n  uVar3 = ctx->total[0];\n  lVar1 = (ulong)uVar5 + (ulong)uVar2;\n  *(uint *)(ctx->buffer + lVar1) = uVar3 * 8;\n  *(md5_uint32 *)(ctx->buffer + lVar1 + 4) = ctx->total[1] << 3 | uVar3 >> 0x1d;\n  md5_process_block(ctx->buffer,lVar1 + 8,ctx);\n  pvVar4 = md5_read_ctx(ctx,resbuf);\n  return pvVar4;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "void *pvVar4;" primitive_type (pointer_declarator "*pvVar4" * identifier) ;) (declaration "uint uVar5;" type_identifier identifier ;) (expression_statement "uVar2 = ctx->buflen;" (assignment_expression "uVar2 = ctx->buflen" identifier = (field_expression "ctx->buflen" identifier -> field_identifier)) ;) (expression_statement "uVar5 = ctx->total[0];" (assignment_expression "uVar5 = ctx->total[0]" identifier = (subscript_expression "ctx->total[0]" (field_expression "ctx->total" identifier -> field_identifier) [ number_literal ])) ;) (expression_statement "ctx->total[0] = uVar2 + ctx->total[0];" (assignment_expression "ctx->total[0] = uVar2 + ctx->total[0]" (subscript_expression "ctx->total[0]" (field_expression "ctx->total" identifier -> field_identifier) [ number_literal ]) = (binary_expression "uVar2 + ctx->total[0]" identifier + (subscript_expression "ctx->total[0]" (field_expression "ctx->total" identifier -> field_identifier) [ number_literal ]))) ;) (if_statement "if (CARRY4(uVar2,uVar5)) {\n    ctx->total[1] = ctx->total[1] + 1;\n  }" if (parenthesized_expression "(CARRY4(uVar2,uVar5))" ( (call_expression "CARRY4(uVar2,uVar5)" identifier (argument_list "(uVar2,uVar5)" ( identifier , identifier ))) )) (compound_statement "{\n    ctx->total[1] = ctx->total[1] + 1;\n  }" { (expression_statement "ctx->total[1] = ctx->total[1] + 1;" (assignment_expression "ctx->total[1] = ctx->total[1] + 1" (subscript_expression "ctx->total[1]" (field_expression "ctx->total" identifier -> field_identifier) [ number_literal ]) = (binary_expression "ctx->total[1] + 1" (subscript_expression "ctx->total[1]" (field_expression "ctx->total" identifier -> field_identifier) [ number_literal ]) + number_literal)) ;) })) (if_statement "if (uVar2 < 0x38) {\n    uVar5 = 0x38 - uVar2;\n  }\n  else {\n    uVar5 = 0x78 - uVar2;\n  }" if (parenthesized_expression "(uVar2 < 0x38)" ( (binary_expression "uVar2 < 0x38" identifier < number_literal) )) (compound_statement "{\n    uVar5 = 0x38 - uVar2;\n  }" { (expression_statement "uVar5 = 0x38 - uVar2;" (assignment_expression "uVar5 = 0x38 - uVar2" identifier = (binary_expression "0x38 - uVar2" number_literal - identifier)) ;) }) (else_clause "else {\n    uVar5 = 0x78 - uVar2;\n  }" else (compound_statement "{\n    uVar5 = 0x78 - uVar2;\n  }" { (expression_statement "uVar5 = 0x78 - uVar2;" (assignment_expression "uVar5 = 0x78 - uVar2" identifier = (binary_expression "0x78 - uVar2" number_literal - identifier)) ;) }))) (expression_statement "memcpy(ctx->buffer + uVar2,fillbuf,(ulong)uVar5);" (call_expression "memcpy(ctx->buffer + uVar2,fillbuf,(ulong)uVar5)" identifier (argument_list "(ctx->buffer + uVar2,fillbuf,(ulong)uVar5)" ( (binary_expression "ctx->buffer + uVar2" (field_expression "ctx->buffer" identifier -> field_identifier) + identifier) , identifier , (cast_expression "(ulong)uVar5" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "uVar3 = ctx->total[0];" (assignment_expression "uVar3 = ctx->total[0]" identifier = (subscript_expression "ctx->total[0]" (field_expression "ctx->total" identifier -> field_identifier) [ number_literal ])) ;) (expression_statement "lVar1 = (ulong)uVar5 + (ulong)uVar2;" (assignment_expression "lVar1 = (ulong)uVar5 + (ulong)uVar2" identifier = (binary_expression "(ulong)uVar5 + (ulong)uVar2" (cast_expression "(ulong)uVar5" ( (type_descriptor "ulong" type_identifier) ) identifier) + (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier))) ;) (expression_statement "*(uint *)(ctx->buffer + lVar1) = uVar3 * 8;" (assignment_expression "*(uint *)(ctx->buffer + lVar1) = uVar3 * 8" (pointer_expression "*(uint *)(ctx->buffer + lVar1)" * (cast_expression "(uint *)(ctx->buffer + lVar1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(ctx->buffer + lVar1)" ( (binary_expression "ctx->buffer + lVar1" (field_expression "ctx->buffer" identifier -> field_identifier) + identifier) )))) = (binary_expression "uVar3 * 8" identifier * number_literal)) ;) (expression_statement "*(md5_uint32 *)(ctx->buffer + lVar1 + 4) = ctx->total[1] << 3 | uVar3 >> 0x1d;" (assignment_expression "*(md5_uint32 *)(ctx->buffer + lVar1 + 4) = ctx->total[1] << 3 | uVar3 >> 0x1d" (pointer_expression "*(md5_uint32 *)(ctx->buffer + lVar1 + 4)" * (cast_expression "(md5_uint32 *)(ctx->buffer + lVar1 + 4)" ( (type_descriptor "md5_uint32 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(ctx->buffer + lVar1 + 4)" ( (binary_expression "ctx->buffer + lVar1 + 4" (binary_expression "ctx->buffer + lVar1" (field_expression "ctx->buffer" identifier -> field_identifier) + identifier) + number_literal) )))) = (binary_expression "ctx->total[1] << 3 | uVar3 >> 0x1d" (binary_expression "ctx->total[1] << 3" (subscript_expression "ctx->total[1]" (field_expression "ctx->total" identifier -> field_identifier) [ number_literal ]) << number_literal) | (binary_expression "uVar3 >> 0x1d" identifier >> number_literal))) ;) (expression_statement "md5_process_block(ctx->buffer,lVar1 + 8,ctx);" (call_expression "md5_process_block(ctx->buffer,lVar1 + 8,ctx)" identifier (argument_list "(ctx->buffer,lVar1 + 8,ctx)" ( (field_expression "ctx->buffer" identifier -> field_identifier) , (binary_expression "lVar1 + 8" identifier + number_literal) , identifier ))) ;) (expression_statement "pvVar4 = md5_read_ctx(ctx,resbuf);" (assignment_expression "pvVar4 = md5_read_ctx(ctx,resbuf)" identifier = (call_expression "md5_read_ctx(ctx,resbuf)" identifier (argument_list "(ctx,resbuf)" ( identifier , identifier )))) ;) (return_statement "return pvVar4;" return identifier ;) })))
(translation_unit "void FUN_0015a5a0(long param_1,undefined8 param_2)\n\n{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = *(uint *)(param_1 + 0x18);\n  uVar4 = *(uint *)(param_1 + 0x10);\n  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);\n  if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }\n  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);\n  uVar3 = *(uint *)(param_1 + 0x10);\n  lVar1 = (ulong)uVar4 + (ulong)uVar2;\n  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;\n  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;\n  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);\n  FUN_00159e10(param_1,param_2);\n  return;\n}\n\n" (function_definition "void FUN_0015a5a0(long param_1,undefined8 param_2)\n\n{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = *(uint *)(param_1 + 0x18);\n  uVar4 = *(uint *)(param_1 + 0x10);\n  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);\n  if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }\n  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);\n  uVar3 = *(uint *)(param_1 + 0x10);\n  lVar1 = (ulong)uVar4 + (ulong)uVar2;\n  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;\n  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;\n  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);\n  FUN_00159e10(param_1,param_2);\n  return;\n}" primitive_type (function_declarator "FUN_0015a5a0(long param_1,undefined8 param_2)" identifier (parameter_list "(long param_1,undefined8 param_2)" ( (parameter_declaration "long param_1" (sized_type_specifier "long" long) identifier) , (parameter_declaration "undefined8 param_2" type_identifier identifier) ))) (compound_statement "{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = *(uint *)(param_1 + 0x18);\n  uVar4 = *(uint *)(param_1 + 0x10);\n  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);\n  if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }\n  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);\n  uVar3 = *(uint *)(param_1 + 0x10);\n  lVar1 = (ulong)uVar4 + (ulong)uVar2;\n  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;\n  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;\n  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);\n  FUN_00159e10(param_1,param_2);\n  return;\n}" { (declaration "long lVar1;" (sized_type_specifier "long" long) identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (declaration "uint uVar3;" type_identifier identifier ;) (declaration "uint uVar4;" type_identifier identifier ;) (expression_statement "uVar2 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x18)" identifier = (pointer_expression "*(uint *)(param_1 + 0x18)" * (cast_expression "(uint *)(param_1 + 0x18)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x18)" ( (binary_expression "param_1 + 0x18" identifier + number_literal) ))))) ;) (expression_statement "uVar4 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0x10)" identifier = (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "*(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);" (assignment_expression "*(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10)" (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))) = (binary_expression "uVar2 + *(uint *)(param_1 + 0x10)" identifier + (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) )))))) ;) (if_statement "if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }" if (parenthesized_expression "(CARRY4(uVar2,uVar4))" ( (call_expression "CARRY4(uVar2,uVar4)" identifier (argument_list "(uVar2,uVar4)" ( identifier , identifier ))) )) (compound_statement "{\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }" { (expression_statement "*(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;" (assignment_expression "*(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) = (binary_expression "*(int *)(param_1 + 0x14) + 1" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) + number_literal)) ;) })) (if_statement "if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }" if (parenthesized_expression "(uVar2 < 0x38)" ( (binary_expression "uVar2 < 0x38" identifier < number_literal) )) (compound_statement "{\n    uVar4 = 0x38 - uVar2;\n  }" { (expression_statement "uVar4 = 0x38 - uVar2;" (assignment_expression "uVar4 = 0x38 - uVar2" identifier = (binary_expression "0x38 - uVar2" number_literal - identifier)) ;) }) (else_clause "else {\n    uVar4 = 0x78 - uVar2;\n  }" else (compound_statement "{\n    uVar4 = 0x78 - uVar2;\n  }" { (expression_statement "uVar4 = 0x78 - uVar2;" (assignment_expression "uVar4 = 0x78 - uVar2" identifier = (binary_expression "0x78 - uVar2" number_literal - identifier)) ;) }))) (expression_statement "memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);" (call_expression "memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4)" identifier (argument_list "((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4)" ( (cast_expression "(void *)(param_1 + 0x1c + (ulong)uVar2)" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c + (ulong)uVar2)" ( (binary_expression "param_1 + 0x1c + (ulong)uVar2" (binary_expression "param_1 + 0x1c" identifier + number_literal) + (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ))) , (pointer_expression "&DAT_0029fec0" & identifier) , (cast_expression "(ulong)uVar4" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "uVar3 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x10)" identifier = (pointer_expression "*(uint *)(param_1 + 0x10)" * (cast_expression "(uint *)(param_1 + 0x10)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x10)" ( (binary_expression "param_1 + 0x10" identifier + number_literal) ))))) ;) (expression_statement "lVar1 = (ulong)uVar4 + (ulong)uVar2;" (assignment_expression "lVar1 = (ulong)uVar4 + (ulong)uVar2" identifier = (binary_expression "(ulong)uVar4 + (ulong)uVar2" (cast_expression "(ulong)uVar4" ( (type_descriptor "ulong" type_identifier) ) identifier) + (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier))) ;) (expression_statement "*(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;" (assignment_expression "*(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8" (pointer_expression "*(uint *)(param_1 + 0x1c + lVar1)" * (cast_expression "(uint *)(param_1 + 0x1c + lVar1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x1c + lVar1)" ( (binary_expression "param_1 + 0x1c + lVar1" (binary_expression "param_1 + 0x1c" identifier + number_literal) + identifier) )))) = (binary_expression "uVar3 * 8" identifier * number_literal)) ;) (expression_statement "*(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;" (assignment_expression "*(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d" (pointer_expression "*(uint *)(param_1 + 0x20 + lVar1)" * (cast_expression "(uint *)(param_1 + 0x20 + lVar1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x20 + lVar1)" ( (binary_expression "param_1 + 0x20 + lVar1" (binary_expression "param_1 + 0x20" identifier + number_literal) + identifier) )))) = (binary_expression "*(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d" (binary_expression "*(int *)(param_1 + 0x14) << 3" (pointer_expression "*(int *)(param_1 + 0x14)" * (cast_expression "(int *)(param_1 + 0x14)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_1 + 0x14)" ( (binary_expression "param_1 + 0x14" identifier + number_literal) )))) << number_literal) | (binary_expression "uVar3 >> 0x1d" identifier >> number_literal))) ;) (expression_statement "FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);" (call_expression "FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1)" identifier (argument_list "(param_1 + 0x1c,lVar1 + 8,param_1)" ( (binary_expression "param_1 + 0x1c" identifier + number_literal) , (binary_expression "lVar1 + 8" identifier + number_literal) , identifier ))) ;) (expression_statement "FUN_00159e10(param_1,param_2);" (call_expression "FUN_00159e10(param_1,param_2)" identifier (argument_list "(param_1,param_2)" ( identifier , identifier ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression IDENT + (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))))) ;) (if_statement if (parenthesized_expression ( (call_expression IDENT (argument_list ( IDENT , IDENT ))) )) (compound_statement { (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) = (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) + LIT)) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT < LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression LIT - IDENT)) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (binary_expression LIT - IDENT)) ;) }))) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) , (pointer_expression & IDENT) , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) + (cast_expression ( (type_descriptor TYPE) ) IDENT))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = (binary_expression IDENT * LIT)) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (binary_expression IDENT + LIT) + IDENT) )))) = (binary_expression (binary_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) << LIT) | (binary_expression IDENT >> LIT))) ;) (expression_statement (call_expression IDENT (argument_list ( (binary_expression IDENT + LIT) , (binary_expression IDENT + LIT) , IDENT ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , IDENT ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0015a5a0(long param_1,undefined8 param_2)\n\n{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = *(uint *)(param_1 + 0x18);\n  uVar4 = *(uint *)(param_1 + 0x10);\n  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);\n  if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }\n  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);\n  uVar3 = *(uint *)(param_1 + 0x10);\n  lVar1 = (ulong)uVar4 + (ulong)uVar2;\n  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;\n  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;\n  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);\n  FUN_00159e10(param_1,param_2);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0015a5a0(long param_1,undefined8 param_2)" (identifier "FUN_0015a5a0") (parameter_list "(long param_1,undefined8 param_2)" (( "(") (parameter_declaration "long param_1" (sized_type_specifier "long" (long "long")) (identifier "param_1")) (, ",") (parameter_declaration "undefined8 param_2" (type_identifier "undefined8") (identifier "param_2")) () ")"))) (compound_statement "{\n  long lVar1;\n  uint uVar2;\n  uint uVar3;\n  uint uVar4;\n  \n  uVar2 = *(uint *)(param_1 + 0x18);\n  uVar4 = *(uint *)(param_1 + 0x10);\n  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);\n  if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }\n  if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }\n  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);\n  uVar3 = *(uint *)(param_1 + 0x10);\n  lVar1 = (ulong)uVar4 + (ulong)uVar2;\n  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;\n  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;\n  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);\n  FUN_00159e10(param_1,param_2);\n  return;\n}" ({ "{") (declaration "long lVar1;" (sized_type_specifier "long" (long "long")) (identifier "lVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (declaration "uint uVar3;" (type_identifier "uint") (identifier "uVar3") (; ";")) (declaration "uint uVar4;" (type_identifier "uint") (identifier "uVar4") (; ";")) (expression_statement "uVar2 = *(uint *)(param_1 + 0x18);" (assignment_expression "uVar2 = *(uint *)(param_1 + 0x18)" (identifier "uVar2") (= "=") (pointer_expression "*(uint *)(param_1 + 0x18)" (* "*") (cast_expression "(uint *)(param_1 + 0x18)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x18)" (( "(") (binary_expression "param_1 + 0x18" (identifier "param_1") (+ "+") (number_literal "0x18")) () ")"))))) (; ";")) (expression_statement "uVar4 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar4 = *(uint *)(param_1 + 0x10)" (identifier "uVar4") (= "=") (pointer_expression "*(uint *)(param_1 + 0x10)" (* "*") (cast_expression "(uint *)(param_1 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);" (assignment_expression "*(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10)" (pointer_expression "*(uint *)(param_1 + 0x10)" (* "*") (cast_expression "(uint *)(param_1 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))) (= "=") (binary_expression "uVar2 + *(uint *)(param_1 + 0x10)" (identifier "uVar2") (+ "+") (pointer_expression "*(uint *)(param_1 + 0x10)" (* "*") (cast_expression "(uint *)(param_1 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")")))))) (; ";")) (if_statement "if (CARRY4(uVar2,uVar4)) {\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }" (if "if") (parenthesized_expression "(CARRY4(uVar2,uVar4))" (( "(") (call_expression "CARRY4(uVar2,uVar4)" (identifier "CARRY4") (argument_list "(uVar2,uVar4)" (( "(") (identifier "uVar2") (, ",") (identifier "uVar4") () ")"))) () ")")) (compound_statement "{\n    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;\n  }" ({ "{") (expression_statement "*(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;" (assignment_expression "*(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x14) + 1" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (+ "+") (number_literal "1"))) (; ";")) (} "}"))) (if_statement "if (uVar2 < 0x38) {\n    uVar4 = 0x38 - uVar2;\n  }\n  else {\n    uVar4 = 0x78 - uVar2;\n  }" (if "if") (parenthesized_expression "(uVar2 < 0x38)" (( "(") (binary_expression "uVar2 < 0x38" (identifier "uVar2") (< "<") (number_literal "0x38")) () ")")) (compound_statement "{\n    uVar4 = 0x38 - uVar2;\n  }" ({ "{") (expression_statement "uVar4 = 0x38 - uVar2;" (assignment_expression "uVar4 = 0x38 - uVar2" (identifier "uVar4") (= "=") (binary_expression "0x38 - uVar2" (number_literal "0x38") (- "-") (identifier "uVar2"))) (; ";")) (} "}")) (else_clause "else {\n    uVar4 = 0x78 - uVar2;\n  }" (else "else") (compound_statement "{\n    uVar4 = 0x78 - uVar2;\n  }" ({ "{") (expression_statement "uVar4 = 0x78 - uVar2;" (assignment_expression "uVar4 = 0x78 - uVar2" (identifier "uVar4") (= "=") (binary_expression "0x78 - uVar2" (number_literal "0x78") (- "-") (identifier "uVar2"))) (; ";")) (} "}")))) (expression_statement "memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);" (call_expression "memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4)" (identifier "memcpy") (argument_list "((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4)" (( "(") (cast_expression "(void *)(param_1 + 0x1c + (ulong)uVar2)" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c + (ulong)uVar2)" (( "(") (binary_expression "param_1 + 0x1c + (ulong)uVar2" (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) (+ "+") (cast_expression "(ulong)uVar2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar2"))) () ")"))) (, ",") (pointer_expression "&DAT_0029fec0" (& "&") (identifier "DAT_0029fec0")) (, ",") (cast_expression "(ulong)uVar4" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar4")) () ")"))) (; ";")) (expression_statement "uVar3 = *(uint *)(param_1 + 0x10);" (assignment_expression "uVar3 = *(uint *)(param_1 + 0x10)" (identifier "uVar3") (= "=") (pointer_expression "*(uint *)(param_1 + 0x10)" (* "*") (cast_expression "(uint *)(param_1 + 0x10)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x10)" (( "(") (binary_expression "param_1 + 0x10" (identifier "param_1") (+ "+") (number_literal "0x10")) () ")"))))) (; ";")) (expression_statement "lVar1 = (ulong)uVar4 + (ulong)uVar2;" (assignment_expression "lVar1 = (ulong)uVar4 + (ulong)uVar2" (identifier "lVar1") (= "=") (binary_expression "(ulong)uVar4 + (ulong)uVar2" (cast_expression "(ulong)uVar4" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar4")) (+ "+") (cast_expression "(ulong)uVar2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar2")))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;" (assignment_expression "*(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8" (pointer_expression "*(uint *)(param_1 + 0x1c + lVar1)" (* "*") (cast_expression "(uint *)(param_1 + 0x1c + lVar1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x1c + lVar1)" (( "(") (binary_expression "param_1 + 0x1c + lVar1" (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) (+ "+") (identifier "lVar1")) () ")")))) (= "=") (binary_expression "uVar3 * 8" (identifier "uVar3") (* "*") (number_literal "8"))) (; ";")) (expression_statement "*(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;" (assignment_expression "*(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d" (pointer_expression "*(uint *)(param_1 + 0x20 + lVar1)" (* "*") (cast_expression "(uint *)(param_1 + 0x20 + lVar1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x20 + lVar1)" (( "(") (binary_expression "param_1 + 0x20 + lVar1" (binary_expression "param_1 + 0x20" (identifier "param_1") (+ "+") (number_literal "0x20")) (+ "+") (identifier "lVar1")) () ")")))) (= "=") (binary_expression "*(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d" (binary_expression "*(int *)(param_1 + 0x14) << 3" (pointer_expression "*(int *)(param_1 + 0x14)" (* "*") (cast_expression "(int *)(param_1 + 0x14)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_1 + 0x14)" (( "(") (binary_expression "param_1 + 0x14" (identifier "param_1") (+ "+") (number_literal "0x14")) () ")")))) (<< "<<") (number_literal "3")) (| "|") (binary_expression "uVar3 >> 0x1d" (identifier "uVar3") (>> ">>") (number_literal "0x1d")))) (; ";")) (expression_statement "FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);" (call_expression "FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1)" (identifier "FUN_00159e30") (argument_list "(param_1 + 0x1c,lVar1 + 8,param_1)" (( "(") (binary_expression "param_1 + 0x1c" (identifier "param_1") (+ "+") (number_literal "0x1c")) (, ",") (binary_expression "lVar1 + 8" (identifier "lVar1") (+ "+") (number_literal "8")) (, ",") (identifier "param_1") () ")"))) (; ";")) (expression_statement "FUN_00159e10(param_1,param_2);" (call_expression "FUN_00159e10(param_1,param_2)" (identifier "FUN_00159e10") (argument_list "(param_1,param_2)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void * function_1(type_1 *ctx,void *resbuf)

{
  long var_4;
  type_2 var_1;
  type_2 var_5;
  void *pvVar4;
  type_2 uVar5;
  
  var_1 = ctx->buflen;
  uVar5 = ctx->total[0];
  ctx->total[0] = var_1 + ctx->total[0];
  if (var_2(var_1,uVar5)) {
    ctx->total[1] = ctx->total[1] + 1;
  }
  if (var_1 < 0x38) {
    uVar5 = 0x38 - var_1;
  }
  else {
    uVar5 = 0x78 - var_1;
  }
  var_3(ctx->buffer + var_1,fillbuf,(type_3)uVar5);
  var_5 = ctx->total[0];
  var_4 = (type_3)uVar5 + (type_3)var_1;
  *(type_2 *)(ctx->buffer + var_4) = var_5 * 8;
  *(type_4 *)(ctx->buffer + var_4 + 4) = ctx->total[1] << 3 | var_5 >> 0x1d;
  var_6(ctx->buffer,var_4 + 8,ctx);
  pvVar4 = var_7(ctx,resbuf);
  return pvVar4;
}


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

void MASKED(long param_1,undefined8 param_2)

{
  long lVar1;
  uint uVar2;
  uint uVar3;
  uint uVar4;
  
  uVar2 = *(uint *)(param_1 + 0x18);
  uVar4 = *(uint *)(param_1 + 0x10);
  *(uint *)(param_1 + 0x10) = uVar2 + *(uint *)(param_1 + 0x10);
  if (CARRY4(uVar2,uVar4)) {
    *(int *)(param_1 + 0x14) = *(int *)(param_1 + 0x14) + 1;
  }
  if (uVar2 < 0x38) {
    uVar4 = 0x38 - uVar2;
  }
  else {
    uVar4 = 0x78 - uVar2;
  }
  memcpy((void *)(param_1 + 0x1c + (ulong)uVar2),&DAT_0029fec0,(ulong)uVar4);
  uVar3 = *(uint *)(param_1 + 0x10);
  lVar1 = (ulong)uVar4 + (ulong)uVar2;
  *(uint *)(param_1 + 0x1c + lVar1) = uVar3 * 8;
  *(uint *)(param_1 + 0x20 + lVar1) = *(int *)(param_1 + 0x14) << 3 | uVar3 >> 0x1d;
  FUN_00159e30(param_1 + 0x1c,lVar1 + 8,param_1);
  FUN_00159e10(param_1,param_2);
  return;
}

