
void allocate(uint8_t *bitmap,uint32_t blocksize,uint32_t start,uint32_t end)

{
  uint uVar1;
  
  memset(bitmap,0,(ulong)blocksize);
  memset(bitmap,0xff,(ulong)(start >> 3));
  bitmap[start >> 3] = (char)(1 << ((byte)start & 7)) + 0xff;
  uVar1 = end >> 3;
  bitmap[~uVar1 + blocksize] = bitmap[~uVar1 + blocksize] | (byte)(0x7f00 >> ((byte)end & 7));
  memset(bitmap + ((ulong)blocksize - (ulong)uVar1),0xff,(ulong)uVar1);
  return;
}



void FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)

{
  byte *pbVar1;
  uint uVar2;
  
  memset(param_1,0,(ulong)param_2);
  memset(param_1,0xff,(ulong)(param_3 >> 3));
  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;
  uVar2 = param_4 >> 3;
  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));
  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));
  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);
  return;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x8
MOV RBX,RDI
MOV R13D,ESI
MOV R15D,EDX
MOV R12D,ECX
MOV EBP,ESI
MOV RDX,RBP
MOV ESI,0x0
CALL 0x0010b710
MOV R14D,R15D
SHR R14D,0x3
MOV R14D,R14D
MOV RDX,R14
MOV ESI,0xff
MOV RDI,RBX
CALL 0x0010b710
MOV ECX,R15D
AND ECX,0x7
MOV EAX,0x1
SHL EAX,CL
SUB EAX,0x1
MOV byte ptr [RBX + R14*0x1],AL
MOV EDX,R12D
SHR EDX,0x3
MOV EAX,EDX
NOT EAX
LEA ESI,[RAX + R13*0x1]
MOV ECX,R12D
AND ECX,0x7
MOV EAX,0x7f00
SAR EAX,CL
OR byte ptr [RBX + RSI*0x1],AL
MOV EDX,EDX
SUB RBP,RDX
LEA RDI,[RBX + RBP*0x1]
MOV ESI,0xff
CALL 0x0010b710
ADD RSP,0x8
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
(translation_unit "void FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  byte *pbVar1;\n  uint uVar2;\n  \n  memset(param_1,0,(ulong)param_2);\n  memset(param_1,0xff,(ulong)(param_3 >> 3));\n  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;\n  uVar2 = param_4 >> 3;\n  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));\n  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));\n  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);\n  return;\n}\n\n" (function_definition "void FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  byte *pbVar1;\n  uint uVar2;\n  \n  memset(param_1,0,(ulong)param_2);\n  memset(param_1,0xff,(ulong)(param_3 >> 3));\n  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;\n  uVar2 = param_4 >> 3;\n  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));\n  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));\n  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);\n  return;\n}" primitive_type (function_declarator "FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)" identifier (parameter_list "(void *param_1,uint param_2,uint param_3,uint param_4)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  uint uVar2;\n  \n  memset(param_1,0,(ulong)param_2);\n  memset(param_1,0xff,(ulong)(param_3 >> 3));\n  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;\n  uVar2 = param_4 >> 3;\n  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));\n  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));\n  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);\n  return;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "memset(param_1,0,(ulong)param_2);" (call_expression "memset(param_1,0,(ulong)param_2)" identifier (argument_list "(param_1,0,(ulong)param_2)" ( identifier , number_literal , (cast_expression "(ulong)param_2" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "memset(param_1,0xff,(ulong)(param_3 >> 3));" (call_expression "memset(param_1,0xff,(ulong)(param_3 >> 3))" identifier (argument_list "(param_1,0xff,(ulong)(param_3 >> 3))" ( identifier , number_literal , (call_expression "(ulong)(param_3 >> 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_3 >> 3)" ( (binary_expression "param_3 >> 3" identifier >> number_literal) ))) ))) ;) (expression_statement "*(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;" (assignment_expression "*(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1" (pointer_expression "*(char *)((long)param_1 + (ulong)(param_3 >> 3))" * (cast_expression "(char *)((long)param_1 + (ulong)(param_3 >> 3))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + (ulong)(param_3 >> 3))" ( (binary_expression "(long)param_1 + (ulong)(param_3 >> 3)" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (call_expression "(ulong)(param_3 >> 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_3 >> 3)" ( (binary_expression "param_3 >> 3" identifier >> number_literal) )))) )))) = (binary_expression "(char)(1 << ((byte)param_3 & 7)) + -1" (cast_expression "(char)(1 << ((byte)param_3 & 7))" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(1 << ((byte)param_3 & 7))" ( (binary_expression "1 << ((byte)param_3 & 7)" number_literal << (parenthesized_expression "((byte)param_3 & 7)" ( (binary_expression "(byte)param_3 & 7" (cast_expression "(byte)param_3" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) ))) + number_literal)) ;) (expression_statement "uVar2 = param_4 >> 3;" (assignment_expression "uVar2 = param_4 >> 3" identifier = (binary_expression "param_4 >> 3" identifier >> number_literal)) ;) (expression_statement "pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));" (assignment_expression "pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2))" identifier = (cast_expression "(byte *)((long)param_1 + (ulong)(~uVar2 + param_2))" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + (ulong)(~uVar2 + param_2))" ( (binary_expression "(long)param_1 + (ulong)(~uVar2 + param_2)" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (call_expression "(ulong)(~uVar2 + param_2)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(~uVar2 + param_2)" ( (binary_expression "~uVar2 + param_2" (unary_expression "~uVar2" ~ identifier) + identifier) )))) )))) ;) (expression_statement "*pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));" (assignment_expression "*pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7))" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7))" (pointer_expression "*pbVar1" * identifier) | (call_expression "(byte)(0x7f00 >> ((byte)param_4 & 7))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0x7f00 >> ((byte)param_4 & 7))" ( (binary_expression "0x7f00 >> ((byte)param_4 & 7)" number_literal >> (parenthesized_expression "((byte)param_4 & 7)" ( (binary_expression "(byte)param_4 & 7" (cast_expression "(byte)param_4" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) ))))) ;) (expression_statement "memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);" (call_expression "memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2)" identifier (argument_list "((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2)" ( (cast_expression "(void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + ((ulong)param_2 - (ulong)uVar2))" ( (binary_expression "(long)param_1 + ((ulong)param_2 - (ulong)uVar2)" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (parenthesized_expression "((ulong)param_2 - (ulong)uVar2)" ( (binary_expression "(ulong)param_2 - (ulong)uVar2" (cast_expression "(ulong)param_2" ( (type_descriptor "ulong" type_identifier) ) identifier) - (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ))) ))) , number_literal , (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void allocate(uint8_t *bitmap,uint32_t blocksize,uint32_t start,uint32_t end)\n\n{\n  uint uVar1;\n  \n  memset(bitmap,0,(ulong)blocksize);\n  memset(bitmap,0xff,(ulong)(start >> 3));\n  bitmap[start >> 3] = (char)(1 << ((byte)start & 7)) + 0xff;\n  uVar1 = end >> 3;\n  bitmap[~uVar1 + blocksize] = bitmap[~uVar1 + blocksize] | (byte)(0x7f00 >> ((byte)end & 7));\n  memset(bitmap + ((ulong)blocksize - (ulong)uVar1),0xff,(ulong)uVar1);\n  return;\n}\n\n" (function_definition "void allocate(uint8_t *bitmap,uint32_t blocksize,uint32_t start,uint32_t end)\n\n{\n  uint uVar1;\n  \n  memset(bitmap,0,(ulong)blocksize);\n  memset(bitmap,0xff,(ulong)(start >> 3));\n  bitmap[start >> 3] = (char)(1 << ((byte)start & 7)) + 0xff;\n  uVar1 = end >> 3;\n  bitmap[~uVar1 + blocksize] = bitmap[~uVar1 + blocksize] | (byte)(0x7f00 >> ((byte)end & 7));\n  memset(bitmap + ((ulong)blocksize - (ulong)uVar1),0xff,(ulong)uVar1);\n  return;\n}" primitive_type (function_declarator "allocate(uint8_t *bitmap,uint32_t blocksize,uint32_t start,uint32_t end)" identifier (parameter_list "(uint8_t *bitmap,uint32_t blocksize,uint32_t start,uint32_t end)" ( (parameter_declaration "uint8_t *bitmap" primitive_type (pointer_declarator "*bitmap" * identifier)) , (parameter_declaration "uint32_t blocksize" primitive_type identifier) , (parameter_declaration "uint32_t start" primitive_type identifier) , (parameter_declaration "uint32_t end" primitive_type identifier) ))) (compound_statement "{\n  uint uVar1;\n  \n  memset(bitmap,0,(ulong)blocksize);\n  memset(bitmap,0xff,(ulong)(start >> 3));\n  bitmap[start >> 3] = (char)(1 << ((byte)start & 7)) + 0xff;\n  uVar1 = end >> 3;\n  bitmap[~uVar1 + blocksize] = bitmap[~uVar1 + blocksize] | (byte)(0x7f00 >> ((byte)end & 7));\n  memset(bitmap + ((ulong)blocksize - (ulong)uVar1),0xff,(ulong)uVar1);\n  return;\n}" { (declaration "uint uVar1;" type_identifier identifier ;) (expression_statement "memset(bitmap,0,(ulong)blocksize);" (call_expression "memset(bitmap,0,(ulong)blocksize)" identifier (argument_list "(bitmap,0,(ulong)blocksize)" ( identifier , number_literal , (cast_expression "(ulong)blocksize" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "memset(bitmap,0xff,(ulong)(start >> 3));" (call_expression "memset(bitmap,0xff,(ulong)(start >> 3))" identifier (argument_list "(bitmap,0xff,(ulong)(start >> 3))" ( identifier , number_literal , (call_expression "(ulong)(start >> 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(start >> 3)" ( (binary_expression "start >> 3" identifier >> number_literal) ))) ))) ;) (expression_statement "bitmap[start >> 3] = (char)(1 << ((byte)start & 7)) + 0xff;" (assignment_expression "bitmap[start >> 3] = (char)(1 << ((byte)start & 7)) + 0xff" (subscript_expression "bitmap[start >> 3]" identifier [ (binary_expression "start >> 3" identifier >> number_literal) ]) = (binary_expression "(char)(1 << ((byte)start & 7)) + 0xff" (cast_expression "(char)(1 << ((byte)start & 7))" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(1 << ((byte)start & 7))" ( (binary_expression "1 << ((byte)start & 7)" number_literal << (parenthesized_expression "((byte)start & 7)" ( (binary_expression "(byte)start & 7" (cast_expression "(byte)start" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) ))) + number_literal)) ;) (expression_statement "uVar1 = end >> 3;" (assignment_expression "uVar1 = end >> 3" identifier = (binary_expression "end >> 3" identifier >> number_literal)) ;) (expression_statement "bitmap[~uVar1 + blocksize] = bitmap[~uVar1 + blocksize] | (byte)(0x7f00 >> ((byte)end & 7));" (assignment_expression "bitmap[~uVar1 + blocksize] = bitmap[~uVar1 + blocksize] | (byte)(0x7f00 >> ((byte)end & 7))" (subscript_expression "bitmap[~uVar1 + blocksize]" identifier [ (binary_expression "~uVar1 + blocksize" (unary_expression "~uVar1" ~ identifier) + identifier) ]) = (binary_expression "bitmap[~uVar1 + blocksize] | (byte)(0x7f00 >> ((byte)end & 7))" (subscript_expression "bitmap[~uVar1 + blocksize]" identifier [ (binary_expression "~uVar1 + blocksize" (unary_expression "~uVar1" ~ identifier) + identifier) ]) | (call_expression "(byte)(0x7f00 >> ((byte)end & 7))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0x7f00 >> ((byte)end & 7))" ( (binary_expression "0x7f00 >> ((byte)end & 7)" number_literal >> (parenthesized_expression "((byte)end & 7)" ( (binary_expression "(byte)end & 7" (cast_expression "(byte)end" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) ))))) ;) (expression_statement "memset(bitmap + ((ulong)blocksize - (ulong)uVar1),0xff,(ulong)uVar1);" (call_expression "memset(bitmap + ((ulong)blocksize - (ulong)uVar1),0xff,(ulong)uVar1)" identifier (argument_list "(bitmap + ((ulong)blocksize - (ulong)uVar1),0xff,(ulong)uVar1)" ( (binary_expression "bitmap + ((ulong)blocksize - (ulong)uVar1)" identifier + (parenthesized_expression "((ulong)blocksize - (ulong)uVar1)" ( (binary_expression "(ulong)blocksize - (ulong)uVar1" (cast_expression "(ulong)blocksize" ( (type_descriptor "ulong" type_identifier) ) identifier) - (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier)) ))) , number_literal , (cast_expression "(ulong)uVar1" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit "void FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  byte *pbVar1;\n  uint uVar2;\n  \n  memset(param_1,0,(ulong)param_2);\n  memset(param_1,0xff,(ulong)(param_3 >> 3));\n  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;\n  uVar2 = param_4 >> 3;\n  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));\n  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));\n  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);\n  return;\n}\n\n" (function_definition "void FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  byte *pbVar1;\n  uint uVar2;\n  \n  memset(param_1,0,(ulong)param_2);\n  memset(param_1,0xff,(ulong)(param_3 >> 3));\n  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;\n  uVar2 = param_4 >> 3;\n  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));\n  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));\n  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);\n  return;\n}" primitive_type (function_declarator "FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)" identifier (parameter_list "(void *param_1,uint param_2,uint param_3,uint param_4)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "uint param_2" type_identifier identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "uint param_4" type_identifier identifier) ))) (compound_statement "{\n  byte *pbVar1;\n  uint uVar2;\n  \n  memset(param_1,0,(ulong)param_2);\n  memset(param_1,0xff,(ulong)(param_3 >> 3));\n  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;\n  uVar2 = param_4 >> 3;\n  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));\n  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));\n  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);\n  return;\n}" { (declaration "byte *pbVar1;" type_identifier (pointer_declarator "*pbVar1" * identifier) ;) (declaration "uint uVar2;" type_identifier identifier ;) (expression_statement "memset(param_1,0,(ulong)param_2);" (call_expression "memset(param_1,0,(ulong)param_2)" identifier (argument_list "(param_1,0,(ulong)param_2)" ( identifier , number_literal , (cast_expression "(ulong)param_2" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (expression_statement "memset(param_1,0xff,(ulong)(param_3 >> 3));" (call_expression "memset(param_1,0xff,(ulong)(param_3 >> 3))" identifier (argument_list "(param_1,0xff,(ulong)(param_3 >> 3))" ( identifier , number_literal , (call_expression "(ulong)(param_3 >> 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_3 >> 3)" ( (binary_expression "param_3 >> 3" identifier >> number_literal) ))) ))) ;) (expression_statement "*(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;" (assignment_expression "*(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1" (pointer_expression "*(char *)((long)param_1 + (ulong)(param_3 >> 3))" * (cast_expression "(char *)((long)param_1 + (ulong)(param_3 >> 3))" ( (type_descriptor "char *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + (ulong)(param_3 >> 3))" ( (binary_expression "(long)param_1 + (ulong)(param_3 >> 3)" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (call_expression "(ulong)(param_3 >> 3)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(param_3 >> 3)" ( (binary_expression "param_3 >> 3" identifier >> number_literal) )))) )))) = (binary_expression "(char)(1 << ((byte)param_3 & 7)) + -1" (cast_expression "(char)(1 << ((byte)param_3 & 7))" ( (type_descriptor "char" primitive_type) ) (parenthesized_expression "(1 << ((byte)param_3 & 7))" ( (binary_expression "1 << ((byte)param_3 & 7)" number_literal << (parenthesized_expression "((byte)param_3 & 7)" ( (binary_expression "(byte)param_3 & 7" (cast_expression "(byte)param_3" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) ))) + number_literal)) ;) (expression_statement "uVar2 = param_4 >> 3;" (assignment_expression "uVar2 = param_4 >> 3" identifier = (binary_expression "param_4 >> 3" identifier >> number_literal)) ;) (expression_statement "pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));" (assignment_expression "pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2))" identifier = (cast_expression "(byte *)((long)param_1 + (ulong)(~uVar2 + param_2))" ( (type_descriptor "byte *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + (ulong)(~uVar2 + param_2))" ( (binary_expression "(long)param_1 + (ulong)(~uVar2 + param_2)" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (call_expression "(ulong)(~uVar2 + param_2)" (parenthesized_expression "(ulong)" ( identifier )) (argument_list "(~uVar2 + param_2)" ( (binary_expression "~uVar2 + param_2" (unary_expression "~uVar2" ~ identifier) + identifier) )))) )))) ;) (expression_statement "*pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));" (assignment_expression "*pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7))" (pointer_expression "*pbVar1" * identifier) = (binary_expression "*pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7))" (pointer_expression "*pbVar1" * identifier) | (call_expression "(byte)(0x7f00 >> ((byte)param_4 & 7))" (parenthesized_expression "(byte)" ( identifier )) (argument_list "(0x7f00 >> ((byte)param_4 & 7))" ( (binary_expression "0x7f00 >> ((byte)param_4 & 7)" number_literal >> (parenthesized_expression "((byte)param_4 & 7)" ( (binary_expression "(byte)param_4 & 7" (cast_expression "(byte)param_4" ( (type_descriptor "byte" type_identifier) ) identifier) & number_literal) ))) ))))) ;) (expression_statement "memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);" (call_expression "memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2)" identifier (argument_list "((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2)" ( (cast_expression "(void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2))" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)param_1 + ((ulong)param_2 - (ulong)uVar2))" ( (binary_expression "(long)param_1 + ((ulong)param_2 - (ulong)uVar2)" (cast_expression "(long)param_1" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + (parenthesized_expression "((ulong)param_2 - (ulong)uVar2)" ( (binary_expression "(ulong)param_2 - (ulong)uVar2" (cast_expression "(ulong)param_2" ( (type_descriptor "ulong" type_identifier) ) identifier) - (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier)) ))) ))) , number_literal , (cast_expression "(ulong)uVar2" ( (type_descriptor "ulong" type_identifier) ) identifier) ))) ;) (return_statement "return;" return ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE IDENT) ))) (compound_statement { (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) (expression_statement (call_expression IDENT (argument_list ( IDENT , LIT , (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) ))) ))) ;) (expression_statement (assignment_expression (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression IDENT >> LIT) )))) )))) = (binary_expression (cast_expression ( (type_descriptor TYPE) ) (parenthesized_expression ( (binary_expression LIT << (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) ))) ))) + LIT)) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT >> LIT)) ;) (expression_statement (assignment_expression IDENT = (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression (unary_expression ~ IDENT) + IDENT) )))) )))) ;) (expression_statement (assignment_expression (pointer_expression * IDENT) = (binary_expression (pointer_expression * IDENT) | (call_expression (parenthesized_expression ( IDENT )) (argument_list ( (binary_expression LIT >> (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) & LIT) ))) ))))) ;) (expression_statement (call_expression IDENT (argument_list ( (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) IDENT) + (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) - (cast_expression ( (type_descriptor TYPE) ) IDENT)) ))) ))) , LIT , (cast_expression ( (type_descriptor TYPE) ) IDENT) ))) ;) (return_statement return ;) })))
(function_definition "void FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)\n\n{\n  byte *pbVar1;\n  uint uVar2;\n  \n  memset(param_1,0,(ulong)param_2);\n  memset(param_1,0xff,(ulong)(param_3 >> 3));\n  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;\n  uVar2 = param_4 >> 3;\n  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));\n  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));\n  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);\n  return;\n}" (primitive_type "void") (function_declarator "FUN_0015b2ca(void *param_1,uint param_2,uint param_3,uint param_4)" (identifier "FUN_0015b2ca") (parameter_list "(void *param_1,uint param_2,uint param_3,uint param_4)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "uint param_2" (type_identifier "uint") (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "uint param_4" (type_identifier "uint") (identifier "param_4")) () ")"))) (compound_statement "{\n  byte *pbVar1;\n  uint uVar2;\n  \n  memset(param_1,0,(ulong)param_2);\n  memset(param_1,0xff,(ulong)(param_3 >> 3));\n  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;\n  uVar2 = param_4 >> 3;\n  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));\n  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));\n  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);\n  return;\n}" ({ "{") (declaration "byte *pbVar1;" (type_identifier "byte") (pointer_declarator "*pbVar1" (* "*") (identifier "pbVar1")) (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (expression_statement "memset(param_1,0,(ulong)param_2);" (call_expression "memset(param_1,0,(ulong)param_2)" (identifier "memset") (argument_list "(param_1,0,(ulong)param_2)" (( "(") (identifier "param_1") (, ",") (number_literal "0") (, ",") (cast_expression "(ulong)param_2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "param_2")) () ")"))) (; ";")) (expression_statement "memset(param_1,0xff,(ulong)(param_3 >> 3));" (call_expression "memset(param_1,0xff,(ulong)(param_3 >> 3))" (identifier "memset") (argument_list "(param_1,0xff,(ulong)(param_3 >> 3))" (( "(") (identifier "param_1") (, ",") (number_literal "0xff") (, ",") (call_expression "(ulong)(param_3 >> 3)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(param_3 >> 3)" (( "(") (binary_expression "param_3 >> 3" (identifier "param_3") (>> ">>") (number_literal "3")) () ")"))) () ")"))) (; ";")) (expression_statement "*(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;" (assignment_expression "*(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1" (pointer_expression "*(char *)((long)param_1 + (ulong)(param_3 >> 3))" (* "*") (cast_expression "(char *)((long)param_1 + (ulong)(param_3 >> 3))" (( "(") (type_descriptor "char *" (primitive_type "char") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + (ulong)(param_3 >> 3))" (( "(") (binary_expression "(long)param_1 + (ulong)(param_3 >> 3)" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (call_expression "(ulong)(param_3 >> 3)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(param_3 >> 3)" (( "(") (binary_expression "param_3 >> 3" (identifier "param_3") (>> ">>") (number_literal "3")) () ")")))) () ")")))) (= "=") (binary_expression "(char)(1 << ((byte)param_3 & 7)) + -1" (cast_expression "(char)(1 << ((byte)param_3 & 7))" (( "(") (type_descriptor "char" (primitive_type "char")) () ")") (parenthesized_expression "(1 << ((byte)param_3 & 7))" (( "(") (binary_expression "1 << ((byte)param_3 & 7)" (number_literal "1") (<< "<<") (parenthesized_expression "((byte)param_3 & 7)" (( "(") (binary_expression "(byte)param_3 & 7" (cast_expression "(byte)param_3" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_3")) (& "&") (number_literal "7")) () ")"))) () ")"))) (+ "+") (number_literal "-1"))) (; ";")) (expression_statement "uVar2 = param_4 >> 3;" (assignment_expression "uVar2 = param_4 >> 3" (identifier "uVar2") (= "=") (binary_expression "param_4 >> 3" (identifier "param_4") (>> ">>") (number_literal "3"))) (; ";")) (expression_statement "pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));" (assignment_expression "pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2))" (identifier "pbVar1") (= "=") (cast_expression "(byte *)((long)param_1 + (ulong)(~uVar2 + param_2))" (( "(") (type_descriptor "byte *" (type_identifier "byte") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + (ulong)(~uVar2 + param_2))" (( "(") (binary_expression "(long)param_1 + (ulong)(~uVar2 + param_2)" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (call_expression "(ulong)(~uVar2 + param_2)" (parenthesized_expression "(ulong)" (( "(") (identifier "ulong") () ")")) (argument_list "(~uVar2 + param_2)" (( "(") (binary_expression "~uVar2 + param_2" (unary_expression "~uVar2" (~ "~") (identifier "uVar2")) (+ "+") (identifier "param_2")) () ")")))) () ")")))) (; ";")) (expression_statement "*pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));" (assignment_expression "*pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7))" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (= "=") (binary_expression "*pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7))" (pointer_expression "*pbVar1" (* "*") (identifier "pbVar1")) (| "|") (call_expression "(byte)(0x7f00 >> ((byte)param_4 & 7))" (parenthesized_expression "(byte)" (( "(") (identifier "byte") () ")")) (argument_list "(0x7f00 >> ((byte)param_4 & 7))" (( "(") (binary_expression "0x7f00 >> ((byte)param_4 & 7)" (number_literal "0x7f00") (>> ">>") (parenthesized_expression "((byte)param_4 & 7)" (( "(") (binary_expression "(byte)param_4 & 7" (cast_expression "(byte)param_4" (( "(") (type_descriptor "byte" (type_identifier "byte")) () ")") (identifier "param_4")) (& "&") (number_literal "7")) () ")"))) () ")"))))) (; ";")) (expression_statement "memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);" (call_expression "memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2)" (identifier "memset") (argument_list "((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2)" (( "(") (cast_expression "(void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2))" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "((long)param_1 + ((ulong)param_2 - (ulong)uVar2))" (( "(") (binary_expression "(long)param_1 + ((ulong)param_2 - (ulong)uVar2)" (cast_expression "(long)param_1" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (identifier "param_1")) (+ "+") (parenthesized_expression "((ulong)param_2 - (ulong)uVar2)" (( "(") (binary_expression "(ulong)param_2 - (ulong)uVar2" (cast_expression "(ulong)param_2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "param_2")) (- "-") (cast_expression "(ulong)uVar2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar2"))) () ")"))) () ")"))) (, ",") (number_literal "0xff") (, ",") (cast_expression "(ulong)uVar2" (( "(") (type_descriptor "ulong" (type_identifier "ulong")) () ")") (identifier "uVar2")) () ")"))) (; ";")) (return_statement "return;" (return "return") (; ";")) (} "}")))

void function_1(uint8_t *var_5,uint32_t var_4,uint32_t var_2,uint32_t var_3)

{
  type_1 uVar1;
  
  var_1(var_5,0,(type_2)var_4);
  var_1(var_5,0xff,(type_2)(var_2 >> 3));
  var_5[var_2 >> 3] = (char)(1 << ((type_3)var_2 & 7)) + 0xff;
  uVar1 = var_3 >> 3;
  var_5[~uVar1 + var_4] = var_5[~uVar1 + var_4] | (type_3)(0x7f00 >> ((type_3)var_3 & 7));
  var_1(var_5 + ((type_2)var_4 - (type_2)uVar1),0xff,(type_2)uVar1);
  return;
}


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

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

{
  byte *pbVar1;
  uint uVar2;
  
  memset(param_1,0,(ulong)param_2);
  memset(param_1,0xff,(ulong)(param_3 >> 3));
  *(char *)((long)param_1 + (ulong)(param_3 >> 3)) = (char)(1 << ((byte)param_3 & 7)) + -1;
  uVar2 = param_4 >> 3;
  pbVar1 = (byte *)((long)param_1 + (ulong)(~uVar2 + param_2));
  *pbVar1 = *pbVar1 | (byte)(0x7f00 >> ((byte)param_4 & 7));
  memset((void *)((long)param_1 + ((ulong)param_2 - (ulong)uVar2)),0xff,(ulong)uVar2);
  return;
}

