#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ get_excel_col_name_from_excel_col_num(int);
int /*<<< orphan*/ strcmp(char *, int /*<<< orphan*/);
int main() {
  assert(!strcmp("", get_excel_col_name_from_excel_col_num(-52)));
  assert(!strcmp("", get_excel_col_name_from_excel_col_num(0)));
  assert(!strcmp("A", get_excel_col_name_from_excel_col_num(1)));
  assert(!strcmp("B", get_excel_col_name_from_excel_col_num(2)));
  assert(!strcmp("Z", get_excel_col_name_from_excel_col_num(26)));
  assert(!strcmp("AA", get_excel_col_name_from_excel_col_num(27)));
  assert(!strcmp("AZ", get_excel_col_name_from_excel_col_num(52)));
  assert(!strcmp("ZZ", get_excel_col_name_from_excel_col_num(702)));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffffcc,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %edi,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %eax,%esi
lea    0xe8b(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %eax,%esi
lea    0xe60(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x2,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %eax,%esi
lea    0xe33(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1a,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %eax,%esi
lea    0xe0f(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x1b,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %eax,%esi
lea    0xde1(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x34,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %eax,%esi
lea    0xdba(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    $0x2be,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %eax,%esi
lea    0xd93(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffcc,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
lea    0xec2(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
xor    %edi,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
lea    0xe7b(%rip),%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x2,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
lea    0xe53(%rip),%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1a,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
lea    0xe34(%rip),%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x1b,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
lea    0xe0b(%rip),%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x34,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
lea    0xde9(%rip),%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
mov    $0x2be,%edi
call   1030 <get_excel_col_name_from_excel_col_num@plt>
lea    0xdc7(%rip),%rdi
mov    %eax,%esi
call   1040 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1050 <assert@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"Z\00"
@.str.4 = [3 x i8] c"AA\00"
@.str.5 = [3 x i8] c"AZ\00"
@.str.6 = [3 x i8] c"ZZ\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @get_excel_col_name_from_excel_col_num(i32 -52)
%3 = call i32 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = icmp ne i32 %3, 0
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = call i32 @get_excel_col_name_from_excel_col_num(i32 0)
%9 = call i32 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = call i32 @get_excel_col_name_from_excel_col_num(i32 1)
%15 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = icmp ne i32 %15, 0
%17 = xor i1 %16, true
%18 = zext i1 %17 to i32
%19 = call i32 @assert(i32 %18)
%20 = call i32 @get_excel_col_name_from_excel_col_num(i32 2)
%21 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %20)
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
%25 = call i32 @assert(i32 %24)
%26 = call i32 @get_excel_col_name_from_excel_col_num(i32 26)
%27 = call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %26)
%28 = icmp ne i32 %27, 0
%29 = xor i1 %28, true
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
%32 = call i32 @get_excel_col_name_from_excel_col_num(i32 27)
%33 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %32)
%34 = icmp ne i32 %33, 0
%35 = xor i1 %34, true
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = call i32 @get_excel_col_name_from_excel_col_num(i32 52)
%39 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %38)
%40 = icmp ne i32 %39, 0
%41 = xor i1 %40, true
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42)
%44 = call i32 @get_excel_col_name_from_excel_col_num(i32 702)
%45 = call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %44)
%46 = icmp ne i32 %45, 0
%47 = xor i1 %46, true
%48 = zext i1 %47 to i32
%49 = call i32 @assert(i32 %48)
ret i32 0
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [2 x i8] c"B\00"
@.str.3 = [2 x i8] c"Z\00"
@.str.4 = [3 x i8] c"AA\00"
@.str.5 = [3 x i8] c"AZ\00"
@.str.6 = [3 x i8] c"ZZ\00"
define i32 @main() {
%1 = tail call i32 @get_excel_col_name_from_excel_col_num(i32 -52)
%2 = tail call i32 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @get_excel_col_name_from_excel_col_num(i32 0)
%7 = tail call i32 @strcmp(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = tail call i32 @get_excel_col_name_from_excel_col_num(i32 1)
%12 = tail call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = icmp eq i32 %12, 0
%14 = zext i1 %13 to i32
%15 = tail call i32 @assert(i32 %14)
%16 = tail call i32 @get_excel_col_name_from_excel_col_num(i32 2)
%17 = tail call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = icmp eq i32 %17, 0
%19 = zext i1 %18 to i32
%20 = tail call i32 @assert(i32 %19)
%21 = tail call i32 @get_excel_col_name_from_excel_col_num(i32 26)
%22 = tail call i32 @strcmp(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0), i32 %21)
%23 = icmp eq i32 %22, 0
%24 = zext i1 %23 to i32
%25 = tail call i32 @assert(i32 %24)
%26 = tail call i32 @get_excel_col_name_from_excel_col_num(i32 27)
%27 = tail call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%28 = icmp eq i32 %27, 0
%29 = zext i1 %28 to i32
%30 = tail call i32 @assert(i32 %29)
%31 = tail call i32 @get_excel_col_name_from_excel_col_num(i32 52)
%32 = tail call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %31)
%33 = icmp eq i32 %32, 0
%34 = zext i1 %33 to i32
%35 = tail call i32 @assert(i32 %34)
%36 = tail call i32 @get_excel_col_name_from_excel_col_num(i32 702)
%37 = tail call i32 @strcmp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 %36)
%38 = icmp eq i32 %37, 0
%39 = zext i1 %38 to i32
%40 = tail call i32 @assert(i32 %39)
ret i32 0
}