xunge/DecIR huggingface dataset:
/* Variables and functions */
int fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int c_down() { return fputs("[B", stdout); }


x86 assembly (clang, -O0):
<c_down>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%esi
lea    0xedc(%rip),%rdi
call   1030 <fputs@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_down>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
lea    0xee0(%rip),%rdi
jmp    1030 <fputs@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[B\00"
@stdout = global i32 0
define i32 @c_down() {
%1 = load i32, i32* @stdout
%2 = call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[B\00"
@stdout = global i32 0
define i32 @c_down() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x61() {
  Assert_real((ispunct(97) == 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",
              490, ("ispunct should be 0 for a"));
}


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

x86 assembly (clang, -O2):
<t_ispunct_0x61>:
push   %rax
mov    $0x61,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1ea,%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 = [26 x i8] c"ispunct should be 0 for a\00"
define void @t_ispunct_0x61() {
%1 = call i64 @ispunct(i32 97)
%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 490, i8* getelementptr inbounds ([26 x i8], [26 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 = [26 x i8] c"ispunct should be 0 for a\00"
define void @t_ispunct_0x61() {
%1 = tail call i64 @ispunct(i32 97)
%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 490, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int test_imm_C7int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xC7 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C7int64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xc7,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_C7int64_highword_mem>:
testb  $0xc7,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_C7int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 199
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_C7int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 854698491904
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int syscall(int, char const *, char *const *, char *const *);
int execve(const char *path, char *const argv[], char *const envp[]) {
  return syscall(11, path, argv, envp);
}


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

x86 assembly (clang, -O2):
<execve>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0xb,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @execve(i8* %0, i8** %1, i8** %2) {
%4 = tail call i32 @syscall(i32 11, i8* %0, i8** %1, i8** %2)
ret i32 %4
}
void f7(void) {
  _Bool b;
  switch (b = 1)
    break;
}


x86 assembly (clang, -O0):
<f7>:
push   %rbp
mov    %rsp,%rbp
movb   $0x1,-0x1(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f7() {
%1 = alloca i8
store i8 1, i8* %1
switch i32 1, label %2 [
]
2: ; preds = %0
ret void
}

LLVM IR (-O2):
define void @f7() {
ret void
}
getvec(n) { return (alloc(n)); }


x86 assembly (clang, -O0):
<getvec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <alloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @getvec(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, ...) bitcast (i32 (...)* @alloc to i32 (i32, ...)*)(i32 %3)
ret i32 %4
}

LLVM IR (-O2):
define i32 @getvec(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @alloc to i32 (i32, ...)*)(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ test_prng_sha1prng_java_u32();
int main(void) {
  test_prng_sha1prng_java_u32();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <test_prng_sha1prng_java_u32@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_prng_sha1prng_java_u32@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_prng_sha1prng_java_u32()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_prng_sha1prng_java_u32()
ret i32 0
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello another world in feature-one.\n");
  printf("on Master branch.\n");
  printf("branch-push-merge.\n");
  printf("branch-push-merge part2.\n");
  return EXIT_SUCCESS;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xf06(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0d(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Hello another world in feature-one.\0A\00"
@.str.1 = [19 x i8] c"on Master branch.\0A\00"
@.str.2 = [20 x i8] c"branch-push-merge.\0A\00"
@.str.3 = [26 x i8] c"branch-push-merge part2.\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.3, i64 0, i64 0))
%10 = load i32, i32* @EXIT_SUCCESS
ret i32 %10
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [36 x i8] c"Hello another world in feature-one.\00"
@str.4 = [18 x i8] c"on Master branch.\00"
@str.5 = [19 x i8] c"branch-push-merge.\00"
@str.6 = [25 x i8] c"branch-push-merge part2.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str.5, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.6, i64 0, i64 0))
%7 = load i32, i32* @EXIT_SUCCESS
ret i32 %7
}
/* Variables and functions */
int f();
int g();
int h();
int wfunc() { return f() + g() + h(); }


x86 assembly (clang, -O0):
<wfunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <f@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <g@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <h@plt>
mov    %eax,%ecx
mov    -0x4(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wfunc>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <f@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <g@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1030 <h@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @wfunc() {
%1 = call i32 (...) @f()
%2 = call i32 (...) @g()
%3 = add nsw i32 %1, %2
%4 = call i32 (...) @h()
%5 = add nsw i32 %3, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @wfunc() {
%1 = tail call i32 (...) @f()
%2 = tail call i32 (...) @g()
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @h()
%5 = add nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *, double *);
int main() {
  double X, Y;
  scanf(" %lf %lf", &X, &Y);
  printf("%0.3lf km/l\n", X / Y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1040 <scanf@plt>
movsd  0x10(%rsp),%xmm0
divsd  0x8(%rsp),%xmm0
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c" %lf %lf\00"
@.str.1 = [13 x i8] c"%0.3lf km/l\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double* %2, double* %3)
%5 = load double, double* %2
%6 = load double, double* %3
%7 = fdiv double %5, %6
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c" %lf %lf\00"
@.str.1 = [13 x i8] c"%0.3lf km/l\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = bitcast double* %1 to i8*
%4 = bitcast double* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), double* %1, double* %2)
%6 = load double, double* %1
%7 = load double, double* %2
%8 = fdiv double %6, %7
%9 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), double %8)
ret i32 0
}
void rop3_189_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk1 = S ^ *D;
  stk2 = T ^ *D;
  stk1 = stk1 & stk2;
  stk1 = ~stk1;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_189_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0xc(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
xor    $0xffffffff,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_189_0_0>:
mov    (%rdi),%al
xor    %al,%sil
xor    %al,%dl
and    %sil,%dl
not    %dl
mov    %dl,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_189_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = xor i8 %4, %2
%7 = and i8 %5, %6
%8 = xor i8 %7, -1
store i8 %8, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clearLastError();
int /*<<< orphan*/ sprintf(char *, char *, int);
int writeValueToFile(char *, char *);
int writeIntValueToFile(char *fileName, int value) {
  clearLastError();
  char buff[50];
  sprintf(buff, "%d", value);
  return writeValueToFile(fileName, buff);
}


x86 assembly (clang, -O0):
<writeIntValueToFile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <clearLastError@plt>
lea    -0x40(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xeac(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x40(%rbp),%rsi
call   1050 <writeValueToFile@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeIntValueToFile>:
push   %r15
push   %r14
push   %rbx
sub    $0x40,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <clearLastError@plt>
lea    0xeb4(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    %ebx,%edx
call   1040 <sprintf@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1050 <writeValueToFile@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @writeIntValueToFile(i8* %0, i32 %1) {
%3 = alloca [50 x i8]
%4 = tail call i32 (...) @clearLastError()
%5 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%7 = call i32 @writeValueToFile(i8* %0, i8* %5)
ret i32 %7
}
/* Variables and functions */
int fun(int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int ret = 0;
  long nr_of_reductions = 1;
  ret = fun(1);
  printf("RETURNED %d\n", ret);
  if (ret != 110) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x1,-0x20(%rbp)
mov    $0x1,%edi
call   1030 <fun@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea4(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x6e,-0x14(%rbp)
je     1177 <main+0x57>
movl   $0x1,-0x4(%rbp)
jmp    117e <main+0x5e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x1,%edi
call   1030 <fun@plt>
mov    %eax,%ebx
lea    0xecc(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
cmp    $0x6e,%ebx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @fun(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp ne i32 %3, 110
%6 = zext i1 %5 to i32
ret i32 %6
}
int test_imm_81uint8_mem(unsigned char *val) {
  return ((*val) & (0x81 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_81uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x81,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_81uint8_mem>:
testb  $0x81,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_81uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 129
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_81uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -127
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strtoul(char const *, char **, int);
size_t json_parse_number(const char *line) {
  char *end;
  strtoul(line, &end, 10);
  return end - line;
}


x86 assembly (clang, -O0):
<json_parse_number>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_parse_number>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    0x8(%rsp),%rax
sub    %rbx,%rax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i64 @json_parse_number(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strtoul(i8* %4, i8** %3, i32 10)
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = ptrtoint i8* %6 to i64
%9 = ptrtoint i8* %7 to i64
%10 = sub i64 %8, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @json_parse_number(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i32 @strtoul(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = ptrtoint i8* %5 to i64
%7 = ptrtoint i8* %0 to i64
%8 = sub i64 %6, %7
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void printChildReturn(int wid, int stat, int idC, int idD) {
  if (wid == idC)
    printf("C ended with status %d\n", stat);
  else if (wid == idD)
    printf("D ended with status %d\n", stat);
}


x86 assembly (clang, -O0):
<printChildReturn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1144 <printChildReturn+0x34>
mov    -0x8(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
jmp    1164 <printChildReturn+0x54>
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    115f <printChildReturn+0x4f>
mov    -0x8(%rbp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
jmp    1164 <printChildReturn+0x54>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printChildReturn>:
cmp    %edx,%edi
jne    1120 <printChildReturn+0x10>
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>
cmp    %ecx,%edi
jne    1130 <printChildReturn+0x20>
lea    0xeed(%rip),%rdi
jmp    1030 <printf@plt>
ret

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

LLVM IR (-O2):
@.str = [24 x i8] c"C ended with status %d\0A\00"
@.str.1 = [24 x i8] c"D ended with status %d\0A\00"
define void @printChildReturn(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %2
br i1 %5, label %8, label %6
6: ; preds = %4
%7 = icmp eq i32 %0, %3
br i1 %7, label %8, label %11
8: ; preds = %6, %4
%9 = phi i8* [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), %4 ], [ getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), %6 ]
%10 = tail call i32 @printf(i8* %9, i32 %1)
br label %11
11: ; preds = %8, %6
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int /*<<< orphan*/ __infer_nondet_int();
wint_t getwchar() { return __infer_nondet_int(); }


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

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

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

LLVM IR (-O2):
define i32 @getwchar() {
%1 = tail call i32 (...) @__infer_nondet_int()
ret i32 %1
}
int ischaracter(char c) { return 0x20 <= c && c <= 0x7e; }


x86 assembly (clang, -O0):
<ischaracter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x20,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     112d <ischaracter+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x7e,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ischaracter>:
add    $0xe0,%dil
xor    %eax,%eax
cmp    $0x5f,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @ischaracter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 32, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 126
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @ischaracter(i8 signext %0) {
%2 = add i8 %0, -32
%3 = icmp ult i8 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, int, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void CStrTime(char *timeStr) {
  time_t now;
  struct tm *today;
  now = time(NULL);
  today = localtime(&now);
  strftime(timeStr, 9, "%H:%M:%S", today);
}


x86 assembly (clang, -O0):
<CStrTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
lea    -0xc(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x9,%esi
lea    0xe97(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CStrTime>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeac(%rip),%rdx
mov    %rbx,%rdi
mov    $0x9,%esi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [9 x i8] c"%H:%M:%S\00"
define void @CStrTime(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca %struct.tm*
store i8* %0, i8** %2
%5 = call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
store %struct.tm* %6, %struct.tm** %4
%7 = load i8*, i8** %2
%8 = load %struct.tm*, %struct.tm** %4
%9 = call i32 @strftime(i8* %7, i32 9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %8)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [9 x i8] c"%H:%M:%S\00"
define void @CStrTime(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @time(i32* null)
store i32 %4, i32* %2
%5 = call %struct.tm* @localtime(i32* %2)
%6 = call i32 @strftime(i8* %0, i32 9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), %struct.tm* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int x, y, z;
  x = 7;
  y = 4;
  z = x - y;
  printf("results of %d - %d is %d\n", x, y, z);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x7,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [26 x i8] c"results of %d - %d is %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 7, i32* %1
store i32 4, i32* %2
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = sub nsw i32 %4, %5
store i32 %6, i32* %3
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"results of %d - %d is %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 7, i32 4, i32 3)
ret i32 0
}
/* Variables and functions */
unsigned long rnd();
unsigned long df(unsigned randm, unsigned number) {
  if (randm == 0) {
    return number;
  } else {
    return rnd();
  }
}


x86 assembly (clang, -O0):
<df>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1134 <df+0x24>
mov    -0x10(%rbp),%eax
mov    %rax,-0x8(%rbp)
jmp    113f <df+0x2f>
mov    $0x0,%al
call   1030 <rnd@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<df>:
test   %edi,%edi
je     111b <df+0xb>
xor    %eax,%eax
jmp    1030 <rnd@plt>
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i64 @df(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %2
%7 = tail call i64 (...) @rnd()
br label %8
8: ; preds = %6, %4
%9 = phi i64 [ %5, %4 ], [ %7, %6 ]
ret i64 %9
}
void gtk_container_child_get() {}


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

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

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

LLVM IR (-O2):
define void @gtk_container_child_get() {
ret void
}
int test_imm_11uint8_mem(unsigned char *val) {
  return ((*val) & (0x11 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_11uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x11,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_11uint8_mem>:
testb  $0x11,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_11uint8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 17
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_11uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 17
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ *chars;
};
typedef TYPE_1__ XTextItem16;
typedef int /*<<< orphan*/ XChar2b;

/* Variables and functions */
void set_XTextItem16_chars(void *_p, void *_v) {
  ((XTextItem16 *)_p)->chars = (XChar2b *)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XTextItem16_chars(i8* nocapture writeonly %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
store i8* %1, i8** %3
ret void
}
int wpas_wps_ssid_wildcard_ok(struct wpa_supplicant *wpa_s,
                              struct wpa_ssid *ssid, struct wpa_bss *bss) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
%struct.wpa_bss = type opaque
define i32 @wpas_wps_ssid_wildcard_ok(%struct.wpa_supplicant* nocapture readnone %0, %struct.wpa_ssid* nocapture readnone %1, %struct.wpa_bss* nocapture readnone %2) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("usage: anders\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"usage: anders\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [14 x i8] c"usage: anders\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
scalar_t__ VMM_IS_ERR(void const *);
int VMM_PTR_ERR(void const *);
int VMM_PTR_RET(const void *ptr) {
  if (VMM_IS_ERR(ptr))
    return VMM_PTR_ERR(ptr);
  else
    return 0;
}


x86 assembly (clang, -O0):
<VMM_PTR_RET>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <VMM_IS_ERR@plt>
cmp    $0x0,%rax
je     1150 <VMM_PTR_RET+0x30>
mov    -0x10(%rbp),%rdi
call   1040 <VMM_PTR_ERR@plt>
mov    %eax,-0x4(%rbp)
jmp    1157 <VMM_PTR_RET+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VMM_PTR_RET>:
push   %rbx
mov    %rdi,%rbx
call   1030 <VMM_IS_ERR@plt>
test   %rax,%rax
je     1137 <VMM_PTR_RET+0x17>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <VMM_PTR_ERR@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @VMM_PTR_RET(i8* %0) {
%2 = tail call i64 @VMM_IS_ERR(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @VMM_PTR_ERR(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 0, %1 ]
ret i32 %7
}
void clear_screen() {
  int i;
  char *p = (char *)0x1000;
  for (i = 0; i < 0x300; i++)
    *p++ = 0;
}


x86 assembly (clang, -O0):
<clear_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1000,%eax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x300,-0x4(%rbp)
jge    1141 <clear_screen+0x41>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x0,(%rax)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1114 <clear_screen+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_screen>:
push   %rax
mov    $0x1000,%edi
mov    $0x300,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @clear_screen() {
%1 = alloca i32
%2 = alloca i8*
store i8* inttoptr (i64 4096 to i8*), i8** %2
store i32 0, i32* %1
br label %3
3: ; preds = %9, %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 768
br i1 %5, label %6, label %12
6: ; preds = %3
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i32 1
store i8* %8, i8** %2
store i8 0, i8* %7
br label %9
9: ; preds = %6
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %3
12: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @clear_screen() {
ret void
}
int dxf_read_is_string(int type) {
  if (type >= 0 && type <= 9) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<dxf_read_is_string>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1127 <dxf_read_is_string+0x27>
cmpl   $0x9,-0x8(%rbp)
jg     1127 <dxf_read_is_string+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <dxf_read_is_string+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dxf_read_is_string>:
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @dxf_read_is_string(i32 %0) {
%2 = icmp ult i32 %0, 10
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __isoc99_scanf();
int /*<<< orphan*/ printf(char *, int);
int sumarray(int *, unsigned int);
int main(int argc, char *argv[], char *envp[]) {
  unsigned int local0;
  int local1;
  unsigned int local2;
  int o0;
  __isoc99_scanf();
  local2 = 0;
  while ((int)local2 < (int)local0) {
    __isoc99_scanf();
    local2++;
  }
  o0 = sumarray(&local1, local0);
  printf("Sum = %ld\n", o0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1050 <__isoc99_scanf@plt>
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1179 <main+0x49>
mov    $0x0,%al
call   1050 <__isoc99_scanf@plt>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1158 <main+0x28>
mov    -0x1c(%rbp),%esi
lea    -0x20(%rbp),%rdi
call   1040 <sumarray@plt>
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%esi
lea    0xe6e(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <__isoc99_scanf@plt>
lea    0x4(%rsp),%rdi
call   1040 <sumarray@plt>
lea    0xeb7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"Sum = %ld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 (...) @__isoc99_scanf()
%7 = call i32 @sumarray(i32* %4, i32 undef)
%8 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ sort(int *, int /*<<< orphan*/, int);
void quicksort(int *numeros, int qtdNum) { sort(numeros, 0, qtdNum - 1); }


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <sort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
lea    -0x1(%rsi),%edx
xor    %esi,%esi
jmp    1030 <sort@plt>

LLVM IR (-O0):
define void @quicksort(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 = sub nsw i32 %6, 1
%8 = call i32 @sort(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @quicksort(i32* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @sort(i32* %0, i32 0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
void print_array_double(double *array, char *fmt_str, int size) {
  int i = 0;
  for (i = 0; i < size; i++) {
    printf(fmt_str, array[i]);
  }
}


x86 assembly (clang, -O0):
<print_array_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1161 <print_array_double+0x51>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1131 <print_array_double+0x21>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array_double>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edx,%edx
jle    1147 <print_array_double+0x37>
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%r12d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
movsd  (%r15,%rbx,8),%xmm0
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_array_double+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @print_array_double(double* nocapture %0, i8* %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds double, double* %0, i64 %8
%10 = load double, double* %9
%11 = tail call i32 @printf(i8* %1, double %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t rdf2_segbase(int32_t segment) { return segment; }


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

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

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

LLVM IR (-O2):
define i32 @rdf2_segbase(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void debugger_off() { outb(0xfedc, 0x00); }


x86 assembly (clang, -O0):
<debugger_off>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfedc,%edi
xor    %esi,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<debugger_off>:
mov    $0xfedc,%edi
xor    %esi,%esi
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @debugger_off() {
%1 = call i32 @outb(i32 65244, i32 0)
ret void
}

LLVM IR (-O2):
define void @debugger_off() {
%1 = tail call i32 @outb(i32 65244, i32 0)
ret void
}
float sphere(float d) {
  float pi = 3.14159265338979323846;
  return (pi * (d * d * d)) / 6;
}


x86 assembly (clang, -O0):
<sphere>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xef3(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xeca(%rip),%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sphere>:
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
mulss  %xmm1,%xmm0
mulss  0xeed(%rip),%xmm0
divss  0xee9(%rip),%xmm0
ret

LLVM IR (-O0):
define float @sphere(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
store float 0x400921FB60000000, float* %3
%4 = load float, float* %3
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fmul float %5, %6
%8 = load float, float* %2
%9 = fmul float %7, %8
%10 = fmul float %4, %9
%11 = fdiv float %10, 6.000000e+00
ret float %11
}

LLVM IR (-O2):
define float @sphere(float %0) {
%2 = fmul float %0, %0
%3 = fmul float %2, %0
%4 = fmul float %3, 0x400921FB60000000
%5 = fdiv float %4, 6.000000e+00
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void wahwah_free(void *data) { free(data); }


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

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

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

LLVM IR (-O2):
define void @wahwah_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}