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

/* Variables and functions */
float vec3_length_squared(float *);
__attribute__((always_)) float psvec3_length_squared(struct vec3 *a) {
  return vec3_length_squared((float *)a);
}


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

x86 assembly (clang, -O2):
<psvec3_length_squared>:
jmp    1030 <vec3_length_squared@plt>

LLVM IR (-O0):
%struct.vec3 = type { i32 }
define float @psvec3_length_squared(%struct.vec3* %0) {
%2 = alloca %struct.vec3*
store %struct.vec3* %0, %struct.vec3** %2
%3 = load %struct.vec3*, %struct.vec3** %2
%4 = bitcast %struct.vec3* %3 to float*
%5 = call float @vec3_length_squared(float* %4)
ret float %5
}

LLVM IR (-O2):
%struct.vec3 = type { i32 }
define float @psvec3_length_squared(%struct.vec3* %0) {
%2 = bitcast %struct.vec3* %0 to float*
%3 = tail call float @vec3_length_squared(float* %2)
ret float %3
}
void history_mark(void *addr) {}


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

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

LLVM IR (-O0):
define void @history_mark(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret void
}

LLVM IR (-O2):
define void @history_mark(i8* nocapture %0) {
ret void
}
/* Variables and functions */
bool _is_absolute(const char *path, size_t len) { return path[0] == '/'; }


x86 assembly (clang, -O0):
<_is_absolute>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_is_absolute>:
xor    %eax,%eax
cmpb   $0x2f,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @_is_absolute(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 47
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @_is_absolute(i8* nocapture %0, i64 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 47
%5 = zext i1 %4 to i32
ret i32 %5
}
int umin(int check, int ncheck) {
  if (check < ncheck)
    return check;
  return ncheck;
}


x86 assembly (clang, -O0):
<umin>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1121 <umin+0x21>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1127 <umin+0x27>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<umin>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @umin(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x06() {
  Assert_real((ispunct(6) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              35, ("ispunct should be 0 for 0x06"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x06>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x23,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x06>:
push   %rax
mov    $0x6,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x23,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x06\00"
define void @t_ispunct_0x06() {
%1 = call i64 @ispunct(i32 6)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 35, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x06\00"
define void @t_ispunct_0x06() {
%1 = tail call i64 @ispunct(i32 6)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 35, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int isBitiSet(unsigned int, int);
int /*<<< orphan*/ printf(char *, int);
void printByte(unsigned int byte, int size) {
  int i;
  for (i = size - 1; i >= 0; i--)
    printf("%d", isBitiSet(byte, i));
}


x86 assembly (clang, -O0):
<printByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1168 <printByte+0x48>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <isBitiSet@plt>
mov    %eax,%esi
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <printByte+0x17>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printByte>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
jle    115c <printByte+0x3c>
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebx
lea    0xeca(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%esi
mov    %ebp,%edi
call   1040 <isBitiSet@plt>
mov    %r14,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1140 <printByte+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printByte(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %10
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %1, %2 ]
%6 = add nsw i32 %5, -1
%7 = tail call i32 @isBitiSet(i32 %0, i32 %6)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = icmp ugt i32 %5, 1
br i1 %9, label %4, label %10
10: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gc_done();
int /*<<< orphan*/ gc_init(int);
void test_template() {
  gc_init(1000);
  gc_done();
}


x86 assembly (clang, -O0):
<test_template>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3e8,%edi
call   1030 <gc_init@plt>
mov    $0x0,%al
call   1040 <gc_done@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_template>:
push   %rax
mov    $0x3e8,%edi
call   1030 <gc_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <gc_done@plt>

LLVM IR (-O0):
define void @test_template() {
%1 = call i32 @gc_init(i32 1000)
%2 = call i32 (...) @gc_done()
ret void
}

LLVM IR (-O2):
define void @test_template() {
%1 = tail call i32 @gc_init(i32 1000)
%2 = tail call i32 (...) @gc_done()
ret void
}
/* Variables and functions */
int findPivot(int *, int, int);
void quickSort(int *list, int low, int high) {
  int pivot = 0;
  if (low < high) {
    pivot = findPivot(list, low, high);
    quickSort(list, low, pivot - 1);
    quickSort(list, pivot + 1, high);
  }
}


x86 assembly (clang, -O0):
<quickSort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    117b <quickSort+0x5b>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <findPivot@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
call   1030 <quickSort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
add    $0x1,%esi
mov    -0x10(%rbp),%edx
call   1030 <quickSort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quickSort>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    %edx,%esi
jge    1166 <quickSort+0x46>
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%r15
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r15,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <findPivot@plt>
mov    %eax,%ebx
lea    -0x1(%rbx),%edx
mov    %r15,%rdi
mov    %ebp,%esi
call   1030 <quickSort@plt>
add    $0x1,%ebx
mov    %ebx,%ebp
cmp    %r14d,%ebx
jl     1140 <quickSort+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @quickSort(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %11
5: ; preds = %3, %5
%6 = phi i32 [ %9, %5 ], [ %1, %3 ]
%7 = tail call i32 @findPivot(i32* %0, i32 %6, i32 %2)
%8 = add nsw i32 %7, -1
tail call void @quickSort(i32* %0, i32 %6, i32 %8)
%9 = add nsw i32 %7, 1
%10 = icmp slt i32 %9, %2
br i1 %10, label %5, label %11
11: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lt_timer_start_rtc();
int /*<<< orphan*/ lt_timer_stop_ram();
scalar_t__ rtc_is_lt_timer();
void lt_timer_enter_powersave(void) {
  ;
  if (rtc_is_lt_timer()) {
    lt_timer_stop_ram();
    lt_timer_start_rtc();
  }
}


x86 assembly (clang, -O0):
<lt_timer_enter_powersave>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <rtc_is_lt_timer@plt>
cmp    $0x0,%rax
je     1153 <lt_timer_enter_powersave+0x23>
mov    $0x0,%al
call   1050 <lt_timer_stop_ram@plt>
mov    $0x0,%al
call   1030 <lt_timer_start_rtc@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<lt_timer_enter_powersave>:
push   %rax
xor    %eax,%eax
call   1040 <rtc_is_lt_timer@plt>
test   %rax,%rax
je     114c <lt_timer_enter_powersave+0x1c>
xor    %eax,%eax
call   1050 <lt_timer_stop_ram@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <lt_timer_start_rtc@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @lt_timer_enter_powersave() {
%1 = call i64 (...) @rtc_is_lt_timer()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @lt_timer_stop_ram()
%5 = call i32 (...) @lt_timer_start_rtc()
br label %6
6: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
define void @lt_timer_enter_powersave() {
%1 = tail call i64 (...) @rtc_is_lt_timer()
%2 = icmp eq i64 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (...) @lt_timer_stop_ram()
%5 = tail call i32 (...) @lt_timer_start_rtc()
br label %6
6: ; preds = %3, %0
ret void
}
int main(void) {
  int i;
  unsigned char in[64], out[64];
  check_vect();
  for (i = 0; i < 64; i++) {
    in[i] = i;
    out[i] = 255;
    __asm__ volatile("");
  }
  foo(in, out);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <check_vect@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x40,-0x8(%rbp)
jge    1171 <main+0x51>
mov    -0x8(%rbp),%eax
mov    %al,%cl
movslq -0x8(%rbp),%rax
mov    %cl,-0x50(%rbp,%rax,1)
movslq -0x8(%rbp),%rax
movb   $0xff,-0x90(%rbp,%rax,1)
ff
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1140 <main+0x20>
lea    -0x50(%rbp),%rdi
lea    -0x90(%rbp),%rsi
mov    $0x0,%al
call   1040 <foo@plt>
xor    %eax,%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
xor    %ebx,%ebx
xor    %eax,%eax
call   1030 <check_vect@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %bl,0x40(%rsp,%rbx,1)
movb   $0xff,(%rsp,%rbx,1)
add    $0x1,%rbx
cmp    $0x40,%rbx
jne    1140 <main+0x20>
lea    0x40(%rsp),%rdi
mov    %rsp,%rsi
xor    %eax,%eax
call   1040 <foo@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [64 x i8]
%4 = alloca [64 x i8]
store i32 0, i32* %1
%5 = call i32 (...) @check_vect()
store i32 0, i32* %2
br label %6
6: ; preds = %18, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 64
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = load i32, i32* %2
%11 = trunc i32 %10 to i8
%12 = load i32, i32* %2
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 %13
store i8 %11, i8* %14
%15 = load i32, i32* %2
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 %16
store i8 -1, i8* %17
br label %18
18: ; preds = %9
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %6
21: ; preds = %6
%22 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%23 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%24 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @foo to i32 (i8*, i8*, ...)*)(i8* %22, i8* %23)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [64 x i8]
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (...) @check_vect()
br label %6
6: ; preds = %0, %6
%7 = phi i64 [ 0, %0 ], [ %11, %6 ]
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 %7
store i8 %8, i8* %9
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 %7
store i8 -1, i8* %10
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, 64
br i1 %12, label %13, label %6
13: ; preds = %6
%14 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @foo to i32 (i8*, i8*, ...)*)(i8* %3, i8* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ roadmap_screen_redraw();
void roadmap_start_redraw(void) { roadmap_screen_redraw(); }


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

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

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

LLVM IR (-O2):
define void @roadmap_start_redraw() {
%1 = tail call i32 (...) @roadmap_screen_redraw()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
int nonblock(int fd) {
  int flags = fcntl(fd, F_GETFL, 0);
  if (flags == -1) {
    return -1;
  }
  return fcntl(fd, F_SETFL, flags | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<nonblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1147 <nonblock+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <nonblock+0x57>
mov    -0x8(%rbp),%edi
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
mov    -0xc(%rbp),%edx
mov    0x2e8b(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nonblock>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
cmp    $0xffffffff,%eax
je     1144 <nonblock+0x34>
mov    0x2ea9(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb0(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <fcntl@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @nonblock(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* @F_GETFL
%7 = call i32 @fcntl(i32 %5, i32 %6, i32 0)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %18
11: ; preds = %1
%12 = load i32, i32* %3
%13 = load i32, i32* @F_SETFL
%14 = load i32, i32* %4
%15 = load i32, i32* @O_NONBLOCK
%16 = or i32 %14, %15
%17 = call i32 @fcntl(i32 %12, i32 %13, i32 %16)
store i32 %17, i32* %2
br label %18
18: ; preds = %11, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define i32 @nonblock(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
%4 = icmp eq i32 %3, -1
br i1 %4, label %10, label %5
5: ; preds = %1
%6 = load i32, i32* @F_SETFL
%7 = load i32, i32* @O_NONBLOCK
%8 = or i32 %7, %3
%9 = tail call i32 @fcntl(i32 %0, i32 %6, i32 %8)
br label %10
10: ; preds = %1, %5
%11 = phi i32 [ %9, %5 ], [ -1, %1 ]
ret i32 %11
}
void hug_mutex_unlock() {}


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

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

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

LLVM IR (-O2):
define void @hug_mutex_unlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
char *strncpy(char *, char const *, int /*<<< orphan*/);
char *mc_copy_key(char *dest, const char *src) {
  return strncpy(dest, src, strlen(src));
}


x86 assembly (clang, -O0):
<mc_copy_key>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_copy_key>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
define i8* @mc_copy_key(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 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i8* @strncpy(i8* %5, i8* %6, i32 %8)
ret i8* %9
}

LLVM IR (-O2):
define i8* @mc_copy_key(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i8* @strncpy(i8* %0, i8* %1, i32 %3)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ optarg;
int /*<<< orphan*/ puke(char *);
char *strdup(int /*<<< orphan*/);
void strdup_option(char **dest) {
  *dest = strdup(optarg);
  if (*dest == NULL) {
    puke("could not allocate memory to copy option string.");
  }
}


x86 assembly (clang, -O0):
<strdup_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
call   1040 <strdup@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    115e <strdup_option+0x3e>
lea    0xea7(%rip),%rdi
call   1030 <puke@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup_option>:
push   %rbx
mov    %rdi,%rbx
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1040 <strdup@plt>
mov    %rax,(%rbx)
test   %rax,%rax
je     113c <strdup_option+0x1c>
pop    %rbx
ret
lea    0xebd(%rip),%rdi
pop    %rbx
jmp    1030 <puke@plt>

LLVM IR (-O0):
@optarg = global i32 0
@.str = [49 x i8] c"could not allocate memory to copy option string.\00"
define void @strdup_option(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @optarg
%4 = call i8* @strdup(i32 %3)
%5 = load i8**, i8*** %2
store i8* %4, i8** %5
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @puke(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
@optarg = global i32 0
@.str = [49 x i8] c"could not allocate memory to copy option string.\00"
define void @strdup_option(i8** nocapture writeonly %0) {
%2 = load i32, i32* @optarg
%3 = tail call i8* @strdup(i32 %2)
store i8* %3, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @puke(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cpc_key_press(int);
int /*<<< orphan*/ cpc_key_unpress(int);
void Joy_Cursor_Fire2(int value) {
  if (value) {
    cpc_key_press(0x06);
  } else {
    cpc_key_unpress(0x06);
  };
}


x86 assembly (clang, -O0):
<Joy_Cursor_Fire2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1144 <Joy_Cursor_Fire2+0x24>
mov    $0x6,%edi
call   1030 <cpc_key_press@plt>
jmp    114e <Joy_Cursor_Fire2+0x2e>
mov    $0x6,%edi
call   1040 <cpc_key_unpress@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Joy_Cursor_Fire2>:
test   %edi,%edi
je     112e <Joy_Cursor_Fire2+0xe>
mov    $0x6,%edi
jmp    1030 <cpc_key_press@plt>
mov    $0x6,%edi
jmp    1040 <cpc_key_unpress@plt>

LLVM IR (-O0):
define void @Joy_Cursor_Fire2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @cpc_key_press(i32 6)
br label %9
7: ; preds = %1
%8 = call i32 @cpc_key_unpress(i32 6)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @Joy_Cursor_Fire2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @cpc_key_press(i32 6)
br label %7
5: ; preds = %1
%6 = tail call i32 @cpc_key_unpress(i32 6)
br label %7
7: ; preds = %5, %3
ret void
}
void gdk_rectangle_union() {}


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

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

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

LLVM IR (-O2):
define void @gdk_rectangle_union() {
ret void
}
/* Variables and functions */
int u8isbasesigni(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointcc(char const *);
int u8isbasesigncc(const char *c) { return u8isbasesigni(u8tointcc(c)); }


x86 assembly (clang, -O0):
<u8isbasesigncc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <u8tointcc@plt>
mov    %eax,%edi
call   1040 <u8isbasesigni@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isbasesigncc>:
push   %rax
call   1030 <u8tointcc@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <u8isbasesigni@plt>

LLVM IR (-O0):
define i32 @u8isbasesigncc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @u8tointcc(i8* %3)
%5 = call i32 @u8isbasesigni(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @u8isbasesigncc(i8* %0) {
%2 = tail call i32 @u8tointcc(i8* %0)
%3 = tail call i32 @u8isbasesigni(i32 %2)
ret i32 %3
}
unsigned xrop3_198_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = D & stk3;
  stk1 = S ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_198_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_198_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
not    %sil
movzbl %sil,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_198_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %7
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %5
%26 = load i32, i32* %10
%27 = and i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = xor i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = xor i32 %32, -1
%34 = and i32 %31, %33
%35 = load i32, i32* %5
%36 = load i32, i32* %6
%37 = and i32 %35, %36
%38 = or i32 %34, %37
ret i32 %38
}

LLVM IR (-O2):
define i32 @xrop3_198_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = xor i8 %1, -1
%6 = zext i8 %5 to i32
%7 = xor i32 %4, -1
%8 = and i32 %7, %6
%9 = or i32 %8, %3
ret i32 %9
}
void store2(unsigned char *buf, signed short value) {
  buf[0] = value >> 8;
  buf[1] = value;
}


x86 assembly (clang, -O0):
<store2>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movswl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xa(%rbp),%ax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store2>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @store2(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = ashr i32 %6, 8
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i16, i16* %4
%12 = trunc i16 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
ret void
}

LLVM IR (-O2):
define void @store2(i8* nocapture writeonly %0, i16 signext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
store i8 %4, i8* %0
%5 = trunc i16 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Variables and functions */
int rand();
int rrand(int low, int hi) {
  int r = hi - low;
  return (rand() % r) + low;
}


x86 assembly (clang, -O0):
<rrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0xc(%rbp)
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrand>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
sub    %edi,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rrand(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
store i32 %8, i32* %5
%9 = call i32 (...) @rand()
%10 = load i32, i32* %5
%11 = srem i32 %9, %10
%12 = load i32, i32* %3
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @rrand(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = tail call i32 (...) @rand()
%5 = srem i32 %4, %3
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Type definitions */
typedef scalar_t__ uint16_t;

/* Variables and functions */
uint16_t Function1Uint16(uint16_t x) { return x + 42; }


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

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

LLVM IR (-O0):
define i64 @Function1Uint16(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 42
ret i64 %4
}

LLVM IR (-O2):
define i64 @Function1Uint16(i64 %0) {
%2 = add nsw i64 %0, 42
ret i64 %2
}
void TMTimerGetFreq(void) {}


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

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

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

LLVM IR (-O2):
define void @TMTimerGetFreq() {
ret void
}
/* Variables and functions */
int round_up_by_power_of_two(int, int);
int divide_by_power_of_two_and_round_up(int x, int power_of_two) {
  return round_up_by_power_of_two(x, power_of_two) / power_of_two;
}


x86 assembly (clang, -O0):
<divide_by_power_of_two_and_round_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <round_up_by_power_of_two@plt>
cltd
idivl  -0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide_by_power_of_two_and_round_up>:
push   %rbx
mov    %esi,%ebx
call   1030 <round_up_by_power_of_two@plt>
cltd
idiv   %ebx
pop    %rbx
ret

LLVM IR (-O0):
define i32 @divide_by_power_of_two_and_round_up(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @round_up_by_power_of_two(i32 %5, i32 %6)
%8 = load i32, i32* %4
%9 = sdiv i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @divide_by_power_of_two_and_round_up(i32 %0, i32 %1) {
%3 = tail call i32 @round_up_by_power_of_two(i32 %0, i32 %1)
%4 = sdiv i32 %3, %1
ret i32 %4
}
/* Type definitions */
struct scsi_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ scsi_device_quiesce(struct scsi_device *);
void device_quiesce_fn(struct scsi_device *sdev, void *data) {
  {
    scsi_device_quiesce(sdev);
    return;
  }
}


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

x86 assembly (clang, -O2):
<device_quiesce_fn>:
jmp    1030 <scsi_device_quiesce@plt>

LLVM IR (-O0):
%struct.scsi_device = type { i32 }
define void @device_quiesce_fn(%struct.scsi_device* %0, i8* %1) {
%3 = alloca %struct.scsi_device*
%4 = alloca i8*
store %struct.scsi_device* %0, %struct.scsi_device** %3
store i8* %1, i8** %4
%5 = load %struct.scsi_device*, %struct.scsi_device** %3
%6 = call i32 @scsi_device_quiesce(%struct.scsi_device* %5)
ret void
}

LLVM IR (-O2):
%struct.scsi_device = type { i32 }
define void @device_quiesce_fn(%struct.scsi_device* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @scsi_device_quiesce(%struct.scsi_device* %0)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int cmp(const void *p1, const void *p2) {
  return strcmp((const char *)p1, (const char *)p2);
}


x86 assembly (clang, -O0):
<cmp>:
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 <strcmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @cmp(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 @strcmp(i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ FifoProtocol_memcpy(int /*<<< orphan*/ *,
                                       int /*<<< orphan*/ const *, int);
void inv_fifo_protocol_helper_decode_eis_gyr_deltats_data(const void *in,
                                                          uint16_t len,
                                                          int16_t *delta_ts) {
  const uint8_t *buf = (const uint8_t *)in;
  FifoProtocol_memcpy((delta_ts), (&buf[12]), (sizeof(int16_t)));
  (void)len;
}


x86 assembly (clang, -O0):
<inv_fifo_protocol_helper_decode_eis_gyr_deltats_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
add    $0x30,%rsi
mov    $0x4,%edx
call   1030 <FifoProtocol_memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inv_fifo_protocol_helper_decode_eis_gyr_deltats_data>:
lea    0x30(%rdi),%rsi
mov    %rdx,%rdi
mov    $0x4,%edx
jmp    1030 <FifoProtocol_memcpy@plt>

LLVM IR (-O0):
define void @inv_fifo_protocol_helper_decode_eis_gyr_deltats_data(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
store i32* %9, i32** %7
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = getelementptr inbounds i32, i32* %11, i64 12
%13 = call i32 @FifoProtocol_memcpy(i32* %10, i32* %12, i32 4)
%14 = load i32, i32* %5
ret void
}

LLVM IR (-O2):
define void @inv_fifo_protocol_helper_decode_eis_gyr_deltats_data(i8* %0, i32 %1, i32* %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 48
%5 = bitcast i8* %4 to i32*
%6 = tail call i32 @FifoProtocol_memcpy(i32* %2, i32* %5, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ NumberIO_HexToStr(unsigned int, unsigned int, char *, int);
int /*<<< orphan*/ StrIO_WriteString(char *, int);
void NumberIO_WriteHex(unsigned int x, unsigned int n) {
  typedef struct _T4_a _T4;
  struct _T4_a {
    char array[79 + 1];
  };
  _T4 a;
  NumberIO_HexToStr(x, n, (char *)&a.array[0], 79);
  StrIO_WriteString((char *)&a.array[0], 79);
}


x86 assembly (clang, -O0):
<NumberIO_WriteHex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
lea    -0x58(%rbp),%rdx
mov    $0x4f,%ecx
call   1040 <NumberIO_HexToStr@plt>
lea    -0x58(%rbp),%rdi
mov    $0x4f,%esi
call   1030 <StrIO_WriteString@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumberIO_WriteHex>:
push   %rbx
sub    $0x50,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdx
mov    $0x4f,%ecx
call   1040 <NumberIO_HexToStr@plt>
mov    %rbx,%rdi
mov    $0x4f,%esi
call   1030 <StrIO_WriteString@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct._T4_a = type { [80 x i8] }
define void @NumberIO_WriteHex(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct._T4_a
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = getelementptr inbounds %struct._T4_a, %struct._T4_a* %5, i32 0, i32 0
%9 = getelementptr inbounds [80 x i8], [80 x i8]* %8, i64 0, i64 0
%10 = call i32 @NumberIO_HexToStr(i32 %6, i32 %7, i8* %9, i32 79)
%11 = getelementptr inbounds %struct._T4_a, %struct._T4_a* %5, i32 0, i32 0
%12 = getelementptr inbounds [80 x i8], [80 x i8]* %11, i64 0, i64 0
%13 = call i32 @StrIO_WriteString(i8* %12, i32 79)
ret void
}

LLVM IR (-O2):
%struct._T4_a = type { [80 x i8] }
define void @NumberIO_WriteHex(i32 %0, i32 %1) {
%3 = alloca %struct._T4_a
%4 = getelementptr inbounds %struct._T4_a, %struct._T4_a* %3, i64 0, i32 0, i64 0
%5 = call i32 @NumberIO_HexToStr(i32 %0, i32 %1, i8* %4, i32 79)
%6 = call i32 @StrIO_WriteString(i8* %4, i32 79)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _throw_stack_fn();
void _stackoverflow_handler_continuation(void *arg1, void *arg2, void *arg3) {
  _throw_stack_fn();
}


x86 assembly (clang, -O0):
<_stackoverflow_handler_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <_throw_stack_fn@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @_stackoverflow_handler_continuation(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = call i32 (...) @_throw_stack_fn()
ret void
}

LLVM IR (-O2):
define void @_stackoverflow_handler_continuation(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 (...) @_throw_stack_fn()
ret void
}
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ sprintf(char *, char *, char *);
scalar_t__ strlen(char *);
char *prepare_value(char *value) {
  char *new = malloc(strlen(value) + 2);
  sprintf(new, " %s", value);
  return new;
}


x86 assembly (clang, -O0):
<prepare_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x2,%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe9c(%rip),%rsi
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prepare_value>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
lea    0x2(%rax),%rdi
call   1040 <malloc@plt>
mov    %rax,%rbx
lea    0xeb1(%rip),%rsi
mov    %rax,%rdi
mov    %r14,%rdx
call   1050 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %s\00"
define i8* @prepare_value(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 2
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [4 x i8] c" %s\00"
define noalias i8* @prepare_value(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 2
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %4, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i8* %4
}
void handle_47(int sig) {}


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

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

LLVM IR (-O0):
define void @handle_47(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @handle_47(i32 %0) {
ret void
}
/* Variables and functions */
int const AF_INET;
int const AF_INET6;
int INET6_ADDRSTRLEN;
int INET_ADDRSTRLEN;
int /*<<< orphan*/ assert(int);
int addrlen(const int fam) {
  assert(fam == AF_INET || fam == AF_INET6);
  return fam == AF_INET ? INET_ADDRSTRLEN : INET6_ADDRSTRLEN;
}


x86 assembly (clang, -O0):
<addrlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%al
mov    0x2eb9(%rip),%rdx
cmp    (%rdx),%ecx
mov    %al,-0x5(%rbp)
je     1144 <addrlen+0x34>
mov    -0x4(%rbp),%eax
mov    0x2e9c(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    0x2e85(%rip),%rcx
cmp    (%rcx),%eax
jne    1174 <addrlen+0x64>
mov    0x2e5e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
jmp    1180 <addrlen+0x70>
mov    0x2e6d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addrlen>:
push   %rbx
mov    %edi,%eax
xor    %edi,%edi
test   %eax,%eax
sete   %dil
jne    1126 <addrlen+0x16>
mov    0x2eb4(%rip),%rbx
jmp    112d <addrlen+0x1d>
mov    0x2ebb(%rip),%rbx
call   1030 <assert@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
@AF_INET = constant i32 0
@AF_INET6 = constant i32 0
@INET_ADDRSTRLEN = global i32 0
@INET6_ADDRSTRLEN = global i32 0
define i32 @addrlen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @AF_INET
%5 = icmp eq i32 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @AF_INET6
%9 = icmp eq i32 %7, %8
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %2
%15 = load i32, i32* @AF_INET
%16 = icmp eq i32 %14, %15
br i1 %16, label %17, label %19
17: ; preds = %10
%18 = load i32, i32* @INET_ADDRSTRLEN
br label %21
19: ; preds = %10
%20 = load i32, i32* @INET6_ADDRSTRLEN
br label %21
21: ; preds = %19, %17
%22 = phi i32 [ %18, %17 ], [ %20, %19 ]
ret i32 %22
}

LLVM IR (-O2):
@AF_INET = constant i32 0
@AF_INET6 = constant i32 0
@INET_ADDRSTRLEN = global i32 0
@INET6_ADDRSTRLEN = global i32 0
define i32 @addrlen(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = load i32, i32* @INET_ADDRSTRLEN
%6 = load i32, i32* @INET6_ADDRSTRLEN
%7 = select i1 %2, i32 %5, i32 %6
ret i32 %7
}
void ft_striter(char *s, void (*f)(char *)) {
  while (*s)
    (*f)(s++);
}


x86 assembly (clang, -O0):
<ft_striter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1137 <ft_striter+0x37>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    %rdi,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
call   *%rax
jmp    1110 <ft_striter+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striter>:
push   %r15
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     1123 <ft_striter+0x23>
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x1(%rbx),%r15
mov    %rbx,%rdi
call   *%r14
cmpb   $0x0,0x1(%rbx)
mov    %r15,%rbx
jne    1110 <ft_striter+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @ft_striter(i8* %0, void (i8*)* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %2, %5
%6 = phi i8* [ %7, %5 ], [ %0, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
tail call void %1(i8* %6)
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret void
}
void WFMac_EmptyFunc(void) { ; }


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

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

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

LLVM IR (-O2):
define void @WFMac_EmptyFunc() {
ret void
}
int _Locale_toupper(struct _Locale_ctype *__DUMMY_PAR1, int __DUMMY_PAR) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct._Locale_ctype = type opaque
define i32 @_Locale_toupper(%struct._Locale_ctype* %0, i32 %1) {
%3 = alloca %struct._Locale_ctype*
%4 = alloca i32
store %struct._Locale_ctype* %0, %struct._Locale_ctype** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct._Locale_ctype = type opaque
define i32 @_Locale_toupper(%struct._Locale_ctype* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *get_dt_string(char *);
int dt_board_check() {
  char *dtm;
  int ret = 0;
  dtm = get_dt_string("model");
  if (dtm) {
    ret = 1;
    free(dtm);
  }
  return ret;
}


x86 assembly (clang, -O0):
<dt_board_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0xc(%rbp)
lea    0xeca(%rip),%rdi
call   1040 <get_dt_string@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115a <dt_board_check+0x3a>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"model\00"
define i32 @dt_board_check() {
%1 = tail call i8* @get_dt_string(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @free(i8* %1)
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ 1, %3 ], [ 0, %0 ]
ret i32 %6
}