xunge/DecIR huggingface dataset:
nextup(f, n) {
  nextwind(0, 1);
  backpage(f, n);
  prevwind(0, 1);
}


x86 assembly (clang, -O0):
<nextup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <nextwind@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    $0x0,%al
call   1040 <backpage@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x0,%al
call   1050 <prevwind@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextup>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <nextwind@plt>
mov    %ebp,%edi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <backpage@plt>
xor    %edi,%edi
mov    $0x1,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <prevwind@plt>

LLVM IR (-O0):
define i32 @nextup(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 (i32, i32, ...) bitcast (i32 (...)* @nextwind to i32 (i32, i32, ...)*)(i32 0, i32 1)
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 (i32, i32, ...) bitcast (i32 (...)* @backpage to i32 (i32, i32, ...)*)(i32 %7, i32 %8)
%10 = call i32 (i32, i32, ...) bitcast (i32 (...)* @prevwind to i32 (i32, i32, ...)*)(i32 0, i32 1)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @nextup(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @nextwind to i32 (i32, i32, ...)*)(i32 0, i32 1)
%4 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @backpage to i32 (i32, i32, ...)*)(i32 %0, i32 %1)
%5 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @prevwind to i32 (i32, i32, ...)*)(i32 0, i32 1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int drv_IMG_list(void) {
  printf("PPM ");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"PPM \00"
define i32 @drv_IMG_list() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"PPM \00"
define i32 @drv_IMG_list() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
RCU_DEF_INIT_FUNC(user_f5_init, param) {}


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

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

LLVM IR (-O0):
define i32 @RCU_DEF_INIT_FUNC(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @RCU_DEF_INIT_FUNC(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMR78_get(void) { return U_WMRCORENONE_get("U_WMR78"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR78\00"
define i32 @U_WMR78_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR78\00"
define i32 @U_WMR78_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ fenv_t;
typedef int /*<<< orphan*/ env;

/* Variables and functions */
int /*<<< orphan*/ FE_ALL_EXCEPT;
int /*<<< orphan*/ FE_DFL_ENV;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ fegetenv(int /*<<< orphan*/ *);
scalar_t__ fetestexcept(int /*<<< orphan*/);
scalar_t__ memcmp(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
void test_dfl_env(void) {
  fenv_t env;
  fegetenv(&env);
  assert(memcmp(&env, FE_DFL_ENV, sizeof(env)) == 0);
  assert(fetestexcept(FE_ALL_EXCEPT) == 0);
}


x86 assembly (clang, -O0):
<test_dfl_env>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1060 <fegetenv@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
mov    $0x4,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    0x2e58(%rip),%rax
mov    (%rax),%edi
call   1030 <fetestexcept@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_dfl_env>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <fegetenv@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
mov    $0x4,%edx
call   1040 <memcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
mov    0x2e5b(%rip),%rax
mov    (%rax),%edi
call   1030 <fetestexcept@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1050 <assert@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@FE_DFL_ENV = global i32 0
@FE_ALL_EXCEPT = global i32 0
define void @test_dfl_env() {
%1 = alloca i32
%2 = call i32 @fegetenv(i32* %1)
%3 = load i32, i32* @FE_DFL_ENV
%4 = call i64 @memcmp(i32* %1, i32 %3, i32 4)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* @FE_ALL_EXCEPT
%9 = call i64 @fetestexcept(i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret void
}

LLVM IR (-O2):
@FE_DFL_ENV = global i32 0
@FE_ALL_EXCEPT = global i32 0
define void @test_dfl_env() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @fegetenv(i32* %1)
%4 = load i32, i32* @FE_DFL_ENV
%5 = call i64 @memcmp(i32* %1, i32 %4, i32 4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* @FE_ALL_EXCEPT
%10 = call i64 @fetestexcept(i32 %9)
%11 = icmp eq i64 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: tput [-T term] attribute ...\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [37 x i8] c"usage: tput [-T term] attribute ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [37 x i8] c"usage: tput [-T term] attribute ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
void st_i8_le(void *x, int8_t i) { ((int8_t *)x)[0] = i; }


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

x86 assembly (clang, -O2):
<st_i8_le>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @st_i8_le(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
int hexdigit(register int c) {
  c &= 0x7f;
  if (c >= 'a' && c <= 'f')
    return (c - 'a' + 10);
  if (c >= 'A' && c <= 'F')
    return (c - 'A' + 10);
  return (c - '0');
}


x86 assembly (clang, -O0):
<hexdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x7f,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x61,-0x8(%rbp)
jl     1135 <hexdigit+0x35>
cmpl   $0x66,-0x8(%rbp)
jg     1135 <hexdigit+0x35>
mov    -0x8(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <hexdigit+0x63>
cmpl   $0x41,-0x8(%rbp)
jl     115a <hexdigit+0x5a>
cmpl   $0x46,-0x8(%rbp)
jg     115a <hexdigit+0x5a>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <hexdigit+0x63>
mov    -0x8(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexdigit>:
and    $0x7f,%edi
lea    -0x61(%rdi),%eax
lea    -0x41(%rdi),%ecx
cmp    $0x6,%ecx
mov    $0xffffffc9,%ecx
mov    $0xffffffd0,%edx
cmovb  %ecx,%edx
cmp    $0x6,%eax
mov    $0xffffffa9,%eax
cmovae %edx,%eax
add    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @hexdigit(i32 %0) {
%2 = and i32 %0, 127
%3 = add nsw i32 %2, -97
%4 = icmp ult i32 %3, 6
%5 = add nsw i32 %2, -65
%6 = icmp ult i32 %5, 6
%7 = select i1 %6, i32 -55, i32 -48
%8 = select i1 %4, i32 -87, i32 %7
%9 = add nsw i32 %2, %8
ret i32 %9
}
/* Variables and functions */
bool vconn_ssl_is_configured(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @vconn_ssl_is_configured() {
ret i32 0
}
int load_fnt(char *fntname) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @load_fnt(i8* nocapture readnone %0) {
ret i32 0
}
double fibonacci(unsigned n) {
  if (n == 0)
    return 0;
  if (n == 1)
    return 1;
  return fibonacci(n - 2) + fibonacci(n - 1);
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1132 <fibonacci+0x22>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <fibonacci+0x6a>
cmpl   $0x1,-0xc(%rbp)
jne    114e <fibonacci+0x3e>
movsd  0xebc(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117a <fibonacci+0x6a>
mov    -0xc(%rbp),%edi
sub    $0x2,%edi
call   1030 <fibonacci@plt>
movsd  %xmm0,-0x18(%rbp)
mov    -0xc(%rbp),%edi
sub    $0x1,%edi
call   1030 <fibonacci@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %rbx
sub    $0x10,%rsp
test   %edi,%edi
je     112a <fibonacci+0x1a>
mov    %edi,%ebx
cmp    $0x1,%edi
jne    1130 <fibonacci+0x20>
movsd  0xed8(%rip),%xmm0
jmp    114e <fibonacci+0x3e>
xorpd  %xmm0,%xmm0
jmp    114e <fibonacci+0x3e>
lea    -0x2(%rbx),%edi
call   1030 <fibonacci@plt>
movsd  %xmm0,0x8(%rsp)
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1030 <fibonacci@plt>
addsd  0x8(%rsp),%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @fibonacci(i32 %0) {
%2 = alloca double
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store double 0.000000e+00, double* %2
br label %19
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store double 1.000000e+00, double* %2
br label %19
11: ; preds = %7
%12 = load i32, i32* %3
%13 = sub i32 %12, 2
%14 = call double @fibonacci(i32 %13)
%15 = load i32, i32* %3
%16 = sub i32 %15, 1
%17 = call double @fibonacci(i32 %16)
%18 = fadd double %14, %17
store double %18, double* %2
br label %19
19: ; preds = %11, %10, %6
%20 = load double, double* %2
ret double %20
}

LLVM IR (-O2):
define double @fibonacci(i32 %0) {
switch i32 %0, label %5 [
i32 0, label %3
i32 1, label %2
]
2: ; preds = %1
br label %3
3: ; preds = %2, %1, %5
%4 = phi double [ %10, %5 ], [ 1.000000e+00, %2 ], [ 0.000000e+00, %1 ]
ret double %4
5: ; preds = %1
%6 = add i32 %0, -2
%7 = tail call double @fibonacci(i32 %6)
%8 = add i32 %0, -1
%9 = tail call double @fibonacci(i32 %8)
%10 = fadd double %7, %9
br label %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fwrite(void *, long, int, int /*<<< orphan*/ *);
extern void xopenme_dump_memory(char *name, void *array, long size) {
  FILE *fx = fopen(name, "wb");
  fwrite(array, size, 1, fx);
  fclose(fx);
}


x86 assembly (clang, -O0):
<xopenme_dump_memory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb1(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rcx
mov    $0x1,%edx
call   1050 <fwrite@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xopenme_dump_memory>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
lea    0xebe(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <fclose@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define void @xopenme_dump_memory(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @fwrite(i8* %1, i64 %2, i32 1, i32* %4)
%6 = tail call i32 @fclose(i32* %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LOG_DAEMON;
int /*<<< orphan*/ LOG_PERROR;
int /*<<< orphan*/ openlog(char const *, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void log_open_daemon(const char *name) {
  openlog(name, LOG_PERROR, LOG_DAEMON);
}


x86 assembly (clang, -O0):
<log_open_daemon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
mov    0x2eb8(%rip),%rax
mov    (%rax),%edx
call   1030 <openlog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_open_daemon>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
mov    0x2ec8(%rip),%rax
mov    (%rax),%edx
jmp    1030 <openlog@plt>

LLVM IR (-O0):
@LOG_PERROR = global i32 0
@LOG_DAEMON = global i32 0
define void @log_open_daemon(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @LOG_PERROR
%5 = load i32, i32* @LOG_DAEMON
%6 = call i32 @openlog(i8* %3, i32 %4, i32 %5)
ret void
}

LLVM IR (-O2):
@LOG_PERROR = global i32 0
@LOG_DAEMON = global i32 0
define void @log_open_daemon(i8* %0) {
%2 = load i32, i32* @LOG_PERROR
%3 = load i32, i32* @LOG_DAEMON
%4 = tail call i32 @openlog(i8* %0, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void *worker(void *arg) { sleep(1); }


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

x86 assembly (clang, -O2):
<worker>:
mov    $0x1,%edi
jmp    1030 <sleep@plt>

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

LLVM IR (-O2):
define noalias i8* @worker(i8* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 1)
ret i8* undef
}
/* Variables and functions */
int japi_start();
int j_start() { return (japi_start()); }


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

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

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

LLVM IR (-O2):
define i32 @j_start() {
%1 = tail call i32 (...) @japi_start()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ u;
typedef int /*<<< orphan*/ t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int *(t[10]);
  int *u[10];
  printf("%d", sizeof(t) != sizeof(u));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
void ptrace_sandbox_permit_sleep(struct pt_sandbox *p_sandbox) {
  (void)p_sandbox;
}


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

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

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

LLVM IR (-O2):
%struct.pt_sandbox = type opaque
define void @ptrace_sandbox_permit_sleep(%struct.pt_sandbox* nocapture %0) {
ret void
}
__attribute__((always_)) void XRayShutdown() { ; }


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

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

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

LLVM IR (-O2):
define void @XRayShutdown() {
ret void
}
void doWhileStmt() {
  do {
  } while (0);
  1 + 1;
}


x86 assembly (clang, -O0):
<doWhileStmt>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <doWhileStmt+0x9>
jmp    110e <doWhileStmt+0xe>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @doWhileStmt() {
br label %1
1: ; preds = %0
br label %2
2: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @doWhileStmt() {
ret void
}
void gtk_tree_store_set_value() {}


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

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

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

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

/* Variables and functions */
int decode_atom_format_6_1(unsigned char const *, struct stream *);
int decode_atom_format_6_4(const unsigned char *pkt, struct stream *stream) {
  return decode_atom_format_6_1(pkt, stream);
}


x86 assembly (clang, -O0):
<decode_atom_format_6_4>:
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 <decode_atom_format_6_1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_atom_format_6_4>:
jmp    1030 <decode_atom_format_6_1@plt>

LLVM IR (-O0):
%struct.stream = type { i32 }
define i32 @decode_atom_format_6_4(i8* %0, %struct.stream* %1) {
%3 = alloca i8*
%4 = alloca %struct.stream*
store i8* %0, i8** %3
store %struct.stream* %1, %struct.stream** %4
%5 = load i8*, i8** %3
%6 = load %struct.stream*, %struct.stream** %4
%7 = call i32 @decode_atom_format_6_1(i8* %5, %struct.stream* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.stream = type { i32 }
define i32 @decode_atom_format_6_4(i8* %0, %struct.stream* %1) {
%3 = tail call i32 @decode_atom_format_6_1(i8* %0, %struct.stream* %1)
ret i32 %3
}
/* Type definitions */
typedef int uint_fast32_t;

/* Variables and functions */
__attribute__((unused)) void cop_st_ule24(void *buf, uint_fast32_t val) {
  unsigned char *b = buf;
  b[0] = val & 0xFFu;
  b[1] = (val >> 8) & 0xFFu;
  b[2] = (val >> 16) & 0xFFu;
}


x86 assembly (clang, -O0):
<cop_st_ule24>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
sar    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x2(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cop_st_ule24>:
mov    %esi,%eax
mov    %al,(%rdi)
mov    %ah,0x1(%rdi)
shr    $0x10,%eax
mov    %al,0x2(%rdi)
ret

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

LLVM IR (-O2):
define void @cop_st_ule24(i8* nocapture writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
store i8 %3, i8* %0
%4 = lshr i32 %1, 8
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
%7 = lshr i32 %1, 16
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %8, i8* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ angle_rotate(unsigned int);
int /*<<< orphan*/ right();
void right_degrees(unsigned int Degrees) {
  right();
  angle_rotate(Degrees);
}


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

x86 assembly (clang, -O2):
<right_degrees>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <right@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <angle_rotate@plt>

LLVM IR (-O0):
define void @right_degrees(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @right()
%4 = load i32, i32* %2
%5 = call i32 @angle_rotate(i32 %4)
ret void
}

LLVM IR (-O2):
define void @right_degrees(i32 %0) {
%2 = tail call i32 (...) @right()
%3 = tail call i32 @angle_rotate(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ old_pthread_exit(void *);
int /*<<< orphan*/ pthread_self();
int /*<<< orphan*/ removeentry(int /*<<< orphan*/);
void __attribute__((noreturn)) pthread_exit(void *value_ptr) {
  removeentry(pthread_self());
  old_pthread_exit(value_ptr);
  exit(1);
}


x86 assembly (clang, -O0):
<pthread_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <pthread_self@plt>
mov    %eax,%edi
call   1050 <removeentry@plt>
mov    -0x8(%rbp),%rdi
call   1040 <old_pthread_exit@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<pthread_exit>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <pthread_self@plt>
mov    %eax,%edi
call   1050 <removeentry@plt>
mov    %rbx,%rdi
call   1040 <old_pthread_exit@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
define void @pthread_exit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @pthread_self()
%4 = call i32 @removeentry(i32 %3)
%5 = load i8*, i8** %2
%6 = call i32 @old_pthread_exit(i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @pthread_exit(i8* %0) {
%2 = tail call i32 (...) @pthread_self()
%3 = tail call i32 @removeentry(i32 %2)
%4 = tail call i32 @old_pthread_exit(i8* %0)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ buffer;

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char);
char *ctoa(char number) {
  static char buffer[33];
  snprintf(buffer, sizeof(buffer), "%c", number);
  return buffer;
}


x86 assembly (clang, -O0):
<ctoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0x2f1b(%rip),%rdi
mov    $0x21,%esi
lea    0xecf(%rip),%rdx
movsbl -0x1(%rbp),%ecx
call   1030 <snprintf@plt>
lea    0x2eff(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctoa>:
push   %rbx
mov    %edi,%ecx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rdx
mov    %rbx,%rdi
mov    $0x21,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@ctoa.buffer = internal global [33 x i8] zeroinitializer
@.str = [3 x i8] c"%c\00"
define i8* @ctoa(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @snprintf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @ctoa.buffer, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %3)
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @ctoa.buffer, i64 0, i64 0)
}

LLVM IR (-O2):
@ctoa.buffer = internal global [33 x i8] zeroinitializer
@.str = [3 x i8] c"%c\00"
define i8* @ctoa(i8 signext %0) {
%2 = tail call i32 @snprintf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @ctoa.buffer, i64 0, i64 0), i32 33, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret i8* getelementptr inbounds ([33 x i8], [33 x i8]* @ctoa.buffer, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ TIOCMGET;
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
int get_mlines(int fd) {
  int i;
  ioctl(fd, TIOCMGET, &i);
  return (i);
}


x86 assembly (clang, -O0):
<get_mlines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_mlines>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@TIOCMGET = global i32 0
define i32 @get_mlines(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @TIOCMGET
%6 = call i32 @ioctl(i32 %4, i32 %5, i32* %3)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
@TIOCMGET = global i32 0
define i32 @get_mlines(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @TIOCMGET
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = load i32, i32* %2
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ASRT_Mark(char *, int, char *);
scalar_t__ ASRT_Ptr(int *, int /*<<< orphan*/ *);
int test_PtrNullNull() {
  int *p = 0;
  do {
    ASRT_Mark("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/"
              "src/asrt_tests.c",
              124,
              "p"
              " == "
              "NULL");
    if (ASRT_Ptr(p, NULL)) {
      return 1;
    };
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<test_PtrNullNull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x10(%rbp)
lea    0xec9(%rip),%rdi
mov    $0x7c,%esi
lea    0xf4d(%rip),%rdx
call   1040 <ASRT_Mark@plt>
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <ASRT_Ptr@plt>
cmp    $0x0,%rax
je     116b <test_PtrNullNull+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1177 <test_PtrNullNull+0x57>
jmp    1170 <test_PtrNullNull+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_PtrNullNull>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xf61(%rip),%rdx
mov    $0x7c,%esi
call   1040 <ASRT_Mark@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1030 <ASRT_Ptr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [10 x i8] c"p == NULL\00"
define i32 @test_PtrNullNull() {
%1 = alloca i32
%2 = alloca i32*
store i32* null, i32** %2
br label %3
3: ; preds = %0
%4 = call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 124, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i64 @ASRT_Ptr(i32* %5, i32* null)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %3
store i32 1, i32* %1
br label %11
9: ; preds = %3
br label %10
10: ; preds = %9
store i32 0, i32* %1
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/cohadar/c-learning/refs/heads/master/src/asrt_tests.c\00"
@.str.1 = [10 x i8] c"p == NULL\00"
define i32 @test_PtrNullNull() {
%1 = tail call i32 @ASRT_Mark(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 124, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @ASRT_Ptr(i32* null, i32* null)
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdout;
int in_fork_child() {
  printf("After fork() in child\n");
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<in_fork_child>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_fork_child>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"After fork() in child\0A\00"
@stdout = global i32 0
define i32 @in_fork_child() {
%1 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = call i32 @fflush(i32 %2)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@str = [22 x i8] c"After fork() in child\00"
define i32 @in_fork_child() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
%2 = load i32, i32* @stdout
%3 = tail call i32 @fflush(i32 %2)
ret i32 0
}
/* Variables and functions */
scalar_t__ isspace(char const);
int /*<<< orphan*/ putchar(char const);
void print_to_space(const char *p) {
  putchar('"');
  while (*p) {
    if (isspace(*p))
      break;
    putchar(*p);
    p++;
  }
  putchar('"');
}


x86 assembly (clang, -O0):
<print_to_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x22,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     117b <print_to_space+0x5b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     115e <print_to_space+0x3e>
jmp    117b <print_to_space+0x5b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1136 <print_to_space+0x16>
mov    $0x22,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_to_space>:
push   %rbx
mov    %rdi,%rbx
mov    $0x22,%edi
call   1030 <putchar@plt>
mov    (%rbx),%al
test   %al,%al
je     1161 <print_to_space+0x41>
add    $0x1,%rbx
nopl   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1040 <isspace@plt>
test   %rax,%rax
jne    1161 <print_to_space+0x41>
movsbl -0x1(%rbx),%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <print_to_space+0x20>
mov    $0x22,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @print_to_space(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @putchar(i8 signext 34)
br label %4
4: ; preds = %14, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %20
8: ; preds = %4
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isspace(i8 signext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8
br label %20
14: ; preds = %8
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = call i32 @putchar(i8 signext %16)
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %2
br label %4
20: ; preds = %13, %4
%21 = call i32 @putchar(i8 signext 34)
ret void
}

LLVM IR (-O2):
define void @print_to_space(i8* nocapture %0) {
%2 = tail call i32 @putchar(i8 signext 34)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %1, %10
%6 = phi i8 [ %14, %10 ], [ %3, %1 ]
%7 = phi i8* [ %13, %10 ], [ %0, %1 ]
%8 = tail call i64 @isspace(i8 signext %6)
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i8, i8* %7
%12 = tail call i32 @putchar(i8 signext %11)
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %10, %5, %1
%17 = tail call i32 @putchar(i8 signext 34)
ret void
}
void cli() { asm volatile("cli" ::: "cc"); }


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

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

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

LLVM IR (-O2):
define void @cli() {
tail call void asm sideeffect "cli", "~{cc},~{dirflag},~{fpsr},~{flags}"()
ret void
}
void sigalarm(unsigned int sig) { return; }


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

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

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

LLVM IR (-O2):
define void @sigalarm(i32 %0) {
ret void
}
/* Variables and functions */
unsigned short csum_fold(int /*<<< orphan*/);
int /*<<< orphan*/ csum_tcpudp_nofold(unsigned long, unsigned long,
                                      unsigned short, unsigned short,
                                      unsigned int);
unsigned short int csum_tcpudp_magic(unsigned long saddr, unsigned long daddr,
                                     unsigned short len, unsigned short proto,
                                     unsigned int sum) {
  return csum_fold(csum_tcpudp_nofold(saddr, daddr, len, proto, sum));
}


x86 assembly (clang, -O0):
<csum_tcpudp_magic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cx,%ax
mov    %dx,%cx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %cx,-0x12(%rbp)
mov    %ax,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x12(%rbp),%cx
mov    -0x14(%rbp),%ax
mov    -0x18(%rbp),%r8d
movzwl %cx,%edx
movzwl %ax,%ecx
call   1040 <csum_tcpudp_nofold@plt>
mov    %eax,%edi
call   1030 <csum_fold@plt>
movzwl %ax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_tcpudp_magic>:
push   %rax
call   1040 <csum_tcpudp_nofold@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <csum_fold@plt>

LLVM IR (-O0):
define zeroext i16 @csum_tcpudp_magic(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3, i32 %4) {
%6 = alloca i64
%7 = alloca i64
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
store i64 %0, i64* %6
store i64 %1, i64* %7
store i16 %2, i16* %8
store i16 %3, i16* %9
store i32 %4, i32* %10
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i16, i16* %8
%14 = load i16, i16* %9
%15 = load i32, i32* %10
%16 = call i32 @csum_tcpudp_nofold(i64 %11, i64 %12, i16 zeroext %13, i16 zeroext %14, i32 %15)
%17 = call zeroext i16 @csum_fold(i32 %16)
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @csum_tcpudp_magic(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3, i32 %4) {
%6 = tail call i32 @csum_tcpudp_nofold(i64 %0, i64 %1, i16 zeroext %2, i16 zeroext %3, i32 %4)
%7 = tail call zeroext i16 @csum_fold(i32 %6)
ret i16 %7
}
void INT_Excep_PERIB_INTB190(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB190() {
ret void
}
int hexchar_to_int(char c) {
  const char *hexchar = "abcdef0123456789ABCDEF";
  int i;
  i = 0;
  while (i < (16 + 6)) {
    if (c == *(hexchar + i)) {
      return (i + 10) % 16;
    }
    i++;
  }
  return -1;
}


x86 assembly (clang, -O0):
<hexchar_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xeef(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x16,-0x14(%rbp)
jge    1162 <hexchar_to_int+0x62>
movsbl -0x5(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1154 <hexchar_to_int+0x54>
mov    -0x14(%rbp),%eax
add    $0xa,%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    %edx,-0x4(%rbp)
jmp    1169 <hexchar_to_int+0x69>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111c <hexchar_to_int+0x1c>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hexchar_to_int>:
add    $0xd0,%dil
mov    $0xffffffff,%eax
cmp    $0x36,%dil
ja     111d <hexchar_to_int+0x1d>
movsbq %dil,%rax
lea    0xee6(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"abcdef0123456789ABCDEF\00"
define i32 @hexchar_to_int(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i8*
%5 = alloca i32
store i8 %0, i8* %3
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8** %4
store i32 0, i32* %5
br label %6
6: ; preds = %23, %1
%7 = load i32, i32* %5
%8 = icmp slt i32 %7, 22
br i1 %8, label %9, label %26
9: ; preds = %6
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = load i8*, i8** %4
%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 eq i32 %11, %17
br i1 %18, label %19, label %23
19: ; preds = %9
%20 = load i32, i32* %5
%21 = add nsw i32 %20, 10
%22 = srem i32 %21, 16
store i32 %22, i32* %2
br label %27
23: ; preds = %9
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %6
26: ; preds = %6
store i32 -1, i32* %2
br label %27
27: ; preds = %26, %19
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
@switch.table.hexchar_to_int = [55 x i32] [i32 0, i32 1, i32 2, i32 3, i32 4, i32 5, i32 6, i32 7, i32 8, i32 9, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 10, i32 11, i32 12, i32 13, i32 14, i32 15]
define i32 @hexchar_to_int(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 55
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i8 %2 to i64
%6 = getelementptr inbounds [55 x i32], [55 x i32]* @switch.table.hexchar_to_int, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ -1, %1 ]
ret i32 %9
}
double test_ilogb(double x) { return __builtin_ilogb(x); }


x86 assembly (clang, -O0):
<test_ilogb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <ilogb@plt>
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ilogb>:
push   %rax
call   1030 <ilogb@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @test_ilogb(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @ilogb(double %3)
%5 = sitofp i32 %4 to double
ret double %5
}

LLVM IR (-O2):
define double @test_ilogb(double %0) {
%2 = tail call i32 @ilogb(double %0)
%3 = sitofp i32 %2 to double
ret double %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int send_event;
};
typedef TYPE_1__ XPropertyEvent;

/* Variables and functions */
void set_XPropertyEvent_send_event(void *_p, int _v) {
  ((XPropertyEvent *)_p)->send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XPropertyEvent_send_event>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @set_XPropertyEvent_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  (void)fprintf(stderr, "usage: basename string [suffix]\n"
                        "       basename [-a] [-s suffix] string [...]\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [79 x i8] c"usage: basename string [suffix]\0A basename [-a] [-s suffix] string [...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [79 x i8] c"usage: basename string [suffix]\0A basename [-a] [-s suffix] string [...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void i2d_X509_PUBKEY(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_X509_PUBKEY() {
ret void
}
/* Variables and functions */
int get_class_gen(char *, int);
int get_field_num(char *str) { return get_class_gen(str, 2); }


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

x86 assembly (clang, -O2):
<get_field_num>:
mov    $0x2,%esi
jmp    1030 <get_class_gen@plt>

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

LLVM IR (-O2):
define i32 @get_field_num(i8* %0) {
%2 = tail call i32 @get_class_gen(i8* %0, i32 2)
ret i32 %2
}
double kelvinToCentigrade(double kelvin) { return kelvin - 273.15; }


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

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

LLVM IR (-O0):
define double @kelvinToCentigrade(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double %3, 2.731500e+02
ret double %4
}

LLVM IR (-O2):
define double @kelvinToCentigrade(double %0) {
%2 = fadd double %0, -2.731500e+02
ret double %2
}
int divn(int x, int y) { return x / y; }


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

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

LLVM IR (-O0):
define i32 @divn(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
ret i32 %7
}

LLVM IR (-O2):
define i32 @divn(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
void yield() {}


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

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

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

LLVM IR (-O2):
define void @yield() {
ret void
}