xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(char const *progname) {
  fprintf(stderr, "Usage: %s [-d dbid] [-n dbname] guid...\n", progname);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: %s [-d dbid] [-n dbname] guid...\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EX_USAGE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Usage: %s [-d dbid] [-n dbname] guid...\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EX_USAGE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int sign_superblock_node(__attribute__((unused)) void *node) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @sign_superblock_node(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ gwtDelete(int /*<<< orphan*/);
int /*<<< orphan*/ gwtEnd();
int /*<<< orphan*/ gwtHome();
void gwtHandleVT220(char c) {
  switch (c) {
  case '1':
    gwtHome();
    break;
  case '3':
    gwtDelete(0);
    break;
  case '4':
    gwtEnd();
    break;
  }
}


x86 assembly (clang, -O0):
<gwtHandleVT220>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x31,%eax
je     1175 <gwtHandleVT220+0x45>
jmp    1153 <gwtHandleVT220+0x23>
mov    -0x8(%rbp),%eax
sub    $0x33,%eax
je     1181 <gwtHandleVT220+0x51>
jmp    1164 <gwtHandleVT220+0x34>
mov    -0x8(%rbp),%eax
sub    $0x34,%eax
je     118d <gwtHandleVT220+0x5d>
jmp    1194 <gwtHandleVT220+0x64>
mov    $0x0,%al
call   1050 <gwtHome@plt>
jmp    1194 <gwtHandleVT220+0x64>
xor    %edi,%edi
call   1030 <gwtDelete@plt>
jmp    1194 <gwtHandleVT220+0x64>
mov    $0x0,%al
call   1040 <gwtEnd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gwtHandleVT220>:
cmp    $0x34,%edi
je     1146 <gwtHandleVT220+0x16>
cmp    $0x33,%edi
je     114d <gwtHandleVT220+0x1d>
cmp    $0x31,%edi
jne    1154 <gwtHandleVT220+0x24>
xor    %eax,%eax
jmp    1050 <gwtHome@plt>
xor    %eax,%eax
jmp    1040 <gwtEnd@plt>
xor    %edi,%edi
jmp    1030 <gwtDelete@plt>
ret

LLVM IR (-O0):
define void @gwtHandleVT220(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
switch i32 %4, label %11 [
i32 49, label %5
i32 51, label %7
i32 52, label %9
]
5: ; preds = %1
%6 = call i32 (...) @gwtHome()
br label %11
7: ; preds = %1
%8 = call i32 @gwtDelete(i32 0)
br label %11
9: ; preds = %1
%10 = call i32 (...) @gwtEnd()
br label %11
11: ; preds = %1, %9, %7, %5
ret void
}

LLVM IR (-O2):
define void @gwtHandleVT220(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %9 [
i32 49, label %3
i32 51, label %5
i32 52, label %7
]
3: ; preds = %1
%4 = tail call i32 (...) @gwtHome()
br label %9
5: ; preds = %1
%6 = tail call i32 @gwtDelete(i32 0)
br label %9
7: ; preds = %1
%8 = tail call i32 (...) @gwtEnd()
br label %9
9: ; preds = %1, %7, %5, %3
ret void
}
/* Variables and functions */
char *getcwd(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int do_pwd() {
  printf("%s\n", getcwd(NULL, 0));
  return 0;
}


x86 assembly (clang, -O0):
<do_pwd>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1040 <getcwd@plt>
mov    %rax,%rsi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_pwd>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1040 <getcwd@plt>
lea    0xecf(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @do_pwd() {
%1 = call i8* @getcwd(i32* null, i32 0)
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @do_pwd() {
%1 = tail call i8* @getcwd(i32* null, i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
void CR_SpriteDown(void) { WriteInstruction("inc (ix+8)"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"inc (ix+8)\00"
define void @CR_SpriteDown() {
%1 = call i32 @WriteInstruction(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"inc (ix+8)\00"
define void @CR_SpriteDown() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ FIONREAD;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ *boxUnsigned(int /*<<< orphan*/, int);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, int *);
scalar_t__ unboxUnsigned(int /*<<< orphan*/ *);
uint32_t *descriptorBytesAvailable(uint32_t context_len, uint32_t *hptr) {
  int d;
  int bytes;
  d = (int)unboxUnsigned(hptr);
  assert(d > 0);
  ioctl(d, FIONREAD, &bytes);
  return boxUnsigned(context_len, bytes);
}


x86 assembly (clang, -O0):
<descriptorBytesAvailable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <unboxUnsigned@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x14(%rbp),%edi
mov    0x2e72(%rip),%rax
mov    (%rax),%esi
lea    -0x18(%rbp),%rdx
call   1040 <ioctl@plt>
mov    -0x4(%rbp),%edi
mov    -0x18(%rbp),%esi
call   1030 <boxUnsigned@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<descriptorBytesAvailable>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    %rsi,%rdi
call   1050 <unboxUnsigned@plt>
mov    %rax,%rbx
xor    %edi,%edi
test   %ebx,%ebx
setg   %dil
call   1060 <assert@plt>
mov    0x2e84(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
mov    %ebx,%edi
call   1040 <ioctl@plt>
mov    0x4(%rsp),%esi
mov    %ebp,%edi
call   1030 <boxUnsigned@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@FIONREAD = global i32 0
define i32* @descriptorBytesAvailable(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = call i64 @unboxUnsigned(i32* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i32, i32* %5
%11 = icmp sgt i32 %10, 0
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
%14 = load i32, i32* %5
%15 = load i32, i32* @FIONREAD
%16 = call i32 @ioctl(i32 %14, i32 %15, i32* %6)
%17 = load i32, i32* %3
%18 = load i32, i32* %6
%19 = call i32* @boxUnsigned(i32 %17, i32 %18)
ret i32* %19
}

LLVM IR (-O2):
@FIONREAD = global i32 0
define i32* @descriptorBytesAvailable(i32 %0, i32* %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i64 @unboxUnsigned(i32* %1)
%6 = trunc i64 %5 to i32
%7 = icmp sgt i32 %6, 0
%8 = zext i1 %7 to i32
%9 = tail call i32 @assert(i32 %8)
%10 = load i32, i32* @FIONREAD
%11 = call i32 @ioctl(i32 %6, i32 %10, i32* %3)
%12 = load i32, i32* %3
%13 = call i32* @boxUnsigned(i32 %0, i32 %12)
ret i32* %13
}
int owHasProgramPulse(int portnum) {
  portnum = 0;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @owHasProgramPulse(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ trans(char *);
int main() {
  char mas[] = "xrrJfvuGrgveJhbLqvQfznetbeClanZjbU";
  trans(mas);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x23,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
call   1030 <trans@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movaps 0xef5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x55626a,0x1f(%rsp)
mov    %rsp,%rdi
call   1030 <trans@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.mas = [35 x i8] c"xrrJfvuGrgveJhbLqvQfznetbeClanZjbU\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [35 x i8]
store i32 0, i32* %1
%3 = bitcast [35 x i8]* %2 to i8*
%4 = getelementptr inbounds [35 x i8], [35 x i8]* %2, i64 0, i64 0
%5 = call i32 @trans(i8* %4)
ret i32 0
}

LLVM IR (-O2):
@__const.main.mas = [35 x i8] c"xrrJfvuGrgveJhbLqvQfznetbeClanZjbU\00"
define i32 @main() {
%1 = alloca [35 x i8]
%2 = getelementptr inbounds [35 x i8], [35 x i8]* %1, i64 0, i64 0
%3 = call i32 @trans(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int *);
int main() {
  int a[10];
  foo(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    %rsp,%rdi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%3 = call i32 @foo(i32* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @foo(i32* %3)
ret i32 0
}
void gtk_text_view_window_to_buffer_coords() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_view_window_to_buffer_coords() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fmaxf(double, float);
float fminf(double, int /*<<< orphan*/);
float clampf(float x) { return fminf(1.0, fmaxf(0.0, x)); }


x86 assembly (clang, -O0):
<clampf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm1
xorps  %xmm0,%xmm0
call   1040 <fmaxf@plt>
mov    %eax,%edi
movsd  0xebc(%rip),%xmm0
call   1030 <fminf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clampf>:
push   %rax
movaps %xmm0,%xmm1
xorps  %xmm0,%xmm0
call   1040 <fmaxf@plt>
movsd  0xecc(%rip),%xmm0
mov    %eax,%edi
pop    %rax
jmp    1030 <fminf@plt>

LLVM IR (-O0):
define float @clampf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @fmaxf(double 0.000000e+00, float %3)
%5 = call float @fminf(double 1.000000e+00, i32 %4)
ret float %5
}

LLVM IR (-O2):
define float @clampf(float %0) {
%2 = tail call i32 @fmaxf(double 0.000000e+00, float %0)
%3 = tail call float @fminf(double 1.000000e+00, i32 %2)
ret float %3
}
unsigned long long rdtsc() {
  long long r;
  unsigned a, d;
  asm volatile("rdtsc" : "=a"(a), "=d"(d));
  r = a | ((long long)d << 32);
  return r;
}


x86 assembly (clang, -O0):
<rdtsc>:
push   %rbp
mov    %rsp,%rbp
rdtsc
mov    %eax,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
shl    $0x20,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdtsc>:
rdtsc
mov    %eax,%eax
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @rdtsc() {
%1 = alloca i64
%2 = alloca i32
%3 = alloca i32
%4 = call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%5 = extractvalue { i32, i32 } %4, 0
%6 = extractvalue { i32, i32 } %4, 1
store i32 %5, i32* %2
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = zext i32 %7 to i64
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
%11 = shl i64 %10, 32
%12 = or i64 %8, %11
store i64 %12, i64* %1
%13 = load i64, i64* %1
ret i64 %13
}

LLVM IR (-O2):
define i64 @rdtsc() {
%1 = tail call { i32, i32 } asm sideeffect "rdtsc", "={ax},={dx},~{dirflag},~{fpsr},~{flags}"()
%2 = extractvalue { i32, i32 } %1, 0
%3 = extractvalue { i32, i32 } %1, 1
%4 = zext i32 %2 to i64
%5 = zext i32 %3 to i64
%6 = shl nuw i64 %5, 32
%7 = or i64 %6, %4
ret i64 %7
}
unsigned long hash_string(unsigned char *str) {
  unsigned long hash = 5381;
  int c;
  while ((c = *str++))
    hash = ((hash << 5) + hash) + c;
  return hash;
}


x86 assembly (clang, -O0):
<hash_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <hash_string+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash_string+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_string>:
mov    (%rdi),%cl
test   %cl,%cl
je     112c <hash_string+0x2c>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movzbl %cl,%eax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash_string+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hash_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = zext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ SPI_IOC_WR_BITS_PER_WORD;
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int spi_set_bits_per_word(int fd, __u8 bits) {
  return ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits);
}


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

x86 assembly (clang, -O2):
<spi_set_bits_per_word>:
push   %rax
mov    %esi,0x4(%rsp)
mov    0x2ecc(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
@SPI_IOC_WR_BITS_PER_WORD = global i32 0
define i32 @spi_set_bits_per_word(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = load i32, i32* @SPI_IOC_WR_BITS_PER_WORD
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %3)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t add4(uint8_t x, uint8_t y, uint8_t z, uint8_t w) {
  return x + y + z + w;
}


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

x86 assembly (clang, -O2):
<add4>:
lea    (%rdi,%rsi,1),%rax
add    %rdx,%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @add4(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
store i64 %0, i64* %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%9 = load i64, i64* %5
%10 = load i64, i64* %6
%11 = add nsw i64 %9, %10
%12 = load i64, i64* %7
%13 = add nsw i64 %11, %12
%14 = load i64, i64* %8
%15 = add nsw i64 %13, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @add4(i64 %0, i64 %1, i64 %2, i64 %3) {
%5 = add nsw i64 %1, %0
%6 = add nsw i64 %5, %2
%7 = add nsw i64 %6, %3
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ expression(int);
int /*<<< orphan*/ gen_test_jump(int, int);
int /*<<< orphan*/ needbrack(char *);
void test(int label, int ft) {
  needbrack("(");
  expression(1);
  needbrack(")");
  gen_test_jump(label, ft);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xebb(%rip),%rdi
call   1050 <needbrack@plt>
mov    $0x1,%edi
call   1040 <expression@plt>
lea    0xea7(%rip),%rdi
call   1050 <needbrack@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <gen_test_jump@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec2(%rip),%rdi
call   1050 <needbrack@plt>
mov    $0x1,%edi
call   1040 <expression@plt>
lea    0xeae(%rip),%rdi
call   1050 <needbrack@plt>
mov    %ebp,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <gen_test_jump@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"(\00"
@.str.1 = [2 x i8] c")\00"
define void @test(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @needbrack(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @expression(i32 1)
%7 = call i32 @needbrack(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = call i32 @gen_test_jump(i32 %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"(\00"
@.str.1 = [2 x i8] c")\00"
define void @test(i32 %0, i32 %1) {
%3 = tail call i32 @needbrack(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @expression(i32 1)
%5 = tail call i32 @needbrack(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @gen_test_jump(i32 %0, i32 %1)
ret void
}
void mpp_send_double(const double *data, int size, int to_pe) {}


x86 assembly (clang, -O0):
<mpp_send_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @mpp_send_double(double* %0, i32 %1, i32 %2) {
%4 = alloca double*
%5 = alloca i32
%6 = alloca i32
store double* %0, double** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
define void @mpp_send_double(double* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ error(char *);
int /*<<< orphan*/ insert8(int);
int single(int code, char *label, char *mnemo, char *oper) {
  insert8(code);
  if (oper) {
    error("no operands allowed");
  }
  return 0;
}


x86 assembly (clang, -O0):
<single>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <insert8@plt>
cmpq   $0x0,-0x20(%rbp)
je     1156 <single+0x36>
lea    0xeaf(%rip),%rdi
call   1040 <error@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<single>:
push   %rbx
mov    %rcx,%rbx
call   1030 <insert8@plt>
test   %rbx,%rbx
je     113a <single+0x1a>
lea    0xecb(%rip),%rdi
call   1040 <error@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"no operands allowed\00"
define i32 @single(i32 %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i32 %0, i32* %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %5
%10 = call i32 @insert8(i32 %9)
%11 = load i8*, i8** %8
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %15
13: ; preds = %4
%14 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %4
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"no operands allowed\00"
define i32 @single(i32 %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* readnone %3) {
%5 = tail call i32 @insert8(i32 %0)
%6 = icmp eq i8* %3, null
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %4
ret i32 0
}
char *getDelegateProgramName(char *originalName) { return "jar"; }


x86 assembly (clang, -O0):
<getDelegateProgramName>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"jar\00"
define i8* @getDelegateProgramName(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"jar\00"
define i8* @getDelegateProgramName(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
unsigned inputb_none_flags(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @inputb_none_flags() {
ret i32 0
}
/* Variables and functions */
scalar_t__ MMalloc(long);
char *strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *util_strsav(char const *s) {
  return strcpy(((char *)MMalloc((long)sizeof(char) * (long)(strlen(s) + 1))),
                s);
}


x86 assembly (clang, -O0):
<util_strsav>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
shl    $0x0,%rdi
call   1040 <MMalloc@plt>
mov    %rax,%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_strsav>:
push   %rbx
mov    %rdi,%rbx
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
call   1040 <MMalloc@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @util_strsav(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @strlen(i8* %3)
%5 = add nsw i64 %4, 1
%6 = mul nsw i64 1, %5
%7 = call i64 @MMalloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = load i8*, i8** %2
%10 = call i8* @strcpy(i8* %8, i8* %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @util_strsav(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @MMalloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
ret i8* %5
}
void g_value_transform() {}


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

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

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

LLVM IR (-O2):
define void @g_value_transform() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void __attribute__((noreturn)) usage(const char *filepath) {
  fprintf(stderr,
          "\nUsage: %s [options] hostname\n"
          "\nwhere options are:\n"
          "  -4:   only IPv4\n"
          "  -6:   only IPv6\n"
          "  -h:   show this message\n"
          "  -l N: send N bytes at a time\n"
          "  -r:   use raw\n"
          "  -R:   use raw (IP_HDRINCL)\n"
          "  -p N: connect to port N\n"
          "  -u:   use udp\n",
          filepath);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [231 x i8] c"\0AUsage: %s [options] hostname\0A\0Awhere options are:\0A -4: only IPv4\0A -6: only IPv6\0A -h: show this message\0A -l N: send N bytes at a time\0A -r: use raw\0A -R: use raw (IP_HDRINCL)\0A -p N: connect to port N\0A -u: use udp\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 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([231 x i8], [231 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [231 x i8] c"\0AUsage: %s [options] hostname\0A\0Awhere options are:\0A -4: only IPv4\0A -6: only IPv6\0A -h: show this message\0A -l N: send N bytes at a time\0A -r: use raw\0A -R: use raw (IP_HDRINCL)\0A -p N: connect to port N\0A -u: use udp\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([231 x i8], [231 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct timeval {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, struct timezone *);
double mysecond() {
  struct timeval tp;
  struct timezone tzp;
  gettimeofday(&tp, &tzp);
  return ((double)tp.tv_sec + (double)tp.tv_usec * 1.e-6);
}


x86 assembly (clang, -O0):
<mysecond>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <gettimeofday@plt>
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysecond>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <gettimeofday@plt>
cvtsi2sdq 0x10(%rsp),%xmm1
cvtsi2sdq 0x8(%rsp),%xmm0
mulsd  0xec9(%rip),%xmm0
addsd  %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
%struct.timezone = type { i32 }
define double @mysecond() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%5 = load i64, i64* %4
%6 = sitofp i64 %5 to double
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to double
%10 = call double @llvm.fmuladd.f64(double %9, double 0x3EB0C6F7A0B5ED8D, double %6)
ret double %10
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
%struct.timezone = type { i32 }
define double @mysecond() {
%1 = alloca %struct.timeval
%2 = alloca %struct.timezone
%3 = bitcast %struct.timeval* %1 to i8*
%4 = bitcast %struct.timezone* %2 to i8*
%5 = call i32 @gettimeofday(%struct.timeval* %1, %struct.timezone* %2)
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%10 = load i64, i64* %9
%11 = sitofp i64 %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %11, double 0x3EB0C6F7A0B5ED8D, double %8)
ret double %12
}
/* Variables and functions */
long long power(int, long long);
long long int calc(long long int n) {
  long long int a;
  long long int b = 0;
  a = power(5, n);
  while (a) {
    a = a / 5;
    b += a;
  }
  return b;
}


x86 assembly (clang, -O0):
<calc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x5,%edi
call   1030 <power@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1164 <calc+0x54>
mov    -0x10(%rbp),%rax
mov    $0x5,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1136 <calc+0x26>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calc>:
push   %rax
mov    %rdi,%rsi
mov    $0x5,%edi
call   1030 <power@plt>
test   %rax,%rax
je     1165 <calc+0x55>
mov    %rax,%rsi
xor    %ecx,%ecx
movabs $0x6666666666666667,%rdi
66 66 66
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rsi,%rax
imul   %rdi
mov    %rdx,%rax
shr    $0x3f,%rax
sar    %rdx
add    %rax,%rdx
add    %rdx,%rcx
add    $0x4,%rsi
cmp    $0x8,%rsi
mov    %rdx,%rsi
ja     1140 <calc+0x30>
jmp    1167 <calc+0x57>
xor    %ecx,%ecx
mov    %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @calc(i64 %0) {
%2 = tail call i64 @power(i32 5, i64 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i64 [ %7, %4 ], [ %2, %1 ]
%7 = sdiv i64 %6, 5
%8 = add nsw i64 %5, %7
%9 = add i64 %6, 4
%10 = icmp ult i64 %9, 9
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i64 [ 0, %1 ], [ %8, %4 ]
ret i64 %12
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void eval_null(void) { fprintf(stderr, "null"); }


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

x86 assembly (clang, -O2):
<eval_null>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"null\00"
define void @eval_null() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"null\00"
define void @eval_null() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
void set_tcp_header_xmas_scan() {}


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

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

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

LLVM IR (-O2):
define void @set_tcp_header_xmas_scan() {
ret void
}
void resetArray(int turtleMoves[][20]) {
  int i, j;
  for (i = 0; i < 20; i++) {
    for (j = 0; j < 20; j++)
      turtleMoves[i][j] = 0;
  }
}


x86 assembly (clang, -O0):
<resetArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x14,-0xc(%rbp)
jge    1165 <resetArray+0x65>
movl   $0x0,-0x10(%rbp)
cmpl   $0x14,-0x10(%rbp)
jge    1152 <resetArray+0x52>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
imul   $0x50,%rcx,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <resetArray+0x20>
jmp    1157 <resetArray+0x57>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <resetArray+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetArray>:
push   %rax
mov    $0x640,%edx
xor    %esi,%esi
call   1030 <memset@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @resetArray([20 x i32]* nocapture writeonly %0) {
%2 = bitcast [20 x i32]* %0 to i8*
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug_warning(char *);
int /*<<< orphan*/ h_free(void *);
void component_solid_free(void *handle) {
  if (!handle) {
    debug_warning("[component_solid_free] handle cannot be NULL");
    return;
  }
  h_free(handle);
}


x86 assembly (clang, -O0):
<component_solid_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <component_solid_free+0x28>
lea    0xec2(%rip),%rdi
call   1040 <debug_warning@plt>
jmp    1151 <component_solid_free+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <h_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<component_solid_free>:
test   %rdi,%rdi
je     112a <component_solid_free+0xa>
jmp    1030 <h_free@plt>
lea    0xecf(%rip),%rdi
jmp    1040 <debug_warning@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"[component_solid_free] handle cannot be NULL\00"
define void @component_solid_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = call i32 @debug_warning(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 @h_free(i8* %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"[component_solid_free] handle cannot be NULL\00"
define void @component_solid_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @debug_warning(i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 @h_free(i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
void ILO_Trim_CorrectionISR_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ILO_Trim_CorrectionISR_Interrupt() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int string_eq(const void *a1, const void *a2) {
  return strcmp((const char *)a1, (const char *)a2) == 0;
}


x86 assembly (clang, -O0):
<string_eq>:
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 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_eq>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @string_eq(i8* %0, i8* %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 i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @string_eq(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void XSetBackground() {}


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

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

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

LLVM IR (-O2):
define void @XSetBackground() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UART5_RX_TX_DriverIRQHandler();
__attribute__((weak)) void UART5_RX_TX_IRQHandler(void) {
  UART5_RX_TX_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @UART5_RX_TX_IRQHandler() {
%1 = call i32 (...) @UART5_RX_TX_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @UART5_RX_TX_IRQHandler() {
%1 = tail call i32 (...) @UART5_RX_TX_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_uminus(void) { write_instr(0x10); }


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

x86 assembly (clang, -O2):
<eval_uminus>:
mov    $0x10,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_uminus() {
%1 = call i32 @write_instr(i32 16)
ret void
}

LLVM IR (-O2):
define void @eval_uminus() {
%1 = tail call i32 @write_instr(i32 16)
ret void
}
/* Variables and functions */
char *date(char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, ...);
void consoleMessage(const char *text) {
  char *time = date("%H:%M:%S");
  printf("\033[22;37m");
  printf("[%s] %s", time, text);
  printf("\033[0m\n");
  free(time);
}


x86 assembly (clang, -O0):
<consoleMessage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1050 <date@plt>
mov    %rax,-0x10(%rbp)
lea    0xeb6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xea9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<consoleMessage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
lea    0xeb2(%rip),%rdi
call   1060 <date@plt>
mov    %rax,%rbx
lea    0xeac(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xea7(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xe9b(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%H:%M:%S\00"
@.str.1 = [9 x i8] c"\1B[22;37m\00"
@.str.2 = [8 x i8] c"[%s] %s\00"
@.str.3 = [6 x i8] c"\1B[0m\0A\00"
define void @consoleMessage(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = call i8* @date(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %4, i8** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %3
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %6, i8* %7)
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%10 = load i8*, i8** %3
%11 = call i32 @free(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"%H:%M:%S\00"
@.str.1 = [9 x i8] c"\1B[22;37m\00"
@.str.2 = [8 x i8] c"[%s] %s\00"
@str = [5 x i8] c"\1B[0m\00"
define void @consoleMessage(i8* %0) {
%2 = tail call i8* @date(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %2, i8* %0)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @free(i8* %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BN_ULONG;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_printf(int /*<<< orphan*/ *, char *, int /*<<< orphan*/);
void print_word(BIO *bp, BN_ULONG w) { BIO_printf(bp, "%lX", w); }


x86 assembly (clang, -O0):
<print_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <BIO_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_word>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <BIO_printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%lX\00"
define void @print_word(i32* %0, i32 %1) {
%3 = tail call i32 @BIO_printf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
int do_501() { return 501; }


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

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

LLVM IR (-O0):
define i32 @do_501() {
ret i32 501
}

LLVM IR (-O2):
define i32 @do_501() {
ret i32 501
}
void process_event_unsupported(union perf_event *event __attribute__((unused)),
                               struct perf_sample *sample
                               __attribute__((unused)),
                               struct perf_evsel *evsel __attribute__((unused)),
                               struct machine *machine __attribute__((unused)),
                               struct thread *thread __attribute__((unused))) {}


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

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

LLVM IR (-O0):
%union.perf_event = type opaque
%struct.perf_sample = type opaque
%struct.perf_evsel = type opaque
%struct.machine = type opaque
%struct.thread = type opaque
define void @process_event_unsupported(%union.perf_event* %0, %struct.perf_sample* %1, %struct.perf_evsel* %2, %struct.machine* %3, %struct.thread* %4) {
%6 = alloca %union.perf_event*
%7 = alloca %struct.perf_sample*
%8 = alloca %struct.perf_evsel*
%9 = alloca %struct.machine*
%10 = alloca %struct.thread*
store %union.perf_event* %0, %union.perf_event** %6
store %struct.perf_sample* %1, %struct.perf_sample** %7
store %struct.perf_evsel* %2, %struct.perf_evsel** %8
store %struct.machine* %3, %struct.machine** %9
store %struct.thread* %4, %struct.thread** %10
ret void
}

LLVM IR (-O2):
%union.perf_event = type opaque
%struct.perf_sample = type opaque
%struct.perf_evsel = type opaque
%struct.machine = type opaque
%struct.thread = type opaque
define void @process_event_unsupported(%union.perf_event* nocapture %0, %struct.perf_sample* nocapture %1, %struct.perf_evsel* nocapture %2, %struct.machine* nocapture %3, %struct.thread* nocapture %4) {
ret void
}
void enterBt5SysPatch(void) {}


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

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

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

LLVM IR (-O2):
define void @enterBt5SysPatch() {
ret void
}