// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x78dd(%rip), %rsi      # 0xcaa6
callq 0x32a0
testl %eax, %eax
jne 0x51df
leaq 0x1607f(%rip), %rax     # 0x1b258
movl $0x1, (%rax)
leaq 0x78c9(%rip), %rsi      # 0xcaaf
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x51ff
leaq 0x16063(%rip), %rax     # 0x1b25c
movl $0x1, (%rax)
leaq 0x789f(%rip), %rsi      # 0xcaa5
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x521f
leaq 0x16047(%rip), %rax     # 0x1b260
movl $0x1, (%rax)
leaq 0x7888(%rip), %rsi      # 0xcaae
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x523f
leaq 0x1602b(%rip), %rax     # 0x1b264
movl $0x1, (%rax)
leaq 0x7847(%rip), %rsi      # 0xca8d
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x525f
leaq 0x1600f(%rip), %rax     # 0x1b268
movl $0x1, (%rax)
leaq 0x782d(%rip), %rsi      # 0xca93
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x527f
leaq 0x15ff3(%rip), %rax     # 0x1b26c
movl $0x1, (%rax)
leaq 0x7812(%rip), %rsi      # 0xca98
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x529f
leaq 0x15fd7(%rip), %rax     # 0x1b270
movl $0x1, (%rax)
leaq 0x77f9(%rip), %rsi      # 0xca9f
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x52bf
leaq 0x15fbb(%rip), %rax     # 0x1b274
movl $0x1, (%rax)
leaq 0x15f8e(%rip), %rax     # 0x1b254
movl (%rax), %eax
decl %eax
cmpl $0x3, %eax
ja 0x554c
leaq 0x7796(%rip), %rcx      # 0xca70
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0x77a9(%rip), %rsi      # 0xca93
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x5303
leaq 0x15f6b(%rip), %rax     # 0x1b268
movl $0x1, (%rax)
leaq 0x778a(%rip), %rsi      # 0xca94
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x5556
leaq 0x7772(%rip), %rsi      # 0xca93
jmp 0x5540
leaq 0x7767(%rip), %rsi      # 0xca94
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x5346
leaq 0x15f18(%rip), %rax     # 0x1b258
movl $0x1, (%rax)
leaq 0x7741(%rip), %rsi      # 0xca8e
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x5366
leaq 0x15efc(%rip), %rax     # 0x1b25c
movl $0x1, (%rax)
leaq 0x7726(%rip), %rsi      # 0xca93
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x5386
leaq 0x15ee0(%rip), %rax     # 0x1b260
movl $0x1, (%rax)
leaq 0x7700(%rip), %rsi      # 0xca8d
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x53a6
leaq 0x15ec4(%rip), %rax     # 0x1b264
movl $0x1, (%rax)
leaq 0x76e7(%rip), %rsi      # 0xca94
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x53d0
leaq 0x76ce(%rip), %rsi      # 0xca8e
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x548a
leaq 0x76cf(%rip), %rdi      # 0xcaa6
jmp 0x556f
leaq 0x76b1(%rip), %rsi      # 0xca94
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x53fc
leaq 0x15e66(%rip), %rax     # 0x1b25c
movl $0x1, (%rax)
leaq 0x768b(%rip), %rsi      # 0xca8e
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x541c
leaq 0x15e46(%rip), %rax     # 0x1b25c
movl $0x1, (%rax)
leaq 0x7670(%rip), %rsi      # 0xca93
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x543c
leaq 0x15e2e(%rip), %rax     # 0x1b264
movl $0x1, (%rax)
leaq 0x764a(%rip), %rsi      # 0xca8d
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x545c
leaq 0x15e0e(%rip), %rax     # 0x1b264
movl $0x1, (%rax)
leaq 0x7631(%rip), %rsi      # 0xca94
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x555f
leaq 0x7614(%rip), %rsi      # 0xca8e
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x555f
leaq 0x7602(%rip), %rsi      # 0xca93
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x54b4
leaq 0x75e9(%rip), %rsi      # 0xca8d
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x554c
leaq 0x75f3(%rip), %rdi      # 0xcaae
jmp 0x556f
leaq 0x75cc(%rip), %rsi      # 0xca93
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x54e0
leaq 0x15d8e(%rip), %rax     # 0x1b268
movl $0x1, (%rax)
leaq 0x75a6(%rip), %rsi      # 0xca8d
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
jne 0x5500
leaq 0x15d6e(%rip), %rax     # 0x1b268
movl $0x1, (%rax)
leaq 0x758d(%rip), %rsi      # 0xca94
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x5556
leaq 0x7574(%rip), %rsi      # 0xca8e
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x5556
leaq 0x7566(%rip), %rsi      # 0xca93
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x5568
leaq 0x754d(%rip), %rsi      # 0xca8d
movq %rbx, %rdi
callq 0x32a0
testl %eax, %eax
je 0x5568
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x7531(%rip), %rdi      # 0xca8e
jmp 0x556f
leaq 0x7549(%rip), %rdi      # 0xcaaf
jmp 0x556f
leaq 0x751e(%rip), %rdi      # 0xca8d
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x3350