xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int numUniqueEmails(char **, int);
int main(int argc, char **argv) {
  char *emails[] = {"test.email+alex@leetcode.com",
                    "test.e.mail+bob.cathy@leetcode.com",
                    "testemail+david@lee.tcode.com"};
  assert(numUniqueEmails(emails, 3) == 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cc3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cc0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2cbd(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x3,%esi
call   1030 <numUniqueEmails@plt>
cmp    $0x2,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2ce5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cc9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <numUniqueEmails@plt>
xor    %edi,%edi
cmp    $0x2,%eax
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [29 x i8] c"test.email+alex@leetcode.com\00"
@.str.1 = [35 x i8] c"test.e.mail+bob.cathy@leetcode.com\00"
@.str.2 = [30 x i8] c"testemail+david@lee.tcode.com\00"
@__const.main.emails = [3 x i8*] [i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i32 0, i32 0)]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [3 x i8*]* %6 to i8*
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 0
%9 = call i32 @numUniqueEmails(i8** %8, i32 3)
%10 = icmp eq i32 %9, 2
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"test.email+alex@leetcode.com\00"
@.str.1 = [35 x i8] c"test.e.mail+bob.cathy@leetcode.com\00"
@.str.2 = [30 x i8] c"testemail+david@lee.tcode.com\00"
@__const.main.emails = [3 x i8*] [i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i32 0, i32 0)]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x i8*]
%4 = bitcast [3 x i8*]* %3 to i8*
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%6 = call i32 @numUniqueEmails(i8** %5, i32 3)
%7 = icmp eq i32 %6, 2
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
ret i32 0
}
/* Variables and functions */
int syscall_3(int, int, int, long);
int ioctl(int fd, int request, void *data) {
  return syscall_3(8, fd, request, (long)data);
}


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

x86 assembly (clang, -O2):
<ioctl>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0x8,%edi
jmp    1030 <syscall_3@plt>

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

LLVM IR (-O2):
define i32 @ioctl(i32 %0, i32 %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = tail call i32 @syscall_3(i32 8, i32 %0, i32 %1, i64 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ aca_enabled();
void msm_otg_id_timer_func(unsigned long data) {
  if (!aca_enabled())
    return;
}


x86 assembly (clang, -O0):
<msm_otg_id_timer_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <aca_enabled@plt>
cmp    $0x0,%eax
jne    1131 <msm_otg_id_timer_func+0x21>
jmp    1131 <msm_otg_id_timer_func+0x21>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @msm_otg_id_timer_func(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i32 (...) @aca_enabled()
%4 = icmp ne i32 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %1
br label %6
6: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @msm_otg_id_timer_func(i64 %0) {
%2 = tail call i32 (...) @aca_enabled()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void tar_usage(void) {
  (void)fputs("usage: tar [-]{crtux}[-befhjmopqsvwyzHLOPXZ014578] [blocksize] ",
              stderr);
  (void)fputs("[archive] [replstr] [-C directory] [-I file] [file ...]\n",
              stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<tar_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    0xef7(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<tar_usage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xf01(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [64 x i8] c"usage: tar [-]{crtux}[-befhjmopqsvwyzHLOPXZ014578] [blocksize] \00"
@stderr = global i32 0
@.str.1 = [57 x i8] c"[archive] [replstr] [-C directory] [-I file] [file ...]\0A\00"
define void @tar_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stderr
%4 = call i32 @fputs(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [64 x i8] c"usage: tar [-]{crtux}[-befhjmopqsvwyzHLOPXZ014578] [blocksize] \00"
@stderr = global i32 0
@.str.1 = [57 x i8] c"[archive] [replstr] [-C directory] [-I file] [file ...]\0A\00"
define void @tar_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ strchr(char const *, char);
scalar_t__ strncmp(char const *, char *, int);
int CFCUri_is_clownfish_uri(const char *uri) {
  return strncmp(uri, "cfish:", 6) == 0 || !strchr(uri, ':');
}


x86 assembly (clang, -O0):
<CFCUri_is_clownfish_uri>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
je     116c <CFCUri_is_clownfish_uri+0x4c>
mov    -0x8(%rbp),%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CFCUri_is_clownfish_uri>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1152 <CFCUri_is_clownfish_uri+0x32>
mov    %rbx,%rdi
mov    $0x3a,%esi
call   1040 <strchr@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"cfish:\00"
define i32 @CFCUri_is_clownfish_uri(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strncmp(i8* %3, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @strchr(i8* %7, i8 signext 58)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ true, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@.str = [7 x i8] c"cfish:\00"
define i32 @CFCUri_is_clownfish_uri(i8* %0) {
%2 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 6)
%3 = icmp eq i64 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strchr(i8* %0, i8 signext 58)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char *, char);
int isdelim(char c) { return c == '\0' || strchr(" \t\n;'\"", c) != NULL; }


x86 assembly (clang, -O0):
<isdelim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x2(%rbp)
je     114a <isdelim+0x3a>
lea    0xec9(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <strchr@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):
<isdelim>:
test   %dil,%dil
je     1136 <isdelim+0x26>
push   %rax
movsbl %dil,%esi
lea    0xedf(%rip),%rdi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
@.str = [7 x i8] c" \09\0A;'\22\00"
define i32 @isdelim(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, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i32* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = icmp ne i32* %8, null
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
@.str = [7 x i8] c" \09\0A;'\22\00"
define i32 @isdelim(i8 signext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i32* @strchr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t read_uint32(uint8_t *ptr) {
  return ptr[0] * 16777216 + ptr[1] * 65536 + ptr[2] * 256 + ptr[3];
}


x86 assembly (clang, -O0):
<read_uint32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%rcx
add    0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_uint32>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
add    %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
add    %ecx,%eax
add    0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @read_uint32(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 16777216
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = mul nsw i32 %9, 65536
%11 = add nsw i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = mul nsw i32 %14, 256
%16 = add nsw i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = add nsw i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @read_uint32(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl nsw i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl nsw i32 %5, 16
%7 = add nsw i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl nsw i32 %9, 8
%11 = add nsw i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = add nsw i32 %11, %13
ret i32 %14
}
/* Variables and functions */
double CC3RandomDouble();
double CC3RandomDoubleBetween(double min, double max) {
  return min + (CC3RandomDouble() * (max - min));
}


x86 assembly (clang, -O0):
<CC3RandomDoubleBetween>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x0,%al
call   1030 <CC3RandomDouble@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
subsd  -0x8(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CC3RandomDoubleBetween>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <CC3RandomDouble@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
subsd  %xmm1,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @CC3RandomDoubleBetween(double %0, double %1) {
%3 = tail call double (...) @CC3RandomDouble()
%4 = fsub double %1, %0
%5 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %0)
ret double %5
}
/* Type definitions */
typedef int ulong;
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
ulong get_time_ms() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec * 1000 + tv.tv_usec / 1000;
}


x86 assembly (clang, -O0):
<get_time_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_time_ms>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x10624dd3,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @get_time_ms() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = mul nsw i32 %4, 1000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%7 = load i32, i32* %6
%8 = sdiv i32 %7, 1000
%9 = add nsw i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @get_time_ms() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
ret i32 %10
}
void get(void) {
  printf("%s, %s, %d\n",
         "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
         "2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/"
         "base-usage/make_study/utils.c",
         __func__, 20);
}


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xf85(%rip),%rdx
mov    $0x14,%ecx
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xf89(%rip),%rdx
mov    $0x14,%ecx
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/utils.c\00"
@__func__.get = [4 x i8] c"get\00"
define void @get() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.get, i64 0, i64 0), i32 20)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s, %s, %d\0A\00"
@.str.1 = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/sczzq/symmetrical-spoon/refs/heads/master/base-usage/make_study/utils.c\00"
@__func__.get = [4 x i8] c"get\00"
define void @get() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__func__.get, i64 0, i64 0), i32 20)
ret void
}
void INT_Excep_TMR3_OV3I(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR3_OV3I() {
ret void
}
/* Variables and functions */
float exponential_custom_io(float, float, float);
float exponential_custom_f_io(float step, float max_steps, float max_val) {
  return exponential_custom_io(step, max_steps, max_val);
}


x86 assembly (clang, -O0):
<exponential_custom_f_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <exponential_custom_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponential_custom_f_io>:
jmp    1030 <exponential_custom_io@plt>

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

LLVM IR (-O2):
define float @exponential_custom_f_io(float %0, float %1, float %2) {
%4 = tail call float @exponential_custom_io(float %0, float %1, float %2)
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void watchpoint_handler() {
  printf("\n #####> Exiting on watch point !!\n");
  exit(-1);
}


x86 assembly (clang, -O0):
<watchpoint_handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [36 x i8] c"\0A #####> Exiting on watch point !!\0A\00"
define void @watchpoint_handler() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@str = [35 x i8] c"\0A #####> Exiting on watch point !!\00"
define void @watchpoint_handler() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
int dataframe_neptr(int **df) { return df[-1][2]; }


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

x86 assembly (clang, -O2):
<dataframe_neptr>:
mov    -0x8(%rdi),%rax
mov    0x8(%rax),%eax
ret

LLVM IR (-O0):
define i32 @dataframe_neptr(i32** %0) {
%2 = alloca i32**
store i32** %0, i32*** %2
%3 = load i32**, i32*** %2
%4 = getelementptr inbounds i32*, i32** %3, i64 -1
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 2
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @dataframe_neptr(i32** nocapture %0) {
%2 = getelementptr inbounds i32*, i32** %0, i64 -1
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 2
%5 = load i32, i32* %4
ret i32 %5
}
void set_sequence(int arr[10]) {
  int i;
  for (i = 0; i < 10; i++) {
    arr[i] = (int)i;
  }
}


x86 assembly (clang, -O0):
<set_sequence>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xa,-0xc(%rbp)
jge    1135 <set_sequence+0x35>
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <set_sequence+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_sequence>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movaps 0xeff(%rip),%xmm0
movups %xmm0,0x10(%rdi)
movabs $0x900000008,%rax
mov    %rax,0x20(%rdi)
ret

LLVM IR (-O0):
define void @set_sequence(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %9, i64 %11
store i32 %8, i32* %12
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @set_sequence(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 0, i32 1, i32 2, i32 3>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
%4 = bitcast i32* %3 to <4 x i32>*
store <4 x i32> <i32 4, i32 5, i32 6, i32 7>, <4 x i32>* %4
%5 = getelementptr inbounds i32, i32* %0, i64 8
store i32 8, i32* %5
%6 = getelementptr inbounds i32, i32* %0, i64 9
store i32 9, i32* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2CMasterControl(int, int);
int /*<<< orphan*/ I2CMasterDataPut(int, unsigned char);
int /*<<< orphan*/ I2CMasterSlaveAddrSet(int, int, int /*<<< orphan*/);
void OSRAMWriteFirst(unsigned char ucChar) {
  I2CMasterSlaveAddrSet(0x40020000, 0x3d, 0);
  I2CMasterDataPut(0x40020000, ucChar);
  I2CMasterControl(0x40020000, (0x00000002 | 0x00000001));
}


x86 assembly (clang, -O0):
<OSRAMWriteFirst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x40020000,%edi
mov    $0x3d,%esi
xor    %edx,%edx
call   1050 <I2CMasterSlaveAddrSet@plt>
mov    $0x40020000,%edi
movzbl -0x1(%rbp),%esi
call   1030 <I2CMasterDataPut@plt>
mov    $0x40020000,%edi
mov    $0x3,%esi
call   1040 <I2CMasterControl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSRAMWriteFirst>:
push   %rbx
mov    %edi,%ebx
mov    $0x40020000,%edi
mov    $0x3d,%esi
xor    %edx,%edx
call   1050 <I2CMasterSlaveAddrSet@plt>
mov    $0x40020000,%edi
mov    %ebx,%esi
call   1030 <I2CMasterDataPut@plt>
mov    $0x40020000,%edi
mov    $0x3,%esi
pop    %rbx
jmp    1040 <I2CMasterControl@plt>

LLVM IR (-O0):
define void @OSRAMWriteFirst(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @I2CMasterSlaveAddrSet(i32 1073872896, i32 61, i32 0)
%4 = load i8, i8* %2
%5 = call i32 @I2CMasterDataPut(i32 1073872896, i8 zeroext %4)
%6 = call i32 @I2CMasterControl(i32 1073872896, i32 3)
ret void
}

LLVM IR (-O2):
define void @OSRAMWriteFirst(i8 zeroext %0) {
%2 = tail call i32 @I2CMasterSlaveAddrSet(i32 1073872896, i32 61, i32 0)
%3 = tail call i32 @I2CMasterDataPut(i32 1073872896, i8 zeroext %0)
%4 = tail call i32 @I2CMasterControl(i32 1073872896, i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FIONREAD;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
int proc_request(int);
void handle_client(int client_sock) {
  int nread;
  int ret;
  while (1) {
    ioctl(client_sock, FIONREAD, &nread);
    if (nread > 0) {
      ret = proc_request(client_sock);
      if (ret == 2) {
        close(client_sock);
        break;
      }
    }
  }
}


x86 assembly (clang, -O0):
<handle_client>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdx
call   1030 <ioctl@plt>
cmpl   $0x0,-0x8(%rbp)
jle    1181 <handle_client+0x51>
mov    -0x4(%rbp),%edi
call   1050 <proc_request@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jne    117c <handle_client+0x4c>
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
jmp    1186 <handle_client+0x56>
jmp    1181 <handle_client+0x51>
jmp    113b <handle_client+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<handle_client>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    0x2ea6(%rip),%r15
lea    0xc(%rsp),%r14
nopw   0x0(%rax,%rax,1)
mov    (%r15),%esi
mov    %ebx,%edi
mov    %r14,%rdx
call   1030 <ioctl@plt>
cmpl   $0x0,0xc(%rsp)
jle    1150 <handle_client+0x20>
mov    %ebx,%edi
call   1050 <proc_request@plt>
cmp    $0x2,%eax
jne    1150 <handle_client+0x20>
mov    %ebx,%edi
call   1040 <close@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@FIONREAD = global i32 0
define void @handle_client(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %1, %20
%6 = load i32, i32* %2
%7 = load i32, i32* @FIONREAD
%8 = call i32 @ioctl(i32 %6, i32 %7, i32* %3)
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %5
%12 = load i32, i32* %2
%13 = call i32 @proc_request(i32 %12)
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 2
br i1 %15, label %16, label %19
16: ; preds = %11
%17 = load i32, i32* %2
%18 = call i32 @close(i32 %17)
br label %21
19: ; preds = %11
br label %20
20: ; preds = %19, %5
br label %5
21: ; preds = %16
ret void
}

LLVM IR (-O2):
@FIONREAD = global i32 0
define void @handle_client(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %12, %1
%5 = load i32, i32* @FIONREAD
%6 = call i32 @ioctl(i32 %0, i32 %5, i32* %2)
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %4
%10 = call i32 @proc_request(i32 %0)
%11 = icmp eq i32 %10, 2
br i1 %11, label %13, label %12
12: ; preds = %9, %4
br label %4
13: ; preds = %9
%14 = call i32 @close(i32 %0)
ret void
}
void cmd_qui(char *arg) {
  status(1), printf("#you have to write '#quit' - no less, to quit!\n");
}


x86 assembly (clang, -O0):
<cmd_qui>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x1,%edi
mov    $0x0,%al
call   1040 <status@plt>
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_qui>:
push   %rax
mov    $0x1,%edi
xor    %eax,%eax
call   1040 <status@plt>
lea    0xecc(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [48 x i8] c"#you have to write '#quit' - no less, to quit!\0A\00"
define void @cmd_qui(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i32, ...) bitcast (i32 (...)* @status to i32 (i32, ...)*)(i32 1)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [47 x i8] c"#you have to write '#quit' - no less, to quit!\00"
define void @cmd_qui(i8* nocapture readnone %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @status to i32 (i32, ...)*)(i32 1)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
ret void
}
int nx_min_i(int x, int y) { return (x < y) ? x : y; }


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

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

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

LLVM IR (-O2):
define i32 @nx_min_i(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %0, i32 %1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) { printf(" usage: %s IpAddr\n ", name); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c" usage: %s IpAddr\0A \00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c" usage: %s IpAddr\0A \00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ destroy_display();
int /*<<< orphan*/ destroy_fonts();
int /*<<< orphan*/ destroy_input();
int /*<<< orphan*/ destroy_textlog();
int /*<<< orphan*/ destroy_timer();
void destroy_objects() {
  destroy_fonts();
  destroy_input();
  destroy_timer();
  destroy_display();
  destroy_textlog();
}


x86 assembly (clang, -O0):
<destroy_objects>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <destroy_fonts@plt>
mov    $0x0,%al
call   1030 <destroy_input@plt>
mov    $0x0,%al
call   1060 <destroy_timer@plt>
mov    $0x0,%al
call   1050 <destroy_display@plt>
mov    $0x0,%al
call   1040 <destroy_textlog@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_objects>:
push   %rax
xor    %eax,%eax
call   1070 <destroy_fonts@plt>
xor    %eax,%eax
call   1030 <destroy_input@plt>
xor    %eax,%eax
call   1060 <destroy_timer@plt>
xor    %eax,%eax
call   1050 <destroy_display@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <destroy_textlog@plt>

LLVM IR (-O0):
define void @destroy_objects() {
%1 = call i32 (...) @destroy_fonts()
%2 = call i32 (...) @destroy_input()
%3 = call i32 (...) @destroy_timer()
%4 = call i32 (...) @destroy_display()
%5 = call i32 (...) @destroy_textlog()
ret void
}

LLVM IR (-O2):
define void @destroy_objects() {
%1 = tail call i32 (...) @destroy_fonts()
%2 = tail call i32 (...) @destroy_input()
%3 = tail call i32 (...) @destroy_timer()
%4 = tail call i32 (...) @destroy_display()
%5 = tail call i32 (...) @destroy_textlog()
ret void
}
/* Variables and functions */
double log10f(scalar_t__);
scalar_t__ powf(double, float);
float padd(float a, float b) {
  return 10.0 * log10f(powf(10.0, a / 10.0) + powf(10.0, b / 10.0));
}


x86 assembly (clang, -O0):
<padd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xebd(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
movsd  0xead(%rip),%xmm0
call   1030 <powf@plt>
mov    %rax,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe93(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm1
movsd  0xe83(%rip),%xmm0
call   1030 <powf@plt>
mov    -0x10(%rbp),%rdi
add    %rax,%rdi
call   1040 <log10f@plt>
movaps %xmm0,%xmm1
movsd  0xe67(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padd>:
push   %rbx
sub    $0x10,%rsp
movss  %xmm1,0xc(%rsp)
movaps %xmm0,%xmm1
divss  0xeca(%rip),%xmm1
movsd  0xeca(%rip),%xmm0
call   1030 <powf@plt>
mov    %rax,%rbx
movss  0xc(%rsp),%xmm1
divss  0xeac(%rip),%xmm1
movsd  0xeac(%rip),%xmm0
call   1030 <powf@plt>
add    %rax,%rbx
mov    %rbx,%rdi
call   1040 <log10f@plt>
mulsd  0xe94(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @padd(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = fpext float %5 to double
%7 = fdiv double %6, 1.000000e+01
%8 = fptrunc double %7 to float
%9 = call i64 @powf(double 1.000000e+01, float %8)
%10 = load float, float* %4
%11 = fpext float %10 to double
%12 = fdiv double %11, 1.000000e+01
%13 = fptrunc double %12 to float
%14 = call i64 @powf(double 1.000000e+01, float %13)
%15 = add nsw i64 %9, %14
%16 = call double @log10f(i64 %15)
%17 = fmul double 1.000000e+01, %16
%18 = fptrunc double %17 to float
ret float %18
}

LLVM IR (-O2):
define float @padd(float %0, float %1) {
%3 = fdiv float %0, 1.000000e+01
%4 = tail call i64 @powf(double 1.000000e+01, float %3)
%5 = fdiv float %1, 1.000000e+01
%6 = tail call i64 @powf(double 1.000000e+01, float %5)
%7 = add nsw i64 %6, %4
%8 = tail call double @log10f(i64 %7)
%9 = fmul double %8, 1.000000e+01
%10 = fptrunc double %9 to float
ret float %10
}
/* Variables and functions */
int /*<<< orphan*/ bar();
void _start() { bar(); }


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

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

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

LLVM IR (-O2):
define void @_start() {
%1 = tail call i32 (...) @bar()
ret void
}
int wildmat(text, p)
char *text;
char *p;
{
  if (p[0] == '*' && p[1] == '\0')
    return 1;
  return DoMatch(text, p) == 1;
}


x86 assembly (clang, -O0):
<wildmat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    114d <wildmat+0x3d>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    114d <wildmat+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    116a <wildmat+0x5a>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x0,%al
call   1030 <DoMatch@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wildmat>:
push   %rax
cmpb   $0x2a,(%rsi)
jne    111c <wildmat+0xc>
cmpb   $0x0,0x1(%rsi)
je     112f <wildmat+0x1f>
xor    %eax,%eax
call   1030 <DoMatch@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wildmat(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %5
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 42
br i1 %10, label %11, label %18
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %18
17: ; preds = %11
store i32 1, i32* %3
br label %24
18: ; preds = %11, %2
%19 = load i8*, i8** %4
%20 = load i8*, i8** %5
%21 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @DoMatch to i32 (i8*, i8*, ...)*)(i8* %19, i8* %20)
%22 = icmp eq i32 %21, 1
%23 = zext i1 %22 to i32
store i32 %23, i32* %3
br label %24
24: ; preds = %18, %17
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @wildmat(i8* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 42
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5, %2
%10 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @DoMatch to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %5, %9
%14 = phi i32 [ %12, %9 ], [ 1, %5 ]
ret i32 %14
}
int bgscan_init(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
define i32 @bgscan_init(%struct.wpa_supplicant* %0, %struct.wpa_ssid* %1) {
%3 = alloca %struct.wpa_supplicant*
%4 = alloca %struct.wpa_ssid*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %3
store %struct.wpa_ssid* %1, %struct.wpa_ssid** %4
ret i32 0
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%struct.wpa_ssid = type opaque
define i32 @bgscan_init(%struct.wpa_supplicant* nocapture readnone %0, %struct.wpa_ssid* nocapture readnone %1) {
ret i32 0
}
int main(void) { return 10; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("First OSS code\n");
  printf("Third OSS Code\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"First OSS code\0A\00"
@.str.1 = [16 x i8] c"Third OSS Code\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [15 x i8] c"First OSS code\00"
@str.2 = [15 x i8] c"Third OSS Code\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void null_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @null_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ MIXPAGE_ChangeTemplate(int);
void PAGE_MixTemplateInit(int page) {
  (void)page;
  MIXPAGE_ChangeTemplate(1);
}


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

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

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

LLVM IR (-O2):
define void @PAGE_MixTemplateInit(i32 %0) {
%2 = tail call i32 @MIXPAGE_ChangeTemplate(i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int trio_vsnprintf(char *, size_t, char const *, int /*<<< orphan*/);
int _vsnprintf(char *buffer, size_t bufferSize, const char *format,
               va_list args) {
  return trio_vsnprintf(buffer, bufferSize, format, args);
}


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

x86 assembly (clang, -O2):
<_vsnprintf>:
jmp    1030 <trio_vsnprintf@plt>

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

LLVM IR (-O2):
define i32 @_vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 @trio_vsnprintf(i8* %0, i64 %1, i8* %2, i32 %3)
ret i32 %5
}
void CacheWeaponModel(int i) {}


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

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

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

LLVM IR (-O2):
define void @CacheWeaponModel(i32 %0) {
ret void
}
void main(int argc, char **argv) { return; }


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

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

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

LLVM IR (-O2):
define void @main(i32 %0, i8** nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int main() {
  int i;
  for (i = 0; i < 48500000; i++)
    putchar(251);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x2e40d20,-0x8(%rbp)
jge    114b <main+0x3b>
mov    $0xfb,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x2e40d20,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0xfb,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 251)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 48500000
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ TCFLSH;
int ioctl(int, int /*<<< orphan*/, int);
int __libc_tcflush(int fd, int queue_selector) {
  return ioctl(fd, TCFLSH, queue_selector);
}


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

x86 assembly (clang, -O2):
<__libc_tcflush>:
mov    %esi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%esi
jmp    1030 <ioctl@plt>

LLVM IR (-O0):
@TCFLSH = global i32 0
define i32 @__libc_tcflush(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* @TCFLSH
%7 = load i32, i32* %4
%8 = call i32 @ioctl(i32 %5, i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@TCFLSH = global i32 0
define i32 @__libc_tcflush(i32 %0, i32 %1) {
%3 = load i32, i32* @TCFLSH
%4 = tail call i32 @ioctl(i32 %0, i32 %3, i32 %1)
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char const *, struct stat *);
bool file_exists(const char *filename) {
  int status = 0;
  struct stat buf;
  if ((filename == NULL) || (*filename == '\0')) {
    return false;
  }
  status = stat(filename, &buf);
  if (status == 0) {
    return true;
  } else {
    return false;
  }
}


x86 assembly (clang, -O0):
<file_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     113e <file_exists+0x2e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    114a <file_exists+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    1177 <file_exists+0x67>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <stat@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1170 <file_exists+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1177 <file_exists+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_exists>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
je     112e <file_exists+0x1e>
cmpb   $0x0,(%rdi)
je     112e <file_exists+0x1e>
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca %struct.stat
store i8* %0, i8** %3
store i32 0, i32* %4
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %13, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %8, %1
store i32 0, i32* %2
br label %21
14: ; preds = %8
%15 = load i8*, i8** %3
%16 = call i32 @stat(i8* %15, %struct.stat* %5)
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %14
store i32 1, i32* %2
br label %21
20: ; preds = %14
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19, %13
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = icmp eq i8* %0, null
br i1 %4, label %12, label %5
5: ; preds = %1
%6 = load i8, i8* %0
%7 = icmp eq i8 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = call i32 @stat(i8* %0, %struct.stat* %2)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %1, %5
%13 = phi i32 [ 0, %5 ], [ 0, %1 ], [ %11, %8 ]
ret i32 %13
}
void IntDefaultHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<IntDefaultHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <IntDefaultHandler+0x9>
jmp    1109 <IntDefaultHandler+0x9>

x86 assembly (clang, -O2):
<IntDefaultHandler>:
jmp    1100 <IntDefaultHandler>

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

LLVM IR (-O2):
define void @IntDefaultHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}