xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, int *);
int rdbyte(char **s, int *sum) {
  int x;
  sscanf(*s, "%2x", &x);
  *s += 2;
  *sum += x;
  return x;
}


x86 assembly (clang, -O0):
<rdbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    0xed2(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdbyte>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
lea    0xedc(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1030 <sscanf@plt>
addq   $0x2,(%rbx)
mov    0x4(%rsp),%eax
add    %eax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%2x\00"
define i32 @rdbyte(i8** %0, i32* %1) {
%3 = alloca i8**
%4 = alloca i32*
%5 = alloca i32
store i8** %0, i8*** %3
store i32* %1, i32** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
%8 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %5)
%9 = load i8**, i8*** %3
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8, i8* %10, i64 2
store i8* %11, i8** %9
%12 = load i32, i32* %5
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = add nsw i32 %14, %12
store i32 %15, i32* %13
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
@.str = [4 x i8] c"%2x\00"
define i32 @rdbyte(i8** nocapture %0, i32* nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i8*, i8** %0
%6 = call i32 @sscanf(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 2
store i8* %8, i8** %0
%9 = load i32, i32* %3
%10 = load i32, i32* %1
%11 = add nsw i32 %10, %9
store i32 %11, i32* %1
ret i32 %9
}
void __libc_csu_fini(void) {}


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

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

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

LLVM IR (-O2):
define void @__libc_csu_fini() {
ret void
}
/* Variables and functions */
int getCommand();
int /*<<< orphan*/ putc(int);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ sleep(int);
int spidy_main(void *unused) {
  int found = 0;
  puts("Your friendly neighborhood Spider-Man\n");
  while (!found) {
    putc(0x31);
    if (getCommand() == 0x37)
      found = 1;
    sleep(1);
  }
  putc(0x30);
  return 0;
}


x86 assembly (clang, -O0):
<spidy_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xea6(%rip),%rdi
call   1030 <puts@plt>
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1175 <spidy_main+0x35>
jmp    11a5 <spidy_main+0x65>
mov    $0x31,%edi
call   1050 <putc@plt>
mov    $0x0,%al
call   1040 <getCommand@plt>
cmp    $0x37,%eax
jne    1196 <spidy_main+0x56>
movl   $0x1,-0xc(%rbp)
mov    $0x1,%edi
call   1060 <sleep@plt>
jmp    115f <spidy_main+0x1f>
mov    $0x30,%edi
call   1050 <putc@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spidy_main>:
push   %rbx
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
mov    $0x31,%edi
call   1050 <putc@plt>
xor    %eax,%eax
call   1040 <getCommand@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1060 <sleep@plt>
cmp    $0x37,%ebx
jne    1150 <spidy_main+0x10>
mov    $0x30,%edi
call   1050 <putc@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Your friendly neighborhood Spider-Man\0A\00"
define i32 @spidy_main(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
%4 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %14, %1
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = call i32 @putc(i32 49)
%11 = call i32 (...) @getCommand()
%12 = icmp eq i32 %11, 55
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 1, i32* %3
br label %14
14: ; preds = %13, %9
%15 = call i32 @sleep(i32 1)
br label %5
16: ; preds = %5
%17 = call i32 @putc(i32 48)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"Your friendly neighborhood Spider-Man\0A\00"
define i32 @spidy_main(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
br label %3
3: ; preds = %1, %3
%4 = tail call i32 @putc(i32 49)
%5 = tail call i32 (...) @getCommand()
%6 = icmp eq i32 %5, 55
%7 = tail call i32 @sleep(i32 1)
br i1 %6, label %8, label %3
8: ; preds = %3
%9 = tail call i32 @putc(i32 48)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cMSN_Login();
void do_login(char *string) { cMSN_Login(); }


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

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

LLVM IR (-O0):
define void @do_login(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @cMSN_Login()
ret void
}

LLVM IR (-O2):
define void @do_login(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @cMSN_Login()
ret void
}
unsigned mult_by_add(unsigned a, unsigned b) {
  unsigned result = 0;
  while (a > 0) {
    result += b;
    a--;
  }
  return result;
}


x86 assembly (clang, -O0):
<mult_by_add>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    1132 <mult_by_add+0x32>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1111 <mult_by_add+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @mult_by_add(i32 %0, i32 %1) {
%3 = mul i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
int MIMEH_version(void) {
  fprintf(stdout, "mimeheaders: %s\n", "200812162102");
  return 0;
}


x86 assembly (clang, -O0):
<MIMEH_version>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
lea    0xee6(%rip),%rdx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MIMEH_version>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
lea    0xee9(%rip),%rdx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [17 x i8] c"mimeheaders: %s\0A\00"
@.str.1 = [13 x i8] c"200812162102\00"
define i32 @MIMEH_version() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [17 x i8] c"mimeheaders: %s\0A\00"
@.str.1 = [13 x i8] c"200812162102\00"
define i32 @MIMEH_version() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(int *);
void vector_int_free(int *Vector) { free(Vector); }


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

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

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

LLVM IR (-O2):
define void @vector_int_free(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ geoip_reset_dirreq_stats(int /*<<< orphan*/);
void geoip_dirreq_stats_term(void) { geoip_reset_dirreq_stats(0); }


x86 assembly (clang, -O0):
<geoip_dirreq_stats_term>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <geoip_reset_dirreq_stats@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<geoip_dirreq_stats_term>:
xor    %edi,%edi
jmp    1030 <geoip_reset_dirreq_stats@plt>

LLVM IR (-O0):
define void @geoip_dirreq_stats_term() {
%1 = call i32 @geoip_reset_dirreq_stats(i32 0)
ret void
}

LLVM IR (-O2):
define void @geoip_dirreq_stats_term() {
%1 = tail call i32 @geoip_reset_dirreq_stats(i32 0)
ret void
}
/* Variables and functions */
int rand();
int roll_dice(void) { return rand() % (12 - 1 + 1) + 1; }


x86 assembly (clang, -O0):
<roll_dice>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xc,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roll_dice>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x21,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @roll_dice() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 12
%3 = add nsw i32 %2, 1
ret i32 %3
}

LLVM IR (-O2):
define i32 @roll_dice() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 12
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ uartTx(char *, int);
void lcdBoxCursorOff() { uartTx("\xFE\x0C", 2); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"\FE\0C\00"
define void @lcdBoxCursorOff() {
%1 = call i32 @uartTx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\FE\0C\00"
define void @lcdBoxCursorOff() {
%1 = tail call i32 @uartTx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
/* Variables and functions */
double log(double);
double sqrt(double);
double aCosh(double x) { return log(x + (sqrt(x - 1) * sqrt(x + 1))); }


x86 assembly (clang, -O0):
<aCosh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xebc(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1040 <sqrt@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  0xea6(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  -0x18(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <log@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aCosh>:
sub    $0x18,%rsp
movapd %xmm0,%xmm1
movsd  0xed0(%rip),%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm3,%xmm3
ucomisd %xmm3,%xmm0
movsd  %xmm1,0x8(%rsp)
jb     114a <aCosh+0x2a>
sqrtsd %xmm0,%xmm2
jmp    115d <aCosh+0x3d>
call   1040 <sqrt@plt>
xorpd  %xmm3,%xmm3
movsd  0x8(%rsp),%xmm1
movapd %xmm0,%xmm2
movsd  0xea3(%rip),%xmm0
addsd  %xmm1,%xmm0
ucomisd %xmm3,%xmm0
jb     1175 <aCosh+0x55>
sqrtsd %xmm0,%xmm0
jmp    118c <aCosh+0x6c>
movsd  %xmm2,0x10(%rsp)
call   1040 <sqrt@plt>
movsd  0x10(%rsp),%xmm2
movsd  0x8(%rsp),%xmm1
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
movapd %xmm2,%xmm0
add    $0x18,%rsp
jmp    1030 <log@plt>

LLVM IR (-O0):
define double @aCosh(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 1.000000e+00
%6 = call double @sqrt(double %5)
%7 = load double, double* %2
%8 = fadd double %7, 1.000000e+00
%9 = call double @sqrt(double %8)
%10 = call double @llvm.fmuladd.f64(double %6, double %9, double %3)
%11 = call double @log(double %10)
ret double %11
}

LLVM IR (-O2):
define double @aCosh(double %0) {
%2 = fadd double %0, -1.000000e+00
%3 = tail call double @sqrt(double %2)
%4 = fadd double %0, 1.000000e+00
%5 = tail call double @sqrt(double %4)
%6 = tail call double @llvm.fmuladd.f64(double %3, double %5, double %0)
%7 = tail call double @log(double %6)
ret double %7
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int execvp(const char *file, char *const argv[]) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<execvp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebc(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<execvp>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @execvp(i8* %0, i8** %1) {
%3 = alloca i8*
%4 = alloca i8**
store i8* %0, i8** %3
store i8** %1, i8*** %4
%5 = load i32, i32* @ENOSYS
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @execvp(i8* nocapture readnone %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}
/* Type definitions */
struct msgu_fragment {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ msgu_fragment_inc(struct msgu_fragment *);
int msgu_fragment_check(struct msgu_fragment *f, int result) {
  if (result > 0) {
    msgu_fragment_inc(f);
    return 1;
  } else {
    return result;
  }
}


x86 assembly (clang, -O0):
<msgu_fragment_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    113e <msgu_fragment_check+0x2e>
mov    -0x10(%rbp),%rdi
call   1030 <msgu_fragment_inc@plt>
movl   $0x1,-0x4(%rbp)
jmp    1144 <msgu_fragment_check+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgu_fragment_check>:
mov    %esi,%eax
test   %esi,%esi
jle    1125 <msgu_fragment_check+0x15>
push   %rax
call   1030 <msgu_fragment_inc@plt>
mov    $0x1,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
%struct.msgu_fragment = type { i32 }
define i32 @msgu_fragment_check(%struct.msgu_fragment* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.msgu_fragment*
%5 = alloca i32
store %struct.msgu_fragment* %0, %struct.msgu_fragment** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load %struct.msgu_fragment*, %struct.msgu_fragment** %4
%10 = call i32 @msgu_fragment_inc(%struct.msgu_fragment* %9)
store i32 1, i32* %3
br label %13
11: ; preds = %2
%12 = load i32, i32* %5
store i32 %12, i32* %3
br label %13
13: ; preds = %11, %8
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
%struct.msgu_fragment = type { i32 }
define i32 @msgu_fragment_check(%struct.msgu_fragment* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @msgu_fragment_inc(%struct.msgu_fragment* %0)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ 1, %4 ], [ %1, %2 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ SIZE_MAX;
void *utf8nvalid(void const *, int /*<<< orphan*/);
void *utf8valid(const void *str) { return utf8nvalid(str, SIZE_MAX); }


x86 assembly (clang, -O0):
<utf8valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <utf8nvalid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utf8valid>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <utf8nvalid@plt>

LLVM IR (-O0):
@SIZE_MAX = global i32 0
define i8* @utf8valid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @SIZE_MAX
%5 = call i8* @utf8nvalid(i8* %3, i32 %4)
ret i8* %5
}

LLVM IR (-O2):
@SIZE_MAX = global i32 0
define i8* @utf8valid(i8* %0) {
%2 = load i32, i32* @SIZE_MAX
%3 = tail call i8* @utf8nvalid(i8* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ h265nal_init(int /*<<< orphan*/ *);
int /*<<< orphan*/ h265nal_set_type(int /*<<< orphan*/ *, int);
void h265eob_init(uint8_t *p_h265eob) {
  h265nal_init(p_h265eob);
  h265nal_set_type(p_h265eob, 37);
}


x86 assembly (clang, -O0):
<h265eob_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <h265nal_init@plt>
mov    -0x8(%rbp),%rdi
mov    $0x25,%esi
call   1030 <h265nal_set_type@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h265eob_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <h265nal_init@plt>
mov    %rbx,%rdi
mov    $0x25,%esi
pop    %rbx
jmp    1030 <h265nal_set_type@plt>

LLVM IR (-O0):
define void @h265eob_init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @h265nal_init(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @h265nal_set_type(i32* %5, i32 37)
ret void
}

LLVM IR (-O2):
define void @h265eob_init(i32* %0) {
%2 = tail call i32 @h265nal_init(i32* %0)
%3 = tail call i32 @h265nal_set_type(i32* %0, i32 37)
ret void
}
/* Variables and functions */
double fibonacci(double);
scalar_t__ isinf(double);
int /*<<< orphan*/ printf(char *, double);
void main(void) {
  double n = 1, k = 1;
  while (1) {
    k = fibonacci(n);
    if (isinf(k)) {
      break;
    }
    printf("%.0lf\n\n", k);
    n++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xec0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xeb3(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <fibonacci@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <isinf@plt>
cmp    $0x0,%rax
je     117a <main+0x4a>
jmp    11a2 <main+0x72>
movsd  -0x10(%rbp),%xmm0
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
movsd  0xe6d(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1152 <main+0x22>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movsd  0xec3(%rip),%xmm0
call   1040 <fibonacci@plt>
movsd  %xmm0,0x8(%rsp)
call   1050 <isinf@plt>
test   %rax,%rax
jne    11a5 <main+0x75>
lea    0xeaf(%rip),%rbx
movsd  0xe9f(%rip),%xmm0
movsd  %xmm0,(%rsp)
cs nopw 0x0(%rax,%rax,1)
mov    %rbx,%rdi
movsd  0x8(%rsp),%xmm0
call   1030 <printf@plt>
movsd  (%rsp),%xmm0
addsd  0xe75(%rip),%xmm0
movsd  %xmm0,(%rsp)
call   1040 <fibonacci@plt>
movsd  %xmm0,0x8(%rsp)
call   1050 <isinf@plt>
test   %rax,%rax
je     1170 <main+0x40>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%.0lf\0A\0A\00"
define void @main() {
%1 = alloca double
%2 = alloca double
store double 1.000000e+00, double* %1
store double 1.000000e+00, double* %2
br label %3
3: ; preds = %0, %10
%4 = load double, double* %1
%5 = call double @fibonacci(double %4)
store double %5, double* %2
%6 = load double, double* %2
%7 = call i64 @isinf(double %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %3
br label %15
10: ; preds = %3
%11 = load double, double* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %11)
%13 = load double, double* %1
%14 = fadd double %13, 1.000000e+00
store double %14, double* %1
br label %3
15: ; preds = %9
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%.0lf\0A\0A\00"
define void @main() {
%1 = tail call double @fibonacci(double 1.000000e+00)
%2 = tail call i64 @isinf(double %1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %12
4: ; preds = %0, %4
%5 = phi double [ %9, %4 ], [ %1, %0 ]
%6 = phi double [ %8, %4 ], [ 1.000000e+00, %0 ]
%7 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %5)
%8 = fadd double %6, 1.000000e+00
%9 = tail call double @fibonacci(double %8)
%10 = tail call i64 @isinf(double %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %4, label %12
12: ; preds = %4, %0
ret void
}
ubidi_writeReordered_49(int *dest, const unsigned char *dirProps) {
  if (!(1 & (1UL << *dirProps)))
    *dest = 1;
}


x86 assembly (clang, -O0):
<ubidi_writeReordered_49>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
and    $0x1,%rax
cmp    $0x0,%rax
jne    1137 <ubidi_writeReordered_49+0x37>
mov    -0x10(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ubidi_writeReordered_49>:
cmpb   $0x0,(%rsi)
je     110b <ubidi_writeReordered_49+0xb>
movl   $0x1,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @ubidi_writeReordered_49(i32* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %6, label %5
5: ; preds = %2
store i32 1, i32* %0
br label %6
6: ; preds = %5, %2
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
char getchar();
int /*<<< orphan*/ stdout;
int main() {
  char c;
  for (;;) {
    c = getchar();
    if (c == 'q')
      break;
    fprintf(stdout, "%c\n", c);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x71,%eax
jne    114b <main+0x2b>
jmp    1169 <main+0x49>
mov    0x2e8e(%rip),%rax
mov    (%rax),%edi
lea    0xea5(%rip),%rsi
movsbl -0x5(%rbp),%edx
call   1040 <fprintf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0x71,%al
je     1159 <main+0x39>
mov    0x2eaa(%rip),%r14
lea    0xec3(%rip),%rbx
nopl   (%rax)
mov    (%r14),%edi
movsbl %al,%edx
mov    %rbx,%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <getchar@plt>
cmp    $0x71,%al
jne    1140 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %9, %0
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 113
br i1 %7, label %8, label %9
8: ; preds = %3
br label %13
9: ; preds = %3
%10 = load i32, i32* @stdout
%11 = load i8, i8* %2
%12 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %11)
br label %3
13: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = icmp eq i8 %1, 113
br i1 %2, label %9, label %3
3: ; preds = %0, %3
%4 = phi i8 [ %7, %3 ], [ %1, %0 ]
%5 = load i32, i32* @stdout
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%7 = tail call signext i8 (...) @getchar()
%8 = icmp eq i8 %7, 113
br i1 %8, label %9, label %3
9: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
unsigned char *chreke_client_init(unsigned char *, unsigned char *,
                                  char const *, unsigned char const *, size_t);
unsigned char *ke_chreke_client_init(unsigned char *client_session,
                                     unsigned char *client_context,
                                     const char *password,
                                     const unsigned char *salt,
                                     size_t salt_len) {
  return chreke_client_init(client_session, client_context, password, salt,
                            salt_len);
}


x86 assembly (clang, -O0):
<ke_chreke_client_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <chreke_client_init@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ke_chreke_client_init>:
jmp    1030 <chreke_client_init@plt>

LLVM IR (-O0):
define i8* @ke_chreke_client_init(i8* %0, i8* %1, i8* %2, i8* %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load i8*, i8** %6
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
%16 = call i8* @chreke_client_init(i8* %11, i8* %12, i8* %13, i8* %14, i64 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @ke_chreke_client_init(i8* %0, i8* %1, i8* %2, i8* %3, i64 %4) {
%6 = tail call i8* @chreke_client_init(i8* %0, i8* %1, i8* %2, i8* %3, i64 %4)
ret i8* %6
}
/* Variables and functions */
scalar_t__ setlocale(int, char const *);
char *Ada_setlocale(int jarg1, char *jarg2) {
  char *jresult;
  int arg1;
  char *arg2 = (char *)0;
  char *result = 0;
  arg1 = (int)jarg1;
  arg2 = jarg2;
  result = (char *)setlocale(arg1, (char const *)arg2);
  jresult = result;
  return jresult;
}


x86 assembly (clang, -O0):
<Ada_setlocale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x28(%rbp),%rsi
call   1030 <setlocale@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ada_setlocale>:
jmp    1030 <setlocale@plt>

LLVM IR (-O0):
define i8* @Ada_setlocale(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
store i8* null, i8** %7
store i8* null, i8** %8
%9 = load i32, i32* %3
store i32 %9, i32* %6
%10 = load i8*, i8** %4
store i8* %10, i8** %7
%11 = load i32, i32* %6
%12 = load i8*, i8** %7
%13 = call i64 @setlocale(i32 %11, i8* %12)
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %8
%15 = load i8*, i8** %8
store i8* %15, i8** %5
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
define i8* @Ada_setlocale(i32 %0, i8* %1) {
%3 = tail call i64 @setlocale(i32 %0, i8* %1)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
char *Com_Chop(char *);
scalar_t__ isspace(char);
char *Com_Trim(char *s) {
  char *left;
  left = s;
  while (isspace(*left))
    left++;
  return Com_Chop(left);
}


x86 assembly (clang, -O0):
<Com_Trim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <isspace@plt>
cmp    $0x0,%rax
je     115b <Com_Trim+0x3b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <Com_Trim+0x14>
mov    -0x10(%rbp),%rdi
call   1030 <Com_Chop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Com_Trim>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1040 <isspace@plt>
test   %rax,%rax
jne    1130 <Com_Trim+0x10>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <Com_Chop@plt>

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

LLVM IR (-O2):
define i8* @Com_Trim(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = tail call i8* @Com_Chop(i8* %3)
ret i8* %9
}
int d_gt_cr2(double a1) { return !(((100) > (a1))); }


x86 assembly (clang, -O0):
<d_gt_cr2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_gt_cr2>:
movsd  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
ret

LLVM IR (-O0):
define i32 @d_gt_cr2(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double 1.000000e+02, %3
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @d_gt_cr2(double %0) {
%2 = fcmp uge double %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ UpnpResponse_Error(void *, int, char *);
int /*<<< orphan*/ printf(char *, int);
void UpnpConnectionManager_GetCurrentConnectionInfo(void *upnptoken,
                                                    int ConnectionID) {
  printf("UPnP Invoke: UpnpConnectionManager_GetCurrentConnectionInfo(%u);\r\n",
         ConnectionID);
  UpnpResponse_Error(upnptoken, 706, "Specified connection does not exist.");
}


x86 assembly (clang, -O0):
<UpnpConnectionManager_GetCurrentConnectionInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2c2,%esi
lea    0xef5(%rip),%rdx
call   1040 <UpnpResponse_Error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpConnectionManager_GetCurrentConnectionInfo>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf0c(%rip),%rdx
mov    %rbx,%rdi
mov    $0x2c2,%esi
pop    %rbx
jmp    1040 <UpnpResponse_Error@plt>

LLVM IR (-O0):
@.str = [67 x i8] c"UPnP Invoke: UpnpConnectionManager_GetCurrentConnectionInfo(%u);\0D\0A\00"
@.str.1 = [37 x i8] c"Specified connection does not exist.\00"
define void @UpnpConnectionManager_GetCurrentConnectionInfo(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 = call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UpnpResponse_Error(i8* %7, i32 706, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [67 x i8] c"UPnP Invoke: UpnpConnectionManager_GetCurrentConnectionInfo(%u);\0D\0A\00"
@.str.1 = [37 x i8] c"Specified connection does not exist.\00"
define void @UpnpConnectionManager_GetCurrentConnectionInfo(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([67 x i8], [67 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UpnpResponse_Error(i8* %0, i32 706, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank6(int);
void m32setParamsBXX6(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank6(val << 10);
}


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

x86 assembly (clang, -O2):
<m32setParamsBXX6>:
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank6@plt>

LLVM IR (-O0):
define void @m32setParamsBXX6(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 = shl i32 %6, 10
%8 = call i32 @chr1setBank6(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m32setParamsBXX6(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank6(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
void memset_wrapper(int64_t *dst, int64_t *src, int size) {
  memset(dst, src[0], size);
}


x86 assembly (clang, -O0):
<memset_wrapper>:
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),%rax
mov    (%rax),%esi
mov    -0x14(%rbp),%edx
call   1030 <memset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset_wrapper>:
mov    (%rsi),%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @memset_wrapper(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = load i32, i32* %6
%12 = call i32 @memset(i32* %7, i32 %10, i32 %11)
ret void
}

LLVM IR (-O2):
define void @memset_wrapper(i32* %0, i32* nocapture %1, i32 %2) {
%4 = load i32, i32* %1
%5 = tail call i32 @memset(i32* %0, i32 %4, i32 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
__attribute__((always_)) void uvisor_write8(uint8_t volatile *addr,
                                            uint8_t val) {
  *(addr) = val;
}


x86 assembly (clang, -O0):
<uvisor_write8>:
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):
<uvisor_write8>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @uvisor_write8(i32* %0, i32 %1) {
store volatile i32 %1, i32* %0
ret void
}
/* Type definitions */
struct sembuf {
  int sem_num;
  int /*<<< orphan*/ sem_flg;
  scalar_t__ sem_op;
};

/* Variables and functions */
int /*<<< orphan*/ SEM_UNDO;
int /*<<< orphan*/ semop(int, struct sembuf *, int);
void md4_sem_wait_for_zero(int semid, int semnum) {
  struct sembuf sops;
  sops.sem_num = semnum;
  sops.sem_op = 0;
  sops.sem_flg = SEM_UNDO;
  semop(semid, &sops, 1);
}


x86 assembly (clang, -O0):
<md4_sem_wait_for_zero>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x18(%rbp)
movq   $0x0,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<md4_sem_wait_for_zero>:
sub    $0x18,%rsp
mov    %esi,0x8(%rsp)
movq   $0x0,0x10(%rsp)
mov    0x2ec8(%rip),%rax
mov    (%rax),%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rsi
mov    $0x1,%edx
call   1030 <semop@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sembuf = type { i32, i32, i64 }
@SEM_UNDO = global i32 0
define void @md4_sem_wait_for_zero(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.sembuf
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 0
store i32 %6, i32* %7
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 2
store i64 0, i64* %8
%9 = load i32, i32* @SEM_UNDO
%10 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %5, i32 0, i32 1
store i32 %9, i32* %10
%11 = load i32, i32* %3
%12 = call i32 @semop(i32 %11, %struct.sembuf* %5, i32 1)
ret void
}

LLVM IR (-O2):
%struct.sembuf = type { i32, i32, i64 }
@SEM_UNDO = global i32 0
define void @md4_sem_wait_for_zero(i32 %0, i32 %1) {
%3 = alloca %struct.sembuf
%4 = bitcast %struct.sembuf* %3 to i8*
%5 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 2
store i64 0, i64* %6
%7 = load i32, i32* @SEM_UNDO
%8 = getelementptr inbounds %struct.sembuf, %struct.sembuf* %3, i64 0, i32 1
store i32 %7, i32* %8
%9 = call i32 @semop(i32 %0, %struct.sembuf* %3, i32 1)
ret void
}
int main() { __sync_synchronize(); }


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

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

LLVM IR (-O0):
define i32 @main() {
fence seq_cst
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
fence seq_cst
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_snake_hello();
int /*<<< orphan*/ snake_init();
int /*<<< orphan*/ snake_play();
void enter_snake() {
  print_snake_hello();
  snake_init();
  snake_play();
}


x86 assembly (clang, -O0):
<enter_snake>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <print_snake_hello@plt>
mov    $0x0,%al
call   1030 <snake_init@plt>
mov    $0x0,%al
call   1050 <snake_play@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<enter_snake>:
push   %rax
xor    %eax,%eax
call   1040 <print_snake_hello@plt>
xor    %eax,%eax
call   1030 <snake_init@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <snake_play@plt>

LLVM IR (-O0):
define void @enter_snake() {
%1 = call i32 (...) @print_snake_hello()
%2 = call i32 (...) @snake_init()
%3 = call i32 (...) @snake_play()
ret void
}

LLVM IR (-O2):
define void @enter_snake() {
%1 = tail call i32 (...) @print_snake_hello()
%2 = tail call i32 (...) @snake_init()
%3 = tail call i32 (...) @snake_play()
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int c, i, j;
  i = __VERIFIER_nondet_int();
  j = __VERIFIER_nondet_int();
  c = 0;
  while (i >= 0) {
    j = 0;
    while (j <= i - 1) {
      j = j + 1;
      c = c + 1;
    }
    i = i - 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1181 <main+0x71>
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1173 <main+0x63>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <main+0x3b>
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <main+0x2a>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %5, i32* %3
%6 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %6, i32* %4
store i32 0, i32* %2
br label %7
7: ; preds = %21, %0
%8 = load i32, i32* %3
%9 = icmp sge i32 %8, 0
br i1 %9, label %10, label %24
10: ; preds = %7
store i32 0, i32* %4
br label %11
11: ; preds = %16, %10
%12 = load i32, i32* %4
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 1
%15 = icmp sle i32 %12, %14
br i1 %15, label %16, label %21
16: ; preds = %11
%17 = load i32, i32* %4
%18 = add nsw i32 %17, 1
store i32 %18, i32* %4
%19 = load i32, i32* %2
%20 = add nsw i32 %19, 1
store i32 %20, i32* %2
br label %11
21: ; preds = %11
%22 = load i32, i32* %3
%23 = sub nsw i32 %22, 1
store i32 %23, i32* %3
br label %7
24: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int via_apollo_gpo_set(int, int /*<<< orphan*/);
int via_apollo_gpo4_lower(void) { return via_apollo_gpo_set(4, 0); }


x86 assembly (clang, -O0):
<via_apollo_gpo4_lower>:
push   %rbp
mov    %rsp,%rbp
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <via_apollo_gpo_set@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<via_apollo_gpo4_lower>:
mov    $0x4,%edi
xor    %esi,%esi
jmp    1030 <via_apollo_gpo_set@plt>

LLVM IR (-O0):
define i32 @via_apollo_gpo4_lower() {
%1 = call i32 @via_apollo_gpo_set(i32 4, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @via_apollo_gpo4_lower() {
%1 = tail call i32 @via_apollo_gpo_set(i32 4, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ nombre_apellido();
int main() {
  nombre_apellido();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nombre_apellido()
ret i32 0
}
void closeChildInfoPipe(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               52, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<closeChildInfoPipe>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x34,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<closeChildInfoPipe>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x34,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.closeChildInfoPipe = [19 x i8] c"closeChildInfoPipe\00"
define void @closeChildInfoPipe() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 52, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.closeChildInfoPipe, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.closeChildInfoPipe = [19 x i8] c"closeChildInfoPipe\00"
define void @closeChildInfoPipe() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 52, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @__func__.closeChildInfoPipe, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ msg;

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int, int);
int /*<<< orphan*/ snprintf(char *, int, char *, int, char *);
int makeAMsg(char *msg, char *buf, int msgType) {
  memset(msg, 0x00, sizeof(msg));
  snprintf(msg, sizeof(msg), "%04d%s", msgType, buf);
  return 0;
}


x86 assembly (clang, -O0):
<makeAMsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%r8
mov    $0x8,%esi
lea    0xea6(%rip),%rdx
call   1030 <snprintf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeAMsg>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x8,%edx
call   1040 <memset@plt>
lea    0xec1(%rip),%rdx
mov    %rbx,%rdi
mov    $0x8,%esi
mov    %ebp,%ecx
mov    %r14,%r8
call   1030 <snprintf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%04d%s\00"
define i32 @makeAMsg(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @memset(i8* %0, i32 0, i32 8)
%5 = tail call i32 @snprintf(i8* %0, i32 8, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %2, i8* %1)
ret i32 0
}