xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void feature_v() { printf("A fine function from feature_V\n"); }


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

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

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

LLVM IR (-O2):
@str = [31 x i8] c"A fine function from feature_V\00"
define void @feature_v() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_9Fuint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x9F << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_9Fuint64_lowword_reg>:
test   $0x9f,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_9Fuint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 159
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
RX0AX1(r0, r1, x0, x1, p0, p1) unsigned short r0, r1;
unsigned short *p0, *p1;
{
  if ((p0[x0]) <= (((unsigned short *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<RX0AX1>:
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
movslq -0xc(%rbp),%rcx
movzwl (%rax,%rcx,2),%eax
movslq -0x10(%rbp),%rdx
mov    $0xa98ac7,%ecx
movzwl (%rcx,%rdx,2),%ecx
cmp    %ecx,%eax
jg     114c <RX0AX1+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    1153 <RX0AX1+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RX0AX1>:
movslq %edx,%rax
movzwl (%r8,%rax,2),%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(%rcx,%rcx,1),%dx
setbe  %al
ret

LLVM IR (-O0):
define i32 @RX0AX1(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 i32, i32* %10
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i16, i16* %16, i64 %18
%20 = load i16, i16* %19
%21 = zext i16 %20 to i32
%22 = load i32, i32* %11
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %23
%25 = load i16, i16* %24
%26 = zext i16 %25 to i32
%27 = icmp sle i32 %21, %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 @RX0AX1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture readnone %5) {
%7 = sext i32 %2 to i64
%8 = getelementptr inbounds i16, i16* %4, i64 %7
%9 = load i16, i16* %8
%10 = sext i32 %3 to i64
%11 = getelementptr inbounds i16, i16* inttoptr (i64 11111111 to i16*), i64 %10
%12 = load i16, i16* %11
%13 = icmp ule i16 %9, %12
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ foo(int /*<<< orphan*/);
__attribute__((no, noclone)) unsigned int f13(unsigned int x, unsigned int y) {
  unsigned int r = x - y;
  if (r >= y)
    foo(0);
  return r;
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jb     113a <f13+0x2a>
xor    %edi,%edi
call   1030 <foo@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f13>:
push   %rbx
mov    %edi,%ebx
sub    %esi,%ebx
cmp    %esi,%ebx
jb     1120 <f13+0x10>
xor    %edi,%edi
call   1030 <foo@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f13(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* %3
%7 = load i32, i32* %4
%8 = sub i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = icmp uge i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 @foo(i32 0)
br label %14
14: ; preds = %12, %2
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @f13(i32 %0, i32 %1) {
%3 = sub i32 %0, %1
%4 = icmp ult i32 %3, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @foo(i32 0)
br label %7
7: ; preds = %5, %2
ret i32 %3
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
uint16_t chpl_bitops_rotr_16(uint16_t x, uint16_t n) {
  assert(n < 16);
  return (x >> n) | (x << (-n & (16 - 1)));
}


x86 assembly (clang, -O0):
<chpl_bitops_rotr_16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x10,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
mov    -0x4(%rbp),%edx
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
and    $0xf,%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chpl_bitops_rotr_16>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x10,%esi
setl   %dil
call   1030 <assert@plt>
mov    %ebp,%eax
mov    %ebx,%ecx
sar    %cl,%eax
neg    %bl
and    $0xf,%bl
mov    %ebx,%ecx
shl    %cl,%ebp
or     %eax,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @chpl_bitops_rotr_16(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp slt i32 %5, 16
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = ashr i32 %9, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = sub nsw i32 0, %13
%15 = and i32 %14, 15
%16 = shl i32 %12, %15
%17 = or i32 %11, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @chpl_bitops_rotr_16(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, 16
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = ashr i32 %0, %1
%7 = sub nsw i32 0, %1
%8 = and i32 %7, 15
%9 = shl i32 %0, %8
%10 = or i32 %9, %6
ret i32 %10
}
/* Type definitions */
typedef int uint64_t;
typedef size_t int64_t;

/* Variables and functions */
uint64_t rolx(uint64_t u, size_t x) {
  return (uint64_t)((int64_t)u << x) | (u >> (64 - x));
}


x86 assembly (clang, -O0):
<rolx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movslq -0x4(%rbp),%rax
mov    -0x10(%rbp),%rcx
shl    %cl,%rax
mov    -0x4(%rbp),%edx
mov    $0x40,%ecx
sub    -0x10(%rbp),%rcx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rolx>:
mov    %rsi,%rcx
mov    %edi,%eax
shl    %cl,%rax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rolx(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = sext i32 %5 to i64
%7 = load i64, i64* %4
%8 = shl i64 %6, %7
%9 = trunc i64 %8 to i32
%10 = load i32, i32* %3
%11 = load i64, i64* %4
%12 = sub i64 64, %11
%13 = trunc i64 %12 to i32
%14 = ashr i32 %10, %13
%15 = or i32 %9, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @rolx(i32 %0, i64 %1) {
%3 = zext i32 %0 to i64
%4 = shl i64 %3, %1
%5 = trunc i64 %4 to i32
%6 = trunc i64 %1 to i32
%7 = sub i32 64, %6
%8 = ashr i32 %0, %7
%9 = or i32 %8, %5
ret i32 %9
}
int stack_getnumberofparams() {
  int num = *(int *)0x082F5944;
  return num;
}


x86 assembly (clang, -O0):
<stack_getnumberofparams>:
push   %rbp
mov    %rsp,%rbp
mov    $0x82f5944,%eax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stack_getnumberofparams>:
mov    0x82f5944,%eax
ret

LLVM IR (-O0):
define i32 @stack_getnumberofparams() {
%1 = alloca i32
%2 = load i32, i32* inttoptr (i64 137320772 to i32*)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @stack_getnumberofparams() {
%1 = load i32, i32* inttoptr (i64 137320772 to i32*)
ret i32 %1
}
int ph1_ld4_sbc_init(const struct uniphier_board_data *bd) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.uniphier_board_data = type opaque
define i32 @ph1_ld4_sbc_init(%struct.uniphier_board_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
int /*<<< orphan*/ rgb(int, int, int);
void basRgb() {
  int r, g, b;
  b = popNumber();
  g = popNumber();
  r = popNumber();
  pushNumber(rgb(r, g, b));
}


x86 assembly (clang, -O0):
<basRgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <rgb@plt>
mov    %eax,%edi
call   1030 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basRgb>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
mov    %ebp,%esi
mov    %ebx,%edx
call   1040 <rgb@plt>
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <pushNumber@plt>

LLVM IR (-O0):
define void @basRgb() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = call i32 (...) @popNumber()
store i32 %4, i32* %3
%5 = call i32 (...) @popNumber()
store i32 %5, i32* %2
%6 = call i32 (...) @popNumber()
store i32 %6, i32* %1
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 @rgb(i32 %7, i32 %8, i32 %9)
%11 = call i32 @pushNumber(i32 %10)
ret void
}

LLVM IR (-O2):
define void @basRgb() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 (...) @popNumber()
%3 = tail call i32 (...) @popNumber()
%4 = tail call i32 @rgb(i32 %3, i32 %2, i32 %1)
%5 = tail call i32 @pushNumber(i32 %4)
ret void
}
void cio_increment(int *value) { __sync_add_and_fetch(value, 1); }


x86 assembly (clang, -O0):
<cio_increment>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
lock addl $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<cio_increment>:
lock addl $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @cio_increment(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = atomicrmw add i32* %3, i32 1 seq_cst
%5 = add i32 %4, 1
ret void
}

LLVM IR (-O2):
define void @cio_increment(i32* nocapture %0) {
%2 = atomicrmw add i32* %0, i32 1 seq_cst
ret void
}
/* Variables and functions */
int /*<<< orphan*/ infinite_loop_bad();
int /*<<< orphan*/ nop();
void FN_unreachable_statement_call_bad() {
  infinite_loop_bad();
  nop();
}


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

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

LLVM IR (-O0):
define void @FN_unreachable_statement_call_bad() {
%1 = call i32 (...) @infinite_loop_bad()
%2 = call i32 (...) @nop()
ret void
}

LLVM IR (-O2):
define void @FN_unreachable_statement_call_bad() {
%1 = tail call i32 (...) @infinite_loop_bad()
%2 = tail call i32 (...) @nop()
ret void
}
int ld_eq_cr2(long double a1) { return !(((100) == (a1))); }


x86 assembly (clang, -O0):
<ld_eq_cr2>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
flds   0xeed(%rip)
fucomip %st(1),%st
fstp   %st(0)
setnp  %cl
sete   %al
and    %cl,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_eq_cr2>:
fldt   0x8(%rsp)
flds   0xef6(%rip)
fucomip %st(1),%st
fstp   %st(0)
setp   %al
setne  %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ld_eq_cr2(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fcmp oeq x86_fp80 0xK4005C800000000000000, %3
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @ld_eq_cr2(x86_fp80 %0) {
%2 = fcmp une x86_fp80 %0, 0xK4005C800000000000000
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ np_height();
int /*<<< orphan*/ np_set_cursor_pos(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ np_width();
int /*<<< orphan*/ printf(char *);
void np_update() {
  np_set_cursor_pos(np_width(), np_height());
  printf("\n");
}


x86 assembly (clang, -O0):
<np_update>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <np_width@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1050 <np_height@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1060 <np_set_cursor_pos@plt>
lea    0xe96(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<np_update>:
push   %rbx
xor    %eax,%eax
call   1040 <np_width@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <np_height@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1060 <np_set_cursor_pos@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
define void @np_update() {
%1 = call i32 (...) @np_width()
%2 = call i32 (...) @np_height()
%3 = call i32 @np_set_cursor_pos(i32 %1, i32 %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
define void @np_update() {
%1 = tail call i32 (...) @np_width()
%2 = tail call i32 (...) @np_height()
%3 = tail call i32 @np_set_cursor_pos(i32 %1, i32 %2)
%4 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int device_open(int id) {
  char node[32];
  int fd;
  snprintf(node, 32, "/dev/input/event%d", id);
  fd = open(node, O_RDONLY);
  if (fd < 0)
    return -1;
  return fd;
}


x86 assembly (clang, -O0):
<device_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0x8(%rbp),%ecx
mov    $0x20,%esi
lea    0xec2(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x30(%rbp),%rdi
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jge    116e <device_open+0x4e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1174 <device_open+0x54>
mov    -0x34(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<device_open>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ecx
lea    0xed2(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x20,%esi
call   1030 <snprintf@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <open@plt>
test   %eax,%eax
mov    $0xffffffff,%ecx
cmovs  %ecx,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"/dev/input/event%d\00"
@O_RDONLY = global i32 0
define i32 @device_open(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [32 x i8]
%5 = alloca i32
store i32 %0, i32* %3
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%7 = load i32, i32* %3
%8 = call i32 @snprintf(i8* %6, i32 32, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %4, i64 0, i64 0
%10 = load i32, i32* @O_RDONLY
%11 = call i32 @open(i8* %9, i32 %10)
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %1
store i32 -1, i32* %2
br label %17
15: ; preds = %1
%16 = load i32, i32* %5
store i32 %16, i32* %2
br label %17
17: ; preds = %15, %14
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@.str = [19 x i8] c"/dev/input/event%d\00"
@O_RDONLY = global i32 0
define i32 @device_open(i32 %0) {
%2 = alloca [32 x i8]
%3 = getelementptr inbounds [32 x i8], [32 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 32, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* %3, i32 %5)
%7 = icmp sgt i32 %6, -1
%8 = select i1 %7, i32 %6, i32 -1
ret i32 %8
}
void test118_BlinkMilli_targetInit__E() {}


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

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

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

LLVM IR (-O2):
define void @test118_BlinkMilli_targetInit__E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stub_tx_one_char(char);
void SLIP_send_frame_data(char ch) {
  if (ch == '\xc0') {
    stub_tx_one_char('\xdb');
    stub_tx_one_char('\xdc');
  } else if (ch == '\xdb') {
    stub_tx_one_char('\xdb');
    stub_tx_one_char('\xdd');
  } else {
    stub_tx_one_char(ch);
  }
}


x86 assembly (clang, -O0):
<SLIP_send_frame_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0xffffffc0,%eax
jne    1144 <SLIP_send_frame_data+0x34>
mov    $0xffffffdb,%edi
call   1030 <stub_tx_one_char@plt>
mov    $0xffffffdc,%edi
call   1030 <stub_tx_one_char@plt>
jmp    1178 <SLIP_send_frame_data+0x68>
movsbl -0x1(%rbp),%eax
cmp    $0xffffffdb,%eax
jne    116a <SLIP_send_frame_data+0x5a>
mov    $0xffffffdb,%edi
call   1030 <stub_tx_one_char@plt>
mov    $0xffffffdd,%edi
call   1030 <stub_tx_one_char@plt>
jmp    1173 <SLIP_send_frame_data+0x63>
movsbl -0x1(%rbp),%edi
call   1030 <stub_tx_one_char@plt>
jmp    1178 <SLIP_send_frame_data+0x68>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SLIP_send_frame_data>:
push   %rbx
mov    %edi,%ebx
cmp    $0xc0,%bl
je     1121 <SLIP_send_frame_data+0x11>
cmp    $0xdb,%bl
jne    112d <SLIP_send_frame_data+0x1d>
mov    $0xdd,%bl
jmp    1123 <SLIP_send_frame_data+0x13>
mov    $0xdc,%bl
mov    $0xffffffdb,%edi
call   1030 <stub_tx_one_char@plt>
movsbl %bl,%edi
pop    %rbx
jmp    1030 <stub_tx_one_char@plt>

LLVM IR (-O0):
define void @SLIP_send_frame_data(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, -64
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = call i32 @stub_tx_one_char(i8 signext -37)
%8 = call i32 @stub_tx_one_char(i8 signext -36)
br label %20
9: ; preds = %1
%10 = load i8, i8* %2
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, -37
br i1 %12, label %13, label %16
13: ; preds = %9
%14 = call i32 @stub_tx_one_char(i8 signext -37)
%15 = call i32 @stub_tx_one_char(i8 signext -35)
br label %19
16: ; preds = %9
%17 = load i8, i8* %2
%18 = call i32 @stub_tx_one_char(i8 signext %17)
br label %19
19: ; preds = %16, %13
br label %20
20: ; preds = %19, %6
ret void
}

LLVM IR (-O2):
define void @SLIP_send_frame_data(i8 signext %0) {
switch i8 %0, label %6 [
i8 -64, label %3
i8 -37, label %2
]
2: ; preds = %1
br label %3
3: ; preds = %1, %2
%4 = phi i8 [ -35, %2 ], [ -36, %1 ]
%5 = tail call i32 @stub_tx_one_char(i8 signext -37)
br label %6
6: ; preds = %3, %1
%7 = phi i8 [ %0, %1 ], [ %4, %3 ]
%8 = tail call i32 @stub_tx_one_char(i8 signext %7)
ret void
}
int test_imm_64int16_mem(short *val) {
  return ((*val) & (-0x64 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_64int16_mem>:
movzwl (%rdi),%eax
test   $0xff9c,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_64int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -100
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int __infer_nondet_int();
int /*<<< orphan*/ __require_allocated_array(char const *);
int unlink(const char *filename) {
  int success = __infer_nondet_int();
  __require_allocated_array(filename);
  return (success > 0) ? 0 : -1;
}


x86 assembly (clang, -O0):
<unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <__require_allocated_array@plt>
mov    -0xc(%rbp),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x0,%edx
cmovg  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unlink>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <__require_allocated_array@plt>
xor    %eax,%eax
test   %ebp,%ebp
setle  %al
neg    %eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @unlink(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @__infer_nondet_int()
store i32 %4, i32* %3
%5 = load i8*, i8** %2
%6 = call i32 @__require_allocated_array(i8* %5)
%7 = load i32, i32* %3
%8 = icmp sgt i32 %7, 0
%9 = zext i1 %8 to i64
%10 = select i1 %8, i32 0, i32 -1
ret i32 %10
}

LLVM IR (-O2):
define i32 @unlink(i8* %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
%3 = tail call i32 @__require_allocated_array(i8* %0)
%4 = icmp slt i32 %2, 1
%5 = sext i1 %4 to i32
ret i32 %5
}
int addNonRecursive(int num1, int num2) {
  int sum = 0;
  int carry = 0;
  do {
    sum = num1 ^ num2;
    carry = (num1 & num2) << 1;
    num1 = sum;
    num2 = carry;
  } while (num2 != 0);
  return num1;
}


x86 assembly (clang, -O0):
<addNonRecursive>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1118 <addNonRecursive+0x18>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<addNonRecursive>:
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %eax,%ecx
mov    %esi,%eax
xor    %ecx,%eax
and    %ecx,%esi
add    %esi,%esi
jne    1110 <addNonRecursive+0x10>
ret

LLVM IR (-O0):
define i32 @addNonRecursive(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %17, %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = xor i32 %8, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = and i32 %11, %12
%14 = shl i32 %13, 1
store i32 %14, i32* %6
%15 = load i32, i32* %5
store i32 %15, i32* %3
%16 = load i32, i32* %6
store i32 %16, i32* %4
br label %17
17: ; preds = %7
%18 = load i32, i32* %4
%19 = icmp ne i32 %18, 0
br i1 %19, label %7, label %20
20: ; preds = %17
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @addNonRecursive(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %6, %3 ]
%5 = phi i32 [ %1, %2 ], [ %8, %3 ]
%6 = xor i32 %5, %4
%7 = and i32 %5, %4
%8 = shl i32 %7, 1
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i32 %6
}
/* Variables and functions */
double round_money(double);
double timlib_round_money(double d) { return round_money(d); }


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

x86 assembly (clang, -O2):
<timlib_round_money>:
jmp    1030 <round_money@plt>

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

LLVM IR (-O2):
define double @timlib_round_money(double %0) {
%2 = tail call double @round_money(double %0)
ret double %2
}
adrreg0imm1(r0, r1, x0, x1, p0, p1) double r0, r1;
double *p0, *p1;
{
  if ((p0[10000000]) <= 33)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adrreg0imm1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %edi,-0x1c(%rbp)
mov    %esi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    -0x28(%rbp),%rax
movsd  0xed8(%rip),%xmm0
ucomisd 0x4c4b400(%rax),%xmm0
04
jb     1142 <adrreg0imm1+0x42>
movl   $0x1,-0x4(%rbp)
jmp    1149 <adrreg0imm1+0x49>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adrreg0imm1>:
movsd  0xef8(%rip),%xmm0
xor    %eax,%eax
ucomisd 0x4c4b400(%rdx),%xmm0
04
setae  %al
ret

LLVM IR (-O0):
define i32 @adrreg0imm1(double %0, double %1, i32 %2, i32 %3, double* %4, double* %5) {
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca i32
%11 = alloca i32
%12 = alloca double*
%13 = alloca double*
store double %0, double* %8
store double %1, double* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store double* %4, double** %12
store double* %5, double** %13
%14 = load double*, double** %12
%15 = getelementptr inbounds double, double* %14, i64 10000000
%16 = load double, double* %15
%17 = fcmp ole double %16, 3.300000e+01
br i1 %17, label %18, label %19
18: ; preds = %6
store i32 1, i32* %7
br label %20
19: ; preds = %6
store i32 0, i32* %7
br label %20
20: ; preds = %19, %18
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @adrreg0imm1(double %0, double %1, i32 %2, i32 %3, double* nocapture %4, double* nocapture readnone %5) {
%7 = getelementptr inbounds double, double* %4, i64 10000000
%8 = load double, double* %7
%9 = fcmp ole double %8, 3.300000e+01
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ convert_to_uppercase(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char string[] = "Mr. Billy Wilson A. Arante, with $100/hour rate.";
  printf("%s\n", string);
  convert_to_uppercase(string);
  printf("%s\n", string);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
lea    0xeb6(%rip),%rsi
mov    $0x31,%edx
call   1040 <memcpy@plt>
lea    -0x40(%rbp),%rsi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
call   1050 <convert_to_uppercase@plt>
lea    -0x40(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
movaps 0xef2(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xed6(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x0,0x30(%rsp)
lea    0xedb(%rip),%r14
mov    %rsp,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1040 <convert_to_uppercase@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.main.string = [49 x i8] c"Mr. Billy Wilson A. Arante, with $100/hour rate.\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [49 x i8]
store i32 0, i32* %1
%3 = bitcast [49 x i8]* %2 to i8*
%4 = getelementptr inbounds [49 x i8], [49 x i8]* %2, i64 0, i64 0
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [49 x i8], [49 x i8]* %2, i64 0, i64 0
%7 = call i32 @convert_to_uppercase(i8* %6)
%8 = getelementptr inbounds [49 x i8], [49 x i8]* %2, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string = [49 x i8] c"Mr. Billy Wilson A. Arante, with $100/hour rate.\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [49 x i8]
%2 = getelementptr inbounds [49 x i8], [49 x i8]* %1, i64 0, i64 0
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @convert_to_uppercase(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int intcomp(const void *x, const void *y) { return *(long *)y - *(long *)x; }


x86 assembly (clang, -O0):
<intcomp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%rcx
sub    (%rcx),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @intcomp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = sub nsw i64 %7, %10
%12 = trunc i64 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @intcomp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %0 to i64*
%6 = load i64, i64* %5
%7 = sub nsw i64 %4, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}
void gtk_text_child_anchor_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_child_anchor_new() {
ret void
}
int test(unsigned short a, unsigned char b) { return a > 0xfff2 && b > 252; }


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzwl -0x2(%rbp),%ecx
xor    %eax,%eax
cmp    $0xfff2,%ecx
mov    %al,-0x4(%rbp)
jle    1135 <test+0x35>
movzbl -0x3(%rbp),%eax
cmp    $0xfc,%eax
setg   %al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
cmp    $0xfff3,%di
setae  %al
cmp    $0xfd,%sil
setae  %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @test(i16 zeroext %0, i8 zeroext %1) {
%3 = alloca i16
%4 = alloca i8
store i16 %0, i16* %3
store i8 %1, i8* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = icmp sgt i32 %6, 65522
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8, i8* %4
%10 = zext i8 %9 to i32
%11 = icmp sgt i32 %10, 252
br label %12
12: ; preds = %8, %2
%13 = phi i1 [ false, %2 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
define i32 @test(i16 zeroext %0, i8 zeroext %1) {
%3 = icmp ugt i16 %0, -14
%4 = icmp ugt i8 %1, -4
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ internal_fiat_p448_to_bytes(uintptr_t, uintptr_t);
void fiat_p448_to_bytes(uint8_t out1[56], const uint64_t arg1[8]) {
  internal_fiat_p448_to_bytes((uintptr_t)out1, (uintptr_t)arg1);
}


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

x86 assembly (clang, -O2):
<fiat_p448_to_bytes>:
jmp    1030 <internal_fiat_p448_to_bytes@plt>

LLVM IR (-O0):
define void @fiat_p448_to_bytes(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i64
%7 = load i32*, i32** %4
%8 = ptrtoint i32* %7 to i64
%9 = call i32 @internal_fiat_p448_to_bytes(i64 %6, i64 %8)
ret void
}

LLVM IR (-O2):
define void @fiat_p448_to_bytes(i32* %0, i32* %1) {
%3 = ptrtoint i32* %0 to i64
%4 = ptrtoint i32* %1 to i64
%5 = tail call i32 @internal_fiat_p448_to_bytes(i64 %3, i64 %4)
ret void
}
/* Type definitions */
struct addrinfo {
  int dummy;
};

/* Variables and functions */
scalar_t__ getaddrinfo(char const *, char const *, struct addrinfo const *,
                       struct addrinfo **);
int /*<<< orphan*/ perror(char *);
int Getaddrinfo(const char *node, const char *service,
                const struct addrinfo *hints, struct addrinfo **res) {
  if (getaddrinfo(node, service, hints, res) != 0) {
    perror("Getaddrinfo() error");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<Getaddrinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <getaddrinfo@plt>
cmp    $0x0,%rax
je     116f <Getaddrinfo+0x4f>
lea    0xea2(%rip),%rdi
call   1030 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <Getaddrinfo+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Getaddrinfo>:
push   %rax
call   1040 <getaddrinfo@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
jne    1132 <Getaddrinfo+0x12>
pop    %rcx
ret
lea    0xec7(%rip),%rdi
call   1030 <perror@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.addrinfo = type { i32 }
@.str = [20 x i8] c"Getaddrinfo() error\00"
define i32 @Getaddrinfo(i8* %0, i8* %1, %struct.addrinfo* %2, %struct.addrinfo** %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca %struct.addrinfo*
%9 = alloca %struct.addrinfo**
store i8* %0, i8** %6
store i8* %1, i8** %7
store %struct.addrinfo* %2, %struct.addrinfo** %8
store %struct.addrinfo** %3, %struct.addrinfo*** %9
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load %struct.addrinfo*, %struct.addrinfo** %8
%13 = load %struct.addrinfo**, %struct.addrinfo*** %9
%14 = call i64 @getaddrinfo(i8* %10, i8* %11, %struct.addrinfo* %12, %struct.addrinfo** %13)
%15 = icmp ne i64 %14, 0
br i1 %15, label %16, label %18
16: ; preds = %4
%17 = call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %5
br label %19
18: ; preds = %4
store i32 0, i32* %5
br label %19
19: ; preds = %18, %16
%20 = load i32, i32* %5
ret i32 %20
}

LLVM IR (-O2):
%struct.addrinfo = type { i32 }
@.str = [20 x i8] c"Getaddrinfo() error\00"
define i32 @Getaddrinfo(i8* %0, i8* %1, %struct.addrinfo* %2, %struct.addrinfo** %3) {
%5 = tail call i64 @getaddrinfo(i8* %0, i8* %1, %struct.addrinfo* %2, %struct.addrinfo** %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %4
%8 = tail call i32 @perror(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %4, %7
%10 = phi i32 [ -1, %7 ], [ 0, %4 ]
ret i32 %10
}
void mbed_trace_print_function_set(void (*printf)(const char *)) {}


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

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

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

LLVM IR (-O2):
define void @mbed_trace_print_function_set(void (i8*)* nocapture %0) {
ret void
}
int test_imm_81int16_mem(short *val) {
  return ((*val) & (-0x81 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_81int16_mem>:
movzwl (%rdi),%eax
test   $0xff7f,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_81int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -129
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ record_linux_param_description(char *, char *, char *);
void module_param_desc_tcp_friendliness(void) {
  record_linux_param_description("tcp_cubic.c", "tcp_friendliness",
                                 "turn on/off tcp friendliness");
}


x86 assembly (clang, -O0):
<module_param_desc_tcp_friendliness>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xeea(%rip),%rsi
lea    0xef4(%rip),%rdx
call   1030 <record_linux_param_description@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<module_param_desc_tcp_friendliness>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
lea    0xef8(%rip),%rdx
jmp    1030 <record_linux_param_description@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"tcp_cubic.c\00"
@.str.1 = [17 x i8] c"tcp_friendliness\00"
@.str.2 = [29 x i8] c"turn on/off tcp friendliness\00"
define void @module_param_desc_tcp_friendliness() {
%1 = call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"tcp_cubic.c\00"
@.str.1 = [17 x i8] c"tcp_friendliness\00"
@.str.2 = [29 x i8] c"turn on/off tcp friendliness\00"
define void @module_param_desc_tcp_friendliness() {
%1 = tail call i32 @record_linux_param_description(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *, char const *, int, char const *);
void assert_failed(const char *file, int line, const char *msg) {
  printf("%s:%d: ASSERT FAILED (%s)\n", file, line, msg);
  abort();
}


x86 assembly (clang, -O0):
<assert_failed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xebb(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<assert_failed>:
push   %rax
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xed0(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"%s:%d: ASSERT FAILED (%s)\0A\00"
define void @assert_failed(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %7, i32 %8, i8* %9)
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"%s:%d: ASSERT FAILED (%s)\0A\00"
define void @assert_failed(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1, i8* %2)
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
void *memrmem(char *, int, char *, int);
int main(int argc, char **buffer) {
  char buf[10] = "01Hello78";
  void *ptr;
  if ((ptr = memrmem(buf, 10, "Hello", 5)))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x1a(%rbp)
mov    0xed0(%rip),%ax
mov    %ax,-0x12(%rbp)
lea    -0x1a(%rbp),%rdi
mov    $0xa,%esi
lea    0xebe(%rip),%rdx
mov    $0x5,%ecx
call   1030 <memrmem@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
je     1170 <main+0x60>
movl   $0x1,-0x4(%rbp)
jmp    1177 <main+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x376f6c6c65483130,%rax
6c 6f 37
mov    %rax,0x8(%rsp)
movw   $0x38,0x10(%rsp)
lea    0xed9(%rip),%rdx
lea    0x8(%rsp),%rdi
mov    $0xa,%esi
mov    $0x5,%ecx
call   1030 <memrmem@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.buf = [10 x i8] c"01Hello78\00"
@.str = [6 x i8] c"Hello\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [10 x i8]
%4 = getelementptr inbounds [10 x i8], [10 x i8]* %3, i64 0, i64 0
%5 = call i8* @memrmem(i8* %4, i32 10, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
ret i32 %7
}
void Handle_SIGTSTP() {}


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

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

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

LLVM IR (-O2):
define void @Handle_SIGTSTP() {
ret void
}
int test_imm_B7int64_lowword_mem(long long *val) {
  return ((*val) & (0xB7 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_B7int64_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, 183
%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_B7int64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 183
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct in_addr {
  int dummy;
};
struct hostent {
  scalar_t__ h_name;
};

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
struct hostent *gethostbyaddr(char *, int, int /*<<< orphan*/);
char *addr_to_host(struct in_addr *addr) {
  struct hostent *host;
  if ((host = gethostbyaddr((char *)addr, sizeof(struct in_addr), AF_INET)) !=
      NULL)
    return (char *)host->h_name;
  else
    return (char *)NULL;
}


x86 assembly (clang, -O0):
<addr_to_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   1030 <gethostbyaddr@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1151 <addr_to_host+0x41>
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1159 <addr_to_host+0x49>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addr_to_host>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   1030 <gethostbyaddr@plt>
test   %rax,%rax
je     112e <addr_to_host+0x1e>
mov    (%rax),%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
%struct.hostent = type { i64 }
@AF_INET = global i32 0
define i8* @addr_to_host(%struct.in_addr* %0) {
%2 = alloca i8*
%3 = alloca %struct.in_addr*
%4 = alloca %struct.hostent*
store %struct.in_addr* %0, %struct.in_addr** %3
%5 = load %struct.in_addr*, %struct.in_addr** %3
%6 = bitcast %struct.in_addr* %5 to i8*
%7 = load i32, i32* @AF_INET
%8 = call %struct.hostent* @gethostbyaddr(i8* %6, i32 4, i32 %7)
store %struct.hostent* %8, %struct.hostent** %4
%9 = icmp ne %struct.hostent* %8, null
br i1 %9, label %10, label %15
10: ; preds = %1
%11 = load %struct.hostent*, %struct.hostent** %4
%12 = getelementptr inbounds %struct.hostent, %struct.hostent* %11, i32 0, i32 0
%13 = load i64, i64* %12
%14 = inttoptr i64 %13 to i8*
store i8* %14, i8** %2
br label %16
15: ; preds = %1
store i8* null, i8** %2
br label %16
16: ; preds = %15, %10
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
%struct.hostent = type { i64 }
@AF_INET = global i32 0
define i8* @addr_to_host(%struct.in_addr* %0) {
%2 = bitcast %struct.in_addr* %0 to i8*
%3 = load i32, i32* @AF_INET
%4 = tail call %struct.hostent* @gethostbyaddr(i8* %2, i32 4, i32 %3)
%5 = icmp eq %struct.hostent* %4, null
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = getelementptr inbounds %struct.hostent, %struct.hostent* %4, i64 0, i32 0
%8 = load i64, i64* %7
%9 = inttoptr i64 %8 to i8*
br label %10
10: ; preds = %1, %6
%11 = phi i8* [ %9, %6 ], [ null, %1 ]
ret i8* %11
}