xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t ceil_div(size_t x, size_t y) {
  if (x == 0) {
    return 0;
  }
  return 1 + ((x - 1) / y);
}


x86 assembly (clang, -O0):
<ceil_div>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1124 <ceil_div+0x24>
movq   $0x0,-0x8(%rbp)
jmp    113c <ceil_div+0x3c>
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x18(%rbp)
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil_div>:
test   %rdi,%rdi
je     1122 <ceil_div+0x22>
add    $0xffffffffffffffff,%rdi
mov    %rdi,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     1125 <ceil_div+0x25>
mov    %rdi,%rax
xor    %edx,%edx
div    %rsi
add    $0x1,%rax
ret
xor    %eax,%eax
ret
mov    %edi,%eax
xor    %edx,%edx
div    %esi
add    $0x1,%rax
ret

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

LLVM IR (-O2):
define i64 @ceil_div(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, 0
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = add i64 %0, -1
%6 = udiv i64 %5, %1
%7 = add nuw i64 %6, 1
br label %8
8: ; preds = %2, %4
%9 = phi i64 [ %7, %4 ], [ 0, %2 ]
ret i64 %9
}
int invalid_command(int argc, char *argv[]) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @invalid_command(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int create_socket();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int recreate_socket() {
  int sock = create_socket();
  if (sock < 0) {
    perror("ERROR creating socket");
    exit(EXIT_FAILURE);
  }
  return sock;
}


x86 assembly (clang, -O0):
<recreate_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <create_socket@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    1166 <recreate_socket+0x36>
lea    0xead(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recreate_socket>:
push   %rax
xor    %eax,%eax
call   1030 <create_socket@plt>
test   %eax,%eax
js     113e <recreate_socket+0xe>
pop    %rcx
ret
lea    0xebb(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"ERROR creating socket\00"
@EXIT_FAILURE = global i32 0
define i32 @recreate_socket() {
%1 = alloca i32
%2 = call i32 (...) @create_socket()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = call i32 @exit(i32 %7)
unreachable
9: ; preds = %0
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
@.str = [22 x i8] c"ERROR creating socket\00"
@EXIT_FAILURE = global i32 0
define i32 @recreate_socket() {
%1 = tail call i32 (...) @create_socket()
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @exit(i32 %5)
unreachable
7: ; preds = %0
ret i32 %1
}
int test_imm_29uint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x29 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_29uint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x29,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_29uint64_midword_reg>:
test   $0x290000,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_29uint64_midword_reg(i64 %0) {
%2 = and i64 %0, 2686976
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void foo242(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo242(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ appendStr(char **, char *);
int /*<<< orphan*/ free(char *);
void appendStrFree(char **str, char *app) {
  appendStr(str, app);
  free(app);
}


x86 assembly (clang, -O0):
<appendStrFree>:
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   1040 <appendStr@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<appendStrFree>:
push   %rbx
mov    %rsi,%rbx
call   1040 <appendStr@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @appendStrFree(i8** %0, i8* %1) {
%3 = alloca i8**
%4 = alloca i8*
store i8** %0, i8*** %3
store i8* %1, i8** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %4
%7 = call i32 @appendStr(i8** %5, i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @free(i8* %8)
ret void
}

LLVM IR (-O2):
define void @appendStrFree(i8** %0, i8* %1) {
%3 = tail call i32 @appendStr(i8** %0, i8* %1)
%4 = tail call i32 @free(i8* %1)
ret void
}
void auth_globus_use_delegated_credential(int yesno) {}


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

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

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

LLVM IR (-O2):
define void @auth_globus_use_delegated_credential(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int strlen(char *);
void inputCommandLine(char *buf, int maxLen) {
  memset(buf, 0, maxLen - 1);
  read(0, buf, maxLen);
  buf[strlen(buf) - 1] = 0;
}


x86 assembly (clang, -O0):
<inputCommandLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1040 <memset@plt>
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
xor    %edi,%edi
call   1050 <read@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inputCommandLine>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%r14d
mov    %rdi,%rbx
lea    -0x1(%r14),%edx
xor    %esi,%esi
call   1040 <memset@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1050 <read@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @inputCommandLine(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = call i32 @memset(i8* %5, i32 0, i32 %7)
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
%11 = call i32 @read(i32 0, i8* %9, i32 %10)
%12 = load i8*, i8** %3
%13 = load i8*, i8** %3
%14 = call i32 @strlen(i8* %13)
%15 = sub nsw i32 %14, 1
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %12, i64 %16
store i8 0, i8* %17
ret void
}

LLVM IR (-O2):
define void @inputCommandLine(i8* %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = tail call i32 @memset(i8* %0, i32 0, i32 %3)
%5 = tail call i32 @read(i32 0, i8* %0, i32 %1)
%6 = tail call i32 @strlen(i8* %0)
%7 = add nsw i32 %6, -1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 0, i8* %9
ret void
}
float floatDivide(float a, float b) { return a / b; }


x86 assembly (clang, -O0):
<floatDivide>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floatDivide>:
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @floatDivide(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fdiv float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @floatDivide(float %0, float %1) {
%3 = fdiv float %0, %1
ret float %3
}
OP(dd, cd) {
  illegal_1();
  op_cd();
}


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_cd()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ say(char *, int);
void hit(void) { say("Stupid table!", 1); }


x86 assembly (clang, -O0):
<hit>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
call   1030 <say@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hit>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
jmp    1030 <say@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Stupid table!\00"
define void @hit() {
%1 = call i32 @say(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"Stupid table!\00"
define void @hit() {
%1 = tail call i32 @say(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
long ipow(long n, long p) {
  long ret = 1;
  for (long i = 0; i < p; ++i) {
    ret *= n;
  }
  return ret;
}


x86 assembly (clang, -O0):
<ipow>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1148 <ipow+0x48>
mov    -0x8(%rbp),%rax
imul   -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    111c <ipow+0x1c>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipow>:
test   %rsi,%rsi
jle    111b <ipow+0x1b>
lea    -0x1(%rsi),%rax
mov    %esi,%ecx
and    $0x7,%ecx
cmp    $0x7,%rax
jae    1121 <ipow+0x21>
mov    $0x1,%eax
jmp    1156 <ipow+0x56>
mov    $0x1,%eax
ret
and    $0xfffffffffffffff8,%rsi
mov    $0x1,%eax
nopw   0x0(%rax,%rax,1)
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
imul   %rdi,%rax
add    $0xfffffffffffffff8,%rsi
jne    1130 <ipow+0x30>
test   %rcx,%rcx
je     116a <ipow+0x6a>
nopl   0x0(%rax,%rax,1)
imul   %rdi,%rax
add    $0xffffffffffffffff,%rcx
jne    1160 <ipow+0x60>
ret

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

LLVM IR (-O2):
define i64 @ipow(i64 %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
br i1 %3, label %4, label %20
4: ; preds = %2
%5 = add i64 %1, -1
%6 = and i64 %1, 7
%7 = icmp ult i64 %5, 7
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = and i64 %1, -8
br label %22
10: ; preds = %22, %4
%11 = phi i64 [ undef, %4 ], [ %32, %22 ]
%12 = phi i64 [ 1, %4 ], [ %32, %22 ]
%13 = icmp eq i64 %6, 0
br i1 %13, label %20, label %14
14: ; preds = %10, %14
%15 = phi i64 [ %17, %14 ], [ %12, %10 ]
%16 = phi i64 [ %18, %14 ], [ 0, %10 ]
%17 = mul nsw i64 %15, %0
%18 = add i64 %16, 1
%19 = icmp eq i64 %18, %6
br i1 %19, label %20, label %14
20: ; preds = %10, %14, %2
%21 = phi i64 [ 1, %2 ], [ %11, %10 ], [ %17, %14 ]
ret i64 %21
22: ; preds = %22, %8
%23 = phi i64 [ 1, %8 ], [ %32, %22 ]
%24 = phi i64 [ 0, %8 ], [ %33, %22 ]
%25 = mul nsw i64 %23, %0
%26 = mul nsw i64 %25, %0
%27 = mul nsw i64 %26, %0
%28 = mul nsw i64 %27, %0
%29 = mul nsw i64 %28, %0
%30 = mul nsw i64 %29, %0
%31 = mul nsw i64 %30, %0
%32 = mul nsw i64 %31, %0
%33 = add i64 %24, 8
%34 = icmp eq i64 %33, %9
br i1 %34, label %10, label %22
}
int b6b_threaded(struct b6b_interp *interp) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.b6b_interp = type opaque
define i32 @b6b_threaded(%struct.b6b_interp* nocapture readnone %0) {
ret i32 0
}
double ls_costN_nm9_sign(double x) { return x < 0 ? -1 : x > 0 ? 1 : x; }


x86 assembly (clang, -O0):
<ls_costN_nm9_sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1129 <ls_costN_nm9_sign+0x29>
movsd  0xee9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1161 <ls_costN_nm9_sign+0x61>
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    114d <ls_costN_nm9_sign+0x4d>
movsd  0xebd(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1157 <ls_costN_nm9_sign+0x57>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_costN_nm9_sign>:
xorpd  %xmm1,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
movsd  0xeeb(%rip),%xmm3
andpd  %xmm2,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
cmpltsd %xmm1,%xmm0
movapd %xmm0,%xmm1
andnpd %xmm2,%xmm1
movsd  0xed2(%rip),%xmm2
andpd  %xmm2,%xmm0
orpd   %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @ls_costN_nm9_sign(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %6
5: ; preds = %1
br label %14
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp ogt double %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %6
br label %12
10: ; preds = %6
%11 = load double, double* %2
br label %12
12: ; preds = %10, %9
%13 = phi double [ 1.000000e+00, %9 ], [ %11, %10 ]
br label %14
14: ; preds = %12, %5
%15 = phi double [ -1.000000e+00, %5 ], [ %13, %12 ]
ret double %15
}

LLVM IR (-O2):
define double @ls_costN_nm9_sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fcmp ogt double %0, 0.000000e+00
%4 = select i1 %3, double 1.000000e+00, double %0
%5 = select i1 %2, double -1.000000e+00, double %4
ret double %5
}
/* Variables and functions */
int slowRangeBitwiseAnd(int, int);
int slow(int m, int n) { return slowRangeBitwiseAnd(m, n); }


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

x86 assembly (clang, -O2):
<slow>:
jmp    1030 <slowRangeBitwiseAnd@plt>

LLVM IR (-O0):
define i32 @slow(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 = call i32 @slowRangeBitwiseAnd(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @slow(i32 %0, i32 %1) {
%3 = tail call i32 @slowRangeBitwiseAnd(i32 %0, i32 %1)
ret i32 %3
}
void sysfs_remove_bin_file(struct kobject *kobj, struct bin_attribute *attr) {
  return;
}


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

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

LLVM IR (-O0):
%struct.kobject = type opaque
%struct.bin_attribute = type opaque
define void @sysfs_remove_bin_file(%struct.kobject* %0, %struct.bin_attribute* %1) {
%3 = alloca %struct.kobject*
%4 = alloca %struct.bin_attribute*
store %struct.kobject* %0, %struct.kobject** %3
store %struct.bin_attribute* %1, %struct.bin_attribute** %4
ret void
}

LLVM IR (-O2):
%struct.kobject = type opaque
%struct.bin_attribute = type opaque
define void @sysfs_remove_bin_file(%struct.kobject* nocapture %0, %struct.bin_attribute* nocapture %1) {
ret void
}
void fail(void) {}


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

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

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

LLVM IR (-O2):
define void @fail() {
ret void
}
void t6() {
  int array[1] = {0};
  signed char sudirript = 0;
  int val = array[sudirript];
}


x86 assembly (clang, -O0):
<t6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
movb   $0x0,-0x5(%rbp)
movsbq -0x5(%rbp),%rax
mov    -0x4(%rbp,%rax,4),%eax
mov    %eax,-0xc(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @t6() {
ret void
}
unsigned xrop3_101_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~T;
  stk2 = S | stk3;
  stk1 = D ^ stk2;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_101_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i32 %6, -1
%8 = or i32 %4, %7
%9 = xor i32 %8, 255
%10 = or i32 %6, %4
%11 = xor i32 %10, -1
%12 = and i32 %9, %11
%13 = or i8 %1, %0
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
ret i32 %15
}
/* Type definitions */
typedef int uint64_t;
typedef int uint32_t;

/* Variables and functions */
uint64_t _wymix32(uint64_t A) { return A ^ ((A >> 32) * (uint32_t)A); }


x86 assembly (clang, -O0):
<_wymix32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sar    %cl,%edx
mov    %edx,%ecx
imul   -0x4(%rbp),%ecx
xor    %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_wymix32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 32
%6 = load i32, i32* %2
%7 = mul nsw i32 %5, %6
%8 = xor i32 %3, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @_wymix32(i32 %0) {
ret i32 poison
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(void *, void const *);
int strlen(char *);
void copierCharE(const void *valeur, void **lieu) {
  (*lieu) = (char *)malloc((sizeof(char)) * (strlen((char *)valeur) + 1));
  strcpy((*lieu), valeur);
}


x86 assembly (clang, -O0):
<copierCharE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copierCharE>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,(%r14)
mov    %rax,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define void @copierCharE(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i8*, i8** %3
%6 = call i32 @strlen(i8* %5)
%7 = add nsw i32 %6, 1
%8 = sext i32 %7 to i64
%9 = mul i64 1, %8
%10 = trunc i64 %9 to i32
%11 = call i64 @malloc(i32 %10)
%12 = inttoptr i64 %11 to i8*
%13 = load i8**, i8*** %4
store i8* %12, i8** %13
%14 = load i8**, i8*** %4
%15 = load i8*, i8** %14
%16 = load i8*, i8** %3
%17 = call i32 @strcpy(i8* %15, i8* %16)
ret void
}

LLVM IR (-O2):
define void @copierCharE(i8* %0, i8** nocapture writeonly %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = add nsw i32 %3, 1
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %1
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
ret void
}
min(v1, v2) int v1;
int v2;
{ return ((v1 < v2) ? v1 : v2); }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1121 <min+0x21>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1127 <min+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovl  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
scalar_t__ COND_VS();
int /*<<< orphan*/ EA_AY_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_svs_8_pd(void) {
  m68ki_write_8(EA_AY_PD_8(), COND_VS() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_svs_8_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_VS@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_svs_8_pd>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_VS@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_svs_8_pd() {
%1 = call i32 (...) @EA_AY_PD_8()
%2 = call i64 (...) @COND_VS()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_svs_8_pd() {
%1 = tail call i32 (...) @EA_AY_PD_8()
%2 = tail call i64 (...) @COND_VS()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
void __attribute__((no)) HEX00_parseutilsInit(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @HEX00_parseutilsInit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mmapcall();
int main(void) {
  int i = 0;
  while (i < 1) {
    mmapcall();
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1145 <main+0x35>
mov    $0x0,%al
call   1030 <mmapcall@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = call i32 (...) @mmapcall()
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @mmapcall()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ efp_set_log_cb(void (*)(char const *));
void efp_set_error_log(void (*cb)(const char *)) { efp_set_log_cb(cb); }


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

x86 assembly (clang, -O2):
<efp_set_error_log>:
jmp    1030 <efp_set_log_cb@plt>

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

LLVM IR (-O2):
define void @efp_set_error_log(void (i8*)* %0) {
%2 = tail call i32 @efp_set_log_cb(void (i8*)* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int main() {
  FILE *file = fopen("/home/transvaal/Documents/Ctest1.txt", "w");
  fputs("Programming is really fun.", file);
  fclose(file);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    0xed8(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xec6(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xee6(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xed9(%rip),%rdi
mov    $0x1a,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
call   1030 <fclose@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"/home/transvaal/Documents/Ctest1.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [27 x i8] c"Programming is really fun.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @fopen(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @fputs(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @fclose(i32* %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"/home/transvaal/Documents/Ctest1.txt\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [27 x i8] c"Programming is really fun.\00"
define i32 @main() {
%1 = tail call i32* @fopen(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.2, i64 0, i64 0), i64 26, i64 1, i32* %1)
%3 = tail call i32 @fclose(i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ I2C0_DriverIRQHandler();
__attribute__((weak)) void I2C0_IRQHandler(void) { I2C0_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @I2C0_IRQHandler() {
%1 = call i32 (...) @I2C0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @I2C0_IRQHandler() {
%1 = tail call i32 (...) @I2C0_DriverIRQHandler()
ret void
}
/* Type definitions */
struct mempool {
  int dummy;
};

/* Variables and functions */
void *mp_start_fast(struct mempool *, unsigned int);
void *mp_start(struct mempool *pool, unsigned size) {
  return mp_start_fast(pool, size);
}


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

x86 assembly (clang, -O2):
<mp_start>:
jmp    1030 <mp_start_fast@plt>

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

LLVM IR (-O2):
%struct.mempool = type { i32 }
define i8* @mp_start(%struct.mempool* %0, i32 %1) {
%3 = tail call i8* @mp_start_fast(%struct.mempool* %0, i32 %1)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ fmaxf(int /*<<< orphan*/, float const);
int /*<<< orphan*/ fminf(float, float const);
int /*<<< orphan*/ roundf(int /*<<< orphan*/);
int32_t clamp24_from_float(float f) {
  static const float scale = 1 << 23;
  return roundf(fmaxf(fminf(f * scale, scale - 1.f), -scale));
}


x86 assembly (clang, -O0):
<clamp24_from_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xec3(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  0xeb2(%rip),%xmm1
call   1030 <fminf@plt>
mov    %eax,%edi
movss  0xe9f(%rip),%xmm0
call   1040 <fmaxf@plt>
mov    %eax,%edi
call   1050 <roundf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp24_from_float>:
push   %rax
mulss  0xec7(%rip),%xmm0
movss  0xec3(%rip),%xmm1
call   1030 <fminf@plt>
movss  0xeba(%rip),%xmm0
mov    %eax,%edi
call   1040 <fmaxf@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <roundf@plt>

LLVM IR (-O0):
@clamp24_from_float.scale = internal constant float 0x4160000000000000
define i32 @clamp24_from_float(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x4160000000000000
%5 = call i32 @fminf(float %4, float 0x415FFFFFC0000000)
%6 = call i32 @fmaxf(i32 %5, float 0xC160000000000000)
%7 = call i32 @roundf(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @clamp24_from_float(float %0) {
%2 = fmul float %0, 0x4160000000000000
%3 = tail call i32 @fminf(float %2, float 0x415FFFFFC0000000)
%4 = tail call i32 @fmaxf(i32 %3, float 0xC160000000000000)
%5 = tail call i32 @roundf(i32 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_sys_cfg_frag_threshold_usage(void) {
  printf("\nUsage : sys_cfg_frag_threshold [FRAG_THRESHOLD]\n");
  printf("\nIf FRAG_THRESHOLD is provided, a 'set' is performed, else a 'get' "
         "is performed.");
  printf("\nFragment threshold should between 256 and 2346.\n");
  return;
}


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

x86 assembly (clang, -O2):
<print_sys_cfg_frag_threshold_usage>:
push   %rax
lea    0xf29(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <printf@plt>
lea    0xf42(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [50 x i8] c"\0AUsage : sys_cfg_frag_threshold [FRAG_THRESHOLD]\0A\00"
@.str.1 = [81 x i8] c"\0AIf FRAG_THRESHOLD is provided, a 'set' is performed, else a 'get' is performed.\00"
@.str.2 = [50 x i8] c"\0AFragment threshold should between 256 and 2346.\0A\00"
define void @print_sys_cfg_frag_threshold_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [81 x i8] c"\0AIf FRAG_THRESHOLD is provided, a 'set' is performed, else a 'get' is performed.\00"
@str = [49 x i8] c"\0AUsage : sys_cfg_frag_threshold [FRAG_THRESHOLD]\00"
@str.3 = [49 x i8] c"\0AFragment threshold should between 256 and 2346.\00"
define void @print_sys_cfg_frag_threshold_usage() {
%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 @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ btesh2_gfxcon_scrollDown();
int btesh2_gfxcon_scrollDownN(int n) {
  while ((n--) > 0)
    btesh2_gfxcon_scrollDown();
  return (0);
}


x86 assembly (clang, -O0):
<btesh2_gfxcon_scrollDownN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x4(%rbp)
cmp    $0x0,%eax
jle    113b <btesh2_gfxcon_scrollDownN+0x2b>
mov    $0x0,%al
call   1030 <btesh2_gfxcon_scrollDown@plt>
jmp    111b <btesh2_gfxcon_scrollDownN+0xb>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<btesh2_gfxcon_scrollDownN>:
push   %rbx
test   %edi,%edi
jle    112f <btesh2_gfxcon_scrollDownN+0x1f>
mov    %edi,%ebx
add    $0x1,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <btesh2_gfxcon_scrollDown@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1120 <btesh2_gfxcon_scrollDownN+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @btesh2_gfxcon_scrollDownN(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
store i32 %5, i32* %2
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 (...) @btesh2_gfxcon_scrollDown()
br label %3
9: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @btesh2_gfxcon_scrollDownN(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %8
3: ; preds = %1, %3
%4 = phi i32 [ %5, %3 ], [ %0, %1 ]
%5 = add nsw i32 %4, -1
%6 = tail call i32 (...) @btesh2_gfxcon_scrollDown()
%7 = icmp ugt i32 %4, 1
br i1 %7, label %3, label %8
8: ; preds = %3, %1
ret i32 0
}
void hwfunctions_nop() { asm volatile("nop"); }


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

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

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

LLVM IR (-O2):
define void @hwfunctions_nop() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void scaler_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<scaler_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @scaler_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int g(void *a) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @g(i8* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ DisplayUsage();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void DisplayInvalidParameter(char *param) {
  fprintf(stderr, "extract_region: Parameter %s is invalid.\n", param);
  DisplayUsage();
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [42 x i8] c"extract_region: Parameter %s is invalid.\0A\00"
define void @DisplayInvalidParameter(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @DisplayUsage()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [42 x i8] c"extract_region: Parameter %s is invalid.\0A\00"
define void @DisplayInvalidParameter(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @DisplayUsage()
ret void
}
/* Variables and functions */
int wycc_type_flags(int);
int wycc_type_is_map(int id) {
  int flgs = wycc_type_flags(id);
  if (flgs & 64) {
    return 1;
  };
  return 0;
}


x86 assembly (clang, -O0):
<wycc_type_is_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <wycc_type_flags@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1141 <wycc_type_is_map+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <wycc_type_is_map+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wycc_type_is_map>:
push   %rax
call   1030 <wycc_type_flags@plt>
shr    $0x6,%eax
and    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @wycc_type_is_map(i32 %0) {
%2 = tail call i32 @wycc_type_flags(i32 %0)
%3 = lshr i32 %2, 6
%4 = and i32 %3, 1
ret i32 %4
}
/* Variables and functions */
float __infer_nondet_float();
float fabsf(float x) { return __infer_nondet_float(); }


x86 assembly (clang, -O0):
<fabsf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_float@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define float @fabsf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = call float (...) @__infer_nondet_float()
ret float %3
}

LLVM IR (-O2):
define float @fabsf(float %0) {
%2 = tail call float (...) @__infer_nondet_float()
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ extern_func1_13(int, char *, unsigned long);
void extern_func1_12(int a, char *b, unsigned long c) {
  extern_func1_13(a, b, c);
}


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

x86 assembly (clang, -O2):
<extern_func1_12>:
jmp    1030 <extern_func1_13@plt>

LLVM IR (-O0):
define void @extern_func1_12(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @extern_func1_13(i32 %7, i8* %8, i64 %9)
ret void
}

LLVM IR (-O2):
define void @extern_func1_12(i32 %0, i8* %1, i64 %2) {
%4 = tail call i32 @extern_func1_13(i32 %0, i8* %1, i64 %2)
ret void
}
int _leq(int x, int y, void *garb) { return x <= y; }


x86 assembly (clang, -O0):
<_leq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_leq(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
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = icmp sle i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @_leq(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = icmp sle i32 %0, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ modf(double, double *);
double rand();
int main(int argc, char **argv) {
  double x = 42.7;
  double y = rand();
  modf(x, &y);
  return y;
}


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)
movsd  0xec2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1040 <rand@plt>
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    -0x20(%rbp),%rdi
call   1030 <modf@plt>
cvttsd2si -0x20(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <rand@plt>
movsd  %xmm0,(%rsp)
movsd  0xecb(%rip),%xmm0
mov    %rsp,%rdi
call   1030 <modf@plt>
cvttsd2si (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 4.270000e+01, double* %6
%8 = call double (...) @rand()
store double %8, double* %7
%9 = load double, double* %6
%10 = call i32 @modf(double %9, double* %7)
%11 = load double, double* %7
%12 = fptosi double %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca double
%4 = bitcast double* %3 to i8*
%5 = tail call double (...) @rand()
store double %5, double* %3
%6 = call i32 @modf(double 4.270000e+01, double* %3)
%7 = load double, double* %3
%8 = fptosi double %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ test2(int, int, double, long, char, char *, int, int, int);
int main() { test2(-1, 1, 2.3, 3L, 'a', "asdf", 123, 3242, -5); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xffffffff,%edi
mov    $0x1,%esi
movsd  0xed6(%rip),%xmm0
mov    $0x3,%edx
mov    $0x61,%ecx
lea    0xecd(%rip),%r8
mov    $0x7b,%r9d
movl   $0xcaa,(%rsp)
movl   $0xfffffffb,0x8(%rsp)
ff
call   1030 <test2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%r8
movsd  0xee0(%rip),%xmm0
mov    $0x3,%edx
mov    $0xffffffff,%edi
mov    $0x1,%esi
mov    $0x61,%ecx
mov    $0x7b,%r9d
push   $0xfffffffffffffffb
push   $0xcaa
call   1030 <test2@plt>
add    $0x10,%rsp
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = call i32 @test2(i32 -1, i32 1, double 2.300000e+00, i64 3, i8 signext 97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 123, i32 3242, i32 -5)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"asdf\00"
define i32 @main() {
%1 = tail call i32 @test2(i32 -1, i32 1, double 2.300000e+00, i64 3, i8 signext 97, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 123, i32 3242, i32 -5)
ret i32 0
}