xunge/DecIR huggingface dataset:
/* Variables and functions */
int randbuffer(char *, int);
int randomint() {
  int ret;
  int r = randbuffer((char *)&ret, 4);
  if (r)
    return ret;
  else
    return 0x13579bd;
}


x86 assembly (clang, -O0):
<randomint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <randbuffer@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     113e <randomint+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1145 <randomint+0x35>
movl   $0x13579bd,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomint>:
push   %rax
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <randbuffer@plt>
mov    %eax,%ecx
mov    $0x13579bd,%eax
test   %ecx,%ecx
je     112f <randomint+0x1f>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @randomint() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %2 to i8*
%5 = call i32 @randbuffer(i8* %4, i32 4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = load i32, i32* %2
store i32 %9, i32* %1
br label %11
10: ; preds = %0
store i32 20281789, i32* %1
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @randomint() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @randbuffer(i8* %2, i32 4)
%4 = icmp eq i32 %3, 0
%5 = load i32, i32* %1
%6 = select i1 %4, i32 20281789, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ quit(int, char *);
void usage(void) {
  quit(1, "Usage: supfilesrv [ -4 | -6 | -d | -P | -N | -C <max children> | -H "
          "<host> <user> <cryptfile> <supargs> ]\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
call   1030 <quit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
jmp    1030 <quit@plt>

LLVM IR (-O0):
@.str = [107 x i8] c"Usage: supfilesrv [ -4 | -6 | -d | -P | -N | -C <max children> | -H <host> <user> <cryptfile> <supargs> ]\0A\00"
define void @usage() {
%1 = call i32 @quit(i32 1, i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [107 x i8] c"Usage: supfilesrv [ -4 | -6 | -d | -P | -N | -C <max children> | -H <host> <user> <cryptfile> <supargs> ]\0A\00"
define void @usage() {
%1 = tail call i32 @quit(i32 1, i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ *strchr(char *, unsigned char const);
bool separator_char(unsigned char const c) {
  assert('\0' != c);
  return NULL != strchr("()<>@,;:\\\"/[]?={} \t", c);
}


x86 assembly (clang, -O0):
<separator_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    %ecx,%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xeb6(%rip),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<separator_char>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
test   %ebx,%ebx
setne  %dil
call   1040 <assert@plt>
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"()<>@,;:\\\22/[]?={} \09\00"
define i32 @separator_char(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = icmp ne i32 0, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i8, i8* %2
%9 = call i32* @strchr(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %8)
%10 = icmp ne i32* null, %9
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [20 x i8] c"()<>@,;:\\\22/[]?={} \09\00"
define i32 @separator_char(i8 zeroext %0) {
%2 = icmp ne i8 %0, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32* @strchr(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
%6 = icmp ne i32* %5, null
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ XMotionEvent;

/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ malloc(int);
void *alloc_XMotionEvent(void) {
  XMotionEvent *_p = (XMotionEvent *)malloc(sizeof(XMotionEvent));
  if (_p == NULL)
    abort();
  return (void *)_p;
}


x86 assembly (clang, -O0):
<alloc_XMotionEvent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1148 <alloc_XMotionEvent+0x28>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc_XMotionEvent>:
push   %rax
mov    $0x4,%edi
call   1040 <malloc@plt>
test   %rax,%rax
je     1132 <alloc_XMotionEvent+0x12>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i8* @alloc_XMotionEvent() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
%4 = load i32*, i32** %1
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
%9 = load i32*, i32** %1
%10 = bitcast i32* %9 to i8*
ret i8* %10
}

LLVM IR (-O2):
define i8* @alloc_XMotionEvent() {
%1 = tail call i64 @malloc(i32 4)
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
%6 = inttoptr i64 %1 to i8*
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__0__GeneralIO__clr();
void LedsP__Led0__clr(void) { Msp430GpioC__0__GeneralIO__clr(); }


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

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

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

LLVM IR (-O2):
define void @LedsP__Led0__clr() {
%1 = tail call i32 (...) @Msp430GpioC__0__GeneralIO__clr()
ret void
}
int Operand_uimm16x4_ator(unsigned int *valp, unsigned int pc) {
  *valp -= ((pc + 3) & ~0x3);
  return 0;
}


x86 assembly (clang, -O0):
<Operand_uimm16x4_ator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edx
add    $0x3,%edx
and    $0xfffffffc,%edx
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Operand_uimm16x4_ator>:
add    $0x3,%esi
and    $0xfffffffc,%esi
sub    %esi,(%rdi)
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @Operand_uimm16x4_ator(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 = add i32 %5, 3
%7 = and i32 %6, -4
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = sub i32 %9, %7
store i32 %10, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @Operand_uimm16x4_ator(i32* nocapture %0, i32 %1) {
%3 = add i32 %1, 3
%4 = and i32 %3, -4
%5 = load i32, i32* %0
%6 = sub i32 %5, %4
store i32 %6, i32* %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int random();
int /*<<< orphan*/ srandom(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main(int argc, char **argv) {
  srandom(time(0));
  printf("random() - %i\n", random());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
mov    $0x0,%al
call   1060 <random@plt>
mov    %eax,%esi
lea    0xe93(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1030 <srandom@plt>
xor    %eax,%eax
call   1060 <random@plt>
lea    0xea3(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"random() - %i\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @time(i32 0)
%6 = call i32 @srandom(i32 %5)
%7 = call i32 (...) @random()
%8 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"random() - %i\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @time(i32 0)
%4 = tail call i32 @srandom(i32 %3)
%5 = tail call i32 (...) @random()
%6 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void CON_Back(void) {
  char key;
  key = '\b';
  write(STDOUT_FILENO, &key, 1);
  key = ' ';
  write(STDOUT_FILENO, &key, 1);
  key = '\b';
  write(STDOUT_FILENO, &key, 1);
}


x86 assembly (clang, -O0):
<CON_Back>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x8,-0x1(%rbp)
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x20,-0x1(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x8,-0x1(%rbp)
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CON_Back>:
push   %r14
push   %rbx
push   %rax
movb   $0x8,0x7(%rsp)
mov    0x2ed0(%rip),%r14
mov    (%r14),%edi
lea    0x7(%rsp),%rbx
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x20,0x7(%rsp)
mov    (%r14),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
movb   $0x8,0x7(%rsp)
mov    (%r14),%edi
mov    %rbx,%rsi
mov    $0x1,%edx
call   1030 <write@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @CON_Back() {
%1 = alloca i8
store i8 8, i8* %1
%2 = load i32, i32* @STDOUT_FILENO
%3 = call i32 @write(i32 %2, i8* %1, i32 1)
store i8 32, i8* %1
%4 = load i32, i32* @STDOUT_FILENO
%5 = call i32 @write(i32 %4, i8* %1, i32 1)
store i8 8, i8* %1
%6 = load i32, i32* @STDOUT_FILENO
%7 = call i32 @write(i32 %6, i8* %1, i32 1)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @CON_Back() {
%1 = alloca i8
store i8 8, i8* %1
%2 = load i32, i32* @STDOUT_FILENO
%3 = call i32 @write(i32 %2, i8* %1, i32 1)
store i8 32, i8* %1
%4 = load i32, i32* @STDOUT_FILENO
%5 = call i32 @write(i32 %4, i8* %1, i32 1)
store i8 8, i8* %1
%6 = load i32, i32* @STDOUT_FILENO
%7 = call i32 @write(i32 %6, i8* %1, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int errno;
int /*<<< orphan*/ verr(int, char const *, int /*<<< orphan*/);
void verrc(int status, int code, const char *format, va_list ap) {
  errno = code;
  verr(status, format, ap);
}


x86 assembly (clang, -O0):
<verrc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%ecx
mov    0x2eb1(%rip),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <verr@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verrc>:
mov    0x2ec9(%rip),%rax
mov    %esi,(%rax)
mov    %rdx,%rsi
mov    %ecx,%edx
jmp    1030 <verr@plt>

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

LLVM IR (-O2):
@errno = global i32 0
define void @verrc(i32 %0, i32 %1, i8* %2, i32 %3) {
store i32 %1, i32* @errno
%5 = tail call i32 @verr(i32 %0, i8* %2, i32 %3)
ret void
}
void iwlagn_led_enable(struct iwl_priv *priv) {}


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

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

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

LLVM IR (-O2):
%struct.iwl_priv = type opaque
define void @iwlagn_led_enable(%struct.iwl_priv* nocapture %0) {
ret void
}
double LSKeyframeAnimationFunctionEaseOutQuad(double t, double b, double c,
                                              double d) {
  return -c * (t /= d) * (t - 2) + b;
}


x86 assembly (clang, -O0):
<LSKeyframeAnimationFunctionEaseOutQuad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm1
divsd  %xmm2,%xmm1
movsd  %xmm1,-0x8(%rbp)
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
movsd  0xea8(%rip),%xmm1
subsd  %xmm1,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<LSKeyframeAnimationFunctionEaseOutQuad>:
divsd  %xmm3,%xmm0
mulsd  %xmm0,%xmm2
addsd  0xef0(%rip),%xmm0
mulsd  %xmm2,%xmm0
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @LSKeyframeAnimationFunctionEaseOutQuad(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = fneg double %9
%11 = load double, double* %8
%12 = load double, double* %5
%13 = fdiv double %12, %11
store double %13, double* %5
%14 = fmul double %10, %13
%15 = load double, double* %5
%16 = fsub double %15, 2.000000e+00
%17 = load double, double* %6
%18 = call double @llvm.fmuladd.f64(double %14, double %16, double %17)
ret double %18
}

LLVM IR (-O2):
define double @LSKeyframeAnimationFunctionEaseOutQuad(double %0, double %1, double %2, double %3) {
%5 = fneg double %2
%6 = fdiv double %0, %3
%7 = fmul double %6, %5
%8 = fadd double %6, -2.000000e+00
%9 = tail call double @llvm.fmuladd.f64(double %7, double %8, double %1)
ret double %9
}
/* Variables and functions */
int exp(double);
double sigmoid_f(double x) { return 1 / (1 + exp(-x)); }


x86 assembly (clang, -O0):
<sigmoid_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <exp@plt>
mov    %eax,%ecx
add    $0x1,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigmoid_f>:
push   %rax
xorps  0xee8(%rip),%xmm0
call   1030 <exp@plt>
lea    0x1(%rax),%ecx
add    $0x2,%eax
xor    %edx,%edx
cmp    $0x3,%eax
cmovb  %ecx,%edx
xorps  %xmm0,%xmm0
cvtsi2sd %edx,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sigmoid_f(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
%5 = call i32 @exp(double %4)
%6 = add nsw i32 1, %5
%7 = sdiv i32 1, %6
%8 = sitofp i32 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @sigmoid_f(double %0) {
%2 = fneg double %0
%3 = tail call i32 @exp(double %2)
%4 = add nsw i32 %3, 1
%5 = add i32 %3, 2
%6 = icmp ult i32 %5, 3
%7 = select i1 %6, i32 %4, i32 0
%8 = sitofp i32 %7 to double
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ AirspeedStateHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void AirspeedStateUpdated() { UAVObjUpdated(AirspeedStateHandle()); }


x86 assembly (clang, -O0):
<AirspeedStateUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <AirspeedStateHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<AirspeedStateUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <AirspeedStateHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @AirspeedStateUpdated() {
%1 = call i32 (...) @AirspeedStateHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @AirspeedStateUpdated() {
%1 = tail call i32 (...) @AirspeedStateHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void err_parse(void) {
  fprintf(stderr, "error: Internal parse() function failed\n");
  fflush(stderr);
}


x86 assembly (clang, -O0):
<err_parse>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_parse>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"error: Internal parse() function failed\0A\00"
define void @err_parse() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"error: Internal parse() function failed\0A\00"
define void @err_parse() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fflush(i32 %3)
ret void
}
void naked_foo() { __asm__("ret"); }


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

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

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

LLVM IR (-O2):
define void @naked_foo() {
tail call void asm sideeffect "ret", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int draw_block4x4_uncompressed_rgba_half_float(const unsigned char *bitstring,
                                               unsigned int *image_buffer,
                                               int flags) {
  *(uint64_t *)&image_buffer[0] = *(uint64_t *)&bitstring[0];
  return 1;
}


x86 assembly (clang, -O0):
<draw_block4x4_uncompressed_rgba_half_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_block4x4_uncompressed_rgba_half_float>:
mov    (%rdi),%eax
mov    %eax,(%rsi)
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @draw_block4x4_uncompressed_rgba_half_float(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = load i32*, i32** %5
%12 = getelementptr inbounds i32, i32* %11, i64 0
store i32 %10, i32* %12
ret i32 1
}

LLVM IR (-O2):
define i32 @draw_block4x4_uncompressed_rgba_half_float(i8* nocapture %0, i32* nocapture writeonly %1, i32 %2) {
%4 = bitcast i8* %0 to i32*
%5 = load i32, i32* %4
store i32 %5, i32* %1
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print(unsigned char *a, int len) {
  int i;
  for (i = 0; i < len; i++) {
    printf("%02x", a[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <print+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movzbl (%rax,%rcx,1),%esi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1158 <print+0x38>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movzbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <print+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%02x\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = zext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%02x\00"
define void @print(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
%15 = tail call i32 @putchar(i32 10)
ret void
}
int foo(int n) {
  while (n >= 45)
    n -= 45;
  return n;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x2d,-0x4(%rbp)
jl     111f <foo+0x1f>
mov    -0x4(%rbp),%eax
sub    $0x2d,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <foo+0x7>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x2c,%edi
mov    $0x2c,%eax
cmovl  %edi,%eax
neg    %eax
lea    (%rdi,%rax,1),%ecx
add    $0x2c,%ecx
imul   $0x6c16c16d,%rcx,%rax
shr    $0x20,%rax
mov    %ecx,%edx
sub    %eax,%edx
shr    %edx
add    %eax,%edx
shr    $0x5,%edx
lea    (%rdx,%rdx,8),%eax
lea    (%rax,%rax,4),%edx
mov    %ecx,%eax
sub    %edx,%eax
sub    %ecx,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %6, %1
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 45
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 45
store i32 %8, i32* %2
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add i32 %0, 44
%3 = call i32 @llvm.smin.i32(i32 %0, i32 44)
%4 = sub i32 %2, %3
%5 = urem i32 %4, 45
%6 = sub i32 %5, %4
%7 = add i32 %6, %0
ret i32 %7
}
void f2(signed char x) {}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f2(i8 signext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void testBitAnd() { printf("%d & %d = %d\n", 10, 7, 10 & 7); }


x86 assembly (clang, -O0):
<testBitAnd>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xa,%esi
mov    $0x7,%edx
mov    $0x2,%ecx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBitAnd>:
lea    0xee9(%rip),%rdi
mov    $0xa,%esi
mov    $0x7,%edx
mov    $0x2,%ecx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"%d & %d = %d\0A\00"
define void @testBitAnd() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 10, i32 7, i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ islands_east_files(int);
void islands_east_files_test(void **state) {
  assert_int_equal(0x40, islands_east_files(0x7E));
}


x86 assembly (clang, -O0):
<islands_east_files_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x7e,%edi
call   1040 <islands_east_files@plt>
mov    %eax,%esi
mov    $0x40,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<islands_east_files_test>:
push   %rax
mov    $0x7e,%edi
call   1040 <islands_east_files@plt>
mov    $0x40,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @islands_east_files_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @islands_east_files(i32 126)
%4 = call i32 @assert_int_equal(i32 64, i32 %3)
ret void
}

LLVM IR (-O2):
define void @islands_east_files_test(i8** nocapture readnone %0) {
%2 = tail call i32 @islands_east_files(i32 126)
%3 = tail call i32 @assert_int_equal(i32 64, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ negBsbcA();
int /*<<< orphan*/ outnop1str(char *);
void negDreg() {
  outnop1str("NEGA");
  negBsbcA();
}


x86 assembly (clang, -O0):
<negDreg>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <outnop1str@plt>
mov    $0x0,%al
call   1030 <negBsbcA@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<negDreg>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <outnop1str@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <negBsbcA@plt>

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

LLVM IR (-O2):
@.str = [5 x i8] c"NEGA\00"
define void @negDreg() {
%1 = tail call i32 @outnop1str(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @negBsbcA()
ret void
}
double cosh(double x) { return 4; }


x86 assembly (clang, -O0):
<cosh>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosh>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @cosh(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 4.000000e+00
}

LLVM IR (-O2):
define double @cosh(double %0) {
ret double 4.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ AUTH;

/* Variables and functions */
int /*<<< orphan*/ *authnone_create();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int test_status = 1;
  AUTH *authNone = NULL;
  authNone = authnone_create();
  test_status = ((AUTH *)authNone != NULL) ? 0 : 1;
  printf("%d\n", test_status);
  return test_status;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <authnone_create@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe98(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <authnone_create@plt>
xor    %ebx,%ebx
test   %rax,%rax
sete   %bl
lea    0xec9(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32* (...) @authnone_create()
%2 = icmp eq i32* %1, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 %3
}
/* Variables and functions */
int retval();
int test(void) { return retval(); }


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

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

LLVM IR (-O0):
define i32 @test() {
%1 = call i32 (...) @retval()
ret i32 %1
}

LLVM IR (-O2):
define i32 @test() {
%1 = tail call i32 (...) @retval()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void ccfree_(void **ppData) {
  free(*ppData);
  *ppData = NULL;
}


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

x86 assembly (clang, -O2):
<ccfree_>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ccfree_(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
ret void
}
void w3(void *x, long long y) { *(long long *)(x + 32765) = y; }


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

x86 assembly (clang, -O2):
<w3>:
mov    %rsi,0x7ffd(%rdi)
ret

LLVM IR (-O0):
define void @w3(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32765
%8 = bitcast i8* %7 to i64*
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @w3(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 32765
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
void gtk_range_get_inverted() {}


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

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

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

LLVM IR (-O2):
define void @gtk_range_get_inverted() {
ret void
}
/* Variables and functions */
int icbrt_with_bits(int, int);
int icbrt(int a) {
  register int bits = 0;
  register unsigned n = a;
  while (n) {
    bits++;
    n >>= 1;
  }
  return icbrt_with_bits(a, bits);
}


x86 assembly (clang, -O0):
<icbrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1149 <icbrt+0x39>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <icbrt+0x18>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <icbrt_with_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<icbrt>:
xor    %esi,%esi
test   %edi,%edi
je     112c <icbrt+0x1c>
mov    %edi,%eax
mov    %edi,%ecx
nopw   0x0(%rax,%rax,1)
add    $0x1,%esi
shr    %ecx
cmp    $0x1,%eax
mov    %ecx,%eax
ja     1120 <icbrt+0x10>
jmp    1030 <icbrt_with_bits@plt>

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

LLVM IR (-O2):
define i32 @icbrt(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = phi i32 [ %6, %3 ], [ 0, %1 ]
%6 = add nuw nsw i32 %5, 1
%7 = lshr i32 %4, 1
%8 = icmp ult i32 %4, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
%11 = tail call i32 @icbrt_with_bits(i32 %0, i32 %10)
ret i32 %11
}
/* Variables and functions */
char *_malloc(int);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
char *mon_malloc(int size) {
  char *ret;
  monLock();
  ret = _malloc(size);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <monLock@plt>
mov    -0x4(%rbp),%edi
call   1030 <_malloc@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <monUnlock@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_malloc>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <monLock@plt>
mov    %ebx,%edi
call   1030 <_malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <monUnlock@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @mon_malloc(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i32 (...) @monLock()
%5 = load i32, i32* %2
%6 = call i8* @_malloc(i32 %5)
store i8* %6, i8** %3
%7 = call i32 (...) @monUnlock()
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
define i8* @mon_malloc(i32 %0) {
%2 = tail call i32 (...) @monLock()
%3 = tail call i8* @_malloc(i32 %0)
%4 = tail call i32 (...) @monUnlock()
ret i8* %3
}
/* Variables and functions */
size_t strlen(const char *str_) {
  const char *s;
  for (s = str_; *s; ++s)
    ;
  return (s - str_);
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1133 <strlen+0x33>
jmp    1122 <strlen+0x22>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
%8 = ptrtoint i8* %3 to i64
%9 = ptrtoint i8* %0 to i64
%10 = sub i64 %8, %9
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void usage(void) {
  fatal("Usage: mkbc <bytecode definition file> <asm output file>");
}


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

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

LLVM IR (-O0):
@.str = [57 x i8] c"Usage: mkbc <bytecode definition file> <asm output file>\00"
define void @usage() {
%1 = call i32 @fatal(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [57 x i8] c"Usage: mkbc <bytecode definition file> <asm output file>\00"
define void @usage() {
%1 = tail call i32 @fatal(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aroma_unlink_memaddr(void *);
int /*<<< orphan*/ free(void *);
void aroma_free(void **x) {
  aroma_unlink_memaddr(*x);
  if (*x != NULL) {
    free(*x);
    *x = NULL;
  }
}


x86 assembly (clang, -O0):
<aroma_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1040 <aroma_unlink_memaddr@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     115d <aroma_free+0x3d>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aroma_free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1040 <aroma_unlink_memaddr@plt>
mov    (%rbx),%rdi
test   %rdi,%rdi
je     1140 <aroma_free+0x20>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @aroma_free(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = call i32 @aroma_unlink_memaddr(i8* %4)
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8**, i8*** %2
%11 = load i8*, i8** %10
%12 = call i32 @free(i8* %11)
%13 = load i8**, i8*** %2
store i8* null, i8** %13
br label %14
14: ; preds = %9, %1
ret void
}

LLVM IR (-O2):
define void @aroma_free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @aroma_unlink_memaddr(i8* %2)
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @free(i8* %4)
store i8* null, i8** %0
br label %8
8: ; preds = %6, %1
ret void
}
void enable_relaxed(void) {}


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

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

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

LLVM IR (-O2):
define void @enable_relaxed() {
ret void
}
void srp_core_suspend(int num) { return; }


x86 assembly (clang, -O0):
<srp_core_suspend>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @srp_core_suspend(i32 %0) {
ret void
}
const char *LZ4_versionString(void) { return "1.7.6"; }


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"1.7.6\00"
define i8* @LZ4_versionString() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"1.7.6\00"
define i8* @LZ4_versionString() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
__attribute__((__no__)) void
do_nothing_trailing_hole_zero(struct test_trailing_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


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

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

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

LLVM IR (-O2):
%struct.test_trailing_hole = type opaque
define void @do_nothing_trailing_hole_zero(%struct.test_trailing_hole* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ checkLiterals();
int /*<<< orphan*/ loops();
int main() {
  checkLiterals();
  loops();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @checkLiterals()
%2 = tail call i32 (...) @loops()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int LoadWord(int /*<<< orphan*/ *);
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
char *luaI_buffer(int);
char *LoadString(FILE *D) {
  int size = LoadWord(D);
  char *b = luaI_buffer(size);
  fread(b, size, 1, D);
  return b;
}


x86 assembly (clang, -O0):
<LoadString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <LoadWord@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1050 <luaI_buffer@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fread@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LoadString>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <LoadWord@plt>
mov    %eax,%ebp
mov    %eax,%edi
call   1050 <luaI_buffer@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1030 <fread@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i8* @LoadString(i32* %0) {
%2 = tail call i32 @LoadWord(i32* %0)
%3 = tail call i8* @luaI_buffer(i32 %2)
%4 = tail call i32 @fread(i8* %3, i32 %2, i32 1, i32* %0)
ret i8* %3
}
/* Variables and functions */
long longval() { return (long)(sizeof(size_t)); }


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

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

LLVM IR (-O0):
define i64 @longval() {
ret i64 8
}

LLVM IR (-O2):
define i64 @longval() {
ret i64 8
}
void RTAvlrFileOffsetRangeGet(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlrFileOffsetRangeGet() {
ret void
}
/* Variables and functions */
long double hypot(double, double);
__attribute__((weak)) long double hypotl(long double x, long double y) {
  return hypot((double)x, (double)y);
}


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

x86 assembly (clang, -O2):
<hypotl>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm1
jmp    1030 <hypot@plt>

LLVM IR (-O0):
define weak x86_fp80 @hypotl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = fptrunc x86_fp80 %5 to double
%7 = load x86_fp80, x86_fp80* %4
%8 = fptrunc x86_fp80 %7 to double
%9 = call x86_fp80 @hypot(double %6, double %8)
ret x86_fp80 %9
}

LLVM IR (-O2):
define weak x86_fp80 @hypotl(x86_fp80 %0, x86_fp80 %1) {
%3 = fptrunc x86_fp80 %0 to double
%4 = fptrunc x86_fp80 %1 to double
%5 = tail call x86_fp80 @hypot(double %3, double %4)
ret x86_fp80 %5
}
void ble_rsp_attclient_indicate_confirm(
    const struct ble_msg_attclient_indicate_confirm_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.ble_msg_attclient_indicate_confirm_rsp_t = type opaque
define void @ble_rsp_attclient_indicate_confirm(%struct.ble_msg_attclient_indicate_confirm_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ switchmode(int const);
void pdp11_switchmode(const int newm) { switchmode(newm); }


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

x86 assembly (clang, -O2):
<pdp11_switchmode>:
jmp    1030 <switchmode@plt>

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

LLVM IR (-O2):
define void @pdp11_switchmode(i32 %0) {
%2 = tail call i32 @switchmode(i32 %0)
ret void
}