
int rsa_export(uchar *out,ulong *outlen,int type,rsa_key *key)

{
  int iVar1;
  int iVar2;
  uchar *out_00;
  void *pvVar3;
  long in_FS_OFFSET;
  ulong zero;
  ulong tmplen;
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  zero = 0;
  if (out == (uchar *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);
  }
  if (outlen == (ulong *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);
  }
  if (key == (rsa_key *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);
  }
  if (key->type == 1) {
    pvVar3 = key->N;
    if (type == 1) {
      iVar2 = der_encode_sequence_multi
                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q
                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);
      goto LAB_0019225a;
    }
  }
  else {
    if (type == 1) {
      iVar2 = 0x12;
      goto LAB_0019225a;
    }
    pvVar3 = key->N;
  }
  if ((type & 0x1000U) == 0) {
    iVar2 = der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0);
  }
  else {
    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();
    iVar2 = iVar1 + 7;
    if (-1 < iVar1) {
      iVar2 = iVar1;
    }
    tmplen = (long)(iVar2 >> 3) * 2 + 8;
    out_00 = (uchar *)malloc(tmplen);
    iVar2 = 0xd;
    if (out_00 != (uchar *)0x0) {
      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);
      if (iVar2 == 0) {
        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);
      }
      if (out != out_00) {
        free(out_00);
      }
    }
  }
LAB_0019225a:
  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
    return iVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}



ulong rsa_export(void *param_1,long param_2,uint param_3,int *param_4)

{
  int iVar1;
  void *__ptr;
  ulong uVar2;
  int iVar3;
  undefined8 uVar4;
  long in_FS_OFFSET;
  undefined8 local_40;
  size_t local_38;
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  local_40 = 0;
  if (param_1 == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);
  }
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);
  }
  if (param_4 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);
  }
  if (*param_4 == 1) {
    uVar4 = *(undefined8 *)(param_4 + 6);
    if (param_3 == 1) {
      uVar2 = der_encode_sequence_multi
                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,
                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,
                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,
                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);
      goto LAB_0019225a;
    }
  }
  else {
    if (param_3 == 1) {
      uVar2 = 0x12;
      goto LAB_0019225a;
    }
    uVar4 = *(undefined8 *)(param_4 + 6);
  }
  if ((param_3 & 0x1000) == 0) {
    uVar2 = der_encode_sequence_multi
                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);
  }
  else {
    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();
    iVar3 = iVar1 + 7;
    if (-1 < iVar1) {
      iVar3 = iVar1;
    }
    local_38 = (long)(iVar3 >> 3) * 2 + 8;
    __ptr = malloc(local_38);
    uVar2 = 0xd;
    if (__ptr != (void *)0x0) {
      uVar2 = der_encode_sequence_multi
                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,
                         *(undefined8 *)(param_4 + 2),0,0,0);
      if ((int)uVar2 == 0) {
        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);
      }
      if (param_1 != __ptr) {
        free(__ptr);
        uVar2 = uVar2 & 0xffffffff;
      }
    }
  }
LAB_0019225a:
  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}


PUSH R13
PUSH R12
PUSH RBP
PUSH RBX
SUB RSP,0x38
MOV RAX,qword ptr FS:[0x28]
MOV qword ptr [RSP + 0x28],RAX
XOR EAX,EAX
MOV qword ptr [RSP + 0x18],0x0
TEST RDI,RDI
JZ 0x0019236f
MOV R12,RSI
TEST RSI,RSI
JZ 0x00192357
MOV RBX,RCX
TEST RCX,RCX
JZ 0x0019233f
CMP dword ptr [RCX],0x1
MOV RBP,RDI
JZ 0x00192280
CMP EDX,0x1
JZ 0x00192330
MOV RDI,qword ptr [RCX + 0x18]
AND DH,0x10
JZ 0x001922f8
MOV RAX,qword ptr [0x001ecec8]
CALL qword ptr [RAX + 0x68]
TEST EAX,EAX
LEA EDX,[RAX + 0x7]
CMOVNS EDX,EAX
SAR EDX,0x3
MOVSXD RCX,EDX
LEA RDI,[RCX + RCX*0x1 + 0x8]
MOV qword ptr [RSP + 0x20],RDI
CALL 0x001141b0
MOV R13,RAX
MOV EAX,0xd
TEST R13,R13
JZ 0x0019225a
LEA RSI,[RSP + 0x20]
SUB RSP,0x8
MOV ECX,0x1
XOR EAX,EAX
PUSH 0x0
MOV R9D,0x2
MOV EDX,0x2
MOV RDI,R13
PUSH 0x0
PUSH 0x0
PUSH qword ptr [RBX + 0x8]
MOV R8,qword ptr [RBX + 0x18]
PUSH 0x1
CALL 0x00114950
ADD RSP,0x30
TEST EAX,EAX
JNZ 0x00192245
PUSH 0x0
MOV RCX,R13
XOR EDX,EDX
MOV R9D,0x6
PUSH 0x0
MOV R8,qword ptr [RSP + 0x30]
MOV RSI,R12
MOV RDI,RBP
CALL 0x001140a0
POP RDX
POP RCX
CMP RBP,R13
JZ 0x0019225a
MOV RDI,R13
MOV dword ptr [RSP + 0xc],EAX
CALL 0x00113130
MOV EAX,dword ptr [RSP + 0xc]
MOV RCX,qword ptr [RSP + 0x28]
XOR RCX,qword ptr FS:[0x28]
JNZ 0x0019233a
ADD RSP,0x38
POP RBX
POP RBP
POP R12
POP R13
RET
MOV RDI,qword ptr [RCX + 0x18]
CMP EDX,0x1
JNZ 0x001921ad
PUSH 0x0
MOV R9D,0x2
MOV EDX,0x3
XOR EAX,EAX
PUSH 0x0
PUSH 0x0
PUSH qword ptr [RCX + 0x30]
PUSH 0x1
PUSH 0x2
PUSH qword ptr [RCX + 0x40]
PUSH 0x1
PUSH 0x2
PUSH qword ptr [RCX + 0x38]
PUSH 0x1
PUSH 0x2
PUSH qword ptr [RCX + 0x28]
PUSH 0x1
PUSH 0x2
PUSH qword ptr [RCX + 0x20]
PUSH 0x1
PUSH 0x2
PUSH qword ptr [RCX + 0x10]
PUSH 0x1
PUSH 0x2
PUSH qword ptr [RCX + 0x8]
MOV ECX,0x1
PUSH 0x1
PUSH 0x2
PUSH RDI
MOV RDI,RBP
PUSH 0x1
LEA R8,[RSP + 0xe8]
CALL 0x00114950
ADD RSP,0xd0
JMP 0x0019225a
SUB RSP,0x8
MOV R8,RDI
MOV R9D,0x2
MOV RSI,R12
PUSH 0x0
MOV ECX,0x1
MOV EDX,0x2
MOV RDI,RBP
PUSH 0x0
XOR EAX,EAX
PUSH 0x0
PUSH qword ptr [RBX + 0x8]
PUSH 0x1
CALL 0x00114950
ADD RSP,0x30
JMP 0x0019225a
MOV EAX,0x12
JMP 0x0019225a
CALL 0x00113880
MOV EDX,0x20
LEA RSI,[0x1d652b]
LEA RDI,[0x1d547d]
CALL 0x00114270
MOV EDX,0x1f
LEA RSI,[0x1d652b]
LEA RDI,[0x1bd93a]
CALL 0x00114270
MOV EDX,0x1e
LEA RSI,[0x1d652b]
LEA RDI,[0x1b77e1]
CALL 0x00114270
(translation_unit "ulong rsa_export(void *param_1,long param_2,uint param_3,int *param_4)\n\n{\n  int iVar1;\n  void *__ptr;\n  ulong uVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long in_FS_OFFSET;\n  undefined8 local_40;\n  size_t local_38;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_40 = 0;\n  if (param_1 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (param_4 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }\n  if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "ulong rsa_export(void *param_1,long param_2,uint param_3,int *param_4)\n\n{\n  int iVar1;\n  void *__ptr;\n  ulong uVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long in_FS_OFFSET;\n  undefined8 local_40;\n  size_t local_38;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_40 = 0;\n  if (param_1 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (param_4 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }\n  if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" type_identifier (function_declarator "rsa_export(void *param_1,long param_2,uint param_3,int *param_4)" identifier (parameter_list "(void *param_1,long param_2,uint param_3,int *param_4)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  void *__ptr;\n  ulong uVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long in_FS_OFFSET;\n  undefined8 local_40;\n  size_t local_38;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_40 = 0;\n  if (param_1 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (param_4 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }\n  if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_40;" type_identifier identifier ;) (declaration "size_t local_38;" primitive_type identifier ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (if_statement "if (param_1 == (void *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }" if (parenthesized_expression "(param_1 == (void *)0x0)" ( (binary_expression "param_1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }" { comment (expression_statement "crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);" (call_expression "crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e)" identifier (argument_list "("out != NULL","src/pk/rsa/rsa_export.c",0x1e)" ( (string_literal ""out != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_2 == 0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }" { comment (expression_statement "crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);" (call_expression "crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f)" identifier (argument_list "("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_4 == (int *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }" if (parenthesized_expression "(param_4 == (int *)0x0)" ( (binary_expression "param_4 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }" { comment (expression_statement "crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);" (call_expression "crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20)" identifier (argument_list "("key != NULL","src/pk/rsa/rsa_export.c",0x20)" ( (string_literal ""key != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" if (parenthesized_expression "(*param_4 == 1)" ( (binary_expression "*param_4 == 1" (pointer_expression "*param_4" * identifier) == number_literal) )) (compound_statement "{\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }" { (expression_statement "uVar4 = *(undefined8 *)(param_4 + 6);" (assignment_expression "uVar4 = *(undefined8 *)(param_4 + 6)" identifier = (pointer_expression "*(undefined8 *)(param_4 + 6)" * (cast_expression "(undefined8 *)(param_4 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 6)" ( (binary_expression "param_4 + 6" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }" if (parenthesized_expression "(param_3 == 1)" ( (binary_expression "param_3 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }" { (expression_statement "uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" identifier = (call_expression "der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" identifier (argument_list "(param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" ( identifier , identifier , number_literal , number_literal , (pointer_expression "&local_40" & identifier) , number_literal , number_literal , identifier , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 2)" * (cast_expression "(undefined8 *)(param_4 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 2)" ( (binary_expression "param_4 + 2" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 4)" * (cast_expression "(undefined8 *)(param_4 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 4)" ( (binary_expression "param_4 + 4" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 8)" * (cast_expression "(undefined8 *)(param_4 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 8)" ( (binary_expression "param_4 + 8" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 10)" * (cast_expression "(undefined8 *)(param_4 + 10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 10)" ( (binary_expression "param_4 + 10" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 0xe)" * (cast_expression "(undefined8 *)(param_4 + 0xe)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0xe)" ( (binary_expression "param_4 + 0xe" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 0x10)" * (cast_expression "(undefined8 *)(param_4 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 0xc)" * (cast_expression "(undefined8 *)(param_4 + 0xc)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0xc)" ( (binary_expression "param_4 + 0xc" identifier + number_literal) )))) , number_literal , number_literal , number_literal )))) ;) (goto_statement "goto LAB_0019225a;" goto statement_identifier ;) })) }) (else_clause "else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" else (compound_statement "{\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" { (if_statement "if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }" if (parenthesized_expression "(param_3 == 1)" ( (binary_expression "param_3 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }" { (expression_statement "uVar2 = 0x12;" (assignment_expression "uVar2 = 0x12" identifier = number_literal) ;) (goto_statement "goto LAB_0019225a;" goto statement_identifier ;) })) (expression_statement "uVar4 = *(undefined8 *)(param_4 + 6);" (assignment_expression "uVar4 = *(undefined8 *)(param_4 + 6)" identifier = (pointer_expression "*(undefined8 *)(param_4 + 6)" * (cast_expression "(undefined8 *)(param_4 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 6)" ( (binary_expression "param_4 + 6" identifier + number_literal) ))))) ;) }))) (if_statement "if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "((param_3 & 0x1000) == 0)" ( (binary_expression "(param_3 & 0x1000) == 0" (parenthesized_expression "(param_3 & 0x1000)" ( (binary_expression "param_3 & 0x1000" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }" { (expression_statement "uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" identifier = (call_expression "der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" identifier (argument_list "(param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" ( identifier , identifier , number_literal , number_literal , identifier , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 2)" * (cast_expression "(undefined8 *)(param_4 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 2)" ( (binary_expression "param_4 + 2" identifier + number_literal) )))) , number_literal , number_literal , number_literal )))) ;) }) (else_clause "else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" { (expression_statement "iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();" (assignment_expression "iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))()" identifier = (call_expression "(**(code **)(PTR_ltc_mp_001ecec8 + 0x68))()" (parenthesized_expression "(**(code **)(PTR_ltc_mp_001ecec8 + 0x68))" ( (pointer_expression "**(code **)(PTR_ltc_mp_001ecec8 + 0x68)" * (pointer_expression "*(code **)(PTR_ltc_mp_001ecec8 + 0x68)" * (cast_expression "(code **)(PTR_ltc_mp_001ecec8 + 0x68)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_ltc_mp_001ecec8 + 0x68)" ( (binary_expression "PTR_ltc_mp_001ecec8 + 0x68" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar3 = iVar1 + 7;" (assignment_expression "iVar3 = iVar1 + 7" identifier = (binary_expression "iVar1 + 7" identifier + number_literal)) ;) (if_statement "if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar3 = iVar1;\n    }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) })) (expression_statement "local_38 = (long)(iVar3 >> 3) * 2 + 8;" (assignment_expression "local_38 = (long)(iVar3 >> 3) * 2 + 8" identifier = (binary_expression "(long)(iVar3 >> 3) * 2 + 8" (binary_expression "(long)(iVar3 >> 3) * 2" (cast_expression "(long)(iVar3 >> 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar3 >> 3)" ( (binary_expression "iVar3 >> 3" identifier >> number_literal) ))) * number_literal) + number_literal)) ;) (expression_statement "__ptr = malloc(local_38);" (assignment_expression "__ptr = malloc(local_38)" identifier = (call_expression "malloc(local_38)" identifier (argument_list "(local_38)" ( identifier )))) ;) (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" identifier = number_literal) ;) (if_statement "if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }" if (parenthesized_expression "(__ptr != (void *)0x0)" ( (binary_expression "__ptr != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }" { (expression_statement "uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" identifier = (call_expression "der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" identifier (argument_list "(__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" ( identifier , (pointer_expression "&local_38" & identifier) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 6)" * (cast_expression "(undefined8 *)(param_4 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 6)" ( (binary_expression "param_4 + 6" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 2)" * (cast_expression "(undefined8 *)(param_4 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 2)" ( (binary_expression "param_4 + 2" identifier + number_literal) )))) , number_literal , number_literal , number_literal )))) ;) (if_statement "if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }" if (parenthesized_expression "((int)uVar2 == 0)" ( (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }" { (expression_statement "uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);" (assignment_expression "uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0)" identifier = (call_expression "der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0)" identifier (argument_list "(param_1,param_2,0,__ptr,local_38,6,0,0)" ( identifier , identifier , number_literal , identifier , identifier , number_literal , number_literal , number_literal )))) ;) })) (if_statement "if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }" if (parenthesized_expression "(param_1 != __ptr)" ( (binary_expression "param_1 != __ptr" identifier != identifier) )) (compound_statement "{\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "uVar2 = uVar2 & 0xffffffff;" (assignment_expression "uVar2 = uVar2 & 0xffffffff" identifier = (binary_expression "uVar2 & 0xffffffff" identifier & number_literal)) ;) })) })) }))) (labeled_statement "LAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "int rsa_export(uchar *out,ulong *outlen,int type,rsa_key *key)\n\n{\n  int iVar1;\n  int iVar2;\n  uchar *out_00;\n  void *pvVar3;\n  long in_FS_OFFSET;\n  ulong zero;\n  ulong tmplen;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  zero = 0;\n  if (out == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (key == (rsa_key *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (key->type == 1) {\n    pvVar3 = key->N;\n    if (type == 1) {\n      iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (type == 1) {\n      iVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    pvVar3 = key->N;\n  }\n  if ((type & 0x1000U) == 0) {\n    iVar2 = der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar2 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar2 = iVar1;\n    }\n    tmplen = (long)(iVar2 >> 3) * 2 + 8;\n    out_00 = (uchar *)malloc(tmplen);\n    iVar2 = 0xd;\n    if (out_00 != (uchar *)0x0) {\n      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);\n      if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }\n      if (out != out_00) {\n        free(out_00);\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}\n\n" (function_definition "int rsa_export(uchar *out,ulong *outlen,int type,rsa_key *key)\n\n{\n  int iVar1;\n  int iVar2;\n  uchar *out_00;\n  void *pvVar3;\n  long in_FS_OFFSET;\n  ulong zero;\n  ulong tmplen;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  zero = 0;\n  if (out == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (key == (rsa_key *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (key->type == 1) {\n    pvVar3 = key->N;\n    if (type == 1) {\n      iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (type == 1) {\n      iVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    pvVar3 = key->N;\n  }\n  if ((type & 0x1000U) == 0) {\n    iVar2 = der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar2 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar2 = iVar1;\n    }\n    tmplen = (long)(iVar2 >> 3) * 2 + 8;\n    out_00 = (uchar *)malloc(tmplen);\n    iVar2 = 0xd;\n    if (out_00 != (uchar *)0x0) {\n      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);\n      if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }\n      if (out != out_00) {\n        free(out_00);\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" primitive_type (function_declarator "rsa_export(uchar *out,ulong *outlen,int type,rsa_key *key)" identifier (parameter_list "(uchar *out,ulong *outlen,int type,rsa_key *key)" ( (parameter_declaration "uchar *out" type_identifier (pointer_declarator "*out" * identifier)) , (parameter_declaration "ulong *outlen" type_identifier (pointer_declarator "*outlen" * identifier)) , (parameter_declaration "int type" primitive_type identifier) , (parameter_declaration "rsa_key *key" type_identifier (pointer_declarator "*key" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  int iVar2;\n  uchar *out_00;\n  void *pvVar3;\n  long in_FS_OFFSET;\n  ulong zero;\n  ulong tmplen;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  zero = 0;\n  if (out == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (key == (rsa_key *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (key->type == 1) {\n    pvVar3 = key->N;\n    if (type == 1) {\n      iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (type == 1) {\n      iVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    pvVar3 = key->N;\n  }\n  if ((type & 0x1000U) == 0) {\n    iVar2 = der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar2 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar2 = iVar1;\n    }\n    tmplen = (long)(iVar2 >> 3) * 2 + 8;\n    out_00 = (uchar *)malloc(tmplen);\n    iVar2 = 0xd;\n    if (out_00 != (uchar *)0x0) {\n      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);\n      if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }\n      if (out != out_00) {\n        free(out_00);\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }\n                    /* WARNING: Subroutine does not return */\n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "int iVar2;" primitive_type identifier ;) (declaration "uchar *out_00;" type_identifier (pointer_declarator "*out_00" * identifier) ;) (declaration "void *pvVar3;" primitive_type (pointer_declarator "*pvVar3" * identifier) ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "ulong zero;" type_identifier identifier ;) (declaration "ulong tmplen;" type_identifier identifier ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "zero = 0;" (assignment_expression "zero = 0" identifier = number_literal) ;) (if_statement "if (out == (uchar *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }" if (parenthesized_expression "(out == (uchar *)0x0)" ( (binary_expression "out == (uchar *)0x0" identifier == (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }" { comment (expression_statement "crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);" (call_expression "crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e)" identifier (argument_list "("out != NULL","src/pk/rsa/rsa_export.c",0x1e)" ( (string_literal ""out != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (outlen == (ulong *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }" if (parenthesized_expression "(outlen == (ulong *)0x0)" ( (binary_expression "outlen == (ulong *)0x0" identifier == (cast_expression "(ulong *)0x0" ( (type_descriptor "ulong *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }" { comment (expression_statement "crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);" (call_expression "crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f)" identifier (argument_list "("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (key == (rsa_key *)0x0) {\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }" if (parenthesized_expression "(key == (rsa_key *)0x0)" ( (binary_expression "key == (rsa_key *)0x0" identifier == (cast_expression "(rsa_key *)0x0" ( (type_descriptor "rsa_key *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    /* WARNING: Subroutine does not return */\n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }" { comment (expression_statement "crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);" (call_expression "crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20)" identifier (argument_list "("key != NULL","src/pk/rsa/rsa_export.c",0x20)" ( (string_literal ""key != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (key->type == 1) {\n    pvVar3 = key->N;\n    if (type == 1) {\n      iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (type == 1) {\n      iVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    pvVar3 = key->N;\n  }" if (parenthesized_expression "(key->type == 1)" ( (binary_expression "key->type == 1" (field_expression "key->type" identifier -> field_identifier) == number_literal) )) (compound_statement "{\n    pvVar3 = key->N;\n    if (type == 1) {\n      iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);\n      goto LAB_0019225a;\n    }\n  }" { (expression_statement "pvVar3 = key->N;" (assignment_expression "pvVar3 = key->N" identifier = (field_expression "key->N" identifier -> field_identifier)) ;) (if_statement "if (type == 1) {\n      iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);\n      goto LAB_0019225a;\n    }" if (parenthesized_expression "(type == 1)" ( (binary_expression "type == 1" identifier == number_literal) )) (compound_statement "{\n      iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);\n      goto LAB_0019225a;\n    }" { (expression_statement "iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0);" (assignment_expression "iVar2 = der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0)" identifier = (call_expression "der_encode_sequence_multi\n                        (out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0)" identifier (argument_list "(out,outlen,3,1,&zero,2,1,pvVar3,2,1,key->e,2,1,key->d,2,1,key->p,2,1,key->q\n                         ,2,1,key->dP,2,1,key->dQ,2,1,key->qP,0,0,0)" ( identifier , identifier , number_literal , number_literal , (pointer_expression "&zero" & identifier) , number_literal , number_literal , identifier , number_literal , number_literal , (field_expression "key->e" identifier -> field_identifier) , number_literal , number_literal , (field_expression "key->d" identifier -> field_identifier) , number_literal , number_literal , (field_expression "key->p" identifier -> field_identifier) , number_literal , number_literal , (field_expression "key->q" identifier -> field_identifier) , number_literal , number_literal , (field_expression "key->dP" identifier -> field_identifier) , number_literal , number_literal , (field_expression "key->dQ" identifier -> field_identifier) , number_literal , number_literal , (field_expression "key->qP" identifier -> field_identifier) , number_literal , number_literal , number_literal )))) ;) (goto_statement "goto LAB_0019225a;" goto statement_identifier ;) })) }) (else_clause "else {\n    if (type == 1) {\n      iVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    pvVar3 = key->N;\n  }" else (compound_statement "{\n    if (type == 1) {\n      iVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    pvVar3 = key->N;\n  }" { (if_statement "if (type == 1) {\n      iVar2 = 0x12;\n      goto LAB_0019225a;\n    }" if (parenthesized_expression "(type == 1)" ( (binary_expression "type == 1" identifier == number_literal) )) (compound_statement "{\n      iVar2 = 0x12;\n      goto LAB_0019225a;\n    }" { (expression_statement "iVar2 = 0x12;" (assignment_expression "iVar2 = 0x12" identifier = number_literal) ;) (goto_statement "goto LAB_0019225a;" goto statement_identifier ;) })) (expression_statement "pvVar3 = key->N;" (assignment_expression "pvVar3 = key->N" identifier = (field_expression "key->N" identifier -> field_identifier)) ;) }))) (if_statement "if ((type & 0x1000U) == 0) {\n    iVar2 = der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar2 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar2 = iVar1;\n    }\n    tmplen = (long)(iVar2 >> 3) * 2 + 8;\n    out_00 = (uchar *)malloc(tmplen);\n    iVar2 = 0xd;\n    if (out_00 != (uchar *)0x0) {\n      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);\n      if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }\n      if (out != out_00) {\n        free(out_00);\n      }\n    }\n  }" if (parenthesized_expression "((type & 0x1000U) == 0)" ( (binary_expression "(type & 0x1000U) == 0" (parenthesized_expression "(type & 0x1000U)" ( (binary_expression "type & 0x1000U" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    iVar2 = der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0);\n  }" { (expression_statement "iVar2 = der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0);" (assignment_expression "iVar2 = der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0)" identifier = (call_expression "der_encode_sequence_multi(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0)" identifier (argument_list "(out,outlen,2,1,pvVar3,2,1,key->e,0,0,0)" ( identifier , identifier , number_literal , number_literal , identifier , number_literal , number_literal , (field_expression "key->e" identifier -> field_identifier) , number_literal , number_literal , number_literal )))) ;) }) (else_clause "else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar2 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar2 = iVar1;\n    }\n    tmplen = (long)(iVar2 >> 3) * 2 + 8;\n    out_00 = (uchar *)malloc(tmplen);\n    iVar2 = 0xd;\n    if (out_00 != (uchar *)0x0) {\n      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);\n      if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }\n      if (out != out_00) {\n        free(out_00);\n      }\n    }\n  }" else (compound_statement "{\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar2 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar2 = iVar1;\n    }\n    tmplen = (long)(iVar2 >> 3) * 2 + 8;\n    out_00 = (uchar *)malloc(tmplen);\n    iVar2 = 0xd;\n    if (out_00 != (uchar *)0x0) {\n      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);\n      if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }\n      if (out != out_00) {\n        free(out_00);\n      }\n    }\n  }" { (expression_statement "iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();" (assignment_expression "iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))()" identifier = (call_expression "(**(code **)(PTR_ltc_mp_001ecec8 + 0x68))()" (parenthesized_expression "(**(code **)(PTR_ltc_mp_001ecec8 + 0x68))" ( (pointer_expression "**(code **)(PTR_ltc_mp_001ecec8 + 0x68)" * (pointer_expression "*(code **)(PTR_ltc_mp_001ecec8 + 0x68)" * (cast_expression "(code **)(PTR_ltc_mp_001ecec8 + 0x68)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_ltc_mp_001ecec8 + 0x68)" ( (binary_expression "PTR_ltc_mp_001ecec8 + 0x68" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar2 = iVar1 + 7;" (assignment_expression "iVar2 = iVar1 + 7" identifier = (binary_expression "iVar1 + 7" identifier + number_literal)) ;) (if_statement "if (-1 < iVar1) {\n      iVar2 = iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar2 = iVar1;\n    }" { (expression_statement "iVar2 = iVar1;" (assignment_expression "iVar2 = iVar1" identifier = identifier) ;) })) (expression_statement "tmplen = (long)(iVar2 >> 3) * 2 + 8;" (assignment_expression "tmplen = (long)(iVar2 >> 3) * 2 + 8" identifier = (binary_expression "(long)(iVar2 >> 3) * 2 + 8" (binary_expression "(long)(iVar2 >> 3) * 2" (cast_expression "(long)(iVar2 >> 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar2 >> 3)" ( (binary_expression "iVar2 >> 3" identifier >> number_literal) ))) * number_literal) + number_literal)) ;) (expression_statement "out_00 = (uchar *)malloc(tmplen);" (assignment_expression "out_00 = (uchar *)malloc(tmplen)" identifier = (cast_expression "(uchar *)malloc(tmplen)" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) (call_expression "malloc(tmplen)" identifier (argument_list "(tmplen)" ( identifier ))))) ;) (expression_statement "iVar2 = 0xd;" (assignment_expression "iVar2 = 0xd" identifier = number_literal) ;) (if_statement "if (out_00 != (uchar *)0x0) {\n      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);\n      if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }\n      if (out != out_00) {\n        free(out_00);\n      }\n    }" if (parenthesized_expression "(out_00 != (uchar *)0x0)" ( (binary_expression "out_00 != (uchar *)0x0" identifier != (cast_expression "(uchar *)0x0" ( (type_descriptor "uchar *" type_identifier (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);\n      if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }\n      if (out != out_00) {\n        free(out_00);\n      }\n    }" { (expression_statement "iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0);" (assignment_expression "iVar2 = der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0)" identifier = (call_expression "der_encode_sequence_multi(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0)" identifier (argument_list "(out_00,&tmplen,2,1,key->N,2,1,key->e,0,0,0)" ( identifier , (pointer_expression "&tmplen" & identifier) , number_literal , number_literal , (field_expression "key->N" identifier -> field_identifier) , number_literal , number_literal , (field_expression "key->e" identifier -> field_identifier) , number_literal , number_literal , number_literal )))) ;) (if_statement "if (iVar2 == 0) {\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }" if (parenthesized_expression "(iVar2 == 0)" ( (binary_expression "iVar2 == 0" identifier == number_literal) )) (compound_statement "{\n        iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);\n      }" { (expression_statement "iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0);" (assignment_expression "iVar2 = der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0)" identifier = (call_expression "der_encode_subject_public_key_info(out,outlen,0,out_00,tmplen,6,(void *)0x0,0)" identifier (argument_list "(out,outlen,0,out_00,tmplen,6,(void *)0x0,0)" ( identifier , identifier , number_literal , identifier , identifier , number_literal , (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal) , number_literal )))) ;) })) (if_statement "if (out != out_00) {\n        free(out_00);\n      }" if (parenthesized_expression "(out != out_00)" ( (binary_expression "out != out_00" identifier != identifier) )) (compound_statement "{\n        free(out_00);\n      }" { (expression_statement "free(out_00);" (call_expression "free(out_00)" identifier (argument_list "(out_00)" ( identifier ))) ;) })) })) }))) (labeled_statement "LAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }" statement_identifier : (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return iVar2;\n  }" if (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return iVar2;\n  }" { (return_statement "return iVar2;" return identifier ;) }))) comment (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit "ulong rsa_export(void *param_1,long param_2,uint param_3,int *param_4)\n\n{\n  int iVar1;\n  void *__ptr;\n  ulong uVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long in_FS_OFFSET;\n  undefined8 local_40;\n  size_t local_38;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_40 = 0;\n  if (param_1 == (void *)0x0) {\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (param_4 == (int *)0x0) {\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }\n  if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}\n\n" (function_definition "ulong rsa_export(void *param_1,long param_2,uint param_3,int *param_4)\n\n{\n  int iVar1;\n  void *__ptr;\n  ulong uVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long in_FS_OFFSET;\n  undefined8 local_40;\n  size_t local_38;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_40 = 0;\n  if (param_1 == (void *)0x0) {\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (param_4 == (int *)0x0) {\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }\n  if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" type_identifier (function_declarator "rsa_export(void *param_1,long param_2,uint param_3,int *param_4)" identifier (parameter_list "(void *param_1,long param_2,uint param_3,int *param_4)" ( (parameter_declaration "void *param_1" primitive_type (pointer_declarator "*param_1" * identifier)) , (parameter_declaration "long param_2" (sized_type_specifier "long" long) identifier) , (parameter_declaration "uint param_3" type_identifier identifier) , (parameter_declaration "int *param_4" primitive_type (pointer_declarator "*param_4" * identifier)) ))) (compound_statement "{\n  int iVar1;\n  void *__ptr;\n  ulong uVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long in_FS_OFFSET;\n  undefined8 local_40;\n  size_t local_38;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_40 = 0;\n  if (param_1 == (void *)0x0) {\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (param_4 == (int *)0x0) {\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }\n  if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" { (declaration "int iVar1;" primitive_type identifier ;) (declaration "void *__ptr;" primitive_type (pointer_declarator "*__ptr" * identifier) ;) (declaration "ulong uVar2;" type_identifier identifier ;) (declaration "int iVar3;" primitive_type identifier ;) (declaration "undefined8 uVar4;" type_identifier identifier ;) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" long) identifier ;) (declaration "undefined8 local_40;" type_identifier identifier ;) (declaration "size_t local_38;" primitive_type identifier ;) (declaration "long local_30;" (sized_type_specifier "long" long) identifier ;) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" identifier = (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) ;) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" identifier = number_literal) ;) (if_statement "if (param_1 == (void *)0x0) {\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }" if (parenthesized_expression "(param_1 == (void *)0x0)" ( (binary_expression "param_1 == (void *)0x0" identifier == (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }" { (expression_statement "crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);" (call_expression "crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e)" identifier (argument_list "("out != NULL","src/pk/rsa/rsa_export.c",0x1e)" ( (string_literal ""out != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_2 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }" if (parenthesized_expression "(param_2 == 0)" ( (binary_expression "param_2 == 0" identifier == number_literal) )) (compound_statement "{\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }" { (expression_statement "crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);" (call_expression "crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f)" identifier (argument_list "("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f)" ( (string_literal ""outlen != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (param_4 == (int *)0x0) {\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }" if (parenthesized_expression "(param_4 == (int *)0x0)" ( (binary_expression "param_4 == (int *)0x0" identifier == (cast_expression "(int *)0x0" ( (type_descriptor "int *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }" { (expression_statement "crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);" (call_expression "crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20)" identifier (argument_list "("key != NULL","src/pk/rsa/rsa_export.c",0x20)" ( (string_literal ""key != NULL"" " string_content ") , (string_literal ""src/pk/rsa/rsa_export.c"" " string_content ") , number_literal ))) ;) })) (if_statement "if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" if (parenthesized_expression "(*param_4 == 1)" ( (binary_expression "*param_4 == 1" (pointer_expression "*param_4" * identifier) == number_literal) )) (compound_statement "{\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }" { (expression_statement "uVar4 = *(undefined8 *)(param_4 + 6);" (assignment_expression "uVar4 = *(undefined8 *)(param_4 + 6)" identifier = (pointer_expression "*(undefined8 *)(param_4 + 6)" * (cast_expression "(undefined8 *)(param_4 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 6)" ( (binary_expression "param_4 + 6" identifier + number_literal) ))))) ;) (if_statement "if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }" if (parenthesized_expression "(param_3 == 1)" ( (binary_expression "param_3 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }" { (expression_statement "uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" identifier = (call_expression "der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" identifier (argument_list "(param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" ( identifier , identifier , number_literal , number_literal , (pointer_expression "&local_40" & identifier) , number_literal , number_literal , identifier , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 2)" * (cast_expression "(undefined8 *)(param_4 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 2)" ( (binary_expression "param_4 + 2" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 4)" * (cast_expression "(undefined8 *)(param_4 + 4)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 4)" ( (binary_expression "param_4 + 4" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 8)" * (cast_expression "(undefined8 *)(param_4 + 8)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 8)" ( (binary_expression "param_4 + 8" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 10)" * (cast_expression "(undefined8 *)(param_4 + 10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 10)" ( (binary_expression "param_4 + 10" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 0xe)" * (cast_expression "(undefined8 *)(param_4 + 0xe)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0xe)" ( (binary_expression "param_4 + 0xe" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 0x10)" * (cast_expression "(undefined8 *)(param_4 + 0x10)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0x10)" ( (binary_expression "param_4 + 0x10" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 0xc)" * (cast_expression "(undefined8 *)(param_4 + 0xc)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 0xc)" ( (binary_expression "param_4 + 0xc" identifier + number_literal) )))) , number_literal , number_literal , number_literal )))) ;) (goto_statement "goto LAB_0019225a;" goto statement_identifier ;) })) }) (else_clause "else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" else (compound_statement "{\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" { (if_statement "if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }" if (parenthesized_expression "(param_3 == 1)" ( (binary_expression "param_3 == 1" identifier == number_literal) )) (compound_statement "{\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }" { (expression_statement "uVar2 = 0x12;" (assignment_expression "uVar2 = 0x12" identifier = number_literal) ;) (goto_statement "goto LAB_0019225a;" goto statement_identifier ;) })) (expression_statement "uVar4 = *(undefined8 *)(param_4 + 6);" (assignment_expression "uVar4 = *(undefined8 *)(param_4 + 6)" identifier = (pointer_expression "*(undefined8 *)(param_4 + 6)" * (cast_expression "(undefined8 *)(param_4 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 6)" ( (binary_expression "param_4 + 6" identifier + number_literal) ))))) ;) }))) (if_statement "if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" if (parenthesized_expression "((param_3 & 0x1000) == 0)" ( (binary_expression "(param_3 & 0x1000) == 0" (parenthesized_expression "(param_3 & 0x1000)" ( (binary_expression "param_3 & 0x1000" identifier & number_literal) )) == number_literal) )) (compound_statement "{\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }" { (expression_statement "uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" identifier = (call_expression "der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" identifier (argument_list "(param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" ( identifier , identifier , number_literal , number_literal , identifier , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 2)" * (cast_expression "(undefined8 *)(param_4 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 2)" ( (binary_expression "param_4 + 2" identifier + number_literal) )))) , number_literal , number_literal , number_literal )))) ;) }) (else_clause "else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" else (compound_statement "{\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" { (expression_statement "iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();" (assignment_expression "iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))()" identifier = (call_expression "(**(code **)(PTR_ltc_mp_001ecec8 + 0x68))()" (parenthesized_expression "(**(code **)(PTR_ltc_mp_001ecec8 + 0x68))" ( (pointer_expression "**(code **)(PTR_ltc_mp_001ecec8 + 0x68)" * (pointer_expression "*(code **)(PTR_ltc_mp_001ecec8 + 0x68)" * (cast_expression "(code **)(PTR_ltc_mp_001ecec8 + 0x68)" ( (type_descriptor "code **" type_identifier (abstract_pointer_declarator "**" * (abstract_pointer_declarator "*" *))) ) (parenthesized_expression "(PTR_ltc_mp_001ecec8 + 0x68)" ( (binary_expression "PTR_ltc_mp_001ecec8 + 0x68" identifier + number_literal) ))))) )) (argument_list "()" ( )))) ;) (expression_statement "iVar3 = iVar1 + 7;" (assignment_expression "iVar3 = iVar1 + 7" identifier = (binary_expression "iVar1 + 7" identifier + number_literal)) ;) (if_statement "if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }" if (parenthesized_expression "(-1 < iVar1)" ( (binary_expression "-1 < iVar1" number_literal < identifier) )) (compound_statement "{\n      iVar3 = iVar1;\n    }" { (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" identifier = identifier) ;) })) (expression_statement "local_38 = (long)(iVar3 >> 3) * 2 + 8;" (assignment_expression "local_38 = (long)(iVar3 >> 3) * 2 + 8" identifier = (binary_expression "(long)(iVar3 >> 3) * 2 + 8" (binary_expression "(long)(iVar3 >> 3) * 2" (cast_expression "(long)(iVar3 >> 3)" ( (type_descriptor "long" (sized_type_specifier "long" long)) ) (parenthesized_expression "(iVar3 >> 3)" ( (binary_expression "iVar3 >> 3" identifier >> number_literal) ))) * number_literal) + number_literal)) ;) (expression_statement "__ptr = malloc(local_38);" (assignment_expression "__ptr = malloc(local_38)" identifier = (call_expression "malloc(local_38)" identifier (argument_list "(local_38)" ( identifier )))) ;) (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" identifier = number_literal) ;) (if_statement "if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }" if (parenthesized_expression "(__ptr != (void *)0x0)" ( (binary_expression "__ptr != (void *)0x0" identifier != (cast_expression "(void *)0x0" ( (type_descriptor "void *" primitive_type (abstract_pointer_declarator "*" *)) ) number_literal)) )) (compound_statement "{\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }" { (expression_statement "uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" identifier = (call_expression "der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" identifier (argument_list "(__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" ( identifier , (pointer_expression "&local_38" & identifier) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 6)" * (cast_expression "(undefined8 *)(param_4 + 6)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 6)" ( (binary_expression "param_4 + 6" identifier + number_literal) )))) , number_literal , number_literal , (pointer_expression "*(undefined8 *)(param_4 + 2)" * (cast_expression "(undefined8 *)(param_4 + 2)" ( (type_descriptor "undefined8 *" type_identifier (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(param_4 + 2)" ( (binary_expression "param_4 + 2" identifier + number_literal) )))) , number_literal , number_literal , number_literal )))) ;) (if_statement "if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }" if (parenthesized_expression "((int)uVar2 == 0)" ( (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" ( (type_descriptor "int" primitive_type) ) identifier) == number_literal) )) (compound_statement "{\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }" { (expression_statement "uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);" (assignment_expression "uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0)" identifier = (call_expression "der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0)" identifier (argument_list "(param_1,param_2,0,__ptr,local_38,6,0,0)" ( identifier , identifier , number_literal , identifier , identifier , number_literal , number_literal , number_literal )))) ;) })) (if_statement "if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }" if (parenthesized_expression "(param_1 != __ptr)" ( (binary_expression "param_1 != __ptr" identifier != identifier) )) (compound_statement "{\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }" { (expression_statement "free(__ptr);" (call_expression "free(__ptr)" identifier (argument_list "(__ptr)" ( identifier ))) ;) (expression_statement "uVar2 = uVar2 & 0xffffffff;" (assignment_expression "uVar2 = uVar2 & 0xffffffff" identifier = (binary_expression "uVar2 & 0xffffffff" identifier & number_literal)) ;) })) })) }))) (labeled_statement "LAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" statement_identifier : (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" if (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" ( (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" identifier == (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" * (cast_expression "(long *)(in_FS_OFFSET + 0x28)" ( (type_descriptor "long *" (sized_type_specifier "long" long) (abstract_pointer_declarator "*" *)) ) (parenthesized_expression "(in_FS_OFFSET + 0x28)" ( (binary_expression "in_FS_OFFSET + 0x28" identifier + number_literal) ))))) )) (compound_statement "{\n    return uVar2;\n  }" { (return_statement "return uVar2;" return identifier ;) }))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" identifier (argument_list "()" ( ))) ;) })))
(translation_unit (function_definition TYPE (function_declarator IDENT (parameter_list ( (parameter_declaration TYPE (pointer_declarator * IDENT)) , (parameter_declaration (sized_type_specifier long) IDENT) , (parameter_declaration TYPE IDENT) , (parameter_declaration TYPE (pointer_declarator * IDENT)) ))) (compound_statement { (declaration TYPE IDENT ;) (declaration TYPE (pointer_declarator * IDENT) ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (declaration TYPE IDENT ;) (declaration TYPE IDENT ;) (declaration (sized_type_specifier long) IDENT ;) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT == (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( (string_literal " string_content ") , (string_literal " string_content ") , LIT ))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression (pointer_expression * IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT , (pointer_expression & IDENT) , LIT , LIT , IDENT , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , LIT )))) ;) (goto_statement goto statement_identifier ;) })) }) (else_clause else (compound_statement { (if_statement if (parenthesized_expression ( (binary_expression IDENT == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = LIT) ;) (goto_statement goto statement_identifier ;) })) (expression_statement (assignment_expression IDENT = (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) ;) }))) (if_statement if (parenthesized_expression ( (binary_expression (parenthesized_expression ( (binary_expression IDENT & LIT) )) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , LIT , IDENT , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , LIT )))) ;) }) (else_clause else (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression (parenthesized_expression ( (pointer_expression * (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator * (abstract_pointer_declarator *))) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (argument_list ( )))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT + LIT)) ;) (if_statement if (parenthesized_expression ( (binary_expression LIT < IDENT) )) (compound_statement { (expression_statement (assignment_expression IDENT = IDENT) ;) })) (expression_statement (assignment_expression IDENT = (binary_expression (binary_expression (cast_expression ( (type_descriptor (sized_type_specifier long)) ) (parenthesized_expression ( (binary_expression IDENT >> LIT) ))) * LIT) + LIT)) ;) (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT )))) ;) (expression_statement (assignment_expression IDENT = LIT) ;) (if_statement if (parenthesized_expression ( (binary_expression IDENT != (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) LIT)) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , (pointer_expression & IDENT) , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , (pointer_expression * (cast_expression ( (type_descriptor TYPE (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) )))) , LIT , LIT , LIT )))) ;) (if_statement if (parenthesized_expression ( (binary_expression (cast_expression ( (type_descriptor TYPE) ) IDENT) == LIT) )) (compound_statement { (expression_statement (assignment_expression IDENT = (call_expression IDENT (argument_list ( IDENT , IDENT , LIT , IDENT , IDENT , LIT , LIT , LIT )))) ;) })) (if_statement if (parenthesized_expression ( (binary_expression IDENT != IDENT) )) (compound_statement { (expression_statement (call_expression IDENT (argument_list ( IDENT ))) ;) (expression_statement (assignment_expression IDENT = (binary_expression IDENT & LIT)) ;) })) })) }))) (labeled_statement statement_identifier : (if_statement if (parenthesized_expression ( (binary_expression IDENT == (pointer_expression * (cast_expression ( (type_descriptor (sized_type_specifier long) (abstract_pointer_declarator *)) ) (parenthesized_expression ( (binary_expression IDENT + LIT) ))))) )) (compound_statement { (return_statement return IDENT ;) }))) (expression_statement (call_expression IDENT (argument_list ( ))) ;) })))
(function_definition "ulong rsa_export(void *param_1,long param_2,uint param_3,int *param_4)\n\n{\n  int iVar1;\n  void *__ptr;\n  ulong uVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long in_FS_OFFSET;\n  undefined8 local_40;\n  size_t local_38;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_40 = 0;\n  if (param_1 == (void *)0x0) {\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (param_4 == (int *)0x0) {\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }\n  if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" (type_identifier "ulong") (function_declarator "rsa_export(void *param_1,long param_2,uint param_3,int *param_4)" (identifier "rsa_export") (parameter_list "(void *param_1,long param_2,uint param_3,int *param_4)" (( "(") (parameter_declaration "void *param_1" (primitive_type "void") (pointer_declarator "*param_1" (* "*") (identifier "param_1"))) (, ",") (parameter_declaration "long param_2" (sized_type_specifier "long" (long "long")) (identifier "param_2")) (, ",") (parameter_declaration "uint param_3" (type_identifier "uint") (identifier "param_3")) (, ",") (parameter_declaration "int *param_4" (primitive_type "int") (pointer_declarator "*param_4" (* "*") (identifier "param_4"))) () ")"))) (compound_statement "{\n  int iVar1;\n  void *__ptr;\n  ulong uVar2;\n  int iVar3;\n  undefined8 uVar4;\n  long in_FS_OFFSET;\n  undefined8 local_40;\n  size_t local_38;\n  long local_30;\n  \n  local_30 = *(long *)(in_FS_OFFSET + 0x28);\n  local_40 = 0;\n  if (param_1 == (void *)0x0) {\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }\n  if (param_2 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }\n  if (param_4 == (int *)0x0) {\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }\n  if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }\n  if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }\nLAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }\n                    \n  __stack_chk_fail();\n}" ({ "{") (declaration "int iVar1;" (primitive_type "int") (identifier "iVar1") (; ";")) (declaration "void *__ptr;" (primitive_type "void") (pointer_declarator "*__ptr" (* "*") (identifier "__ptr")) (; ";")) (declaration "ulong uVar2;" (type_identifier "ulong") (identifier "uVar2") (; ";")) (declaration "int iVar3;" (primitive_type "int") (identifier "iVar3") (; ";")) (declaration "undefined8 uVar4;" (type_identifier "undefined8") (identifier "uVar4") (; ";")) (declaration "long in_FS_OFFSET;" (sized_type_specifier "long" (long "long")) (identifier "in_FS_OFFSET") (; ";")) (declaration "undefined8 local_40;" (type_identifier "undefined8") (identifier "local_40") (; ";")) (declaration "size_t local_38;" (primitive_type "size_t") (identifier "local_38") (; ";")) (declaration "long local_30;" (sized_type_specifier "long" (long "long")) (identifier "local_30") (; ";")) (expression_statement "local_30 = *(long *)(in_FS_OFFSET + 0x28);" (assignment_expression "local_30 = *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (= "=") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) (; ";")) (expression_statement "local_40 = 0;" (assignment_expression "local_40 = 0" (identifier "local_40") (= "=") (number_literal "0")) (; ";")) (if_statement "if (param_1 == (void *)0x0) {\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }" (if "if") (parenthesized_expression "(param_1 == (void *)0x0)" (( "(") (binary_expression "param_1 == (void *)0x0" (identifier "param_1") (== "==") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);\n  }" ({ "{") (expression_statement "crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e);" (call_expression "crypt_argchk("out != NULL","src/pk/rsa/rsa_export.c",0x1e)" (identifier "crypt_argchk") (argument_list "("out != NULL","src/pk/rsa/rsa_export.c",0x1e)" (( "(") (string_literal ""out != NULL"" (" """) (string_content "out != NULL") (" """)) (, ",") (string_literal ""src/pk/rsa/rsa_export.c"" (" """) (string_content "src/pk/rsa/rsa_export.c") (" """)) (, ",") (number_literal "0x1e") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_2 == 0) {\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }" (if "if") (parenthesized_expression "(param_2 == 0)" (( "(") (binary_expression "param_2 == 0" (identifier "param_2") (== "==") (number_literal "0")) () ")")) (compound_statement "{\n                    \n    crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);\n  }" ({ "{") (expression_statement "crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);" (call_expression "crypt_argchk("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f)" (identifier "crypt_argchk") (argument_list "("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f)" (( "(") (string_literal ""outlen != NULL"" (" """) (string_content "outlen != NULL") (" """)) (, ",") (string_literal ""src/pk/rsa/rsa_export.c"" (" """) (string_content "src/pk/rsa/rsa_export.c") (" """)) (, ",") (number_literal "0x1f") () ")"))) (; ";")) (} "}"))) (if_statement "if (param_4 == (int *)0x0) {\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }" (if "if") (parenthesized_expression "(param_4 == (int *)0x0)" (( "(") (binary_expression "param_4 == (int *)0x0" (identifier "param_4") (== "==") (cast_expression "(int *)0x0" (( "(") (type_descriptor "int *" (primitive_type "int") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n                    \n    crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);\n  }" ({ "{") (expression_statement "crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20);" (call_expression "crypt_argchk("key != NULL","src/pk/rsa/rsa_export.c",0x20)" (identifier "crypt_argchk") (argument_list "("key != NULL","src/pk/rsa/rsa_export.c",0x20)" (( "(") (string_literal ""key != NULL"" (" """) (string_content "key != NULL") (" """)) (, ",") (string_literal ""src/pk/rsa/rsa_export.c"" (" """) (string_content "src/pk/rsa/rsa_export.c") (" """)) (, ",") (number_literal "0x20") () ")"))) (; ";")) (} "}"))) (if_statement "if (*param_4 == 1) {\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }\n  else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" (if "if") (parenthesized_expression "(*param_4 == 1)" (( "(") (binary_expression "*param_4 == 1" (pointer_expression "*param_4" (* "*") (identifier "param_4")) (== "==") (number_literal "1")) () ")")) (compound_statement "{\n    uVar4 = *(undefined8 *)(param_4 + 6);\n    if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }\n  }" ({ "{") (expression_statement "uVar4 = *(undefined8 *)(param_4 + 6);" (assignment_expression "uVar4 = *(undefined8 *)(param_4 + 6)" (identifier "uVar4") (= "=") (pointer_expression "*(undefined8 *)(param_4 + 6)" (* "*") (cast_expression "(undefined8 *)(param_4 + 6)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 6)" (( "(") (binary_expression "param_4 + 6" (identifier "param_4") (+ "+") (number_literal "6")) () ")"))))) (; ";")) (if_statement "if (param_3 == 1) {\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }" (if "if") (parenthesized_expression "(param_3 == 1)" (( "(") (binary_expression "param_3 == 1" (identifier "param_3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);\n      goto LAB_0019225a;\n    }" ({ "{") (expression_statement "uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" (identifier "uVar2") (= "=") (call_expression "der_encode_sequence_multi\n                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" (identifier "der_encode_sequence_multi") (argument_list "(param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,\n                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,\n                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,\n                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (number_literal "3") (, ",") (number_literal "1") (, ",") (pointer_expression "&local_40" (& "&") (identifier "local_40")) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (identifier "uVar4") (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 2)" (* "*") (cast_expression "(undefined8 *)(param_4 + 2)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 2)" (( "(") (binary_expression "param_4 + 2" (identifier "param_4") (+ "+") (number_literal "2")) () ")")))) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 4)" (* "*") (cast_expression "(undefined8 *)(param_4 + 4)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 4)" (( "(") (binary_expression "param_4 + 4" (identifier "param_4") (+ "+") (number_literal "4")) () ")")))) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 8)" (* "*") (cast_expression "(undefined8 *)(param_4 + 8)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 8)" (( "(") (binary_expression "param_4 + 8" (identifier "param_4") (+ "+") (number_literal "8")) () ")")))) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 10)" (* "*") (cast_expression "(undefined8 *)(param_4 + 10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 10)" (( "(") (binary_expression "param_4 + 10" (identifier "param_4") (+ "+") (number_literal "10")) () ")")))) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 0xe)" (* "*") (cast_expression "(undefined8 *)(param_4 + 0xe)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0xe)" (( "(") (binary_expression "param_4 + 0xe" (identifier "param_4") (+ "+") (number_literal "0xe")) () ")")))) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 0x10)" (* "*") (cast_expression "(undefined8 *)(param_4 + 0x10)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0x10)" (( "(") (binary_expression "param_4 + 0x10" (identifier "param_4") (+ "+") (number_literal "0x10")) () ")")))) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 0xc)" (* "*") (cast_expression "(undefined8 *)(param_4 + 0xc)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 0xc)" (( "(") (binary_expression "param_4 + 0xc" (identifier "param_4") (+ "+") (number_literal "0xc")) () ")")))) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (goto_statement "goto LAB_0019225a;" (goto "goto") (statement_identifier "LAB_0019225a") (; ";")) (} "}"))) (} "}")) (else_clause "else {\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" (else "else") (compound_statement "{\n    if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }\n    uVar4 = *(undefined8 *)(param_4 + 6);\n  }" ({ "{") (if_statement "if (param_3 == 1) {\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }" (if "if") (parenthesized_expression "(param_3 == 1)" (( "(") (binary_expression "param_3 == 1" (identifier "param_3") (== "==") (number_literal "1")) () ")")) (compound_statement "{\n      uVar2 = 0x12;\n      goto LAB_0019225a;\n    }" ({ "{") (expression_statement "uVar2 = 0x12;" (assignment_expression "uVar2 = 0x12" (identifier "uVar2") (= "=") (number_literal "0x12")) (; ";")) (goto_statement "goto LAB_0019225a;" (goto "goto") (statement_identifier "LAB_0019225a") (; ";")) (} "}"))) (expression_statement "uVar4 = *(undefined8 *)(param_4 + 6);" (assignment_expression "uVar4 = *(undefined8 *)(param_4 + 6)" (identifier "uVar4") (= "=") (pointer_expression "*(undefined8 *)(param_4 + 6)" (* "*") (cast_expression "(undefined8 *)(param_4 + 6)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 6)" (( "(") (binary_expression "param_4 + 6" (identifier "param_4") (+ "+") (number_literal "6")) () ")"))))) (; ";")) (} "}")))) (if_statement "if ((param_3 & 0x1000) == 0) {\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }\n  else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" (if "if") (parenthesized_expression "((param_3 & 0x1000) == 0)" (( "(") (binary_expression "(param_3 & 0x1000) == 0" (parenthesized_expression "(param_3 & 0x1000)" (( "(") (binary_expression "param_3 & 0x1000" (identifier "param_3") (& "&") (number_literal "0x1000")) () ")")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n    uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);\n  }" ({ "{") (expression_statement "uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" (identifier "uVar2") (= "=") (call_expression "der_encode_sequence_multi\n                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" (identifier "der_encode_sequence_multi") (argument_list "(param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (identifier "uVar4") (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 2)" (* "*") (cast_expression "(undefined8 *)(param_4 + 2)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 2)" (( "(") (binary_expression "param_4 + 2" (identifier "param_4") (+ "+") (number_literal "2")) () ")")))) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (} "}")) (else_clause "else {\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" (else "else") (compound_statement "{\n    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();\n    iVar3 = iVar1 + 7;\n    if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }\n    local_38 = (long)(iVar3 >> 3) * 2 + 8;\n    __ptr = malloc(local_38);\n    uVar2 = 0xd;\n    if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }\n  }" ({ "{") (expression_statement "iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();" (assignment_expression "iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))()" (identifier "iVar1") (= "=") (call_expression "(**(code **)(PTR_ltc_mp_001ecec8 + 0x68))()" (parenthesized_expression "(**(code **)(PTR_ltc_mp_001ecec8 + 0x68))" (( "(") (pointer_expression "**(code **)(PTR_ltc_mp_001ecec8 + 0x68)" (* "*") (pointer_expression "*(code **)(PTR_ltc_mp_001ecec8 + 0x68)" (* "*") (cast_expression "(code **)(PTR_ltc_mp_001ecec8 + 0x68)" (( "(") (type_descriptor "code **" (type_identifier "code") (abstract_pointer_declarator "**" (* "*") (abstract_pointer_declarator "*" (* "*")))) () ")") (parenthesized_expression "(PTR_ltc_mp_001ecec8 + 0x68)" (( "(") (binary_expression "PTR_ltc_mp_001ecec8 + 0x68" (identifier "PTR_ltc_mp_001ecec8") (+ "+") (number_literal "0x68")) () ")"))))) () ")")) (argument_list "()" (( "(") () ")")))) (; ";")) (expression_statement "iVar3 = iVar1 + 7;" (assignment_expression "iVar3 = iVar1 + 7" (identifier "iVar3") (= "=") (binary_expression "iVar1 + 7" (identifier "iVar1") (+ "+") (number_literal "7"))) (; ";")) (if_statement "if (-1 < iVar1) {\n      iVar3 = iVar1;\n    }" (if "if") (parenthesized_expression "(-1 < iVar1)" (( "(") (binary_expression "-1 < iVar1" (number_literal "-1") (< "<") (identifier "iVar1")) () ")")) (compound_statement "{\n      iVar3 = iVar1;\n    }" ({ "{") (expression_statement "iVar3 = iVar1;" (assignment_expression "iVar3 = iVar1" (identifier "iVar3") (= "=") (identifier "iVar1")) (; ";")) (} "}"))) (expression_statement "local_38 = (long)(iVar3 >> 3) * 2 + 8;" (assignment_expression "local_38 = (long)(iVar3 >> 3) * 2 + 8" (identifier "local_38") (= "=") (binary_expression "(long)(iVar3 >> 3) * 2 + 8" (binary_expression "(long)(iVar3 >> 3) * 2" (cast_expression "(long)(iVar3 >> 3)" (( "(") (type_descriptor "long" (sized_type_specifier "long" (long "long"))) () ")") (parenthesized_expression "(iVar3 >> 3)" (( "(") (binary_expression "iVar3 >> 3" (identifier "iVar3") (>> ">>") (number_literal "3")) () ")"))) (* "*") (number_literal "2")) (+ "+") (number_literal "8"))) (; ";")) (expression_statement "__ptr = malloc(local_38);" (assignment_expression "__ptr = malloc(local_38)" (identifier "__ptr") (= "=") (call_expression "malloc(local_38)" (identifier "malloc") (argument_list "(local_38)" (( "(") (identifier "local_38") () ")")))) (; ";")) (expression_statement "uVar2 = 0xd;" (assignment_expression "uVar2 = 0xd" (identifier "uVar2") (= "=") (number_literal "0xd")) (; ";")) (if_statement "if (__ptr != (void *)0x0) {\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }" (if "if") (parenthesized_expression "(__ptr != (void *)0x0)" (( "(") (binary_expression "__ptr != (void *)0x0" (identifier "__ptr") (!= "!=") (cast_expression "(void *)0x0" (( "(") (type_descriptor "void *" (primitive_type "void") (abstract_pointer_declarator "*" (* "*"))) () ")") (number_literal "0x0"))) () ")")) (compound_statement "{\n      uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);\n      if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }\n      if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }\n    }" ({ "{") (expression_statement "uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0);" (assignment_expression "uVar2 = der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" (identifier "uVar2") (= "=") (call_expression "der_encode_sequence_multi\n                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" (identifier "der_encode_sequence_multi") (argument_list "(__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,\n                         *(undefined8 *)(param_4 + 2),0,0,0)" (( "(") (identifier "__ptr") (, ",") (pointer_expression "&local_38" (& "&") (identifier "local_38")) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 6)" (* "*") (cast_expression "(undefined8 *)(param_4 + 6)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 6)" (( "(") (binary_expression "param_4 + 6" (identifier "param_4") (+ "+") (number_literal "6")) () ")")))) (, ",") (number_literal "2") (, ",") (number_literal "1") (, ",") (pointer_expression "*(undefined8 *)(param_4 + 2)" (* "*") (cast_expression "(undefined8 *)(param_4 + 2)" (( "(") (type_descriptor "undefined8 *" (type_identifier "undefined8") (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(param_4 + 2)" (( "(") (binary_expression "param_4 + 2" (identifier "param_4") (+ "+") (number_literal "2")) () ")")))) (, ",") (number_literal "0") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (if_statement "if ((int)uVar2 == 0) {\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }" (if "if") (parenthesized_expression "((int)uVar2 == 0)" (( "(") (binary_expression "(int)uVar2 == 0" (cast_expression "(int)uVar2" (( "(") (type_descriptor "int" (primitive_type "int")) () ")") (identifier "uVar2")) (== "==") (number_literal "0")) () ")")) (compound_statement "{\n        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);\n      }" ({ "{") (expression_statement "uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);" (assignment_expression "uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0)" (identifier "uVar2") (= "=") (call_expression "der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0)" (identifier "der_encode_subject_public_key_info") (argument_list "(param_1,param_2,0,__ptr,local_38,6,0,0)" (( "(") (identifier "param_1") (, ",") (identifier "param_2") (, ",") (number_literal "0") (, ",") (identifier "__ptr") (, ",") (identifier "local_38") (, ",") (number_literal "6") (, ",") (number_literal "0") (, ",") (number_literal "0") () ")")))) (; ";")) (} "}"))) (if_statement "if (param_1 != __ptr) {\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }" (if "if") (parenthesized_expression "(param_1 != __ptr)" (( "(") (binary_expression "param_1 != __ptr" (identifier "param_1") (!= "!=") (identifier "__ptr")) () ")")) (compound_statement "{\n        free(__ptr);\n        uVar2 = uVar2 & 0xffffffff;\n      }" ({ "{") (expression_statement "free(__ptr);" (call_expression "free(__ptr)" (identifier "free") (argument_list "(__ptr)" (( "(") (identifier "__ptr") () ")"))) (; ";")) (expression_statement "uVar2 = uVar2 & 0xffffffff;" (assignment_expression "uVar2 = uVar2 & 0xffffffff" (identifier "uVar2") (= "=") (binary_expression "uVar2 & 0xffffffff" (identifier "uVar2") (& "&") (number_literal "0xffffffff"))) (; ";")) (} "}"))) (} "}"))) (} "}")))) (labeled_statement "LAB_0019225a:\n  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" (statement_identifier "LAB_0019225a") (: ":") (if_statement "if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {\n    return uVar2;\n  }" (if "if") (parenthesized_expression "(local_30 == *(long *)(in_FS_OFFSET + 0x28))" (( "(") (binary_expression "local_30 == *(long *)(in_FS_OFFSET + 0x28)" (identifier "local_30") (== "==") (pointer_expression "*(long *)(in_FS_OFFSET + 0x28)" (* "*") (cast_expression "(long *)(in_FS_OFFSET + 0x28)" (( "(") (type_descriptor "long *" (sized_type_specifier "long" (long "long")) (abstract_pointer_declarator "*" (* "*"))) () ")") (parenthesized_expression "(in_FS_OFFSET + 0x28)" (( "(") (binary_expression "in_FS_OFFSET + 0x28" (identifier "in_FS_OFFSET") (+ "+") (number_literal "0x28")) () ")"))))) () ")")) (compound_statement "{\n    return uVar2;\n  }" ({ "{") (return_statement "return uVar2;" (return "return") (identifier "uVar2") (; ";")) (} "}")))) (expression_statement "__stack_chk_fail();" (call_expression "__stack_chk_fail()" (identifier "__stack_chk_fail") (argument_list "()" (( "(") () ")"))) (; ";")) (} "}")))

int function_1(type_1 *var_2,type_2 *var_4,int var_6,type_3 *var_5)

{
  int var_9;
  int var_10;
  type_1 *var_12;
  void *pvVar3;
  long var_1;
  type_2 zero;
  type_2 tmplen;
  long var_15;
  
  var_15 = *(long *)(var_1 + 0x28);
  zero = 0;
  if (var_2 == (type_1 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("out != NULL","src/pk/rsa/rsa_export.c",0x1e);
  }
  if (var_4 == (type_2 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("outlen != NULL","src/pk/rsa/rsa_export.c",0x1f);
  }
  if (var_5 == (type_3 *)0x0) {
                    /* WARNING: Subroutine does not return */
    var_3("key != NULL","src/pk/rsa/rsa_export.c",0x20);
  }
  if (var_5->var_6 == 1) {
    pvVar3 = var_5->N;
    if (var_6 == 1) {
      var_10 = var_7
                        (var_2,var_4,3,1,&zero,2,1,pvVar3,2,1,var_5->e,2,1,var_5->d,2,1,var_5->p,2,1,var_5->q
                         ,2,1,var_5->dP,2,1,var_5->dQ,2,1,var_5->qP,0,0,0);
      goto LAB_0019225a;
    }
  }
  else {
    if (var_6 == 1) {
      var_10 = 0x12;
      goto LAB_0019225a;
    }
    pvVar3 = var_5->N;
  }
  if ((var_6 & 0x1000U) == 0) {
    var_10 = var_7(var_2,var_4,2,1,pvVar3,2,1,var_5->e,0,0,0);
  }
  else {
    var_9 = (**(type_4 **)(var_8 + 0x68))();
    var_10 = var_9 + 7;
    if (-1 < var_9) {
      var_10 = var_9;
    }
    tmplen = (long)(var_10 >> 3) * 2 + 8;
    var_12 = (type_1 *)var_11(tmplen);
    var_10 = 0xd;
    if (var_12 != (type_1 *)0x0) {
      var_10 = var_7(var_12,&tmplen,2,1,var_5->N,2,1,var_5->e,0,0,0);
      if (var_10 == 0) {
        var_10 = var_13(var_2,var_4,0,var_12,tmplen,6,(void *)0x0,0);
      }
      if (var_2 != var_12) {
        var_14(var_12);
      }
    }
  }
LAB_0019225a:
  if (var_15 == *(long *)(var_1 + 0x28)) {
    return var_10;
  }
                    /* WARNING: Subroutine does not return */
  var_16();
}


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

ulong MASKED(void *param_1,long param_2,uint param_3,int *param_4)

{
  int iVar1;
  void *__ptr;
  ulong uVar2;
  int iVar3;
  undefined8 uVar4;
  long in_FS_OFFSET;
  undefined8 local_40;
  size_t local_38;
  long local_30;
  
  local_30 = *(long *)(in_FS_OFFSET + 0x28);
  local_40 = 0;
  if (param_1 == (void *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("out != NULL","src/pk/rsa/MASKED.c",0x1e);
  }
  if (param_2 == 0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("outlen != NULL","src/pk/rsa/MASKED.c",0x1f);
  }
  if (param_4 == (int *)0x0) {
                    /* WARNING: Subroutine does not return */
    crypt_argchk("key != NULL","src/pk/rsa/MASKED.c",0x20);
  }
  if (*param_4 == 1) {
    uVar4 = *(undefined8 *)(param_4 + 6);
    if (param_3 == 1) {
      uVar2 = der_encode_sequence_multi
                        (param_1,param_2,3,1,&local_40,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),2,
                         1,*(undefined8 *)(param_4 + 4),2,1,*(undefined8 *)(param_4 + 8),2,1,
                         *(undefined8 *)(param_4 + 10),2,1,*(undefined8 *)(param_4 + 0xe),2,1,
                         *(undefined8 *)(param_4 + 0x10),2,1,*(undefined8 *)(param_4 + 0xc),0,0,0);
      goto LAB_0019225a;
    }
  }
  else {
    if (param_3 == 1) {
      uVar2 = 0x12;
      goto LAB_0019225a;
    }
    uVar4 = *(undefined8 *)(param_4 + 6);
  }
  if ((param_3 & 0x1000) == 0) {
    uVar2 = der_encode_sequence_multi
                      (param_1,param_2,2,1,uVar4,2,1,*(undefined8 *)(param_4 + 2),0,0,0);
  }
  else {
    iVar1 = (**(code **)(PTR_ltc_mp_001ecec8 + 0x68))();
    iVar3 = iVar1 + 7;
    if (-1 < iVar1) {
      iVar3 = iVar1;
    }
    local_38 = (long)(iVar3 >> 3) * 2 + 8;
    __ptr = malloc(local_38);
    uVar2 = 0xd;
    if (__ptr != (void *)0x0) {
      uVar2 = der_encode_sequence_multi
                        (__ptr,&local_38,2,1,*(undefined8 *)(param_4 + 6),2,1,
                         *(undefined8 *)(param_4 + 2),0,0,0);
      if ((int)uVar2 == 0) {
        uVar2 = der_encode_subject_public_key_info(param_1,param_2,0,__ptr,local_38,6,0,0);
      }
      if (param_1 != __ptr) {
        free(__ptr);
        uVar2 = uVar2 & 0xffffffff;
      }
    }
  }
LAB_0019225a:
  if (local_30 == *(long *)(in_FS_OFFSET + 0x28)) {
    return uVar2;
  }
                    /* WARNING: Subroutine does not return */
  __stack_chk_fail();
}

