xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t len(const char *str) {
  size_t len = 0;
  while (*str++)
    len++;
  return len;
}


x86 assembly (clang, -O0):
<len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1139 <len+0x39>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <len+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<len>:
cmpb   $0x0,(%rdi)
je     111f <len+0x1f>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rdi,%rcx,1)
mov    %rax,%rcx
jne    1110 <len+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i64 @len(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i64 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
void TOSH_short_uwait_private(unsigned char u_sec) {
  while (--u_sec > 1) {
    asm("nop");
    asm("nop");
  }
  asm("nop");
  asm("nop");
  asm("nop");
  asm("nop");
  asm("nop");
  asm("nop");
}


x86 assembly (clang, -O0):
<TOSH_short_uwait_private>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
add    $0xff,%al
mov    %al,-0x1(%rbp)
movzbl %al,%eax
cmp    $0x1,%eax
jle    1125 <TOSH_short_uwait_private+0x25>
nop
nop
jmp    110a <TOSH_short_uwait_private+0xa>
nop
nop
nop
nop
nop
nop
pop    %rbp
ret

x86 assembly (clang, -O2):
<TOSH_short_uwait_private>:
add    $0xff,%dil
cmp    $0x2,%dil
jb     111c <TOSH_short_uwait_private+0x1c>
nopw   0x0(%rax,%rax,1)
nop
nop
add    $0xff,%dil
cmp    $0x1,%dil
ja     1110 <TOSH_short_uwait_private+0x10>
nop
nop
nop
nop
nop
nop
ret

LLVM IR (-O0):
define void @TOSH_short_uwait_private(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
br label %3
3: ; preds = %8, %1
%4 = load i8, i8* %2
%5 = add i8 %4, -1
store i8 %5, i8* %2
%6 = zext i8 %5 to i32
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @TOSH_short_uwait_private(i8 zeroext %0) {
%2 = add i8 %0, -1
%3 = icmp ugt i8 %2, 1
br i1 %3, label %4, label %8
4: ; preds = %1, %4
%5 = phi i8 [ %6, %4 ], [ %2, %1 ]
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
%6 = add i8 %5, -1
%7 = icmp ugt i8 %6, 1
br i1 %7, label %4, label %8
8: ; preds = %4, %1
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void *mem_create_string(char *string) {
  void *tmp = (void *)malloc(strlen(string) + 1 + sizeof(unsigned long));
  ((unsigned long *)tmp)[0] = strlen(string) + 1;
  memcpy((char *)tmp + sizeof(unsigned long), (void *)string,
         strlen(string) + 1);
  return ((char *)tmp + sizeof(unsigned long));
}


x86 assembly (clang, -O0):
<mem_create_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
add    $0x8,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x8,%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @mem_create_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add i64 %5, 1
%7 = add i64 %6, 8
%8 = call i8* @malloc(i64 %7)
store i8* %8, i8** %3
%9 = load i8*, i8** %2
%10 = call i64 @strlen(i8* %9)
%11 = add i64 %10, 1
%12 = load i8*, i8** %3
%13 = bitcast i8* %12 to i64*
%14 = getelementptr inbounds i64, i64* %13, i64 0
store i64 %11, i64* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 8
%17 = load i8*, i8** %2
%18 = load i8*, i8** %2
%19 = call i64 @strlen(i8* %18)
%20 = add i64 %19, 1
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i64 8
ret i8* %22
}

LLVM IR (-O2):
define noalias i8* @mem_create_string(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 9
%4 = tail call i8* @malloc(i64 %3)
%5 = add i64 %2, 1
%6 = bitcast i8* %4 to i64*
store i64 %5, i64* %6
%7 = getelementptr inbounds i8, i8* %4, i64 8
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %7, i8* align 1 %0, i64 %5, i1 false)
ret i8* %7
}
/* Variables and functions */
int /*<<< orphan*/ log_printf(int, char *);
int /*<<< orphan*/ netWrite(char *);
int /*<<< orphan*/ snprintf(char *, int, char *);
void sendOkwait() {
  char sendText[251];
  snprintf(sendText, 10, "OKWAIT\n");
  netWrite(sendText);
  log_printf(1, "Warten auf den anderen Spieler\n");
}


x86 assembly (clang, -O0):
<sendOkwait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x100,%rsp
lea    -0x100(%rbp),%rdi
mov    $0xa,%esi
lea    0xeb2(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x100(%rbp),%rdi
call   1050 <netWrite@plt>
mov    $0x1,%edi
lea    0xe9d(%rip),%rsi
call   1040 <log_printf@plt>
add    $0x100,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendOkwait>:
push   %rbx
sub    $0x100,%rsp
lea    0xec1(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1050 <netWrite@plt>
lea    0xeaa(%rip),%rsi
mov    $0x1,%edi
call   1040 <log_printf@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"OKWAIT\0A\00"
@.str.1 = [32 x i8] c"Warten auf den anderen Spieler\0A\00"
define void @sendOkwait() {
%1 = alloca [251 x i8]
%2 = getelementptr inbounds [251 x i8], [251 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [251 x i8], [251 x i8]* %1, i64 0, i64 0
%5 = call i32 @netWrite(i8* %4)
%6 = call i32 @log_printf(i32 1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"OKWAIT\0A\00"
@.str.1 = [32 x i8] c"Warten auf den anderen Spieler\0A\00"
define void @sendOkwait() {
%1 = alloca [251 x i8]
%2 = getelementptr inbounds [251 x i8], [251 x i8]* %1, i64 0, i64 0
%3 = call i32 @snprintf(i8* %2, i32 10, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @netWrite(i8* %2)
%5 = call i32 @log_printf(i32 1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void Usage(char *binary) {
  printf("Usage: %s [-ghi] [-{C|c} vt] [-d dev] [-s n] filename.png\n", binary);
}


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 = [59 x i8] c"Usage: %s [-ghi] [-{C|c} vt] [-d dev] [-s n] filename.png\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 ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Usage: %s [-ghi] [-{C|c} vt] [-d dev] [-s n] filename.png\0A\00"
define void @Usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RET();
int /*<<< orphan*/ hardwareTick();
int testFlag(int);
void RET_C(void) {
  hardwareTick();
  if (testFlag(4) == 1) {
    RET();
  }
}


x86 assembly (clang, -O0):
<RET_C>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <hardwareTick@plt>
mov    $0x4,%edi
call   1050 <testFlag@plt>
cmp    $0x1,%eax
jne    1155 <RET_C+0x25>
mov    $0x0,%al
call   1030 <RET@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RET_C>:
push   %rax
xor    %eax,%eax
call   1040 <hardwareTick@plt>
mov    $0x4,%edi
call   1050 <testFlag@plt>
cmp    $0x1,%eax
jne    114f <RET_C+0x1f>
xor    %eax,%eax
pop    %rcx
jmp    1030 <RET@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @RET_C() {
%1 = call i32 (...) @hardwareTick()
%2 = call i32 @testFlag(i32 4)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @RET()
br label %6
6: ; preds = %4, %0
ret void
}

LLVM IR (-O2):
define void @RET_C() {
%1 = tail call i32 (...) @hardwareTick()
%2 = tail call i32 @testFlag(i32 4)
%3 = icmp eq i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 (...) @RET()
br label %6
6: ; preds = %4, %0
ret void
}
/* Type definitions */
typedef union sigval {
  int dummy;
} sigval;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned long);
scalar_t__ time(int /*<<< orphan*/ *);
void event(union sigval arg) {
  printf("Event triggered at: %lu\n", (unsigned long)time(NULL));
}


x86 assembly (clang, -O0):
<event>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %rax,%rsi
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<event>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
%union.sigval = type { i32 }
@.str = [25 x i8] c"Event triggered at: %lu\0A\00"
define void @event(i32 %0) {
%2 = alloca %union.sigval
%3 = getelementptr inbounds %union.sigval, %union.sigval* %2, i32 0, i32 0
store i32 %0, i32* %3
%4 = call i64 @time(i32* null)
%5 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %4)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Event triggered at: %lu\0A\00"
define void @event(i32 %0) {
%2 = tail call i64 @time(i32* null)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ res_hl(int);
void opcb_a6() { res_hl(4); }


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

x86 assembly (clang, -O2):
<opcb_a6>:
mov    $0x4,%edi
jmp    1030 <res_hl@plt>

LLVM IR (-O0):
define void @opcb_a6() {
%1 = call i32 @res_hl(i32 4)
ret void
}

LLVM IR (-O2):
define void @opcb_a6() {
%1 = tail call i32 @res_hl(i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *);
void d_defer_free() { empty_log("defer_free\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"defer_free\0A\00"
define void @d_defer_free() {
%1 = call i32 @empty_log(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"defer_free\0A\00"
define void @d_defer_free() {
%1 = tail call i32 @empty_log(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ someFunc(int, int);
int main() {
  int x = 8;
  someFunc(x, 7000);
  printf("hello");
}


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"hello\00"
define i32 @main() {
%1 = tail call i32 @someFunc(i32 8, i32 7000)
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gal_fun_test_f1(int *, int);
void gal_fun_test_f2(int *p) {
  gal_fun_test_f1(p, 5);
  gal_fun_test_f1(&p[5], 5);
}


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

x86 assembly (clang, -O2):
<gal_fun_test_f2>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5,%esi
call   1030 <gal_fun_test_f1@plt>
add    $0x14,%rbx
mov    %rbx,%rdi
mov    $0x5,%esi
pop    %rbx
jmp    1030 <gal_fun_test_f1@plt>

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

LLVM IR (-O2):
define void @gal_fun_test_f2(i32* %0) {
%2 = tail call i32 @gal_fun_test_f1(i32* %0, i32 5)
%3 = getelementptr inbounds i32, i32* %0, i64 5
%4 = tail call i32 @gal_fun_test_f1(i32* %3, i32 5)
ret void
}
int FUNCTION2(int x) { return x * 5; }


x86 assembly (clang, -O0):
<FUNCTION2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x5,-0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @FUNCTION2(i32 %0) {
%2 = mul nsw i32 %0, 5
ret i32 %2
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ command;

/* Variables and functions */
int /*<<< orphan*/ SG_DXFER_TO_DEV;
int scsi_command(int, int /*<<< orphan*/, int const *, int,
                 int /*<<< orphan*/ *, int /*<<< orphan*/, int *,
                 int /*<<< orphan*/);
int kvss905c_scan(int fd, uint8_t *requestsense) {
  static const uint8_t command[] = {0x1b, 0, 0, 0, 0, 0};
  return scsi_command(fd, SG_DXFER_TO_DEV, command, sizeof(command), NULL, 0,
                      requestsense, 0);
}


x86 assembly (clang, -O0):
<kvss905c_scan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ecf(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rax
lea    0xeca(%rip),%rdx
mov    $0x18,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
mov    %rax,(%rsp)
movl   $0x0,0x8(%rsp)
call   1030 <scsi_command@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kvss905c_scan>:
push   %rax
mov    %rsi,%rax
mov    0x2edd(%rip),%rcx
mov    (%rcx),%esi
lea    0xedc(%rip),%rdx
mov    $0x18,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   $0x0
push   %rax
call   1030 <scsi_command@plt>
add    $0x10,%rsp
pop    %rcx
ret

LLVM IR (-O0):
@kvss905c_scan.command = internal constant [6 x i32] [i32 27, i32 0, i32 0, i32 0, i32 0, i32 0]
@SG_DXFER_TO_DEV = global i32 0
define i32 @kvss905c_scan(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* @SG_DXFER_TO_DEV
%7 = load i32*, i32** %4
%8 = call i32 @scsi_command(i32 %5, i32 %6, i32* getelementptr inbounds ([6 x i32], [6 x i32]* @kvss905c_scan.command, i64 0, i64 0), i32 24, i32* null, i32 0, i32* %7, i32 0)
ret i32 %8
}

LLVM IR (-O2):
@kvss905c_scan.command = internal constant [6 x i32] [i32 27, i32 0, i32 0, i32 0, i32 0, i32 0]
@SG_DXFER_TO_DEV = global i32 0
define i32 @kvss905c_scan(i32 %0, i32* %1) {
%3 = load i32, i32* @SG_DXFER_TO_DEV
%4 = tail call i32 @scsi_command(i32 %0, i32 %3, i32* getelementptr inbounds ([6 x i32], [6 x i32]* @kvss905c_scan.command, i64 0, i64 0), i32 24, i32* null, i32 0, i32* %1, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ display_handler();
int /*<<< orphan*/ initialize(int /*<<< orphan*/, char **);
int32_t main(int32_t argc, char **argv) {
  initialize(argc, argv);
  display_handler();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @initialize(i32 %6, i8** %7)
%9 = call i32 (...) @display_handler()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @initialize(i32 %0, i8** %1)
%4 = tail call i32 (...) @display_handler()
ret i32 0
}
int test_imm_92int8_reg(signed char val) {
  return ((val) & (0x92 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_92int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0x92,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_92int8_reg>:
test   $0x92,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_92int8_reg(i8 signext %0) {
%2 = and i8 %0, -110
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
size_t list_meter_uint32_t(const void *el) { return sizeof(uint32_t); }


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

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

LLVM IR (-O0):
define i64 @list_meter_uint32_t(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i64 4
}

LLVM IR (-O2):
define i64 @list_meter_uint32_t(i8* nocapture readnone %0) {
ret i64 4
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ is_done();
void quit_game(int sig) {
  is_done();
  _exit(1);
}


x86 assembly (clang, -O0):
<quit_game>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <is_done@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<quit_game>:
push   %rax
xor    %eax,%eax
call   1040 <is_done@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
define void @quit_game(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @is_done()
%4 = call i32 @_exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @quit_game(i32 %0) {
%2 = tail call i32 (...) @is_done()
%3 = tail call i32 @_exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
extern void vgEndOffScreenSH(void *oscontext, unsigned char *pixels) {
  printf("vgEndOffScreenSH not implemented!\n");
}


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"vgEndOffScreenSH not implemented!\0A\00"
define void @vgEndOffScreenSH(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"vgEndOffScreenSH not implemented!\00"
define void @vgEndOffScreenSH(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Done();
int /*<<< orphan*/ ExecuteAInstruction();
int /*<<< orphan*/ Fetch();
int /*<<< orphan*/ ValidInstructionsIncrementValue();
void RunSimpletronProgram(void) {
  do {
    Fetch();
    ExecuteAInstruction();
    ValidInstructionsIncrementValue();
  } while (!Done());
}


x86 assembly (clang, -O0):
<RunSimpletronProgram>:
push   %rbp
mov    %rsp,%rbp
jmp    1149 <RunSimpletronProgram+0x9>
mov    $0x0,%al
call   1040 <Fetch@plt>
mov    $0x0,%al
call   1050 <ExecuteAInstruction@plt>
mov    $0x0,%al
call   1060 <ValidInstructionsIncrementValue@plt>
mov    $0x0,%al
call   1030 <Done@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1149 <RunSimpletronProgram+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<RunSimpletronProgram>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <Fetch@plt>
xor    %eax,%eax
call   1050 <ExecuteAInstruction@plt>
xor    %eax,%eax
call   1060 <ValidInstructionsIncrementValue@plt>
xor    %eax,%eax
call   1030 <Done@plt>
test   %eax,%eax
je     1150 <RunSimpletronProgram+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @RunSimpletronProgram() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @Fetch()
%3 = call i32 (...) @ExecuteAInstruction()
%4 = call i32 (...) @ValidInstructionsIncrementValue()
br label %5
5: ; preds = %1
%6 = call i32 (...) @Done()
%7 = icmp ne i32 %6, 0
%8 = xor i1 %7, true
br i1 %8, label %1, label %9
9: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @RunSimpletronProgram() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @Fetch()
%3 = tail call i32 (...) @ExecuteAInstruction()
%4 = tail call i32 (...) @ValidInstructionsIncrementValue()
%5 = tail call i32 (...) @Done()
%6 = icmp eq i32 %5, 0
br i1 %6, label %1, label %7
7: ; preds = %1
ret void
}
int switch_case(int n) {
  int ret;
  switch (n) {
  case 0:
    ret = 0;
    break;
  case 1:
    ret = 2;
    break;
  case 2:
  case 3:
    ret = 5;
    break;
  case 4:
  case 5:
  case 6:
  case 7:
    ret = 8;
    break;
  case 8:
  case 9:
  case 10:
  case 11:
    ret = 10;
    break;
  case 12:
    ret = 15;
    break;
  default:
    ret = -1;
    break;
  }
  return ret;
}


x86 assembly (clang, -O0):
<switch_case>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0xc,%rax
ja     1174 <switch_case+0x74>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x0,-0x8(%rbp)
jmp    117b <switch_case+0x7b>
movl   $0x2,-0x8(%rbp)
jmp    117b <switch_case+0x7b>
movl   $0x5,-0x8(%rbp)
jmp    117b <switch_case+0x7b>
movl   $0x8,-0x8(%rbp)
jmp    117b <switch_case+0x7b>
movl   $0xa,-0x8(%rbp)
jmp    117b <switch_case+0x7b>
movl   $0xf,-0x8(%rbp)
jmp    117b <switch_case+0x7b>
movl   $0xffffffff,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_case>:
mov    $0xffffffff,%eax
cmp    $0xc,%edi
ja     1117 <switch_case+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

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

LLVM IR (-O2):
@switch.table.switch_case = [13 x i32] [i32 0, i32 2, i32 5, i32 5, i32 8, i32 8, i32 8, i32 8, i32 10, i32 10, i32 10, i32 10, i32 15]
define i32 @switch_case(i32 %0) {
%2 = icmp ult i32 %0, 13
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = getelementptr inbounds [13 x i32], [13 x i32]* @switch.table.switch_case, i64 0, i64 %4
%6 = load i32, i32* %5
br label %7
7: ; preds = %1, %3
%8 = phi i32 [ %6, %3 ], [ -1, %1 ]
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ ENGINE;

/* Variables and functions */
int /*<<< orphan*/ ERR_GMP_error(int, int, char *, int);
int e_gmp_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void)) {
  int to_return = 1;
  switch (cmd) {
  default:
    ERR_GMP_error((100), (100),
                  "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                  "outputs/2022-01-22/02-19-57/repos/Orav/kbengine/refs/heads/"
                  "master/kbe/src/lib/dependencies/openssl/engines/e_gmp.c",
                  256);
    to_return = 0;
    break;
  }
  return to_return;
}


x86 assembly (clang, -O0):
<e_gmp_ctrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    $0x64,%esi
lea    0xec2(%rip),%rdx
mov    $0x100,%ecx
mov    %esi,%edi
call   1030 <ERR_GMP_error@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<e_gmp_ctrl>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0x64,%edi
mov    $0x64,%esi
mov    $0x100,%ecx
call   1030 <ERR_GMP_error@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [171 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Orav/kbengine/refs/heads/master/kbe/src/lib/dependencies/openssl/engines/e_gmp.c\00"
define i32 @e_gmp_ctrl(i32* %0, i32 %1, i64 %2, i8* %3, void ()* %4) {
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i64
%9 = alloca i8*
%10 = alloca void ()*
%11 = alloca i32
store i32* %0, i32** %6
store i32 %1, i32* %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store void ()* %4, void ()** %10
store i32 1, i32* %11
%12 = load i32, i32* %7
switch i32 %12, label %13 [
]
13: ; preds = %5
%14 = call i32 @ERR_GMP_error(i32 100, i32 100, i8* getelementptr inbounds ([171 x i8], [171 x i8]* @.str, i64 0, i64 0), i32 256)
store i32 0, i32* %11
br label %15
15: ; preds = %13
%16 = load i32, i32* %11
ret i32 %16
}

LLVM IR (-O2):
@.str = [171 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/Orav/kbengine/refs/heads/master/kbe/src/lib/dependencies/openssl/engines/e_gmp.c\00"
define i32 @e_gmp_ctrl(i32* nocapture readnone %0, i32 %1, i64 %2, i8* nocapture readnone %3, void ()* nocapture readnone %4) {
%6 = tail call i32 @ERR_GMP_error(i32 100, i32 100, i8* getelementptr inbounds ([171 x i8], [171 x i8]* @.str, i64 0, i64 0), i32 256)
ret i32 0
}
double rev360(double ang) {
  while (ang < 0.)
    ang += 360.;
  while (ang > 360.)
    ang -= 360.;
  return ang;
}


x86 assembly (clang, -O0):
<rev360>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    112e <rev360+0x2e>
movsd  0xee1(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1109 <rev360+0x9>
jmp    1133 <rev360+0x33>
movsd  -0x8(%rbp),%xmm0
movsd  0xec0(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1165 <rev360+0x65>
movsd  -0x8(%rbp),%xmm0
movsd  0xea9(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1133 <rev360+0x33>
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev360>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    112a <rev360+0x2a>
movsd  0xeee(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
ja     1120 <rev360+0x20>
ucomisd 0xece(%rip),%xmm0
jbe    115a <rev360+0x5a>
movsd  0xecc(%rip),%xmm1
movsd  0xebc(%rip),%xmm2
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
addsd  %xmm1,%xmm0
ucomisd %xmm2,%xmm0
ja     1150 <rev360+0x50>
ret

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

LLVM IR (-O2):
define double @rev360(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %6, %1
%4 = phi double [ %0, %1 ], [ %8, %6 ]
%5 = fcmp ogt double %4, 3.600000e+02
br i1 %5, label %10, label %14
6: ; preds = %1, %6
%7 = phi double [ %8, %6 ], [ %0, %1 ]
%8 = fadd double %7, 3.600000e+02
%9 = fcmp olt double %8, 0.000000e+00
br i1 %9, label %6, label %3
10: ; preds = %3, %10
%11 = phi double [ %12, %10 ], [ %4, %3 ]
%12 = fadd double %11, -3.600000e+02
%13 = fcmp ogt double %12, 3.600000e+02
br i1 %13, label %10, label %14
14: ; preds = %10, %3
%15 = phi double [ %4, %3 ], [ %12, %10 ]
ret double %15
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ usage_word_format();
void usage(char **argv) {
  fprintf(stderr,
          "Usage: %s [-d] [-v] [-W<input word format>] [-X<output word "
          "format>] <password> <input file> <output file>\n\n",
          argv[0]);
  usage_word_format();
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
lea    0xead(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1050 <usage_word_format@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2ea8(%rip),%rax
mov    (%rax),%eax
mov    (%rdi),%rdx
lea    0xebc(%rip),%rsi
mov    %eax,%edi
call   1030 <fprintf@plt>
xor    %eax,%eax
call   1050 <usage_word_format@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [109 x i8] c"Usage: %s [-d] [-v] [-W<input word format>] [-X<output word format>] <password> <input file> <output file>\0A\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i32, i32* @stderr
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = call i32 (...) @usage_word_format()
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [109 x i8] c"Usage: %s [-d] [-v] [-W<input word format>] [-X<output word format>] <password> <input file> <output file>\0A\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i32, i32* @stderr
%3 = load i8*, i8** %0
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([109 x i8], [109 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 (...) @usage_word_format()
%6 = tail call i32 @exit(i32 1)
unreachable
}
void gtk_about_dialog_set_logo_icon_name() {}


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

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

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

LLVM IR (-O2):
define void @gtk_about_dialog_set_logo_icon_name() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __stpcpy(char *, char const *);
char *strcpy(char *restrict dest, const char *restrict src) {
  __stpcpy(dest, src);
  return dest;
}


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

x86 assembly (clang, -O2):
<strcpy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <__stpcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @strcpy(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @__stpcpy(i8* %5, i8* %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @strcpy(i8* noalias returned %0, i8* noalias %1) {
%3 = tail call i32 @__stpcpy(i8* %0, i8* %1)
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int foo(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/,
        int /*<<< orphan*/);
int bar(__m128 x1, __m128 x2, __m128 x3, __m128 x4) {
  return foo(x1, x2, x3, x4);
}


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

x86 assembly (clang, -O2):
<bar>:
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @bar(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @foo(i32 %0, i32 %1, i32 %2, i32 %3)
ret i32 %5
}
void hblank(void) {}


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

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

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

LLVM IR (-O2):
define void @hblank() {
ret void
}
/* Variables and functions */
char *read_description_abbr(char **);
char *read_description_numeric_abbr(char **);
char *read_description(char **ptr) {
  if (**ptr == '<') {
    return read_description_numeric_abbr(ptr);
  } else {
    return read_description_abbr(ptr);
  }
}


x86 assembly (clang, -O0):
<read_description>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x3c,%eax
jne    1151 <read_description+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <read_description_numeric_abbr@plt>
mov    %rax,-0x8(%rbp)
jmp    115e <read_description+0x3e>
mov    -0x10(%rbp),%rdi
call   1040 <read_description_abbr@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_description>:
mov    (%rdi),%rax
cmpb   $0x3c,(%rax)
jne    112d <read_description+0xd>
jmp    1030 <read_description_numeric_abbr@plt>
jmp    1040 <read_description_abbr@plt>

LLVM IR (-O0):
define i8* @read_description(i8** %0) {
%2 = alloca i8*
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = load i8*, i8** %4
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 60
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8**, i8*** %3
%11 = call i8* @read_description_numeric_abbr(i8** %10)
store i8* %11, i8** %2
br label %15
12: ; preds = %1
%13 = load i8**, i8*** %3
%14 = call i8* @read_description_abbr(i8** %13)
store i8* %14, i8** %2
br label %15
15: ; preds = %12, %9
%16 = load i8*, i8** %2
ret i8* %16
}

LLVM IR (-O2):
define i8* @read_description(i8** %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 60
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i8* @read_description_numeric_abbr(i8** %0)
br label %9
7: ; preds = %1
%8 = tail call i8* @read_description_abbr(i8** %0)
br label %9
9: ; preds = %7, %5
%10 = phi i8* [ %6, %5 ], [ %8, %7 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ init_smackmnt();
void init_lib(void) { init_smackmnt(); }


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

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

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

LLVM IR (-O2):
define void @init_lib() {
%1 = tail call i32 (...) @init_smackmnt()
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void h264nalst_init(uint8_t *p_start) { p_start[0] = 0; }


x86 assembly (clang, -O0):
<h264nalst_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<h264nalst_init>:
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @h264nalst_init(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
store i64 0, i64* %4
ret void
}

LLVM IR (-O2):
define void @h264nalst_init(i64* nocapture writeonly %0) {
store i64 0, i64* %0
ret void
}
void short2net(unsigned short int i, unsigned char **bufp) {
  *(*bufp + 1) = (unsigned char)i;
  i >>= 8;
  **bufp = (unsigned char)i;
  *bufp += 2;
}


x86 assembly (clang, -O0):
<short2net>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %cl,0x1(%rax)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
mov    %ax,-0x2(%rbp)
mov    -0x2(%rbp),%ax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
add    $0x2,%rcx
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<short2net>:
mov    %edi,%eax
mov    (%rsi),%rcx
mov    %al,0x1(%rcx)
mov    (%rsi),%rcx
mov    %ah,(%rcx)
addq   $0x2,(%rsi)
ret

LLVM IR (-O0):
define void @short2net(i16 zeroext %0, i8** %1) {
%3 = alloca i16
%4 = alloca i8**
store i16 %0, i16* %3
store i8** %1, i8*** %4
%5 = load i16, i16* %3
%6 = trunc i16 %5 to i8
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8 %6, i8* %9
%10 = load i16, i16* %3
%11 = zext i16 %10 to i32
%12 = ashr i32 %11, 8
%13 = trunc i32 %12 to i16
store i16 %13, i16* %3
%14 = load i16, i16* %3
%15 = trunc i16 %14 to i8
%16 = load i8**, i8*** %4
%17 = load i8*, i8** %16
store i8 %15, i8* %17
%18 = load i8**, i8*** %4
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i64 2
store i8* %20, i8** %18
ret void
}

LLVM IR (-O2):
define void @short2net(i16 zeroext %0, i8** nocapture %1) {
%3 = trunc i16 %0 to i8
%4 = load i8*, i8** %1
%5 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %3, i8* %5
%6 = lshr i16 %0, 8
%7 = trunc i16 %6 to i8
%8 = load i8*, i8** %1
store i8 %7, i8* %8
%9 = load i8*, i8** %1
%10 = getelementptr inbounds i8, i8* %9, i64 2
store i8* %10, i8** %1
ret void
}
int testfunc_01(int a, int b, int c, int d) {
  return (a == b || a == d) ? b : c;
}


x86 assembly (clang, -O0):
<testfunc_01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1128 <testfunc_01+0x28>
mov    -0x4(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1133 <testfunc_01+0x33>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1139 <testfunc_01+0x39>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testfunc_01>:
mov    %edx,%eax
cmp    %ecx,%edi
cmove  %esi,%eax
cmp    %esi,%edi
cmove  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @testfunc_01(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %0, %1
%6 = icmp eq i32 %0, %3
%7 = or i1 %5, %6
%8 = select i1 %7, i32 %1, i32 %2
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
void ft_print_bottom(int x) {
  ft_putchar('\\');
  while (x > 2) {
    ft_putchar('*');
    x--;
  }
  if (x > 1) {
    ft_putchar('/');
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_print_bottom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x5c,%edi
call   1030 <ft_putchar@plt>
cmpl   $0x2,-0x4(%rbp)
jle    1147 <ft_print_bottom+0x37>
mov    $0x2a,%edi
call   1030 <ft_putchar@plt>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
jmp    1125 <ft_print_bottom+0x15>
cmpl   $0x1,-0x4(%rbp)
jle    115b <ft_print_bottom+0x4b>
mov    $0x2f,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_print_bottom>:
push   %rbx
mov    %edi,%ebx
mov    $0x5c,%edi
call   1030 <ft_putchar@plt>
cmp    $0x3,%ebx
jl     1144 <ft_print_bottom+0x34>
add    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    $0x2a,%edi
call   1030 <ft_putchar@plt>
add    $0xffffffff,%ebx
cmp    $0x3,%ebx
ja     1130 <ft_print_bottom+0x20>
jmp    1149 <ft_print_bottom+0x39>
cmp    $0x2,%ebx
jne    1153 <ft_print_bottom+0x43>
mov    $0x2f,%edi
call   1030 <ft_putchar@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_print_bottom(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @ft_putchar(i8 signext 92)
br label %4
4: ; preds = %7, %1
%5 = load i32, i32* %2
%6 = icmp sgt i32 %5, 2
br i1 %6, label %7, label %11
7: ; preds = %4
%8 = call i32 @ft_putchar(i8 signext 42)
%9 = load i32, i32* %2
%10 = add nsw i32 %9, -1
store i32 %10, i32* %2
br label %4
11: ; preds = %4
%12 = load i32, i32* %2
%13 = icmp sgt i32 %12, 1
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 @ft_putchar(i8 signext 47)
br label %16
16: ; preds = %14, %11
%17 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_print_bottom(i32 %0) {
%2 = tail call i32 @ft_putchar(i8 signext 92)
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %0, %1 ]
%6 = tail call i32 @ft_putchar(i8 signext 42)
%7 = add nsw i32 %5, -1
%8 = icmp ugt i32 %5, 3
br i1 %8, label %4, label %11
9: ; preds = %1
%10 = icmp eq i32 %0, 2
br i1 %10, label %11, label %13
11: ; preds = %4, %9
%12 = tail call i32 @ft_putchar(i8 signext 47)
br label %13
13: ; preds = %11, %9
%14 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Type definitions */
struct skiplist_iter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct skiplist_iter *);
void skiplist_iter_free(struct skiplist_iter *iter) {
  if (iter != NULL)
    free(iter);
}


x86 assembly (clang, -O0):
<skiplist_iter_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <skiplist_iter_free+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skiplist_iter_free>:
test   %rdi,%rdi
je     111a <skiplist_iter_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.skiplist_iter = type { i32 }
define void @skiplist_iter_free(%struct.skiplist_iter* %0) {
%2 = alloca %struct.skiplist_iter*
store %struct.skiplist_iter* %0, %struct.skiplist_iter** %2
%3 = load %struct.skiplist_iter*, %struct.skiplist_iter** %2
%4 = icmp ne %struct.skiplist_iter* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.skiplist_iter*, %struct.skiplist_iter** %2
%7 = call i32 @free(%struct.skiplist_iter* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.skiplist_iter = type { i32 }
define void @skiplist_iter_free(%struct.skiplist_iter* %0) {
%2 = icmp eq %struct.skiplist_iter* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.skiplist_iter* %0)
br label %5
5: ; preds = %3, %1
ret void
}