xunge/DecIR huggingface dataset:
/* Type definitions */
struct m2ali_s {
  int dummy;
};
struct align_s {
  int dummy;
};

/* Variables and functions */
scalar_t__ Pop_m2ali(struct m2ali_s *, int *, int *, struct align_s **);
int /*<<< orphan*/ free(struct m2ali_s *);
void Free_m2ali(struct m2ali_s *stack) {
  while (Pop_m2ali(stack, (int *)NULL, (int *)NULL, (struct align_s **)NULL))
    ;
  free(stack);
}


x86 assembly (clang, -O0):
<Free_m2ali>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1040 <Pop_m2ali@plt>
cmp    $0x0,%rax
je     114e <Free_m2ali+0x2e>
jmp    112c <Free_m2ali+0xc>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Free_m2ali>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <Pop_m2ali@plt>
test   %rax,%rax
jne    1130 <Free_m2ali+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.m2ali_s = type { i32 }
%struct.align_s = type { i32 }
define void @Free_m2ali(%struct.m2ali_s* %0) {
%2 = alloca %struct.m2ali_s*
store %struct.m2ali_s* %0, %struct.m2ali_s** %2
br label %3
3: ; preds = %7, %1
%4 = load %struct.m2ali_s*, %struct.m2ali_s** %2
%5 = call i64 @Pop_m2ali(%struct.m2ali_s* %4, i32* null, i32* null, %struct.align_s** null)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %3
br label %3
8: ; preds = %3
%9 = load %struct.m2ali_s*, %struct.m2ali_s** %2
%10 = call i32 @free(%struct.m2ali_s* %9)
ret void
}

LLVM IR (-O2):
%struct.m2ali_s = type { i32 }
%struct.align_s = type { i32 }
define void @Free_m2ali(%struct.m2ali_s* %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i64 @Pop_m2ali(%struct.m2ali_s* %0, i32* null, i32* null, %struct.align_s** null)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
%6 = tail call i32 @free(%struct.m2ali_s* %0)
ret void
}
/* Variables and functions */
int strncmp(char *, char *, int);
int IsFailure(char *psz_text) { return strncmp(psz_text, "SUCCESS:", 8); }


x86 assembly (clang, -O0):
<IsFailure>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x8,%edx
call   1030 <strncmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsFailure>:
lea    0xee9(%rip),%rsi
mov    $0x8,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"SUCCESS:\00"
define i32 @IsFailure(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 %4
}

LLVM IR (-O2):
@.str = [9 x i8] c"SUCCESS:\00"
define i32 @IsFailure(i8* %0) {
%2 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 8)
ret i32 %2
}
/* Variables and functions */
int tracebackF3();
int tracebackF2(void) { return tracebackF3(); }


x86 assembly (clang, -O0):
<tracebackF2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tracebackF3@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tracebackF2>:
xor    %eax,%eax
jmp    1030 <tracebackF3@plt>

LLVM IR (-O0):
define i32 @tracebackF2() {
%1 = call i32 (...) @tracebackF3()
ret i32 %1
}

LLVM IR (-O2):
define i32 @tracebackF2() {
%1 = tail call i32 (...) @tracebackF3()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int voCore_gpioSetValue(char *, char *);
int voCore_gpioSetValueByIndex(int index, int valeur) {
  char indexChar[10];
  char valeurChar[10];
  sprintf(indexChar, "%d", index);
  sprintf(valeurChar, "%d", valeur);
  return voCore_gpioSetValue(indexChar, valeurChar);
}


x86 assembly (clang, -O0):
<voCore_gpioSetValueByIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec4(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x1c(%rbp),%rdi
mov    -0x8(%rbp),%edx
lea    0xeb1(%rip),%rsi
call   1030 <sprintf@plt>
lea    -0x12(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
call   1040 <voCore_gpioSetValue@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<voCore_gpioSetValueByIndex>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %esi,%ebx
mov    %edi,%edx
lea    0xeca(%rip),%r14
lea    0xe(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <sprintf@plt>
lea    0x4(%rsp),%r12
mov    %r12,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <sprintf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
call   1040 <voCore_gpioSetValue@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @voCore_gpioSetValueByIndex(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca [10 x i8]
%6 = alloca [10 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%11 = load i32, i32* %4
%12 = call i32 @sprintf(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = getelementptr inbounds [10 x i8], [10 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [10 x i8], [10 x i8]* %6, i64 0, i64 0
%15 = call i32 @voCore_gpioSetValue(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @voCore_gpioSetValueByIndex(i32 %0, i32 %1) {
%3 = alloca [10 x i8]
%4 = alloca [10 x i8]
%5 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [10 x i8], [10 x i8]* %4, i64 0, i64 0
%7 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%8 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%9 = call i32 @voCore_gpioSetValue(i8* %5, i8* %6)
ret i32 %9
}
/* Variables and functions */
int it87_gpio_set(int, int);
int it8712f_gpio31_raise(void) { return it87_gpio_set(32, 1); }


x86 assembly (clang, -O0):
<it8712f_gpio31_raise>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x1,%esi
call   1030 <it87_gpio_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<it8712f_gpio31_raise>:
mov    $0x20,%edi
mov    $0x1,%esi
jmp    1030 <it87_gpio_set@plt>

LLVM IR (-O0):
define i32 @it8712f_gpio31_raise() {
%1 = call i32 @it87_gpio_set(i32 32, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @it8712f_gpio31_raise() {
%1 = tail call i32 @it87_gpio_set(i32 32, i32 1)
ret i32 %1
}
const char *gp_file_name_current(void) { return "."; }


x86 assembly (clang, -O0):
<gp_file_name_current>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gp_file_name_current>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c".\00"
define i8* @gp_file_name_current() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [2 x i8] c".\00"
define i8* @gp_file_name_current() {
ret i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ default_handler();
__attribute__((weak)) void USBWakeUp_IRQHandler() { default_handler(); }


x86 assembly (clang, -O0):
<USBWakeUp_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <default_handler@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBWakeUp_IRQHandler>:
xor    %eax,%eax
jmp    1030 <default_handler@plt>

LLVM IR (-O0):
define weak void @USBWakeUp_IRQHandler() {
%1 = call i32 (...) @default_handler()
ret void
}

LLVM IR (-O2):
define weak void @USBWakeUp_IRQHandler() {
%1 = tail call i32 (...) @default_handler()
ret void
}
void kernel_panic(char *string, int number) {
  for (;;) {
  }
}


x86 assembly (clang, -O0):
<kernel_panic>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
jmp    110b <kernel_panic+0xb>

x86 assembly (clang, -O2):
<kernel_panic>:
jmp    1100 <kernel_panic>

LLVM IR (-O0):
define void @kernel_panic(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %5, %2
br label %5
}

LLVM IR (-O2):
define void @kernel_panic(i8* nocapture %0, i32 %1) {
br label %3
3: ; preds = %3, %2
br label %3
}
int level_shift(int level, int granule_sz) {
  return granule_sz + (3 - level) * (granule_sz - 3);
}


x86 assembly (clang, -O0):
<level_shift>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3,%ecx
sub    -0x4(%rbp),%ecx
mov    -0x8(%rbp),%edx
sub    $0x3,%edx
imul   %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<level_shift>:
mov    $0x3,%ecx
sub    %edi,%ecx
lea    -0x3(%rsi),%eax
imul   %ecx,%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @level_shift(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 3, %6
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 3
%10 = mul nsw i32 %7, %9
%11 = add nsw i32 %5, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @level_shift(i32 %0, i32 %1) {
%3 = sub nsw i32 3, %0
%4 = add nsw i32 %1, -3
%5 = mul nsw i32 %4, %3
%6 = add nsw i32 %5, %1
ret i32 %6
}
/* Variables and functions */
int potega(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main() { printf("%d^%d = %d\n", 3, 4, potega(3, 4)); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <potega@plt>
mov    %eax,%ecx
lea    0xec4(%rip),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
call   1040 <potega@plt>
lea    0xec9(%rip),%rdi
mov    $0x3,%esi
mov    $0x4,%edx
mov    %eax,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d^%d = %d\0A\00"
define i32 @main() {
%1 = call i32 @potega(i32 3, i32 4)
%2 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 3, i32 4, i32 %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d^%d = %d\0A\00"
define i32 @main() {
%1 = tail call i32 @potega(i32 3, i32 4)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 3, i32 4, i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ WSACleanup();
void win32_cleanup(void) { WSACleanup(); }


x86 assembly (clang, -O0):
<win32_cleanup>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <WSACleanup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<win32_cleanup>:
xor    %eax,%eax
jmp    1030 <WSACleanup@plt>

LLVM IR (-O0):
define void @win32_cleanup() {
%1 = call i32 (...) @WSACleanup()
ret void
}

LLVM IR (-O2):
define void @win32_cleanup() {
%1 = tail call i32 (...) @WSACleanup()
ret void
}
/* Variables and functions */
int DigitSum(int);
int DigitalRoot(int n) {
  if (n < 10) {
    return n;
  }
  return DigitalRoot(DigitSum(n));
}


x86 assembly (clang, -O0):
<DigitalRoot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1140 <DigitalRoot+0x20>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1152 <DigitalRoot+0x32>
mov    -0x8(%rbp),%edi
call   1030 <DigitSum@plt>
mov    %eax,%edi
call   1040 <DigitalRoot@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DigitalRoot>:
push   %rax
mov    %edi,%eax
cmp    $0xa,%edi
jl     112c <DigitalRoot+0x1c>
nopl   0x0(%rax,%rax,1)
mov    %eax,%edi
call   1030 <DigitSum@plt>
cmp    $0x9,%eax
jg     1120 <DigitalRoot+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @DigitalRoot(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
store i32 %7, i32* %2
br label %12
8: ; preds = %1
%9 = load i32, i32* %3
%10 = call i32 @DigitSum(i32 %9)
%11 = call i32 @DigitalRoot(i32 %10)
store i32 %11, i32* %2
br label %12
12: ; preds = %8, %6
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @DigitalRoot(i32 %0) {
%2 = icmp slt i32 %0, 10
br i1 %2, label %7, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = tail call i32 @DigitSum(i32 %4)
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %3
7: ; preds = %3, %1
%8 = phi i32 [ %0, %1 ], [ %5, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArr(int arr[], int m) {
  int i;
  for (i = 0; i < m; i++)
    printf("%d ", arr[i]);
  printf("\n");
  ;
}


x86 assembly (clang, -O0):
<printArr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printArr+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArr+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArr+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printArr(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d \00"
define void @printArr(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void sig_end(int sig) {
  fprintf(stderr, "trace-cmd: Received SIGINT\n");
  exit(0);
}


x86 assembly (clang, -O0):
<sig_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sig_end>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"trace-cmd: Received SIGINT\0A\00"
define void @sig_end(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"trace-cmd: Received SIGINT\0A\00"
define void @sig_end(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ cBreak();
int /*<<< orphan*/ dash();
void sT() {
  dash();
  cBreak();
}


x86 assembly (clang, -O0):
<sT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dash@plt>
mov    $0x0,%al
call   1040 <cBreak@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sT>:
push   %rax
xor    %eax,%eax
call   1030 <dash@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <cBreak@plt>

LLVM IR (-O0):
define void @sT() {
%1 = call i32 (...) @dash()
%2 = call i32 (...) @cBreak()
ret void
}

LLVM IR (-O2):
define void @sT() {
%1 = tail call i32 (...) @dash()
%2 = tail call i32 (...) @cBreak()
ret void
}
/* Type definitions */
struct process {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ process_start(struct process *const, int /*<<< orphan*/);
void autostart_start(struct process *const processes[]) {
  int i;
  for (i = 0; processes[i] != 0; ++i) {
    process_start(processes[i], 0);
    ;
  }
}


x86 assembly (clang, -O0):
<autostart_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     1157 <autostart_start+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
xor    %esi,%esi
call   1030 <process_start@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <autostart_start+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autostart_start>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1133 <autostart_start+0x23>
add    $0x8,%rbx
xor    %esi,%esi
call   1030 <process_start@plt>
mov    (%rbx),%rdi
add    $0x8,%rbx
test   %rdi,%rdi
jne    1120 <autostart_start+0x10>
pop    %rbx
ret

LLVM IR (-O0):
%struct.process = type { i32 }
define void @autostart_start(%struct.process** %0) {
%2 = alloca %struct.process**
%3 = alloca i32
store %struct.process** %0, %struct.process*** %2
store i32 0, i32* %3
br label %4
4: ; preds = %18, %1
%5 = load %struct.process**, %struct.process*** %2
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds %struct.process*, %struct.process** %5, i64 %7
%9 = load %struct.process*, %struct.process** %8
%10 = icmp ne %struct.process* %9, null
br i1 %10, label %11, label %21
11: ; preds = %4
%12 = load %struct.process**, %struct.process*** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds %struct.process*, %struct.process** %12, i64 %14
%16 = load %struct.process*, %struct.process** %15
%17 = call i32 @process_start(%struct.process* %16, i32 0)
br label %18
18: ; preds = %11
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
%struct.process = type { i32 }
define void @autostart_start(%struct.process** nocapture %0) {
%2 = load %struct.process*, %struct.process** %0
%3 = icmp eq %struct.process* %2, null
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi %struct.process* [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @process_start(%struct.process* %6, i32 0)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds %struct.process*, %struct.process** %0, i64 %8
%10 = load %struct.process*, %struct.process** %9
%11 = icmp eq %struct.process* %10, null
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void autofree_free(void **head) {
  void **p1, **p2;
  p1 = *head;
  *head = ((void *)0);
  while ((p2 = p1)) {
    p1 = *p2;
    free(p2);
  }
}


x86 assembly (clang, -O0):
<autofree_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     115d <autofree_free+0x4d>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
jmp    1132 <autofree_free+0x22>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autofree_free>:
push   %rbx
mov    %rdi,%rax
mov    (%rdi),%rdi
movq   $0x0,(%rax)
test   %rdi,%rdi
je     1140 <autofree_free+0x30>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    (%rdi),%rbx
call   1030 <free@plt>
mov    %rbx,%rdi
test   %rbx,%rbx
jne    1130 <autofree_free+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @autofree_free(i8** %0) {
%2 = alloca i8**
%3 = alloca i8**
%4 = alloca i8**
store i8** %0, i8*** %2
%5 = load i8**, i8*** %2
%6 = load i8*, i8** %5
%7 = bitcast i8* %6 to i8**
store i8** %7, i8*** %3
%8 = load i8**, i8*** %2
store i8* null, i8** %8
br label %9
9: ; preds = %12, %1
%10 = load i8**, i8*** %3
store i8** %10, i8*** %4
%11 = icmp ne i8** %10, null
br i1 %11, label %12, label %18
12: ; preds = %9
%13 = load i8**, i8*** %4
%14 = load i8*, i8** %13
%15 = bitcast i8* %14 to i8**
store i8** %15, i8*** %3
%16 = load i8**, i8*** %4
%17 = call i32 @free(i8** %16)
br label %9
18: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @autofree_free(i8** nocapture %0) {
%2 = bitcast i8** %0 to i8***
%3 = load i8**, i8*** %2
store i8* null, i8** %0
%4 = icmp eq i8** %3, null
br i1 %4, label %11, label %5
5: ; preds = %1, %5
%6 = phi i8** [ %8, %5 ], [ %3, %1 ]
%7 = bitcast i8** %6 to i8***
%8 = load i8**, i8*** %7
%9 = tail call i32 @free(i8** %6)
%10 = icmp eq i8** %8, null
br i1 %10, label %11, label %5
11: ; preds = %5, %1
ret void
}
void RTThreadCreateV(void) {}


x86 assembly (clang, -O0):
<RTThreadCreateV>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RTThreadCreateV>:
ret

LLVM IR (-O0):
define void @RTThreadCreateV() {
ret void
}

LLVM IR (-O2):
define void @RTThreadCreateV() {
ret void
}
/* Type definitions */
struct lnstat_file {
  int dummy;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int __lnstat_scan_fields(struct lnstat_file *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
int lnstat_scan_compat_rtstat_fields(struct lnstat_file *lf) {
  char buf[1024];
  strncpy(
      buf,
      "entries  in_hit in_slow_tot in_no_route in_brd in_martian_dst "
      "in_martian_src  out_hit out_slow_tot out_slow_mc  gc_total gc_ignored "
      "gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\n",
      sizeof(buf) - 1);
  return __lnstat_scan_fields(lf, buf);
}


x86 assembly (clang, -O0):
<lnstat_scan_compat_rtstat_fields>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
lea    0xec3(%rip),%rsi
mov    $0x3ff,%edx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rdi
lea    -0x410(%rbp),%rsi
call   1040 <__lnstat_scan_fields@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lnstat_scan_compat_rtstat_fields>:
push   %r14
push   %rbx
sub    $0x408,%rsp
mov    %rdi,%rbx
lea    0xecc(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x3ff,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <__lnstat_scan_fields@plt>
add    $0x408,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.lnstat_file = type { i32 }
@.str = [195 x i8] c"entries in_hit in_slow_tot in_no_route in_brd in_martian_dst in_martian_src out_hit out_slow_tot out_slow_mc gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\0A\00"
define i32 @lnstat_scan_compat_rtstat_fields(%struct.lnstat_file* %0) {
%2 = alloca %struct.lnstat_file*
%3 = alloca [1024 x i8]
store %struct.lnstat_file* %0, %struct.lnstat_file** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @strncpy(i8* %4, i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0), i32 1023)
%6 = load %struct.lnstat_file*, %struct.lnstat_file** %2
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @__lnstat_scan_fields(%struct.lnstat_file* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.lnstat_file = type { i32 }
@.str = [195 x i8] c"entries in_hit in_slow_tot in_no_route in_brd in_martian_dst in_martian_src out_hit out_slow_tot out_slow_mc gc_total gc_ignored gc_goal_miss gc_dst_overflow in_hlist_search out_hlist_search\0A\00"
define i32 @lnstat_scan_compat_rtstat_fields(%struct.lnstat_file* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @strncpy(i8* %3, i8* getelementptr inbounds ([195 x i8], [195 x i8]* @.str, i64 0, i64 0), i32 1023)
%5 = call i32 @__lnstat_scan_fields(%struct.lnstat_file* %0, i8* %3)
ret i32 %5
}
void renderiza_mundo_do_jogo() {}


x86 assembly (clang, -O0):
<renderiza_mundo_do_jogo>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renderiza_mundo_do_jogo>:
ret

LLVM IR (-O0):
define void @renderiza_mundo_do_jogo() {
ret void
}

LLVM IR (-O2):
define void @renderiza_mundo_do_jogo() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int munmap(void *, uintptr_t);
void x_cgo_munmap(void *addr, uintptr_t length) {
  int r;
  ;
  r = munmap(addr, length);
  ;
  if (r < 0) {
    abort();
  }
}


x86 assembly (clang, -O0):
<x_cgo_munmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <munmap@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1151 <x_cgo_munmap+0x31>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_cgo_munmap>:
push   %rax
call   1040 <munmap@plt>
test   %eax,%eax
js     112c <x_cgo_munmap+0xc>
pop    %rax
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @x_cgo_munmap(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i32 @munmap(i8* %6, i64 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = call i32 (...) @abort()
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
define void @x_cgo_munmap(i8* %0, i64 %1) {
%3 = tail call i32 @munmap(i8* %0, i64 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @abort()
unreachable
7: ; preds = %2
ret void
}
/* Variables and functions */
int rom_present(char *);
int genius_available() { return rom_present("8x12.bin"); }


x86 assembly (clang, -O0):
<genius_available>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <rom_present@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<genius_available>:
lea    0xee9(%rip),%rdi
jmp    1030 <rom_present@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"8x12.bin\00"
define i32 @genius_available() {
%1 = call i32 @rom_present(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [9 x i8] c"8x12.bin\00"
define i32 @genius_available() {
%1 = tail call i32 @rom_present(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t USBDMAChannelIntStatus(uint32_t ui32Base) {
  ;
  return ((*((volatile uint32_t *)(ui32Base + 0x00000200))));
}


x86 assembly (clang, -O0):
<USBDMAChannelIntStatus>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x200(%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelIntStatus>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x200(%rax),%rax
ret

LLVM IR (-O0):
define i64 @USBDMAChannelIntStatus(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 512
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @USBDMAChannelIntStatus(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add nsw i64 %3, 512
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int d_tag;
};
typedef TYPE_1__ Elf64_Dyn;

/* Variables and functions */
int dyncmp(void const *e1, void const *e2) {
  return ((Elf64_Dyn const *)e1)->d_tag - ((Elf64_Dyn const *)e2)->d_tag;
}


x86 assembly (clang, -O0):
<dyncmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    -0x10(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dyncmp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define i32 @dyncmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to %struct.TYPE_2__*
%7 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to %struct.TYPE_2__*
%11 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %10, i32 0, i32 0
%12 = load i32, i32* %11
%13 = sub nsw i32 %8, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @dyncmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int is_file_exist(char *file) {
  FILE *fp = fopen(file, "r");
  if (fp) {
    fclose(fp);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_file_exist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1160 <is_file_exist+0x40>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x1,-0x4(%rbp)
jmp    1167 <is_file_exist+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_file_exist>:
push   %rax
lea    0xed8(%rip),%rsi
call   1040 <fopen@plt>
test   %rax,%rax
je     1141 <is_file_exist+0x21>
mov    %rax,%rdi
call   1030 <fclose@plt>
mov    $0x1,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define i32 @is_file_exist(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32* @fopen(i8* %5, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = icmp ne i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32*, i32** %4
%11 = call i32 @fclose(i32* %10)
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %9
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define i32 @is_file_exist(i8* nocapture %0) {
%2 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @fclose(i32* %2)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 1, %4 ], [ 0, %1 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
int /*<<< orphan*/ glutTimerFunc(int, void (*)(int), int /*<<< orphan*/);
int /*<<< orphan*/ update();
void timerFunction(int t) {
  update();
  glutPostRedisplay();
  glutTimerFunc(10, timerFunction, 0);
}


x86 assembly (clang, -O0):
<timerFunction>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <update@plt>
mov    $0x0,%al
call   1050 <glutPostRedisplay@plt>
mov    $0xa,%edi
mov    0x2e8b(%rip),%rsi
xor    %edx,%edx
call   1040 <glutTimerFunc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timerFunction>:
push   %rax
xor    %eax,%eax
call   1030 <update@plt>
xor    %eax,%eax
call   1050 <glutPostRedisplay@plt>
mov    0x2e9a(%rip),%rsi
mov    $0xa,%edi
xor    %edx,%edx
pop    %rax
jmp    1040 <glutTimerFunc@plt>

LLVM IR (-O0):
define void @timerFunction(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @update()
%4 = call i32 (...) @glutPostRedisplay()
%5 = call i32 @glutTimerFunc(i32 10, void (i32)* @timerFunction, i32 0)
ret void
}

LLVM IR (-O2):
define void @timerFunction(i32 %0) {
%2 = tail call i32 (...) @update()
%3 = tail call i32 (...) @glutPostRedisplay()
%4 = tail call i32 @glutTimerFunc(i32 10, void (i32)* @timerFunction, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int number = 1;
  int product = 1;
  while (number <= 15) {
    product = product * number;
    number = number + 2;
  }
  printf("the product of odd numbers from [1 to 15] is: %d", product);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0xf,-0x8(%rbp)
jg     114f <main+0x3f>
mov    -0xc(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x1eee11,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"the product of odd numbers from [1 to 15] is: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %7, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 15
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = mul nsw i32 %8, %9
store i32 %10, i32* %3
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 2
store i32 %12, i32* %2
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [49 x i8] c"the product of odd numbers from [1 to 15] is: %d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 2027025)
ret i32 0
}
unsigned long PECIDomainMaxReadGet(unsigned long ulBase,
                                   unsigned long ulDomain) {
  ;
  ;
  return (
      (((*((volatile unsigned long *)(ulBase + 0x00000040 + (ulDomain * 4)))) &
        0xFFFF0000) >>
       16));
}


x86 assembly (clang, -O0):
<PECIDomainMaxReadGet>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rax
mov    -0x10(%rbp),%rcx
shl    $0x2,%rcx
add    %rcx,%rax
mov    (%rax),%rax
movabs $0xffff0000,%rcx
and    %rcx,%rax
shr    $0x10,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<PECIDomainMaxReadGet>:
mov    0x40(%rdi,%rsi,4),%rax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define i64 @PECIDomainMaxReadGet(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = add i64 %5, 64
%7 = load i64, i64* %4
%8 = mul i64 %7, 4
%9 = add i64 %6, %8
%10 = inttoptr i64 %9 to i64*
%11 = load volatile i64, i64* %10
%12 = and i64 %11, 4294901760
%13 = lshr i64 %12, 16
ret i64 %13
}

LLVM IR (-O2):
define i64 @PECIDomainMaxReadGet(i64 %0, i64 %1) {
%3 = add i64 %0, 64
%4 = shl i64 %1, 2
%5 = add i64 %3, %4
%6 = inttoptr i64 %5 to i64*
%7 = load volatile i64, i64* %6
%8 = lshr i64 %7, 16
%9 = and i64 %8, 65535
ret i64 %9
}
/* Variables and functions */
void *malloc(size_t);
void *memCxtAlloc(void *current, size_t needed) { return (malloc(needed)); }


x86 assembly (clang, -O0):
<memCxtAlloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memCxtAlloc>:
mov    %rsi,%rdi
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define i8* @memCxtAlloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = call i8* @malloc(i64 %5)
ret i8* %6
}

LLVM IR (-O2):
define noalias i8* @memCxtAlloc(i8* nocapture readnone %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(void const *, void const *);
int compare_strings(const void *k1, const void *k2) {
  if (k1 == k2)
    return 1;
  else if (k1 == 0 || k2 == 0)
    return 0;
  else
    return !strcmp(k1, k2);
}


x86 assembly (clang, -O0):
<compare_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113a <compare_strings+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1179 <compare_strings+0x69>
cmpq   $0x0,-0x10(%rbp)
je     1150 <compare_strings+0x40>
cmpq   $0x0,-0x18(%rbp)
jne    115c <compare_strings+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1179 <compare_strings+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_strings>:
cmp    %rsi,%rdi
je     1135 <compare_strings+0x25>
xor    %eax,%eax
test   %rdi,%rdi
je     1134 <compare_strings+0x24>
test   %rsi,%rsi
je     1134 <compare_strings+0x24>
push   %rax
call   1030 <strcmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @compare_strings(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %24
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %13, %10
store i32 0, i32* %3
br label %24
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = call i32 @strcmp(i8* %18, i8* %19)
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
store i32 %23, i32* %3
br label %24
24: ; preds = %17, %16, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @compare_strings(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
%6 = icmp eq i8* %1, null
%7 = or i1 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %2, %8
%13 = phi i32 [ %11, %8 ], [ 1, %2 ], [ 0, %4 ]
ret i32 %13
}
int main() {
  int i;
  for (i = 0; i < 10; i++) {
  }
  return i;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    112f <main+0x2f>
jmp    1121 <main+0x21>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xa,%eax
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 10
br i1 %5, label %6, label %10
6: ; preds = %3
br label %7
7: ; preds = %6
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Please enter only one argument.\nMake sure the directory actually "
         "exists!\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [74 x i8] c"Please enter only one argument.\0AMake sure the directory actually exists!\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [73 x i8] c"Please enter only one argument.\0AMake sure the directory actually exists!\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct vec3i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec3i_assign(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
__attribute__((always_)) struct vec3i *psvec3i_assign(struct vec3i *result,
                                                      struct vec3i *a) {
  vec3i_assign((int32_t *)result, (int32_t *)a);
  return result;
}


x86 assembly (clang, -O0):
<psvec3i_assign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <vec3i_assign@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psvec3i_assign>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec3i_assign@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_assign(%struct.vec3i* %0, %struct.vec3i* %1) {
%3 = alloca %struct.vec3i*
%4 = alloca %struct.vec3i*
store %struct.vec3i* %0, %struct.vec3i** %3
store %struct.vec3i* %1, %struct.vec3i** %4
%5 = load %struct.vec3i*, %struct.vec3i** %3
%6 = bitcast %struct.vec3i* %5 to i32*
%7 = load %struct.vec3i*, %struct.vec3i** %4
%8 = bitcast %struct.vec3i* %7 to i32*
%9 = call i32 @vec3i_assign(i32* %6, i32* %8)
%10 = load %struct.vec3i*, %struct.vec3i** %3
ret %struct.vec3i* %10
}

LLVM IR (-O2):
%struct.vec3i = type { i32 }
define %struct.vec3i* @psvec3i_assign(%struct.vec3i* returned %0, %struct.vec3i* %1) {
%3 = getelementptr %struct.vec3i, %struct.vec3i* %0, i64 0, i32 0
%4 = getelementptr %struct.vec3i, %struct.vec3i* %1, i64 0, i32 0
%5 = tail call i32 @vec3i_assign(i32* %3, i32* %4)
ret %struct.vec3i* %0
}
void yy_1_HorizontalRuleTransient(char *yytext, int yyleng) {
  ;
  ;
}


x86 assembly (clang, -O0):
<yy_1_HorizontalRuleTransient>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<yy_1_HorizontalRuleTransient>:
ret

LLVM IR (-O0):
define void @yy_1_HorizontalRuleTransient(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @yy_1_HorizontalRuleTransient(i8* nocapture %0, i32 %1) {
ret void
}
int video_set_window_size(int rows, int cols) { return 1; }


x86 assembly (clang, -O0):
<video_set_window_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<video_set_window_size>:
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @video_set_window_size(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret i32 1
}

LLVM IR (-O2):
define i32 @video_set_window_size(i32 %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *);
int /*<<< orphan*/ output_w32(int);
void emit_fcmpd(int x, int y) {
  assem_debug("fcmpd d6, d7");
  output_w32(0xeeb46b47);
}


x86 assembly (clang, -O0):
<emit_fcmpd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xecb(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xeeb46b47,%edi
call   1040 <output_w32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fcmpd>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xeeb46b47,%edi
pop    %rax
jmp    1040 <output_w32@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"fcmpd d6, d7\00"
define void @emit_fcmpd(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @assem_debug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @output_w32(i32 -290165945)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"fcmpd d6, d7\00"
define void @emit_fcmpd(i32 %0, i32 %1) {
%3 = tail call i32 @assem_debug(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @output_w32(i32 -290165945)
ret void
}