xunge/DecIR huggingface dataset:
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int quaddobl_trace_sum_difference(int n, int *f, double *d) {
  int fail;
  fail = _ada_use_c2phc(677, &n, f, d);
  return fail;
}


x86 assembly (clang, -O0):
<quaddobl_trace_sum_difference>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    $0x2a5,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quaddobl_trace_sum_difference>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x2a5,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @quaddobl_trace_sum_difference(i32 %0, i32* %1, double* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca double*
%7 = alloca i32
store i32 %0, i32* %4
store i32* %1, i32** %5
store double* %2, double** %6
%8 = load i32*, i32** %5
%9 = load double*, double** %6
%10 = call i32 @_ada_use_c2phc(i32 677, i32* %4, i32* %8, double* %9)
store i32 %10, i32* %7
%11 = load i32, i32* %7
ret i32 %11
}

LLVM IR (-O2):
define i32 @quaddobl_trace_sum_difference(i32 %0, i32* %1, double* %2) {
%4 = alloca i32
store i32 %0, i32* %4
%5 = call i32 @_ada_use_c2phc(i32 677, i32* %4, i32* %1, double* %2)
ret i32 %5
}
fprint_action(action) struct content *action;
{}


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

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

LLVM IR (-O0):
%struct.content = type opaque
define i32 @fprint_action(%struct.content* %0) {
%2 = alloca i32
%3 = alloca %struct.content*
store %struct.content* %0, %struct.content** %3
%4 = load i32, i32* %2
ret i32 %4
}

LLVM IR (-O2):
%struct.content = type opaque
define i32 @fprint_action(%struct.content* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int float_to_fixed(int, int, unsigned int);
int read_float(char *, size_t, int *, int *);
int read_fixed(char *buf, size_t size, unsigned int fractional_bits) {
  int ret;
  int mantissa, exponent;
  ret = read_float(buf, size, &mantissa, &exponent);
  if (ret < 0)
    return 0;
  return float_to_fixed(mantissa, exponent, fractional_bits);
}


x86 assembly (clang, -O0):
<read_fixed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x24(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1030 <read_float@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jge    1161 <read_fixed+0x41>
movl   $0x0,-0x4(%rbp)
jmp    1172 <read_fixed+0x52>
mov    -0x24(%rbp),%edi
mov    -0x28(%rbp),%esi
mov    -0x1c(%rbp),%edx
call   1040 <float_to_fixed@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_fixed>:
push   %rbx
sub    $0x10,%rsp
mov    %edx,%ebx
lea    0xc(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <read_float@plt>
test   %eax,%eax
js     114b <read_fixed+0x2b>
mov    0xc(%rsp),%edi
mov    0x8(%rsp),%esi
mov    %ebx,%edx
call   1040 <float_to_fixed@plt>
jmp    114d <read_fixed+0x2d>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @read_fixed(i8* %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = bitcast i32* %4 to i8*
%7 = bitcast i32* %5 to i8*
%8 = call i32 @read_float(i8* %0, i64 %1, i32* %4, i32* %5)
%9 = icmp slt i32 %8, 0
br i1 %9, label %14, label %10
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = call i32 @float_to_fixed(i32 %11, i32 %12, i32 %2)
br label %14
14: ; preds = %3, %10
%15 = phi i32 [ %13, %10 ], [ 0, %3 ]
ret i32 %15
}
void mpp_sync() {}


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

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

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

LLVM IR (-O2):
define void @mpp_sync() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ fputsn(int, char *, int);
int print_to_base(int /*<<< orphan*/, char *, int);
int print_oct(int fd, uint64_t n) {
  int count;
  char buffer[128] = {0};
  count = print_to_base(n, buffer, 8);
  fputsn(fd, buffer, count);
  return count;
}


x86 assembly (clang, -O0):
<print_oct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%edi
lea    -0x90(%rbp),%rsi
mov    $0x8,%edx
call   1050 <print_to_base@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x90(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <fputsn@plt>
mov    -0xc(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_oct>:
push   %rbp
push   %r14
push   %rbx
sub    $0x80,%rsp
mov    %edi,%ebx
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movaps %xmm0,(%rsp)
mov    %rsp,%r14
mov    %esi,%edi
mov    %r14,%rsi
mov    $0x8,%edx
call   1040 <print_to_base@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <fputsn@plt>
mov    %ebp,%eax
add    $0x80,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @print_oct(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca [128 x i8]
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = bitcast [128 x i8]* %6 to i8*
%8 = load i32, i32* %4
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%10 = call i32 @print_to_base(i32 %8, i8* %9, i32 8)
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%13 = load i32, i32* %5
%14 = call i32 @fputsn(i32 %11, i8* %12, i32 %13)
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @print_oct(i32 %0, i32 %1) {
%3 = alloca [128 x i8]
%4 = getelementptr inbounds [128 x i8], [128 x i8]* %3, i64 0, i64 0
%5 = call i32 @print_to_base(i32 %1, i8* %4, i32 8)
%6 = call i32 @fputsn(i32 %0, i8* %4, i32 %5)
ret i32 %5
}
float _dedx_min(float a, float b) {
  if (a < b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<_dedx_min>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    1130 <_dedx_min+0x30>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113a <_dedx_min+0x3a>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dedx_min>:
minss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @_dedx_min(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp olt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %4
store float %10, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %5
store float %12, float* %3
br label %13
13: ; preds = %11, %9
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @_dedx_min(float %0, float %1) {
%3 = fcmp olt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
unsigned int get_uint16(char *start) {
  unsigned int value = 0;
  value = (unsigned char)*start | (((unsigned char)*(start + 1)) << 8);
  return value;
}


x86 assembly (clang, -O0):
<get_uint16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_uint16>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @get_uint16(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = or i32 %6, %11
store i32 %12, i32* %3
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @get_uint16(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *),
                            void *data, struct module *owner) {
  return -38;
}


x86 assembly (clang, -O0):
<sysfs_schedule_callback>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    $0xffffffda,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.kobject = type opaque
%struct.module = type opaque
define i32 @sysfs_schedule_callback(%struct.kobject* %0, void (i8*)* %1, i8* %2, %struct.module* %3) {
%5 = alloca %struct.kobject*
%6 = alloca void (i8*)*
%7 = alloca i8*
%8 = alloca %struct.module*
store %struct.kobject* %0, %struct.kobject** %5
store void (i8*)* %1, void (i8*)** %6
store i8* %2, i8** %7
store %struct.module* %3, %struct.module** %8
ret i32 -38
}

LLVM IR (-O2):
%struct.kobject = type opaque
%struct.module = type opaque
define i32 @sysfs_schedule_callback(%struct.kobject* nocapture readnone %0, void (i8*)* nocapture readnone %1, i8* nocapture readnone %2, %struct.module* nocapture readnone %3) {
ret i32 -38
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t cblByteOrderSwap32HostToLittle(uint32_t swap) { return swap; }


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

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

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

LLVM IR (-O2):
define i32 @cblByteOrderSwap32HostToLittle(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
scalar_t__ strncmp(char *, char *, unsigned int);
char *skipString(char *line, char *skip, unsigned int len) {
  if (strncmp(line, skip, len) != 0) {
    return NULL;
  }
  return line + len;
}


x86 assembly (clang, -O0):
<skipString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
je     114a <skipString+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    1158 <skipString+0x48>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipString>:
push   %r14
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rdi,%r14
call   1030 <strncmp@plt>
mov    %ebx,%edx
add    %r14,%rdx
xor    %ecx,%ecx
test   %rax,%rax
cmove  %rdx,%rcx
mov    %rcx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @skipString(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %2)
%5 = icmp eq i64 %4, 0
%6 = zext i32 %2 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = select i1 %5, i8* %7, i8* null
ret i8* %8
}
/* Type definitions */
struct basm_ppdef_s {
  int dummy;
};

/* Variables and functions */
struct basm_ppdef_s *BASM_PP_LookupDefine2(char *);
struct basm_ppdef_s *BASM_PP_LookupDefineLvls(char *);
struct basm_ppdef_s *BASM_PP_LookupDefine3(char *name) {
  struct basm_ppdef_s *cur;
  cur = BASM_PP_LookupDefineLvls(name);
  if (cur)
    return (cur);
  cur = BASM_PP_LookupDefine2(name);
  return (cur);
}


x86 assembly (clang, -O0):
<BASM_PP_LookupDefine3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <BASM_PP_LookupDefineLvls@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1151 <BASM_PP_LookupDefine3+0x31>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1166 <BASM_PP_LookupDefine3+0x46>
mov    -0x10(%rbp),%rdi
call   1030 <BASM_PP_LookupDefine2@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BASM_PP_LookupDefine3>:
push   %rbx
mov    %rdi,%rbx
call   1040 <BASM_PP_LookupDefineLvls@plt>
test   %rax,%rax
je     1130 <BASM_PP_LookupDefine3+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <BASM_PP_LookupDefine2@plt>

LLVM IR (-O0):
%struct.basm_ppdef_s = type { i32 }
define %struct.basm_ppdef_s* @BASM_PP_LookupDefine3(i8* %0) {
%2 = alloca %struct.basm_ppdef_s*
%3 = alloca i8*
%4 = alloca %struct.basm_ppdef_s*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call %struct.basm_ppdef_s* @BASM_PP_LookupDefineLvls(i8* %5)
store %struct.basm_ppdef_s* %6, %struct.basm_ppdef_s** %4
%7 = load %struct.basm_ppdef_s*, %struct.basm_ppdef_s** %4
%8 = icmp ne %struct.basm_ppdef_s* %7, null
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = load %struct.basm_ppdef_s*, %struct.basm_ppdef_s** %4
store %struct.basm_ppdef_s* %10, %struct.basm_ppdef_s** %2
br label %15
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = call %struct.basm_ppdef_s* @BASM_PP_LookupDefine2(i8* %12)
store %struct.basm_ppdef_s* %13, %struct.basm_ppdef_s** %4
%14 = load %struct.basm_ppdef_s*, %struct.basm_ppdef_s** %4
store %struct.basm_ppdef_s* %14, %struct.basm_ppdef_s** %2
br label %15
15: ; preds = %11, %9
%16 = load %struct.basm_ppdef_s*, %struct.basm_ppdef_s** %2
ret %struct.basm_ppdef_s* %16
}

LLVM IR (-O2):
%struct.basm_ppdef_s = type { i32 }
define %struct.basm_ppdef_s* @BASM_PP_LookupDefine3(i8* %0) {
%2 = tail call %struct.basm_ppdef_s* @BASM_PP_LookupDefineLvls(i8* %0)
%3 = icmp eq %struct.basm_ppdef_s* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call %struct.basm_ppdef_s* @BASM_PP_LookupDefine2(i8* %0)
br label %6
6: ; preds = %1, %4
%7 = phi %struct.basm_ppdef_s* [ %5, %4 ], [ %2, %1 ]
ret %struct.basm_ppdef_s* %7
}
/* Variables and functions */
int /*<<< orphan*/ show_float(double);
int /*<<< orphan*/ show_int(int);
int main(int argc, char *argv[]) {
  show_int(23);
  show_float(45.56);
  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)
mov    $0x17,%edi
call   1040 <show_int@plt>
movsd  0xeb8(%rip),%xmm0
call   1030 <show_float@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x17,%edi
call   1040 <show_int@plt>
movsd  0xecd(%rip),%xmm0
call   1030 <show_float@plt>
xor    %eax,%eax
pop    %rcx
ret

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
%6 = call i32 @show_int(i32 23)
%7 = call i32 @show_float(double 4.556000e+01)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @show_int(i32 23)
%4 = tail call i32 @show_float(double 4.556000e+01)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fd_w25q16dw_wake();
void fd_hal_external_flash_wake(void) { fd_w25q16dw_wake(); }


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

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

LLVM IR (-O0):
define void @fd_hal_external_flash_wake() {
%1 = call i32 (...) @fd_w25q16dw_wake()
ret void
}

LLVM IR (-O2):
define void @fd_hal_external_flash_wake() {
%1 = tail call i32 (...) @fd_w25q16dw_wake()
ret void
}
char *ttyname(int fd) { return "CON"; }


x86 assembly (clang, -O0):
<ttyname>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
lea    0xef2(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"CON\00"
define i8* @ttyname(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"CON\00"
define i8* @ttyname(i32 %0) {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int f384(int *);
int f385(int *p) { return f384(p); }


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

x86 assembly (clang, -O2):
<f385>:
jmp    1030 <f384@plt>

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

LLVM IR (-O2):
define i32 @f385(i32* %0) {
%2 = tail call i32 @f384(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ UartEndSimulation(int);
void exit(int code) {
  UartEndSimulation(code);
  while (1) {
  }
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <UartEndSimulation@plt>
jmp    1123 <exit+0x13>

x86 assembly (clang, -O2):
<exit>:
push   %rax
call   1030 <UartEndSimulation@plt>
cs nopw 0x0(%rax,%rax,1)
jmp    1120 <exit+0x10>

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @UartEndSimulation(i32 %3)
br label %5
5: ; preds = %1, %5
br label %5
}

LLVM IR (-O2):
define void @exit(i32 %0) {
%2 = tail call i32 @UartEndSimulation(i32 %0)
br label %3
3: ; preds = %1, %3
br label %3
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void usage(void) {
  fatal("Usage: rrz80 [--trace] [--outlinedepthtrace] [--tracewithdepth] "
        "[--traceregs] [--dumpret] [--maxruntime=xx] [--mapfile=mapfilename] "
        "romimage.bin");
}


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

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

LLVM IR (-O0):
@.str = [145 x i8] c"Usage: rrz80 [--trace] [--outlinedepthtrace] [--tracewithdepth] [--traceregs] [--dumpret] [--maxruntime=xx] [--mapfile=mapfilename] romimage.bin\00"
define void @usage() {
%1 = call i32 @fatal(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [145 x i8] c"Usage: rrz80 [--trace] [--outlinedepthtrace] [--tracewithdepth] [--traceregs] [--dumpret] [--maxruntime=xx] [--mapfile=mapfilename] romimage.bin\00"
define void @usage() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void ext_dev_write_8(uint32_t addr, uint8_t val, void *ctxt) {}


x86 assembly (clang, -O0):
<ext_dev_write_8>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ext_dev_write_8(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
define void @ext_dev_write_8(i32 %0, i32 %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
char *strchr(char const *, char);
int strlen(char const *);
int urlpath_length(const char *url) {
  const char *q = strchr(url, '?');
  if (q)
    return q - url;
  return strlen(url);
}


x86 assembly (clang, -O0):
<urlpath_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3f,%esi
call   1040 <strchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     115c <urlpath_length+0x3c>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
jmp    1168 <urlpath_length+0x48>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<urlpath_length>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3f,%esi
call   1040 <strchr@plt>
test   %rax,%rax
je     1137 <urlpath_length+0x17>
sub    %ebx,%eax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <strlen@plt>

LLVM IR (-O0):
define i32 @urlpath_length(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strchr(i8* %5, i8 signext 63)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %16
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = ptrtoint i8* %10 to i64
%13 = ptrtoint i8* %11 to i64
%14 = sub i64 %12, %13
%15 = trunc i64 %14 to i32
store i32 %15, i32* %2
br label %19
16: ; preds = %1
%17 = load i8*, i8** %3
%18 = call i32 @strlen(i8* %17)
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %9
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @urlpath_length(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 63)
%3 = icmp eq i8* %2, null
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = ptrtoint i8* %2 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
br label %11
9: ; preds = %1
%10 = tail call i32 @strlen(i8* %0)
br label %11
11: ; preds = %9, %4
%12 = phi i32 [ %8, %4 ], [ %10, %9 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void myPrintHello(void) {
  printf("Hello makefiles!\n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Hello makefiles!\0A\00"
define void @myPrintHello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Hello makefiles!\00"
define void @myPrintHello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
void close_error() { perror("close error"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"close error\00"
define void @close_error() {
%1 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"close error\00"
define void @close_error() {
%1 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
void erase_bug(int x, int y) {}


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

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

LLVM IR (-O0):
define void @erase_bug(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @erase_bug(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
do_regular_work() {
  printf("supersleep version 1.0 running-licensed software\n");
  sleep(10);
}


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

x86 assembly (clang, -O2):
<do_regular_work>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xa,%edi
pop    %rax
jmp    1040 <sleep@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"supersleep version 1.0 running-licensed software\0A\00"
define i32 @do_regular_work() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @sleep(i32 10)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@str = [49 x i8] c"supersleep version 1.0 running-licensed software\00"
define i32 @do_regular_work() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @sleep(i32 10)
ret i32 undef
}
/* Variables and functions */
int __syscall(int, char const *);
int errno;
int _unlink(const char *pathname) {
  int err;
  err = __syscall(10, pathname);
  if (err < 0) {
    errno = -err;
    return -1;
  }
  return err;
}


x86 assembly (clang, -O0):
<_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    $0xa,%edi
call   1030 <__syscall@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1151 <_unlink+0x41>
xor    %ecx,%ecx
sub    -0x14(%rbp),%ecx
mov    0x2e9d(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <_unlink+0x47>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_unlink>:
push   %rax
mov    %rdi,%rsi
mov    $0xa,%edi
call   1030 <__syscall@plt>
test   %eax,%eax
js     1124 <_unlink+0x14>
pop    %rcx
ret
neg    %eax
mov    0x2eb3(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@errno = global i32 0
define i32 @_unlink(i8* %0) {
%2 = tail call i32 @__syscall(i32 10, i8* %0)
%3 = icmp slt i32 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = sub nsw i32 0, %2
store i32 %5, i32* @errno
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ -1, %4 ], [ %2, %1 ]
ret i32 %7
}
/* Variables and functions */
float bot_randf();
float bot_randf_in_range(float mi, float ma) {
  return bot_randf() * (ma - mi) + mi;
}


x86 assembly (clang, -O0):
<bot_randf_in_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <bot_randf@plt>
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_randf_in_range>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <bot_randf@plt>
movss  (%rsp),%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @bot_randf_in_range(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call float (...) @bot_randf()
%6 = load float, float* %4
%7 = load float, float* %3
%8 = fsub float %6, %7
%9 = load float, float* %3
%10 = call float @llvm.fmuladd.f32(float %5, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @bot_randf_in_range(float %0, float %1) {
%3 = tail call float (...) @bot_randf()
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %0)
ret float %5
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
uint16_t nrf_drv_radio802154_cca_duration_get(void) {
  uint16_t result = 6 + 40 + 8 * 16;
  return result;
}


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

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

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

LLVM IR (-O2):
define i32 @nrf_drv_radio802154_cca_duration_get() {
ret i32 174
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
void SetNonBlock(int fd) {
  int flag = fcntl(fd, F_GETFL, 0);
  fcntl(fd, F_SETFL, flag | O_NONBLOCK);
}


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

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

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

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @SetNonBlock(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %3
%7 = tail call i32 @fcntl(i32 %0, i32 %4, i32 %6)
ret void
}
/* Variables and functions */
unsigned int BUFSIZ;
unsigned int scalanative_libc_bufsiz() { return BUFSIZ; }


x86 assembly (clang, -O0):
<scalanative_libc_bufsiz>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalanative_libc_bufsiz>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%eax
ret

LLVM IR (-O0):
@BUFSIZ = global i32 0
define i32 @scalanative_libc_bufsiz() {
%1 = load i32, i32* @BUFSIZ
ret i32 %1
}

LLVM IR (-O2):
@BUFSIZ = global i32 0
define i32 @scalanative_libc_bufsiz() {
%1 = load i32, i32* @BUFSIZ
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, char *);
int main(int argc, char *argv[]) {
  int i;
  for (i = 0; i < argc; i++) {
    printf("argument #%d\t-\t%s\n", i, argv[i]);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1162 <main+0x52>
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %edi,%edi
jle    1147 <main+0x37>
mov    %rsi,%r14
mov    %edi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [19 x i8] c"argument #%d\09-\09%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %10, i8* %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
scalar_t__ realloc(char *, int);
char *my_realloc(char *buf) {
  char *tmp;
  tmp = (char *)realloc(buf, 0x1000000);
  if (!tmp) {
    return tmp;
  }
  return tmp;
}


x86 assembly (clang, -O0):
<my_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1000000,%esi
call   1030 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1146 <my_realloc+0x36>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114e <my_realloc+0x3e>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_realloc>:
mov    $0x1000000,%esi
jmp    1030 <realloc@plt>

LLVM IR (-O0):
define i8* @my_realloc(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @realloc(i8* %5, i32 16777216)
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %12, label %10
10: ; preds = %1
%11 = load i8*, i8** %4
store i8* %11, i8** %2
br label %14
12: ; preds = %1
%13 = load i8*, i8** %4
store i8* %13, i8** %2
br label %14
14: ; preds = %12, %10
%15 = load i8*, i8** %2
ret i8* %15
}

LLVM IR (-O2):
define i8* @my_realloc(i8* %0) {
%2 = tail call i64 @realloc(i8* %0, i32 16777216)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int die;
  srand(time(NULL));
  die = rand() % 6 + 1;
  printf("You rolled a: %d", die);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"You rolled a: %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 6
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"You rolled a: %d\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 6
%5 = add nsw i32 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cnfExprt(char *, char *const, int);
int /*<<< orphan*/ cnfImprt(char *const, int, char *);
int /*<<< orphan*/ strcat(char *, char *);
void fc_(char *const text, int text_length, char *const c, int c_length) {

  static char local[41];
  cnfImprt(c, c_length, local);
  strcat(local, " to you too");
  cnfExprt(local, text, text_length);
}


x86 assembly (clang, -O0):
<fc_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
lea    0x2efc(%rip),%rdx
call   1050 <cnfImprt@plt>
lea    0x2ef0(%rip),%rdi
lea    0xe99(%rip),%rsi
call   1040 <strcat@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0x2ed6(%rip),%rdi
call   1030 <cnfExprt@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc_>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0x2f0f(%rip),%rbp
mov    %rdx,%rdi
mov    %ecx,%esi
mov    %rbp,%rdx
call   1050 <cnfImprt@plt>
lea    0xeab(%rip),%rsi
mov    %rbp,%rdi
call   1040 <strcat@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <cnfExprt@plt>

LLVM IR (-O0):
@fc_.local = internal global [41 x i8] zeroinitializer
@.str = [12 x i8] c" to you too\00"
define void @fc_(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %7
%10 = load i32, i32* %8
%11 = call i32 @cnfImprt(i8* %9, i32 %10, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @fc_.local, i64 0, i64 0))
%12 = call i32 @strcat(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @fc_.local, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %5
%14 = load i32, i32* %6
%15 = call i32 @cnfExprt(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @fc_.local, i64 0, i64 0), i8* %13, i32 %14)
ret void
}

LLVM IR (-O2):
@fc_.local = internal global [41 x i8] zeroinitializer
@.str = [12 x i8] c" to you too\00"
define void @fc_(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @cnfImprt(i8* %2, i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @fc_.local, i64 0, i64 0))
%6 = tail call i32 @strcat(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @fc_.local, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @cnfExprt(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @fc_.local, i64 0, i64 0), i8* %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, unsigned char);
void fprint_mov_atRi(FILE *stream, unsigned char i) {
  fprintf(stream, "MOV   A, @R%X                    ", i);
}


x86 assembly (clang, -O0):
<fprint_mov_atRi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed3(%rip),%rsi
movzbl -0x9(%rbp),%edx
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_mov_atRi>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"MOV A, @R%X \00"
define void @fprint_mov_atRi(i32* %0, i8 zeroext %1) {
%3 = alloca i32*
%4 = alloca i8
store i32* %0, i32** %3
store i8 %1, i8* %4
%5 = load i32*, i32** %3
%6 = load i8, i8* %4
%7 = call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"MOV A, @R%X \00"
define void @fprint_mov_atRi(i32* nocapture %0, i8 zeroext %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void MG_update_gauge(double step) {
  printf(
      "ERROR: MG_update_gauge called but DDalphaAMG library not included.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<MG_update_gauge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [68 x i8] c"ERROR: MG_update_gauge called but DDalphaAMG library not included.\0A\00"
define void @MG_update_gauge(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [67 x i8] c"ERROR: MG_update_gauge called but DDalphaAMG library not included.\00"
define void @MG_update_gauge(double %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([67 x i8], [67 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int play() {
  printf("play!\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"play!\00"
define i32 @play() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int x = 5;
  int y = x + 1;
  printf("%i", y);
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ add_if_even_col_linie_0();
int /*<<< orphan*/ add_if_even_line_col_0();
int main() {
  add_if_even_col_linie_0();
  add_if_even_line_col_0();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <add_if_even_col_linie_0@plt>
mov    $0x0,%al
call   1040 <add_if_even_line_col_0@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @add_if_even_col_linie_0()
%2 = call i32 (...) @add_if_even_line_col_0()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @add_if_even_col_linie_0()
%2 = tail call i32 (...) @add_if_even_line_col_0()
ret i32 0
}
void CALC_addDot() {}


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

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

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

LLVM IR (-O2):
define void @CALC_addDot() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void dtor4() { printf("Destroy4!\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Destroy4!\0A\00"
define void @dtor4() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"Destroy4!\00"
define void @dtor4() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
void Clear(char *buffer) { memset(buffer, 0, sizeof(char) * 1024); }


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

x86 assembly (clang, -O2):
<Clear>:
xor    %esi,%esi
mov    $0x400,%edx
jmp    1030 <memset@plt>

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

LLVM IR (-O2):
define void @Clear(i8* %0) {
%2 = tail call i32 @memset(i8* %0, i32 0, i32 1024)
ret void
}
void mdp4_dmap_done_dsi_cmd(int cndx) {}


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

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

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

LLVM IR (-O2):
define void @mdp4_dmap_done_dsi_cmd(i32 %0) {
ret void
}