xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t vexists_bit_LaceKVE_joint();
size_t get_vexists_bit_LaceKVE_joint(size_t x) {
  return x & vexists_bit_LaceKVE_joint();
}


x86 assembly (clang, -O0):
<get_vexists_bit_LaceKVE_joint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <vexists_bit_LaceKVE_joint@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
and    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_vexists_bit_LaceKVE_joint>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <vexists_bit_LaceKVE_joint@plt>
and    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @get_vexists_bit_LaceKVE_joint(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 (...) @vexists_bit_LaceKVE_joint()
%5 = and i64 %3, %4
ret i64 %5
}

LLVM IR (-O2):
define i64 @get_vexists_bit_LaceKVE_joint(i64 %0) {
%2 = tail call i64 (...) @vexists_bit_LaceKVE_joint()
%3 = and i64 %2, %0
ret i64 %3
}
int digit(int v, int b, int d) {
  for (int i = 0; i < d; i++) {
    v /= b;
  }
  return v % b;
}


x86 assembly (clang, -O0):
<digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113a <digit+0x3a>
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <digit+0x14>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit>:
mov    %edi,%eax
test   %edx,%edx
jle    1148 <digit+0x48>
mov    %edx,%ecx
lea    -0x1(%rcx),%edx
mov    %ecx,%edi
and    $0x3,%edi
cmp    $0x3,%edx
jb     1131 <digit+0x31>
and    $0xfffffffc,%ecx
nopl   0x0(%rax,%rax,1)
cltd
idiv   %esi
cltd
idiv   %esi
cltd
idiv   %esi
cltd
idiv   %esi
add    $0xfffffffc,%ecx
jne    1120 <digit+0x20>
test   %edi,%edi
je     1148 <digit+0x48>
cs nopw 0x0(%rax,%rax,1)
nop
cltd
idiv   %esi
add    $0xffffffff,%edi
jne    1140 <digit+0x40>
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @digit(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %21
5: ; preds = %3
%6 = add i32 %2, -1
%7 = and i32 %2, 3
%8 = icmp ult i32 %6, 3
br i1 %8, label %11, label %9
9: ; preds = %5
%10 = and i32 %2, -4
br label %24
11: ; preds = %24, %5
%12 = phi i32 [ undef, %5 ], [ %30, %24 ]
%13 = phi i32 [ %0, %5 ], [ %30, %24 ]
%14 = icmp eq i32 %7, 0
br i1 %14, label %21, label %15
15: ; preds = %11, %15
%16 = phi i32 [ %18, %15 ], [ %13, %11 ]
%17 = phi i32 [ %19, %15 ], [ 0, %11 ]
%18 = sdiv i32 %16, %1
%19 = add i32 %17, 1
%20 = icmp eq i32 %19, %7
br i1 %20, label %21, label %15
21: ; preds = %11, %15, %3
%22 = phi i32 [ %0, %3 ], [ %12, %11 ], [ %18, %15 ]
%23 = srem i32 %22, %1
ret i32 %23
24: ; preds = %24, %9
%25 = phi i32 [ %0, %9 ], [ %30, %24 ]
%26 = phi i32 [ 0, %9 ], [ %31, %24 ]
%27 = sdiv i32 %25, %1
%28 = sdiv i32 %27, %1
%29 = sdiv i32 %28, %1
%30 = sdiv i32 %29, %1
%31 = add i32 %26, 4
%32 = icmp eq i32 %31, %10
br i1 %32, label %11, label %24
}
void read_file(void) {}


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

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

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

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

/* Variables and functions */
int read_uint16(int, int /*<<< orphan*/ *);
int read_int16(int fd, int16_t *x) { return read_uint16(fd, (uint16_t *)x); }


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

x86 assembly (clang, -O2):
<read_int16>:
jmp    1030 <read_uint16@plt>

LLVM IR (-O0):
define i32 @read_int16(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 @read_uint16(i32 %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @read_int16(i32 %0, i32* %1) {
%3 = tail call i32 @read_uint16(i32 %0, i32* %1)
ret i32 %3
}
void osalSysUnlockFromISR(void) {}


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

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

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

LLVM IR (-O2):
define void @osalSysUnlockFromISR() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int const, int const);
int main(int argc, char *argv[]) {
  const int i;
  const int j = 0;
  printf("%d %d\n", i, j);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%rip),%rdi
xor    %edx,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 undef, i32 0)
ret i32 0
}
/* Variables and functions */
int write(int, char *, int);
int gpio_write(int fd, int value) {
  if (write(fd, value == 0 ? "0" : "1", 1) != 1) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<gpio_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%ecx
lea    0xed7(%rip),%rsi
lea    0xece(%rip),%rax
cmp    $0x0,%ecx
cmove  %rax,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
je     1158 <gpio_write+0x48>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <gpio_write+0x4f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_write>:
push   %rax
test   %esi,%esi
lea    0xee6(%rip),%rax
lea    0xee1(%rip),%rsi
cmove  %rax,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
define i32 @gpio_write(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%11 = call i32 @write(i32 %6, i8* %10, i32 1)
%12 = icmp ne i32 %11, 1
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@.str = [2 x i8] c"0\00"
@.str.1 = [2 x i8] c"1\00"
define i32 @gpio_write(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = select i1 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
%5 = tail call i32 @write(i32 %0, i8* %4, i32 1)
%6 = icmp ne i32 %5, 1
%7 = sext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ CPUfiqe();
void IntMasterFIQEnable(void) { CPUfiqe(); }


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

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

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

LLVM IR (-O2):
define void @IntMasterFIQEnable() {
%1 = tail call i32 (...) @CPUfiqe()
ret void
}
/* Variables and functions */
int copy_user_generic(void *, void const *, unsigned int);
__attribute__((warn_unused_result)) __attribute__((always_))
__attribute__((always_)) int
__copy_to_user_inatomic(void *dst, const void *src, unsigned size) {
  return copy_user_generic((void *)dst, src, size);
}


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

x86 assembly (clang, -O2):
<__copy_to_user_inatomic>:
jmp    1030 <copy_user_generic@plt>

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

LLVM IR (-O2):
define i32 @__copy_to_user_inatomic(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @copy_user_generic(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
scalar_t__ pthread_self();
unsigned long dtls_idCallback(void) { return (unsigned long)pthread_self(); }


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

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

LLVM IR (-O0):
define i64 @dtls_idCallback() {
%1 = call i64 (...) @pthread_self()
ret i64 %1
}

LLVM IR (-O2):
define i64 @dtls_idCallback() {
%1 = tail call i64 (...) @pthread_self()
ret i64 %1
}
/* Variables and functions */
int /*<<< orphan*/ trap_R_RegisterShaderNoMip(char *);
void TeamMain_Cache(void) { trap_R_RegisterShaderNoMip("menu/art/cut_frame"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"menu/art/cut_frame\00"
define void @TeamMain_Cache() {
%1 = call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"menu/art/cut_frame\00"
define void @TeamMain_Cache() {
%1 = tail call i32 @trap_R_RegisterShaderNoMip(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
void generic_splice_sendpage(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<generic_splice_sendpage>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<generic_splice_sendpage>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.generic_splice_sendpage = [24 x i8] c"generic_splice_sendpage\00"
define void @generic_splice_sendpage() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @__func__.generic_splice_sendpage, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.generic_splice_sendpage = [24 x i8] c"generic_splice_sendpage\00"
define void @generic_splice_sendpage() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @__func__.generic_splice_sendpage, i64 0, i64 0))
ret void
}
XSetPlaneMask() {}


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

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

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

LLVM IR (-O2):
define i32 @XSetPlaneMask() {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fgetc(int /*<<< orphan*/ *);
wint_t fgetwc(FILE *stream) { return (wint_t)fgetc(stream); }


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

x86 assembly (clang, -O2):
<fgetwc>:
jmp    1030 <fgetc@plt>

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

LLVM IR (-O2):
define i32 @fgetwc(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
ret i32 %2
}
void mibConstrInfoLLDPDU_test_invalid_tlv() {}


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

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

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

LLVM IR (-O2):
define void @mibConstrInfoLLDPDU_test_invalid_tlv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, void *);
int /*<<< orphan*/ stderr;
void rtpp_stats_getnstats_fin(void *pub) {
  fprintf(stderr,
          "Method rtpp_stats@%p::getnstats (rtpp_stats_getnstats) is invoked "
          "after destruction\x0a",
          pub);
  abort();
}


x86 assembly (clang, -O0):
<rtpp_stats_getnstats_fin>:
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   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [85 x i8] c"Method rtpp_stats@%p::getnstats (rtpp_stats_getnstats) is invoked after destruction\0A\00"
define void @rtpp_stats_getnstats_fin(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 ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [85 x i8] c"Method rtpp_stats@%p::getnstats (rtpp_stats_getnstats) is invoked after destruction\0A\00"
define void @rtpp_stats_getnstats_fin(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *, int *);
int main(int argc, char const *argv[]) {
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  printf("DIFERENCA = %d", (a * b) - (c * d));
  return 0;
}


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)
lea    0xec3(%rip),%rdi
lea    -0x14(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x1c(%rbp),%rcx
lea    -0x20(%rbp),%r8
call   1040 <scanf@plt>
mov    -0x14(%rbp),%esi
imul   -0x18(%rbp),%esi
mov    -0x1c(%rbp),%eax
imul   -0x20(%rbp),%eax
sub    %eax,%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
lea    0x8(%rsp),%r8
call   1040 <scanf@plt>
mov    0x10(%rsp),%esi
imul   0x14(%rsp),%esi
mov    0x8(%rsp),%eax
imul   0xc(%rsp),%eax
sub    %eax,%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [15 x i8] c"DIFERENCA = %d\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %6, i32* %7, i32* %8, i32* %9)
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %8
%15 = load i32, i32* %9
%16 = mul nsw i32 %14, %15
%17 = sub nsw i32 %13, %16
%18 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %17)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%d %d %d %d\00"
@.str.1 = [15 x i8] c"DIFERENCA = %d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = bitcast i32* %3 to i8*
%8 = bitcast i32* %4 to i8*
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %4, i32* %5, i32* %6)
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = mul nsw i32 %13, %12
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = mul nsw i32 %16, %15
%18 = sub nsw i32 %14, %17
%19 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %18)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ intarray_print(int const *, unsigned int);
int /*<<< orphan*/ printf(char *, char const *);
void intarray_print_with_name(const int *x, unsigned int len,
                              const char *name) {
  printf("%s:\t", name);
  intarray_print(x, len);
}


x86 assembly (clang, -O0):
<intarray_print_with_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <intarray_print@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intarray_print_with_name>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
mov    %rdx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <intarray_print@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%s:\09\00"
define void @intarray_print_with_name(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 i8*, i8** %6
%8 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32*, i32** %4
%10 = load i32, i32* %5
%11 = call i32 @intarray_print(i32* %9, i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%s:\09\00"
define void @intarray_print_with_name(i32* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = tail call i32 @intarray_print(i32* %0, i32 %1)
ret void
}
/* Variables and functions */
int func();
int /*<<< orphan*/ func1();
int /*<<< orphan*/ printf(char *, int);
void main(void) {
  func1();
  printf("%d\n", func());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <func1@plt>
mov    $0x0,%al
call   1050 <func@plt>
mov    %eax,%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <func1@plt>
xor    %eax,%eax
call   1050 <func@plt>
lea    0xeba(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @main() {
%1 = tail call i32 (...) @func1()
%2 = tail call i32 (...) @func()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void handler(void *p __attribute__((unused))) { exit(0); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<handler>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @handler(i8* nocapture readnone %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
void mp_write_console_ansi(void *wstream, char *buf) {}


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

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

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

LLVM IR (-O2):
define void @mp_write_console_ansi(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
char *binb_to_hex(int /*<<< orphan*/ *, int, char *);
int /*<<< orphan*/ bytes_to_binb(char const *, unsigned int);
int /*<<< orphan*/ sha256core(int /*<<< orphan*/, unsigned int,
                              int /*<<< orphan*/ *);
char *sha256(const char *source, unsigned int length, char *result) {
  uint32_t H[8];
  sha256core(bytes_to_binb(source, length), length * 8, H);
  return binb_to_hex(H, 8, result);
}


x86 assembly (clang, -O0):
<sha256>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <bytes_to_binb@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
shl    $0x3,%esi
lea    -0x40(%rbp),%rdx
call   1040 <sha256core@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x8,%esi
call   1050 <binb_to_hex@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha256>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rdx,%r14
mov    %esi,%ebp
call   1030 <bytes_to_binb@plt>
shl    $0x3,%ebp
mov    %rsp,%rbx
mov    %eax,%edi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1040 <sha256core@plt>
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %r14,%rdx
call   1050 <binb_to_hex@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8* @sha256(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca [8 x i32]
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%10 = call i32 @bytes_to_binb(i8* %8, i32 %9)
%11 = load i32, i32* %5
%12 = mul i32 %11, 8
%13 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%14 = call i32 @sha256core(i32 %10, i32 %12, i32* %13)
%15 = getelementptr inbounds [8 x i32], [8 x i32]* %7, i64 0, i64 0
%16 = load i8*, i8** %6
%17 = call i8* @binb_to_hex(i32* %15, i32 8, i8* %16)
ret i8* %17
}

LLVM IR (-O2):
define i8* @sha256(i8* %0, i32 %1, i8* %2) {
%4 = alloca [8 x i32]
%5 = bitcast [8 x i32]* %4 to i8*
%6 = tail call i32 @bytes_to_binb(i8* %0, i32 %1)
%7 = shl i32 %1, 3
%8 = getelementptr inbounds [8 x i32], [8 x i32]* %4, i64 0, i64 0
%9 = call i32 @sha256core(i32 %6, i32 %7, i32* %8)
%10 = call i8* @binb_to_hex(i32* %8, i32 8, i8* %2)
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ GL_MODELVIEW;
int /*<<< orphan*/ GL_PROJECTION;
int /*<<< orphan*/ glMatrixMode(int /*<<< orphan*/);
int /*<<< orphan*/ gluOrtho2D(double, double, double, double);
void Inicializa(void) {
  glMatrixMode(GL_PROJECTION);
  gluOrtho2D(-1.0, 1.0, -1.0, 1.0);
  glMatrixMode(GL_MODELVIEW);
}


x86 assembly (clang, -O0):
<Inicializa>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
movsd  0xec6(%rip),%xmm2
movsd  0xec6(%rip),%xmm3
movaps %xmm2,%xmm0
movaps %xmm3,%xmm1
call   1040 <gluOrtho2D@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Inicializa>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <glMatrixMode@plt>
movsd  0xec9(%rip),%xmm0
movsd  0xec9(%rip),%xmm1
movaps %xmm0,%xmm2
movaps %xmm1,%xmm3
call   1040 <gluOrtho2D@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <glMatrixMode@plt>

LLVM IR (-O0):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @Inicializa() {
%1 = load i32, i32* @GL_PROJECTION
%2 = call i32 @glMatrixMode(i32 %1)
%3 = call i32 @gluOrtho2D(double -1.000000e+00, double 1.000000e+00, double -1.000000e+00, double 1.000000e+00)
%4 = load i32, i32* @GL_MODELVIEW
%5 = call i32 @glMatrixMode(i32 %4)
ret void
}

LLVM IR (-O2):
@GL_PROJECTION = global i32 0
@GL_MODELVIEW = global i32 0
define void @Inicializa() {
%1 = load i32, i32* @GL_PROJECTION
%2 = tail call i32 @glMatrixMode(i32 %1)
%3 = tail call i32 @gluOrtho2D(double -1.000000e+00, double 1.000000e+00, double -1.000000e+00, double 1.000000e+00)
%4 = load i32, i32* @GL_MODELVIEW
%5 = tail call i32 @glMatrixMode(i32 %4)
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c, nl;
  nl = 0;
  while ((c = getchar()) != EOF)
    if (c == '\n')
      ++nl;
  printf("%d\n", nl);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2ea1(%rip),%rcx
cmp    (%rcx),%eax
je     1167 <main+0x47>
cmpl   $0xa,-0x8(%rbp)
jne    1162 <main+0x42>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1136 <main+0x16>
mov    -0xc(%rbp),%esi
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb4(%rip),%r14
cmp    (%r14),%eax
je     1156 <main+0x36>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
xor    %ecx,%ecx
cmp    $0xa,%eax
sete   %cl
add    %ecx,%ebx
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%r14),%eax
jne    1140 <main+0x20>
lea    0xea3(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %14, %0
%5 = call i32 (...) @getchar()
store i32 %5, i32* %2
%6 = load i32, i32* @EOF
%7 = icmp ne i32 %5, %6
br i1 %7, label %8, label %15
8: ; preds = %4
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 10
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %14
14: ; preds = %11, %8
br label %4
15: ; preds = %4
%16 = load i32, i32* %3
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
@EOF = global i32 0
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %13, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %10, %4 ], [ %1, %0 ]
%6 = phi i32 [ %9, %4 ], [ 0, %0 ]
%7 = icmp eq i32 %5, 10
%8 = zext i1 %7 to i32
%9 = add nuw nsw i32 %6, %8
%10 = tail call i32 (...) @getchar()
%11 = load i32, i32* @EOF
%12 = icmp eq i32 %10, %11
br i1 %12, label %13, label %4
13: ; preds = %4, %0
%14 = phi i32 [ 0, %0 ], [ %9, %4 ]
%15 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %14)
ret i32 0
}
/* Variables and functions */
int add(int, int);
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int a, b, n;
  a = 3;
  b = 5;
  n = add(a, b);
  printf("%d=%d+%d\n", n, a, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1030 <add@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xea5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x5,%esi
call   1030 <add@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
mov    $0x3,%edx
mov    $0x5,%ecx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d=%d+%d\0A\00"
define i32 @main() {
%1 = tail call i32 @add(i32 3, i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %1, i32 3, i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ my_error(char *);
int pd_random_29bit();
int /*<<< orphan*/ printf(char *, int);
int int_random(int n) {
  int result = -1;
  if (n < 1) {
    printf("int_random(%d) ?\n", n);
    my_error("You called int_random(<=0)");
    return (0);
  } else
    result = pd_random_29bit() % n;
  return (result);
}


x86 assembly (clang, -O0):
<int_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1173 <int_random+0x43>
mov    -0x8(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
call   1050 <my_error@plt>
movl   $0x0,-0x4(%rbp)
jmp    1187 <int_random+0x57>
mov    $0x0,%al
call   1040 <pd_random_29bit@plt>
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_random>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jle    1145 <int_random+0x15>
xor    %eax,%eax
call   1040 <pd_random_29bit@plt>
cltd
idiv   %ebx
mov    %edx,%eax
pop    %rbx
ret
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
lea    0xeb8(%rip),%rdi
call   1050 <my_error@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"int_random(%d) ?\0A\00"
@.str.1 = [27 x i8] c"You called int_random(<=0)\00"
define i32 @int_random(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 -1, i32* %4
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = call i32 @my_error(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %2
br label %17
11: ; preds = %1
%12 = call i32 (...) @pd_random_29bit()
%13 = load i32, i32* %3
%14 = srem i32 %12, %13
store i32 %14, i32* %4
br label %15
15: ; preds = %11
%16 = load i32, i32* %4
store i32 %16, i32* %2
br label %17
17: ; preds = %15, %7
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [18 x i8] c"int_random(%d) ?\0A\00"
@.str.1 = [27 x i8] c"You called int_random(<=0)\00"
define i32 @int_random(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = tail call i32 @my_error(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %9
6: ; preds = %1
%7 = tail call i32 (...) @pd_random_29bit()
%8 = srem i32 %7, %0
br label %9
9: ; preds = %6, %3
%10 = phi i32 [ 0, %3 ], [ %8, %6 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ readAndDisplayBookInformation(char *);
void test_readAndDisplayBookInformation() {
  readAndDisplayBookInformation("books.txt");
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"books.txt\00"
define void @test_readAndDisplayBookInformation() {
%1 = call i32 @readAndDisplayBookInformation(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"books.txt\00"
define void @test_readAndDisplayBookInformation() {
%1 = tail call i32 @readAndDisplayBookInformation(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int ig_indirect_table_set(unsigned int, int, unsigned int, int, unsigned int *);
int ig_sak_table_set(unsigned int dev_id, unsigned int index,
                     unsigned int *pentry) {
  if ((index < 32) || (index > 63)) {
    return -1;
  }
  return ig_indirect_table_set(dev_id, 2, index, 4, pentry);
}


x86 assembly (clang, -O0):
<ig_sak_table_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x20,-0xc(%rbp)
jb     1136 <ig_sak_table_set+0x26>
cmpl   $0x3f,-0xc(%rbp)
jbe    1142 <ig_sak_table_set+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <ig_sak_table_set+0x4e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%r8
mov    $0x2,%esi
mov    $0x4,%ecx
call   1030 <ig_indirect_table_set@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ig_sak_table_set>:
mov    %esi,%eax
and    $0xffffffe0,%eax
cmp    $0x20,%eax
jne    112e <ig_sak_table_set+0x1e>
mov    %rdx,%r8
mov    %esi,%edx
mov    $0x2,%esi
mov    $0x4,%ecx
jmp    1030 <ig_indirect_table_set@plt>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ig_sak_table_set(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%8 = load i32, i32* %6
%9 = icmp ult i32 %8, 32
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp ugt i32 %11, 63
br i1 %12, label %13, label %14
13: ; preds = %10, %3
store i32 -1, i32* %4
br label %19
14: ; preds = %10
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32*, i32** %7
%18 = call i32 @ig_indirect_table_set(i32 %15, i32 2, i32 %16, i32 4, i32* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @ig_sak_table_set(i32 %0, i32 %1, i32* %2) {
%4 = and i32 %1, -32
%5 = icmp eq i32 %4, 32
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @ig_indirect_table_set(i32 %0, i32 2, i32 %1, i32 4, i32* %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Type definitions */
struct compat_semaphore {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ compat_sema_init(struct compat_semaphore *, int);
void sema_init(struct compat_semaphore *sem, int val) {
  compat_sema_init(sem, val);
}


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

x86 assembly (clang, -O2):
<sema_init>:
jmp    1030 <compat_sema_init@plt>

LLVM IR (-O0):
%struct.compat_semaphore = type { i32 }
define void @sema_init(%struct.compat_semaphore* %0, i32 %1) {
%3 = alloca %struct.compat_semaphore*
%4 = alloca i32
store %struct.compat_semaphore* %0, %struct.compat_semaphore** %3
store i32 %1, i32* %4
%5 = load %struct.compat_semaphore*, %struct.compat_semaphore** %3
%6 = load i32, i32* %4
%7 = call i32 @compat_sema_init(%struct.compat_semaphore* %5, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.compat_semaphore = type { i32 }
define void @sema_init(%struct.compat_semaphore* %0, i32 %1) {
%3 = tail call i32 @compat_sema_init(%struct.compat_semaphore* %0, i32 %1)
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xclient;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xclient_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xclient.send_event = (int)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEvent_xclient_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ send(int, void const *, size_t, int);
ssize_t oc_netlayer_send(int sockfd, const void *buf, size_t len, int flags) {
  return send(sockfd, buf, len, flags);
}


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

x86 assembly (clang, -O2):
<oc_netlayer_send>:
jmp    1030 <send@plt>

LLVM IR (-O0):
define i32 @oc_netlayer_send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = load i32, i32* %8
%13 = call i32 @send(i32 %9, i8* %10, i64 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @oc_netlayer_send(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = tail call i32 @send(i32 %0, i8* %1, i64 %2, i32 %3)
ret i32 %5
}
int __ecm_list_mul_mem(unsigned int len) {
  unsigned int mem;
  mem = 2 * len;
  return mem;
}


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

x86 assembly (clang, -O2):
<__ecm_list_mul_mem>:
lea    (%rdi,%rdi,1),%eax
ret

LLVM IR (-O0):
define i32 @__ecm_list_mul_mem(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = mul i32 2, %4
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @__ecm_list_mul_mem(i32 %0) {
%2 = shl i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ three_aux(double, int);
void three(int log_threads) {
  three_aux(.5, log_threads);
  three_aux(.75, log_threads);
  three_aux(.9, log_threads);
  three_aux(.99, log_threads);
}


x86 assembly (clang, -O0):
<three>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
movsd  0xef2(%rip),%xmm0
call   1030 <three_aux@plt>
mov    -0x4(%rbp),%edi
movsd  0xeda(%rip),%xmm0
call   1030 <three_aux@plt>
mov    -0x4(%rbp),%edi
movsd  0xec2(%rip),%xmm0
call   1030 <three_aux@plt>
mov    -0x4(%rbp),%edi
movsd  0xeaa(%rip),%xmm0
call   1030 <three_aux@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<three>:
push   %rbx
mov    %edi,%ebx
movsd  0xee5(%rip),%xmm0
call   1030 <three_aux@plt>
movsd  0xee0(%rip),%xmm0
mov    %ebx,%edi
call   1030 <three_aux@plt>
movsd  0xed9(%rip),%xmm0
mov    %ebx,%edi
call   1030 <three_aux@plt>
movsd  0xed2(%rip),%xmm0
mov    %ebx,%edi
pop    %rbx
jmp    1030 <three_aux@plt>

LLVM IR (-O0):
define void @three(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @three_aux(double 5.000000e-01, i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @three_aux(double 7.500000e-01, i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @three_aux(double 9.000000e-01, i32 %7)
%9 = load i32, i32* %2
%10 = call i32 @three_aux(double 0x3FEFAE147AE147AE, i32 %9)
ret void
}

LLVM IR (-O2):
define void @three(i32 %0) {
%2 = tail call i32 @three_aux(double 5.000000e-01, i32 %0)
%3 = tail call i32 @three_aux(double 7.500000e-01, i32 %0)
%4 = tail call i32 @three_aux(double 9.000000e-01, i32 %0)
%5 = tail call i32 @three_aux(double 0x3FEFAE147AE147AE, i32 %0)
ret void
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *, int /*<<< orphan*/);
extern void porter_UTF_8_close_env(struct SN_env *z) { SN_close_env(z, 0); }


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

x86 assembly (clang, -O2):
<porter_UTF_8_close_env>:
xor    %esi,%esi
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @porter_UTF_8_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @porter_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0, i32 0)
ret void
}
/* Variables and functions */
double sqrt(double);
double calculateSecondRoot(double a, double b, double disc) {
  return (-b - sqrt(disc)) / (2 * a);
}


x86 assembly (clang, -O0):
<calculateSecondRoot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xe9a(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculateSecondRoot>:
sub    $0x28,%rsp
xorpd  0xee4(%rip),%xmm1
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1133 <calculateSecondRoot+0x23>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
jmp    1154 <calculateSecondRoot+0x44>
movapd %xmm2,%xmm0
movapd %xmm1,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm3
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm3,%xmm3
divsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @calculateSecondRoot(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = fneg double %7
%9 = load double, double* %6
%10 = call double @sqrt(double %9)
%11 = fsub double %8, %10
%12 = load double, double* %4
%13 = fmul double 2.000000e+00, %12
%14 = fdiv double %11, %13
ret double %14
}

LLVM IR (-O2):
define double @calculateSecondRoot(double %0, double %1, double %2) {
%4 = fneg double %1
%5 = tail call double @sqrt(double %2)
%6 = fsub double %4, %5
%7 = fmul double %0, 2.000000e+00
%8 = fdiv double %6, %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ test_neurogen_population_calculate_statistics();
int /*<<< orphan*/ test_neurogen_population_construct();
int /*<<< orphan*/ test_neurogen_population_destruct();
int /*<<< orphan*/ test_neurogen_population_duplicate();
int /*<<< orphan*/ test_neurogen_population_evolve();
int /*<<< orphan*/ test_neurogen_population_roulette_selection();
void test_neurogen_population() {
  test_neurogen_population_construct();
  test_neurogen_population_destruct();
  test_neurogen_population_duplicate();
  test_neurogen_population_evolve();
  test_neurogen_population_calculate_statistics();
  test_neurogen_population_roulette_selection();
}


x86 assembly (clang, -O0):
<test_neurogen_population>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1060 <test_neurogen_population_construct@plt>
mov    $0x0,%al
call   1080 <test_neurogen_population_destruct@plt>
mov    $0x0,%al
call   1070 <test_neurogen_population_duplicate@plt>
mov    $0x0,%al
call   1030 <test_neurogen_population_evolve@plt>
mov    $0x0,%al
call   1050 <test_neurogen_population_calculate_statistics@plt>
mov    $0x0,%al
call   1040 <test_neurogen_population_roulette_selection@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_neurogen_population>:
push   %rax
xor    %eax,%eax
call   1060 <test_neurogen_population_construct@plt>
xor    %eax,%eax
call   1080 <test_neurogen_population_destruct@plt>
xor    %eax,%eax
call   1070 <test_neurogen_population_duplicate@plt>
xor    %eax,%eax
call   1030 <test_neurogen_population_evolve@plt>
xor    %eax,%eax
call   1050 <test_neurogen_population_calculate_statistics@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <test_neurogen_population_roulette_selection@plt>

LLVM IR (-O0):
define void @test_neurogen_population() {
%1 = call i32 (...) @test_neurogen_population_construct()
%2 = call i32 (...) @test_neurogen_population_destruct()
%3 = call i32 (...) @test_neurogen_population_duplicate()
%4 = call i32 (...) @test_neurogen_population_evolve()
%5 = call i32 (...) @test_neurogen_population_calculate_statistics()
%6 = call i32 (...) @test_neurogen_population_roulette_selection()
ret void
}

LLVM IR (-O2):
define void @test_neurogen_population() {
%1 = tail call i32 (...) @test_neurogen_population_construct()
%2 = tail call i32 (...) @test_neurogen_population_destruct()
%3 = tail call i32 (...) @test_neurogen_population_duplicate()
%4 = tail call i32 (...) @test_neurogen_population_evolve()
%5 = tail call i32 (...) @test_neurogen_population_calculate_statistics()
%6 = tail call i32 (...) @test_neurogen_population_roulette_selection()
ret void
}