xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0xf3() {
  Assert_real((islower(243) == 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_islower.c",
              1220, ("islower should be 0 for 0xf3"));
}


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

x86 assembly (clang, -O2):
<t_islower_0xf3>:
push   %rax
mov    $0xf3,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4c4,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xf3\00"
define void @t_islower_0xf3() {
%1 = call i64 @islower(i32 243)
%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 1220, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0xf3\00"
define void @t_islower_0xf3() {
%1 = tail call i64 @islower(i32 243)
%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 1220, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
void execCD(char *newpath) { chdir(newpath); }


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

x86 assembly (clang, -O2):
<execCD>:
jmp    1030 <chdir@plt>

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

LLVM IR (-O2):
define void @execCD(i8* %0) {
%2 = tail call i32 @chdir(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
int /*<<< orphan*/ printf(char *);
void *db_malloc(size_t size) {
  void *p = malloc(size);
  if (p == NULL) {
    printf("Malloc failed, out of memory!!!\n");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<db_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116a <db_malloc+0x3a>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<db_malloc>:
push   %rax
call   1040 <malloc@plt>
test   %rax,%rax
je     113d <db_malloc+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Malloc failed, out of memory!!!\0A\00"
define i8* @db_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %1
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
@str = [32 x i8] c"Malloc failed, out of memory!!!\00"
define noalias i8* @db_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret i8* %2
}
void adelanta(int *p) { *p = (*p + 1) % 50; }


x86 assembly (clang, -O0):
<adelanta>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x1,%eax
mov    $0x32,%ecx
cltd
idiv   %ecx
mov    -0x8(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<adelanta>:
mov    (%rdi),%eax
mov    %eax,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x51eb851f,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x24,%rcx
add    %edx,%ecx
imul   $0x32,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @adelanta(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = add nsw i32 %4, 1
%6 = srem i32 %5, 50
%7 = load i32*, i32** %2
store i32 %6, i32* %7
ret void
}

LLVM IR (-O2):
define void @adelanta(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 1
%4 = srem i32 %3, 50
store i32 %4, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ doStuff_pointerToConstInt(int *);
int *f_2_sub(int *);
void f_2(void) {
  int t;
  int *p = f_2_sub(&t);
  int *tp = p;
  doStuff_pointerToConstInt(tp);
}


x86 assembly (clang, -O0):
<f_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <f_2_sub@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <doStuff_pointerToConstInt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_2>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <f_2_sub@plt>
mov    %rax,%rdi
call   1030 <doStuff_pointerToConstInt@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @f_2() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = call i32* @f_2_sub(i32* %1)
store i32* %4, i32** %2
%5 = load i32*, i32** %2
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @doStuff_pointerToConstInt(i32* %6)
ret void
}

LLVM IR (-O2):
define void @f_2() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32* @f_2_sub(i32* %1)
%4 = call i32 @doStuff_pointerToConstInt(i32* %3)
ret void
}
unsigned long long setBit_fun_ullong(unsigned long long x, unsigned i) {
  return x | 1 << i;
}


x86 assembly (clang, -O0):
<setBit_fun_ullong>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setBit_fun_ullong>:
mov    %esi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
cltq
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @setBit_fun_ullong(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = sext i32 %7 to i64
%9 = or i64 %5, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @setBit_fun_ullong(i64 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = sext i32 %3 to i64
%5 = or i64 %4, %0
ret i64 %5
}
char *_strcpy(char *dest, const char *src) {
  int d0, d1, d2;
  __asm__ __volatile__("1:\tlodsb\n\t"
                       "stosb\n\t"
                       "testb %%al,%%al\n\t"
                       "jne 1b"
                       : "=&S"(d0), "=&D"(d1), "=&a"(d2)
                       : "0"(src), "1"(dest)
                       : "memory");
  return dest;
}


x86 assembly (clang, -O0):
<_strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdi
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1114 <_strcpy+0x14>
mov    %esi,%ecx
mov    %ecx,-0x14(%rbp)
mov    %edi,%ecx
mov    %ecx,-0x18(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_strcpy>:
mov    %rdi,%rcx
lods   %ds:(%rsi),%al
stos   %al,%es:(%rdi)
test   %al,%al
jne    1103 <_strcpy+0x3>
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i8* @_strcpy(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %4
%9 = load i8*, i8** %3
%10 = call { i8*, i8*, i32 } asm sideeffect "1:\09lodsb\0A\09stosb\0A\09testb %al,%al\0A\09jne 1b", "=&{si},=&{di},=&{ax},0,1,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %8, i8* %9)
%11 = extractvalue { i8*, i8*, i32 } %10, 0
%12 = extractvalue { i8*, i8*, i32 } %10, 1
%13 = extractvalue { i8*, i8*, i32 } %10, 2
%14 = ptrtoint i8* %11 to i64
%15 = trunc i64 %14 to i32
store i32 %15, i32* %5
%16 = ptrtoint i8* %12 to i64
%17 = trunc i64 %16 to i32
store i32 %17, i32* %6
store i32 %13, i32* %7
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @_strcpy(i8* returned %0, i8* %1) {
%3 = tail call { i8*, i8*, i32 } asm sideeffect "1:\09lodsb\0A\09stosb\0A\09testb %al,%al\0A\09jne 1b", "=&{si},=&{di},=&{ax},0,1,~{memory},~{dirflag},~{fpsr},~{flags}"(i8* %1, i8* %0)
ret i8* %0
}
unsigned int mus_char_to_ulint(const unsigned char *inp) {
  unsigned int o;
  unsigned char *outp;
  outp = (unsigned char *)&o;
  outp[0] = inp[3];
  outp[1] = inp[2];
  outp[2] = inp[1];
  outp[3] = inp[0];
  return (o);
}


x86 assembly (clang, -O0):
<mus_char_to_ulint>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    0x3(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x2(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mus_char_to_ulint>:
mov    (%rdi),%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @mus_char_to_ulint(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = bitcast i32* %3 to i8*
store i8* %5, i8** %4
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i64 3
%8 = load i8, i8* %7
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 2
%13 = load i8, i8* %12
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i64 1
store i8 %13, i8* %15
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 1
%18 = load i8, i8* %17
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 2
store i8 %18, i8* %20
%21 = load i8*, i8** %2
%22 = getelementptr inbounds i8, i8* %21, i64 0
%23 = load i8, i8* %22
%24 = load i8*, i8** %4
%25 = getelementptr inbounds i8, i8* %24, i64 3
store i8 %23, i8* %25
%26 = load i32, i32* %3
ret i32 %26
}

LLVM IR (-O2):
define i32 @mus_char_to_ulint(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
%4 = getelementptr inbounds i8, i8* %0, i64 2
%5 = load i8, i8* %4
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = load i8, i8* %0
%9 = zext i8 %8 to i32
%10 = shl nuw i32 %9, 24
%11 = zext i8 %7 to i32
%12 = shl nuw nsw i32 %11, 16
%13 = zext i8 %5 to i32
%14 = shl nuw nsw i32 %13, 8
%15 = zext i8 %3 to i32
%16 = or i32 %14, %15
%17 = or i32 %16, %12
%18 = or i32 %17, %10
ret i32 %18
}
int f(int **ipp, int *i1p, int *i2p, int **i3, int **i4) {
  **ipp = *i1p;
  *ipp = i2p;
  *i3 = *i4;
  **ipp = 99;
  return 3;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%rcx
mov    -0x20(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movl   $0x63,(%rax)
mov    $0x3,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    (%rsi),%eax
mov    (%rdi),%rsi
mov    %eax,(%rsi)
mov    %rdx,(%rdi)
mov    (%r8),%rax
mov    %rax,(%rcx)
mov    (%rdi),%rax
movl   $0x63,(%rax)
mov    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @f(i32** %0, i32* %1, i32* %2, i32** %3, i32** %4) {
%6 = alloca i32**
%7 = alloca i32*
%8 = alloca i32*
%9 = alloca i32**
%10 = alloca i32**
store i32** %0, i32*** %6
store i32* %1, i32** %7
store i32* %2, i32** %8
store i32** %3, i32*** %9
store i32** %4, i32*** %10
%11 = load i32*, i32** %7
%12 = load i32, i32* %11
%13 = load i32**, i32*** %6
%14 = load i32*, i32** %13
store i32 %12, i32* %14
%15 = load i32*, i32** %8
%16 = load i32**, i32*** %6
store i32* %15, i32** %16
%17 = load i32**, i32*** %10
%18 = load i32*, i32** %17
%19 = load i32**, i32*** %9
store i32* %18, i32** %19
%20 = load i32**, i32*** %6
%21 = load i32*, i32** %20
store i32 99, i32* %21
ret i32 3
}

LLVM IR (-O2):
define i32 @f(i32** nocapture %0, i32* nocapture %1, i32* %2, i32** nocapture writeonly %3, i32** nocapture %4) {
%6 = load i32, i32* %1
%7 = load i32*, i32** %0
store i32 %6, i32* %7
store i32* %2, i32** %0
%8 = load i32*, i32** %4
store i32* %8, i32** %3
%9 = load i32*, i32** %0
store i32 99, i32* %9
ret i32 3
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
size_t __infer_nondet_int();
size_t mbsrtowcs(wchar_t *dst, const char **src, size_t len, mbstate_t *ps) {
  return __infer_nondet_int();
}


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

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

LLVM IR (-O0):
define i64 @mbsrtowcs(i32* %0, i8** %1, i64 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i64
%8 = alloca i32*
store i32* %0, i32** %5
store i8** %1, i8*** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%9 = call i64 (...) @__infer_nondet_int()
ret i64 %9
}

LLVM IR (-O2):
define i64 @mbsrtowcs(i32* nocapture readnone %0, i8** nocapture readnone %1, i64 %2, i32* nocapture readnone %3) {
%5 = tail call i64 (...) @__infer_nondet_int()
ret i64 %5
}
void platform_windows() {}


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

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

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

LLVM IR (-O2):
define void @platform_windows() {
ret void
}
float ret_float(float arg1) { return arg1; }


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

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

LLVM IR (-O0):
define float @ret_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
ret float %3
}

LLVM IR (-O2):
define float @ret_float(float returned %0) {
ret float %0
}
/* Variables and functions */
int /*<<< orphan*/ send_int_to_srv(int);
void set_mixer(int val) {
  val = ((val) < (0) ? (0) : (val) > (100) ? (100) : (val));
  send_int_to_srv(0x1b);
  send_int_to_srv(val);
}


x86 assembly (clang, -O0):
<set_mixer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    112f <set_mixer+0x1f>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1152 <set_mixer+0x42>
cmpl   $0x64,-0x4(%rbp)
jle    1146 <set_mixer+0x36>
mov    $0x64,%eax
mov    %eax,-0xc(%rbp)
jmp    114c <set_mixer+0x3c>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    $0x1b,%edi
call   1030 <send_int_to_srv@plt>
mov    -0x4(%rbp),%edi
call   1030 <send_int_to_srv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_mixer>:
push   %rbx
mov    %edi,%ebx
cmp    $0x64,%edi
mov    $0x64,%eax
cmovge %eax,%ebx
xor    %eax,%eax
test   %ebx,%ebx
cmovs  %eax,%ebx
mov    $0x1b,%edi
call   1030 <send_int_to_srv@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <send_int_to_srv@plt>

LLVM IR (-O0):
define void @set_mixer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 100
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load i32, i32* %2
br label %12
12: ; preds = %10, %9
%13 = phi i32 [ 100, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi i32 [ 0, %5 ], [ %13, %12 ]
store i32 %15, i32* %2
%16 = call i32 @send_int_to_srv(i32 27)
%17 = load i32, i32* %2
%18 = call i32 @send_int_to_srv(i32 %17)
ret void
}

LLVM IR (-O2):
define void @set_mixer(i32 %0) {
%2 = icmp slt i32 %0, 100
%3 = select i1 %2, i32 %0, i32 100
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
%6 = tail call i32 @send_int_to_srv(i32 27)
%7 = tail call i32 @send_int_to_srv(i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free_init();
int /*<<< orphan*/ test_fp(double);
void test_fp_print() {
  free_init();
  test_fp(1.3);
  test_fp(1.23456);
  test_fp(0.13);
  test_fp(1.0 / 3.0);
}


x86 assembly (clang, -O0):
<test_fp_print>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <free_init@plt>
movsd  0xee5(%rip),%xmm0
call   1040 <test_fp@plt>
movsd  0xed0(%rip),%xmm0
call   1040 <test_fp@plt>
movsd  0xebb(%rip),%xmm0
call   1040 <test_fp@plt>
movsd  0xea6(%rip),%xmm0
call   1040 <test_fp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fp_print>:
push   %rax
xor    %eax,%eax
call   1030 <free_init@plt>
movsd  0xed0(%rip),%xmm0
call   1040 <test_fp@plt>
movsd  0xecb(%rip),%xmm0
call   1040 <test_fp@plt>
movsd  0xec6(%rip),%xmm0
call   1040 <test_fp@plt>
movsd  0xec1(%rip),%xmm0
pop    %rax
jmp    1040 <test_fp@plt>

LLVM IR (-O0):
define void @test_fp_print() {
%1 = call i32 (...) @free_init()
%2 = call i32 @test_fp(double 1.300000e+00)
%3 = call i32 @test_fp(double 1.234560e+00)
%4 = call i32 @test_fp(double 1.300000e-01)
%5 = call i32 @test_fp(double 0x3FD5555555555555)
ret void
}

LLVM IR (-O2):
define void @test_fp_print() {
%1 = tail call i32 (...) @free_init()
%2 = tail call i32 @test_fp(double 1.300000e+00)
%3 = tail call i32 @test_fp(double 1.234560e+00)
%4 = tail call i32 @test_fp(double 1.300000e-01)
%5 = tail call i32 @test_fp(double 0x3FD5555555555555)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emit(char *);
void getcondition_le_s_ns(void) {
  emit("push eax\n");
  emit("neg al\n");
  emit("xor al,ah\n");
  emit("add ah,ah\n");
  emit("or al,ah\n");
  emit("pop eax\n");
}


x86 assembly (clang, -O0):
<getcondition_le_s_ns>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <emit@plt>
lea    0xee3(%rip),%rdi
call   1030 <emit@plt>
lea    0xedf(%rip),%rdi
call   1030 <emit@plt>
lea    0xede(%rip),%rdi
call   1030 <emit@plt>
lea    0xec8(%rip),%rdi
call   1030 <emit@plt>
lea    0xed1(%rip),%rdi
call   1030 <emit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<getcondition_le_s_ns>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <emit@plt>
lea    0xee6(%rip),%rdi
call   1030 <emit@plt>
lea    0xee2(%rip),%rdi
call   1030 <emit@plt>
lea    0xee1(%rip),%rdi
call   1030 <emit@plt>
lea    0xecb(%rip),%rdi
call   1030 <emit@plt>
lea    0xed4(%rip),%rdi
pop    %rax
jmp    1030 <emit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"push eax\0A\00"
@.str.1 = [8 x i8] c"neg al\0A\00"
@.str.2 = [11 x i8] c"xor al,ah\0A\00"
@.str.3 = [11 x i8] c"add ah,ah\0A\00"
@.str.4 = [10 x i8] c"or al,ah\0A\00"
@.str.5 = [9 x i8] c"pop eax\0A\00"
define void @getcondition_le_s_ns() {
%1 = call i32 @emit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @emit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @emit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @emit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @emit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @emit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"push eax\0A\00"
@.str.1 = [8 x i8] c"neg al\0A\00"
@.str.2 = [11 x i8] c"xor al,ah\0A\00"
@.str.3 = [11 x i8] c"add ah,ah\0A\00"
@.str.4 = [10 x i8] c"or al,ah\0A\00"
@.str.5 = [9 x i8] c"pop eax\0A\00"
define void @getcondition_le_s_ns() {
%1 = tail call i32 @emit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @emit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @emit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @emit(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @emit(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @emit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0))
ret void
}
int CONNECT(int sockfd, struct sockaddr *serv_addr, int addrlen) { return 1; }


x86 assembly (clang, -O0):
<CONNECT>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.sockaddr = type opaque
define i32 @CONNECT(i32 %0, %struct.sockaddr* nocapture readnone %1, i32 %2) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void *thread_start(void *arg) {
  usleep(1000);
  return arg;
}


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

x86 assembly (clang, -O2):
<thread_start>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3e8,%edi
call   1030 <usleep@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @thread_start(i8* readnone returned %0) {
%2 = tail call i32 @usleep(i32 1000)
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ g5_set_nMC(int, int);
void(g5_set_nMC_)(int *devid, int *n) { g5_set_nMC(*devid, *n); }


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

x86 assembly (clang, -O2):
<g5_set_nMC_>:
mov    (%rdi),%edi
mov    (%rsi),%esi
jmp    1030 <g5_set_nMC@plt>

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

LLVM IR (-O2):
define void @g5_set_nMC_(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = tail call i32 @g5_set_nMC(i32 %3, i32 %4)
ret void
}
/* Type definitions */
struct RB_header {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void RB_XMLDB_Generate_Header_End(FILE *dest_doc,
                                  struct RB_header *cur_header) {
  (cur_header = cur_header);
  ;
  fprintf(dest_doc, "</section>\n");
}


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

x86 assembly (clang, -O2):
<RB_XMLDB_Generate_Header_End>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0xb,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
%struct.RB_header = type { i32 }
@.str = [12 x i8] c"</section>\0A\00"
define void @RB_XMLDB_Generate_Header_End(i32* %0, %struct.RB_header* %1) {
%3 = alloca i32*
%4 = alloca %struct.RB_header*
store i32* %0, i32** %3
store %struct.RB_header* %1, %struct.RB_header** %4
%5 = load %struct.RB_header*, %struct.RB_header** %4
store %struct.RB_header* %5, %struct.RB_header** %4
%6 = load i32*, i32** %3
%7 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.RB_header = type { i32 }
@.str = [12 x i8] c"</section>\0A\00"
define void @RB_XMLDB_Generate_Header_End(i32* nocapture %0, %struct.RB_header* nocapture readnone %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i64 11, i64 1, i32* %0)
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t htons(uint16_t hostshort) {
  return ((hostshort & 0xff) << 8) | (hostshort >> 8);
}


x86 assembly (clang, -O0):
<htons>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<htons>:
mov    %edi,%eax
shl    $0x8,%eax
movzwl %ax,%eax
sar    $0x8,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @htons(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 8
%6 = load i32, i32* %2
%7 = ashr i32 %6, 8
%8 = or i32 %5, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @htons(i32 %0) {
%2 = shl i32 %0, 8
%3 = and i32 %2, 65280
%4 = ashr i32 %0, 8
%5 = or i32 %3, %4
ret i32 %5
}
void initThreadOnLoopStart(struct aeEventLoop *el) {}


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

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

LLVM IR (-O0):
%struct.aeEventLoop = type opaque
define void @initThreadOnLoopStart(%struct.aeEventLoop* %0) {
%2 = alloca %struct.aeEventLoop*
store %struct.aeEventLoop* %0, %struct.aeEventLoop** %2
ret void
}

LLVM IR (-O2):
%struct.aeEventLoop = type opaque
define void @initThreadOnLoopStart(%struct.aeEventLoop* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ calloc(int, int);
unsigned char *data_init(void) {
  unsigned char *IVs =
      (unsigned char *)calloc(256 * 256 * 256 * 3, sizeof(unsigned char));
  return IVs;
}


x86 assembly (clang, -O0):
<data_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3000000,%edi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data_init>:
mov    $0x3000000,%edi
mov    $0x1,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @data_init() {
%1 = alloca i8*
%2 = call i64 @calloc(i32 50331648, i32 1)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
ret i8* %4
}

LLVM IR (-O2):
define i8* @data_init() {
%1 = tail call i64 @calloc(i32 50331648, i32 1)
%2 = inttoptr i64 %1 to i8*
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello\c world");
  return 0;
}


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

LLVM IR (-O0):
@.str = [13 x i8] c"Helloc world\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Helloc world\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int _getline(char *, int);
int /*<<< orphan*/ fold(char *, int, int);
int main() {
  int lineLength, foldLimit;
  foldLimit = 4;
  char string[1000];
  while ((lineLength = _getline(string, 1000)) > 0) {
    fold(string, foldLimit, lineLength);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
lea    -0x400(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <_getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    116d <main+0x4d>
lea    -0x400(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%edx
call   1030 <fold@plt>
jmp    1139 <main+0x19>
mov    -0x4(%rbp),%eax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x3f0,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <_getline@plt>
test   %eax,%eax
jle    1160 <main+0x40>
mov    %rsp,%rbx
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %eax,%edx
call   1030 <fold@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <_getline@plt>
test   %eax,%eax
jg     1140 <main+0x20>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [1000 x i8]
store i32 0, i32* %1
store i32 4, i32* %3
br label %5
5: ; preds = %9, %0
%6 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%7 = call i32 @_getline(i8* %6, i32 1000)
store i32 %7, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = getelementptr inbounds [1000 x i8], [1000 x i8]* %4, i64 0, i64 0
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = call i32 @fold(i8* %10, i32 %11, i32 %12)
br label %5
14: ; preds = %5
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @_getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %0, %5
%6 = phi i32 [ %8, %5 ], [ %3, %0 ]
%7 = call i32 @fold(i8* %2, i32 4, i32 %6)
%8 = call i32 @_getline(i8* %2, i32 1000)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %5, label %10
10: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hino17() {
  printf("hino17 likes metals with with lots of nickel and copper. \n");
}


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

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

LLVM IR (-O0):
@.str = [59 x i8] c"hino17 likes metals with with lots of nickel and copper. \0A\00"
define void @hino17() {
%1 = call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [58 x i8] c"hino17 likes metals with with lots of nickel and copper. \00"
define void @hino17() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
void kill_logger(FILE *file) { fclose(file); }


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

x86 assembly (clang, -O2):
<kill_logger>:
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
define void @kill_logger(i32* nocapture %0) {
%2 = tail call i32 @fclose(i32* %0)
ret void
}
void DPRINTF(struct ath_softc *sc, int dbg_mask, const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
%struct.ath_softc = type opaque
define void @DPRINTF(%struct.ath_softc* nocapture %0, i32 %1, i8* nocapture %2, ...) {
ret void
}
void for_exit() { printf("%s [%s]\n", __func__, "atexit"); }


x86 assembly (clang, -O0):
<for_exit>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee7(%rip),%rsi
lea    0xee9(%rip),%rdx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<for_exit>:
lea    0xee9(%rip),%rdi
lea    0xeeb(%rip),%rsi
lea    0xeed(%rip),%rdx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s [%s]\0A\00"
@__func__.for_exit = [9 x i8] c"for_exit\00"
@.str.1 = [7 x i8] c"atexit\00"
define void @for_exit() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.for_exit, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s [%s]\0A\00"
@__func__.for_exit = [9 x i8] c"for_exit\00"
@.str.1 = [7 x i8] c"atexit\00"
define void @for_exit() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @__func__.for_exit, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int inputyear(void) {
  int year;
  printf("Please enter a year (example: 2012): ");
  scanf("%d", &year);
  return year;
}


x86 assembly (clang, -O0):
<inputyear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inputyear>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xef2(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [38 x i8] c"Please enter a year (example: 2012): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @inputyear() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [38 x i8] c"Please enter a year (example: 2012): \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @inputyear() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
/* Variables and functions */
scalar_t__ dist(int, int, int, int);
scalar_t__ pow(int, int);
bool in_range(int y0, int x0, int y1, int x1, int r) {
  return dist(y0, x0, y1, x1) <= pow(r, 2);
}


x86 assembly (clang, -O0):
<in_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
call   1030 <dist@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x2,%esi
call   1040 <pow@plt>
mov    %rax,%rcx
mov    -0x20(%rbp),%rax
cmp    %rcx,%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_range>:
push   %rbp
push   %rbx
push   %rax
mov    %r8d,%ebp
call   1030 <dist@plt>
mov    %rax,%rbx
mov    %ebp,%edi
mov    $0x2,%esi
call   1040 <pow@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setle  %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @in_range(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = call i64 @dist(i32 %11, i32 %12, i32 %13, i32 %14)
%16 = load i32, i32* %10
%17 = call i64 @pow(i32 %16, i32 2)
%18 = icmp sle i64 %15, %17
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @in_range(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i64 @dist(i32 %0, i32 %1, i32 %2, i32 %3)
%7 = tail call i64 @pow(i32 %4, i32 2)
%8 = icmp sle i64 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int bio_write(int /*<<< orphan*/ *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
int bio_puts(BIO *bio, const char *str) {
  return bio_write(bio, str, strlen(str));
}


x86 assembly (clang, -O0):
<bio_puts>:
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   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1040 <bio_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @bio_puts(i32* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @bio_write(i32* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t reverse_endian32(uint32_t data) {
  return 0 | (data & 0x000000ff) << 24 | (data & 0x0000ff00) << 8 |
         (data & 0x00ff0000) >> 8 | (data & 0xff000000) >> 24;
}


x86 assembly (clang, -O0):
<reverse_endian32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
or     $0x0,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse_endian32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @reverse_endian32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = or i32 0, %5
%7 = load i32, i32* %2
%8 = and i32 %7, 65280
%9 = shl i32 %8, 8
%10 = or i32 %6, %9
%11 = load i32, i32* %2
%12 = and i32 %11, 16711680
%13 = ashr i32 %12, 8
%14 = or i32 %10, %13
%15 = load i32, i32* %2
%16 = and i32 %15, -16777216
%17 = lshr i32 %16, 24
%18 = or i32 %14, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @reverse_endian32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
double foo(double a) { return __builtin_pow(a, -5.875); }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
call   1030 <pow@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movsd  0xee8(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @foo(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @pow(double %3, double -5.875000e+00)
ret double %4
}

LLVM IR (-O2):
define double @foo(double %0) {
%2 = tail call double @pow(double %0, double -5.875000e+00)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ dbg_write(char const *const, unsigned int);
void printf_handler(void *param, const char *const buf, unsigned int size) {
  dbg_write(buf, size);
}


x86 assembly (clang, -O0):
<printf_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <dbg_write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_handler>:
mov    %rsi,%rdi
mov    %edx,%esi
jmp    1030 <dbg_write@plt>

LLVM IR (-O0):
define void @printf_handler(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @dbg_write(i8* %7, i32 %8)
ret void
}

LLVM IR (-O2):
define void @printf_handler(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = tail call i32 @dbg_write(i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ zero_1(double *);
void wrap_zero_1(int start, int end, double *arg0_0, int layer) {
  for (int n = start; n < end; n++) {
    int i = n;
    { zero_1(arg0_0 + i * 1); }
  }
}


x86 assembly (clang, -O0):
<wrap_zero_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1163 <wrap_zero_1+0x53>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%eax
shl    $0x0,%eax
cltq
shl    $0x3,%rax
add    %rax,%rdi
call   1030 <zero_1@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    112b <wrap_zero_1+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap_zero_1>:
push   %rbp
push   %rbx
push   %rax
cmp    %esi,%edi
jge    1141 <wrap_zero_1+0x31>
mov    %esi,%ebp
movslq %edi,%rax
lea    (%rdx,%rax,8),%rbx
sub    %edi,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <zero_1@plt>
add    $0x8,%rbx
add    $0xffffffff,%ebp
jne    1130 <wrap_zero_1+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @wrap_zero_1(i32 %0, i32 %1, double* %2, i32 %3) {
%5 = icmp slt i32 %0, %1
br i1 %5, label %6, label %8
6: ; preds = %4
%7 = sext i32 %0 to i64
br label %9
8: ; preds = %9, %4
ret void
9: ; preds = %6, %9
%10 = phi i64 [ %7, %6 ], [ %13, %9 ]
%11 = getelementptr inbounds double, double* %2, i64 %10
%12 = tail call i32 @zero_1(double* %11)
%13 = add nsw i64 %10, 1
%14 = trunc i64 %13 to i32
%15 = icmp eq i32 %14, %1
br i1 %15, label %8, label %9
}
void func6(int a, int *b, char c) {
  int *var2 = b;
  *var2 = 500;
}


x86 assembly (clang, -O0):
<func6>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x1f4,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<func6>:
movl   $0x1f4,(%rsi)
ret

LLVM IR (-O0):
define void @func6(i32 %0, i32* %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8
%7 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i8 %2, i8* %6
%8 = load i32*, i32** %5
store i32* %8, i32** %7
%9 = load i32*, i32** %7
store i32 500, i32* %9
ret void
}

LLVM IR (-O2):
define void @func6(i32 %0, i32* nocapture writeonly %1, i8 signext %2) {
store i32 500, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int, int, int);
const char *cJSON_Version(void) {
  static char version[15];
  sprintf(version, "%i.%i.%i", 1, 7, 13);
  return version;
}


x86 assembly (clang, -O0):
<cJSON_Version>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f0e(%rip),%rdi
lea    0xede(%rip),%rsi
mov    $0x1,%edx
mov    $0x7,%ecx
mov    $0xd,%r8d
call   1030 <sprintf@plt>
lea    0x2eeb(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cJSON_Version>:
push   %rbx
lea    0x2f11(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%edx
mov    $0x7,%ecx
mov    $0xd,%r8d
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@cJSON_Version.version = internal global [15 x i8] zeroinitializer
@.str = [9 x i8] c"%i.%i.%i\00"
define i8* @cJSON_Version() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @cJSON_Version.version, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 7, i32 13)
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @cJSON_Version.version, i64 0, i64 0)
}

LLVM IR (-O2):
@cJSON_Version.version = internal global [15 x i8] zeroinitializer
@.str = [9 x i8] c"%i.%i.%i\00"
define i8* @cJSON_Version() {
%1 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @cJSON_Version.version, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 1, i32 7, i32 13)
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @cJSON_Version.version, i64 0, i64 0)
}