xunge/DecIR huggingface dataset:
/* Variables and functions */
int d07(int);
int d08(int a) { return d07(d07(a)); }


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

x86 assembly (clang, -O2):
<d08>:
push   %rax
call   1030 <d07@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <d07@plt>

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

LLVM IR (-O2):
define i32 @d08(i32 %0) {
%2 = tail call i32 @d07(i32 %0)
%3 = tail call i32 @d07(i32 %2)
ret i32 %3
}
XSetWMHints() {}


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

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

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

LLVM IR (-O2):
define i32 @XSetWMHints() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ porting_dbg(char *, int, int, int, int);
int fchown(int fd, int uid, int gid) {
  int rcode;
  if (uid == 0 && gid == 0)
    rcode = 0;
  else
    rcode = -1;
  porting_dbg("fchown(%d,%d,%d) = %d", fd, uid, gid, rcode);
  return rcode;
}


x86 assembly (clang, -O0):
<fchown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1141 <fchown+0x31>
cmpl   $0x0,-0xc(%rbp)
jne    1141 <fchown+0x31>
movl   $0x0,-0x10(%rbp)
jmp    1148 <fchown+0x38>
movl   $0xffffffff,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xea4(%rip),%rdi
call   1030 <porting_dbg@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fchown>:
push   %rbx
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
xor    %ebx,%ebx
mov    %ecx,%eax
or     %edx,%eax
setne  %bl
neg    %ebx
lea    0xed7(%rip),%rdi
mov    %ebx,%r8d
call   1030 <porting_dbg@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [22 x i8] c"fchown(%d,%d,%d) = %d\00"
define i32 @fchown(i32 %0, i32 %1, i32 %2) {
%4 = or i32 %2, %1
%5 = icmp ne i32 %4, 0
%6 = sext i1 %5 to i32
%7 = tail call i32 @porting_dbg(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %6)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, ...);
int set_nonblocking(int fd) {
  int flags = fcntl(fd, F_GETFL);
  flags |= O_NONBLOCK;
  return fcntl(fd, F_SETFL, flags);
}


x86 assembly (clang, -O0):
<set_nonblocking>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e8e(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    $0x0,%al
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_nonblocking>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
call   1030 <fcntl@plt>
mov    0x2ebe(%rip),%rcx
or     (%rcx),%eax
mov    0x2ea5(%rip),%rcx
mov    (%rcx),%esi
mov    %ebx,%edi
mov    %eax,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFL = global i32 0
define i32 @set_nonblocking(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 (i32, i32, ...) @fcntl(i32 %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* @O_NONBLOCK
%8 = load i32, i32* %3
%9 = or i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = load i32, i32* @F_SETFL
%12 = load i32, i32* %3
%13 = call i32 (i32, i32, ...) @fcntl(i32 %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@O_NONBLOCK = global i32 0
@F_SETFL = global i32 0
define i32 @set_nonblocking(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %2)
%4 = load i32, i32* @O_NONBLOCK
%5 = or i32 %4, %3
%6 = load i32, i32* @F_SETFL
%7 = tail call i32 (i32, i32, ...) @fcntl(i32 %0, i32 %6, i32 %5)
ret i32 %7
}
void abcdefghijklmn9opqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @abcdefghijklmn9opqrstuvwxzy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test__memcpy();
int main() {
  test__memcpy();
  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__memcpy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test__memcpy@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__memcpy()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test__memcpy()
ret i32 0
}
void set_none(const int on) { (void)on; }


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

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

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

LLVM IR (-O2):
define void @set_none(i32 %0) {
ret void
}
int vde_chain_nm8_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @vde_chain_nm8_free(i8* nocapture readnone %0) {
ret i32 0
}
int ft_str_is_uppercase(char *str) {
  int x;
  x = 0;
  while (str[x]) {
    if ((str[x] < 65) || (str[x] > 90))
      return (0);
    x++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_str_is_uppercase>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1165 <ft_str_is_uppercase+0x65>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x41,%eax
jl     114b <ft_str_is_uppercase+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x5a,%eax
jle    1157 <ft_str_is_uppercase+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116c <ft_str_is_uppercase+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <ft_str_is_uppercase+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_uppercase>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <ft_str_is_uppercase+0x23>
add    $0x1,%rdi
nop
add    $0xa5,%cl
cmp    $0xe5,%cl
jbe    1124 <ft_str_is_uppercase+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_str_is_uppercase+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ft_str_is_uppercase(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %29, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %32
12: ; preds = %5
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp slt i32 %18, 65
br i1 %19, label %28, label %20
20: ; preds = %12
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp sgt i32 %26, 90
br i1 %27, label %28, label %29
28: ; preds = %20, %12
store i32 0, i32* %2
br label %33
29: ; preds = %20
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %5
32: ; preds = %5
store i32 1, i32* %2
br label %33
33: ; preds = %32, %28
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @ft_str_is_uppercase(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -91
%12 = icmp ult i8 %11, -26
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void mixedSignedness12(int a) {
  int min = 0;
  clang_analyzer_eval(a <= min);
  clang_analyzer_eval((a + 2) <= min);
  clang_analyzer_eval((a + 2U) <= min);
}


x86 assembly (clang, -O0):
<mixedSignedness12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
cmp    -0x8(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mixedSignedness12>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setle  %dil
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0xffffffff,%ebx
setl   %dil
call   1030 <clang_analyzer_eval@plt>
xor    %edi,%edi
cmp    $0xfffffffe,%ebx
sete   %dil
pop    %rbx
jmp    1030 <clang_analyzer_eval@plt>

LLVM IR (-O0):
define void @mixedSignedness12(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = icmp sle i32 %4, %5
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 2
%11 = load i32, i32* %3
%12 = icmp sle i32 %10, %11
%13 = zext i1 %12 to i32
%14 = call i32 @clang_analyzer_eval(i32 %13)
%15 = load i32, i32* %2
%16 = add i32 %15, 2
%17 = load i32, i32* %3
%18 = icmp ule i32 %16, %17
%19 = zext i1 %18 to i32
%20 = call i32 @clang_analyzer_eval(i32 %19)
ret void
}

LLVM IR (-O2):
define void @mixedSignedness12(i32 %0) {
%2 = icmp slt i32 %0, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
%5 = icmp slt i32 %0, -1
%6 = zext i1 %5 to i32
%7 = tail call i32 @clang_analyzer_eval(i32 %6)
%8 = icmp eq i32 %0, -2
%9 = zext i1 %8 to i32
%10 = tail call i32 @clang_analyzer_eval(i32 %9)
ret void
}
void XGetWMIconName() {}


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

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

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

LLVM IR (-O2):
define void @XGetWMIconName() {
ret void
}
int test(int a, int b, char flags[]) {
  int ret;
  __asm__ __volatile__("mov %3, %%edx\n\t"
                       "mov %k1, %%eax\n\t"
                       "mov %k2, %%ecx\n\t"
                       "sub %%ecx, %%eax\n\t"
                       "seto (%%edx)\n\t"
                       "sets 1(%%edx)\n\t"
                       "setz 2(%%edx)\n\t"
                       "setp 3(%%edx)\n\t"
                       "setc 4(%%edx)\n\t"
                       "mov %%eax, %0\n\t"
                       : "=m"(ret)
                       : "m"(a), "m"(b), "m"(flags)
                       : "eax", "ecx", "edx", "memory");
  return ret;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%edx
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    %ecx,%eax
seto   (%edx)
sets   0x1(%edx)
sete   0x2(%edx)
setp   0x3(%edx)
setb   0x4(%edx)
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
mov    %edi,-0xc(%rsp)
mov    %esi,-0x10(%rsp)
mov    %rdx,-0x8(%rsp)
mov    -0x8(%rsp),%edx
mov    -0xc(%rsp),%eax
mov    -0x10(%rsp),%ecx
sub    %ecx,%eax
seto   (%edx)
sets   0x1(%edx)
sete   0x2(%edx)
setp   0x3(%edx)
setb   0x4(%edx)
mov    %eax,-0x14(%rsp)
mov    -0x14(%rsp),%eax
ret

LLVM IR (-O0):
define i32 @test(i32 %0, i32 %1, i8* %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* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @test(i32 %0, i32 %1, i8* %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 = bitcast i32* %7 to i8*
%9 = load i32, i32* %7
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int mkfifo(char const *, int /*<<< orphan*/);
int octave_mkfifo_wrapper(const char *name, mode_t mode) {
  return mkfifo(name, mode);
}


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

x86 assembly (clang, -O2):
<octave_mkfifo_wrapper>:
jmp    1030 <mkfifo@plt>

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

LLVM IR (-O2):
define i32 @octave_mkfifo_wrapper(i8* %0, i32 %1) {
%3 = tail call i32 @mkfifo(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int determine_output_during_continuation(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(71, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<determine_output_during_continuation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x47,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<determine_output_during_continuation>:
mov    $0x47,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @determine_output_during_continuation() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 71, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @determine_output_during_continuation() {
%1 = tail call i32 @_ada_use_c2phc(i32 71, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int getc(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void lexer_skip_comment_block(void) {
  enum { comment_outside, comment_astrick } state = comment_outside;
  for (;;) {
    int c = getc(stdin);
    if (c == '*')
      state = comment_astrick;
    else if (state == comment_astrick && c == '/')
      return;
    else
      state = comment_outside;
  }
}


x86 assembly (clang, -O0):
<lexer_skip_comment_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
call   1030 <getc@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
jne    1146 <lexer_skip_comment_block+0x36>
movl   $0x1,-0x4(%rbp)
jmp    116c <lexer_skip_comment_block+0x5c>
cmpl   $0x1,-0x4(%rbp)
jne    1160 <lexer_skip_comment_block+0x50>
cmpl   $0x2f,-0x8(%rbp)
jne    1160 <lexer_skip_comment_block+0x50>
add    $0x10,%rsp
pop    %rbp
ret
movl   $0x0,-0x4(%rbp)
jmp    116c <lexer_skip_comment_block+0x5c>
jmp    111f <lexer_skip_comment_block+0xf>

x86 assembly (clang, -O2):
<lexer_skip_comment_block>:
push   %r14
push   %rbx
push   %rax
xor    %ecx,%ecx
mov    0x2ecb(%rip),%r14
nopl   (%rax)
mov    %ecx,%ebx
mov    (%r14),%edi
call   1030 <getc@plt>
cmp    $0x2a,%eax
sete   %cl
je     1120 <lexer_skip_comment_block+0x10>
cmp    $0x2f,%eax
sete   %al
and    %al,%bl
cmp    $0x1,%bl
jne    1120 <lexer_skip_comment_block+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
define void @lexer_skip_comment_block() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %18, %0
%4 = load i32, i32* @stdin
%5 = call i32 @getc(i32 %4)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 42
br i1 %7, label %8, label %9
8: ; preds = %3
store i32 1, i32* %1
br label %18
9: ; preds = %3
%10 = load i32, i32* %1
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %16
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 47
br i1 %14, label %15, label %16
15: ; preds = %12
ret void
16: ; preds = %12, %9
store i32 0, i32* %1
br label %17
17: ; preds = %16
br label %18
18: ; preds = %17, %8
br label %3
}

LLVM IR (-O2):
@stdin = global i32 0
define void @lexer_skip_comment_block() {
br label %1
1: ; preds = %6, %0
%2 = phi i1 [ false, %0 ], [ %5, %6 ]
%3 = load i32, i32* @stdin
%4 = tail call i32 @getc(i32 %3)
%5 = icmp eq i32 %4, 42
br i1 %5, label %6, label %7
6: ; preds = %1, %7
br label %1
7: ; preds = %1
%8 = icmp eq i32 %4, 47
%9 = select i1 %2, i1 %8, i1 false
br i1 %9, label %10, label %6
10: ; preds = %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errmsg(char *);
char *getarg();
int /*<<< orphan*/ inputf(char *, int /*<<< orphan*/);
readfile(void) {
  register char *name;
  if (name = getarg())
    inputf(name, 0);
  else
    errmsg("no file to read");
}


x86 assembly (clang, -O0):
<readfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getarg@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     115d <readfile+0x2d>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <inputf@plt>
jmp    1169 <readfile+0x39>
lea    0xe9c(%rip),%rdi
call   1050 <errmsg@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readfile>:
push   %rax
xor    %eax,%eax
call   1040 <getarg@plt>
test   %rax,%rax
je     1149 <readfile+0x19>
mov    %rax,%rdi
xor    %esi,%esi
call   1030 <inputf@plt>
pop    %rcx
ret
lea    0xeb0(%rip),%rdi
call   1050 <errmsg@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [16 x i8] c"no file to read\00"
define i32 @readfile() {
%1 = alloca i32
%2 = alloca i8*
%3 = call i8* (...) @getarg()
store i8* %3, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = load i8*, i8** %2
%7 = call i32 @inputf(i8* %6, i32 0)
br label %10
8: ; preds = %0
%9 = call i32 @errmsg(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %5
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@.str = [16 x i8] c"no file to read\00"
define i32 @readfile() {
%1 = tail call i8* (...) @getarg()
%2 = icmp eq i8* %1, null
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 @inputf(i8* %1, i32 0)
br label %7
5: ; preds = %0
%6 = tail call i32 @errmsg(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %3
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("Hello, I'm in dir2\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [19 x i8] c"Hello, I'm in dir2\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct gpf {
  int dummy;
};

/* Variables and functions */
scalar_t__ calloc(int, size_t);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ gp_read(struct gpf *, char *, size_t);
void gp_read_unknown(struct gpf *gpf, size_t num) {
  char *tmp = (char *)calloc(sizeof(char), num);
  gp_read(gpf, tmp, num);
  free(tmp);
}


x86 assembly (clang, -O0):
<gp_read_unknown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <gp_read@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gp_read_unknown>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    $0x1,%edi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
mov    %rax,%rsi
mov    %r15,%rdx
call   1040 <gp_read@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.gpf = type { i32 }
define void @gp_read_unknown(%struct.gpf* %0, i64 %1) {
%3 = alloca %struct.gpf*
%4 = alloca i64
%5 = alloca i8*
store %struct.gpf* %0, %struct.gpf** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call i64 @calloc(i32 1, i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %5
%9 = load %struct.gpf*, %struct.gpf** %3
%10 = load i8*, i8** %5
%11 = load i64, i64* %4
%12 = call i32 @gp_read(%struct.gpf* %9, i8* %10, i64 %11)
%13 = load i8*, i8** %5
%14 = call i32 @free(i8* %13)
ret void
}

LLVM IR (-O2):
%struct.gpf = type { i32 }
define void @gp_read_unknown(%struct.gpf* %0, i64 %1) {
%3 = tail call i64 @calloc(i32 1, i64 %1)
%4 = inttoptr i64 %3 to i8*
%5 = tail call i32 @gp_read(%struct.gpf* %0, i8* %4, i64 %1)
%6 = tail call i32 @free(i8* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a;
  for (a = 0; a < 100000; printf("%i\n", a), a++)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x186a0,-0x8(%rbp)
jge    1155 <main+0x45>
jmp    1138 <main+0x28>
mov    -0x8(%rbp),%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x186a0,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%i\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 100000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
void mySwap(void *list, int i, int j) {
  char *x = (char *)list;
  char t;
  t = x[i];
  x[i] = x[j];
  x[j] = t;
}


x86 assembly (clang, -O0):
<mySwap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x19(%rbp),%dl
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mySwap>:
movslq %esi,%rax
mov    (%rdi,%rax,1),%sil
movslq %edx,%rdx
mov    (%rdi,%rdx,1),%cl
mov    %cl,(%rdi,%rax,1)
mov    %sil,(%rdi,%rdx,1)
ret

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

LLVM IR (-O2):
define void @mySwap(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
store i8 %9, i8* %5
store i8 %6, i8* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ gzFile;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exitErrorf(int /*<<< orphan*/, int /*<<< orphan*/, char *);
int gzread(int /*<<< orphan*/, unsigned char *, int);
int int32(unsigned char *);
int readBAMint32(gzFile file) {
  unsigned char buffer[4];
  if (gzread(file, buffer, 4) != 4)
    exitErrorf(EXIT_FAILURE, 0, "BAM file header truncated");
  return int32(buffer);
}


x86 assembly (clang, -O0):
<readBAMint32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <gzread@plt>
cmp    $0x4,%eax
je     116c <readBAMint32+0x3c>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
lea    0xe99(%rip),%rdx
call   1040 <exitErrorf@plt>
lea    -0x8(%rbp),%rdi
call   1050 <int32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readBAMint32>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <gzread@plt>
cmp    $0x4,%eax
je     115c <readBAMint32+0x2c>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rdx
xor    %esi,%esi
call   1040 <exitErrorf@plt>
lea    0x4(%rsp),%rdi
call   1050 <int32@plt>
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [26 x i8] c"BAM file header truncated\00"
define i32 @readBAMint32(i32 %0) {
%2 = alloca i32
%3 = alloca [4 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%6 = call i32 @gzread(i32 %4, i8* %5, i32 4)
%7 = icmp ne i32 %6, 4
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exitErrorf(i32 %9, i32 0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %11
11: ; preds = %8, %1
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
%13 = call i32 @int32(i8* %12)
ret i32 %13
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [26 x i8] c"BAM file header truncated\00"
define i32 @readBAMint32(i32 %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @gzread(i32 %0, i8* %3, i32 4)
%5 = icmp eq i32 %4, 4
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exitErrorf(i32 %7, i32 0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %6, %1
%10 = call i32 @int32(i8* %3)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ pA_mes(char const *);
int /*<<< orphan*/ pA_reg_noname(char const *);
void pA_reg(const char *register_name) {
  pA_mes(register_name);
  pA_reg_noname(register_name);
}


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

x86 assembly (clang, -O2):
<pA_reg>:
push   %rbx
mov    %rdi,%rbx
call   1040 <pA_mes@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <pA_reg_noname@plt>

LLVM IR (-O0):
define void @pA_reg(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @pA_mes(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @pA_reg_noname(i8* %5)
ret void
}

LLVM IR (-O2):
define void @pA_reg(i8* %0) {
%2 = tail call i32 @pA_mes(i8* %0)
%3 = tail call i32 @pA_reg_noname(i8* %0)
ret void
}
int HelpItem73(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem73() {
ret i32 0
}
int log_level_compare(int cur_level, int cmp_level) {
  return cur_level <= cmp_level ? 1 : 0;
}


x86 assembly (clang, -O0):
<log_level_compare>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
xor    %eax,%eax
mov    $0x1,%ecx
cmp    %esi,%edx
cmovle %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_level_compare>:
xor    %eax,%eax
cmp    %esi,%edi
setle  %al
ret

LLVM IR (-O0):
define i32 @log_level_compare(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 = icmp sle i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 1, i32 0
ret i32 %9
}

LLVM IR (-O2):
define i32 @log_level_compare(i32 %0, i32 %1) {
%3 = icmp sle i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double fabs(double);
int eq(double a, double b) { return fabs(a - b) < 1.0e-8; }


x86 assembly (clang, -O0):
<eq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movaps 0xef1(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xed5(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eq>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
movsd  0xefc(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @eq(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
%8 = call double @llvm.fabs.f64(double %7)
%9 = fcmp olt double %8, 1.000000e-08
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @eq(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = fcmp olt double %4, 1.000000e-08
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int ft_is_prime(int);
int ft_add_prime(int nb) {
  int sum;
  int i;
  i = 3;
  sum = 2;
  if (ft_is_prime(i) == 1 && i <= nb) {
    sum = sum + i;
    i = i + 2;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_add_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x3,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <ft_is_prime@plt>
cmp    $0x1,%eax
jne    1158 <ft_add_prime+0x48>
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1158 <ft_add_prime+0x48>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_add_prime>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x3,%ebp
mov    $0x3,%edi
call   1030 <ft_is_prime@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
cmp    $0x3,%ebx
lea    0x3(%rcx,%rcx,1),%eax
cmovl  %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @ft_add_prime(i32 %0) {
%2 = tail call i32 @ft_is_prime(i32 3)
%3 = icmp eq i32 %2, 1
%4 = icmp sgt i32 %0, 2
%5 = and i1 %4, %3
%6 = select i1 %5, i32 5, i32 3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ rule_statistics(char *);
void command_statistics(int id, char *input) {
  (void)id;
  rule_statistics(input);
}


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

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

LLVM IR (-O0):
define void @command_statistics(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 = call i32 @rule_statistics(i8* %6)
ret void
}

LLVM IR (-O2):
define void @command_statistics(i32 %0, i8* %1) {
%3 = tail call i32 @rule_statistics(i8* %1)
ret void
}
void glScalex(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glScalex() {
ret void
}
/* Variables and functions */
int atoi(char const *);
int strlen(char const *);
int getCheckDigit(const char *cpf) {
  cpf += strlen(cpf) - 2;
  return atoi(cpf);
}


x86 assembly (clang, -O0):
<getCheckDigit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
sub    $0x2,%ecx
mov    -0x8(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCheckDigit>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
lea    (%rax,%rbx,1),%rdi
add    $0xfffffffffffffffe,%rdi
pop    %rbx
jmp    1040 <atoi@plt>

LLVM IR (-O0):
define i32 @getCheckDigit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = sub nsw i32 %4, 2
%6 = load i8*, i8** %2
%7 = sext i32 %5 to i64
%8 = getelementptr inbounds i8, i8* %6, i64 %7
store i8* %8, i8** %2
%9 = load i8*, i8** %2
%10 = call i32 @atoi(i8* %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @getCheckDigit(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -2
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i32 @atoi(i8* %5)
ret i32 %6
}
/* Variables and functions */
int opt_none();
int opt_i(void) { return opt_none(); }


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

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

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

LLVM IR (-O2):
define i32 @opt_i() {
%1 = tail call i32 (...) @opt_none()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void smallAdjustmentLE(unsigned a) {
  if (a + 1 <= 2)
    clang_analyzer_eval(a == 0 || a == 1 || a == (~0U));
}


x86 assembly (clang, -O0):
<smallAdjustmentLE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x2,%eax
ja     115f <smallAdjustmentLE+0x4f>
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1152 <smallAdjustmentLE+0x42>
mov    $0x1,%al
cmpl   $0x1,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1152 <smallAdjustmentLE+0x42>
cmpl   $0xffffffff,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smallAdjustmentLE>:
add    $0x1,%edi
cmp    $0x2,%edi
ja     1122 <smallAdjustmentLE+0x12>
mov    $0x1,%edi
jmp    1030 <clang_analyzer_eval@plt>
ret

LLVM IR (-O0):
define void @smallAdjustmentLE(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, 1
%5 = icmp ule i32 %4, 2
br i1 %5, label %6, label %19
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %6
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 1
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, -1
br label %15
15: ; preds = %12, %9, %6
%16 = phi i1 [ true, %9 ], [ true, %6 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
%18 = call i32 @clang_analyzer_eval(i32 %17)
br label %19
19: ; preds = %15, %1
ret void
}

LLVM IR (-O2):
define void @smallAdjustmentLE(i32 %0) {
%2 = add i32 %0, 1
%3 = icmp ult i32 %2, 3
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @clang_analyzer_eval(i32 1)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void scamper_rtsock_close(int fd) {
  close(fd);
  return;
}


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

x86 assembly (clang, -O2):
<scamper_rtsock_close>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @scamper_rtsock_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void calls_abort(const char *msg) {
  fprintf(stderr, "%s", msg);
  abort();
}


x86 assembly (clang, -O0):
<calls_abort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<calls_abort>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @calls_abort(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
define void @calls_abort(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
double inchesToKilometres(double inches) { return inches / 0.039370; }


x86 assembly (clang, -O0):
<inchesToKilometres>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
divsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inchesToKilometres>:
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @inchesToKilometres(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 3.937000e-02
ret double %4
}

LLVM IR (-O2):
define double @inchesToKilometres(double %0) {
%2 = fdiv double %0, 3.937000e-02
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ Ramp(int /*<<< orphan*/);
void IF_ramp(void) { Ramp(0); }


x86 assembly (clang, -O0):
<IF_ramp>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <Ramp@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @IF_ramp() {
%1 = call i32 @Ramp(i32 0)
ret void
}

LLVM IR (-O2):
define void @IF_ramp() {
%1 = tail call i32 @Ramp(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ fenv_t;

/* Variables and functions */
int /*<<< orphan*/ FE_INEXACT;
int /*<<< orphan*/ FE_INVALID;
int /*<<< orphan*/ feclearexcept(int /*<<< orphan*/);
int /*<<< orphan*/ feholdexcept(int /*<<< orphan*/ *);
scalar_t__ fetestexcept(int /*<<< orphan*/);
int /*<<< orphan*/ feupdateenv(int /*<<< orphan*/ *);
scalar_t__ rintl(long double);
long lrintl(long double x) {
  fenv_t env;
  long d;
  feholdexcept(&env);
  d = (long)rintl(x);
  if (fetestexcept(FE_INVALID))
    feclearexcept(FE_INEXACT);
  feupdateenv(&env);
  return (d);
}


x86 assembly (clang, -O0):
<lrintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
lea    -0x14(%rbp),%rdi
call   1060 <feholdexcept@plt>
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <rintl@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1030 <fetestexcept@plt>
cmp    $0x0,%rax
je     119e <lrintl+0x4e>
mov    0x2e49(%rip),%rax
mov    (%rax),%edi
call   1070 <feclearexcept@plt>
lea    -0x14(%rbp),%rdi
call   1050 <feupdateenv@plt>
mov    -0x20(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrintl>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fstpt  0x14(%rsp)
lea    0x10(%rsp),%rdi
call   1060 <feholdexcept@plt>
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <rintl@plt>
mov    %rax,%rbx
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1030 <fetestexcept@plt>
test   %rax,%rax
je     1197 <lrintl+0x47>
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
call   1070 <feclearexcept@plt>
lea    0x10(%rsp),%rdi
call   1050 <feupdateenv@plt>
mov    %rbx,%rax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@FE_INVALID = global i32 0
@FE_INEXACT = global i32 0
define i64 @lrintl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca i32
%4 = alloca i64
store x86_fp80 %0, x86_fp80* %2
%5 = call i32 @feholdexcept(i32* %3)
%6 = load x86_fp80, x86_fp80* %2
%7 = call i64 @rintl(x86_fp80 %6)
store i64 %7, i64* %4
%8 = load i32, i32* @FE_INVALID
%9 = call i64 @fetestexcept(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %1
%12 = load i32, i32* @FE_INEXACT
%13 = call i32 @feclearexcept(i32 %12)
br label %14
14: ; preds = %11, %1
%15 = call i32 @feupdateenv(i32* %3)
%16 = load i64, i64* %4
ret i64 %16
}

LLVM IR (-O2):
@FE_INVALID = global i32 0
@FE_INEXACT = global i32 0
define i64 @lrintl(x86_fp80 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @feholdexcept(i32* %2)
%5 = call i64 @rintl(x86_fp80 %0)
%6 = load i32, i32* @FE_INVALID
%7 = call i64 @fetestexcept(i32 %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %1
%10 = load i32, i32* @FE_INEXACT
%11 = call i32 @feclearexcept(i32 %10)
br label %12
12: ; preds = %9, %1
%13 = call i32 @feupdateenv(i32* %2)
ret i64 %5
}
double metric_lapse(const double x[3]) { return 1.0; }


x86 assembly (clang, -O0):
<metric_lapse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  0xef0(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<metric_lapse>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @metric_lapse(double* %0) {
%2 = alloca double*
store double* %0, double** %2
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @metric_lapse(double* nocapture readnone %0) {
ret double 1.000000e+00
}
int test_imm_5Cint8_reg(signed char val) {
  return ((val) & (-0x5C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_5Cint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffa4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_5Cint8_reg>:
test   $0xa4,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_5Cint8_reg(i8 signext %0) {
%2 = and i8 %0, -92
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void *__VERIFIER_nondet_pointer() {
  void *val;
  return val;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @__VERIFIER_nondet_pointer() {
ret i8* undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ __put_unaligned_le32(int /*<<< orphan*/, void *);
void put_unaligned_le32(uint32_t val, void *p) { __put_unaligned_le32(val, p); }


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

x86 assembly (clang, -O2):
<put_unaligned_le32>:
jmp    1030 <__put_unaligned_le32@plt>

LLVM IR (-O0):
define void @put_unaligned_le32(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 = call i32 @__put_unaligned_le32(i32 %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @put_unaligned_le32(i32 %0, i8* %1) {
%3 = tail call i32 @__put_unaligned_le32(i32 %0, i8* %1)
ret void
}