xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float, float);
int /*<<< orphan*/ troca(float *, float *);
int main(int argc, char *argv[]) {
  float x, y;
  x = 54;
  y = 43;
  printf("x=%f Y=%f\n", x, y);
  troca(&x, &y);
  printf("x=%f Y=%f\n", x, y);
  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)
movss  0xec6(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xeb5(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
lea    -0x14(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <troca@plt>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x42580000,0xc(%rsp)
42
movl   $0x422c0000,0x8(%rsp)
42
lea    0xecc(%rip),%rbx
movss  0xebc(%rip),%xmm0
movss  0xeb8(%rip),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xc(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1040 <troca@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"x=%f Y=%f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 5.400000e+01, float* %6
store float 4.300000e+01, float* %7
%8 = load float, float* %6
%9 = load float, float* %7
%10 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %8, float %9)
%11 = call i32 @troca(float* %6, float* %7)
%12 = load float, float* %6
%13 = load float, float* %7
%14 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %12, float %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"x=%f Y=%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca float
%4 = alloca float
%5 = bitcast float* %3 to i8*
%6 = bitcast float* %4 to i8*
store float 5.400000e+01, float* %3
store float 4.300000e+01, float* %4
%7 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float 5.400000e+01, float 4.300000e+01)
%8 = call i32 @troca(float* %3, float* %4)
%9 = load float, float* %3
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), float %9, float %10)
ret i32 0
}
/* Variables and functions */
int abs_val(unsigned int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  unsigned int i = -1;
  printf("%d", abs_val(i));
  i = -3;
  printf("%d", abs_val(i));
  i = 5;
  printf("%d", abs_val(i));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs_val@plt>
mov    %eax,%esi
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
movl   $0xfffffffd,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs_val@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
call   1040 <printf@plt>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <abs_val@plt>
mov    %eax,%esi
lea    0xe86(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffff,%edi
call   1030 <abs_val@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0xfffffffd,%edi
call   1030 <abs_val@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    $0x5,%edi
call   1030 <abs_val@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = tail call i32 @abs_val(i32 -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @abs_val(i32 -3)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @abs_val(i32 5)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
void block_remote_children() { return; }


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

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

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

LLVM IR (-O2):
define void @block_remote_children() {
ret void
}
void simple_lookup(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<simple_lookup>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<simple_lookup>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.simple_lookup = [14 x i8] c"simple_lookup\00"
define void @simple_lookup() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.simple_lookup, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.simple_lookup = [14 x i8] c"simple_lookup\00"
define void @simple_lookup() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.simple_lookup, i64 0, i64 0))
ret void
}
void b_ethernet_tx(void *mem, unsigned long len, unsigned long iid) {
  asm volatile("call *0x00100050" : : "S"(mem), "c"(len), "d"(iid));
}


x86 assembly (clang, -O0):
<b_ethernet_tx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rdx
call   *0x100050
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_ethernet_tx>:
mov    %rsi,%rcx
mov    %rdi,%rsi
call   *0x100050
ret

LLVM IR (-O0):
define void @b_ethernet_tx(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i64, i64* %6
ret void
}

LLVM IR (-O2):
define void @b_ethernet_tx(i8* %0, i64 %1, i64 %2) {
tail call void asm sideeffect "call *0x00100050", "{si},{cx},{dx},~{dirflag},~{fpsr},~{flags}"(i8* %0, i64 %1, i64 %2)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fgetc(int /*<<< orphan*/ *);
int getc(FILE *stream) { return fgetc(stream); }


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

x86 assembly (clang, -O2):
<getc>:
jmp    1030 <fgetc@plt>

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

LLVM IR (-O2):
define i32 @getc(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ gc_mark(void *);
void gc_mark_range(void *start, void *end) {
  void *p;
  for (p = start; p < end; p++) {
    gc_mark(*(void **)p);
  }
}


x86 assembly (clang, -O0):
<gc_mark_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1153 <gc_mark_range+0x43>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1030 <gc_mark@plt>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <gc_mark_range+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gc_mark_range>:
push   %r15
push   %r14
push   %rbx
cmp    %rsi,%rdi
jae    1142 <gc_mark_range+0x32>
mov    %rsi,%r15
mov    %rdi,%r14
sub    %rdi,%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,1),%rdi
call   1030 <gc_mark@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <gc_mark_range+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @gc_mark_range(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 = %16, %2
%8 = load i8*, i8** %5
%9 = load i8*, i8** %4
%10 = icmp ult i8* %8, %9
br i1 %10, label %11, label %19
11: ; preds = %7
%12 = load i8*, i8** %5
%13 = bitcast i8* %12 to i8**
%14 = load i8*, i8** %13
%15 = call i32 @gc_mark(i8* %14)
br label %16
16: ; preds = %11
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %5
br label %7
19: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @gc_mark_range(i8* %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = getelementptr i8, i8* %0, i64 %7
br label %9
9: ; preds = %4, %9
%10 = phi i8* [ %14, %9 ], [ %0, %4 ]
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
%13 = tail call i32 @gc_mark(i8* %12)
%14 = getelementptr inbounds i8, i8* %10, i64 1
%15 = icmp eq i8* %14, %8
br i1 %15, label %16, label %9
16: ; preds = %9, %2
ret void
}
extern void rsys_stub_func_154485156() {}


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

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

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

LLVM IR (-O2):
define void @rsys_stub_func_154485156() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add10real(int *, int *);
int /*<<< orphan*/ printf(char *);
void add10(int *a, int *b) {
  printf("First function\n");
  add10real(a, b);
}


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

x86 assembly (clang, -O2):
<add10>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <add10real@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"First function\0A\00"
define void @add10(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%6 = load i32*, i32** %3
%7 = load i32*, i32** %4
%8 = call i32 @add10real(i32* %6, i32* %7)
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"First function\00"
define void @add10(i32* %0, i32* %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @add10real(i32* %0, i32* %1)
ret void
}
void parseHeader() {}


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

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

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

LLVM IR (-O2):
define void @parseHeader() {
ret void
}
void GameMenuProc(int message) {
  switch (message) {
  case 1:
    break;
  case 2:
    break;
  };
}


x86 assembly (clang, -O0):
<GameMenuProc>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
sub    $0x1,%eax
je     112c <GameMenuProc+0x2c>
jmp    111b <GameMenuProc+0x1b>
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
je     1131 <GameMenuProc+0x31>
jmp    1136 <GameMenuProc+0x36>
jmp    1136 <GameMenuProc+0x36>
jmp    1136 <GameMenuProc+0x36>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @GameMenuProc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
i32 1, label %4
i32 2, label %5
]
4: ; preds = %1
br label %6
5: ; preds = %1
br label %6
6: ; preds = %1, %5, %4
ret void
}

LLVM IR (-O2):
define void @GameMenuProc(i32 %0) {
ret void
}
/* Type definitions */
struct b_tonegen {
  int dummy;
};

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


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

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

LLVM IR (-O0):
%struct.b_tonegen = type { i32 }
define void @setDrawbar4(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 4, i8 zeroext %7)
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p384_divstep_precomp(uintptr_t);
void fiat_p384_divstep_precomp(uint32_t out1[12]) {
  internal_fiat_p384_divstep_precomp((uintptr_t)out1);
}


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

x86 assembly (clang, -O2):
<fiat_p384_divstep_precomp>:
jmp    1030 <internal_fiat_p384_divstep_precomp@plt>

LLVM IR (-O0):
define void @fiat_p384_divstep_precomp(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = ptrtoint i32* %3 to i64
%5 = call i32 @internal_fiat_p384_divstep_precomp(i64 %4)
ret void
}

LLVM IR (-O2):
define void @fiat_p384_divstep_precomp(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = tail call i32 @internal_fiat_p384_divstep_precomp(i64 %2)
ret void
}
/* Variables and functions */
short doHash(char *);
short checkHash(char *theCall, short theHash) {
  return (short)(doHash(theCall) == theHash);
}


x86 assembly (clang, -O0):
<checkHash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <doHash@plt>
cwtl
movswl -0xa(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkHash>:
push   %rbx
mov    %esi,%ebx
call   1030 <doHash@plt>
xor    %ecx,%ecx
cmp    %bx,%ax
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @checkHash(i8* %0, i16 signext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i8*, i8** %3
%6 = call signext i16 @doHash(i8* %5)
%7 = sext i16 %6 to i32
%8 = load i16, i16* %4
%9 = sext i16 %8 to i32
%10 = icmp eq i32 %7, %9
%11 = zext i1 %10 to i32
%12 = trunc i32 %11 to i16
ret i16 %12
}

LLVM IR (-O2):
define signext i16 @checkHash(i8* %0, i16 signext %1) {
%3 = tail call signext i16 @doHash(i8* %0)
%4 = icmp eq i16 %3, %1
%5 = zext i1 %4 to i16
ret i16 %5
}
unsigned xrop3_216_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = S ^ T;
  stk2 = D & stk3;
  stk1 = T ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_216_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%eax
and    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_216_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
xor    %edi,%esi
xor    %esi,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_216_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = load i32, i32* %7
%25 = xor i32 %23, %24
store i32 %25, i32* %10
%26 = load i32, i32* %5
%27 = load i32, i32* %10
%28 = and i32 %26, %27
store i32 %28, i32* %9
%29 = load i32, i32* %7
%30 = load i32, i32* %9
%31 = xor i32 %29, %30
store i32 %31, i32* %8
%32 = load i32, i32* %8
%33 = load i32, i32* %6
%34 = xor i32 %33, -1
%35 = and i32 %32, %34
%36 = load i32, i32* %5
%37 = load i32, i32* %6
%38 = and i32 %36, %37
%39 = or i32 %35, %38
ret i32 %39
}

LLVM IR (-O2):
define i32 @xrop3_216_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = xor i8 %1, %0
%8 = zext i8 %7 to i32
%9 = xor i32 %6, %8
%10 = xor i32 %4, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ myputs(char const *);
void main() {
  static const char hello[] = "Hello, World!\n";
  myputs(hello);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <myputs@plt>
jmp    1120 <main+0x10>

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <myputs@plt>
nopl   (%rax)
jmp    1120 <main+0x10>

LLVM IR (-O0):
@main.hello = internal constant [15 x i8] c"Hello, World!\0A\00"
define void @main() {
%1 = call i32 @myputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @main.hello, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@main.hello = internal constant [15 x i8] c"Hello, World!\0A\00"
define void @main() {
%1 = tail call i32 @myputs(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @main.hello, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
int bits2bytes(int bits) { return (bits + 7) / 8; }


x86 assembly (clang, -O0):
<bits2bytes>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x7,%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<bits2bytes>:
lea    0x7(%rdi),%ecx
lea    0xe(%rdi),%eax
test   %ecx,%ecx
cmovns %ecx,%eax
sar    $0x3,%eax
ret

LLVM IR (-O0):
define i32 @bits2bytes(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 7
%5 = sdiv i32 %4, 8
ret i32 %5
}

LLVM IR (-O2):
define i32 @bits2bytes(i32 %0) {
%2 = add nsw i32 %0, 7
%3 = sdiv i32 %2, 8
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
scalar_t__ ffs_imp(int /*<<< orphan*/);
scalar_t__ ffs_ref(int /*<<< orphan*/);
int ffs_imp_correct(uint32_t x) { return ffs_imp(x) == ffs_ref(x); }


x86 assembly (clang, -O0):
<ffs_imp_correct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ffs_imp@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <ffs_ref@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffs_imp_correct>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <ffs_imp@plt>
mov    %rax,%r14
mov    %ebx,%edi
call   1040 <ffs_ref@plt>
xor    %ecx,%ecx
cmp    %rax,%r14
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @ffs_imp_correct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @ffs_imp(i32 %3)
%5 = load i32, i32* %2
%6 = call i64 @ffs_ref(i32 %5)
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ffs_imp_correct(i32 %0) {
%2 = tail call i64 @ffs_imp(i32 %0)
%3 = tail call i64 @ffs_ref(i32 %0)
%4 = icmp eq i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
float fadd(float, float);
int /*<<< orphan*/ printf(char *, float);
int main(void) {
  float m_firstValue = 41.0f, m_secondValue = 1.0f;
  float m_resultValue;
  m_resultValue = fadd(m_firstValue, m_secondValue);
  printf("%lf\n", m_resultValue);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xecd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xebc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <fadd@plt>
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store float 4.100000e+01, float* %2
store float 1.000000e+00, float* %3
%5 = load float, float* %2
%6 = load float, float* %3
%7 = call float @fadd(float %5, float %6)
store float %7, float* %4
%8 = load float, float* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%lf\0A\00"
define i32 @main() {
%1 = tail call float @fadd(float 4.100000e+01, float 1.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ dump_error(char *);
scalar_t__ malloc(unsigned int);
unsigned int *uvector(int nl, int nh) {
  unsigned int *v;
  v = (unsigned int *)malloc((unsigned)(nh - nl + 1) * sizeof(int));
  if (!v)
    dump_error("allocation failure in ulvector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<uvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <uvector+0x3f>
lea    0xea6(%rip),%rdi
call   1030 <dump_error@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uvector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x4(,%rsi,4),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1147 <uvector+0x27>
lea    0xebe(%rip),%rdi
call   1030 <dump_error@plt>
movslq %ebp,%rax
shl    $0x2,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [33 x i8] c"allocation failure in ulvector()\00"
define i32* @uvector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = zext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @malloc(i32 %12)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = icmp ne i32* %15, null
br i1 %16, label %19, label %17
17: ; preds = %2
%18 = call i32 @dump_error(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %19
19: ; preds = %17, %2
%20 = load i32*, i32** %5
%21 = load i32, i32* %3
%22 = sext i32 %21 to i64
%23 = sub i64 0, %22
%24 = getelementptr inbounds i32, i32* %20, i64 %23
ret i32* %24
}

LLVM IR (-O2):
@.str = [33 x i8] c"allocation failure in ulvector()\00"
define i32* @uvector(i32 %0, i32 %1) {
%3 = sub nsw i32 %1, %0
%4 = shl i32 %3, 2
%5 = add i32 %4, 4
%6 = tail call i64 @malloc(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @dump_error(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %2
%11 = inttoptr i64 %6 to i32*
%12 = sext i32 %0 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds i32, i32* %11, i64 %13
ret i32* %14
}
int comp_t(short op_type) {
  return (op_type == 2 || op_type == 3 || op_type == 4);
}


x86 assembly (clang, -O0):
<comp_t>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2,%ecx
mov    %al,-0x3(%rbp)
je     113c <comp_t+0x3c>
movswl -0x2(%rbp),%ecx
mov    $0x1,%al
cmp    $0x3,%ecx
mov    %al,-0x3(%rbp)
je     113c <comp_t+0x3c>
movswl -0x2(%rbp),%eax
cmp    $0x4,%eax
sete   %al
mov    %al,-0x3(%rbp)
mov    -0x3(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_t>:
mov    %edi,%eax
and    $0xfffe,%eax
cmp    $0x2,%ax
sete   %al
cmp    $0x4,%di
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @comp_t(i16 signext %0) {
%2 = and i16 %0, -2
%3 = icmp eq i16 %2, 2
%4 = icmp eq i16 %0, 4
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(void *, int, int, int /*<<< orphan*/ *);
void *malloc(int);
void *gen_guid() {
  void *guid = malloc(16);
  FILE *random_f = fopen("/dev/random", "r");
  while (fread(guid, 1, 16, random_f) != 16)
    ;
  fclose(random_f);
  return guid;
}


x86 assembly (clang, -O0):
<gen_guid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x10,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
lea    0xea3(%rip),%rdi
lea    0xea8(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
mov    $0x10,%edx
call   1030 <fread@plt>
cmp    $0x10,%eax
je     1192 <gen_guid+0x52>
jmp    116d <gen_guid+0x2d>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gen_guid>:
push   %r14
push   %rbx
push   %rax
mov    $0x10,%edi
call   1050 <malloc@plt>
mov    %rax,%r14
lea    0xea8(%rip),%rdi
lea    0xead(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,%rbx
nopw   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    $0x1,%esi
mov    $0x10,%edx
mov    %rbx,%rcx
call   1030 <fread@plt>
cmp    $0x10,%eax
jne    1170 <gen_guid+0x30>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/random\00"
@.str.1 = [2 x i8] c"r\00"
define i8* @gen_guid() {
%1 = alloca i8*
%2 = alloca i32*
%3 = call i8* @malloc(i32 16)
store i8* %3, i8** %1
%4 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %4, i32** %2
br label %5
5: ; preds = %10, %0
%6 = load i8*, i8** %1
%7 = load i32*, i32** %2
%8 = call i32 @fread(i8* %6, i32 1, i32 16, i32* %7)
%9 = icmp ne i32 %8, 16
br i1 %9, label %10, label %11
10: ; preds = %5
br label %5
11: ; preds = %5
%12 = load i32*, i32** %2
%13 = call i32 @fclose(i32* %12)
%14 = load i8*, i8** %1
ret i8* %14
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/random\00"
@.str.1 = [2 x i8] c"r\00"
define noalias i8* @gen_guid() {
%1 = tail call dereferenceable_or_null(16) i8* @malloc(i32 16)
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %3
3: ; preds = %3, %0
%4 = tail call i32 @fread(i8* %1, i32 1, i32 16, i32* %2)
%5 = icmp eq i32 %4, 16
br i1 %5, label %6, label %3
6: ; preds = %3
%7 = tail call i32 @fclose(i32* %2)
ret i8* %1
}
/* Forward declarations */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int quot;
  int rem;
};
typedef TYPE_1__ div_t;

/* Variables and functions */
div_t div(int count, int deniminator) {
  div_t data;
  data.quot = (int)(count / deniminator);
  data.rem = (int)(count % deniminator);
  return data;
}


x86 assembly (clang, -O0):
<div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
mov    %edx,-0x4(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div>:
mov    %edi,%eax
cltd
idiv   %esi
shl    $0x20,%rdx
or     %rdx,%rax
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i32 }
define i64 @div(i32 %0, i32 %1) {
%3 = alloca %struct.TYPE_3__
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = load i32, i32* %5
%8 = sdiv i32 %6, %7
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 0
store i32 %8, i32* %9
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = srem i32 %10, %11
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %3, i32 0, i32 1
store i32 %12, i32* %13
%14 = bitcast %struct.TYPE_3__* %3 to i64*
%15 = load i64, i64* %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @div(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
%4 = srem i32 %0, %1
%5 = zext i32 %4 to i64
%6 = shl nuw i64 %5, 32
%7 = zext i32 %3 to i64
%8 = or i64 %6, %7
ret i64 %8
}
int qtoDecimal(int Q) {
  int result = 0;
  while (Q > 0) {
    result = result * 4 + Q % 10;
    Q = Q / 10;
  }
  return result;
}


x86 assembly (clang, -O0):
<qtoDecimal>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    1147 <qtoDecimal+0x47>
mov    -0x8(%rbp),%eax
shl    $0x2,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    -0xc(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
jmp    110e <qtoDecimal+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qtoDecimal>:
xor    %eax,%eax
test   %edi,%edi
jle    112e <qtoDecimal+0x2e>
mov    $0xcccccccd,%r8d
nopl   0x0(%rax)
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%esi
lea    (%rsi,%rsi,4),%esi
mov    %edi,%ecx
sub    %esi,%ecx
lea    (%rcx,%rax,4),%eax
cmp    $0x9,%edi
mov    %edx,%edi
ja     1110 <qtoDecimal+0x10>
ret

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

LLVM IR (-O2):
define i32 @qtoDecimal(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = phi i32 [ %9, %3 ], [ %0, %1 ]
%6 = shl nsw i32 %4, 2
%7 = urem i32 %5, 10
%8 = add nsw i32 %6, %7
%9 = udiv i32 %5, 10
%10 = icmp ult i32 %5, 10
br i1 %10, label %11, label %3
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %8, %3 ]
ret i32 %12
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int write_dobldobl_start_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(235, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<write_dobldobl_start_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xeb,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_dobldobl_start_solutions>:
mov    $0xeb,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_dobldobl_start_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 235, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_dobldobl_start_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 235, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void XtCvtStringToRestartStyle() {}


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

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

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

LLVM IR (-O2):
define void @XtCvtStringToRestartStyle() {
ret void
}
long imin(long a, long b) { return (a < b) ? a : b; }


x86 assembly (clang, -O0):
<imin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <imin+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <imin+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<imin>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @imin(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @imin(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void gl_putc(int c) {
  char ch = c;
  write(1, &ch, 1);
  if (ch == '\n') {
    ch = '\r';
    write(1, &ch, 1);
  }
}


x86 assembly (clang, -O0):
<gl_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x5(%rbp)
mov    $0x1,%edx
lea    -0x5(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    1152 <gl_putc+0x42>
movb   $0xd,-0x5(%rbp)
mov    $0x1,%edx
lea    -0x5(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gl_putc>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
mov    %bl,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0xa,%bl
jne    114d <gl_putc+0x3d>
movb   $0xd,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define void @gl_putc(i32 %0) {
%2 = alloca i8
%3 = trunc i32 %0 to i8
store i8 %3, i8* %2
%4 = call i32 @write(i32 1, i8* %2, i32 1)
%5 = and i32 %0, 255
%6 = icmp eq i32 %5, 10
br i1 %6, label %7, label %9
7: ; preds = %1
store i8 13, i8* %2
%8 = call i32 @write(i32 1, i8* %2, i32 1)
br label %9
9: ; preds = %7, %1
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int compareString(char *string1, char *string2) {
  int result;
  result = strcmp(string1, string2);
  return result;
}


x86 assembly (clang, -O0):
<compareString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compareString>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compareString(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Type definitions */
struct t_ftable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_term_ftable(struct t_ftable *);
void v_set_term_ftable(void *a) { set_term_ftable((struct t_ftable *)a); }


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

x86 assembly (clang, -O2):
<v_set_term_ftable>:
jmp    1030 <set_term_ftable@plt>

LLVM IR (-O0):
%struct.t_ftable = type { i32 }
define void @v_set_term_ftable(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.t_ftable*
%5 = call i32 @set_term_ftable(%struct.t_ftable* %4)
ret void
}

LLVM IR (-O2):
%struct.t_ftable = type { i32 }
define void @v_set_term_ftable(i8* %0) {
%2 = bitcast i8* %0 to %struct.t_ftable*
%3 = tail call i32 @set_term_ftable(%struct.t_ftable* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void vypisHelp() {
  printf("Help\n");
  return;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"Help\00"
define void @vypisHelp() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct pollfd {
  int dummy;
};
typedef int /*<<< orphan*/ nfds_t;

/* Variables and functions */
int syscall_cp(int, struct pollfd *, int /*<<< orphan*/, int);
int poll(struct pollfd *fds, nfds_t n, int timeout) {
  return syscall_cp(168, fds, n, timeout);
}


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

x86 assembly (clang, -O2):
<poll>:
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    $0xa8,%edi
jmp    1030 <syscall_cp@plt>

LLVM IR (-O0):
%struct.pollfd = type { i32 }
define i32 @poll(%struct.pollfd* %0, i32 %1, i32 %2) {
%4 = alloca %struct.pollfd*
%5 = alloca i32
%6 = alloca i32
store %struct.pollfd* %0, %struct.pollfd** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.pollfd*, %struct.pollfd** %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @syscall_cp(i32 168, %struct.pollfd* %7, i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.pollfd = type { i32 }
define i32 @poll(%struct.pollfd* %0, i32 %1, i32 %2) {
%4 = tail call i32 @syscall_cp(i32 168, %struct.pollfd* %0, i32 %1, i32 %2)
ret i32 %4
}
double f1(double x) {
  x = -x;
  return x * x * x - x - 1;
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe9b(%rip),%xmm1
subsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
subsd  %xmm1,%xmm0
addsd  0xee8(%rip),%xmm0
ret

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

LLVM IR (-O2):
define double @f1(double %0) {
%2 = fneg double %0
%3 = fmul double %0, %0
%4 = tail call double @llvm.fmuladd.f64(double %3, double %2, double %0)
%5 = fadd double %4, -1.000000e+00
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ testCase(char *, char *, int);
void test4(void) {
  char haystack1[] = "AABAACAADAABAAABAA";
  char needle1[] = "AABAABAB";
  testCase(haystack1, needle1, -1);
}


x86 assembly (clang, -O0):
<test4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xed3(%rip),%al
mov    %al,-0xe(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x29(%rbp)
mov    0xec8(%rip),%al
mov    %al,-0x21(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x29(%rbp),%rsi
mov    $0xffffffff,%edx
call   1030 <testCase@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test4>:
sub    $0x28,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movl   $0x414142,0x1f(%rsp)
movabs $0x4241424141424141,%rax
42 41 42
mov    %rax,(%rsp)
movb   $0x0,0x8(%rsp)
lea    0x10(%rsp),%rdi
mov    %rsp,%rsi
mov    $0xffffffff,%edx
call   1030 <testCase@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.test4.haystack1 = [19 x i8] c"AABAACAADAABAAABAA\00"
@__const.test4.needle1 = [9 x i8] c"AABAABAB\00"
define void @test4() {
%1 = alloca [19 x i8]
%2 = alloca [9 x i8]
%3 = bitcast [19 x i8]* %1 to i8*
%4 = bitcast [9 x i8]* %2 to i8*
%5 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%6 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%7 = call i32 @testCase(i8* %5, i8* %6, i32 -1)
ret void
}

LLVM IR (-O2):
@__const.test4.haystack1 = [19 x i8] c"AABAACAADAABAAABAA\00"
@__const.test4.needle1 = [9 x i8] c"AABAABAB\00"
define void @test4() {
%1 = alloca [19 x i8]
%2 = alloca [9 x i8]
%3 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [9 x i8], [9 x i8]* %2, i64 0, i64 0
%5 = call i32 @testCase(i8* %3, i8* %4, i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
comment() { outbyte(';'); }


x86 assembly (clang, -O0):
<comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3b,%edi
call   1030 <outbyte@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @comment() {
%1 = alloca i32
%2 = call i32 @outbyte(i8 signext 59)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @comment() {
%1 = tail call i32 @outbyte(i8 signext 59)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ SwapByteOrder_16(int /*<<< orphan*/);
void bswap_16(const size_t n, void *u) {
  uint16_t *T = u;
  size_t i;
  for (i = 0; i < n; i++) {
    *(T + i) = SwapByteOrder_16(*(T + i));
  }
  return;
}


x86 assembly (clang, -O0):
<bswap_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    116c <bswap_16+0x5c>
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <SwapByteOrder_16@plt>
mov    %eax,%edx
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1130 <bswap_16+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bswap_16>:
push   %r15
push   %r14
push   %rbx
test   %rdi,%rdi
je     1146 <bswap_16+0x36>
mov    %rsi,%r15
mov    %rdi,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r15,%rbx,4),%edi
call   1030 <SwapByteOrder_16@plt>
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r14
jne    1130 <bswap_16+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @bswap_16(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i64
store i64 %0, i64* %3
store i8* %1, i8** %4
%7 = load i8*, i8** %4
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
store i64 0, i64* %6
br label %9
9: ; preds = %22, %2
%10 = load i64, i64* %6
%11 = load i64, i64* %3
%12 = icmp ult i64 %10, %11
br i1 %12, label %13, label %25
13: ; preds = %9
%14 = load i32*, i32** %5
%15 = load i64, i64* %6
%16 = getelementptr inbounds i32, i32* %14, i64 %15
%17 = load i32, i32* %16
%18 = call i32 @SwapByteOrder_16(i32 %17)
%19 = load i32*, i32** %5
%20 = load i64, i64* %6
%21 = getelementptr inbounds i32, i32* %19, i64 %20
store i32 %18, i32* %21
br label %22
22: ; preds = %13
%23 = load i64, i64* %6
%24 = add i64 %23, 1
store i64 %24, i64* %6
br label %9
25: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @bswap_16(i64 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = icmp eq i64 %0, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %10, %5 ], [ 0, %2 ]
%7 = getelementptr inbounds i32, i32* %3, i64 %6
%8 = load i32, i32* %7
%9 = tail call i32 @SwapByteOrder_16(i32 %8)
store i32 %9, i32* %7
%10 = add nuw i64 %6, 1
%11 = icmp eq i64 %10, %0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}