xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
__attribute__((unused)) const char *utf8_char_prev(const char *s) {
  assert(s);
  do
    s--;
  while ((*s & 0xc0) == 0x80);
  return s;
}


x86 assembly (clang, -O0):
<utf8_char_prev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0xc0,%eax
cmp    $0x80,%eax
je     1125 <utf8_char_prev+0x15>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8_char_prev>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
nopl   0x0(%rax)
movzbl -0x1(%rbx),%eax
add    $0xffffffffffffffff,%rbx
and    $0xc0,%al
cmp    $0x80,%al
je     1120 <utf8_char_prev+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @utf8_char_prev(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
br label %5
5: ; preds = %8, %1
%6 = load i8*, i8** %2
%7 = getelementptr inbounds i8, i8* %6, i32 -1
store i8* %7, i8** %2
br label %8
8: ; preds = %5
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = and i32 %11, 192
%13 = icmp eq i32 %12, 128
br i1 %13, label %5, label %14
14: ; preds = %8
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @utf8_char_prev(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ %0, %1 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = load i8, i8* %5
%7 = and i8 %6, -64
%8 = icmp eq i8 %7, -128
br i1 %8, label %3, label %9
9: ; preds = %3
ret i8* %5
}
int fibonacci(int n) {
  if (n <= 1) {
    return 1;
  }
  return fibonacci(n - 1) + fibonacci(n - 2);
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1131 <fibonacci+0x21>
movl   $0x1,-0x4(%rbp)
jmp    1154 <fibonacci+0x44>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbp
push   %rbx
push   %rax
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     1145 <fibonacci+0x35>
mov    %edi,%ebx
add    $0x2,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
lea    -0x3(%rbx),%edi
call   1030 <fibonacci@plt>
add    %eax,%ebp
add    $0xfffffffe,%ebx
cmp    $0x3,%ebx
ja     1130 <fibonacci+0x20>
add    $0x1,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fibonacci(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %13, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fibonacci(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %4, 4
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = add i32 %9, 1
br label %13
13: ; preds = %11, %1
%14 = phi i32 [ 1, %1 ], [ %12, %11 ]
ret i32 %14
}
void g_key_file_has_key() {}


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

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

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

LLVM IR (-O2):
define void @g_key_file_has_key() {
ret void
}
OP(ed, c5) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x5f() {
  Assert_real((isupper(95) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              480, ("isupper should be 0 for _"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x5f>:
push   %rax
mov    $0x5f,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1e0,%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_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for _\00"
define void @t_isupper_0x5f() {
%1 = call i64 @isupper(i32 95)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 480, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for _\00"
define void @t_isupper_0x5f() {
%1 = tail call i64 @isupper(i32 95)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 480, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int uvrrpd_sched_unset() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @uvrrpd_sched_unset() {
ret i32 0
}
OP(fd, ba) {
  illegal_1();
  op_ba();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_ba@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_ba@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_ba()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_ba()
ret i32 undef
}
float i1(float x) { return (x <= 0.f ? 1.f : -1.f); }


x86 assembly (clang, -O0):
<i1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm3
movss  0xee6(%rip),%xmm2
xorps  %xmm1,%xmm1
cmpless %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<i1>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setae  %al
lea    0xeee(%rip),%rcx
movss  (%rcx,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @i1(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp ole float %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, float 1.000000e+00, float -1.000000e+00
ret float %6
}

LLVM IR (-O2):
define float @i1(float %0) {
%2 = fcmp ole float %0, 0.000000e+00
%3 = select i1 %2, float 1.000000e+00, float -1.000000e+00
ret float %3
}
/* Variables and functions */
int rand();
int random_num() {
  int a = 1;
  int b = 10000;
  return rand() % (b - a) + a;
}


x86 assembly (clang, -O0):
<random_num>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0x2710,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random_num>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x68de3af,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x28,%rcx
add    %edx,%ecx
imul   $0x270f,%ecx,%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @random_num() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 10000, i32* %2
%3 = call i32 (...) @rand()
%4 = load i32, i32* %2
%5 = load i32, i32* %1
%6 = sub nsw i32 %4, %5
%7 = srem i32 %3, %6
%8 = load i32, i32* %1
%9 = add nsw i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @random_num() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 9999
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ err(int, int /*<<< orphan*/ *);
void nomem() { err(1, NULL); }


x86 assembly (clang, -O0):
<nomem>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <err@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<nomem>:
mov    $0x1,%edi
xor    %esi,%esi
jmp    1030 <err@plt>

LLVM IR (-O0):
define void @nomem() {
%1 = call i32 @err(i32 1, i32* null)
ret void
}

LLVM IR (-O2):
define void @nomem() {
%1 = tail call i32 @err(i32 1, i32* null)
ret void
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ select(int /*<<< orphan*/, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                          struct timeval *);
void setTimer(int seconds, int mseconds) {
  struct timeval temp;
  temp.tv_sec = seconds;
  temp.tv_usec = mseconds;
  select(0, NULL, NULL, NULL, &temp);
  printf("timer\n");
  return;
}


x86 assembly (clang, -O0):
<setTimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
xor    %edi,%edi
xor    %eax,%eax
mov    %eax,%ecx
lea    -0x10(%rbp),%r8
mov    %rcx,%rsi
mov    %rcx,%rdx
call   1040 <select@plt>
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setTimer>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%r8
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
call   1040 <select@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [7 x i8] c"timer\0A\00"
define void @setTimer(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.timeval
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = load i32, i32* %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i32 0, i32 1
store i32 %8, i32* %9
%10 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %5)
%11 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@str = [6 x i8] c"timer\00"
define void @setTimer(i32 %0, i32 %1) {
%3 = alloca %struct.timeval
%4 = bitcast %struct.timeval* %3 to i8*
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
store i32 %0, i32* %5
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
store i32 %1, i32* %6
%7 = call i32 @select(i32 0, i32* null, i32* null, i32* null, %struct.timeval* %3)
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
void push_free_callback(void *cls) {
  int *ok = cls;
  *ok = 0;
}


x86 assembly (clang, -O0):
<push_free_callback>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_free_callback>:
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @push_free_callback(i8* nocapture writeonly %0) {
%2 = bitcast i8* %0 to i32*
store i32 0, i32* %2
ret void
}
/* Variables and functions */
long long fabs(long long);
long long gcdi(long long a, long long b) {
  return fabs(b == 0 ? a : gcdi(b, a % b));
}


x86 assembly (clang, -O0):
<gcdi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1148 <gcdi+0x28>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1162 <gcdi+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rdx,%rsi
call   1040 <gcdi@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <fabs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcdi>:
test   %rsi,%rsi
je     1154 <gcdi+0x34>
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     113b <gcdi+0x1b>
mov    %rdi,%rax
cqto
idiv   %rsi
jmp    1141 <gcdi+0x21>
mov    %edi,%eax
xor    %edx,%edx
div    %esi
push   %rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1040 <gcdi@plt>
mov    %rax,%rdi
add    $0x8,%rsp
jmp    1030 <fabs@plt>

LLVM IR (-O0):
define i64 @gcdi(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i64, i64* %3
br label %15
9: ; preds = %2
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = srem i64 %11, %12
%14 = call i64 @gcdi(i64 %10, i64 %13)
br label %15
15: ; preds = %9, %7
%16 = phi i64 [ %8, %7 ], [ %14, %9 ]
%17 = call i64 @fabs(i64 %16)
ret i64 %17
}

LLVM IR (-O2):
define i64 @gcdi(i64 %0, i64 %1) {
%3 = icmp eq i64 %1, 0
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = srem i64 %0, %1
%6 = tail call i64 @gcdi(i64 %1, i64 %5)
br label %7
7: ; preds = %2, %4
%8 = phi i64 [ %6, %4 ], [ %0, %2 ]
%9 = tail call i64 @fabs(i64 %8)
ret i64 %9
}
/* Variables and functions */
int _bswap(int);
int test_bswap(int X) { return _bswap(X); }


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

x86 assembly (clang, -O2):
<test_bswap>:
jmp    1030 <_bswap@plt>

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

LLVM IR (-O2):
define i32 @test_bswap(i32 %0) {
%2 = tail call i32 @_bswap(i32 %0)
ret i32 %2
}
/* Variables and functions */
int atoi(char *);
int dealwithargs(int argc, char *argv[]) {
  int level;
  if (argc > 1)
    level = atoi(argv[1]);
  else
    level = 64;
  return level;
}


x86 assembly (clang, -O0):
<dealwithargs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    113e <dealwithargs+0x2e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
jmp    1145 <dealwithargs+0x35>
movl   $0x40,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dealwithargs>:
cmp    $0x2,%edi
jl     111e <dealwithargs+0xe>
mov    0x8(%rsi),%rdi
jmp    1030 <atoi@plt>
mov    $0x40,%eax
ret

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

LLVM IR (-O2):
define i32 @dealwithargs(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 64, %2 ]
ret i32 %9
}
int main(int argc, char *argv[]) {
  (*(volatile unsigned int *)(0x80000000)) = 0xaabb55aa;
  while (1) {
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x80000000,%eax
movl   $0xaabb55aa,(%rax)
jmp    111d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
mov    $0x80000000,%eax
movl   $0xaabb55aa,(%rax)
nopl   0x0(%rax,%rax,1)
jmp    1110 <main+0x10>

LLVM IR (-O0):
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
store volatile i32 -1430563414, i32* inttoptr (i64 2147483648 to i32*)
br label %6
6: ; preds = %2, %6
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
store volatile i32 -1430563414, i32* inttoptr (i64 2147483648 to i32*)
br label %3
3: ; preds = %2, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  printf("Hello world!");
  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 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"Hello world!\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 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hello world!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
int is_mod_char(char c) {
  switch (c) {
  case '&':
  case '^':
  case '$':
  case '~':
  case '#':
  case '\\':
  case '/':
  case '@':
  case '%':
    return 1;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_mod_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffffdd,%eax
sub    $0x4,%eax
jb     1177 <is_mod_char+0x77>
jmp    1122 <is_mod_char+0x22>
mov    -0xc(%rbp),%eax
sub    $0x2f,%eax
je     1177 <is_mod_char+0x77>
jmp    1133 <is_mod_char+0x33>
mov    -0xc(%rbp),%eax
sub    $0x40,%eax
je     1177 <is_mod_char+0x77>
jmp    1144 <is_mod_char+0x44>
mov    -0xc(%rbp),%eax
sub    $0x5c,%eax
je     1177 <is_mod_char+0x77>
jmp    1155 <is_mod_char+0x55>
mov    -0xc(%rbp),%eax
sub    $0x5e,%eax
je     1177 <is_mod_char+0x77>
jmp    1166 <is_mod_char+0x66>
mov    -0xc(%rbp),%eax
sub    $0x7e,%eax
jne    1183 <is_mod_char+0x83>
jmp    1177 <is_mod_char+0x77>
movl   $0x1,-0x4(%rbp)
jmp    118a <is_mod_char+0x8a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_mod_char>:
mov    $0x1,%eax
lea    -0x23(%rdi),%ecx
cmp    $0x3b,%ecx
ja     111e <is_mod_char+0x1e>
movabs $0xa0000002000100f,%rdx
bt     %rcx,%rdx
jae    111e <is_mod_char+0x1e>
ret
cmp    $0x7e,%edi
je     111d <is_mod_char+0x1d>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @is_mod_char(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %7 [
i32 38, label %6
i32 94, label %6
i32 36, label %6
i32 126, label %6
i32 35, label %6
i32 92, label %6
i32 47, label %6
i32 64, label %6
i32 37, label %6
]
6: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_mod_char(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %3 [
i32 38, label %4
i32 94, label %4
i32 36, label %4
i32 126, label %4
i32 35, label %4
i32 92, label %4
i32 47, label %4
i32 64, label %4
i32 37, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ green_initialize(int);
int /*<<< orphan*/ green_shutdown();
int /*<<< orphan*/ issat(char *);
int main() {
  green_initialize(9408);
  issat("piet\n");
  issat("pompies\n");
  green_shutdown();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x24c0,%edi
call   1030 <green_initialize@plt>
lea    0xeb0(%rip),%rdi
call   1040 <issat@plt>
lea    0xeaa(%rip),%rdi
call   1040 <issat@plt>
mov    $0x0,%al
call   1050 <green_shutdown@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x24c0,%edi
call   1030 <green_initialize@plt>
lea    0xebe(%rip),%rdi
call   1040 <issat@plt>
lea    0xeb8(%rip),%rdi
call   1040 <issat@plt>
xor    %eax,%eax
call   1050 <green_shutdown@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"piet\0A\00"
@.str.1 = [9 x i8] c"pompies\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @green_initialize(i32 9408)
%3 = call i32 @issat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @issat(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 (...) @green_shutdown()
ret i32 0
}

LLVM IR (-O2):
@.str = [6 x i8] c"piet\0A\00"
@.str.1 = [9 x i8] c"pompies\0A\00"
define i32 @main() {
%1 = tail call i32 @green_initialize(i32 9408)
%2 = tail call i32 @issat(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @issat(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (...) @green_shutdown()
ret i32 0
}
/* Type definitions */
struct ibv_qp_init_attr_ex {
  int dummy;
};
struct ibv_qp {
  int dummy;
};
struct ibv_context {
  int dummy;
};

/* Variables and functions */
struct ibv_qp *ibv_create_qp_ex(struct ibv_context *,
                                struct ibv_qp_init_attr_ex *);
struct ibv_qp *
mlx4_glue_create_qp_ex(struct ibv_context *context,
                       struct ibv_qp_init_attr_ex *qp_init_attr_ex) {
  return ibv_create_qp_ex(context, qp_init_attr_ex);
}


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

x86 assembly (clang, -O2):
<mlx4_glue_create_qp_ex>:
jmp    1030 <ibv_create_qp_ex@plt>

LLVM IR (-O0):
%struct.ibv_qp = type { i32 }
%struct.ibv_context = type { i32 }
%struct.ibv_qp_init_attr_ex = type { i32 }
define %struct.ibv_qp* @mlx4_glue_create_qp_ex(%struct.ibv_context* %0, %struct.ibv_qp_init_attr_ex* %1) {
%3 = alloca %struct.ibv_context*
%4 = alloca %struct.ibv_qp_init_attr_ex*
store %struct.ibv_context* %0, %struct.ibv_context** %3
store %struct.ibv_qp_init_attr_ex* %1, %struct.ibv_qp_init_attr_ex** %4
%5 = load %struct.ibv_context*, %struct.ibv_context** %3
%6 = load %struct.ibv_qp_init_attr_ex*, %struct.ibv_qp_init_attr_ex** %4
%7 = call %struct.ibv_qp* @ibv_create_qp_ex(%struct.ibv_context* %5, %struct.ibv_qp_init_attr_ex* %6)
ret %struct.ibv_qp* %7
}

LLVM IR (-O2):
%struct.ibv_qp = type { i32 }
%struct.ibv_context = type { i32 }
%struct.ibv_qp_init_attr_ex = type { i32 }
define %struct.ibv_qp* @mlx4_glue_create_qp_ex(%struct.ibv_context* %0, %struct.ibv_qp_init_attr_ex* %1) {
%3 = tail call %struct.ibv_qp* @ibv_create_qp_ex(%struct.ibv_context* %0, %struct.ibv_qp_init_attr_ex* %1)
ret %struct.ibv_qp* %3
}
long assemble17(i)
unsigned long i;
{
  return (((i & 1) ? 0xffff0000 : 0) | ((i & 0x1f0000) >> 5) | ((i & 4) << 8) |
          ((i & 0x1ff8) >> 3));
}


x86 assembly (clang, -O0):
<assemble17>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0x1,%rdx
xor    %eax,%eax
mov    $0xffff0000,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,%eax
mov    -0x8(%rbp),%rcx
and    $0x1f0000,%rcx
shr    $0x5,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0x4,%rcx
shl    $0x8,%rcx
or     %rcx,%rax
mov    -0x8(%rbp),%rcx
and    $0x1ff8,%rcx
shr    $0x3,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<assemble17>:
mov    %rdi,%rax
mov    %eax,%ecx
and    $0x1,%ecx
neg    %ecx
and    $0xffff0000,%ecx
mov    %rdi,%rdx
shr    $0x5,%rdx
and    $0xf800,%edx
mov    %eax,%esi
and    $0x4,%esi
shl    $0x8,%rsi
or     %rdx,%rsi
shr    $0x3,%eax
and    $0x3ff,%eax
or     %rsi,%rax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @assemble17(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 1
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -65536, i32 0
%8 = zext i32 %7 to i64
%9 = load i64, i64* %2
%10 = and i64 %9, 2031616
%11 = lshr i64 %10, 5
%12 = or i64 %8, %11
%13 = load i64, i64* %2
%14 = and i64 %13, 4
%15 = shl i64 %14, 8
%16 = or i64 %12, %15
%17 = load i64, i64* %2
%18 = and i64 %17, 8184
%19 = lshr i64 %18, 3
%20 = or i64 %16, %19
ret i64 %20
}

LLVM IR (-O2):
define i64 @assemble17(i64 %0) {
%2 = and i64 %0, 1
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i64 0, i64 4294901760
%5 = lshr i64 %0, 5
%6 = and i64 %5, 63488
%7 = shl i64 %0, 8
%8 = and i64 %7, 1024
%9 = lshr i64 %0, 3
%10 = and i64 %9, 1023
%11 = or i64 %8, %6
%12 = or i64 %11, %10
%13 = or i64 %12, %4
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *mystrdup(char *s) {
  char *p = (char *)malloc(strlen(s) + 1);
  if (p == NULL) {
    printf("Error: ran out of memory");
    exit(EXIT_FAILURE);
  }
  strcpy(p, s);
  return p;
}


x86 assembly (clang, -O0):
<mystrdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1060 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    119a <mystrdup+0x4a>
lea    0xe79(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e4d(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1060 <malloc@plt>
test   %rax,%rax
je     1183 <mystrdup+0x33>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe76(%rip),%rdi
call   1050 <printf@plt>
mov    0x2e4a(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Error: ran out of memory\00"
@EXIT_FAILURE = global i32 0
define i8* @mystrdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @malloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = icmp eq i8* %9, null
br i1 %10, label %11, label %15
11: ; preds = %1
%12 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
15: ; preds = %1
%16 = load i8*, i8** %3
%17 = load i8*, i8** %2
%18 = call i32 @strcpy(i8* %16, i8* %17)
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [25 x i8] c"Error: ran out of memory\00"
@EXIT_FAILURE = global i32 0
define i8* @mystrdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %1
%12 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ _npop_handler(int /*<<< orphan*/);
void _pop_handler() { _npop_handler(0); }


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

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

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

LLVM IR (-O2):
define void @_pop_handler() {
%1 = tail call i32 @_npop_handler(i32 0)
ret void
}
__attribute__((no)) int bar_1(void) { return 42; }


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

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

LLVM IR (-O0):
define i32 @bar_1() {
ret i32 42
}

LLVM IR (-O2):
define i32 @bar_1() {
ret i32 42
}
const char *fpp_config_get_plugin_name(void) { return "libpdf.so from Chrome"; }


x86 assembly (clang, -O0):
<fpp_config_get_plugin_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fpp_config_get_plugin_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [22 x i8] c"libpdf.so from Chrome\00"
define i8* @fpp_config_get_plugin_name() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [22 x i8] c"libpdf.so from Chrome\00"
define i8* @fpp_config_get_plugin_name() {
ret i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void tag2str(uint32_t tag, char tags[4]) {
  tags[0] = (tag >> 24) & 0xFF;
  tags[1] = (tag >> 16) & 0xFF;
  tags[2] = (tag >> 8) & 0xFF;
  tags[3] = tag & 0xFF;
}


x86 assembly (clang, -O0):
<tag2str>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x3(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @tag2str(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 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = trunc i32 %7 to i8
%9 = load i8*, i8** %4
%10 = getelementptr inbounds i8, i8* %9, i64 0
store i8 %8, i8* %10
%11 = load i32, i32* %3
%12 = ashr i32 %11, 16
%13 = and i32 %12, 255
%14 = trunc i32 %13 to i8
%15 = load i8*, i8** %4
%16 = getelementptr inbounds i8, i8* %15, i64 1
store i8 %14, i8* %16
%17 = load i32, i32* %3
%18 = ashr i32 %17, 8
%19 = and i32 %18, 255
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %4
%22 = getelementptr inbounds i8, i8* %21, i64 2
store i8 %20, i8* %22
%23 = load i32, i32* %3
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %4
%27 = getelementptr inbounds i8, i8* %26, i64 3
store i8 %25, i8* %27
ret void
}

LLVM IR (-O2):
define void @tag2str(i32 %0, i8* nocapture writeonly %1) {
%3 = lshr i32 %0, 24
%4 = trunc i32 %3 to i8
store i8 %4, i8* %1
%5 = lshr i32 %0, 16
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %6, i8* %7
%8 = lshr i32 %0, 8
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %9, i8* %10
%11 = trunc i32 %0 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("hello, world!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"hello, world!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_number(int *);
int main() {
  int a = 10;
  int *b = NULL;
  int *c = NULL;
  b = &a;
  print_number(b);
  print_number(c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <print_number@plt>
mov    -0x18(%rbp),%rdi
call   1030 <print_number@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xa,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <print_number@plt>
xor    %edi,%edi
call   1030 <print_number@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 0, i32* %1
store i32 10, i32* %2
store i32* null, i32** %3
store i32* null, i32** %4
store i32* %2, i32** %3
%5 = load i32*, i32** %3
%6 = call i32 @print_number(i32* %5)
%7 = load i32*, i32** %4
%8 = call i32 @print_number(i32* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%3 = call i32 @print_number(i32* %1)
%4 = call i32 @print_number(i32* null)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ check_policy_common(int /*<<< orphan*/, int const);
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
void check_policy_deleted(FILE *fp, const int id) {
  fflush(fp);
  check_policy_common(0, id);
}


x86 assembly (clang, -O0):
<check_policy_deleted>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <fflush@plt>
mov    -0xc(%rbp),%esi
xor    %edi,%edi
call   1030 <check_policy_common@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_policy_deleted>:
push   %rbx
mov    %esi,%ebx
call   1040 <fflush@plt>
xor    %edi,%edi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <check_policy_common@plt>

LLVM IR (-O0):
define void @check_policy_deleted(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 = call i32 @fflush(i32* %5)
%7 = load i32, i32* %4
%8 = call i32 @check_policy_common(i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @check_policy_deleted(i32* nocapture %0, i32 %1) {
%3 = tail call i32 @fflush(i32* %0)
%4 = tail call i32 @check_policy_common(i32 0, i32 %1)
ret void
}
void mouse_dummy(void) {}


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

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

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

LLVM IR (-O2):
define void @mouse_dummy() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XMappingEvent;

/* Variables and functions */
void *get_XMappingEvent_display(void *_p) {
  return (void *)((XMappingEvent *)_p)->display;
}


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

x86 assembly (clang, -O2):
<get_XMappingEvent_display>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XMappingEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XMappingEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sigpipe_handler(int sig) { printf("in the signal handler\n"); }


x86 assembly (clang, -O0):
<sigpipe_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [23 x i8] c"in the signal handler\0A\00"
define void @sigpipe_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"in the signal handler\00"
define void @sigpipe_handler(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret void
}
void ScaleRowDown4_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown4_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _PATH_UTMP;
int strncmp(int /*<<< orphan*/, char *, int);
int has_utmp(void) { return strncmp(_PATH_UTMP, "/dev/null", 9); }


x86 assembly (clang, -O0):
<has_utmp>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<has_utmp>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
mov    $0x9,%edx
jmp    1030 <strncmp@plt>

LLVM IR (-O0):
@_PATH_UTMP = global i32 0
@.str = [10 x i8] c"/dev/null\00"
define i32 @has_utmp() {
%1 = load i32, i32* @_PATH_UTMP
%2 = call i32 @strncmp(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 %2
}

LLVM IR (-O2):
@_PATH_UTMP = global i32 0
@.str = [10 x i8] c"/dev/null\00"
define i32 @has_utmp() {
%1 = load i32, i32* @_PATH_UTMP
%2 = tail call i32 @strncmp(i32 %1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 9)
ret i32 %2
}
void early_ioremap_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @early_ioremap_setup() {
ret void
}
/* Type definitions */
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int recvfrom(int, char *, size_t, int, struct sockaddr *, int *);
int Xrecvfrom(int s, void *b, size_t z, int f, struct sockaddr *a, int *l) {
  int rl;
  int code;
  rl = *l;
  code = recvfrom(s, (char *)b, z, f, a, &rl);
  *l = rl;
  return code;
}


x86 assembly (clang, -O0):
<Xrecvfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x28(%rbp),%r8
lea    -0x34(%rbp),%r9
call   1030 <recvfrom@plt>
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x30(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x38(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Xrecvfrom>:
push   %rbx
sub    $0x10,%rsp
mov    %r9,%rbx
mov    (%r9),%eax
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%r9
call   1030 <recvfrom@plt>
mov    0xc(%rsp),%ecx
mov    %ecx,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @Xrecvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
%11 = alloca %struct.sockaddr*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
store i32 %0, i32* %7
store i8* %1, i8** %8
store i64 %2, i64* %9
store i32 %3, i32* %10
store %struct.sockaddr* %4, %struct.sockaddr** %11
store i32* %5, i32** %12
%15 = load i32*, i32** %12
%16 = load i32, i32* %15
store i32 %16, i32* %13
%17 = load i32, i32* %7
%18 = load i8*, i8** %8
%19 = load i64, i64* %9
%20 = load i32, i32* %10
%21 = load %struct.sockaddr*, %struct.sockaddr** %11
%22 = call i32 @recvfrom(i32 %17, i8* %18, i64 %19, i32 %20, %struct.sockaddr* %21, i32* %13)
store i32 %22, i32* %14
%23 = load i32, i32* %13
%24 = load i32*, i32** %12
store i32 %23, i32* %24
%25 = load i32, i32* %14
ret i32 %25
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @Xrecvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* nocapture %5) {
%7 = alloca i32
%8 = bitcast i32* %7 to i8*
%9 = load i32, i32* %5
store i32 %9, i32* %7
%10 = call i32 @recvfrom(i32 %0, i8* %1, i64 %2, i32 %3, %struct.sockaddr* %4, i32* %7)
%11 = load i32, i32* %7
store i32 %11, i32* %5
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ key;

/* Variables and functions */
int /*<<< orphan*/ hash_put1(char *, char const *);
int /*<<< orphan*/ qprintf(char *, int, char *, char const *, char const *);
void hash_put2(const char *key1, const char *key2, const char *val) {
  char key[32];
  qprintf(key, sizeof(key), "%s.%s", key1, key2);
  hash_put1(key, val);
}


x86 assembly (clang, -O0):
<hash_put2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    $0x20,%esi
lea    0xeb4(%rip),%rdx
call   1040 <qprintf@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <hash_put1@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_put2>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rdx,%rbx
mov    %rsi,%r8
mov    %rdi,%rcx
lea    0xec9(%rip),%rdx
mov    %rsp,%r14
mov    %r14,%rdi
mov    $0x20,%esi
call   1040 <qprintf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <hash_put1@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s.%s\00"
define void @hash_put2(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca [32 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i32 @qprintf(i8* %8, i32 32, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
%12 = getelementptr inbounds [32 x i8], [32 x i8]* %7, i64 0, i64 0
%13 = load i8*, i8** %6
%14 = call i32 @hash_put1(i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s.%s\00"
define void @hash_put2(i8* %0, i8* %1, i8* %2) {
%4 = alloca [32 x i8]
%5 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%6 = call i32 @qprintf(i8* %5, i32 32, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%7 = call i32 @hash_put1(i8* %5, i8* %2)
ret void
}
unsigned xrop3_116_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T ^ D;
  stk2 = S | stk3;
  stk1 = D ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_116_1_0(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, 255
%8 = or i32 %7, %4
%9 = xor i32 %8, 255
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}