xunge/DecIR huggingface dataset:
void RTPathAppDocs(void) {}


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

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

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

LLVM IR (-O2):
define void @RTPathAppDocs() {
ret void
}
void wbinvd() { asm volatile("wbinvd"); }


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

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

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

LLVM IR (-O2):
define void @wbinvd() {
tail call void asm sideeffect "wbinvd", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
double exp(double);
double func1(double x) { return exp(x); }


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

x86 assembly (clang, -O2):
<func1>:
jmp    1030 <exp@plt>

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

LLVM IR (-O2):
define double @func1(double %0) {
%2 = tail call double @exp(double %0)
ret double %2
}
void unsigned_char_and_signed_char_unsigned_char(unsigned char *LHS,
                                                 unsigned char RHS) {
  (*LHS) &= RHS;
}


x86 assembly (clang, -O0):
<unsigned_char_and_signed_char_unsigned_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%edx
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
and    %edx,%ecx
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsigned_char_and_signed_char_unsigned_char>:
and    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @unsigned_char_and_signed_char_unsigned_char(i8* %0, i8 zeroext %1) {
%3 = alloca i8*
%4 = alloca i8
store i8* %0, i8** %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = and i32 %9, %6
%11 = trunc i32 %10 to i8
store i8 %11, i8* %7
ret void
}

LLVM IR (-O2):
define void @unsigned_char_and_signed_char_unsigned_char(i8* nocapture %0, i8 zeroext %1) {
%3 = load i8, i8* %0
%4 = and i8 %3, %1
store i8 %4, i8* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ os_puts(unsigned char *);
void supcon_puts(unsigned char *c) { os_puts(c); }


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

x86 assembly (clang, -O2):
<supcon_puts>:
jmp    1030 <os_puts@plt>

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

LLVM IR (-O2):
define void @supcon_puts(i8* %0) {
%2 = tail call i32 @os_puts(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calc1_parse();
int /*<<< orphan*/ feof(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main(void) {
  while (!feof(stdin)) {
    calc1_parse();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
call   1040 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1152 <main+0x32>
jmp    115e <main+0x3e>
mov    $0x0,%al
call   1030 <calc1_parse@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2ec0(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%edi
call   1040 <feof@plt>
test   %eax,%eax
jne    1144 <main+0x24>
xor    %eax,%eax
call   1030 <calc1_parse@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %7, %0
%3 = load i32, i32* @stdin
%4 = call i32 @feof(i32 %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @calc1_parse()
br label %2
9: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @feof(i32 %1)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %0, %4
%5 = tail call i32 (...) @calc1_parse()
%6 = load i32, i32* @stdin
%7 = tail call i32 @feof(i32 %6)
%8 = icmp eq i32 %7, 0
br i1 %8, label %4, label %9
9: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ testGetKeys();
int main(int argc, char *argv[]) { testGetKeys(); }


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @testGetKeys()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fabs(double);
double log(int /*<<< orphan*/);
double log_conv(double x) {
  double temp;
  temp = log(fabs(x));
  if (temp < (-0.5e+10))
    return (-1.0e+10);
  else
    return temp;
}


x86 assembly (clang, -O0):
<log_conv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1030 <fabs@plt>
mov    %eax,%edi
call   1040 <log@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb5(%rip),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1168 <log_conv+0x48>
movsd  0xeaa(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1172 <log_conv+0x52>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_conv>:
push   %rax
call   1030 <fabs@plt>
mov    %eax,%edi
call   1040 <log@plt>
movapd %xmm0,%xmm1
cmpltsd 0xec6(%rip),%xmm1
movsd  0xec6(%rip),%xmm2
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @log_conv(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %3
%5 = load double, double* %3
%6 = call i32 @fabs(double %5)
%7 = call double @log(i32 %6)
store double %7, double* %4
%8 = load double, double* %4
%9 = fcmp olt double %8, -5.000000e+09
br i1 %9, label %10, label %11
10: ; preds = %1
store double -1.000000e+10, double* %2
br label %13
11: ; preds = %1
%12 = load double, double* %4
store double %12, double* %2
br label %13
13: ; preds = %11, %10
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @log_conv(double %0) {
%2 = tail call i32 @fabs(double %0)
%3 = tail call double @log(i32 %2)
%4 = fcmp olt double %3, -5.000000e+09
%5 = select i1 %4, double -1.000000e+10, double %3
ret double %5
}
/* Type definitions */
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ None;
int /*<<< orphan*/ XFlush(int /*<<< orphan*/ *);
int /*<<< orphan*/ XWarpPointer(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/, int, int);
int /*<<< orphan*/ usleep(int);
void mouse_move(Display *display, int x, int y) {
  XWarpPointer(display, None, None, 0, 0, 0, 0, x, y);
  XFlush(display);
  usleep(1);
}


x86 assembly (clang, -O0):
<mouse_move>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e9b(%rip),%rax
mov    (%rax),%esi
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
mov    -0xc(%rbp),%r10d
mov    -0x10(%rbp),%eax
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
movl   $0x0,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1030 <XWarpPointer@plt>
mov    -0x8(%rbp),%rdi
call   1040 <XFlush@plt>
mov    $0x1,%edi
call   1050 <usleep@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mouse_move>:
push   %rbx
mov    %edx,%eax
mov    %esi,%r10d
mov    %rdi,%rbx
mov    0x2ea8(%rip),%rcx
mov    (%rcx),%edx
sub    $0x8,%rsp
mov    %edx,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
push   %rax
push   %r10
push   $0x0
call   1030 <XWarpPointer@plt>
add    $0x20,%rsp
mov    %rbx,%rdi
call   1040 <XFlush@plt>
mov    $0x1,%edi
pop    %rbx
jmp    1050 <usleep@plt>

LLVM IR (-O0):
@None = global i32 0
define void @mouse_move(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* @None
%9 = load i32, i32* @None
%10 = load i32, i32* %5
%11 = load i32, i32* %6
%12 = call i32 @XWarpPointer(i32* %7, i32 %8, i32 %9, i32 0, i32 0, i32 0, i32 0, i32 %10, i32 %11)
%13 = load i32*, i32** %4
%14 = call i32 @XFlush(i32* %13)
%15 = call i32 @usleep(i32 1)
ret void
}

LLVM IR (-O2):
@None = global i32 0
define void @mouse_move(i32* %0, i32 %1, i32 %2) {
%4 = load i32, i32* @None
%5 = tail call i32 @XWarpPointer(i32* %0, i32 %4, i32 %4, i32 0, i32 0, i32 0, i32 0, i32 %1, i32 %2)
%6 = tail call i32 @XFlush(i32* %0)
%7 = tail call i32 @usleep(i32 1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int UINT32_C(int);
uint32_t ini_func2(uint32_t x) {
  return (x ^ (x >> 27)) * UINT32_C(1566083941);
}


x86 assembly (clang, -O0):
<ini_func2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
sar    $0x1b,%ecx
xor    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x5d588b65,%edi
call   1030 <UINT32_C@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
imul   %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_func2>:
push   %rbx
mov    %edi,%ebx
sar    $0x1b,%ebx
xor    %edi,%ebx
mov    $0x5d588b65,%edi
call   1030 <UINT32_C@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ini_func2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 27
%6 = xor i32 %3, %5
%7 = call i32 @UINT32_C(i32 1566083941)
%8 = mul nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @ini_func2(i32 %0) {
%2 = ashr i32 %0, 27
%3 = xor i32 %2, %0
%4 = tail call i32 @UINT32_C(i32 1566083941)
%5 = mul nsw i32 %4, %3
ret i32 %5
}
int test_imm_70uint8_mem(unsigned char *val) {
  return ((*val) & (0x70 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_70uint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0x70,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_70uint8_mem>:
testb  $0x70,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_70uint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 112
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ gen_rand64();
double to_res53(int /*<<< orphan*/);
double genrand_res53(void) { return to_res53(gen_rand64()); }


x86 assembly (clang, -O0):
<genrand_res53>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <gen_rand64@plt>
mov    %eax,%edi
call   1030 <to_res53@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_res53>:
push   %rax
xor    %eax,%eax
call   1040 <gen_rand64@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <to_res53@plt>

LLVM IR (-O0):
define double @genrand_res53() {
%1 = call i32 (...) @gen_rand64()
%2 = call double @to_res53(i32 %1)
ret double %2
}

LLVM IR (-O2):
define double @genrand_res53() {
%1 = tail call i32 (...) @gen_rand64()
%2 = tail call double @to_res53(i32 %1)
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ setIndexToValue(int, int /*<<< orphan*/);
void setStartAddress(uint16_t newPos) { setIndexToValue(15000, newPos); }


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

x86 assembly (clang, -O2):
<setStartAddress>:
mov    %edi,%esi
mov    $0x3a98,%edi
jmp    1030 <setIndexToValue@plt>

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

LLVM IR (-O2):
define void @setStartAddress(i32 %0) {
%2 = tail call i32 @setIndexToValue(i32 15000, i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t xattr_hash(uint32_t inode) { return inode; }


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

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

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

LLVM IR (-O2):
define i32 @xattr_hash(i32 returned %0) {
ret i32 %0
}
char *skipwhite(char *cp) {
  while (*cp == ' ' || *cp == '\t')
    cp++;
  return cp;
}


x86 assembly (clang, -O0):
<skipwhite>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     112d <skipwhite+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <skipwhite+0x3d>
jmp    114e <skipwhite+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <skipwhite+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipwhite>:
mov    %rdi,%rax
jmp    1114 <skipwhite+0x14>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rax
movzbl (%rax),%ecx
cmp    $0x20,%cl
je     1110 <skipwhite+0x10>
cmp    $0x9,%cl
je     1110 <skipwhite+0x10>
ret

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

LLVM IR (-O2):
define i8* @skipwhite(i8* %0) {
br label %2
2: ; preds = %5, %1
%3 = phi i8* [ %0, %1 ], [ %6, %5 ]
%4 = load i8, i8* %3
switch i8 %4, label %7 [
i8 32, label %5
i8 9, label %5
]
5: ; preds = %2, %2
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int close(int);
int CLOSE_IF_OPEN(int fd) {
  int ret = 0;
  if (fd >= 0) {
    ret = close(fd);
  }
  return ret;
}


x86 assembly (clang, -O0):
<CLOSE_IF_OPEN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1137 <CLOSE_IF_OPEN+0x27>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CLOSE_IF_OPEN>:
test   %edi,%edi
js     1119 <CLOSE_IF_OPEN+0x9>
jmp    1030 <close@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @CLOSE_IF_OPEN(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @close(i32 %7)
store i32 %8, i32* %3
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @CLOSE_IF_OPEN(i32 %0) {
%2 = icmp sgt i32 %0, -1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @close(i32 %0)
br label %5
5: ; preds = %3, %1
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
void gtk_icon_source_get_direction() {}


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

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

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

LLVM IR (-O2):
define void @gtk_icon_source_get_direction() {
ret void
}
/* Variables and functions */
int several_traces(int, int, int);
int main(void) {
  return several_traces(42, 42, 0) + several_traces(-42, 1337, 1) +
         several_traces(4, 2, 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2a,%esi
xor    %edx,%edx
mov    %esi,%edi
call   1030 <several_traces@plt>
mov    %eax,-0xc(%rbp)
mov    $0xffffffd6,%edi
mov    $0x539,%esi
mov    $0x1,%edx
call   1030 <several_traces@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x4,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <several_traces@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    $0x2a,%edi
mov    $0x2a,%esi
xor    %edx,%edx
call   1030 <several_traces@plt>
mov    %eax,%ebx
mov    $0xffffffd6,%edi
mov    $0x539,%esi
mov    $0x1,%edx
call   1030 <several_traces@plt>
mov    %eax,%ebp
add    %ebx,%ebp
mov    $0x4,%edi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <several_traces@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @several_traces(i32 42, i32 42, i32 0)
%3 = call i32 @several_traces(i32 -42, i32 1337, i32 1)
%4 = add nsw i32 %2, %3
%5 = call i32 @several_traces(i32 4, i32 2, i32 0)
%6 = add nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @several_traces(i32 42, i32 42, i32 0)
%2 = tail call i32 @several_traces(i32 -42, i32 1337, i32 1)
%3 = add nsw i32 %2, %1
%4 = tail call i32 @several_traces(i32 4, i32 2, i32 0)
%5 = add nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int chdir(char *);
int errno;
int cd(char *next) {
  if (chdir(next) == -1)
    return errno;
  return 0;
}


x86 assembly (clang, -O0):
<cd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <chdir@plt>
cmp    $0xffffffff,%eax
jne    113f <cd+0x2f>
mov    0x2eab(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1146 <cd+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cd>:
push   %rax
call   1030 <chdir@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
jne    1128 <cd+0x18>
mov    0x2eba(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @cd(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @chdir(i8* %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = load i32, i32* @errno
store i32 %8, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %7
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @cd(i8* %0) {
%2 = tail call i32 @chdir(i8* %0)
%3 = icmp eq i32 %2, -1
%4 = load i32, i32* @errno
%5 = select i1 %3, i32 %4, i32 0
ret i32 %5
}
decode_i_cl(int a, int b) {
  b = (b >> 7) & 31;
  return 16 << b;
}


x86 assembly (clang, -O0):
<decode_i_cl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x7,%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x10,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<decode_i_cl>:
mov    %esi,%ecx
shr    $0x7,%ecx
mov    $0x10,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @decode_i_cl(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 7
%7 = and i32 %6, 31
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = shl i32 16, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @decode_i_cl(i32 %0, i32 %1) {
%3 = lshr i32 %1, 7
%4 = and i32 %3, 31
%5 = shl i32 16, %4
ret i32 %5
}
/* Variables and functions */
unsigned int _readgsbase_u32();
unsigned int read_gs_base32(void) { return _readgsbase_u32(); }


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

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

LLVM IR (-O0):
define i32 @read_gs_base32() {
%1 = call i32 (...) @_readgsbase_u32()
ret i32 %1
}

LLVM IR (-O2):
define i32 @read_gs_base32() {
%1 = tail call i32 (...) @_readgsbase_u32()
ret i32 %1
}
int main(int argc, char const *argv[]) {
  int n;
  while (~scanf("%d", &n)) {
    printf("%d\n", countOnes(n));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
xor    $0xffffffff,%eax
cmp    $0x0,%eax
je     1183 <main+0x53>
mov    -0x14(%rbp),%edi
mov    $0x0,%al
call   1050 <countOnes@plt>
mov    %eax,%esi
lea    0xe8c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1146 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xec0(%rip),%rdi
lea    0xc(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0xffffffff,%eax
je     1199 <main+0x69>
lea    0xeab(%rip),%r14
lea    0xea1(%rip),%r15
lea    0xc(%rsp),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0xc(%rsp),%edi
xor    %eax,%eax
call   1050 <countOnes@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
cmp    $0xffffffff,%eax
jne    1170 <main+0x40>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%6 = icmp eq i32 %5, -1
br i1 %6, label %13, label %7
7: ; preds = %2, %7
%8 = load i32, i32* %3
%9 = call i32 (i32, ...) bitcast (i32 (...)* @countOnes to i32 (i32, ...)*)(i32 %8)
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %7
13: ; preds = %7, %2
ret i32 0
}
/* Variables and functions */
double drand48();
double get_random() { return drand48(); }


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

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

LLVM IR (-O0):
define double @get_random() {
%1 = call double (...) @drand48()
ret double %1
}

LLVM IR (-O2):
define double @get_random() {
%1 = tail call double (...) @drand48()
ret double %1
}
/* Variables and functions */
int /*<<< orphan*/ _read_bit();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
int _read_bool() {
  do {
    if (!(_read_bit())) {
      fprintf(stderr, "'%s' check failed at line %d\n", "_read_bit()", 397);
      return 0;
    }
  } while (0);
  return 1;
}


x86 assembly (clang, -O0):
<_read_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <_read_bit@plt>
cmp    $0x0,%eax
jne    1165 <_read_bool+0x45>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
lea    0xecf(%rip),%rdx
mov    $0x18d,%ecx
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1171 <_read_bool+0x51>
jmp    116a <_read_bool+0x4a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_read_bool>:
push   %rax
xor    %eax,%eax
call   1030 <_read_bit@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
je     1135 <_read_bool+0x15>
pop    %rcx
ret
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
lea    0xebb(%rip),%rsi
lea    0xed2(%rip),%rdx
mov    $0x18d,%ecx
call   1040 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [30 x i8] c"'%s' check failed at line %d\0A\00"
@.str.1 = [12 x i8] c"_read_bit()\00"
define i32 @_read_bool() {
%1 = alloca i32
br label %2
2: ; preds = %0
%3 = call i32 (...) @_read_bit()
%4 = icmp ne i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 397)
store i32 0, i32* %1
br label %10
8: ; preds = %2
br label %9
9: ; preds = %8
store i32 1, i32* %1
br label %10
10: ; preds = %9, %5
%11 = load i32, i32* %1
ret i32 %11
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"'%s' check failed at line %d\0A\00"
@.str.1 = [12 x i8] c"_read_bit()\00"
define i32 @_read_bool() {
%1 = tail call i32 (...) @_read_bit()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 397)
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ 0, %3 ], [ 1, %0 ]
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int *);
int *fun() {
  int ret[256];
  ret[0] = 300;
  printf("addr=0x%p\n", ret);
  return ret;
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x400,%rsp
movl   $0x12c,-0x400(%rbp)
lea    -0x400(%rbp),%rsi
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    -0x400(%rbp),%rax
add    $0x400,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
push   %rbx
sub    $0x400,%rsp
movl   $0x12c,(%rsp)
lea    0xeda(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"addr=0x%p\0A\00"
define i32* @fun() {
%1 = alloca [256 x i32]
%2 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 0
store i32 300, i32* %2
%3 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 0
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 0
ret i32* %5
}

LLVM IR (-O2):
@.str = [11 x i8] c"addr=0x%p\0A\00"
define i32* @fun() {
%1 = alloca [256 x i32]
%2 = bitcast [256 x i32]* %1 to i8*
%3 = getelementptr inbounds [256 x i32], [256 x i32]* %1, i64 0, i64 0
store i32 300, i32* %3
%4 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32* %3)
ret i32* %3
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, long, long, long);
void secs2hms(long seconds, char *outstring) {
  sprintf(outstring, "%ld:%02ld:%02ld", seconds / 3600, (seconds / 60) % 60,
          seconds % 60);
}


x86 assembly (clang, -O0):
<secs2hms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
mov    $0xe10,%ecx
cqto
idiv   %rcx
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    $0x3c,%ecx
cqto
idiv   %rcx
mov    %rdx,%rcx
mov    -0x8(%rbp),%rax
mov    $0x3c,%esi
cqto
idiv   %rsi
mov    %rdx,%r8
mov    -0x18(%rbp),%rdx
lea    0xe93(%rip),%rsi
call   1030 <sprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<secs2hms>:
mov    %rsi,%r10
mov    %rdi,%r8
movabs $0x48d159e26af37c05,%rcx
59 d1 48
mov    %rdi,%rax
imul   %rcx
mov    %rdx,%r9
mov    %rdx,%rsi
shr    $0x3f,%rsi
sar    $0xa,%r9
movabs $0x8888888888888889,%rdi
88 88 88
mov    %r8,%rax
imul   %rdi
mov    %rdx,%rcx
add    %rsi,%r9
add    %r8,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x5,%rcx
add    %rax,%rcx
mov    %rcx,%rax
imul   %rdi
add    %rcx,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x5,%rdx
add    %rax,%rdx
imul   $0x3c,%rdx,%rax
imul   $0x3c,%rcx,%rdx
sub    %rax,%rcx
sub    %rdx,%r8
lea    0xe79(%rip),%rsi
mov    %r10,%rdi
mov    %r9,%rdx
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"%ld:%02ld:%02ld\00"
define void @secs2hms(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i64, i64* %3
%7 = sdiv i64 %6, 3600
%8 = load i64, i64* %3
%9 = sdiv i64 %8, 60
%10 = srem i64 %9, 60
%11 = load i64, i64* %3
%12 = srem i64 %11, 60
%13 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %7, i64 %10, i64 %12)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%ld:%02ld:%02ld\00"
define void @secs2hms(i64 %0, i8* nocapture writeonly %1) {
%3 = sdiv i64 %0, 3600
%4 = sdiv i64 %0, 60
%5 = srem i64 %4, 60
%6 = srem i64 %0, 60
%7 = tail call i32 @sprintf(i8* dereferenceable(1) %1, i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i64 %3, i64 %5, i64 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ output(int, int);
void left_backward() {
  output(4, 0);
  output(18, 1);
}


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

x86 assembly (clang, -O2):
<left_backward>:
push   %rax
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <output@plt>
mov    $0x12,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <output@plt>

LLVM IR (-O0):
define void @left_backward() {
%1 = call i32 @output(i32 4, i32 0)
%2 = call i32 @output(i32 18, i32 1)
ret void
}

LLVM IR (-O2):
define void @left_backward() {
%1 = tail call i32 @output(i32 4, i32 0)
%2 = tail call i32 @output(i32 18, i32 1)
ret void
}
/* Variables and functions */
scalar_t__ greater_than(unsigned int, int /*<<< orphan*/);
void call_greater_than_Good() {
  unsigned int idx = 0;
  if (greater_than(idx, 0)) {
    idx = idx - 1;
  }
}


x86 assembly (clang, -O0):
<call_greater_than_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <greater_than@plt>
cmp    $0x0,%rax
je     113c <call_greater_than_Good+0x2c>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x4(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_greater_than_Good>:
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <greater_than@plt>

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

LLVM IR (-O2):
define void @call_greater_than_Good() {
%1 = tail call i64 @greater_than(i32 0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ uart_puts(char *);
void help_menu() {
  uart_puts("help - show this help menu\r\n");
  uart_puts("calc - start calculator program\r\n");
  uart_puts("stop - if in calculator, quit program\r\n");
  uart_puts("blink x - blink led at x hertz; x is 2 chars max\r\n");
}


x86 assembly (clang, -O0):
<help_menu>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <uart_puts@plt>
lea    0xef6(%rip),%rdi
call   1030 <uart_puts@plt>
lea    0xf0c(%rip),%rdi
call   1030 <uart_puts@plt>
lea    0xf28(%rip),%rdi
call   1030 <uart_puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_menu>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <uart_puts@plt>
lea    0xef9(%rip),%rdi
call   1030 <uart_puts@plt>
lea    0xf0f(%rip),%rdi
call   1030 <uart_puts@plt>
lea    0xf2b(%rip),%rdi
pop    %rax
jmp    1030 <uart_puts@plt>

LLVM IR (-O0):
@.str = [29 x i8] c"help - show this help menu\0D\0A\00"
@.str.1 = [34 x i8] c"calc - start calculator program\0D\0A\00"
@.str.2 = [40 x i8] c"stop - if in calculator, quit program\0D\0A\00"
@.str.3 = [51 x i8] c"blink x - blink led at x hertz; x is 2 chars max\0D\0A\00"
define void @help_menu() {
%1 = call i32 @uart_puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @uart_puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @uart_puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @uart_puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [29 x i8] c"help - show this help menu\0D\0A\00"
@.str.1 = [34 x i8] c"calc - start calculator program\0D\0A\00"
@.str.2 = [40 x i8] c"stop - if in calculator, quit program\0D\0A\00"
@.str.3 = [51 x i8] c"blink x - blink led at x hertz; x is 2 chars max\0D\0A\00"
define void @help_menu() {
%1 = tail call i32 @uart_puts(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @uart_puts(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @uart_puts(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @uart_puts(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
ret void
}
void ab8cdefghijklmnopqrstuvwxzy() {}


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

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

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

LLVM IR (-O2):
define void @ab8cdefghijklmnopqrstuvwxzy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void version(const char *target) {
  printf("%s from "
         "wsn-tools"
         " v"
         "unk"
         "\n",
         target);
}


x86 assembly (clang, -O0):
<version>:
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):
<version>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [24 x i8] c"%s from wsn-tools vunk\0A\00"
define void @version(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void gtk_font_selection_dialog_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_font_selection_dialog_new() {
ret void
}
/* Type definitions */
struct arg_file {
  int dummy;
};

/* Variables and functions */
struct arg_file *arg_filen(char const *, char const *, char const *, int, int,
                           char const *);
struct arg_file *arg_file1(const char *shortopts, const char *longopts,
                           const char *datatype, const char *glossary) {
  return arg_filen(shortopts, longopts, datatype, 1, 1, glossary);
}


x86 assembly (clang, -O0):
<arg_file1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%r9
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1030 <arg_filen@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<arg_file1>:
mov    %rcx,%r9
mov    $0x1,%ecx
mov    $0x1,%r8d
jmp    1030 <arg_filen@plt>

LLVM IR (-O0):
%struct.arg_file = type { i32 }
define %struct.arg_file* @arg_file1(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = call %struct.arg_file* @arg_filen(i8* %9, i8* %10, i8* %11, i32 1, i32 1, i8* %12)
ret %struct.arg_file* %13
}

LLVM IR (-O2):
%struct.arg_file = type { i32 }
define %struct.arg_file* @arg_file1(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call %struct.arg_file* @arg_filen(i8* %0, i8* %1, i8* %2, i32 1, i32 1, i8* %3)
ret %struct.arg_file* %5
}
/* Variables and functions */
int /*<<< orphan*/ __WFI();
int main(void) {
  while (1)
    __WFI();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__WFI@plt>
jmp    111f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <__WFI@plt>
jmp    1120 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0, %2
%3 = call i32 (...) @__WFI()
br label %2
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = tail call i32 (...) @__WFI()
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ *fopen(char const *, char const *);
FILE *ethash_fopen(char const *file_name, char const *mode) {
  return fopen(file_name, mode);
}


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

x86 assembly (clang, -O2):
<ethash_fopen>:
jmp    1030 <fopen@plt>

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

LLVM IR (-O2):
define noalias i32* @ethash_fopen(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %0, i8* %1)
ret i32* %3
}
/* Variables and functions */
int unlink_mem_dev(char *);
int smrlog_unlink_master(char *basedir) { return unlink_mem_dev(basedir); }


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

x86 assembly (clang, -O2):
<smrlog_unlink_master>:
jmp    1030 <unlink_mem_dev@plt>

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

LLVM IR (-O2):
define i32 @smrlog_unlink_master(i8* %0) {
%2 = tail call i32 @unlink_mem_dev(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Dibujar();
int /*<<< orphan*/ cpc_ClrScr();
void JugarArcade() {
  cpc_ClrScr();
  Dibujar();
}


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

x86 assembly (clang, -O2):
<JugarArcade>:
push   %rax
xor    %eax,%eax
call   1030 <cpc_ClrScr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <Dibujar@plt>

LLVM IR (-O0):
define void @JugarArcade() {
%1 = call i32 (...) @cpc_ClrScr()
%2 = call i32 (...) @Dibujar()
ret void
}

LLVM IR (-O2):
define void @JugarArcade() {
%1 = tail call i32 (...) @cpc_ClrScr()
%2 = tail call i32 (...) @Dibujar()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int test() {
  puts("test");
  return 1;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"test\00"
define i32 @test() {
%1 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str = [5 x i8] c"test\00"
define i32 @test() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
void SplitUVPlane() {}


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

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

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

LLVM IR (-O2):
define void @SplitUVPlane() {
ret void
}
/* Type definitions */
struct jx {
  int dummy;
};

/* Variables and functions */
char *jx_lookup_string(struct jx *, char const *);
char *strdup(char const *);
char *jx_lookup_string_dup(struct jx *object, const char *key) {
  const char *str = jx_lookup_string(object, key);
  if (str) {
    return strdup(str);
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<jx_lookup_string_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <jx_lookup_string@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     115e <jx_lookup_string_dup+0x3e>
mov    -0x20(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    1166 <jx_lookup_string_dup+0x46>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jx_lookup_string_dup>:
push   %rax
call   1030 <jx_lookup_string@plt>
test   %rax,%rax
je     1134 <jx_lookup_string_dup+0x14>
mov    %rax,%rdi
pop    %rax
jmp    1040 <strdup@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.jx = type { i32 }
define i8* @jx_lookup_string_dup(%struct.jx* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca %struct.jx*
%5 = alloca i8*
%6 = alloca i8*
store %struct.jx* %0, %struct.jx** %4
store i8* %1, i8** %5
%7 = load %struct.jx*, %struct.jx** %4
%8 = load i8*, i8** %5
%9 = call i8* @jx_lookup_string(%struct.jx* %7, i8* %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = load i8*, i8** %6
%14 = call i8* @strdup(i8* %13)
store i8* %14, i8** %3
br label %16
15: ; preds = %2
store i8* null, i8** %3
br label %16
16: ; preds = %15, %12
%17 = load i8*, i8** %3
ret i8* %17
}

LLVM IR (-O2):
%struct.jx = type { i32 }
define noalias i8* @jx_lookup_string_dup(%struct.jx* %0, i8* %1) {
%3 = tail call i8* @jx_lookup_string(%struct.jx* %0, i8* %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i8* @strdup(i8* %3)
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %6, %5 ], [ null, %2 ]
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ EI();
void R_MAIN_UserInit(void) { EI(); }


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

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

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

LLVM IR (-O2):
define void @R_MAIN_UserInit() {
%1 = tail call i32 (...) @EI()
ret void
}
void gdi_fast_mutex_unlock(void) {}


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

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

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

LLVM IR (-O2):
define void @gdi_fast_mutex_unlock() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ S_Clear();
int /*<<< orphan*/ S_ClearPlaysounds();
int /*<<< orphan*/ S_StopBackgroundTrack();
void S_StopAllSounds(void) {
  S_ClearPlaysounds();
  S_Clear();
  S_StopBackgroundTrack();
}


x86 assembly (clang, -O0):
<S_StopAllSounds>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <S_ClearPlaysounds@plt>
mov    $0x0,%al
call   1050 <S_Clear@plt>
mov    $0x0,%al
call   1040 <S_StopBackgroundTrack@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<S_StopAllSounds>:
push   %rax
xor    %eax,%eax
call   1030 <S_ClearPlaysounds@plt>
xor    %eax,%eax
call   1050 <S_Clear@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <S_StopBackgroundTrack@plt>

LLVM IR (-O0):
define void @S_StopAllSounds() {
%1 = call i32 (...) @S_ClearPlaysounds()
%2 = call i32 (...) @S_Clear()
%3 = call i32 (...) @S_StopBackgroundTrack()
ret void
}

LLVM IR (-O2):
define void @S_StopAllSounds() {
%1 = tail call i32 (...) @S_ClearPlaysounds()
%2 = tail call i32 (...) @S_Clear()
%3 = tail call i32 (...) @S_StopBackgroundTrack()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G28_f(char *s) {
  debug("G28_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G28_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G28_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G28_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G28_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G28_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G28_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}