xunge/DecIR huggingface dataset:
char *strrand(char *s) {
  int i;
  for (i = 0; s[i] != 0; i++)
    if (nondet_int() == 1)
      return &s[i];
  return ((void *)0);
}


x86 assembly (clang, -O0):
<strrand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     116f <strrand+0x5f>
mov    $0x0,%al
call   1030 <nondet_int@plt>
cmp    $0x1,%eax
jne    115c <strrand+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <strrand+0x67>
jmp    1161 <strrand+0x51>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1123 <strrand+0x13>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrand>:
push   %r15
push   %r14
push   %rbx
cmpb   $0x0,(%rdi)
je     114a <strrand+0x3a>
mov    %rdi,%r15
xor    %r14d,%r14d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <nondet_int@plt>
cmp    $0x1,%eax
je     114f <strrand+0x3f>
cmpb   $0x0,0x1(%r15,%rbx,1)
lea    0x1(%rbx),%rbx
jne    1130 <strrand+0x20>
jmp    1157 <strrand+0x47>
xor    %r14d,%r14d
jmp    1157 <strrand+0x47>
mov    %ebx,%eax
add    %rax,%r15
mov    %r15,%r14
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @strrand(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %22, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %25
13: ; preds = %5
%14 = call i32 (...) @nondet_int()
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %21
16: ; preds = %13
%17 = load i8*, i8** %3
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8* %20, i8** %2
br label %26
21: ; preds = %13
br label %22
22: ; preds = %21
%23 = load i32, i32* %4
%24 = add nsw i32 %23, 1
store i32 %24, i32* %4
br label %5
25: ; preds = %5
store i8* null, i8** %2
br label %26
26: ; preds = %25, %16
%27 = load i8*, i8** %2
ret i8* %27
}

LLVM IR (-O2):
define i8* @strrand(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %8
%5 = phi i64 [ %9, %8 ], [ 0, %1 ]
%6 = tail call i32 (...) @nondet_int()
%7 = icmp eq i32 %6, 1
br i1 %7, label %13, label %8
8: ; preds = %4
%9 = add nuw i64 %5, 1
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %16, label %4
13: ; preds = %4
%14 = and i64 %5, 4294967295
%15 = getelementptr inbounds i8, i8* %0, i64 %14
br label %16
16: ; preds = %8, %1, %13
%17 = phi i8* [ %15, %13 ], [ null, %1 ], [ null, %8 ]
ret i8* %17
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *me) { fprintf(stderr, "Syntax: %s -i <interface>\n", me); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"Syntax: %s -i <interface>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Syntax: %s -i <interface>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void timer_phase(int hz) {
  int divisor = 1193180 / hz;
  outb(0x43, 0x36);
  outb(0x40, divisor & 0xFF);
  outb(0x40, (divisor >> 8) & 0xFF);
}


x86 assembly (clang, -O0):
<timer_phase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1234dc,%eax
cltd
idivl  -0x4(%rbp)
mov    %eax,-0x8(%rbp)
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <outb@plt>
mov    -0x8(%rbp),%esi
and    $0xff,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
mov    -0x8(%rbp),%esi
sar    $0x8,%esi
and    $0xff,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timer_phase>:
push   %rbx
mov    $0x1234dc,%eax
xor    %edx,%edx
idiv   %edi
mov    %eax,%ebx
mov    $0x43,%edi
mov    $0x36,%esi
call   1030 <outb@plt>
movzbl %bl,%esi
mov    $0x40,%edi
call   1030 <outb@plt>
movzbl %bh,%esi
mov    $0x40,%edi
pop    %rbx
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @timer_phase(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 1193180, %4
store i32 %5, i32* %3
%6 = call i32 @outb(i32 67, i32 54)
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = call i32 @outb(i32 64, i32 %8)
%10 = load i32, i32* %3
%11 = ashr i32 %10, 8
%12 = and i32 %11, 255
%13 = call i32 @outb(i32 64, i32 %12)
ret void
}

LLVM IR (-O2):
define void @timer_phase(i32 %0) {
%2 = sdiv i32 1193180, %0
%3 = tail call i32 @outb(i32 67, i32 54)
%4 = and i32 %2, 255
%5 = tail call i32 @outb(i32 64, i32 %4)
%6 = lshr i32 %2, 8
%7 = and i32 %6, 255
%8 = tail call i32 @outb(i32 64, i32 %7)
ret void
}
untyped_oldstyle1(dummy) char *dummy;
{ ; }


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

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

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

LLVM IR (-O2):
define i32 @untyped_oldstyle1(i8* nocapture readnone %0) {
ret i32 undef
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t min(uint32_t const a, uint32_t const b) {
  if (a < b)
    return a;
  else
    return b;
}


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

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

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

LLVM IR (-O2):
define i64 @min(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int __sigpause(int, int /*<<< orphan*/);
int sigpause(int mask) { return __sigpause(mask, 0); }


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

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

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

LLVM IR (-O2):
define i32 @sigpause(i32 %0) {
%2 = tail call i32 @__sigpause(i32 %0, i32 0)
ret i32 %2
}
void unw_get_reg() {}


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

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

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

LLVM IR (-O2):
define void @unw_get_reg() {
ret void
}
/* Variables and functions */
int smack_set_rule_ex(char const *, char const *, char const *, int);
int smack_set_rule_self(const char *subject, const char *object,
                        const char *access) {
  return smack_set_rule_ex(subject, object, access, 1);
}


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

x86 assembly (clang, -O2):
<smack_set_rule_self>:
mov    $0x1,%ecx
jmp    1030 <smack_set_rule_ex@plt>

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

LLVM IR (-O2):
define i32 @smack_set_rule_self(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @smack_set_rule_ex(i8* %0, i8* %1, i8* %2, i32 1)
ret i32 %4
}
unsigned long b_smp_config() { return 0; }


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

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

LLVM IR (-O0):
define i64 @b_smp_config() {
ret i64 0
}

LLVM IR (-O2):
define i64 @b_smp_config() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ refresh();
void gui_refresh() { refresh(); }


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

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

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

LLVM IR (-O2):
define void @gui_refresh() {
%1 = tail call i32 (...) @refresh()
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  double tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double timenow() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return (tv.tv_sec + tv.tv_usec / 1000000.0);
}


x86 assembly (clang, -O0):
<timenow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timenow>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movsd  0x10(%rsp),%xmm0
divsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, double }
define double @timenow() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load double, double* %5
%7 = fdiv double %6, 1.000000e+06
%8 = fadd double %4, %7
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, double }
define double @timenow() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load double, double* %6
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %5, %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ UNUSED(char const *);
void puts(const char *a) { UNUSED(a); }


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

x86 assembly (clang, -O2):
<puts>:
jmp    1030 <UNUSED@plt>

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

LLVM IR (-O2):
define void @puts(i8* %0) {
%2 = tail call i32 @UNUSED(i8* %0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_clear_multprec_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(447, a, b, c);
  return fail;
}


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

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

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

LLVM IR (-O2):
define i32 @syscon_clear_multprec_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 447, i32* undef, i32* undef, double* undef)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ YUVUtil_Init();
void Linear2FrameInit() { YUVUtil_Init(); }


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

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

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

LLVM IR (-O2):
define void @Linear2FrameInit() {
%1 = tail call i32 (...) @YUVUtil_Init()
ret void
}
void __printf_flush(struct __printf_io *io) {}


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

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

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

LLVM IR (-O2):
%struct.__printf_io = type opaque
define void @__printf_flush(%struct.__printf_io* nocapture %0) {
ret void
}
/* Type definitions */
struct i40e_ring {
  int dummy;
};

/* Variables and functions */
int I40E_DESC_UNUSED(struct i40e_ring *);
int __i40e_maybe_stop_tx(struct i40e_ring *, int);
scalar_t__ likely(int);
int i40e_maybe_stop_tx(struct i40e_ring *tx_ring, int size) {
  if (likely(I40E_DESC_UNUSED(tx_ring) >= size)) {
    return 0;
  }
  return __i40e_maybe_stop_tx(tx_ring, size);
}


x86 assembly (clang, -O0):
<i40e_maybe_stop_tx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <I40E_DESC_UNUSED@plt>
cmp    -0x14(%rbp),%eax
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <likely@plt>
cmp    $0x0,%rax
je     116e <i40e_maybe_stop_tx+0x3e>
movl   $0x0,-0x4(%rbp)
jmp    117d <i40e_maybe_stop_tx+0x4d>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1050 <__i40e_maybe_stop_tx@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<i40e_maybe_stop_tx>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <I40E_DESC_UNUSED@plt>
xor    %edi,%edi
cmp    %ebp,%eax
setge  %dil
call   1040 <likely@plt>
test   %rax,%rax
je     1158 <i40e_maybe_stop_tx+0x28>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %rbx,%rdi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <__i40e_maybe_stop_tx@plt>

LLVM IR (-O0):
%struct.i40e_ring = type { i32 }
define i32 @i40e_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.i40e_ring*
%5 = alloca i32
store %struct.i40e_ring* %0, %struct.i40e_ring** %4
store i32 %1, i32* %5
%6 = load %struct.i40e_ring*, %struct.i40e_ring** %4
%7 = call i32 @I40E_DESC_UNUSED(%struct.i40e_ring* %6)
%8 = load i32, i32* %5
%9 = icmp sge i32 %7, %8
%10 = zext i1 %9 to i32
%11 = call i64 @likely(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 0, i32* %3
br label %18
14: ; preds = %2
%15 = load %struct.i40e_ring*, %struct.i40e_ring** %4
%16 = load i32, i32* %5
%17 = call i32 @__i40e_maybe_stop_tx(%struct.i40e_ring* %15, i32 %16)
store i32 %17, i32* %3
br label %18
18: ; preds = %14, %13
%19 = load i32, i32* %3
ret i32 %19
}

LLVM IR (-O2):
%struct.i40e_ring = type { i32 }
define i32 @i40e_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1) {
%3 = tail call i32 @I40E_DESC_UNUSED(%struct.i40e_ring* %0)
%4 = icmp sge i32 %3, %1
%5 = zext i1 %4 to i32
%6 = tail call i64 @likely(i32 %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = tail call i32 @__i40e_maybe_stop_tx(%struct.i40e_ring* %0, i32 %1)
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ %9, %8 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
int getpagesize();
int /*<<< orphan*/ printf(char *, int);
int hlp_pagesize(void) {
  printf("%d\n", getpagesize());
  return 0;
}


x86 assembly (clang, -O0):
<hlp_pagesize>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getpagesize@plt>
mov    %eax,%esi
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @hlp_pagesize() {
%1 = tail call i32 (...) @getpagesize()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ screen_puts(char const *);
void console_puts(const char *text) { screen_puts(text); }


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

x86 assembly (clang, -O2):
<console_puts>:
jmp    1030 <screen_puts@plt>

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

LLVM IR (-O2):
define void @console_puts(i8* %0) {
%2 = tail call i32 @screen_puts(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mouseClickOnButtons(int, int, int, int);
void mouseButtonFunc(int mouseButton, int mouseButtonState, int mousePositionX,
                     int mousePositionY) {
  mouseClickOnButtons(mouseButton, mouseButtonState, mousePositionX,
                      mousePositionY);
}


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

x86 assembly (clang, -O2):
<mouseButtonFunc>:
jmp    1030 <mouseClickOnButtons@plt>

LLVM IR (-O0):
define void @mouseButtonFunc(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @mouseClickOnButtons(i32 %9, i32 %10, i32 %11, i32 %12)
ret void
}

LLVM IR (-O2):
define void @mouseButtonFunc(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @mouseClickOnButtons(i32 %0, i32 %1, i32 %2, i32 %3)
ret void
}
/* Variables and functions */
unsigned long nibble_sort_word_ref(unsigned long);
void nibble_sort_ref(unsigned long *buf) {
  unsigned long *b = buf;
  for (int i = 0; i < 1024; i++) {
    buf[i] = nibble_sort_word_ref(b[i]);
  }
}


x86 assembly (clang, -O0):
<nibble_sort_ref>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x400,-0x14(%rbp)
jge    1166 <nibble_sort_ref+0x56>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <nibble_sort_word_ref@plt>
mov    %rax,%rdx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112b <nibble_sort_ref+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibble_sort_ref>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1030 <nibble_sort_word_ref@plt>
mov    %rax,(%r14,%rbx,8)
add    $0x1,%rbx
cmp    $0x400,%rbx
jne    1120 <nibble_sort_ref+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @nibble_sort_ref(i64* nocapture %0) {
br label %3
2: ; preds = %3
ret void
3: ; preds = %1, %3
%4 = phi i64 [ 0, %1 ], [ %8, %3 ]
%5 = getelementptr inbounds i64, i64* %0, i64 %4
%6 = load i64, i64* %5
%7 = tail call i64 @nibble_sort_word_ref(i64 %6)
store i64 %7, i64* %5
%8 = add nuw nsw i64 %4, 1
%9 = icmp eq i64 %8, 1024
br i1 %9, label %2, label %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void draw(char c) { printf("%c", c); }


x86 assembly (clang, -O0):
<draw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @draw(i8 signext %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double sinf(int);
int main(int argc, const char *argv[]) {
  printf("The sine of 1 radian is %.3f", sinf(1));
  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    $0x1,%edi
call   1030 <sinf@plt>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [29 x i8] c"The sine of 1 radian is %.3f\00"
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 = call double @sinf(i32 1)
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"The sine of 1 radian is %.3f\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @sinf(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
void sendString(unsigned char reg, unsigned char terminator,
                const volatile char *buf) {
  char c;
  do {
    c = *buf++;
    sendByte(reg, (unsigned char)c);
  } while (c != terminator);
}


x86 assembly (clang, -O0):
<sendString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    %al,-0x11(%rbp)
movzbl -0x1(%rbp),%edi
movzbl -0x11(%rbp),%esi
mov    $0x0,%al
call   1030 <sendByte@plt>
movsbl -0x11(%rbp),%eax
movzbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jne    1128 <sendString+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendString>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%r14d
mov    %edi,%r15d
movsbl (%rbx),%ebp
add    $0x1,%rbx
movzbl %bpl,%esi
mov    %r15d,%edi
xor    %eax,%eax
call   1030 <sendByte@plt>
cmp    %r14d,%ebp
jne    1120 <sendString+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @sendString(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
%7 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
br label %8
8: ; preds = %17, %3
%9 = load i8*, i8** %6
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %6
%11 = load volatile i8, i8* %9
store i8 %11, i8* %7
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = load i8, i8* %7
%15 = zext i8 %14 to i32
%16 = call i32 (i32, i32, ...) bitcast (i32 (...)* @sendByte to i32 (i32, i32, ...)*)(i32 %13, i32 %15)
br label %17
17: ; preds = %8
%18 = load i8, i8* %7
%19 = sext i8 %18 to i32
%20 = load i8, i8* %5
%21 = zext i8 %20 to i32
%22 = icmp ne i32 %19, %21
br i1 %22, label %8, label %23
23: ; preds = %17
ret void
}

LLVM IR (-O2):
define void @sendString(i8 zeroext %0, i8 zeroext %1, i8* %2) {
%4 = zext i8 %0 to i32
%5 = zext i8 %1 to i32
br label %6
6: ; preds = %6, %3
%7 = phi i8* [ %2, %3 ], [ %8, %6 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load volatile i8, i8* %7
%10 = zext i8 %9 to i32
%11 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @sendByte to i32 (i32, i32, ...)*)(i32 %4, i32 %10)
%12 = sext i8 %9 to i32
%13 = icmp eq i32 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6
ret void
}
double Sleef_fmin(double x, double y) { return __builtin_fmin(x, y); }


x86 assembly (clang, -O0):
<Sleef_fmin>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm3
movsd  -0x10(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordsd %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
minsd  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sleef_fmin>:
movapd %xmm0,%xmm2
cmpunordsd %xmm0,%xmm2
movapd %xmm2,%xmm3
andpd  %xmm1,%xmm3
minsd  %xmm0,%xmm1
andnpd %xmm1,%xmm2
orpd   %xmm3,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @Sleef_fmin(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @llvm.minnum.f64(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @Sleef_fmin(double %0, double %1) {
%3 = tail call double @llvm.minnum.f64(double %0, double %1)
ret double %3
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int random();
uint64_t random64(void) {
  uint64_t result = random();
  result = result << 32;
  result |= random();
  return (result);
}


x86 assembly (clang, -O0):
<random64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <random@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x20,%ecx
shl    %cl,%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random64>:
push   %rax
xor    %eax,%eax
call   1030 <random@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <random@plt>

LLVM IR (-O0):
define i32 @random64() {
%1 = alloca i32
%2 = call i32 (...) @random()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = shl i32 %3, 32
store i32 %4, i32* %1
%5 = call i32 (...) @random()
%6 = load i32, i32* %1
%7 = or i32 %6, %5
store i32 %7, i32* %1
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @random64() {
%1 = tail call i32 (...) @random()
%2 = tail call i32 (...) @random()
ret i32 poison
}
int test_imm_F5int16_mem(short *val) {
  return ((*val) & (0xF5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F5int16_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, 245
%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_F5int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 245
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char *convert(char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ scanf(char *, char **);
int main() {
  char *in = NULL;
  scanf("%m[^.]", &in);
  char *out = convert(in);
  printf("'%s'\n", out);
  free(in);
  free(out);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    0xea9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <convert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xe8f(%rip),%rdi
call   1050 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
lea    0xeab(%rip),%rdi
lea    0x8(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x8(%rsp),%rdi
call   1040 <convert@plt>
mov    %rax,%rbx
lea    0xe94(%rip),%rdi
mov    %rax,%rsi
call   1050 <printf@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%m[^.]\00"
@.str.1 = [6 x i8] c"'%s'\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = alloca i8*
store i8* null, i8** %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %1)
%4 = load i8*, i8** %1
%5 = call i8* @convert(i8* %4)
store i8* %5, i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = load i8*, i8** %1
%9 = call i32 @free(i8* %8)
%10 = load i8*, i8** %2
%11 = call i32 @free(i8* %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%m[^.]\00"
@.str.1 = [6 x i8] c"'%s'\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %1)
%4 = load i8*, i8** %1
%5 = call i8* @convert(i8* %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %1
%8 = call i32 @free(i8* %7)
%9 = call i32 @free(i8* %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ap_error_set(char *, int);
int /*<<< orphan*/ strlen(char *);
int write(int, char *, int /*<<< orphan*/);
int ap_log_hputs(char *str, int file_handle) {
  int retcode;
  retcode = write(file_handle, str, strlen(str));
  if (retcode <= 0)
    ap_error_set("ap_log_hprintf()", 1);
  return retcode;
}


x86 assembly (clang, -O0):
<ap_log_hputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jg     1182 <ap_log_hputs+0x52>
lea    0xe88(%rip),%rdi
mov    $0x1,%esi
call   1040 <ap_error_set@plt>
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_log_hputs>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1050 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
mov    %eax,%ebx
test   %eax,%eax
jg     1160 <ap_log_hputs+0x30>
lea    0xeaa(%rip),%rdi
mov    $0x1,%esi
call   1040 <ap_error_set@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [17 x i8] c"ap_log_hprintf()\00"
define i32 @ap_log_hputs(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strlen(i8* %8)
%10 = call i32 @write(i32 %6, i8* %7, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = icmp sle i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 @ap_error_set(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 1)
br label %15
15: ; preds = %13, %2
%16 = load i32, i32* %5
ret i32 %16
}

LLVM IR (-O2):
@.str = [17 x i8] c"ap_log_hprintf()\00"
define i32 @ap_log_hputs(i8* %0, i32 %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = tail call i32 @write(i32 %1, i8* %0, i32 %3)
%5 = icmp slt i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @ap_error_set(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 1)
br label %8
8: ; preds = %6, %2
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ft_sort_int_dec(int *, int);
int /*<<< orphan*/ ft_sort_int_inc(int *, int);
void ft_sort_int(int *array, int size, int c) {
  if (c <= 0)
    ft_sort_int_inc(array, size);
  if (c > 0)
    ft_sort_int_dec(array, size);
}


x86 assembly (clang, -O0):
<ft_sort_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jg     1148 <ft_sort_int+0x28>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <ft_sort_int_inc@plt>
cmpl   $0x0,-0x10(%rbp)
jle    115e <ft_sort_int+0x3e>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <ft_sort_int_dec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_sort_int>:
test   %edx,%edx
jle    1129 <ft_sort_int+0x9>
jmp    1040 <ft_sort_int_dec@plt>
jmp    1030 <ft_sort_int_inc@plt>

LLVM IR (-O0):
define void @ft_sort_int(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = icmp sle i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %3
%10 = load i32*, i32** %4
%11 = load i32, i32* %5
%12 = call i32 @ft_sort_int_inc(i32* %10, i32 %11)
br label %13
13: ; preds = %9, %3
%14 = load i32, i32* %6
%15 = icmp sgt i32 %14, 0
br i1 %15, label %16, label %20
16: ; preds = %13
%17 = load i32*, i32** %4
%18 = load i32, i32* %5
%19 = call i32 @ft_sort_int_dec(i32* %17, i32 %18)
br label %20
20: ; preds = %16, %13
ret void
}

LLVM IR (-O2):
define void @ft_sort_int(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %2, 1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @ft_sort_int_inc(i32* %0, i32 %1)
br label %9
7: ; preds = %3
%8 = tail call i32 @ft_sort_int_dec(i32* %0, i32 %1)
br label %9
9: ; preds = %5, %7
ret void
}
void lnxcDisplaySetScreen() {}


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

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

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

LLVM IR (-O2):
define void @lnxcDisplaySetScreen() {
ret void
}
void nrf_drv_radio802154_timer_critical_section_enter(void) {}


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

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

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

LLVM IR (-O2):
define void @nrf_drv_radio802154_timer_critical_section_enter() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cfg_set_str(char *, char *, char *, char *);
void cfg_set_bool(char *dname, char *sname, char *ename, int value) {
  cfg_set_str(dname, sname, ename, value ? "true" : "false");
}


x86 assembly (clang, -O0):
<cfg_set_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%r8d
lea    0xec7(%rip),%rcx
lea    0xebb(%rip),%rax
cmp    $0x0,%r8d
cmovne %rax,%rcx
call   1030 <cfg_set_str@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_set_bool>:
test   %ecx,%ecx
lea    0xeec(%rip),%rax
lea    0xee0(%rip),%rcx
cmove  %rax,%rcx
jmp    1030 <cfg_set_str@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define void @cfg_set_bool(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = icmp ne i32 %12, 0
%14 = zext i1 %13 to i64
%15 = select i1 %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
%16 = call i32 @cfg_set_str(i8* %9, i8* %10, i8* %11, i8* %15)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define void @cfg_set_bool(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = icmp eq i32 %3, 0
%6 = select i1 %5, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%7 = tail call i32 @cfg_set_str(i8* %0, i8* %1, i8* %2, i8* %6)
ret void
}
/* Variables and functions */
int matGetNextVariable_int_array(int *, int **, int, unsigned char *);
int matGetNextVariable_uint_array(int *outsz, unsigned int **out, int dsz,
                                  unsigned char *data_ptr) {
  return matGetNextVariable_int_array(outsz, (int **)out, dsz, data_ptr);
}


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

x86 assembly (clang, -O2):
<matGetNextVariable_uint_array>:
jmp    1030 <matGetNextVariable_int_array@plt>

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

LLVM IR (-O2):
define i32 @matGetNextVariable_uint_array(i32* %0, i32** %1, i32 %2, i8* %3) {
%5 = tail call i32 @matGetNextVariable_int_array(i32* %0, i32** %1, i32 %2, i8* %3)
ret i32 %5
}
/* Type definitions */
struct msghdr {
  struct msghdr *msg_iov;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct msghdr *);
void msghdr_free(struct msghdr *mh) {
  if (mh) {
    free(mh->msg_iov);
    free(mh);
  }
}


x86 assembly (clang, -O0):
<msghdr_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <msghdr_free+0x2c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msghdr_free>:
test   %rdi,%rdi
je     112a <msghdr_free+0x1a>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.msghdr = type { %struct.msghdr* }
define void @msghdr_free(%struct.msghdr* %0) {
%2 = alloca %struct.msghdr*
store %struct.msghdr* %0, %struct.msghdr** %2
%3 = load %struct.msghdr*, %struct.msghdr** %2
%4 = icmp ne %struct.msghdr* %3, null
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load %struct.msghdr*, %struct.msghdr** %2
%7 = getelementptr inbounds %struct.msghdr, %struct.msghdr* %6, i32 0, i32 0
%8 = load %struct.msghdr*, %struct.msghdr** %7
%9 = call i32 @free(%struct.msghdr* %8)
%10 = load %struct.msghdr*, %struct.msghdr** %2
%11 = call i32 @free(%struct.msghdr* %10)
br label %12
12: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.msghdr = type { %struct.msghdr* }
define void @msghdr_free(%struct.msghdr* %0) {
%2 = icmp eq %struct.msghdr* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = getelementptr inbounds %struct.msghdr, %struct.msghdr* %0, i64 0, i32 0
%5 = load %struct.msghdr*, %struct.msghdr** %4
%6 = tail call i32 @free(%struct.msghdr* %5)
%7 = tail call i32 @free(%struct.msghdr* %0)
br label %8
8: ; preds = %3, %1
ret void
}
/* Type definitions */
struct main_args_info {
  int dummy;
};

/* Variables and functions */
int main_cmdline_parser2(int, char **, struct main_args_info *,
                         int /*<<< orphan*/, int, int);
int main_cmdline_parser(int argc, char **argv,
                        struct main_args_info *args_info) {
  return main_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<main_cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <main_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <main_cmdline_parser2@plt>

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

LLVM IR (-O2):
%struct.main_args_info = type { i32 }
define i32 @main_cmdline_parser(i32 %0, i8** %1, %struct.main_args_info* %2) {
%4 = tail call i32 @main_cmdline_parser2(i32 %0, i8** %1, %struct.main_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
int main(int argc, char **argv) {
  test1();
  test2();
  test3();
  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    $0x0,%al
call   1040 <test1@plt>
mov    $0x0,%al
call   1050 <test2@plt>
mov    $0x0,%al
call   1030 <test3@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test1@plt>
xor    %eax,%eax
call   1050 <test2@plt>
xor    %eax,%eax
call   1030 <test3@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 = call i32 (...) @test1()
%7 = call i32 (...) @test2()
%8 = call i32 (...) @test3()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test1()
%4 = tail call i32 (...) @test2()
%5 = tail call i32 (...) @test3()
ret i32 0
}
void gtk_tree_view_remove_column() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_remove_column() {
ret void
}
/* Variables and functions */
long double exp2(double);
long double exp2l(long double x) { return exp2((double)x); }


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

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

LLVM IR (-O0):
define x86_fp80 @exp2l(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 x86_fp80 @exp2(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @exp2l(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @exp2(double %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ light_init();
void frame_init(void) { light_init(); }


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

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

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

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