xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ TRUE;
int /*<<< orphan*/ cbreak();
int /*<<< orphan*/ initscr();
int /*<<< orphan*/ keypad(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ noecho();
int /*<<< orphan*/ refresh();
int /*<<< orphan*/ stdscr;
void terminal_start() {
  initscr();
  cbreak();
  noecho();
  keypad(stdscr, TRUE);
  refresh();
}


x86 assembly (clang, -O0):
<terminal_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <initscr@plt>
mov    $0x0,%al
call   1030 <cbreak@plt>
mov    $0x0,%al
call   1070 <noecho@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
mov    0x2e67(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<terminal_start>:
push   %rax
xor    %eax,%eax
call   1050 <initscr@plt>
xor    %eax,%eax
call   1030 <cbreak@plt>
xor    %eax,%eax
call   1070 <noecho@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
mov    0x2e6a(%rip),%rax
mov    (%rax),%esi
call   1040 <keypad@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <refresh@plt>

LLVM IR (-O0):
@stdscr = global i32 0
@TRUE = global i32 0
define void @terminal_start() {
%1 = call i32 (...) @initscr()
%2 = call i32 (...) @cbreak()
%3 = call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = call i32 @keypad(i32 %4, i32 %5)
%7 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@stdscr = global i32 0
@TRUE = global i32 0
define void @terminal_start() {
%1 = tail call i32 (...) @initscr()
%2 = tail call i32 (...) @cbreak()
%3 = tail call i32 (...) @noecho()
%4 = load i32, i32* @stdscr
%5 = load i32, i32* @TRUE
%6 = tail call i32 @keypad(i32 %4, i32 %5)
%7 = tail call i32 (...) @refresh()
ret void
}
int put_int32(unsigned char *p, const unsigned int q) {
  *p++ = (q >> 24) & 0xFF;
  *p++ = (q >> 16) & 0xFF;
  *p++ = (q >> 8) & 0xFF;
  *p++ = (q >> 0) & 0xFF;
  return 4;
}


x86 assembly (clang, -O0):
<put_int32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
shr    $0x0,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
mov    $0x4,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<put_int32>:
bswap  %esi
mov    %esi,(%rdi)
mov    $0x4,%eax
ret

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

LLVM IR (-O2):
define i32 @put_int32(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = trunc i32 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %4, i8* %0
%6 = lshr i32 %1, 16
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %5
%9 = lshr i32 %1, 8
%10 = trunc i32 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %10, i8* %8
%12 = trunc i32 %1 to i8
store i8 %12, i8* %11
ret i32 4
}
int h(int x) {
  do {
    x++;
  } while (x < 100);
  return x;
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x64,-0x4(%rbp)
jl     1107 <h+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
cmp    $0x64,%edi
mov    $0x63,%eax
cmovge %edi,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @h(i32 %0) {
%2 = call i32 @llvm.smax.i32(i32 %0, i32 99)
%3 = add nuw i32 %2, 1
ret i32 %3
}
long __VERIFIER_nondet_long() { return 0; }


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

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

LLVM IR (-O0):
define i64 @__VERIFIER_nondet_long() {
ret i64 0
}

LLVM IR (-O2):
define i64 @__VERIFIER_nondet_long() {
ret i64 0
}
unsigned umin(const unsigned a, const unsigned b) { return a < b ? a : b; }


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

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

LLVM IR (-O0):
define i32 @umin(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 ult 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 @umin(i32 %0, i32 %1) {
%3 = icmp ult i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
int param__is_list_opening_char(char c) { return (c == '['); }


x86 assembly (clang, -O0):
<param__is_list_opening_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x5b,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<param__is_list_opening_char>:
xor    %eax,%eax
cmp    $0x5b,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @param__is_list_opening_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 91
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @param__is_list_opening_char(i8 signext %0) {
%2 = icmp eq i8 %0, 91
%3 = zext i1 %2 to i32
ret i32 %3
}
void MT_trace_preempt_on(void) {}


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

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

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

LLVM IR (-O2):
define void @MT_trace_preempt_on() {
ret void
}
void sc_maybe_aa_change_hat(struct sc_apparmor *apparmor,
                            const char *subprofile, unsigned long magic_token) {
}


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

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

LLVM IR (-O0):
%struct.sc_apparmor = type opaque
define void @sc_maybe_aa_change_hat(%struct.sc_apparmor* %0, i8* %1, i64 %2) {
%4 = alloca %struct.sc_apparmor*
%5 = alloca i8*
%6 = alloca i64
store %struct.sc_apparmor* %0, %struct.sc_apparmor** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
ret void
}

LLVM IR (-O2):
%struct.sc_apparmor = type opaque
define void @sc_maybe_aa_change_hat(%struct.sc_apparmor* nocapture %0, i8* nocapture %1, i64 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void ctest1(int *a) {
  printf("CRACKED: \"a\" value is:%d\n", *a);
  *a = 666;
}


x86 assembly (clang, -O0):
<ctest1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
movl   $0x29a,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ctest1>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
movl   $0x29a,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"CRACKED: \22a\22 value is:%d\0A\00"
define void @ctest1(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i32*, i32** %2
store i32 666, i32* %6
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"CRACKED: \22a\22 value is:%d\0A\00"
define void @ctest1(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i32 %2)
store i32 666, i32* %0
ret void
}
const char *spu_arch_string(void) { return "spu"; }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"spu\00"
define i8* @spu_arch_string() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"spu\00"
define i8* @spu_arch_string() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
int fun(int n) {
  int num = 1, sum = 0;
  for (; n; n = n / 6, num = num * 10)
    sum = sum + num * (n % 6);
  return sum;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1158 <fun+0x58>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
mov    $0x6,%esi
cltd
idiv   %esi
mov    -0x10(%rbp),%eax
imul   %edx,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
imul   $0xa,-0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <fun+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
test   %edi,%edi
je     1146 <fun+0x46>
mov    $0x1,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
movslq %edi,%rdx
imul   $0x2aaaaaab,%rdx,%rdi
mov    %rdi,%rsi
shr    $0x3f,%rsi
shr    $0x20,%rdi
add    %esi,%edi
lea    (%rdi,%rdi,1),%esi
lea    (%rsi,%rsi,2),%r8d
mov    %edx,%esi
sub    %r8d,%esi
imul   %ecx,%esi
add    %esi,%eax
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
add    $0x5,%edx
cmp    $0xa,%edx
ja     1110 <fun+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @fun(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %14, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %9, %3 ], [ 0, %1 ]
%5 = phi i32 [ %11, %3 ], [ 1, %1 ]
%6 = phi i32 [ %10, %3 ], [ %0, %1 ]
%7 = srem i32 %6, 6
%8 = mul nsw i32 %5, %7
%9 = add nsw i32 %4, %8
%10 = sdiv i32 %6, 6
%11 = mul nsw i32 %5, 10
%12 = add i32 %6, 5
%13 = icmp ult i32 %12, 11
br i1 %13, label %14, label %3
14: ; preds = %3, %1
%15 = phi i32 [ 0, %1 ], [ %9, %3 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ free(unsigned char *);
void mac_destroy(unsigned char *digest) { free(digest); }


x86 assembly (clang, -O0):
<mac_destroy>:
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):
<mac_destroy>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @mac_destroy(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 @mac_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
float const simplexRawNoise(float const, float const, float const, float const);
float simplexScaledRawNoise(const float loBound, const float hiBound,
                            const float x, const float y, const float z,
                            const float w) {
  return simplexRawNoise(x, y, z, w) * (hiBound - loBound) / 2 +
         (hiBound + loBound) / 2;
}


x86 assembly (clang, -O0):
<simplexScaledRawNoise>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  %xmm5,-0x18(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm3
call   1030 <simplexRawNoise@plt>
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
movss  0xe9b(%rip),%xmm1
divss  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
addss  -0x4(%rbp),%xmm1
movss  0xe85(%rip),%xmm2
divss  %xmm2,%xmm1
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<simplexScaledRawNoise>:
push   %rax
movss  %xmm1,(%rsp)
movss  %xmm0,0x4(%rsp)
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
movaps %xmm4,%xmm2
movaps %xmm5,%xmm3
call   1030 <simplexRawNoise@plt>
movss  (%rsp),%xmm3
movaps %xmm3,%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  0xeb5(%rip),%xmm1
mulss  %xmm1,%xmm0
addss  %xmm3,%xmm2
mulss  %xmm1,%xmm2
addss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @simplexScaledRawNoise(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store float %0, float* %7
store float %1, float* %8
store float %2, float* %9
store float %3, float* %10
store float %4, float* %11
store float %5, float* %12
%13 = load float, float* %9
%14 = load float, float* %10
%15 = load float, float* %11
%16 = load float, float* %12
%17 = call float @simplexRawNoise(float %13, float %14, float %15, float %16)
%18 = load float, float* %8
%19 = load float, float* %7
%20 = fsub float %18, %19
%21 = fmul float %17, %20
%22 = fdiv float %21, 2.000000e+00
%23 = load float, float* %8
%24 = load float, float* %7
%25 = fadd float %23, %24
%26 = fdiv float %25, 2.000000e+00
%27 = fadd float %22, %26
ret float %27
}

LLVM IR (-O2):
define float @simplexScaledRawNoise(float %0, float %1, float %2, float %3, float %4, float %5) {
%7 = tail call float @simplexRawNoise(float %2, float %3, float %4, float %5)
%8 = fsub float %1, %0
%9 = fmul float %8, %7
%10 = fmul float %9, 5.000000e-01
%11 = fadd float %0, %1
%12 = fmul float %11, 5.000000e-01
%13 = fadd float %12, %10
ret float %13
}
/* Variables and functions */
int /*<<< orphan*/ nrf_802154_pib_pan_coord_set(int);
void nrf_802154_pan_coord_set(bool enabled) {
  nrf_802154_pib_pan_coord_set(enabled);
}


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

x86 assembly (clang, -O2):
<nrf_802154_pan_coord_set>:
jmp    1030 <nrf_802154_pib_pan_coord_set@plt>

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

LLVM IR (-O2):
define void @nrf_802154_pan_coord_set(i32 %0) {
%2 = tail call i32 @nrf_802154_pib_pan_coord_set(i32 %0)
ret void
}
void LED(unsigned char nr, unsigned char onoff) {
  if (nr >= 2)
    return;
  if (onoff == 0) {
    (*(volatile unsigned long *)(0xE0028000 + 0x14)) = (1 << (24 + nr));
  } else {
    (*(volatile unsigned long *)(0xE0028000 + 0x1C)) = (1 << (24 + nr));
  }
}


x86 assembly (clang, -O0):
<LED>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x2,%eax
jl     1122 <LED+0x22>
jmp    1166 <LED+0x66>
movzbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    114d <LED+0x4d>
movzbl -0x1(%rbp),%ecx
add    $0x18,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0xe0028014,%eax
mov    %rcx,(%rax)
jmp    1166 <LED+0x66>
movzbl -0x1(%rbp),%ecx
add    $0x18,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    $0xe002801c,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<LED>:
cmp    $0x1,%dil
ja     1122 <LED+0x22>
mov    $0x1000000,%eax
mov    %edi,%ecx
shl    %cl,%eax
mov    $0xe0028014,%ecx
lea    0x8(%rcx),%rdx
test   %sil,%sil
cmove  %rcx,%rdx
mov    %rax,(%rdx)
ret

LLVM IR (-O0):
define void @LED(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = icmp sge i32 %6, 2
br i1 %7, label %8, label %9
8: ; preds = %2
br label %25
9: ; preds = %2
%10 = load i8, i8* %4
%11 = zext i8 %10 to i32
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %9
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = add nsw i32 24, %15
%17 = shl i32 1, %16
%18 = sext i32 %17 to i64
store volatile i64 %18, i64* inttoptr (i64 3758260244 to i64*)
br label %25
19: ; preds = %9
%20 = load i8, i8* %3
%21 = zext i8 %20 to i32
%22 = add nsw i32 24, %21
%23 = shl i32 1, %22
%24 = sext i32 %23 to i64
store volatile i64 %24, i64* inttoptr (i64 3758260252 to i64*)
br label %25
25: ; preds = %8, %19, %13
ret void
}

LLVM IR (-O2):
define void @LED(i8 zeroext %0, i8 zeroext %1) {
%3 = icmp ugt i8 %0, 1
br i1 %3, label %10, label %4
4: ; preds = %2
%5 = zext i8 %0 to i32
%6 = icmp eq i8 %1, 0
%7 = shl i32 16777216, %5
%8 = zext i32 %7 to i64
%9 = select i1 %6, i64* inttoptr (i64 3758260244 to i64*), i64* inttoptr (i64 3758260252 to i64*)
store volatile i64 %8, i64* %9
br label %10
10: ; preds = %4, %2
ret void
}
int egsy_egebuf_csr_debug_set(unsigned int dev_id,
                              union egsy_egebuf_csr_debug_u *value) {
  return 1;
}


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

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

LLVM IR (-O0):
%union.egsy_egebuf_csr_debug_u = type opaque
define i32 @egsy_egebuf_csr_debug_set(i32 %0, %union.egsy_egebuf_csr_debug_u* %1) {
%3 = alloca i32
%4 = alloca %union.egsy_egebuf_csr_debug_u*
store i32 %0, i32* %3
store %union.egsy_egebuf_csr_debug_u* %1, %union.egsy_egebuf_csr_debug_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.egsy_egebuf_csr_debug_u = type opaque
define i32 @egsy_egebuf_csr_debug_set(i32 %0, %union.egsy_egebuf_csr_debug_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int copy_dobldobl_start_solutions_to_container(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(257, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<copy_dobldobl_start_solutions_to_container>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x101,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_dobldobl_start_solutions_to_container>:
mov    $0x101,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @copy_dobldobl_start_solutions_to_container() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc4c(i32 257, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @copy_dobldobl_start_solutions_to_container() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 257, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
unsigned int _check_times(unsigned x, unsigned y) {
  unsigned long long whole_ans =
      ((unsigned long long)x) * ((unsigned long long)y);
  unsigned word_ans = (unsigned)whole_ans;
  if (word_ans < whole_ans || word_ans > (1 << 28))
    (_throw_badalloc_fn("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/"
                        "cyclone/refs/heads/master/bin/genfiles/core.c",
                        284));
  return word_ans;
}


x86 assembly (clang, -O0):
<_check_times>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
imul   %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%rax
jb     114d <_check_times+0x3d>
cmpl   $0x10000000,-0x14(%rbp)
jbe    1160 <_check_times+0x50>
lea    0xeac(%rip),%rdi
mov    $0x11c,%esi
mov    $0x0,%al
call   1030 <_throw_badalloc_fn@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_check_times>:
push   %rbx
mov    %edi,%eax
mul    %esi
mov    %eax,%ebx
jo     1121 <_check_times+0x11>
cmp    $0x10000001,%ebx
jb     1134 <_check_times+0x24>
lea    0xed8(%rip),%rdi
mov    $0x11c,%esi
xor    %eax,%eax
call   1030 <_throw_badalloc_fn@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/core.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = zext i32 %7 to i64
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
%11 = mul i64 %8, %10
store i64 %11, i64* %5
%12 = load i64, i64* %5
%13 = trunc i64 %12 to i32
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = zext i32 %14 to i64
%16 = load i64, i64* %5
%17 = icmp ult i64 %15, %16
br i1 %17, label %21, label %18
18: ; preds = %2
%19 = load i32, i32* %6
%20 = icmp ugt i32 %19, 268435456
br i1 %20, label %21, label %23
21: ; preds = %18, %2
%22 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 284)
br label %23
23: ; preds = %21, %18
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
@.str = [145 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/FauxFaux/cyclone/refs/heads/master/bin/genfiles/core.c\00"
define i32 @_check_times(i32 %0, i32 %1) {
%3 = tail call { i32, i1 } @llvm.umul.with.overflow.i32(i32 %0, i32 %1)
%4 = extractvalue { i32, i1 } %3, 0
%5 = extractvalue { i32, i1 } %3, 1
%6 = icmp ugt i32 %4, 268435456
%7 = or i1 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @_throw_badalloc_fn to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([145 x i8], [145 x i8]* @.str, i64 0, i64 0), i32 284)
br label %10
10: ; preds = %2, %8
ret i32 %4
}
/* Variables and functions */
int isspace(int);
int SDL_isspace(int x) { return isspace(x); }


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

x86 assembly (clang, -O2):
<SDL_isspace>:
jmp    1030 <isspace@plt>

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

LLVM IR (-O2):
define i32 @SDL_isspace(i32 %0) {
%2 = tail call i32 @isspace(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ test(int);
void testInit() {
  int a = 10;
  int *p = &a;
  test(*p == 10);
}


x86 assembly (clang, -O0):
<testInit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xa,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0xa,(%rax)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <test@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testInit() {
%1 = alloca i32
%2 = alloca i32*
store i32 10, i32* %1
store i32* %1, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 10
%6 = zext i1 %5 to i32
%7 = call i32 @test(i32 %6)
ret void
}

LLVM IR (-O2):
define void @testInit() {
%1 = tail call i32 @test(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, unsigned int);
void ASRT_PrintFailUInt(unsigned int expected, unsigned int actual) {
  printf("\n  Expected: %u, Actual: %u", expected, actual);
}


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

x86 assembly (clang, -O2):
<ASRT_PrintFailUInt>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\0A Expected: %u, Actual: %u\00"
define void @ASRT_PrintFailUInt(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 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"\0A Expected: %u, Actual: %u\00"
define void @ASRT_PrintFailUInt(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setCursorPosition_24064(int, int);
void setCursorPosition(int row, int col) { setCursorPosition_24064(row, col); }


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

x86 assembly (clang, -O2):
<setCursorPosition>:
jmp    1030 <setCursorPosition_24064@plt>

LLVM IR (-O0):
define void @setCursorPosition(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 @setCursorPosition_24064(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @setCursorPosition(i32 %0, i32 %1) {
%3 = tail call i32 @setCursorPosition_24064(i32 %0, i32 %1)
ret void
}
void pldecimal(d, digits) unsigned long d;
int digits;
{
  digits--;
  if (d > 9 || digits > 0)
    pldecimal(d / 10, digits);
  putchar('0' + (d % 10));
}


x86 assembly (clang, -O0):
<pldecimal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
cmpq   $0x9,-0x8(%rbp)
ja     114d <pldecimal+0x2d>
cmpl   $0x0,-0xc(%rbp)
jle    1166 <pldecimal+0x46>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,%rdi
mov    -0xc(%rbp),%esi
call   1040 <pldecimal@plt>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
xor    %edx,%edx
div    %rcx
mov    %rdx,%rdi
add    $0x30,%rdi
mov    $0x0,%al
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pldecimal>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
movabs $0xcccccccccccccccd,%r14
cc cc cc
cmp    $0x9,%rdi
ja     113c <pldecimal+0x1c>
cmp    $0x2,%esi
jl     1151 <pldecimal+0x31>
add    $0xffffffff,%esi
mov    %rbx,%rax
mul    %r14
mov    %rdx,%rdi
shr    $0x3,%rdi
call   1040 <pldecimal@plt>
mov    %rbx,%rax
mul    %r14
shr    $0x2,%rdx
and    $0xfffffffffffffffe,%rdx
lea    (%rdx,%rdx,4),%rax
sub    %rax,%rbx
or     $0x30,%rbx
mov    %rbx,%rdi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @pldecimal(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = add nsw i32 %5, -1
store i32 %6, i32* %4
%7 = load i64, i64* %3
%8 = icmp ugt i64 %7, 9
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %9, %2
%13 = load i64, i64* %3
%14 = udiv i64 %13, 10
%15 = load i32, i32* %4
br label %16
16: ; preds = %12, %9
%17 = load i64, i64* %3
%18 = urem i64 %17, 10
%19 = add i64 48, %18
%20 = call i32 (i64, ...) bitcast (i32 (...)* @putchar to i32 (i64, ...)*)(i64 %19)
ret void
}

LLVM IR (-O2):
define void @pldecimal(i64 %0, i32 %1) {
%3 = icmp ugt i64 %0, 9
%4 = icmp sgt i32 %1, 1
%5 = or i1 %3, %4
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = add nsw i32 %1, -1
%8 = udiv i64 %0, 10
tail call void @pldecimal(i64 %8, i32 %7)
br label %9
9: ; preds = %2, %6
%10 = urem i64 %0, 10
%11 = or i64 %10, 48
%12 = tail call i32 (i64, ...) bitcast (i32 (...)* @putchar to i32 (i64, ...)*)(i64 %11)
ret void
}
/* Variables and functions */
char *reallocf(char *, int /*<<< orphan*/);
void test_reallocf(char *ptr) {
  char *foo = reallocf(ptr, 0);
  for (unsigned i = 0; i < 100; i++) {
    foo[i] = 0;
  }
}


x86 assembly (clang, -O0):
<test_reallocf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1030 <reallocf@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jae    1155 <test_reallocf+0x45>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1132 <test_reallocf+0x22>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_reallocf>:
push   %rax
xor    %esi,%esi
call   1030 <reallocf@plt>
xorps  %xmm0,%xmm0
movups %xmm0,(%rax)
movups %xmm0,0x10(%rax)
movups %xmm0,0x20(%rax)
movups %xmm0,0x30(%rax)
movups %xmm0,0x40(%rax)
movups %xmm0,0x50(%rax)
movl   $0x0,0x60(%rax)
pop    %rax
ret

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

LLVM IR (-O2):
define void @test_reallocf(i8* %0) {
%2 = tail call i8* @reallocf(i8* %0, i32 0)
ret void
}
int devInit(int baud) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @devInit(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Inst_Printf(char *, char *);
void Dico_Long_Start(int nb_longs) {
  Inst_Printf(".section", "\".data\"");
  Inst_Printf(".align", "4");
}


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

x86 assembly (clang, -O2):
<Dico_Long_Start>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeea(%rip),%rsi
call   1030 <Inst_Printf@plt>
lea    0xee6(%rip),%rdi
lea    0xee6(%rip),%rsi
pop    %rax
jmp    1030 <Inst_Printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c".section\00"
@.str.1 = [8 x i8] c"\22.data\22\00"
@.str.2 = [7 x i8] c".align\00"
@.str.3 = [2 x i8] c"4\00"
define void @Dico_Long_Start(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @Inst_Printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c".section\00"
@.str.1 = [8 x i8] c"\22.data\22\00"
@.str.2 = [7 x i8] c".align\00"
@.str.3 = [2 x i8] c"4\00"
define void @Dico_Long_Start(i32 %0) {
%2 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @Inst_Printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret void
}
extern void _sbus_writeb(unsigned char val, unsigned long addr) {
  *(volatile unsigned char *)addr = val;
}


x86 assembly (clang, -O0):
<_sbus_writeb>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x1(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_sbus_writeb>:
mov    %dil,(%rsi)
ret

LLVM IR (-O0):
define void @_sbus_writeb(i8 zeroext %0, i64 %1) {
%3 = alloca i8
%4 = alloca i64
store i8 %0, i8* %3
store i64 %1, i64* %4
%5 = load i8, i8* %3
%6 = load i64, i64* %4
%7 = inttoptr i64 %6 to i8*
store volatile i8 %5, i8* %7
ret void
}

LLVM IR (-O2):
define void @_sbus_writeb(i8 zeroext %0, i64 %1) {
%3 = inttoptr i64 %1 to i8*
store volatile i8 %0, i8* %3
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void EPIFIFOConfig(uint32_t ui32Base, uint32_t ui32Config) {
  ;
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000200))) = ui32Config;
}


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

x86 assembly (clang, -O2):
<EPIFIFOConfig>:
mov    %rsi,0x200(%rdi)
ret

LLVM IR (-O0):
define void @EPIFIFOConfig(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i64, i64* %3
%7 = add i64 %6, 512
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @EPIFIFOConfig(i64 %0, i64 %1) {
%3 = add i64 %0, 512
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
int f(long long a) { return a << 30; }


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

x86 assembly (clang, -O2):
<f>:
mov    %rdi,%rax
shl    $0x1e,%eax
ret

LLVM IR (-O0):
define i32 @f(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 30
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @f(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = shl i32 %2, 30
ret i32 %3
}
int tem_repeticao(int *v, int n, int numero_gerado) {
  int i = 0;
  for (i = 0; i < n; ++i) {
    if (v[i] == numero_gerado) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<tem_repeticao>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115b <tem_repeticao+0x5b>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    1148 <tem_repeticao+0x48>
movl   $0x1,-0x4(%rbp)
jmp    1162 <tem_repeticao+0x62>
jmp    114d <tem_repeticao+0x4d>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    111c <tem_repeticao+0x1c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tem_repeticao>:
test   %esi,%esi
jle    111e <tem_repeticao+0x1e>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
cmp    %edx,(%rdi,%rcx,4)
je     1121 <tem_repeticao+0x21>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <tem_repeticao+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @tem_repeticao(i32* nocapture %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %2
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int clear_multprec_homotopy(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(524, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_multprec_homotopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x20c,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_multprec_homotopy>:
mov    $0x20c,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

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

LLVM IR (-O2):
define i32 @clear_multprec_homotopy() {
%1 = tail call i32 @_ada_use_c2phc(i32 524, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
int func(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @func() {
ret i32 0
}
unsigned int round_up_to_the_next_highest_power_of_2(unsigned int num) {
  num--;
  num |= num >> 1;
  num |= num >> 2;
  num |= num >> 4;
  num |= num >> 8;
  num |= num >> 16;
  num++;
  return num += (num == 0);
}


x86 assembly (clang, -O0):
<round_up_to_the_next_highest_power_of_2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_up_to_the_next_highest_power_of_2>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
shr    %ecx
or     %eax,%ecx
mov    %ecx,%eax
shr    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
shr    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
shr    $0x10,%eax
or     %edx,%eax
add    $0x1,%eax
adc    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @round_up_to_the_next_highest_power_of_2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = lshr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = lshr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = lshr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = lshr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = lshr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = add i32 %25, 1
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = icmp eq i32 %27, 0
%29 = zext i1 %28 to i32
%30 = load i32, i32* %2
%31 = add i32 %30, %29
store i32 %31, i32* %2
ret i32 %31
}

LLVM IR (-O2):
define i32 @round_up_to_the_next_highest_power_of_2(i32 %0) {
%2 = add i32 %0, -1
%3 = lshr i32 %2, 1
%4 = or i32 %3, %2
%5 = lshr i32 %4, 2
%6 = or i32 %5, %4
%7 = lshr i32 %6, 4
%8 = or i32 %7, %6
%9 = lshr i32 %8, 8
%10 = or i32 %9, %8
%11 = lshr i32 %10, 16
%12 = or i32 %11, %10
%13 = add i32 %12, 1
%14 = icmp eq i32 %13, 0
%15 = zext i1 %14 to i32
%16 = add i32 %13, %15
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
const uint32_t *chip_get_magic_location(void) {
  return (const uint32_t *)0xF000;
}


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

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

LLVM IR (-O0):
define i32* @chip_get_magic_location() {
ret i32* inttoptr (i64 61440 to i32*)
}

LLVM IR (-O2):
define i32* @chip_get_magic_location() {
ret i32* inttoptr (i64 61440 to i32*)
}
/* Variables and functions */
scalar_t__ condition_alphanumeric(char);
int /*<<< orphan*/ condition_n(char);
int condition_alphanumericExcept_n(char c) {
  return !condition_n(c) && condition_alphanumeric(c);
}


x86 assembly (clang, -O0):
<condition_alphanumericExcept_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <condition_n@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
jne    115a <condition_alphanumericExcept_n+0x3a>
movsbl -0x1(%rbp),%edi
call   1040 <condition_alphanumeric@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<condition_alphanumericExcept_n>:
push   %rbx
mov    %edi,%ebx
call   1030 <condition_n@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     1132 <condition_alphanumericExcept_n+0x12>
pop    %rbx
ret
movsbl %bl,%edi
call   1040 <condition_alphanumeric@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @condition_alphanumericExcept_n(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @condition_n(i8 signext %3)
%5 = icmp ne i32 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @condition_alphanumeric(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @condition_alphanumericExcept_n(i8 signext %0) {
%2 = tail call i32 @condition_n(i8 signext %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @condition_alphanumeric(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int error(int, char *);
int b_endsw(int argc, char *argv[]) {
  if (argc > 1)
    return error(1, argv[0]);
  return 0;
}


x86 assembly (clang, -O0):
<b_endsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    1142 <b_endsw+0x32>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x1,%edi
call   1030 <error@plt>
mov    %eax,-0x4(%rbp)
jmp    1149 <b_endsw+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_endsw>:
cmp    $0x2,%edi
jl     1122 <b_endsw+0x12>
mov    (%rsi),%rsi
mov    $0x1,%edi
jmp    1030 <error@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @b_endsw(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @error(i32 1, i8* %5)
br label %7
7: ; preds = %2, %4
%8 = phi i32 [ %6, %4 ], [ 0, %2 ]
ret i32 %8
}