xunge/DecIR huggingface dataset:
void yobbarays_(onoff) int *onoff;
{ yobbarays(*onoff); }


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

x86 assembly (clang, -O2):
<yobbarays_>:
mov    (%rdi),%edi
xor    %eax,%eax
jmp    1030 <yobbarays@plt>

LLVM IR (-O0):
define void @yobbarays_(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = call i32 (i32, ...) bitcast (i32 (...)* @yobbarays to i32 (i32, ...)*)(i32 %4)
ret void
}

LLVM IR (-O2):
define void @yobbarays_(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @yobbarays to i32 (i32, ...)*)(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
long long strtoll(char *, int /*<<< orphan*/ *, int);
int main(int argc, char **argv) {
  long long l;
  l = strtoll("1234567890123456789x", NULL, 10);
  printf("%lld\n", l);
  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    0xec3(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtoll@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
mov    $0xa,%edx
call   1040 <strtoll@plt>
lea    0xeda(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"1234567890123456789x\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i64 @strtoll(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32* null, i32 10)
store i64 %7, i64* %6
%8 = load i64, i64* %6
%9 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"1234567890123456789x\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 @strtoll(i8* nocapture getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32* null, i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %3)
ret i32 0
}
/* Variables and functions */
double fun(int);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char **argv) {
  int a = 1;
  printf("%f\n", fun(a));
  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)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <fun@plt>
lea    0xeb4(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%f\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
store i32 1, i32* %6
%7 = load i32, i32* %6
%8 = call double @fun(i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @fun(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ testChacha20();
int /*<<< orphan*/ testQuarterround();
int /*<<< orphan*/ testUniform();
int main(void) {
  testQuarterround();
  testChacha20();
  testUniform();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <testQuarterround@plt>
mov    $0x0,%al
call   1040 <testChacha20@plt>
mov    $0x0,%al
call   1050 <testUniform@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @testQuarterround()
%2 = call i32 (...) @testChacha20()
%3 = call i32 (...) @testUniform()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testQuarterround()
%2 = tail call i32 (...) @testChacha20()
%3 = tail call i32 (...) @testUniform()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcasecmp(char *, char *);
int isSupported(char *type) {
  if (!strcasecmp(type, "MAP"))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isSupported>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%eax
jne    1141 <isSupported+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1148 <isSupported+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isSupported>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"MAP\00"
define i32 @isSupported(i8* nocapture %0) {
%2 = tail call i32 @strcasecmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ex1();
int main() { ex1(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @ex1()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @ex1()
ret i32 0
}
void bit_clear(int *tbl, int l, unsigned int bit) {
  int b;
  b = bit % 32;
  bit = bit / 32;
  tbl[bit % l] &= ~(1 << b);
}


x86 assembly (clang, -O0):
<bit_clear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x5,%eax
mov    %eax,-0x10(%rbp)
mov    -0x14(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    -0x20(%rbp),%rax
mov    %edx,%ecx
mov    -0x18(%rbp),%edx
mov    %ecx,%ecx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_clear>:
mov    %edx,%ecx
mov    %edx,%eax
shr    $0x5,%eax
mov    $0xfffffffe,%r8d
rol    %cl,%r8d
xor    %edx,%edx
div    %esi
and    %r8d,(%rdi,%rdx,4)
ret

LLVM IR (-O0):
define void @bit_clear(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = urem i32 %8, 32
store i32 %9, i32* %7
%10 = load i32, i32* %6
%11 = udiv i32 %10, 32
store i32 %11, i32* %6
%12 = load i32, i32* %7
%13 = shl i32 1, %12
%14 = xor i32 %13, -1
%15 = load i32*, i32** %4
%16 = load i32, i32* %6
%17 = load i32, i32* %5
%18 = urem i32 %16, %17
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %15, i64 %19
%21 = load i32, i32* %20
%22 = and i32 %21, %14
store i32 %22, i32* %20
ret void
}

LLVM IR (-O2):
define void @bit_clear(i32* nocapture %0, i32 %1, i32 %2) {
%4 = and i32 %2, 31
%5 = lshr i32 %2, 5
%6 = shl nuw i32 1, %4
%7 = xor i32 %6, -1
%8 = urem i32 %5, %1
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = and i32 %11, %7
store i32 %12, i32* %10
ret void
}
/* Variables and functions */
int sdcard_main(int, char **);
int main(int argc, char **argv) { return sdcard_main(argc, argv); }


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

x86 assembly (clang, -O2):
<main>:
jmp    1030 <sdcard_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @sdcard_main(i32 %0, i8** %1)
ret i32 %3
}
/* Type definitions */
struct b_tonegen {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ setMIDIDrawBar(struct b_tonegen *, int, unsigned char);
void setDrawbar8(void *d, unsigned char v) {
  setMIDIDrawBar((struct b_tonegen *)d, 8, v);
}


x86 assembly (clang, -O0):
<setDrawbar8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
movzbl -0x9(%rbp),%edx
call   1030 <setMIDIDrawBar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setDrawbar8>:
mov    %esi,%edx
mov    $0x8,%esi
jmp    1030 <setMIDIDrawBar@plt>

LLVM IR (-O0):
%struct.b_tonegen = type { i32 }
define void @setDrawbar8(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** %3
%6 = bitcast i8* %5 to %struct.b_tonegen*
%7 = load i8, i8* %4
%8 = call i32 @setMIDIDrawBar(%struct.b_tonegen* %6, i32 8, i8 zeroext %7)
ret void
}

LLVM IR (-O2):
%struct.b_tonegen = type { i32 }
define void @setDrawbar8(i8* %0, i8 zeroext %1) {
%3 = bitcast i8* %0 to %struct.b_tonegen*
%4 = tail call i32 @setMIDIDrawBar(%struct.b_tonegen* %3, i32 8, i8 zeroext %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint;

/* Variables and functions */
int /*<<< orphan*/ syscall(int, int /*<<< orphan*/, int /*<<< orphan*/,
                           int /*<<< orphan*/);
void _exit(int code) { syscall(1, (uint)code, 0, 0); }


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x1,%edi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <syscall@plt>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
mov    %edi,%esi
mov    $0x1,%edi
xor    %edx,%edx
xor    %ecx,%ecx
call   1030 <syscall@plt>

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

LLVM IR (-O2):
define void @_exit(i32 %0) {
%2 = tail call i32 @syscall(i32 1, i32 %0, i32 0, i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ hekr_send_btye(unsigned char);
void HekrSendByte(unsigned char ch) { hekr_send_btye(ch); }


x86 assembly (clang, -O0):
<HekrSendByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <hekr_send_btye@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HekrSendByte>:
jmp    1030 <hekr_send_btye@plt>

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

LLVM IR (-O2):
define void @HekrSendByte(i8 zeroext %0) {
%2 = tail call i32 @hekr_send_btye(i8 zeroext %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ EDIPARTYNAME;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ EDIPARTYNAME_it;
EDIPARTYNAME *d2i_EDIPARTYNAME(EDIPARTYNAME **a, const unsigned char **in,
                               long len) {
  return (EDIPARTYNAME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
                                       &EDIPARTYNAME_it);
}


x86 assembly (clang, -O0):
<d2i_EDIPARTYNAME>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    0x2ea9(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_EDIPARTYNAME>:
mov    0x2ec9(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

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

LLVM IR (-O2):
@EDIPARTYNAME_it = global i32 0
define i32* @d2i_EDIPARTYNAME(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @EDIPARTYNAME_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Variables and functions */
int /*<<< orphan*/ fb_putc(char const);
void fb_puts(const char *s) {
  for (; *s != '\0'; s++)
    fb_putc(*s);
}


x86 assembly (clang, -O0):
<fb_puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1149 <fb_puts+0x39>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <fb_putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <fb_puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <fb_puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <fb_putc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <fb_puts+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @fb_puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @fb_putc(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Variables and functions */
int start_tag_close(int, int /*<<< orphan*/);
int drv_start_tag_close(int p) { return start_tag_close(p, 0); }


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

x86 assembly (clang, -O2):
<drv_start_tag_close>:
xor    %esi,%esi
jmp    1030 <start_tag_close@plt>

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

LLVM IR (-O2):
define i32 @drv_start_tag_close(i32 %0) {
%2 = tail call i32 @start_tag_close(i32 %0, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ prepGusintah(char *);
void runForeGround(int num, char *process) { prepGusintah(process); }


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

x86 assembly (clang, -O2):
<runForeGround>:
mov    %rsi,%rdi
jmp    1030 <prepGusintah@plt>

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

LLVM IR (-O2):
define void @runForeGround(i32 %0, i8* %1) {
%3 = tail call i32 @prepGusintah(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void flex_printIndent(int indent) {
  for (int i = 0; i < indent; i++) {
    printf("  ");
  }
}


x86 assembly (clang, -O0):
<flex_printIndent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1148 <flex_printIndent+0x38>
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <flex_printIndent+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<flex_printIndent>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <flex_printIndent+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <flex_printIndent+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c" \00"
define void @flex_printIndent(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %3
%6 = load i32, i32* %2
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8
%11 = load i32, i32* %3
%12 = add nsw i32 %11, 1
store i32 %12, i32* %3
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c" \00"
define void @flex_printIndent(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %4, label %3
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %0
br i1 %8, label %3, label %4
}
char *strcpy(char *dst0, char *src0) {
  char *s = dst0;
  while ((*dst0++ = *src0++))
    ;
  return s;
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1143 <strcpy+0x43>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Variables and functions */
unsigned int exynos_5410_gpio_read(unsigned int);
int /*<<< orphan*/ exynos_5410_gpio_write_mask(unsigned int, unsigned int,
                                               unsigned int);
void odroid_xu_gpio_toggle_19() {
  unsigned int bank_offset = 0x0C40;
  unsigned int bit_index = 6;
  unsigned int d = exynos_5410_gpio_read(bank_offset);
  d ^= (1U << bit_index);
  exynos_5410_gpio_write_mask(bank_offset, d, (1U << bit_index));
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_toggle_19>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xc40,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <exynos_5410_gpio_read@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
call   1030 <exynos_5410_gpio_write_mask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_toggle_19>:
push   %rax
mov    $0xc40,%edi
call   1040 <exynos_5410_gpio_read@plt>
xor    $0x40,%eax
mov    $0xc40,%edi
mov    %eax,%esi
mov    $0x40,%edx
pop    %rax
jmp    1030 <exynos_5410_gpio_write_mask@plt>

LLVM IR (-O0):
define void @odroid_xu_gpio_toggle_19() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 3136, i32* %1
store i32 6, i32* %2
%4 = load i32, i32* %1
%5 = call i32 @exynos_5410_gpio_read(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = shl i32 1, %6
%8 = load i32, i32* %3
%9 = xor i32 %8, %7
store i32 %9, i32* %3
%10 = load i32, i32* %1
%11 = load i32, i32* %3
%12 = load i32, i32* %2
%13 = shl i32 1, %12
%14 = call i32 @exynos_5410_gpio_write_mask(i32 %10, i32 %11, i32 %13)
ret void
}

LLVM IR (-O2):
define void @odroid_xu_gpio_toggle_19() {
%1 = tail call i32 @exynos_5410_gpio_read(i32 3136)
%2 = xor i32 %1, 64
%3 = tail call i32 @exynos_5410_gpio_write_mask(i32 3136, i32 %2, i32 64)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ scope1();
int /*<<< orphan*/ scope2(int);
int /*<<< orphan*/ scope3();
int main(void) {
  scope1();
  scope2(27);
  scope3();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <scope1@plt>
mov    $0x1b,%edi
call   1050 <scope2@plt>
mov    $0x0,%al
call   1030 <scope3@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <scope1@plt>
mov    $0x1b,%edi
call   1050 <scope2@plt>
xor    %eax,%eax
call   1030 <scope3@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @scope1()
%2 = call i32 @scope2(i32 27)
%3 = call i32 (...) @scope3()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @scope1()
%2 = tail call i32 @scope2(i32 27)
%3 = tail call i32 (...) @scope3()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ SOCK_STREAM;
int socket(int /*<<< orphan*/, int /*<<< orphan*/, int /*<<< orphan*/);
int Create_TCPSocket(void) {
  int sockfd;
  sockfd = socket(AF_INET, SOCK_STREAM, 0);
  return sockfd;
}


x86 assembly (clang, -O0):
<Create_TCPSocket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
mov    0x2eb0(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <socket@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Create_TCPSocket>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
jmp    1030 <socket@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @Create_TCPSocket() {
%1 = alloca i32
%2 = load i32, i32* @AF_INET
%3 = load i32, i32* @SOCK_STREAM
%4 = call i32 @socket(i32 %2, i32 %3, i32 0)
store i32 %4, i32* %1
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@AF_INET = global i32 0
@SOCK_STREAM = global i32 0
define i32 @Create_TCPSocket() {
%1 = load i32, i32* @AF_INET
%2 = load i32, i32* @SOCK_STREAM
%3 = tail call i32 @socket(i32 %1, i32 %2, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ xml_deinit();
void jogmap_rd_deinit(void) { xml_deinit(); }


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

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

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

LLVM IR (-O2):
define void @jogmap_rd_deinit() {
%1 = tail call i32 (...) @xml_deinit()
ret void
}
void rfbi_uninit_platform_driver(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ _list_del(struct list *);
int /*<<< orphan*/ list_add_tail(struct list *, struct list *);
void list_move_tail(struct list *list, struct list *head) {
  _list_del(list);
  list_add_tail(list, head);
}


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

x86 assembly (clang, -O2):
<list_move_tail>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <_list_del@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <list_add_tail@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define void @list_move_tail(%struct.list* %0, %struct.list* %1) {
%3 = alloca %struct.list*
%4 = alloca %struct.list*
store %struct.list* %0, %struct.list** %3
store %struct.list* %1, %struct.list** %4
%5 = load %struct.list*, %struct.list** %3
%6 = call i32 @_list_del(%struct.list* %5)
%7 = load %struct.list*, %struct.list** %3
%8 = load %struct.list*, %struct.list** %4
%9 = call i32 @list_add_tail(%struct.list* %7, %struct.list* %8)
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_move_tail(%struct.list* %0, %struct.list* %1) {
%3 = tail call i32 @_list_del(%struct.list* %0)
%4 = tail call i32 @list_add_tail(%struct.list* %0, %struct.list* %1)
ret void
}
extern void bar(void) {}


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

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

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

LLVM IR (-O2):
define void @bar() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ async();
int main() {
  async();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @async()
ret i32 0
}
/* Variables and functions */
int fact(int);
int C(int n, int r) { return fact(n) / (fact(r) * fact(n - r)); }


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

x86 assembly (clang, -O2):
<C>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <fact@plt>
mov    %eax,%r14d
mov    %ebx,%edi
call   1030 <fact@plt>
mov    %eax,%r15d
sub    %ebx,%ebp
mov    %ebp,%edi
call   1030 <fact@plt>
mov    %eax,%ecx
imul   %r15d,%ecx
mov    %r14d,%eax
cltd
idiv   %ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @C(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 = call i32 @fact(i32 %5)
%7 = load i32, i32* %4
%8 = call i32 @fact(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 %9, %10
%12 = call i32 @fact(i32 %11)
%13 = mul nsw i32 %8, %12
%14 = sdiv i32 %6, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @C(i32 %0, i32 %1) {
%3 = tail call i32 @fact(i32 %0)
%4 = tail call i32 @fact(i32 %1)
%5 = sub nsw i32 %0, %1
%6 = tail call i32 @fact(i32 %5)
%7 = mul nsw i32 %6, %4
%8 = sdiv i32 %3, %7
ret i32 %8
}
/* Variables and functions */
int w5100_read_byte(int);
unsigned w5100_readIR() { return w5100_read_byte(0x0015); }


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

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

LLVM IR (-O0):
define i32 @w5100_readIR() {
%1 = call i32 @w5100_read_byte(i32 21)
ret i32 %1
}

LLVM IR (-O2):
define i32 @w5100_readIR() {
%1 = tail call i32 @w5100_read_byte(i32 21)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printbubble(char *);
int /*<<< orphan*/ rendercat();
int main(int argc, char **argv) {
  printbubble(argv[1]);
  rendercat();
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
call   1030 <printbubble@plt>
xor    %eax,%eax
call   1040 <rendercat@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 = load i8**, i8*** %4
%6 = getelementptr inbounds i8*, i8** %5, i64 1
%7 = load i8*, i8** %6
%8 = call i32 @printbubble(i8* %7)
%9 = call i32 (...) @rendercat()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @printbubble(i8* %4)
%6 = tail call i32 (...) @rendercat()
ret i32 0
}
int fun1252() { return 1252; }


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

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

LLVM IR (-O0):
define i32 @fun1252() {
ret i32 1252
}

LLVM IR (-O2):
define i32 @fun1252() {
ret i32 1252
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void xfree(void *ptr) {
  free(ptr);
  ptr = NULL;
}


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

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

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

LLVM IR (-O2):
define void @xfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int no_mto(double *A) {
  double x, y;
  int i, j;
  int pts_ok = 1;
  for (i = 0; i < 7; i++)
    for (j = i + 1; j < 7; j++)
      pts_ok = 0;
}


x86 assembly (clang, -O0):
<no_mto>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x1,-0x2c(%rbp)
movl   $0x0,-0x24(%rbp)
cmpl   $0x7,-0x24(%rbp)
jge    115b <no_mto+0x5b>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
cmpl   $0x7,-0x28(%rbp)
jge    1148 <no_mto+0x48>
movl   $0x0,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1129 <no_mto+0x29>
jmp    114d <no_mto+0x4d>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1116 <no_mto+0x16>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @no_mto(double* nocapture readnone %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _kill(int, int);
void _exit(int status) { _kill(status, -1); }


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xffffffff,%esi
call   1030 <_kill@plt>

x86 assembly (clang, -O2):
<_exit>:
push   %rax
mov    $0xffffffff,%esi
call   1030 <_kill@plt>

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

LLVM IR (-O2):
define void @_exit(i32 %0) {
%2 = tail call i32 @_kill(i32 %0, i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int tar(int i) {
  if (i != 36863)
    abort();
  return -1;
}


x86 assembly (clang, -O0):
<tar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x8fff,-0x4(%rbp)
je     112f <tar+0x1f>
mov    $0x0,%al
call   1030 <abort@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tar>:
cmp    $0x8fff,%edi
jne    111e <tar+0xe>
mov    $0xffffffff,%eax
ret
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @tar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 36863
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %1
ret i32 -1
}

LLVM IR (-O2):
define i32 @tar(i32 %0) {
%2 = icmp eq i32 %0, 36863
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %1
ret i32 -1
}
fatal(s, a, b, c) char *s, *a, *b, *c;
{
  printf(s, a, b, c);
  printf("\n");
  quit();
}


x86 assembly (clang, -O0):
<fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <quit@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatal>:
push   %rax
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <quit@plt>

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

LLVM IR (-O2):
define i32 @fatal(i8* nocapture %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %0, i8* %1, i8* %2, i8* %3)
%6 = tail call i32 @putchar(i32 10)
%7 = tail call i32 (...) @quit()
ret i32 undef
}
char __ocl_rhadd_char(char src1, char src2) {
  char carry = (src1 & 1) | (src2 & 1);
  return (src1 >> 1) + (src2 >> 1) + carry;
}


x86 assembly (clang, -O0):
<__ocl_rhadd_char>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movsbl -0x1(%rbp),%eax
and    $0x1,%eax
movsbl -0x2(%rbp),%ecx
and    $0x1,%ecx
or     %ecx,%eax
mov    %al,-0x3(%rbp)
movsbl -0x1(%rbp),%eax
sar    $0x1,%eax
movsbl -0x2(%rbp),%ecx
sar    $0x1,%ecx
add    %ecx,%eax
movsbl -0x3(%rbp),%ecx
add    %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_rhadd_char>:
mov    %esi,%ecx
or     %dil,%cl
and    $0x1,%cl
sar    %dil
sar    %sil
lea    (%rsi,%rdi,1),%eax
add    %cl,%al
ret

LLVM IR (-O0):
define signext i8 @__ocl_rhadd_char(i8 signext %0, i8 signext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%6 = load i8, i8* %3
%7 = sext i8 %6 to i32
%8 = and i32 %7, 1
%9 = load i8, i8* %4
%10 = sext i8 %9 to i32
%11 = and i32 %10, 1
%12 = or i32 %8, %11
%13 = trunc i32 %12 to i8
store i8 %13, i8* %5
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = ashr i32 %15, 1
%17 = load i8, i8* %4
%18 = sext i8 %17 to i32
%19 = ashr i32 %18, 1
%20 = add nsw i32 %16, %19
%21 = load i8, i8* %5
%22 = sext i8 %21 to i32
%23 = add nsw i32 %20, %22
%24 = trunc i32 %23 to i8
ret i8 %24
}

LLVM IR (-O2):
define signext i8 @__ocl_rhadd_char(i8 signext %0, i8 signext %1) {
%3 = or i8 %1, %0
%4 = and i8 %3, 1
%5 = ashr i8 %0, 1
%6 = ashr i8 %1, 1
%7 = add nsw i8 %6, %5
%8 = add nsw i8 %7, %4
ret i8 %8
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int mapcon_degree_of_map(int dim, int ind, int *deg) {
  int a[2], fail;
  double *c;
  a[0] = dim;
  a[1] = ind;
  fail = _ada_use_c2phc(435, a, deg, c);
  return fail;
}


x86 assembly (clang, -O0):
<mapcon_degree_of_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
lea    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    $0x1b3,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapcon_degree_of_map>:
push   %rax
mov    %edi,(%rsp)
mov    %esi,0x4(%rsp)
mov    %rsp,%rsi
mov    $0x1b3,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @mapcon_degree_of_map(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca [2 x i32]
%8 = alloca i32
%9 = alloca double*
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%10 = load i32, i32* %4
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
store i32 %10, i32* %11
%12 = load i32, i32* %5
%13 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 1
store i32 %12, i32* %13
%14 = getelementptr inbounds [2 x i32], [2 x i32]* %7, i64 0, i64 0
%15 = load i32*, i32** %6
%16 = load double*, double** %9
%17 = call i32 @_ada_use_c2phc(i32 435, i32* %14, i32* %15, double* %16)
store i32 %17, i32* %8
%18 = load i32, i32* %8
ret i32 %18
}

LLVM IR (-O2):
define i32 @mapcon_degree_of_map(i32 %0, i32 %1, i32* %2) {
%4 = alloca [2 x i32]
%5 = bitcast [2 x i32]* %4 to i8*
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
store i32 %0, i32* %6
%7 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 1
store i32 %1, i32* %7
%8 = call i32 @_ada_use_c2phc(i32 435, i32* %6, i32* %2, double* undef)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *name) {
  printf("Usage for program %s\n", name);
  printf("1 arguments required: 1) the dec value to be converted to hex.\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Usage for program %s\0A\00"
@.str.1 = [64 x i8] c"1 arguments required: 1) the dec value to be converted to hex.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Usage for program %s\0A\00"
@str = [63 x i8] c"1 arguments required: 1) the dec value to be converted to hex.\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int float_le(double, double);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%x\n", float_le(-6.3, -8.3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xec9(%rip),%xmm0
movsd  0xec9(%rip),%xmm1
call   1040 <float_le@plt>
mov    %eax,%esi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1040 <float_le@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%x\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @float_le(double -6.300000e+00, double -8.300000e+00)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%x\0A\00"
define i32 @main() {
%1 = tail call i32 @float_le(double -6.300000e+00, double -8.300000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ err(int, char *);
int pledge(char *, int /*<<< orphan*/ *);
void sandbox_pre(void) {
  if (pledge("stdio", NULL) == -1) {
    err(1, "pledge");
  }
}


x86 assembly (clang, -O0):
<sandbox_pre>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pledge@plt>
cmp    $0xffffffff,%eax
jne    114e <sandbox_pre+0x2e>
mov    $0x1,%edi
lea    0xebd(%rip),%rsi
call   1030 <err@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sandbox_pre>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %esi,%esi
call   1040 <pledge@plt>
cmp    $0xffffffff,%eax
je     1136 <sandbox_pre+0x16>
pop    %rax
ret
lea    0xec9(%rip),%rsi
mov    $0x1,%edi
pop    %rax
jmp    1030 <err@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"stdio\00"
@.str.1 = [7 x i8] c"pledge\00"
define void @sandbox_pre() {
%1 = call i32 @pledge(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"stdio\00"
@.str.1 = [7 x i8] c"pledge\00"
define void @sandbox_pre() {
%1 = tail call i32 @pledge(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @err(i32 1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret void
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t QEIVelocityGet(uint32_t ui32Base) {
  ;
  return ((*((volatile unsigned long *)(ui32Base + 0x0000001C))));
}


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

x86 assembly (clang, -O2):
<QEIVelocityGet>:
mov    %rdi,-0x8(%rsp)
mov    -0x8(%rsp),%rax
mov    0x1c(%rax),%rax
ret

LLVM IR (-O0):
define i64 @QEIVelocityGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 28
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @QEIVelocityGet(i64 %0) {
%2 = alloca i64
store volatile i64 %0, i64* %2
%3 = load volatile i64, i64* %2
%4 = add i64 %3, 28
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ gen_call(char *);
int /*<<< orphan*/ gen_pop();
gen_equal() {
  gen_pop();
  gen_call("cceq");
}


x86 assembly (clang, -O0):
<gen_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <gen_pop@plt>
lea    0xeca(%rip),%rdi
call   1040 <gen_call@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_equal>:
push   %rax
xor    %eax,%eax
call   1030 <gen_pop@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1040 <gen_call@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"cceq\00"
define i32 @gen_equal() {
%1 = alloca i32
%2 = call i32 (...) @gen_pop()
%3 = call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"cceq\00"
define i32 @gen_equal() {
%1 = tail call i32 (...) @gen_pop()
%2 = tail call i32 @gen_call(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}