// File: /workspace/github_cpp_makefile_star2_O1/zgimbutas[P]mwrap/src/mwrap-ast.cc
// Function: promote_int(char*)
char *promote_int(char* name)
{
  /* Detect C99 types: int32_t, int64_t, uint32_t, uint64_t */
  if( strcmp(name,"int32_t") == 0 ) mw_use_int32_t = 1;
  if( strcmp(name,"int64_t") == 0 ) mw_use_int64_t = 1;
  if( strcmp(name,"uint32_t") == 0 ) mw_use_uint32_t = 1;
  if( strcmp(name,"uint64_t") == 0 ) mw_use_uint64_t = 1;

  if( strcmp(name,"ulong") == 0 ) mw_use_ulong = 1;
  if( strcmp(name,"uint") == 0 ) mw_use_uint = 1;
  if( strcmp(name,"ushort") == 0 ) mw_use_ushort = 1;
  if( strcmp(name,"uchar") == 0 ) mw_use_uchar = 1;

  /* Promote integers */
  if( mw_promote_int == 1 )
    {      
      if( strcmp(name,"uint") == 0 ) mw_use_ulong = 1;
      if( strcmp(name,"int") == 0 ) return strdup("long");
      if( strcmp(name,"uint") == 0 ) return strdup("ulong");
    }
  if( mw_promote_int == 2 )
    {      
      if( strcmp(name,"uint") == 0 ) mw_use_ulong = 1;
      if( strcmp(name,"ulong") == 0 ) mw_use_ulong = 1;
      if( strcmp(name,"int") == 0 ) return strdup("long");
      if( strcmp(name,"long") == 0 ) return strdup("long");
      if( strcmp(name,"uint") == 0 ) return strdup("ulong");
      if( strcmp(name,"ulong") == 0 ) return strdup("ulong");
    }
  if( mw_promote_int == 3 )
    {      
      if( strcmp(name,"int") == 0 ) mw_use_int32_t = 1;
      if( strcmp(name,"long") == 0 ) mw_use_int64_t = 1;
      if( strcmp(name,"uint") == 0 ) mw_use_uint32_t = 1;
      if( strcmp(name,"ulong") == 0 ) mw_use_uint64_t = 1;
      if( strcmp(name,"int") == 0 ) return strdup("int32_t");
      if( strcmp(name,"long") == 0 ) return strdup("int32_t");
      if( strcmp(name,"uint") == 0 ) return strdup("uint64_t");
      if( strcmp(name,"ulong") == 0 ) return strdup("uint64_t");
    }
  if( mw_promote_int == 4 )
    {      
      if( strcmp(name,"int") == 0 ) mw_use_int64_t = 1;
      if( strcmp(name,"long") == 0 ) mw_use_int64_t = 1;
      if( strcmp(name,"uint") == 0 ) mw_use_uint64_t = 1;
      if( strcmp(name,"ulong") == 0 ) mw_use_uint64_t = 1;
      if( strcmp(name,"int") == 0 ) return strdup("int64_t");
      if( strcmp(name,"long") == 0 ) return strdup("int64_t");
      if( strcmp(name,"uint") == 0 ) return strdup("uint64_t");
      if( strcmp(name,"ulong") == 0 ) return strdup("uint64_t");
    }
  return name;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
leaq 0x8139(%rip), %rsi      # 0xdad6
callq 0x3260
testl %eax, %eax
jne 0x59b3
leaq 0x1688b(%rip), %rax     # 0x1c238
movl $0x1, (%rax)
leaq 0x8125(%rip), %rsi      # 0xdadf
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x59d3
leaq 0x1686f(%rip), %rax     # 0x1c23c
movl $0x1, (%rax)
leaq 0x80fb(%rip), %rsi      # 0xdad5
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x59f3
leaq 0x16853(%rip), %rax     # 0x1c240
movl $0x1, (%rax)
leaq 0x80e4(%rip), %rsi      # 0xdade
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5a13
leaq 0x16837(%rip), %rax     # 0x1c244
movl $0x1, (%rax)
leaq 0x80a3(%rip), %rsi      # 0xdabd
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5a33
leaq 0x1681b(%rip), %rax     # 0x1c248
movl $0x1, (%rax)
leaq 0x8089(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5a53
leaq 0x167ff(%rip), %rax     # 0x1c24c
movl $0x1, (%rax)
leaq 0x806e(%rip), %rsi      # 0xdac8
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5a73
leaq 0x167e3(%rip), %rax     # 0x1c250
movl $0x1, (%rax)
leaq 0x8055(%rip), %rsi      # 0xdacf
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5a93
leaq 0x167c7(%rip), %rax     # 0x1c254
movl $0x1, (%rax)
leaq 0x1679a(%rip), %rax     # 0x1c234
movl (%rax), %r14d
leal -0x1(%r14), %eax
cmpl $0x3, %eax
ja 0x5d88
leaq 0x7fef(%rip), %rcx      # 0xdaa0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x8002(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5ada
leaq 0x16774(%rip), %rax     # 0x1c248
movl $0x1, (%rax)
leaq 0x7fe3(%rip), %rsi      # 0xdac4
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5d90
leaq 0x7fcb(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5db4
cmpl $0x4, %r14d
je 0x5cbc
cmpl $0x3, %r14d
je 0x5bd6
cmpl $0x2, %r14d
jne 0x5d88
leaq 0x7f96(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5b46
leaq 0x16708(%rip), %rax     # 0x1c248
movl $0x1, (%rax)
leaq 0x7f70(%rip), %rsi      # 0xdabd
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5b66
leaq 0x166e8(%rip), %rax     # 0x1c248
movl $0x1, (%rax)
leaq 0x7f57(%rip), %rsi      # 0xdac4
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5d90
leaq 0x7f3a(%rip), %rsi      # 0xdabe
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5d90
leaq 0x7f28(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5db4
leaq 0x7f0b(%rip), %rsi      # 0xdabd
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5db4
cmpl $0x4, %r14d
je 0x5cbc
cmpl $0x3, %r14d
jne 0x5d88
leaq 0x7ee7(%rip), %rsi      # 0xdac4
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5bf6
leaq 0x16648(%rip), %rax     # 0x1c238
movl $0x1, (%rax)
leaq 0x7ec1(%rip), %rsi      # 0xdabe
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5c16
leaq 0x1662c(%rip), %rax     # 0x1c23c
movl $0x1, (%rax)
leaq 0x7ea6(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5c36
leaq 0x16610(%rip), %rax     # 0x1c240
movl $0x1, (%rax)
leaq 0x7e80(%rip), %rsi      # 0xdabd
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5c56
leaq 0x165f4(%rip), %rax     # 0x1c244
movl $0x1, (%rax)
leaq 0x7e67(%rip), %rsi      # 0xdac4
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5da2
leaq 0x7e4a(%rip), %rsi      # 0xdabe
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5da2
leaq 0x7e38(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5dab
leaq 0x7e1b(%rip), %rsi      # 0xdabd
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5dab
cmpl $0x4, %r14d
jne 0x5d88
leaq 0x7e01(%rip), %rsi      # 0xdac4
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5cdc
leaq 0x16566(%rip), %rax     # 0x1c23c
movl $0x1, (%rax)
leaq 0x7ddb(%rip), %rsi      # 0xdabe
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5cfc
leaq 0x16546(%rip), %rax     # 0x1c23c
movl $0x1, (%rax)
leaq 0x7dc0(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5d1c
leaq 0x1652e(%rip), %rax     # 0x1c244
movl $0x1, (%rax)
leaq 0x7d9a(%rip), %rsi      # 0xdabd
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
jne 0x5d3c
leaq 0x1650e(%rip), %rax     # 0x1c244
movl $0x1, (%rax)
leaq 0x7d81(%rip), %rsi      # 0xdac4
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5d99
leaq 0x7d68(%rip), %rsi      # 0xdabe
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5d99
leaq 0x7d5a(%rip), %rsi      # 0xdac3
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5dab
leaq 0x7d41(%rip), %rsi      # 0xdabd
movq %rbx, %rdi
callq 0x3260
testl %eax, %eax
je 0x5dab
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7d27(%rip), %rdi      # 0xdabe
jmp 0x5dbb
leaq 0x7d3f(%rip), %rdi      # 0xdadf
jmp 0x5dbb
leaq 0x7d2d(%rip), %rdi      # 0xdad6
jmp 0x5dbb
leaq 0x7d2c(%rip), %rdi      # 0xdade
jmp 0x5dbb
leaq 0x7d02(%rip), %rdi      # 0xdabd
popq %rbx
popq %r14
popq %rbp
jmp 0x3320