xunge/DecIR huggingface dataset:
void LiberarMem2D(double **x, int filas) {
  int f = 0;
  for (f = 0; f < filas; f++) {
    free(x[f]);
  }
  free(x);
}


x86 assembly (clang, -O0):
<LiberarMem2D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1158 <LiberarMem2D+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112d <LiberarMem2D+0x1d>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LiberarMem2D>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <LiberarMem2D+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <LiberarMem2D+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @LiberarMem2D(double** %0, i32 %1) {
%3 = alloca double**
%4 = alloca i32
%5 = alloca i32
store double** %0, double*** %3
store i32 %1, i32* %4
store i32 0, i32* %5
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 double**, double*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds double*, double** %11, i64 %13
%15 = load double*, double** %14
%16 = bitcast double* %15 to i8*
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 = load double**, double*** %3
%22 = bitcast double** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @LiberarMem2D(double** 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 double*, double** %0, i64 %7
%9 = bitcast double** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%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 = bitcast double** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ system(char *);
int main() {
  chdir("/mnt/user/code/ETCalibrator/target/classes");
  system("/mnt/user/jvm/java Main");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <chdir@plt>
lea    0xef4(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <chdir@plt>
lea    0xef7(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [43 x i8] c"/mnt/user/code/ETCalibrator/target/classes\00"
@.str.1 = [24 x i8] c"/mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = call i32 @chdir(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [43 x i8] c"/mnt/user/code/ETCalibrator/target/classes\00"
@.str.1 = [24 x i8] c"/mnt/user/jvm/java Main\00"
define i32 @main() {
%1 = tail call i32 @chdir(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
XFreeFontInfo() {}


x86 assembly (clang, -O0):
<XFreeFontInfo>:
push   %rbp
mov    %rsp,%rbp
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @XFreeFontInfo() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XFreeFontInfo() {
ret i32 undef
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
size_t aes_getreadcount();
uint32_t aescnt_checkread() {
  size_t ret = aes_getreadcount();
  return (ret <= 3);
}


x86 assembly (clang, -O0):
<aescnt_checkread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <aes_getreadcount@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x3,-0x8(%rbp)
setbe  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aescnt_checkread>:
push   %rax
xor    %eax,%eax
call   1030 <aes_getreadcount@plt>
xor    %ecx,%ecx
cmp    $0x4,%rax
setb   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @aescnt_checkread() {
%1 = alloca i64
%2 = call i64 (...) @aes_getreadcount()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp ule i64 %3, 3
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @aescnt_checkread() {
%1 = tail call i64 (...) @aes_getreadcount()
%2 = icmp ult i64 %1, 4
%3 = zext i1 %2 to i32
ret i32 %3
}
int over_state_destroy(void) { return 0; }


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

x86 assembly (clang, -O2):
<over_state_destroy>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @over_state_destroy() {
ret i32 0
}

LLVM IR (-O2):
define i32 @over_state_destroy() {
ret i32 0
}
void on_publish(struct mosquitto *m, void *udata, int m_id) { ; }


x86 assembly (clang, -O0):
<on_publish>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.mosquitto = type opaque
define void @on_publish(%struct.mosquitto* %0, i8* %1, i32 %2) {
%4 = alloca %struct.mosquitto*
%5 = alloca i8*
%6 = alloca i32
store %struct.mosquitto* %0, %struct.mosquitto** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.mosquitto = type opaque
define void @on_publish(%struct.mosquitto* nocapture %0, i8* nocapture %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ input(char *, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char buf[512];
  input("Enter something: ", buf, sizeof(buf));
  printf("You entered: '%s'\n", buf);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x210(%rbp),%rsi
lea    0xec0(%rip),%rdi
mov    $0x200,%edx
call   1030 <input@plt>
lea    -0x210(%rbp),%rsi
lea    0xeba(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x200,%rsp
lea    0xed1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
mov    $0x200,%edx
call   1030 <input@plt>
lea    0xecc(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter something: \00"
@.str.1 = [19 x i8] c"You entered: '%s'\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [512 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = call i32 @input(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3, i32 512)
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%6 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter something: \00"
@.str.1 = [19 x i8] c"You entered: '%s'\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [512 x i8]
%2 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%3 = call i32 @input(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %2, i32 512)
%4 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void thread_self() { exit(1); }


x86 assembly (clang, -O0):
<thread_self>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<thread_self>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @thread_self() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @thread_self() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArr(int *arr, int arrLength) {
  for (int i = 0; i < arrLength; 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 %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
void udelay(unsigned long usecs) { assert(0); }


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

x86 assembly (clang, -O2):
<udelay>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @udelay(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 @assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @udelay(i64 %0) {
%2 = tail call i32 @assert(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void pmu_adc_reset_setting() {
  mbus_remote_register_write(0x6, 0x3C,
                             ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3) |
                              (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7) |
                              (1 << 8) | (1 << 9) | (1 << 10) | (0 << 11) |
                              (0 << 12) | (0 << 13) | (1 << 14) | (1 << 15) |
                              (1 << 16) | (1 << 17) | (1 << 18) | (1 << 19)));
  delay(200);
}


x86 assembly (clang, -O0):
<pmu_adc_reset_setting>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x3c,%esi
mov    $0xfc7ff,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pmu_adc_reset_setting>:
push   %rax
mov    $0x6,%edi
mov    $0x3c,%esi
mov    $0xfc7ff,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @pmu_adc_reset_setting() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 60, i32 1034239)
%2 = call i32 @delay(i32 200)
ret void
}

LLVM IR (-O2):
define void @pmu_adc_reset_setting() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 60, i32 1034239)
%2 = tail call i32 @delay(i32 200)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int func1() {
  printf("Hello Func1!\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<func1>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello Func1!\0A\00"
define i32 @func1() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello Func1!\00"
define i32 @func1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ p(char *);
void p_good() { p("good "); }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"good \00"
define void @p_good() {
%1 = call i32 @p(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"good \00"
define void @p_good() {
%1 = tail call i32 @p(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ merge(float *, int, int, int);
void mergeSort(float arr[], int start, int end) {
  if (start < end) {
    int mid = (start + end) / 2;
    mergeSort(arr, start, mid);
    mergeSort(arr, mid + 1, end);
    merge(arr, start, mid, end);
  }
}


x86 assembly (clang, -O0):
<mergeSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1182 <mergeSort+0x62>
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <mergeSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1040 <merge@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mergeSort>:
cmp    %edx,%esi
jge    1172 <mergeSort+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %esi,%r12d
mov    %rdi,%r15
lea    (%r14,%r12,1),%eax
mov    %eax,%ebx
shr    $0x1f,%ebx
add    %eax,%ebx
sar    %ebx
mov    %ebx,%edx
call   1030 <mergeSort@plt>
lea    0x1(%rbx),%esi
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <mergeSort@plt>
mov    %r15,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1040 <merge@plt>
ret

LLVM IR (-O0):
define void @mergeSort(float* %0, i32 %1, i32 %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store float* %0, float** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %28
11: ; preds = %3
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
%15 = sdiv i32 %14, 2
store i32 %15, i32* %7
%16 = load float*, float** %4
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = load float*, float** %4
%20 = load i32, i32* %7
%21 = add nsw i32 %20, 1
%22 = load i32, i32* %6
%23 = load float*, float** %4
%24 = load i32, i32* %5
%25 = load i32, i32* %7
%26 = load i32, i32* %6
%27 = call i32 @merge(float* %23, i32 %24, i32 %25, i32 %26)
br label %28
28: ; preds = %11, %3
ret void
}

LLVM IR (-O2):
define void @mergeSort(float* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %6, label %5
5: ; preds = %3, %6
ret void
6: ; preds = %3
%7 = add nsw i32 %2, %1
%8 = sdiv i32 %7, 2
tail call void @mergeSort(float* %0, i32 %1, i32 %8)
%9 = add nsw i32 %8, 1
tail call void @mergeSort(float* %0, i32 %9, i32 %2)
%10 = tail call i32 @merge(float* %0, i32 %1, i32 %8, i32 %2)
br label %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello, World\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%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
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"Hello, World\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Hello, World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ realloc(char *, scalar_t__);
int /*<<< orphan*/ strcat(char *, char const *);
scalar_t__ strlen(char const *);
void concat(char **s1, const char *s2) {
  if (s2) {
    *s1 = (char *)realloc(*s1, strlen(*s1) + strlen(s2) + 1);
    strcat(*s1, s2);
  }
}


x86 assembly (clang, -O0):
<concat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     119d <concat+0x6d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdi
add    %rax,%rsi
add    $0x1,%rsi
call   1040 <realloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <strcat@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<concat>:
test   %rsi,%rsi
je     1182 <concat+0x52>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    (%rdi),%r15
mov    %r15,%rdi
call   1030 <strlen@plt>
mov    %rax,%r12
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    (%r12,%rax,1),%rsi
add    $0x1,%rsi
mov    %r15,%rdi
call   1040 <realloc@plt>
mov    %rax,(%r14)
mov    %rax,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1050 <strcat@plt>
ret

LLVM IR (-O0):
define void @concat(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %7, label %24
7: ; preds = %2
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = call i64 @strlen(i8* %11)
%13 = load i8*, i8** %4
%14 = call i64 @strlen(i8* %13)
%15 = add nsw i64 %12, %14
%16 = add nsw i64 %15, 1
%17 = call i64 @realloc(i8* %9, i64 %16)
%18 = inttoptr i64 %17 to i8*
%19 = load i8**, i8*** %3
store i8* %18, i8** %19
%20 = load i8**, i8*** %3
%21 = load i8*, i8** %20
%22 = load i8*, i8** %4
%23 = call i32 @strcat(i8* %21, i8* %22)
br label %24
24: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
define void @concat(i8** nocapture %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %13, label %4
4: ; preds = %2
%5 = load i8*, i8** %0
%6 = tail call i64 @strlen(i8* dereferenceable(1) %5)
%7 = tail call i64 @strlen(i8* %1)
%8 = add i64 %6, 1
%9 = add i64 %8, %7
%10 = tail call i64 @realloc(i8* %5, i64 %9)
%11 = inttoptr i64 %10 to i8*
store i8* %11, i8** %0
%12 = tail call i32 @strcat(i8* %11, i8* %1)
br label %13
13: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main(int arcgc, char *argv[]) {
  printf("Hello, %s world!\n", argv[1]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [18 x i8] c"Hello, %s world!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Hello, %s world!\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void XSync() {}


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

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

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

LLVM IR (-O2):
define void @XSync() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void memfree(void *mem) { free(mem); }


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

x86 assembly (clang, -O2):
<memfree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @memfree(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @free(i8* %3)
ret void
}

LLVM IR (-O2):
define void @memfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int shift_count(unsigned n) {
  int i;
  i = 0;
  while ((n & 0x8000) == 0 && i < 16) {
    i++;
    n <<= 1;
  }
  return i;
}


x86 assembly (clang, -O0):
<shift_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%ecx
and    $0x8000,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
jne    112f <shift_count+0x2f>
cmpl   $0x10,-0x8(%rbp)
setl   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113f <shift_count+0x3f>
jmp    1156 <shift_count+0x56>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <shift_count+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_count>:
xor    %eax,%eax
test   $0x8000,%edi
jne    1124 <shift_count+0x24>
xor    %ecx,%ecx
nopl   0x0(%rax)
lea    0x1(%rcx),%eax
test   $0x4000,%edi
jne    1124 <shift_count+0x24>
add    %edi,%edi
cmp    $0xf,%ecx
mov    %eax,%ecx
jb     1110 <shift_count+0x10>
ret

LLVM IR (-O0):
define i32 @shift_count(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %2
%6 = and i32 %5, 32768
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %4
%9 = load i32, i32* %3
%10 = icmp slt i32 %9, 16
br label %11
11: ; preds = %8, %4
%12 = phi i1 [ false, %4 ], [ %10, %8 ]
br i1 %12, label %13, label %18
13: ; preds = %11
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
%16 = load i32, i32* %2
%17 = shl i32 %16, 1
store i32 %17, i32* %2
br label %4
18: ; preds = %11
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
define i32 @shift_count(i32 %0) {
%2 = and i32 %0, 32768
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = phi i32 [ %8, %4 ], [ %0, %1 ]
%7 = add nuw nsw i32 %5, 1
%8 = shl i32 %6, 1
%9 = and i32 %6, 16384
%10 = icmp eq i32 %9, 0
%11 = icmp ult i32 %5, 15
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %4, label %13
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ *memmem(char *, int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
int is_match(char *buf, int buflen, char *str) {
  return memmem(buf, buflen, str, strlen(str)) != NULL;
}


x86 assembly (clang, -O0):
<is_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
call   1040 <memmem@plt>
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_match>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %rdi,%rbp
mov    %rdx,%rdi
call   1030 <strlen@plt>
mov    %rbp,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
call   1040 <memmem@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_match(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = load i8*, i8** %6
%11 = call i32 @strlen(i8* %10)
%12 = call i32* @memmem(i8* %7, i32 %8, i8* %9, i32 %11)
%13 = icmp ne i32* %12, null
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_match(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @strlen(i8* %2)
%5 = tail call i32* @memmem(i8* %0, i32 %1, i8* %2, i32 %4)
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
ret i32 %7
}
int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
                      struct posix_acl *dfacl) {
  return 0;
}


x86 assembly (clang, -O0):
<nfs3_proc_setacls>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nfs3_proc_setacls>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.inode = type opaque
%struct.posix_acl = type opaque
define i32 @nfs3_proc_setacls(%struct.inode* %0, %struct.posix_acl* %1, %struct.posix_acl* %2) {
%4 = alloca %struct.inode*
%5 = alloca %struct.posix_acl*
%6 = alloca %struct.posix_acl*
store %struct.inode* %0, %struct.inode** %4
store %struct.posix_acl* %1, %struct.posix_acl** %5
store %struct.posix_acl* %2, %struct.posix_acl** %6
ret i32 0
}

LLVM IR (-O2):
%struct.inode = type opaque
%struct.posix_acl = type opaque
define i32 @nfs3_proc_setacls(%struct.inode* nocapture readnone %0, %struct.posix_acl* nocapture readnone %1, %struct.posix_acl* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *, char *);
void dieWithUserMessage(char *msg, char *msg1) {
  printf("%s: %s", msg, msg1);
  exit(0);
}


x86 assembly (clang, -O0):
<dieWithUserMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<dieWithUserMessage>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s: %s\00"
define void @dieWithUserMessage(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 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s: %s\00"
define void @dieWithUserMessage(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
int /*<<< orphan*/ wait_kbc_sendready();
void enable_a20(void) {
  wait_kbc_sendready();
  outb(0x64, 0xD1);
  wait_kbc_sendready();
  outb(0x60, 0xDF);
  wait_kbc_sendready();
}


x86 assembly (clang, -O0):
<enable_a20>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <wait_kbc_sendready@plt>
mov    $0x64,%edi
mov    $0xd1,%esi
call   1040 <outb@plt>
mov    $0x0,%al
call   1030 <wait_kbc_sendready@plt>
mov    $0x60,%edi
mov    $0xdf,%esi
call   1040 <outb@plt>
mov    $0x0,%al
call   1030 <wait_kbc_sendready@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<enable_a20>:
push   %rax
xor    %eax,%eax
call   1030 <wait_kbc_sendready@plt>
mov    $0x64,%edi
mov    $0xd1,%esi
call   1040 <outb@plt>
xor    %eax,%eax
call   1030 <wait_kbc_sendready@plt>
mov    $0x60,%edi
mov    $0xdf,%esi
call   1040 <outb@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <wait_kbc_sendready@plt>

LLVM IR (-O0):
define void @enable_a20() {
%1 = call i32 (...) @wait_kbc_sendready()
%2 = call i32 @outb(i32 100, i32 209)
%3 = call i32 (...) @wait_kbc_sendready()
%4 = call i32 @outb(i32 96, i32 223)
%5 = call i32 (...) @wait_kbc_sendready()
ret void
}

LLVM IR (-O2):
define void @enable_a20() {
%1 = tail call i32 (...) @wait_kbc_sendready()
%2 = tail call i32 @outb(i32 100, i32 209)
%3 = tail call i32 (...) @wait_kbc_sendready()
%4 = tail call i32 @outb(i32 96, i32 223)
%5 = tail call i32 (...) @wait_kbc_sendready()
ret void
}
/* Variables and functions */
unsigned long long LLONG_MAX;
unsigned long long f(unsigned int n) {
  unsigned long long result = 1;
  for (int i = 1; i < n; i++) {
    result *= i;
    if (result > LLONG_MAX)
      return 0;
  }
  return result;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
movq   $0x1,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jae    1163 <f+0x63>
movslq -0x1c(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    0x2eae(%rip),%rcx
cmp    (%rcx),%rax
jbe    1150 <f+0x50>
movq   $0x0,-0x8(%rbp)
jmp    116b <f+0x6b>
jmp    1155 <f+0x55>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1116 <f+0x16>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    $0x1,%eax
cmp    $0x2,%edi
jb     1132 <f+0x32>
mov    0x2ed7(%rip),%rax
mov    (%rax),%rcx
mov    %edi,%edx
mov    $0x1,%esi
mov    $0x1,%eax
imul   %rsi,%rax
cmp    %rcx,%rax
ja     1133 <f+0x33>
add    $0x1,%rsi
cmp    %rsi,%rdx
jne    1120 <f+0x20>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
@LLONG_MAX = global i64 0
define i64 @f(i32 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i64
%5 = alloca i32
store i32 %0, i32* %3
store i64 1, i64* %4
store i32 1, i32* %5
br label %6
6: ; preds = %20, %1
%7 = load i32, i32* %5
%8 = load i32, i32* %3
%9 = icmp ult i32 %7, %8
br i1 %9, label %10, label %23
10: ; preds = %6
%11 = load i32, i32* %5
%12 = sext i32 %11 to i64
%13 = load i64, i64* %4
%14 = mul i64 %13, %12
store i64 %14, i64* %4
%15 = load i64, i64* %4
%16 = load i64, i64* @LLONG_MAX
%17 = icmp ugt i64 %15, %16
br i1 %17, label %18, label %19
18: ; preds = %10
store i64 0, i64* %2
br label %25
19: ; preds = %10
br label %20
20: ; preds = %19
%21 = load i32, i32* %5
%22 = add nsw i32 %21, 1
store i32 %22, i32* %5
br label %6
23: ; preds = %6
%24 = load i64, i64* %4
store i64 %24, i64* %2
br label %25
25: ; preds = %23, %18
%26 = load i64, i64* %2
ret i64 %26
}

LLVM IR (-O2):
@LLONG_MAX = global i64 0
define i64 @f(i32 %0) {
%2 = icmp ugt i32 %0, 1
br i1 %2, label %3, label %14
3: ; preds = %1
%4 = load i64, i64* @LLONG_MAX
%5 = zext i32 %0 to i64
br label %8
6: ; preds = %8
%7 = icmp eq i64 %13, %5
br i1 %7, label %14, label %8
8: ; preds = %3, %6
%9 = phi i64 [ 1, %3 ], [ %13, %6 ]
%10 = phi i64 [ 1, %3 ], [ %11, %6 ]
%11 = mul i64 %10, %9
%12 = icmp ugt i64 %11, %4
%13 = add nuw nsw i64 %9, 1
br i1 %12, label %14, label %6
14: ; preds = %6, %8, %1
%15 = phi i64 [ 1, %1 ], [ 0, %8 ], [ %11, %6 ]
ret i64 %15
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
float __VERIFIER_nondet_float();
int main() {
  float x;
  x = __VERIFIER_nondet_float();
  if (x >= -1e10 && x <= 1e10) {
    __VERIFIER_assert(x == x);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_float@plt>
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb4(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     118c <main+0x6c>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xea1(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     118c <main+0x6c>
movss  -0x8(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_float@plt>
ucomiss 0xed1(%rip),%xmm0
jb     114c <main+0x2c>
movss  0xecb(%rip),%xmm1
ucomiss %xmm0,%xmm1
jb     114c <main+0x2c>
xor    %edi,%edi
ucomiss %xmm0,%xmm0
setnp  %dil
call   1030 <__VERIFIER_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca float
store i32 0, i32* %1
%3 = call float (...) @__VERIFIER_nondet_float()
store float %3, float* %2
%4 = load float, float* %2
%5 = fpext float %4 to double
%6 = fcmp oge double %5, -1.000000e+10
br i1 %6, label %7, label %17
7: ; preds = %0
%8 = load float, float* %2
%9 = fpext float %8 to double
%10 = fcmp ole double %9, 1.000000e+10
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load float, float* %2
%13 = load float, float* %2
%14 = fcmp oeq float %12, %13
%15 = zext i1 %14 to i32
%16 = call i32 @__VERIFIER_assert(i32 %15)
br label %17
17: ; preds = %11, %7, %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call float (...) @__VERIFIER_nondet_float()
%2 = fcmp ult float %1, -1.000000e+10
%3 = fcmp ugt float %1, 1.000000e+10
%4 = or i1 %2, %3
br i1 %4, label %9, label %5
5: ; preds = %0
%6 = fcmp ord float %1, 0.000000e+00
%7 = zext i1 %6 to i32
%8 = tail call i32 @__VERIFIER_assert(i32 %7)
br label %9
9: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ unreachable();
int fle32(int a) {
  unsigned i = a / 4;
  unsigned j = i - 3;
  if (j == 7)
    return -1;
  if (i <= 2)
    return 0;
  if (i <= j)
    unreachable();
  return 1;
}


x86 assembly (clang, -O0):
<fle32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x7,-0x10(%rbp)
jne    1148 <fle32+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1178 <fle32+0x68>
cmpl   $0x2,-0xc(%rbp)
ja     115e <fle32+0x4e>
movl   $0x0,-0x4(%rbp)
jmp    1178 <fle32+0x68>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
ja     1171 <fle32+0x61>
mov    $0x0,%al
call   1030 <unreachable@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fle32>:
mov    %edi,%ecx
and    $0xfffffffc,%ecx
mov    $0xffffffff,%eax
cmp    $0x28,%ecx
je     1122 <fle32+0x22>
lea    0x3(%rdi),%ecx
test   %edi,%edi
cmovns %edi,%ecx
sar    $0x2,%ecx
xor    %eax,%eax
cmp    $0x3,%ecx
setae  %al
ret

LLVM IR (-O0):
define i32 @fle32(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = sdiv i32 %6, 4
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = sub i32 %8, 3
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp eq i32 %10, 7
br i1 %11, label %12, label %13
12: ; preds = %1
store i32 -1, i32* %2
br label %24
13: ; preds = %1
%14 = load i32, i32* %4
%15 = icmp ule i32 %14, 2
br i1 %15, label %16, label %17
16: ; preds = %13
store i32 0, i32* %2
br label %24
17: ; preds = %13
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = icmp ule i32 %18, %19
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 (...) @unreachable()
br label %23
23: ; preds = %21, %17
store i32 1, i32* %2
br label %24
24: ; preds = %23, %16, %12
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @fle32(i32 %0) {
%2 = and i32 %0, -4
%3 = icmp eq i32 %2, 40
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = sdiv i32 %0, 4
%6 = icmp ugt i32 %5, 2
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
void __haddock_hal_pc_test_init(void) {}


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

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

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

LLVM IR (-O2):
define void @__haddock_hal_pc_test_init() {
ret void
}
const char *memory_cache_id(void) { return "memory"; }


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"memory\00"
define i8* @memory_cache_id() {
ret i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0)
}
int main(int argc, char *argv[]) { return 1337; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x539,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 1337
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *timeout(void *arg) {
  printf("timeout\n");
  return NULL;
}


x86 assembly (clang, -O0):
<timeout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeout>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"timeout\0A\00"
define i8* @timeout(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@str = [8 x i8] c"timeout\00"
define noalias i8* @timeout(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i8* null
}
int ti_natr_start(double const *options) { return (int)options[0] - 1; }


x86 assembly (clang, -O0):
<ti_natr_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_natr_start>:
cvttsd2si (%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_natr_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_natr_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = add nsw i32 %3, -1
ret i32 %4
}
/* Variables and functions */
int sscanf(char const *, char *, float *, char *);
int is_numeric(const char *string) {
  char chTemp[16];
  float fTemp;
  int rval = sscanf(string, "%f%8s", &fTemp, chTemp);
  return (rval == 1);
}


x86 assembly (clang, -O0):
<is_numeric>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rcx
lea    0xed5(%rip),%rsi
lea    -0x24(%rbp),%rdx
call   1030 <sscanf@plt>
mov    %eax,-0x28(%rbp)
cmpl   $0x1,-0x28(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_numeric>:
sub    $0x28,%rsp
lea    0xee5(%rip),%rsi
lea    0xc(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1030 <sscanf@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%f%8s\00"
define i32 @is_numeric(i8* %0) {
%2 = alloca i8*
%3 = alloca [16 x i8]
%4 = alloca float
%5 = alloca i32
store i8* %0, i8** %2
%6 = load i8*, i8** %2
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = call i32 @sscanf(i8* %6, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %4, i8* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [6 x i8] c"%f%8s\00"
define i32 @is_numeric(i8* nocapture %0) {
%2 = alloca [16 x i8]
%3 = alloca float
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = bitcast float* %3 to i8*
%6 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float* %3, i8* %4)
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
ret i32 %8
}
unsigned long junk(int *foo) { return (unsigned long)foo + 4; }


x86 assembly (clang, -O0):
<junk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<junk>:
lea    0x4(%rdi),%rax
ret

LLVM IR (-O0):
define i64 @junk(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = add i64 %4, 4
ret i64 %5
}

LLVM IR (-O2):
define i64 @junk(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = add i64 %2, 4
ret i64 %3
}
/* Type definitions */
struct gpio {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gpio_mode(struct gpio *, int, int);
void gpio_b_input(int bit) { gpio_mode((struct gpio *)0x40010C00, bit, 0x4); }


x86 assembly (clang, -O0):
<gpio_b_input>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x40010c00,%edi
mov    $0x4,%edx
call   1030 <gpio_mode@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_b_input>:
mov    %edi,%esi
mov    $0x40010c00,%edi
mov    $0x4,%edx
jmp    1030 <gpio_mode@plt>

LLVM IR (-O0):
%struct.gpio = type { i32 }
define void @gpio_b_input(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073810432 to %struct.gpio*), i32 %3, i32 4)
ret void
}

LLVM IR (-O2):
%struct.gpio = type { i32 }
define void @gpio_b_input(i32 %0) {
%2 = tail call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073810432 to %struct.gpio*), i32 %0, i32 4)
ret void
}
/* Variables and functions */
int lower(char);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  char c = 'Z';
  printf("%c\n", lower(c));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x5a,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1040 <lower@plt>
mov    %eax,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
store i8 90, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @lower(i8 signext %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = tail call i32 @lower(i8 signext 90)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("sizeof(ssize_t):%d\n", sizeof(ssize_t));
  printf("sizeof(size_t):%d\n", sizeof(size_t));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
mov    $0x8,%esi
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    $0x4,%esi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x8,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"sizeof(ssize_t):%d\0A\00"
@.str.1 = [19 x i8] c"sizeof(size_t):%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 4)
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 8)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"sizeof(ssize_t):%d\0A\00"
@.str.1 = [19 x i8] c"sizeof(size_t):%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 4)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 8)
ret i32 0
}