xunge/DecIR huggingface dataset:
__float128 from_uns_short_load_4(unsigned short *a) { return (__float128)a[4]; }


x86 assembly (clang, -O0):
<from_uns_short_load_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl 0x8(%rax),%edi
call   1120 <__floatsitf>
add    $0x10,%rsp
pop    %rbp
ret
nop

x86 assembly (clang, -O2):
<from_uns_short_load_4>:
push   %rax
movzwl 0x8(%rdi),%edi
call   1110 <__floatsitf>
pop    %rax
ret
nopl   0x0(%rax)

LLVM IR (-O0):
define fp128 @from_uns_short_load_4(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = getelementptr inbounds i16, i16* %3, i64 4
%5 = load i16, i16* %4
%6 = uitofp i16 %5 to fp128
ret fp128 %6
}

LLVM IR (-O2):
define fp128 @from_uns_short_load_4(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 4
%3 = load i16, i16* %2
%4 = uitofp i16 %3 to fp128
ret fp128 %4
}
/* Variables and functions */
int /*<<< orphan*/ printColor(int /*<<< orphan*/);
int /*<<< orphan*/ yellow(char *);
void cmYellow(char *str) { printColor(yellow(str)); }


x86 assembly (clang, -O0):
<cmYellow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <yellow@plt>
mov    %eax,%edi
call   1030 <printColor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmYellow>:
push   %rax
call   1040 <yellow@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <printColor@plt>

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

LLVM IR (-O2):
define void @cmYellow(i8* %0) {
%2 = tail call i32 @yellow(i8* %0)
%3 = tail call i32 @printColor(i32 %2)
ret void
}
long D_GET_DATA(long s) { return (s & 0x0fffffffUL); }


x86 assembly (clang, -O0):
<D_GET_DATA>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<D_GET_DATA>:
mov    %rdi,%rax
and    $0xfffffff,%eax
ret

LLVM IR (-O0):
define i64 @D_GET_DATA(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 268435455
ret i64 %4
}

LLVM IR (-O2):
define i64 @D_GET_DATA(i64 %0) {
%2 = and i64 %0, 268435455
ret i64 %2
}
unsigned int get_text_height() { return 15; }


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

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

LLVM IR (-O0):
define i32 @get_text_height() {
ret i32 15
}

LLVM IR (-O2):
define i32 @get_text_height() {
ret i32 15
}
int test_imm_EDint64_lowword_mem(long long *val) {
  return ((*val) & (0xED << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_EDint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 237
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void debug_ht(struct hashtable *ht) {}


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

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

LLVM IR (-O0):
%struct.hashtable = type opaque
define void @debug_ht(%struct.hashtable* %0) {
%2 = alloca %struct.hashtable*
store %struct.hashtable* %0, %struct.hashtable** %2
ret void
}

LLVM IR (-O2):
%struct.hashtable = type opaque
define void @debug_ht(%struct.hashtable* nocapture %0) {
ret void
}
int bar(int *x) { return *x; }


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

x86 assembly (clang, -O2):
<bar>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @bar(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
int receiveByte(unsigned char);
unsigned int receiveWord(unsigned char reg) {
  int word = receiveByte(reg);
  word <<= 8;
  word |= receiveByte(reg);
  word <<= 8;
  word |= receiveByte(reg);
  word <<= 8;
  word |= receiveByte(reg);
  return word;
}


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

x86 assembly (clang, -O2):
<receiveWord>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
call   1030 <receiveByte@plt>
mov    %eax,%ebp
mov    %r14d,%edi
call   1030 <receiveByte@plt>
mov    %eax,%ebx
shl    $0x10,%ebp
shl    $0x8,%ebx
or     %ebp,%ebx
mov    %r14d,%edi
call   1030 <receiveByte@plt>
mov    %eax,%ebp
or     %ebx,%ebp
shl    $0x8,%ebp
mov    %r14d,%edi
call   1030 <receiveByte@plt>
or     %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @receiveWord(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i32
store i8 %0, i8* %2
%4 = load i8, i8* %2
%5 = call i32 @receiveByte(i8 zeroext %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = shl i32 %6, 8
store i32 %7, i32* %3
%8 = load i8, i8* %2
%9 = call i32 @receiveByte(i8 zeroext %8)
%10 = load i32, i32* %3
%11 = or i32 %10, %9
store i32 %11, i32* %3
%12 = load i32, i32* %3
%13 = shl i32 %12, 8
store i32 %13, i32* %3
%14 = load i8, i8* %2
%15 = call i32 @receiveByte(i8 zeroext %14)
%16 = load i32, i32* %3
%17 = or i32 %16, %15
store i32 %17, i32* %3
%18 = load i32, i32* %3
%19 = shl i32 %18, 8
store i32 %19, i32* %3
%20 = load i8, i8* %2
%21 = call i32 @receiveByte(i8 zeroext %20)
%22 = load i32, i32* %3
%23 = or i32 %22, %21
store i32 %23, i32* %3
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @receiveWord(i8 zeroext %0) {
%2 = tail call i32 @receiveByte(i8 zeroext %0)
%3 = tail call i32 @receiveByte(i8 zeroext %0)
%4 = shl i32 %2, 16
%5 = shl i32 %3, 8
%6 = or i32 %5, %4
%7 = tail call i32 @receiveByte(i8 zeroext %0)
%8 = or i32 %6, %7
%9 = shl i32 %8, 8
%10 = tail call i32 @receiveByte(i8 zeroext %0)
%11 = or i32 %9, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ write_string(char *);
void latex_end_hilite(void) { write_string("}"); }


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

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

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

LLVM IR (-O2):
@.str = [2 x i8] c"}\00"
define void @latex_end_hilite() {
%1 = tail call i32 @write_string(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ panic(char *);
void C_bad_memory_2(void) {
  panic("there is not enough heap-space to run this executable - try using the "
        "'-:h...' option");
}


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

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

LLVM IR (-O0):
@.str = [86 x i8] c"there is not enough heap-space to run this executable - try using the '-:h...' option\00"
define void @C_bad_memory_2() {
%1 = call i32 @panic(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [86 x i8] c"there is not enough heap-space to run this executable - try using the '-:h...' option\00"
define void @C_bad_memory_2() {
%1 = tail call i32 @panic(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0))
ret void
}
indreg0reg1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((*p0) <= r1)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<indreg0reg1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl (%rax),%eax
movswl -0x8(%rbp),%ecx
cmp    %ecx,%eax
jg     113e <indreg0reg1+0x3e>
movl   $0x1,-0x4(%rbp)
jmp    1145 <indreg0reg1+0x45>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indreg0reg1>:
movswl (%r8),%ecx
movswl %si,%edx
xor    %eax,%eax
cmp    %ecx,%edx
setge  %al
ret

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

LLVM IR (-O2):
define i32 @indreg0reg1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = load i16, i16* %4
%8 = sext i16 %7 to i32
%9 = shl i32 %1, 16
%10 = ashr exact i32 %9, 16
%11 = icmp sge i32 %10, %8
%12 = zext i1 %11 to i32
ret i32 %12
}
long double acosl(long double x) {
  long double res = 0.0L;
  asm volatile("fld	%%st\n\t"
               "fmul	%%st(0)\n\t"
               "fld1\n\t"
               "fsubp\n\t"
               "fsqrt\n\t"
               "fxch	%%st(1)\n\t"
               "fpatan"
               : "=t"(res)
               : "0"(x)
               : "st(1)");
  return res;
}


x86 assembly (clang, -O0):
<acosl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldz
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fld    %st(0)
fmul   %st(0),%st
fld1
fsubp  %st,%st(1)
fsqrt
fxch   %st(1)
fpatan
fstpt  -0x20(%rbp)
fldt   -0x20(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<acosl>:
fldt   0x8(%rsp)
fld    %st(0)
fmul   %st(0),%st
fld1
fsubp  %st,%st(1)
fsqrt
fxch   %st(1)
fpatan
ret

LLVM IR (-O0):
define x86_fp80 @acosl(x86_fp80 %0) {
%2 = alloca x86_fp80
%3 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
store x86_fp80 0xK00000000000000000000, x86_fp80* %3
%4 = load x86_fp80, x86_fp80* %2
%5 = call x86_fp80 asm sideeffect "fld\09%st\0A\09fmul\09%st(0)\0A\09fld1\0A\09fsubp\0A\09fsqrt\0A\09fxch\09%st(1)\0A\09fpatan", "={st},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %4)
store x86_fp80 %5, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %3
ret x86_fp80 %6
}

LLVM IR (-O2):
define x86_fp80 @acosl(x86_fp80 %0) {
%2 = tail call x86_fp80 asm sideeffect "fld\09%st\0A\09fmul\09%st(0)\0A\09fld1\0A\09fsubp\0A\09fsqrt\0A\09fxch\09%st(1)\0A\09fpatan", "={st},0,~{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0)
ret x86_fp80 %2
}
/* Variables and functions */
int con_getch();
int /*<<< orphan*/ delete ();
int insertch(int);
int replace(void) {
  int c = con_getch();
  if (c < 0 || c > 255)
    return 1;
  if (!delete ())
    return insertch(c);
  return 0;
}


x86 assembly (clang, -O0):
<replace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <con_getch@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1159 <replace+0x29>
cmpl   $0xff,-0x8(%rbp)
jle    1165 <replace+0x35>
movl   $0x1,-0x4(%rbp)
jmp    118c <replace+0x5c>
mov    $0x0,%al
call   1050 <delete@plt>
cmp    $0x0,%eax
jne    1185 <replace+0x55>
mov    -0x8(%rbp),%edi
call   1030 <insertch@plt>
mov    %eax,-0x4(%rbp)
jmp    118c <replace+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<replace>:
push   %rbx
xor    %eax,%eax
call   1040 <con_getch@plt>
mov    %eax,%ebx
mov    $0x1,%eax
cmp    $0xff,%ebx
ja     1159 <replace+0x29>
xor    %eax,%eax
call   1050 <delete@plt>
mov    %eax,%ecx
mov    $0x0,%eax
test   %ecx,%ecx
je     115b <replace+0x2b>
pop    %rbx
ret
mov    %ebx,%edi
pop    %rbx
jmp    1030 <insertch@plt>

LLVM IR (-O0):
define i32 @replace() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @con_getch()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp sgt i32 %7, 255
br i1 %8, label %9, label %10
9: ; preds = %6, %0
store i32 1, i32* %1
br label %17
10: ; preds = %6
%11 = call i32 (...) @delete()
%12 = icmp ne i32 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i32, i32* %2
%15 = call i32 @insertch(i32 %14)
store i32 %15, i32* %1
br label %17
16: ; preds = %10
store i32 0, i32* %1
br label %17
17: ; preds = %16, %13, %9
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @replace() {
%1 = tail call i32 (...) @con_getch()
%2 = icmp ugt i32 %1, 255
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = tail call i32 (...) @delete()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @insertch(i32 %1)
br label %8
8: ; preds = %3, %0, %6
%9 = phi i32 [ %7, %6 ], [ 1, %0 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, float, int);
int /*<<< orphan*/ stderr;
void f(int x) { fprintf(stderr, "%c%d\n", 'f', x); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
lea    0xed6(%rip),%rsi
movss  0xeca(%rip),%xmm0
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    %edi,%edx
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
lea    0xee2(%rip),%rsi
movss  0xed6(%rip),%xmm0
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @f(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = load i32, i32* %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 1.020000e+02, i32 %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [6 x i8] c"%c%d\0A\00"
define void @f(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), float 1.020000e+02, i32 %0)
ret void
}
void gtk_tree_view_column_set_visible() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_set_visible() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cmd_8042(int);
int /*<<< orphan*/ write_8042(char);
void cmd_mouse(char command) {
  cmd_8042(0xD4);
  write_8042(command);
}


x86 assembly (clang, -O0):
<cmd_mouse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0xd4,%edi
call   1030 <cmd_8042@plt>
movsbl -0x1(%rbp),%edi
call   1040 <write_8042@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mouse>:
push   %rbx
mov    %edi,%ebx
mov    $0xd4,%edi
call   1030 <cmd_8042@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <write_8042@plt>

LLVM IR (-O0):
define void @cmd_mouse(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @cmd_8042(i32 212)
%4 = load i8, i8* %2
%5 = call i32 @write_8042(i8 signext %4)
ret void
}

LLVM IR (-O2):
define void @cmd_mouse(i8 signext %0) {
%2 = tail call i32 @cmd_8042(i32 212)
%3 = tail call i32 @write_8042(i8 signext %0)
ret void
}
/* Type definitions */
struct conn_info_st {
  int dummy;
};

/* Variables and functions */
int std_user(char const *, struct conn_info_st *, char *);
int std_user_plain(const char *args, struct conn_info_st *conn_info) {
  return std_user(args, conn_info, "");
}


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

x86 assembly (clang, -O2):
<std_user_plain>:
lea    0xee9(%rip),%rdx
jmp    1030 <std_user@plt>

LLVM IR (-O0):
%struct.conn_info_st = type { i32 }
@.str = [1 x i8] zeroinitializer
define i32 @std_user_plain(i8* %0, %struct.conn_info_st* %1) {
%3 = alloca i8*
%4 = alloca %struct.conn_info_st*
store i8* %0, i8** %3
store %struct.conn_info_st* %1, %struct.conn_info_st** %4
%5 = load i8*, i8** %3
%6 = load %struct.conn_info_st*, %struct.conn_info_st** %4
%7 = call i32 @std_user(i8* %5, %struct.conn_info_st* %6, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
%struct.conn_info_st = type { i32 }
@.str = [1 x i8] zeroinitializer
define i32 @std_user_plain(i8* %0, %struct.conn_info_st* %1) {
%3 = tail call i32 @std_user(i8* %0, %struct.conn_info_st* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
scalar_t__ llround(double);
long long llroundl(long double x) { return (long double)llround((double)x); }


x86 assembly (clang, -O0):
<llroundl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
call   1030 <llround@plt>
mov    %rax,-0x18(%rbp)
fildll -0x18(%rbp)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llroundl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <llround@plt>

LLVM IR (-O0):
define i64 @llroundl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call i64 @llround(double %4)
%6 = sitofp i64 %5 to x86_fp80
%7 = fptosi x86_fp80 %6 to i64
ret i64 %7
}

LLVM IR (-O2):
define i64 @llroundl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call i64 @llround(double %2)
ret i64 %3
}
/* Type definitions */
typedef int uint8_t;
typedef int int16_t;

/* Variables and functions */
int16_t pref_to_priority(uint8_t flags) {
  flags = (flags >> 3) & 0x03;
  return (flags == 0x0)   ? 512
         : (flags == 0x1) ? 384
         : (flags == 0x3) ? 640
                          : -1;
}


x86 assembly (clang, -O0):
<pref_to_priority>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x3,%eax
and    $0x3,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112a <pref_to_priority+0x2a>
mov    $0x200,%eax
mov    %eax,-0x8(%rbp)
jmp    115d <pref_to_priority+0x5d>
cmpl   $0x1,-0x4(%rbp)
jne    1141 <pref_to_priority+0x41>
mov    $0x180,%eax
mov    %eax,-0xc(%rbp)
jmp    1157 <pref_to_priority+0x57>
mov    -0x4(%rbp),%edx
mov    $0xffffffff,%eax
mov    $0x280,%ecx
cmp    $0x3,%edx
cmove  %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pref_to_priority>:
shr    $0x3,%edi
and    $0x3,%edi
je     1113 <pref_to_priority+0x13>
cmp    $0x1,%edi
jne    1119 <pref_to_priority+0x19>
mov    $0x180,%eax
ret
mov    $0x200,%eax
ret
cmp    $0x3,%edi
mov    $0x280,%ecx
mov    $0xffffffff,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @pref_to_priority(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 3
switch i32 %3, label %4 [
i32 0, label %8
i32 1, label %7
]
4: ; preds = %1
%5 = icmp eq i32 %3, 3
%6 = select i1 %5, i32 640, i32 -1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %1, %7, %4
%9 = phi i32 [ 512, %1 ], [ %6, %4 ], [ 384, %7 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ core13_swap(char *, int);
void U_EMRALPHABLEND_swap(char *record, int torev) {
  core13_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_EMRALPHABLEND_swap>:
jmp    1030 <core13_swap@plt>

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

LLVM IR (-O2):
define void @U_EMRALPHABLEND_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core13_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int i = 2;
  int i2 = ((!(i)) ? -1 : 0);
  printf("%d", i2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
setne  %dl
xor    $0xff,%dl
xor    %eax,%eax
mov    $0xffffffff,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 2, i32* %2
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -1, i32 0
store i32 %8, i32* %3
%9 = load i32, i32* %3
%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 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, ...);
int main() {
  bool a, b, c, d, e;
  a = true;
  b = false;
  c = 0;
  d = 1;
  e = 5;
  printf("bool=%d\n", sizeof(a));
  printf("a=%d;b=%d;c=%d;d=%d;e=%d\n", a, b, c, d, e);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
movl   $0x5,-0x18(%rbp)
lea    0xeb7(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x5,%r9d
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"bool=%d\0A\00"
@.str.1 = [26 x i8] c"a=%d;b=%d;c=%d;d=%d;e=%d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 4)
%2 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 0, i32 0, i32 1, i32 5)
ret i32 0
}
__attribute__((__no__)) void
do_nothing_small_hole_runtime_partial(struct test_small_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_small_hole_runtime_partial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_small_hole_runtime_partial+0x1b>
jmp    1120 <do_nothing_small_hole_runtime_partial+0x20>
jmp    1120 <do_nothing_small_hole_runtime_partial+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_small_hole = type opaque
define void @do_nothing_small_hole_runtime_partial(%struct.test_small_hole* %0) {
%2 = alloca %struct.test_small_hole*
store %struct.test_small_hole* %0, %struct.test_small_hole** %2
%3 = load %struct.test_small_hole*, %struct.test_small_hole** %2
%4 = ptrtoint %struct.test_small_hole* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_small_hole = type opaque
define void @do_nothing_small_hole_runtime_partial(%struct.test_small_hole* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ RunFuriatune(char *);
void xFpuOn(void) { RunFuriatune("fpu on"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"fpu on\00"
define void @xFpuOn() {
%1 = call i32 @RunFuriatune(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"fpu on\00"
define void @xFpuOn() {
%1 = tail call i32 @RunFuriatune(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DesenhaLinha(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int n;
  printf("Insira N: ");
  scanf("%d", &n);
  DesenhaLinha(n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
call   1040 <DesenhaLinha@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%edi
call   1040 <DesenhaLinha@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [11 x i8] c"Insira N: \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @DesenhaLinha(i32 %5)
ret i32 0
}
void mdp4_dsi_cmd_blt_start(struct msm_fb_data_type *mfd) {}


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

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

LLVM IR (-O0):
%struct.msm_fb_data_type = type opaque
define void @mdp4_dsi_cmd_blt_start(%struct.msm_fb_data_type* %0) {
%2 = alloca %struct.msm_fb_data_type*
store %struct.msm_fb_data_type* %0, %struct.msm_fb_data_type** %2
ret void
}

LLVM IR (-O2):
%struct.msm_fb_data_type = type opaque
define void @mdp4_dsi_cmd_blt_start(%struct.msm_fb_data_type* nocapture %0) {
ret void
}
const char *ccnxPortalClientAbout_MiniNotice(void) {
  return "Copyright (c) 2017 Cisco and/or its affiliates.\n";
}


x86 assembly (clang, -O0):
<ccnxPortalClientAbout_MiniNotice>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [49 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0A\00"
define i8* @ccnxPortalClientAbout_MiniNotice() {
ret i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [49 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0A\00"
define i8* @ccnxPortalClientAbout_MiniNotice() {
ret i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ sqrt(unsigned int);
unsigned int distance_get_pythagorean_distance_integer(unsigned int point_a_x,
                                                       unsigned int point_a_y,
                                                       unsigned int point_b_x,
                                                       unsigned int point_b_y) {
  unsigned int x_difference;
  unsigned int y_difference;
  unsigned int results;
  x_difference = point_a_x - point_b_x;
  y_difference = point_a_y - point_b_y;
  results = (unsigned int)sqrt((x_difference * x_difference) +
                               (y_difference * y_difference));
  return results;
}


x86 assembly (clang, -O0):
<distance_get_pythagorean_distance_integer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
imul   -0x14(%rbp),%edi
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
add    %eax,%edi
call   1030 <sqrt@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance_get_pythagorean_distance_integer>:
sub    %edx,%edi
sub    %ecx,%esi
imul   %edi,%edi
imul   %esi,%esi
add    %esi,%edi
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define i32 @distance_get_pythagorean_distance_integer(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%12 = load i32, i32* %5
%13 = load i32, i32* %7
%14 = sub i32 %12, %13
store i32 %14, i32* %9
%15 = load i32, i32* %6
%16 = load i32, i32* %8
%17 = sub i32 %15, %16
store i32 %17, i32* %10
%18 = load i32, i32* %9
%19 = load i32, i32* %9
%20 = mul i32 %18, %19
%21 = load i32, i32* %10
%22 = load i32, i32* %10
%23 = mul i32 %21, %22
%24 = add i32 %20, %23
%25 = call i64 @sqrt(i32 %24)
%26 = trunc i64 %25 to i32
store i32 %26, i32* %11
%27 = load i32, i32* %11
ret i32 %27
}

LLVM IR (-O2):
define i32 @distance_get_pythagorean_distance_integer(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 %0, %2
%6 = sub i32 %1, %3
%7 = mul i32 %5, %5
%8 = mul i32 %6, %6
%9 = add i32 %8, %7
%10 = tail call i64 @sqrt(i32 %9)
%11 = trunc i64 %10 to i32
ret i32 %11
}
const char *fpp_config_get_plugin_name(void) {
  return "libpdf.so renderer backend";
}


x86 assembly (clang, -O0):
<fpp_config_get_plugin_name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [27 x i8] c"libpdf.so renderer backend\00"
define i8* @fpp_config_get_plugin_name() {
ret i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [27 x i8] c"libpdf.so renderer backend\00"
define i8* @fpp_config_get_plugin_name() {
ret i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
long long llrint(long double);
long long llrintl(long double a1) { return llrint(a1); }


x86 assembly (clang, -O0):
<llrintl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <llrint@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llrintl>:
jmp    1030 <llrint@plt>

LLVM IR (-O0):
define i64 @llrintl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @llrint(x86_fp80 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @llrintl(x86_fp80 %0) {
%2 = tail call i64 @llrint(x86_fp80 %0)
ret i64 %2
}
int main() {
  int a[2];
  int i;
  for (i = 0; i < 3; i++)
    a[i] = 0;
  return a[0];
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x3,-0x10(%rbp)
jge    1136 <main+0x36>
movslq -0x10(%rbp),%rax
movl   $0x0,-0xc(%rbp,%rax,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <main+0x12>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 3
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %3
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 %9
store i32 0, i32* %10
br label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = add nsw i32 %12, 1
store i32 %13, i32* %3
br label %4
14: ; preds = %4
%15 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%16 = load i32, i32* %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
int nonet_detect(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @nonet_detect() {
ret i32 2
}

LLVM IR (-O2):
define i32 @nonet_detect() {
ret i32 2
}
/* Variables and functions */
char *_s2_f2cstr(char *, long);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ s2textyz(float, float, float, char *);
void s2textyz_(float *x, float *y, float *z, char *text, long int textlen) {
  char *t1 = _s2_f2cstr(text, textlen);
  s2textyz(*x, *y, *z, t1);
  free(t1);
}


x86 assembly (clang, -O0):
<s2textyz_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movss  (%rax),%xmm2
mov    -0x30(%rbp),%rdi
call   1040 <s2textyz@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s2textyz_>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
mov    %rcx,%rdi
mov    %r8,%rsi
call   1050 <_s2_f2cstr@plt>
mov    %rax,%rbx
movss  (%r12),%xmm0
movss  (%r15),%xmm1
movss  (%r14),%xmm2
mov    %rax,%rdi
call   1040 <s2textyz@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @s2textyz_(float* %0, float* %1, float* %2, i8* %3, i64 %4) {
%6 = alloca float*
%7 = alloca float*
%8 = alloca float*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
store float* %0, float** %6
store float* %1, float** %7
store float* %2, float** %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%12 = load i8*, i8** %9
%13 = load i64, i64* %10
%14 = call i8* @_s2_f2cstr(i8* %12, i64 %13)
store i8* %14, i8** %11
%15 = load float*, float** %6
%16 = load float, float* %15
%17 = load float*, float** %7
%18 = load float, float* %17
%19 = load float*, float** %8
%20 = load float, float* %19
%21 = load i8*, i8** %11
%22 = call i32 @s2textyz(float %16, float %18, float %20, i8* %21)
%23 = load i8*, i8** %11
%24 = call i32 @free(i8* %23)
ret void
}

LLVM IR (-O2):
define void @s2textyz_(float* nocapture %0, float* nocapture %1, float* nocapture %2, i8* %3, i64 %4) {
%6 = tail call i8* @_s2_f2cstr(i8* %3, i64 %4)
%7 = load float, float* %0
%8 = load float, float* %1
%9 = load float, float* %2
%10 = tail call i32 @s2textyz(float %7, float %8, float %9, i8* %6)
%11 = tail call i32 @free(i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: xenstore [read|write|exists|rm] ...\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [44 x i8] c"Usage: xenstore [read|write|exists|rm] ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [44 x i8] c"Usage: xenstore [read|write|exists|rm] ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
adrx0regx1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((((short *)10000000)[x0]) <= (p1[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrx0regx1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
movslq -0xc(%rbp),%rcx
mov    $0x989680,%eax
movswl (%rax,%rcx,2),%eax
mov    -0x20(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114c <adrx0regx1+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <adrx0regx1+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrx0regx1>:
movslq %edx,%rax
movzwl 0x989680(%rax,%rax,1),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    (%r9,%rcx,2),%dx
setle  %al
ret

LLVM IR (-O0):
define i32 @adrx0regx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* %4, i16* %5) {
%7 = alloca i32
%8 = alloca i16
%9 = alloca i16
%10 = alloca i32
%11 = alloca i32
%12 = alloca i16*
%13 = alloca i16*
%14 = trunc i32 %0 to i16
%15 = trunc i32 %1 to i16
store i16 %14, i16* %8
store i16 %15, i16* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i16* %4, i16** %12
store i16* %5, i16** %13
%16 = load i32, i32* %10
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %17
%19 = load i16, i16* %18
%20 = sext i16 %19 to i32
%21 = load i16*, i16** %13
%22 = load i32, i32* %11
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i16, i16* %21, i64 %23
%25 = load i16, i16* %24
%26 = sext i16 %25 to i32
%27 = icmp sle i32 %20, %26
br i1 %27, label %28, label %29
28: ; preds = %6
store i32 1, i32* %7
br label %30
29: ; preds = %6
store i32 0, i32* %7
br label %30
30: ; preds = %29, %28
%31 = load i32, i32* %7
ret i32 %31
}

LLVM IR (-O2):
define i32 @adrx0regx1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture readnone %4, i16* nocapture %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* inttoptr (i64 10000000 to i16*), i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i16, i16* %5, i64 %10
%12 = load i16, i16* %11
%13 = icmp sle i16 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
int fn5(int a, int b, int m) {
  int tem1 = b & m;
  int tem2 = a & ~m;
  return tem1 | tem2;
}


x86 assembly (clang, -O0):
<fn5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%eax
or     -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn5>:
mov    %esi,%eax
xor    %edi,%eax
and    %edx,%eax
xor    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fn5(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = and i32 %9, %10
store i32 %11, i32* %7
%12 = load i32, i32* %4
%13 = load i32, i32* %6
%14 = xor i32 %13, -1
%15 = and i32 %12, %14
store i32 %15, i32* %8
%16 = load i32, i32* %7
%17 = load i32, i32* %8
%18 = or i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @fn5(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %2, %1
%5 = xor i32 %2, -1
%6 = and i32 %5, %0
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ run(int, char **);
int main(int argc, char **argv) {
  run(argc, argv);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @run(i32 %0, i8** %1)
ret i32 0
}
int test_imm_7Bint64_lowword_mem(long long *val) {
  return ((*val) & (0x7B << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_7Bint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 123
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void ClearBuffer(void) {}


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

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

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

LLVM IR (-O2):
define void @ClearBuffer() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: dump-memmap pid file\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [29 x i8] c"usage: dump-memmap pid file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [29 x i8] c"usage: dump-memmap pid file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Type definitions */
struct MD5Context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ MD5Final(unsigned char *, struct MD5Context *);
void auth_md5_final(unsigned char *hash, struct MD5Context *context) {
  MD5Final(hash, context);
}


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

x86 assembly (clang, -O2):
<auth_md5_final>:
jmp    1030 <MD5Final@plt>

LLVM IR (-O0):
%struct.MD5Context = type { i32 }
define void @auth_md5_final(i8* %0, %struct.MD5Context* %1) {
%3 = alloca i8*
%4 = alloca %struct.MD5Context*
store i8* %0, i8** %3
store %struct.MD5Context* %1, %struct.MD5Context** %4
%5 = load i8*, i8** %3
%6 = load %struct.MD5Context*, %struct.MD5Context** %4
%7 = call i32 @MD5Final(i8* %5, %struct.MD5Context* %6)
ret void
}

LLVM IR (-O2):
%struct.MD5Context = type { i32 }
define void @auth_md5_final(i8* %0, %struct.MD5Context* %1) {
%3 = tail call i32 @MD5Final(i8* %0, %struct.MD5Context* %1)
ret void
}