xunge/DecIR huggingface dataset:
void clean(int argc, char **argv) {
  int i;
  for (i = 0; i < argc; i++)
    free(argv[i]);
  free(argv);
}


x86 assembly (clang, -O0):
<clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1151 <clean+0x41>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <clean+0x16>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @clean(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
tail call void @free(i8* %9)
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
%13 = bitcast i8** %1 to i8*
tail call void @free(i8* %13)
ret void
}
/* Variables and functions */
int listen(int, int);
int /*<<< orphan*/ perr_exit(char *);
int Listen(int fd, int backlog) {
  int n;
  if ((n = listen(fd, backlog)) < 0)
    perr_exit("listen error");
  return n;
}


x86 assembly (clang, -O0):
<Listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <listen@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1151 <Listen+0x31>
lea    0xeb4(%rip),%rdi
call   1040 <perr_exit@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Listen>:
push   %rbx
call   1030 <listen@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1138 <Listen+0x18>
lea    0xecd(%rip),%rdi
call   1040 <perr_exit@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [13 x i8] c"listen error\00"
define i32 @Listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @perr_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                          int);
uint32_t __int8_t_clone_array(const int8_t *p, int8_t *q, uint32_t elements) {
  uint32_t n = elements * sizeof(int8_t);
  memcpy(q, p, n);
  return n;
}


x86 assembly (clang, -O0):
<__int8_t_clone_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movslq -0x14(%rbp),%rax
shl    $0x2,%rax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__int8_t_clone_array>:
push   %rbx
mov    %rdi,%rax
lea    0x0(,%rdx,4),%ebx
mov    %rsi,%rdi
mov    %rax,%rsi
mov    %ebx,%edx
call   1030 <memcpy@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @__int8_t_clone_array(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* %6
%9 = sext i32 %8 to i64
%10 = mul i64 %9, 4
%11 = trunc i64 %10 to i32
store i32 %11, i32* %7
%12 = load i32*, i32** %5
%13 = load i32*, i32** %4
%14 = load i32, i32* %7
%15 = call i32 @memcpy(i32* %12, i32* %13, i32 %14)
%16 = load i32, i32* %7
ret i32 %16
}

LLVM IR (-O2):
define i32 @__int8_t_clone_array(i32* %0, i32* %1, i32 %2) {
%4 = shl i32 %2, 2
%5 = tail call i32 @memcpy(i32* %1, i32* %0, i32 %4)
ret i32 %4
}
/* Variables and functions */
int maxRec(int *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int a[10] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 20};
  printf("%d\n", maxRec(a, 0, 9));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1050 <maxRec@plt>
mov    %eax,%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xebd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x9,%edx
call   1040 <maxRec@plt>
lea    0xecb(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 20]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [10 x i32]
store i32 0, i32* %1
%3 = bitcast [10 x i32]* %2 to i8*
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %2, i64 0, i64 0
%5 = call i32 @maxRec(i32* %4, i32 0, i32 9)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.a = [10 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 20]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @maxRec(i32* %3, i32 0, i32 9)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
__attribute__((weak)) int _open(const char *pathname, int flags, mode_t mode) {
  do {
    (void)(pathname);
  } while (0);
  do {
    (void)(flags);
  } while (0);
  do {
    (void)(mode);
  } while (0);
  return -1;
}


x86 assembly (clang, -O0):
<_open>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
jmp    1113 <_open+0x13>
jmp    1118 <_open+0x18>
mov    $0xffffffff,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define weak i32 @_open(i8* %0, i32 %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int);
void t_iscntrl_0x7f() {
  Assert_real((iscntrl(127)),
              "/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_iscntrl.c",
              640, ("iscntrl should be 1 for 0x7f"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x7f>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7f,%edi
call   1030 <iscntrl@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x280,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x7f>:
push   %rax
mov    $0x7f,%edi
call   1030 <iscntrl@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x280,%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_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x7f\00"
define void @t_iscntrl_0x7f() {
%1 = call i32 @iscntrl(i32 127)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x7f\00"
define void @t_iscntrl_0x7f() {
%1 = tail call i32 @iscntrl(i32 127)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 640, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int xdtoi(const int d) {
  if ((d >= '0') && (d <= '9')) {
    return (d - '0');
  } else if ((d >= 'a') && (d <= 'f')) {
    return (d - 'a' + 10);
  } else if ((d >= 'A') && (d <= 'F')) {
    return (d - 'A' + 10);
  } else {
    return (-1);
  }
}


x86 assembly (clang, -O0):
<xdtoi>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x30,-0x8(%rbp)
jl     1129 <xdtoi+0x29>
cmpl   $0x39,-0x8(%rbp)
jg     1129 <xdtoi+0x29>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <xdtoi+0x7a>
cmpl   $0x61,-0x8(%rbp)
jl     114e <xdtoi+0x4e>
cmpl   $0x66,-0x8(%rbp)
jg     114e <xdtoi+0x4e>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <xdtoi+0x7a>
cmpl   $0x41,-0x8(%rbp)
jl     1173 <xdtoi+0x73>
cmpl   $0x46,-0x8(%rbp)
jg     1173 <xdtoi+0x73>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    117a <xdtoi+0x7a>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdtoi>:
lea    -0x30(%rdi),%eax
cmp    $0xa,%eax
jb     1127 <xdtoi+0x27>
lea    -0x61(%rdi),%eax
cmp    $0x5,%eax
ja     1116 <xdtoi+0x16>
add    $0xffffffa9,%edi
mov    %edi,%eax
ret
lea    -0x41(%rdi),%eax
add    $0xffffffc9,%edi
cmp    $0x6,%eax
mov    $0xffffffff,%eax
cmovb  %edi,%eax
ret

LLVM IR (-O0):
define i32 @xdtoi(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 57
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %33
12: ; preds = %6, %1
%13 = load i32, i32* %3
%14 = icmp sge i32 %13, 97
br i1 %14, label %15, label %22
15: ; preds = %12
%16 = load i32, i32* %3
%17 = icmp sle i32 %16, 102
br i1 %17, label %18, label %22
18: ; preds = %15
%19 = load i32, i32* %3
%20 = sub nsw i32 %19, 97
%21 = add nsw i32 %20, 10
store i32 %21, i32* %2
br label %33
22: ; preds = %15, %12
%23 = load i32, i32* %3
%24 = icmp sge i32 %23, 65
br i1 %24, label %25, label %32
25: ; preds = %22
%26 = load i32, i32* %3
%27 = icmp sle i32 %26, 70
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load i32, i32* %3
%30 = sub nsw i32 %29, 65
%31 = add nsw i32 %30, 10
store i32 %31, i32* %2
br label %33
32: ; preds = %25, %22
store i32 -1, i32* %2
br label %33
33: ; preds = %32, %28, %18, %9
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @xdtoi(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
br i1 %3, label %14, label %4
4: ; preds = %1
%5 = add i32 %0, -97
%6 = icmp ult i32 %5, 6
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = add nsw i32 %0, -87
br label %14
9: ; preds = %4
%10 = add i32 %0, -65
%11 = icmp ult i32 %10, 6
%12 = add nsw i32 %0, -55
%13 = select i1 %11, i32 %12, i32 -1
br label %14
14: ; preds = %1, %9, %7
%15 = phi i32 [ %8, %7 ], [ %13, %9 ], [ %2, %1 ]
ret i32 %15
}
unsigned xrop3_255_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  stk1 = 0xffff;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


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

x86 assembly (clang, -O2):
<xrop3_255_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    $0xffff,%ecx
or     %esi,%eax
or     %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_255_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, 65535
%8 = or i32 %4, %5
%9 = or i32 %8, %7
ret i32 %9
}
/* Variables and functions */
long double acos(double);
long double acosl(long double x) { return acos((double)x); }


x86 assembly (clang, -O0):
<acosl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <acos@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <acos@plt>

LLVM IR (-O0):
define x86_fp80 @acosl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @acos(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @acosl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @acos(double %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ RDP(char *);
void uc2_special3() { RDP("uc2:special3\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"uc2:special3\0A\00"
define void @uc2_special3() {
%1 = call i32 @RDP(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"uc2:special3\0A\00"
define void @uc2_special3() {
%1 = tail call i32 @RDP(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
bool ispow2(unsigned int n) { return n && !(n & (n - 1)); }


x86 assembly (clang, -O0):
<ispow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     112c <ispow2+0x2c>
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispow2>:
test   %edi,%edi
je     110f <ispow2+0xf>
lea    -0x1(%rdi),%ecx
xor    %eax,%eax
test   %ecx,%edi
sete   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @ispow2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = sub i32 %7, 1
%9 = and i32 %6, %8
%10 = icmp ne i32 %9, 0
%11 = xor i1 %10, true
br label %12
12: ; preds = %5, %1
%13 = phi i1 [ false, %1 ], [ %11, %5 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @ispow2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32 @llvm.ctpop.i32(i32 %0)
%5 = icmp ult i32 %4, 2
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fizzbuzz(int);
int main(void) {
  fizzbuzz(15);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xf,%edi
call   1030 <fizzbuzz@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fizzbuzz(i32 15)
ret i32 0
}
int equalsfl(double a, double b) { return a == b; }


x86 assembly (clang, -O0):
<equalsfl>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<equalsfl>:
cmpeqsd %xmm1,%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @equalsfl(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 = fcmp oeq double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @equalsfl(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int relay_upgrade_read_cb(void *data, struct t_upgrade_file *upgrade_file,
                          int object_id, struct t_infolist *infolist) {
  (void)data;
  (void)upgrade_file;
  (void)object_id;
  (void)infolist;
  return 0;
}


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

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

LLVM IR (-O0):
%struct.t_upgrade_file = type opaque
%struct.t_infolist = type opaque
define i32 @relay_upgrade_read_cb(i8* %0, %struct.t_upgrade_file* %1, i32 %2, %struct.t_infolist* %3) {
%5 = alloca i8*
%6 = alloca %struct.t_upgrade_file*
%7 = alloca i32
%8 = alloca %struct.t_infolist*
store i8* %0, i8** %5
store %struct.t_upgrade_file* %1, %struct.t_upgrade_file** %6
store i32 %2, i32* %7
store %struct.t_infolist* %3, %struct.t_infolist** %8
%9 = load i8*, i8** %5
%10 = load %struct.t_upgrade_file*, %struct.t_upgrade_file** %6
%11 = load i32, i32* %7
%12 = load %struct.t_infolist*, %struct.t_infolist** %8
ret i32 0
}

LLVM IR (-O2):
%struct.t_upgrade_file = type opaque
%struct.t_infolist = type opaque
define i32 @relay_upgrade_read_cb(i8* nocapture readnone %0, %struct.t_upgrade_file* nocapture readnone %1, i32 %2, %struct.t_infolist* nocapture readnone %3) {
ret i32 0
}
void mhl_unpowered_power_off(void) {}


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

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

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

LLVM IR (-O2):
define void @mhl_unpowered_power_off() {
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ sprintf(char *, char *, char *, int);
void initialize_session_tmp_filename(char *session_tmp_filename) {
  struct {
    long safety_padding_a;
    pid_t pid;
    long safety_padding_b;
  } pid_holder;
  pid_holder.pid = getpid();
  int suffix = (int)(((long)pid_holder.pid) % 9999999);
  sprintf(session_tmp_filename, "%s%d", ".tmp_endlines_", suffix);
}


x86 assembly (clang, -O0):
<initialize_session_tmp_filename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0x98967f,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x24(%rbp),%ecx
lea    0xea8(%rip),%rsi
lea    0xea6(%rip),%rdx
call   1040 <sprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_session_tmp_filename>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%rcx
movabs $0x6b5fcb1f179a84a3,%rdx
cb 5f 6b
imul   %rdx
mov    %rdx,%rax
shr    $0x3f,%rax
shr    $0x16,%rdx
add    %eax,%edx
imul   $0x98967f,%edx,%eax
sub    %eax,%ecx
lea    0xea9(%rip),%rsi
lea    0xea7(%rip),%rdx
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <sprintf@plt>

LLVM IR (-O0):
%struct.anon = type { i64, i64, i64 }
@.str = [5 x i8] c"%s%d\00"
@.str.1 = [15 x i8] c".tmp_endlines_\00"
define void @initialize_session_tmp_filename(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.anon
%4 = alloca i32
store i8* %0, i8** %2
%5 = call i64 (...) @getpid()
%6 = getelementptr inbounds %struct.anon, %struct.anon* %3, i32 0, i32 1
store i64 %5, i64* %6
%7 = getelementptr inbounds %struct.anon, %struct.anon* %3, i32 0, i32 1
%8 = load i64, i64* %7
%9 = srem i64 %8, 9999999
%10 = trunc i64 %9 to i32
store i32 %10, i32* %4
%11 = load i8*, i8** %2
%12 = load i32, i32* %4
%13 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s%d\00"
@.str.1 = [15 x i8] c".tmp_endlines_\00"
define void @initialize_session_tmp_filename(i8* nocapture writeonly %0) {
%2 = tail call i64 (...) @getpid()
%3 = srem i64 %2, 9999999
%4 = trunc i64 %3 to i32
%5 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int /*<<< orphan*/ SSL_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ SSL_shutdown(int /*<<< orphan*/ *);
void zopenssl_SSL_free(SSL *ssl) {
  SSL_shutdown(ssl);
  SSL_free(ssl);
}


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

x86 assembly (clang, -O2):
<zopenssl_SSL_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <SSL_shutdown@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <SSL_free@plt>

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

LLVM IR (-O2):
define void @zopenssl_SSL_free(i32* %0) {
%2 = tail call i32 @SSL_shutdown(i32* %0)
%3 = tail call i32 @SSL_free(i32* %0)
ret void
}
unsigned char rev_byte_2(unsigned char x) {
  x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa);
  x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc);
  x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0);
  return x;
}


x86 assembly (clang, -O0):
<rev_byte_2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x1,%eax
and    $0x55,%eax
movzbl -0x1(%rbp),%ecx
shl    $0x1,%ecx
and    $0xaa,%ecx
or     %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x2,%eax
and    $0x33,%eax
movzbl -0x1(%rbp),%ecx
shl    $0x2,%ecx
and    $0xcc,%ecx
or     %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
and    $0xf,%eax
movzbl -0x1(%rbp),%ecx
shl    $0x4,%ecx
and    $0xf0,%ecx
or     %ecx,%eax
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_byte_2>:
rol    $0x4,%dil
mov    %edi,%eax
and    $0x33,%al
shl    $0x2,%al
shr    $0x2,%dil
and    $0x33,%dil
or     %dil,%al
mov    %eax,%ecx
and    $0x55,%cl
add    %cl,%cl
shr    %al
and    $0x55,%al
or     %cl,%al
ret

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

LLVM IR (-O2):
define zeroext i8 @rev_byte_2(i8 zeroext %0) {
%2 = tail call i8 @llvm.bitreverse.i8(i8 %0)
ret i8 %2
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t andi0(uint32_t x) { return x & 0; }


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

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

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

LLVM IR (-O2):
define i32 @andi0(i32 %0) {
ret i32 0
}
int ad(void) { return 4; }


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

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

LLVM IR (-O0):
define i32 @ad() {
ret i32 4
}

LLVM IR (-O2):
define i32 @ad() {
ret i32 4
}
int isblank(int c) { return (c == ' ') | (c == '\t'); }


x86 assembly (clang, -O0):
<isblank>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
cmpl   $0x9,-0x4(%rbp)
sete   %cl
and    $0x1,%cl
movzbl %cl,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isblank>:
cmp    $0x20,%edi
sete   %al
cmp    $0x9,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @isblank(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
%5 = zext i1 %4 to i32
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 9
%8 = zext i1 %7 to i32
%9 = or i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @isblank(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = icmp eq i32 %0, 9
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
int range_player_mode(unsigned player_mode) {
  if (player_mode != 0x0 && player_mode != 0x8000) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<range_player_mode>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <range_player_mode+0x2a>
cmpl   $0x8000,-0x8(%rbp)
je     112a <range_player_mode+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <range_player_mode+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<range_player_mode>:
xor    %eax,%eax
test   $0xffff7fff,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @range_player_mode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp ne i32 %7, 32768
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 @range_player_mode(i32 %0) {
%2 = and i32 %0, -32769
%3 = icmp ne i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
const int find_line_size(const char *buffer, const size_t length) {
  int size = 0;
  while (size < length && buffer[size] != '\n') {
    size++;
  }
  return size;
}


x86 assembly (clang, -O0):
<find_line_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movslq -0x14(%rbp),%rcx
xor    %eax,%eax
cmp    -0x10(%rbp),%rcx
mov    %al,-0x15(%rbp)
jae    113b <find_line_size+0x3b>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    114b <find_line_size+0x4b>
jmp    1159 <find_line_size+0x59>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <find_line_size+0x13>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_line_size>:
xor    %eax,%eax
test   %rsi,%rsi
je     1122 <find_line_size+0x22>
nopw   0x0(%rax,%rax,1)
cmpb   $0xa,(%rdi,%rax,1)
je     1122 <find_line_size+0x22>
add    $0x1,%rax
cmp    %rax,%rsi
jne    1110 <find_line_size+0x10>
mov    %rsi,%rax
ret

LLVM IR (-O0):
define i32 @find_line_size(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
store i8* %0, i8** %3
store i64 %1, i64* %4
store i32 0, i32* %5
br label %6
6: ; preds = %21, %2
%7 = load i32, i32* %5
%8 = sext i32 %7 to i64
%9 = load i64, i64* %4
%10 = icmp ult i64 %8, %9
br i1 %10, label %11, label %19
11: ; preds = %6
%12 = load i8*, i8** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %17, 10
br label %19
19: ; preds = %11, %6
%20 = phi i1 [ false, %6 ], [ %18, %11 ]
br i1 %20, label %21, label %24
21: ; preds = %19
%22 = load i32, i32* %5
%23 = add nsw i32 %22, 1
store i32 %23, i32* %5
br label %6
24: ; preds = %19
%25 = load i32, i32* %5
ret i32 %25
}

LLVM IR (-O2):
define i32 @find_line_size(i8* nocapture %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %9
%5 = phi i64 [ %10, %9 ], [ 0, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
br i1 %8, label %12, label %9
9: ; preds = %4
%10 = add nuw i64 %5, 1
%11 = icmp eq i64 %10, %1
br i1 %11, label %12, label %4
12: ; preds = %9, %4
%13 = phi i64 [ %5, %4 ], [ %1, %9 ]
%14 = trunc i64 %13 to i32
br label %15
15: ; preds = %12, %2
%16 = phi i32 [ 0, %2 ], [ %14, %12 ]
ret i32 %16
}
void intel_fbdev_unregister(struct drm_i915_private *dev_priv) {}


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

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

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

LLVM IR (-O2):
%struct.drm_i915_private = type opaque
define void @intel_fbdev_unregister(%struct.drm_i915_private* nocapture %0) {
ret void
}
void gtk_tree_model_filter_refilter() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_filter_refilter() {
ret void
}
int xor (int a, int b) {
  if (a != b) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<xor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
je     1122 <xor+0x22>
movl   $0x1,-0x4(%rbp)
jmp    1129 <xor+0x29>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xor(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int exeoc_stdselect(char **, char *, int *, int /*<<< orphan*/ *,
                    int /*<<< orphan*/, int /*<<< orphan*/ *);
int exeoc(char *exeargv[], char documentfinishedbuf[],
          int *documentfinishedbufsize, pid_t *ret) {
  return exeoc_stdselect(exeargv, documentfinishedbuf, documentfinishedbufsize,
                         ret, 0, NULL);
}


x86 assembly (clang, -O0):
<exeoc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
call   1030 <exeoc_stdselect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exeoc>:
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <exeoc_stdselect@plt>

LLVM IR (-O0):
define i32 @exeoc(i8** %0, i8* %1, i32* %2, i32* %3) {
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32*
store i8** %0, i8*** %5
store i8* %1, i8** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = call i32 @exeoc_stdselect(i8** %9, i8* %10, i32* %11, i32* %12, i32 0, i32* null)
ret i32 %13
}

LLVM IR (-O2):
define i32 @exeoc(i8** %0, i8* %1, i32* %2, i32* %3) {
%5 = tail call i32 @exeoc_stdselect(i8** %0, i8* %1, i32* %2, i32* %3, i32 0, i32* null)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_err(char *error_type) {
  fprintf(stderr, "%s\n", error_type);
  exit(-1);
}


x86 assembly (clang, -O0):
<print_err>:
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   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_err>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @print_err(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @print_err(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 -1)
unreachable
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SysCtlPeripheralPowerOff(uint32_t ui32Peripheral) {
  ;
  (*((volatile unsigned long
          *)(((unsigned long)(0x400fe900 + ((ui32Peripheral & 0xff00) >> 8)) &
              0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x400fe900 + ((ui32Peripheral & 0xff00) >> 8)) &
               0x000FFFFF)
              << 5) |
             ((ui32Peripheral & 0xff) << 2)))) = 0;
}


x86 assembly (clang, -O0):
<SysCtlPeripheralPowerOff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
add    $0x400fe900,%eax
cltq
movabs $0xf0000000,%rcx
and    %rcx,%rax
or     $0x2000000,%rax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
add    $0x400fe900,%ecx
movslq %ecx,%rcx
and    $0xfffff,%rcx
shl    $0x5,%rcx
or     %rcx,%rax
mov    -0x4(%rbp),%ecx
and    $0xff,%ecx
shl    $0x2,%ecx
movslq %ecx,%rcx
or     %rcx,%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPeripheralPowerOff>:
movzbl %dil,%eax
shr    $0x3,%edi
and    $0x1fe0,%edi
shl    $0x2,%eax
or     %edi,%eax
movq   $0x0,0x43fd2000(%rax)
ret

LLVM IR (-O0):
define void @SysCtlPeripheralPowerOff(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65280
%5 = ashr i32 %4, 8
%6 = add nsw i32 1074784512, %5
%7 = sext i32 %6 to i64
%8 = and i64 %7, 4026531840
%9 = or i64 %8, 33554432
%10 = load i32, i32* %2
%11 = and i32 %10, 65280
%12 = ashr i32 %11, 8
%13 = add nsw i32 1074784512, %12
%14 = sext i32 %13 to i64
%15 = and i64 %14, 1048575
%16 = shl i64 %15, 5
%17 = or i64 %9, %16
%18 = load i32, i32* %2
%19 = and i32 %18, 255
%20 = shl i32 %19, 2
%21 = sext i32 %20 to i64
%22 = or i64 %17, %21
%23 = inttoptr i64 %22 to i64*
store volatile i64 0, i64* %23
ret void
}

LLVM IR (-O2):
define void @SysCtlPeripheralPowerOff(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 8160
%4 = shl i32 %0, 2
%5 = and i32 %4, 1020
%6 = or i32 %5, %3
%7 = or i32 %6, 1140662272
%8 = zext i32 %7 to i64
%9 = inttoptr i64 %8 to i64*
store volatile i64 0, i64* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ do_find_pos(int /*<<< orphan*/);
void find_queen_positions(void) { do_find_pos(0); }


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

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

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

LLVM IR (-O2):
define void @find_queen_positions() {
%1 = tail call i32 @do_find_pos(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void f(int i) {
  if (i > 0)
    abort();
  i = -i;
  if (i < 0)
    return;
  abort();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    112c <f+0x1c>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1144 <f+0x34>
add    $0x10,%rsp
pop    %rbp
ret
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<f>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @f(i32 %0) {
%2 = tail call i32 (...) @abort()
unreachable
}
int scandir(const char *dir, struct dirent ***namelist,
            int (*selector)(const struct dirent *),
            int (*cmp)(const struct dirent **, const struct dirent **)) {
  anvil_syslog(0, "%s unimplemented\n", __FUNCTION__);
  return 0;
}


x86 assembly (clang, -O0):
<scandir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
xor    %edi,%edi
lea    0xecf(%rip),%rsi
lea    0xeda(%rip),%rdx
mov    $0x0,%al
call   1030 <anvil_syslog@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scandir>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xef3(%rip),%rdx
xor    %edi,%edi
xor    %eax,%eax
call   1030 <anvil_syslog@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.dirent = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.scandir = [8 x i8] c"scandir\00"
define i32 @scandir(i8* %0, %struct.dirent*** %1, i32 (%struct.dirent*)* %2, i32 (%struct.dirent**, %struct.dirent**)* %3) {
%5 = alloca i8*
%6 = alloca %struct.dirent***
%7 = alloca i32 (%struct.dirent*)*
%8 = alloca i32 (%struct.dirent**, %struct.dirent**)*
store i8* %0, i8** %5
store %struct.dirent*** %1, %struct.dirent**** %6
store i32 (%struct.dirent*)* %2, i32 (%struct.dirent*)** %7
store i32 (%struct.dirent**, %struct.dirent**)* %3, i32 (%struct.dirent**, %struct.dirent**)** %8
%9 = call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.scandir, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.dirent = type opaque
@.str = [18 x i8] c"%s unimplemented\0A\00"
@__FUNCTION__.scandir = [8 x i8] c"scandir\00"
define i32 @scandir(i8* nocapture readnone %0, %struct.dirent*** nocapture readnone %1, i32 (%struct.dirent*)* nocapture readnone %2, i32 (%struct.dirent**, %struct.dirent**)* nocapture readnone %3) {
%5 = tail call i32 (i32, i8*, i8*, ...) bitcast (i32 (...)* @anvil_syslog to i32 (i32, i8*, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__FUNCTION__.scandir, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int arg9(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8,
         int a9) {
  printf("%d\n", a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 + a9);
  return a9;
}


x86 assembly (clang, -O0):
<arg9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%esi
add    -0x8(%rbp),%esi
add    -0xc(%rbp),%esi
add    -0x10(%rbp),%esi
add    -0x14(%rbp),%esi
add    -0x18(%rbp),%esi
add    0x10(%rbp),%esi
add    0x18(%rbp),%esi
add    0x20(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg9>:
push   %rbx
add    %edi,%esi
add    %edx,%esi
add    %ecx,%esi
add    %r8d,%esi
add    %r9d,%esi
add    0x10(%rsp),%esi
mov    0x20(%rsp),%ebx
add    0x18(%rsp),%esi
add    %ebx,%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @arg9(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 %8) {
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
store i32 %0, i32* %10
store i32 %1, i32* %11
store i32 %2, i32* %12
store i32 %3, i32* %13
store i32 %4, i32* %14
store i32 %5, i32* %15
store i32 %6, i32* %16
store i32 %7, i32* %17
store i32 %8, i32* %18
%19 = load i32, i32* %10
%20 = load i32, i32* %11
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %12
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %13
%25 = add nsw i32 %23, %24
%26 = load i32, i32* %14
%27 = add nsw i32 %25, %26
%28 = load i32, i32* %15
%29 = add nsw i32 %27, %28
%30 = load i32, i32* %16
%31 = add nsw i32 %29, %30
%32 = load i32, i32* %17
%33 = add nsw i32 %31, %32
%34 = load i32, i32* %18
%35 = add nsw i32 %33, %34
%36 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %35)
%37 = load i32, i32* %18
ret i32 %37
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @arg9(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7, i32 returned %8) {
%10 = add nsw i32 %1, %0
%11 = add nsw i32 %10, %2
%12 = add nsw i32 %11, %3
%13 = add nsw i32 %12, %4
%14 = add nsw i32 %13, %5
%15 = add nsw i32 %14, %6
%16 = add nsw i32 %15, %7
%17 = add nsw i32 %16, %8
%18 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %17)
ret i32 %8
}
double divide1(int num1, int num2) { return num1 / num2; }


x86 assembly (clang, -O0):
<divide1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide1>:
mov    %edi,%eax
cltd
idiv   %esi
cvtsi2sd %eax,%xmm0
ret

LLVM IR (-O0):
define double @divide1(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 = sdiv i32 %5, %6
%8 = sitofp i32 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @divide1(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = sitofp i32 %3 to double
ret double %4
}
short int shortint_ignoring_signedlonglongint(short int x,
                                              signed long long int y) {
  return x;
}


x86 assembly (clang, -O0):
<shortint_ignoring_signedlonglongint>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i16 @shortint_ignoring_signedlonglongint(i16 signext %0, i64 %1) {
%3 = alloca i16
%4 = alloca i64
store i16 %0, i16* %3
store i64 %1, i64* %4
%5 = load i16, i16* %3
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @shortint_ignoring_signedlonglongint(i16 returned signext %0, i64 %1) {
ret i16 %0
}