
int next_proto_cb(SSL *s,uchar **out,uchar *outlen,uchar *in,uint inlen,void *arg)

{
  int iVar1;
  uint uVar2;
  
  if (c_quiet == 0) {
    BIO_printf((BIO *)bio_c_out,"Protocols advertised by server: ");
    uVar2 = 0;
    if (inlen != 0) {
      while( true ) {
        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);
        uVar2 = uVar2 + 1 + (uint)in[uVar2];
        if (inlen <= uVar2) break;
        if (uVar2 != 0) {
          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);
        }
      }
    }
    BIO_write((BIO *)bio_c_out,&DAT_0018c9a1,1);
  }
                    /* WARNING: Load size is inaccurate */
  iVar1 = SSL_select_next_proto(out,outlen,in,inlen,*arg,*(uint *)((long)arg + 8));
  *(int *)((long)arg + 0x10) = iVar1;
  return 0;
}



undefined8
FUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,
            undefined8 *param_6)

{
  int iVar1;
  uint uVar2;
  
  if (DAT_001b8020 == 0) {
    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");
    uVar2 = 0;
    if (param_5 != 0) {
      while( true ) {
        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);
        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];
        if (param_5 <= uVar2) break;
        if (uVar2 != 0) {
          BIO_write(DAT_001b8028,&DAT_0019930d,2);
        }
      }
    }
    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);
  }
  iVar1 = SSL_select_next_proto
                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));
  *(int *)(param_6 + 2) = iVar1;
  return 0;
}


PUSH R15
PUSH R14
PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x18
MOV qword ptr [RSP],RSI
MOV qword ptr [RSP + 0x8],RDX
MOV R12,RCX
MOV R13D,R8D
MOV R14,R9
CMP dword ptr [0x001b8020],0x0
JZ 0x00159fad
MOV R9D,dword ptr [R14 + 0x8]
MOV R8,qword ptr [R14]
MOV ECX,R13D
MOV RDX,R12
MOV RSI,qword ptr [RSP + 0x8]
MOV RDI,qword ptr [RSP]
CALL 0x0012fb10
MOV dword ptr [R14 + 0x10],EAX
MOV EAX,0x0
ADD RSP,0x18
POP RBX
POP RBP
POP R12
POP R13
POP R14
POP R15
RET
LEA RSI,[0x1910b0]
MOV RDI,qword ptr [0x001b8028]
MOV EAX,0x0
CALL 0x0012e210
MOV EBX,0x0
LEA R15,[0x19930d]
TEST R13D,R13D
JZ 0x0015a018
MOV EBP,EBX
ADD RBP,R12
MOVZX EDX,byte ptr [RBP]
LEA ESI,[RBX + 0x1]
ADD RSI,R12
MOV RDI,qword ptr [0x001b8028]
CALL 0x00131560
MOVZX EAX,byte ptr [RBP]
LEA EBX,[RBX + RAX*0x1 + 0x1]
CMP R13D,EBX
JBE 0x0015a018
TEST EBX,EBX
JZ 0x00159fd6
MOV EDX,0x2
MOV RSI,R15
MOV RDI,qword ptr [0x001b8028]
CALL 0x00131560
JMP 0x00159fd6
MOV EDX,0x1
LEA RSI,[0x18c9a1]
MOV RDI,qword ptr [0x001b8028]
CALL 0x00131560
JMP 0x00159f7a
(translation_unit "undefined8\nFUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }\n  iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));\n  *(int *)(param_6 + 2) = iVar1;\n  return 0;\n}\n\n" (function_definition "undefined8\nFUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }\n  iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));\n  *(int *)(param_6 + 2) = iVar1;\n  return 0;\n}" type_identifier (function_declarator "FUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)" identifier (parameter_list "(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "uchar **param_2" type_identifier (pointer_declarator "**param_2" * (pointer_declarator "*param_2" * identifier))) , (parameter_declaration "uchar *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uchar *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "uint param_5" type_identifier identifier) , (parameter_declaration "undefined8 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }\n  iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));\n  *(int *)(param_6 + 2) = iVar1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (if_statement "if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }" if (parenthesized_expression "(DAT_001b8020 == 0)" ( (binary_expression "DAT_001b8020 == 0" identifier == number_literal) )) (compound_statement "{\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }" { (expression_statement "BIO_printf(DAT_001b8028,"Protocols advertised by server: ");" (call_expression "BIO_printf(DAT_001b8028,"Protocols advertised by server: ")" identifier (argument_list "(DAT_001b8028,"Protocols advertised by server: ")" ( identifier , (string_literal ""Protocols advertised by server: "" " string_content ") ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }" { (while_statement "while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }" { (expression_statement "BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);" (call_expression "BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2])" identifier (argument_list "(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2])" ( identifier , (binary_expression "param_4 + (uVar2 + 1)" identifier + (parenthesized_expression "(uVar2 + 1)" ( (binary_expression "uVar2 + 1" identifier + number_literal) ))) , (cast_expression "(uint)param_4[uVar2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_4[uVar2]" identifier [ identifier ])) ))) ;) (expression_statement "uVar2 = uVar2 + 1 + (uint)param_4[uVar2];" (assignment_expression "uVar2 = uVar2 + 1 + (uint)param_4[uVar2]" identifier = (binary_expression "uVar2 + 1 + (uint)param_4[uVar2]" (binary_expression "uVar2 + 1" identifier + number_literal) + (cast_expression "(uint)param_4[uVar2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_4[uVar2]" identifier [ identifier ])))) ;) (if_statement "if (param_5 <= uVar2) break;" if (parenthesized_expression "(param_5 <= uVar2)" ( (binary_expression "param_5 <= uVar2" identifier <= identifier) )) (break_statement "break;" break ;)) (if_statement "if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }" { (expression_statement "BIO_write(DAT_001b8028,&DAT_0019930d,2);" (call_expression "BIO_write(DAT_001b8028,&DAT_0019930d,2)" identifier (argument_list "(DAT_001b8028,&DAT_0019930d,2)" ( identifier , (pointer_expression "&DAT_0019930d" & identifier) , number_literal ))) ;) })) })) })) (expression_statement "BIO_write(DAT_001b8028,&DAT_0018c9a1,1);" (call_expression "BIO_write(DAT_001b8028,&DAT_0018c9a1,1)" identifier (argument_list "(DAT_001b8028,&DAT_0018c9a1,1)" ( identifier , (pointer_expression "&DAT_0018c9a1" & identifier) , number_literal ))) ;) })) (expression_statement "iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));" (assignment_expression "iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" identifier = (call_expression "SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" identifier (argument_list "(param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" ( identifier , identifier , identifier , identifier , (cast_expression "(uchar *)*param_6" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_6" * identifier)) , (pointer_expression "*(uint *)(param_6 + 1)" * (cast_expression "(uint *)(param_6 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + 1)" ( (binary_expression "param_6 + 1" identifier + number_literal) )))) )))) ;) (expression_statement "*(int *)(param_6 + 2) = iVar1;" (assignment_expression "*(int *)(param_6 + 2) = iVar1" (pointer_expression "*(int *)(param_6 + 2)" * (cast_expression "(int *)(param_6 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + 2)" ( (binary_expression "param_6 + 2" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "int next_proto_cb(SSL *s,uchar **out,uchar *outlen,uchar *in,uint inlen,void *arg)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if (c_quiet == 0) {\n    BIO_printf((BIO *)bio_c_out,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (inlen != 0) {\n      while( true ) {\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write((BIO *)bio_c_out,&DAT_0018c9a1,1);\n  }\n                    /* WARNING: Load size is inaccurate */\n  iVar1 = SSL_select_next_proto(out,outlen,in,inlen,*arg,*(uint *)((long)arg + 8));\n  *(int *)((long)arg + 0x10) = iVar1;\n  return 0;\n}\n\n" (function_definition "int next_proto_cb(SSL *s,uchar **out,uchar *outlen,uchar *in,uint inlen,void *arg)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if (c_quiet == 0) {\n    BIO_printf((BIO *)bio_c_out,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (inlen != 0) {\n      while( true ) {\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write((BIO *)bio_c_out,&DAT_0018c9a1,1);\n  }\n                    /* WARNING: Load size is inaccurate */\n  iVar1 = SSL_select_next_proto(out,outlen,in,inlen,*arg,*(uint *)((long)arg + 8));\n  *(int *)((long)arg + 0x10) = iVar1;\n  return 0;\n}" primitive_type (function_declarator "next_proto_cb(SSL *s,uchar **out,uchar *outlen,uchar *in,uint inlen,void *arg)" identifier (parameter_list "(SSL *s,uchar **out,uchar *outlen,uchar *in,uint inlen,void *arg)" ( (parameter_declaration "SSL *s" type_identifier (pointer_declarator "*s" * identifier)) , (parameter_declaration "uchar **out" type_identifier (pointer_declarator "**out" * (pointer_declarator "*out" * identifier))) , (parameter_declaration "uchar *outlen" type_identifier (pointer_declarator "*outlen" * identifier)) , (parameter_declaration "uchar *in" type_identifier (pointer_declarator "*in" * identifier)) , (parameter_declaration "uint inlen" type_identifier identifier) , (parameter_declaration "void *arg" primitive_type (pointer_declarator "*arg" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  if (c_quiet == 0) {\n    BIO_printf((BIO *)bio_c_out,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (inlen != 0) {\n      while( true ) {\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write((BIO *)bio_c_out,&DAT_0018c9a1,1);\n  }\n                    /* WARNING: Load size is inaccurate */\n  iVar1 = SSL_select_next_proto(out,outlen,in,inlen,*arg,*(uint *)((long)arg + 8));\n  *(int *)((long)arg + 0x10) = iVar1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (if_statement "if (c_quiet == 0) {\n    BIO_printf((BIO *)bio_c_out,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (inlen != 0) {\n      while( true ) {\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write((BIO *)bio_c_out,&DAT_0018c9a1,1);\n  }" if (parenthesized_expression "(c_quiet == 0)" ( (binary_expression "c_quiet == 0" identifier == number_literal) )) (compound_statement "{\n    BIO_printf((BIO *)bio_c_out,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (inlen != 0) {\n      while( true ) {\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write((BIO *)bio_c_out,&DAT_0018c9a1,1);\n  }" { (expression_statement "BIO_printf((BIO *)bio_c_out,"Protocols advertised by server: ");" (call_expression "BIO_printf((BIO *)bio_c_out,"Protocols advertised by server: ")" identifier (argument_list "((BIO *)bio_c_out,"Protocols advertised by server: ")" ( (cast_expression "(BIO *)bio_c_out" ( (type_descriptor "BIO *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (string_literal ""Protocols advertised by server: "" " string_content ") ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (inlen != 0) {\n      while( true ) {\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }\n    }" if (parenthesized_expression "(inlen != 0)" ( (binary_expression "inlen != 0" identifier != number_literal) )) (compound_statement "{\n      while( true ) {\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }\n    }" { (while_statement "while( true ) {\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)in[uVar2];\n        if (inlen <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }\n      }" { (expression_statement "BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2]);" (call_expression "BIO_write((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2])" identifier (argument_list "((BIO *)bio_c_out,in + (uVar2 + 1),(uint)in[uVar2])" ( (cast_expression "(BIO *)bio_c_out" ( (type_descriptor "BIO *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (binary_expression "in + (uVar2 + 1)" identifier + (parenthesized_expression "(uVar2 + 1)" ( (binary_expression "uVar2 + 1" identifier + number_literal) ))) , (cast_expression "(uint)in[uVar2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "in[uVar2]" identifier [ identifier ])) ))) ;) (expression_statement "uVar2 = uVar2 + 1 + (uint)in[uVar2];" (assignment_expression "uVar2 = uVar2 + 1 + (uint)in[uVar2]" identifier = (binary_expression "uVar2 + 1 + (uint)in[uVar2]" (binary_expression "uVar2 + 1" identifier + number_literal) + (cast_expression "(uint)in[uVar2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "in[uVar2]" identifier [ identifier ])))) ;) (if_statement "if (inlen <= uVar2) break;" if (parenthesized_expression "(inlen <= uVar2)" ( (binary_expression "inlen <= uVar2" identifier <= identifier) )) (break_statement "break;" break ;)) (if_statement "if (uVar2 != 0) {\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);\n        }" { (expression_statement "BIO_write((BIO *)bio_c_out,&DAT_0019930d,2);" (call_expression "BIO_write((BIO *)bio_c_out,&DAT_0019930d,2)" identifier (argument_list "((BIO *)bio_c_out,&DAT_0019930d,2)" ( (cast_expression "(BIO *)bio_c_out" ( (type_descriptor "BIO *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (pointer_expression "&DAT_0019930d" & identifier) , number_literal ))) ;) })) })) })) (expression_statement "BIO_write((BIO *)bio_c_out,&DAT_0018c9a1,1);" (call_expression "BIO_write((BIO *)bio_c_out,&DAT_0018c9a1,1)" identifier (argument_list "((BIO *)bio_c_out,&DAT_0018c9a1,1)" ( (cast_expression "(BIO *)bio_c_out" ( (type_descriptor "BIO *" type_identifier (abstract_pointer_declarator "*" *)) ) identifier) , (pointer_expression "&DAT_0018c9a1" & identifier) , number_literal ))) ;) })) comment (expression_statement "iVar1 = SSL_select_next_proto(out,outlen,in,inlen,*arg,*(uint *)((long)arg + 8));" (assignment_expression "iVar1 = SSL_select_next_proto(out,outlen,in,inlen,*arg,*(uint *)((long)arg + 8))" identifier = (call_expression "SSL_select_next_proto(out,outlen,in,inlen,*arg,*(uint *)((long)arg + 8))" identifier (argument_list "(out,outlen,in,inlen,*arg,*(uint *)((long)arg + 8))" ( identifier , identifier , identifier , identifier , (pointer_expression "*arg" * identifier) , (pointer_expression "*(uint *)((long)arg + 8)" * (cast_expression "(uint *)((long)arg + 8)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)arg + 8)" ( (binary_expression "(long)arg + 8" (cast_expression "(long)arg" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) )))) ;) (expression_statement "*(int *)((long)arg + 0x10) = iVar1;" (assignment_expression "*(int *)((long)arg + 0x10) = iVar1" (pointer_expression "*(int *)((long)arg + 0x10)" * (cast_expression "(int *)((long)arg + 0x10)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "((long)arg + 0x10)" ( (binary_expression "(long)arg + 0x10" (cast_expression "(long)arg" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) identifier) + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit "undefined8\nFUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }\n  iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));\n  *(int *)(param_6 + 2) = iVar1;\n  return 0;\n}\n\n" (function_definition "undefined8\nFUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }\n  iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));\n  *(int *)(param_6 + 2) = iVar1;\n  return 0;\n}" type_identifier (function_declarator "FUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)" identifier (parameter_list "(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)" ( (parameter_declaration "undefined8 param_1" type_identifier identifier) , (parameter_declaration "uchar **param_2" type_identifier (pointer_declarator "**param_2" * (pointer_declarator "*param_2" * identifier))) , (parameter_declaration "uchar *param_3" type_identifier (pointer_declarator "*param_3" * identifier)) , (parameter_declaration "uchar *param_4" type_identifier (pointer_declarator "*param_4" * identifier)) , (parameter_declaration "uint param_5" type_identifier identifier) , (parameter_declaration "undefined8 *param_6" type_identifier (pointer_declarator "*param_6" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }\n  iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));\n  *(int *)(param_6 + 2) = iVar1;\n  return 0;\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "uint uVar2;" type_identifier identifier ;) (if_statement "if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }" if (parenthesized_expression "(DAT_001b8020 == 0)" ( (binary_expression "DAT_001b8020 == 0" identifier == number_literal) )) (compound_statement "{\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }" { (expression_statement "BIO_printf(DAT_001b8028,"Protocols advertised by server: ");" (call_expression "BIO_printf(DAT_001b8028,"Protocols advertised by server: ")" identifier (argument_list "(DAT_001b8028,"Protocols advertised by server: ")" ( identifier , (string_literal ""Protocols advertised by server: "" " string_content ") ))) ;) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" identifier = number_literal) ;) (if_statement "if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }" if (parenthesized_expression "(param_5 != 0)" ( (binary_expression "param_5 != 0" identifier != number_literal) )) (compound_statement "{\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }" { (while_statement "while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }" while (parenthesized_expression "( true )" ( true )) (compound_statement "{\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }" { (expression_statement "BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);" (call_expression "BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2])" identifier (argument_list "(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2])" ( identifier , (binary_expression "param_4 + (uVar2 + 1)" identifier + (parenthesized_expression "(uVar2 + 1)" ( (binary_expression "uVar2 + 1" identifier + number_literal) ))) , (cast_expression "(uint)param_4[uVar2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_4[uVar2]" identifier [ identifier ])) ))) ;) (expression_statement "uVar2 = uVar2 + 1 + (uint)param_4[uVar2];" (assignment_expression "uVar2 = uVar2 + 1 + (uint)param_4[uVar2]" identifier = (binary_expression "uVar2 + 1 + (uint)param_4[uVar2]" (binary_expression "uVar2 + 1" identifier + number_literal) + (cast_expression "(uint)param_4[uVar2]" ( (type_descriptor "uint" type_identifier) ) (subscript_expression "param_4[uVar2]" identifier [ identifier ])))) ;) (if_statement "if (param_5 <= uVar2) break;" if (parenthesized_expression "(param_5 <= uVar2)" ( (binary_expression "param_5 <= uVar2" identifier <= identifier) )) (break_statement "break;" break ;)) (if_statement "if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }" if (parenthesized_expression "(uVar2 != 0)" ( (binary_expression "uVar2 != 0" identifier != number_literal) )) (compound_statement "{\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }" { (expression_statement "BIO_write(DAT_001b8028,&DAT_0019930d,2);" (call_expression "BIO_write(DAT_001b8028,&DAT_0019930d,2)" identifier (argument_list "(DAT_001b8028,&DAT_0019930d,2)" ( identifier , (pointer_expression "&DAT_0019930d" & identifier) , number_literal ))) ;) })) })) })) (expression_statement "BIO_write(DAT_001b8028,&DAT_0018c9a1,1);" (call_expression "BIO_write(DAT_001b8028,&DAT_0018c9a1,1)" identifier (argument_list "(DAT_001b8028,&DAT_0018c9a1,1)" ( identifier , (pointer_expression "&DAT_0018c9a1" & identifier) , number_literal ))) ;) })) (expression_statement "iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));" (assignment_expression "iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" identifier = (call_expression "SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" identifier (argument_list "(param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" ( identifier , identifier , identifier , identifier , (cast_expression "(uchar *)*param_6" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (pointer_expression "*param_6" * identifier)) , (pointer_expression "*(uint *)(param_6 + 1)" * (cast_expression "(uint *)(param_6 + 1)" ( (type_descriptor "uint *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + 1)" ( (binary_expression "param_6 + 1" identifier + number_literal) )))) )))) ;) (expression_statement "*(int *)(param_6 + 2) = iVar1;" (assignment_expression "*(int *)(param_6 + 2) = iVar1" (pointer_expression "*(int *)(param_6 + 2)" * (cast_expression "(int *)(param_6 + 2)" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_6 + 2)" ( (binary_expression "param_6 + 2" identifier + number_literal) )))) = identifier) ;) (return_statement "return 0;" return number_literal ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * (pointer_declarator * IDENT))) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (string_literal " string_content ") ))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (while_statement while (parenthesized_expression ( BOOL )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (binary_expression IDENT + (parenthesized_expression ( (binary_expression IDENT + LIT) ))) , (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ IDENT ])) ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression IDENT + LIT) + (cast_expression ( (type_descriptor TYPE) ) (subscript_expression IDENT [ IDENT ])))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT <= IDENT) )) (break_statement break ;)) (if_statement if (parenthesized_expression ( (binary_expression IDENT != LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) })) })) })) (expression_statement (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT ))) ;) })) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , IDENT , IDENT , (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (pointer_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) )))) = IDENT) ;) (return_statement return LIT ;) })))
(function_definition "undefined8\nFUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)\n\n{\n  int iVar1;\n  uint uVar2;\n  \n  if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }\n  iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));\n  *(int *)(param_6 + 2) = iVar1;\n  return 0;\n}" (type_identifier "undefined8") (function_declarator "FUN_00159f51(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)" (identifier "FUN_00159f51") (parameter_list "(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,\n            undefined8 *param_6)" (( "(") (parameter_declaration "undefined8 param_1" (type_identifier "undefined8") (identifier "param_1")) (, ",") (parameter_declaration "uchar **param_2" (type_identifier "uchar") (pointer_declarator "**param_2" (* "*") (pointer_declarator "*param_2" (* "*") (identifier "param_2")))) (, ",") (parameter_declaration "uchar *param_3" (type_identifier "uchar") (pointer_declarator "*param_3" (* "*") (identifier "param_3"))) (, ",") (parameter_declaration "uchar *param_4" (type_identifier "uchar") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) (, ",") (parameter_declaration "uint param_5" (type_identifier "uint") (identifier "param_5")) (, ",") (parameter_declaration "undefined8 *param_6" (type_identifier "undefined8") (pointer_declarator "*param_6" (* "*") (identifier "param_6"))) () ")"))) (compound_statement "{\n  int iVar1;\n  uint uVar2;\n  \n  if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }\n  iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));\n  *(int *)(param_6 + 2) = iVar1;\n  return 0;\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "uint uVar2;" (type_identifier "uint") (identifier "uVar2") (; ";")) (if_statement "if (DAT_001b8020 == 0) {\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }" (if "if") (parenthesized_expression "(DAT_001b8020 == 0)" (( "(") (binary_expression "DAT_001b8020 == 0" (identifier "DAT_001b8020") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");\n    uVar2 = 0;\n    if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }\n    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);\n  }" ({ "{") (expression_statement "BIO_printf(DAT_001b8028,"Protocols advertised by server: ");" (call_expression "BIO_printf(DAT_001b8028,"Protocols advertised by server: ")" (identifier "BIO_printf") (argument_list "(DAT_001b8028,"Protocols advertised by server: ")" (( "(") (identifier "DAT_001b8028") (, ",") (string_literal ""Protocols advertised by server: "" (" """) (string_content "Protocols advertised by server: ") (" """)) () ")"))) (; ";")) (expression_statement "uVar2 = 0;" (assignment_expression "uVar2 = 0" (identifier "uVar2") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_5 != 0) {\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }" (if "if") (parenthesized_expression "(param_5 != 0)" (( "(") (binary_expression "param_5 != 0" (identifier "param_5") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n      while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }\n    }" ({ "{") (while_statement "while( true ) {\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }" (while "while") (parenthesized_expression "( true )" (( "(") (true "true") () ")")) (compound_statement "{\n        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);\n        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];\n        if (param_5 <= uVar2) break;\n        if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }\n      }" ({ "{") (expression_statement "BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);" (call_expression "BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2])" (identifier "BIO_write") (argument_list "(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2])" (( "(") (identifier "DAT_001b8028") (, ",") (binary_expression "param_4 + (uVar2 + 1)" (identifier "param_4") (+ "+") (parenthesized_expression "(uVar2 + 1)" (( "(") (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1")) () ")"))) (, ",") (cast_expression "(uint)param_4[uVar2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_4[uVar2]" (identifier "param_4") ([ "[") (identifier "uVar2") (] "]"))) () ")"))) (; ";")) (expression_statement "uVar2 = uVar2 + 1 + (uint)param_4[uVar2];" (assignment_expression "uVar2 = uVar2 + 1 + (uint)param_4[uVar2]" (identifier "uVar2") (= "=") (binary_expression "uVar2 + 1 + (uint)param_4[uVar2]" (binary_expression "uVar2 + 1" (identifier "uVar2") (+ "+") (number_literal "1")) (+ "+") (cast_expression "(uint)param_4[uVar2]" (( "(") (type_descriptor "uint" (type_identifier "uint")) () ")") (subscript_expression "param_4[uVar2]" (identifier "param_4") ([ "[") (identifier "uVar2") (] "]"))))) (; ";")) (if_statement "if (param_5 <= uVar2) break;" (if "if") (parenthesized_expression "(param_5 <= uVar2)" (( "(") (binary_expression "param_5 <= uVar2" (identifier "param_5") (<= "<=") (identifier "uVar2")) () ")")) (break_statement "break;" (break "break") (; ";"))) (if_statement "if (uVar2 != 0) {\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }" (if "if") (parenthesized_expression "(uVar2 != 0)" (( "(") (binary_expression "uVar2 != 0" (identifier "uVar2") (!= "!=") (number_literal "0")) () ")")) (compound_statement "{\n          BIO_write(DAT_001b8028,&DAT_0019930d,2);\n        }" ({ "{") (expression_statement "BIO_write(DAT_001b8028,&DAT_0019930d,2);" (call_expression "BIO_write(DAT_001b8028,&DAT_0019930d,2)" (identifier "BIO_write") (argument_list "(DAT_001b8028,&DAT_0019930d,2)" (( "(") (identifier "DAT_001b8028") (, ",") (pointer_expression "&DAT_0019930d" (& "&") (identifier "DAT_0019930d")) (, ",") (number_literal "2") () ")"))) (; ";")) (} "}"))) (} "}"))) (} "}"))) (expression_statement "BIO_write(DAT_001b8028,&DAT_0018c9a1,1);" (call_expression "BIO_write(DAT_001b8028,&DAT_0018c9a1,1)" (identifier "BIO_write") (argument_list "(DAT_001b8028,&DAT_0018c9a1,1)" (( "(") (identifier "DAT_001b8028") (, ",") (pointer_expression "&DAT_0018c9a1" (& "&") (identifier "DAT_0018c9a1")) (, ",") (number_literal "1") () ")"))) (; ";")) (} "}"))) (expression_statement "iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));" (assignment_expression "iVar1 = SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" (identifier "iVar1") (= "=") (call_expression "SSL_select_next_proto\n                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" (identifier "SSL_select_next_proto") (argument_list "(param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1))" (( "(") (identifier "param_2") (, ",") (identifier "param_3") (, ",") (identifier "param_4") (, ",") (identifier "param_5") (, ",") (cast_expression "(uchar *)*param_6" (( "(") (type_descriptor "uchar *" (type_identifier "uchar") (abstract_pointer_declarator "*" (* "*"))) () ")") (pointer_expression "*param_6" (* "*") (identifier "param_6"))) (, ",") (pointer_expression "*(uint *)(param_6 + 1)" (* "*") (cast_expression "(uint *)(param_6 + 1)" (( "(") (type_descriptor "uint *" (type_identifier "uint") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_6 + 1)" (( "(") (binary_expression "param_6 + 1" (identifier "param_6") (+ "+") (number_literal "1")) () ")")))) () ")")))) (; ";")) (expression_statement "*(int *)(param_6 + 2) = iVar1;" (assignment_expression "*(int *)(param_6 + 2) = iVar1" (pointer_expression "*(int *)(param_6 + 2)" (* "*") (cast_expression "(int *)(param_6 + 2)" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_6 + 2)" (( "(") (binary_expression "param_6 + 2" (identifier "param_6") (+ "+") (number_literal "2")) () ")")))) (= "=") (identifier "iVar1")) (; ";")) (return_statement "return 0;" (return "return") (number_literal "0") (; ";")) (} "}")))

int function_1(type_1 *s,type_2 **out,type_2 *outlen,type_2 *var_5,type_3 var_3,void *arg)

{
  int iVar1;
  type_3 var_6;
  
  if (var_1 == 0) {
    var_2((type_4 *)bio_c_out,"Protocols advertised by server: ");
    var_6 = 0;
    if (var_3 != 0) {
      while( true ) {
        var_4((type_4 *)bio_c_out,var_5 + (var_6 + 1),(type_3)var_5[var_6]);
        var_6 = var_6 + 1 + (type_3)var_5[var_6];
        if (var_3 <= var_6) break;
        if (var_6 != 0) {
          var_4((type_4 *)bio_c_out,&DAT_0019930d,2);
        }
      }
    }
    var_4((type_4 *)bio_c_out,&DAT_0018c9a1,1);
  }
                    /* WARNING: Load size is inaccurate */
  iVar1 = var_7(out,outlen,var_5,var_3,*arg,*(type_3 *)((long)arg + 8));
  *(int *)((long)arg + 0x10) = iVar1;
  return 0;
}


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

undefined8
MASKED(undefined8 param_1,uchar **param_2,uchar *param_3,uchar *param_4,uint param_5,
            undefined8 *param_6)

{
  int iVar1;
  uint uVar2;
  
  if (DAT_001b8020 == 0) {
    BIO_printf(DAT_001b8028,"Protocols advertised by server: ");
    uVar2 = 0;
    if (param_5 != 0) {
      while( true ) {
        BIO_write(DAT_001b8028,param_4 + (uVar2 + 1),(uint)param_4[uVar2]);
        uVar2 = uVar2 + 1 + (uint)param_4[uVar2];
        if (param_5 <= uVar2) break;
        if (uVar2 != 0) {
          BIO_write(DAT_001b8028,&DAT_0019930d,2);
        }
      }
    }
    BIO_write(DAT_001b8028,&DAT_0018c9a1,1);
  }
  iVar1 = SSL_select_next_proto
                    (param_2,param_3,param_4,param_5,(uchar *)*param_6,*(uint *)(param_6 + 1));
  *(int *)(param_6 + 2) = iVar1;
  return 0;
}

