xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ sla_aopqk_(double *, double *, double *, double *, double *,
                              double *, double *, double *);
void slaAopqk(double rap, double dap, double aoprms[14], double *aob,
              double *zob, double *hob, double *dob, double *rob) {
  sla_aopqk_(&rap, &dap, aoprms, aob, zob, hob, dob, rob);
}


x86 assembly (clang, -O0):
<slaAopqk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
mov    %rcx,-0x30(%rbp)
mov    %r8,-0x38(%rbp)
mov    %r9,-0x40(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
mov    -0x38(%rbp),%r10
mov    -0x40(%rbp),%rax
lea    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1030 <sla_aopqk_@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaAopqk>:
sub    $0x18,%rsp
mov    %r9,%rax
mov    %r8,%r10
mov    %rcx,%r9
mov    %rdx,%r8
mov    %rsi,%rcx
mov    %rdi,%rdx
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
push   %rax
push   %r10
call   1030 <sla_aopqk_@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @slaAopqk(double %0, double %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7) {
%9 = alloca double
%10 = alloca double
%11 = alloca double*
%12 = alloca double*
%13 = alloca double*
%14 = alloca double*
%15 = alloca double*
%16 = alloca double*
store double %0, double* %9
store double %1, double* %10
store double* %2, double** %11
store double* %3, double** %12
store double* %4, double** %13
store double* %5, double** %14
store double* %6, double** %15
store double* %7, double** %16
%17 = load double*, double** %11
%18 = load double*, double** %12
%19 = load double*, double** %13
%20 = load double*, double** %14
%21 = load double*, double** %15
%22 = load double*, double** %16
%23 = call i32 @sla_aopqk_(double* %9, double* %10, double* %17, double* %18, double* %19, double* %20, double* %21, double* %22)
ret void
}

LLVM IR (-O2):
define void @slaAopqk(double %0, double %1, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7) {
%9 = alloca double
%10 = alloca double
store double %0, double* %9
store double %1, double* %10
%11 = call i32 @sla_aopqk_(double* %9, double* %10, double* %2, double* %3, double* %4, double* %5, double* %6, double* %7)
ret void
}
void gpio_dir_mask(unsigned char dir) {
  *((volatile unsigned short *)0x4000134) =
      (*((volatile unsigned short *)0x4000134) & 0xff0f) | ((dir & 0xf) << 4);
}


x86 assembly (clang, -O0):
<gpio_dir_mask>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x4000134,%eax
mov    (%rax),%ax
movzwl %ax,%eax
and    $0xff0f,%eax
movzbl -0x1(%rbp),%ecx
and    $0xf,%ecx
shl    $0x4,%ecx
or     %ecx,%eax
mov    %ax,%cx
mov    $0x4000134,%eax
mov    %cx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpio_dir_mask>:
movzwl 0x4000134,%eax
04
and    $0xffffff0f,%eax
shl    $0x4,%dil
movzbl %dil,%ecx
or     %eax,%ecx
mov    %cx,0x4000134
04
ret

LLVM IR (-O0):
define void @gpio_dir_mask(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load volatile i16, i16* inttoptr (i64 67109172 to i16*)
%4 = zext i16 %3 to i32
%5 = and i32 %4, 65295
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = and i32 %7, 15
%9 = shl i32 %8, 4
%10 = or i32 %5, %9
%11 = trunc i32 %10 to i16
store volatile i16 %11, i16* inttoptr (i64 67109172 to i16*)
ret void
}

LLVM IR (-O2):
define void @gpio_dir_mask(i8 zeroext %0) {
%2 = load volatile i16, i16* inttoptr (i64 67109172 to i16*)
%3 = and i16 %2, -241
%4 = shl i8 %0, 4
%5 = zext i8 %4 to i16
%6 = or i16 %3, %5
store volatile i16 %6, i16* inttoptr (i64 67109172 to i16*)
ret void
}
/* Variables and functions */
double RAND_MAX;
scalar_t__ rand();
double NumAleatorio(double inferior, double superior) {
  double num;
  num = (double)rand();
  num = num * (superior - inferior) / RAND_MAX;
  num += inferior;
  return num;
}


x86 assembly (clang, -O0):
<NumAleatorio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
mov    0x2e9b(%rip),%rax
divsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<NumAleatorio>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %rax,%xmm1
movsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm2
subsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
mov    0x2e9e(%rip),%rax
divsd  (%rax),%xmm0
addsd  %xmm2,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@RAND_MAX = global double 0.000000e+00
define double @NumAleatorio(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = call i64 (...) @rand()
%7 = sitofp i64 %6 to double
store double %7, double* %5
%8 = load double, double* %5
%9 = load double, double* %4
%10 = load double, double* %3
%11 = fsub double %9, %10
%12 = fmul double %8, %11
%13 = load double, double* @RAND_MAX
%14 = fdiv double %12, %13
store double %14, double* %5
%15 = load double, double* %3
%16 = load double, double* %5
%17 = fadd double %16, %15
store double %17, double* %5
%18 = load double, double* %5
ret double %18
}

LLVM IR (-O2):
@RAND_MAX = global double 0.000000e+00
define double @NumAleatorio(double %0, double %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to double
%5 = fsub double %1, %0
%6 = fmul double %5, %4
%7 = load double, double* @RAND_MAX
%8 = fdiv double %6, %7
%9 = fadd double %8, %0
ret double %9
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void scrypt_le32enc(void *pp, uint32_t x) {
  uint8_t *p = (uint8_t *)pp;
  p[0] = x & 0xff;
  p[1] = (x >> 8) & 0xff;
  p[2] = (x >> 16) & 0xff;
  p[3] = (x >> 24) & 0xff;
}


x86 assembly (clang, -O0):
<scrypt_le32enc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
and    $0xff,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<scrypt_le32enc>:
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,(%rdi)
movzbl %ah,%ecx
mov    %ecx,0x4(%rdi)
mov    %esi,%ecx
shr    $0x10,%ecx
movzbl %cl,%ecx
mov    %ecx,0x8(%rdi)
shr    $0x18,%eax
mov    %eax,0xc(%rdi)
ret

LLVM IR (-O0):
define void @scrypt_le32enc(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 i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %4
%9 = and i32 %8, 255
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %4
%13 = ashr i32 %12, 8
%14 = and i32 %13, 255
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
%17 = load i32, i32* %4
%18 = ashr i32 %17, 16
%19 = and i32 %18, 255
%20 = load i32*, i32** %5
%21 = getelementptr inbounds i32, i32* %20, i64 2
store i32 %19, i32* %21
%22 = load i32, i32* %4
%23 = ashr i32 %22, 24
%24 = and i32 %23, 255
%25 = load i32*, i32** %5
%26 = getelementptr inbounds i32, i32* %25, i64 3
store i32 %24, i32* %26
ret void
}

LLVM IR (-O2):
define void @scrypt_le32enc(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = and i32 %1, 255
store i32 %4, i32* %3
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = getelementptr inbounds i8, i8* %0, i64 4
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
%9 = lshr i32 %1, 16
%10 = and i32 %9, 255
%11 = getelementptr inbounds i8, i8* %0, i64 8
%12 = bitcast i8* %11 to i32*
store i32 %10, i32* %12
%13 = lshr i32 %1, 24
%14 = getelementptr inbounds i8, i8* %0, i64 12
%15 = bitcast i8* %14 to i32*
store i32 %13, i32* %15
ret void
}
/* Variables and functions */
unsigned int sleep(unsigned int);
int /*<<< orphan*/ unix_error(char *);
unsigned int Sleep(unsigned int secs) {
  unsigned int rc;
  if ((rc = sleep(secs)) > 0)
    unix_error("Sleep error");
  return rc;
}


x86 assembly (clang, -O0):
<Sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <sleep@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jbe    114b <Sleep+0x2b>
lea    0xeba(%rip),%rdi
call   1030 <unix_error@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sleep>:
push   %rbx
call   1040 <sleep@plt>
mov    %eax,%ebx
test   %eax,%eax
je     1138 <Sleep+0x18>
lea    0xecd(%rip),%rdi
call   1030 <unix_error@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Sleep error\00"
define i32 @Sleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @sleep(i32 %4)
store i32 %5, i32* %3
%6 = icmp ugt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 @unix_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
@.str = [12 x i8] c"Sleep error\00"
define i32 @Sleep(i32 %0) {
%2 = tail call i32 @sleep(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @unix_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ MCUSendCmdSetUserEventRecordTime(int);
void MCUSendCmdSetUserEventRecordTimeD() {
  MCUSendCmdSetUserEventRecordTime(134);
}


x86 assembly (clang, -O0):
<MCUSendCmdSetUserEventRecordTimeD>:
push   %rbp
mov    %rsp,%rbp
mov    $0x86,%edi
call   1030 <MCUSendCmdSetUserEventRecordTime@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @MCUSendCmdSetUserEventRecordTimeD() {
%1 = call i32 @MCUSendCmdSetUserEventRecordTime(i32 134)
ret void
}

LLVM IR (-O2):
define void @MCUSendCmdSetUserEventRecordTimeD() {
%1 = tail call i32 @MCUSendCmdSetUserEventRecordTime(i32 134)
ret void
}
void lib_call() { asm(""); }


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

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

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

LLVM IR (-O2):
define void @lib_call() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void mvMatScale4(float *r, float factor) {
  int i;
  for (i = 0; i < 16; i++)
    r[i] *= factor;
}


x86 assembly (clang, -O0):
<mvMatScale4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x10,-0x10(%rbp)
jge    1143 <mvMatScale4+0x43>
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mulss  (%rax,%rcx,4),%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1114 <mvMatScale4+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<mvMatScale4>:
shufps $0x0,%xmm0,%xmm0
movups (%rdi),%xmm1
movups 0x10(%rdi),%xmm2
movups 0x20(%rdi),%xmm3
movups 0x30(%rdi),%xmm4
mulps  %xmm0,%xmm1
movups %xmm1,(%rdi)
mulps  %xmm0,%xmm2
movups %xmm2,0x10(%rdi)
mulps  %xmm0,%xmm3
movups %xmm3,0x20(%rdi)
mulps  %xmm0,%xmm4
movups %xmm4,0x30(%rdi)
ret

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

LLVM IR (-O2):
define void @mvMatScale4(float* nocapture %0, float %1) {
%3 = bitcast float* %0 to <4 x float>*
%4 = load <4 x float>, <4 x float>* %3
%5 = insertelement <4 x float> poison, float %1, i64 0
%6 = shufflevector <4 x float> %5, <4 x float> poison, <4 x i32> zeroinitializer
%7 = fmul <4 x float> %4, %6
%8 = bitcast float* %0 to <4 x float>*
store <4 x float> %7, <4 x float>* %8
%9 = getelementptr inbounds float, float* %0, i64 4
%10 = bitcast float* %9 to <4 x float>*
%11 = load <4 x float>, <4 x float>* %10
%12 = fmul <4 x float> %11, %6
%13 = bitcast float* %9 to <4 x float>*
store <4 x float> %12, <4 x float>* %13
%14 = getelementptr inbounds float, float* %0, i64 8
%15 = bitcast float* %14 to <4 x float>*
%16 = load <4 x float>, <4 x float>* %15
%17 = fmul <4 x float> %16, %6
%18 = bitcast float* %14 to <4 x float>*
store <4 x float> %17, <4 x float>* %18
%19 = getelementptr inbounds float, float* %0, i64 12
%20 = bitcast float* %19 to <4 x float>*
%21 = load <4 x float>, <4 x float>* %20
%22 = fmul <4 x float> %21, %6
%23 = bitcast float* %19 to <4 x float>*
store <4 x float> %22, <4 x float>* %23
ret void
}
/* Variables and functions */
int /*<<< orphan*/ term_send(char);
void term_erase_screen() {
  term_send(27);
  term_send('[');
  term_send('2');
  term_send('J');
}


x86 assembly (clang, -O0):
<term_erase_screen>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1b,%edi
call   1030 <term_send@plt>
mov    $0x5b,%edi
call   1030 <term_send@plt>
mov    $0x32,%edi
call   1030 <term_send@plt>
mov    $0x4a,%edi
call   1030 <term_send@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_erase_screen>:
push   %rax
mov    $0x1b,%edi
call   1030 <term_send@plt>
mov    $0x5b,%edi
call   1030 <term_send@plt>
mov    $0x32,%edi
call   1030 <term_send@plt>
mov    $0x4a,%edi
pop    %rax
jmp    1030 <term_send@plt>

LLVM IR (-O0):
define void @term_erase_screen() {
%1 = call i32 @term_send(i8 signext 27)
%2 = call i32 @term_send(i8 signext 91)
%3 = call i32 @term_send(i8 signext 50)
%4 = call i32 @term_send(i8 signext 74)
ret void
}

LLVM IR (-O2):
define void @term_erase_screen() {
%1 = tail call i32 @term_send(i8 signext 27)
%2 = tail call i32 @term_send(i8 signext 91)
%3 = tail call i32 @term_send(i8 signext 50)
%4 = tail call i32 @term_send(i8 signext 74)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ *wcscpy(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
wchar_t *ISandBox_wcscpy(wchar_t *dest, wchar_t *src) {
  return wcscpy(dest, src);
}


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

x86 assembly (clang, -O2):
<ISandBox_wcscpy>:
jmp    1030 <wcscpy@plt>

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

LLVM IR (-O2):
define i32* @ISandBox_wcscpy(i32* %0, i32* %1) {
%3 = tail call i32* @wcscpy(i32* %0, i32* %1)
ret i32* %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ display;
};
typedef TYPE_1__ XButtonEvent;

/* Variables and functions */
void *get_XButtonEvent_display(void *_p) {
  return (void *)((XButtonEvent *)_p)->display;
}


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

x86 assembly (clang, -O2):
<get_XButtonEvent_display>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XButtonEvent_display(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XButtonEvent_display(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  int x, y;
  printf("x/y"
         "\n");
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"x/y\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [4 x i8] c"x/y\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ PC_UART_UartStop();
void PC_UART_ScbModeStop(void) { PC_UART_UartStop(); }


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

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

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

LLVM IR (-O2):
define void @PC_UART_ScbModeStop() {
%1 = tail call i32 (...) @PC_UART_UartStop()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;
typedef int /*<<< orphan*/ dev_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_mknodat;
int syscall(int /*<<< orphan*/, int, char const *, int /*<<< orphan*/,
            int /*<<< orphan*/);
int __mknodat(int dirfd, const char *pathname, mode_t mode, dev_t dev) {
  return syscall(__NR_mknodat, dirfd, pathname, mode, dev);
}


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

x86 assembly (clang, -O2):
<__mknodat>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec7(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
@__NR_mknodat = global i32 0
define i32 @__mknodat(i32 %0, i8* %1, i32 %2, i32 %3) {
%5 = load i32, i32* @__NR_mknodat
%6 = tail call i32 @syscall(i32 %5, i32 %0, i8* %1, i32 %2, i32 %3)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ vcp2_initOnce();
int /*<<< orphan*/ vcp2_initPerUse(int /*<<< orphan*/, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/);
void app_wifirx6m_setup_once() {
  vcp2_initOnce();
  vcp2_initPerUse(0, 0, 0, 0);
}


x86 assembly (clang, -O0):
<app_wifirx6m_setup_once>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <vcp2_initOnce@plt>
xor    %ecx,%ecx
mov    %ecx,%edi
mov    %ecx,%esi
mov    %ecx,%edx
call   1030 <vcp2_initPerUse@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<app_wifirx6m_setup_once>:
push   %rax
xor    %eax,%eax
call   1040 <vcp2_initOnce@plt>
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
pop    %rax
jmp    1030 <vcp2_initPerUse@plt>

LLVM IR (-O0):
define void @app_wifirx6m_setup_once() {
%1 = call i32 (...) @vcp2_initOnce()
%2 = call i32 @vcp2_initPerUse(i32 0, i32 0, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @app_wifirx6m_setup_once() {
%1 = tail call i32 (...) @vcp2_initOnce()
%2 = tail call i32 @vcp2_initPerUse(i32 0, i32 0, i32 0, i32 0)
ret void
}
void worker1(void *data) { printf("%s: working ...\n", __func__); }


x86 assembly (clang, -O0):
<worker1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
lea    0xee7(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<worker1>:
lea    0xee9(%rip),%rdi
lea    0xef3(%rip),%rsi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"%s: working ...\0A\00"
@__func__.worker1 = [8 x i8] c"worker1\00"
define void @worker1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.worker1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"%s: working ...\0A\00"
@__func__.worker1 = [8 x i8] c"worker1\00"
define void @worker1(i8* nocapture readnone %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.worker1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;
struct ts_eit {
  int dummy;
};

/* Variables and functions */
struct ts_eit *ts_eit_alloc_init(int /*<<< orphan*/, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int /*<<< orphan*/);
struct ts_eit *ts_eit_alloc_init_schedule(uint16_t service_id,
                                          uint16_t transport_stream_id,
                                          uint16_t org_network_id,
                                          uint8_t sec_number,
                                          uint8_t last_sec_number) {
  return ts_eit_alloc_init(service_id, transport_stream_id, org_network_id,
                           0x50, sec_number, last_sec_number);
}


x86 assembly (clang, -O0):
<ts_eit_alloc_init_schedule>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    $0x50,%ecx
call   1030 <ts_eit_alloc_init@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ts_eit_alloc_init_schedule>:
mov    %r8d,%r9d
mov    %ecx,%r8d
mov    $0x50,%ecx
jmp    1030 <ts_eit_alloc_init@plt>

LLVM IR (-O0):
%struct.ts_eit = type { i32 }
define %struct.ts_eit* @ts_eit_alloc_init_schedule(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call %struct.ts_eit* @ts_eit_alloc_init(i32 %11, i32 %12, i32 %13, i32 80, i32 %14, i32 %15)
ret %struct.ts_eit* %16
}

LLVM IR (-O2):
%struct.ts_eit = type { i32 }
define %struct.ts_eit* @ts_eit_alloc_init_schedule(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call %struct.ts_eit* @ts_eit_alloc_init(i32 %0, i32 %1, i32 %2, i32 80, i32 %3, i32 %4)
ret %struct.ts_eit* %6
}
const char *db_drop_standingdata_table_sql(void) {
  static const char *query = "DROP TABLE standing_data";
  return query;
}


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

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

LLVM IR (-O0):
@db_drop_standingdata_table_sql.query = internal global i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i32 0, i32 0)
@.str = [25 x i8] c"DROP TABLE standing_data\00"
define i8* @db_drop_standingdata_table_sql() {
%1 = load i8*, i8** @db_drop_standingdata_table_sql.query
ret i8* %1
}

LLVM IR (-O2):
@.str = [25 x i8] c"DROP TABLE standing_data\00"
define i8* @db_drop_standingdata_table_sql() {
ret i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
struct usb_spca50x {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cx11646_fw(struct usb_spca50x *);
int cx11646_initsize(struct usb_spca50x *);
int /*<<< orphan*/ cx11646_jpeg(struct usb_spca50x *);
int /*<<< orphan*/ cx_sensor(struct usb_spca50x *);
void cx11646_start(struct usb_spca50x *spca50x) {
  int err;
  err = cx11646_initsize(spca50x);
  cx11646_fw(spca50x);
  cx_sensor(spca50x);
  cx11646_jpeg(spca50x);
}


x86 assembly (clang, -O0):
<cx11646_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <cx11646_initsize@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <cx11646_fw@plt>
mov    -0x8(%rbp),%rdi
call   1030 <cx_sensor@plt>
mov    -0x8(%rbp),%rdi
call   1050 <cx11646_jpeg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cx11646_start>:
push   %rbx
mov    %rdi,%rbx
call   1060 <cx11646_initsize@plt>
mov    %rbx,%rdi
call   1040 <cx11646_fw@plt>
mov    %rbx,%rdi
call   1030 <cx_sensor@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <cx11646_jpeg@plt>

LLVM IR (-O0):
%struct.usb_spca50x = type { i32 }
define void @cx11646_start(%struct.usb_spca50x* %0) {
%2 = alloca %struct.usb_spca50x*
%3 = alloca i32
store %struct.usb_spca50x* %0, %struct.usb_spca50x** %2
%4 = load %struct.usb_spca50x*, %struct.usb_spca50x** %2
%5 = call i32 @cx11646_initsize(%struct.usb_spca50x* %4)
store i32 %5, i32* %3
%6 = load %struct.usb_spca50x*, %struct.usb_spca50x** %2
%7 = call i32 @cx11646_fw(%struct.usb_spca50x* %6)
%8 = load %struct.usb_spca50x*, %struct.usb_spca50x** %2
%9 = call i32 @cx_sensor(%struct.usb_spca50x* %8)
%10 = load %struct.usb_spca50x*, %struct.usb_spca50x** %2
%11 = call i32 @cx11646_jpeg(%struct.usb_spca50x* %10)
ret void
}

LLVM IR (-O2):
%struct.usb_spca50x = type { i32 }
define void @cx11646_start(%struct.usb_spca50x* %0) {
%2 = tail call i32 @cx11646_initsize(%struct.usb_spca50x* %0)
%3 = tail call i32 @cx11646_fw(%struct.usb_spca50x* %0)
%4 = tail call i32 @cx_sensor(%struct.usb_spca50x* %0)
%5 = tail call i32 @cx11646_jpeg(%struct.usb_spca50x* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void popreal4array_(void *x, unsigned int *n) {
  popNarray((char *)x, (*n * 4));
}


x86 assembly (clang, -O0):
<popreal4array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x2,%esi
call   1030 <popNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<popreal4array_>:
mov    (%rsi),%esi
shl    $0x2,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @popreal4array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 2
%5 = tail call i32 @popNarray(i8* %0, i32 %4)
ret void
}
int test_imm_9Auint32_mem(unsigned int *val) {
  return ((*val) & (0x9A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_9Auint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 154
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sleep(int);
int main(int argc, char *argv[]) {
  printf("hello, my cat");
  sleep(3);
  printf("Byebye, my cat!\n");
  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)
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
mov    $0x3,%edi
call   1050 <sleep@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"hello, my cat\00"
@.str.1 = [17 x i8] c"Byebye, my cat!\0A\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 i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @sleep(i32 3)
%8 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"hello, my cat\00"
@str = [16 x i8] c"Byebye, my cat!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
rf(int *rnx) { return (rnx); }


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

x86 assembly (clang, -O2):
<rf>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i32 @rf(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Type definitions */
struct _reent {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ malloc_stats();
void _malloc_stats_r(struct _reent *ptr) { malloc_stats(); }


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

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

LLVM IR (-O0):
%struct._reent = type { i32 }
define void @_malloc_stats_r(%struct._reent* %0) {
%2 = alloca %struct._reent*
store %struct._reent* %0, %struct._reent** %2
%3 = call i32 (...) @malloc_stats()
ret void
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define void @_malloc_stats_r(%struct._reent* nocapture readnone %0) {
%2 = tail call i32 (...) @malloc_stats()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strlens(char *);
main() { printf("%d\n", strlens("hello world!")); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed9(%rip),%rdi
call   1030 <strlens@plt>
mov    %eax,%esi
lea    0xec7(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
@.str.1 = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = call i32 @strlens(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%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"
@.str.1 = [13 x i8] c"hello world!\00"
define i32 @main() {
%1 = tail call i32 @strlens(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%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*/ chroot(char const *);
int main() {
  chroot("/tmp");
  chroot((const char *)-1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <chroot@plt>
mov    $0xffffffffffffffff,%rdi
call   1030 <chroot@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"/tmp\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @chroot(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @chroot(i8* inttoptr (i64 -1 to i8*))
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"/tmp\00"
define i32 @main() {
%1 = tail call i32 @chroot(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @chroot(i8* inttoptr (i64 -1 to i8*))
ret i32 0
}
/* Variables and functions */
float max(float, float);
float min(float, float);
float clamp(float x, float bottom, float top) {
  x = max(x, bottom);
  x = min(x, top);
  return x;
}


x86 assembly (clang, -O0):
<clamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1040 <max@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
call   1030 <min@plt>
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clamp>:
push   %rax
movss  %xmm2,0x4(%rsp)
call   1040 <max@plt>
movss  0x4(%rsp),%xmm1
pop    %rax
jmp    1030 <min@plt>

LLVM IR (-O0):
define float @clamp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = call float @max(float %7, float %8)
store float %9, float* %4
%10 = load float, float* %4
%11 = load float, float* %6
%12 = call float @min(float %10, float %11)
store float %12, float* %4
%13 = load float, float* %4
ret float %13
}

LLVM IR (-O2):
define float @clamp(float %0, float %1, float %2) {
%4 = tail call float @max(float %0, float %1)
%5 = tail call float @min(float %4, float %2)
ret float %5
}
/* Type definitions */
struct dummy {
  int dummy;
};
typedef enum dummy_enum { ____Placeholder_dummy_enum } dummy_enum;

/* Variables and functions */
void const *hack(struct dummy const *, int *);
const void *test(const struct dummy *t) {
  const struct dummy *tt;
  enum dummy_enum *e;
  tt = t;
  return hack(t, e);
}


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

x86 assembly (clang, -O2):
<test>:
jmp    1030 <hack@plt>

LLVM IR (-O0):
%struct.dummy = type { i32 }
define i8* @test(%struct.dummy* %0) {
%2 = alloca %struct.dummy*
%3 = alloca %struct.dummy*
%4 = alloca i32*
store %struct.dummy* %0, %struct.dummy** %2
%5 = load %struct.dummy*, %struct.dummy** %2
store %struct.dummy* %5, %struct.dummy** %3
%6 = load %struct.dummy*, %struct.dummy** %2
%7 = load i32*, i32** %4
%8 = call i8* @hack(%struct.dummy* %6, i32* %7)
ret i8* %8
}

LLVM IR (-O2):
%struct.dummy = type { i32 }
define i8* @test(%struct.dummy* %0) {
%2 = tail call i8* @hack(%struct.dummy* %0, i32* undef)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ initIMU();
int /*<<< orphan*/ initMPUlpf();
int /*<<< orphan*/ initPIDs();
int /*<<< orphan*/ initRC();
int /*<<< orphan*/ initRCPins();
int /*<<< orphan*/ initSensorOrientation();
int /*<<< orphan*/ recalcMotorStuff();
void updateAllParameters() {
  recalcMotorStuff();
  initPIDs();
  initIMU();
  initMPUlpf();
  initSensorOrientation();
  initRCPins();
  initRC();
}


x86 assembly (clang, -O0):
<updateAllParameters>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1090 <recalcMotorStuff@plt>
mov    $0x0,%al
call   1080 <initPIDs@plt>
mov    $0x0,%al
call   1040 <initIMU@plt>
mov    $0x0,%al
call   1050 <initMPUlpf@plt>
mov    $0x0,%al
call   1060 <initSensorOrientation@plt>
mov    $0x0,%al
call   1030 <initRCPins@plt>
mov    $0x0,%al
call   1070 <initRC@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<updateAllParameters>:
push   %rax
xor    %eax,%eax
call   1090 <recalcMotorStuff@plt>
xor    %eax,%eax
call   1080 <initPIDs@plt>
xor    %eax,%eax
call   1040 <initIMU@plt>
xor    %eax,%eax
call   1050 <initMPUlpf@plt>
xor    %eax,%eax
call   1060 <initSensorOrientation@plt>
xor    %eax,%eax
call   1030 <initRCPins@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <initRC@plt>

LLVM IR (-O0):
define void @updateAllParameters() {
%1 = call i32 (...) @recalcMotorStuff()
%2 = call i32 (...) @initPIDs()
%3 = call i32 (...) @initIMU()
%4 = call i32 (...) @initMPUlpf()
%5 = call i32 (...) @initSensorOrientation()
%6 = call i32 (...) @initRCPins()
%7 = call i32 (...) @initRC()
ret void
}

LLVM IR (-O2):
define void @updateAllParameters() {
%1 = tail call i32 (...) @recalcMotorStuff()
%2 = tail call i32 (...) @initPIDs()
%3 = tail call i32 (...) @initIMU()
%4 = tail call i32 (...) @initMPUlpf()
%5 = tail call i32 (...) @initSensorOrientation()
%6 = tail call i32 (...) @initRCPins()
%7 = tail call i32 (...) @initRC()
ret void
}
/* Type definitions */
typedef char uint32_t;

/* Variables and functions */
uint32_t read_u32_be(char *buf) {
  uint32_t n = 0;
  n |= buf[0] << 24;
  n |= buf[1] << 16;
  n |= buf[2] << 8;
  n |= buf[3];
  return n;
}


x86 assembly (clang, -O0):
<read_u32_be>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
shl    $0x18,%ecx
movsbl -0x9(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%ecx
shl    $0x10,%ecx
movsbl -0x9(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x2(%rax),%ecx
shl    $0x8,%ecx
movsbl -0x9(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x3(%rax),%ecx
movsbl -0x9(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_u32_be>:
mov    0x3(%rdi),%al
ret

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

LLVM IR (-O2):
define signext i8 @read_u32_be(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 3
%3 = load i8, i8* %2
ret i8 %3
}
short RG0newwin(void) { return (0); }


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

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

LLVM IR (-O0):
define signext i16 @RG0newwin() {
ret i16 0
}

LLVM IR (-O2):
define signext i16 @RG0newwin() {
ret i16 0
}
/* Type definitions */
typedef int /*<<< orphan*/ buff;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ SYS_getrandom;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int **, int);
int main() {
  signed int buff[1];
  syscall(SYS_getrandom, &buff, sizeof(buff) * 1);
  if (buff[0] >= 0)
    exit(EXIT_FAILURE);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1030 <syscall@plt>
cmpl   $0x0,-0x8(%rbp)
jl     115e <main+0x3e>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    0x2e6b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <syscall@plt>
cmpl   $0x0,0x4(%rsp)
js     114e <main+0x2e>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@SYS_getrandom = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x i32]
store i32 0, i32* %1
%3 = load i32, i32* @SYS_getrandom
%4 = bitcast [1 x i32]* %2 to i32**
%5 = call i32 @syscall(i32 %3, i32** %4, i32 4)
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %2, i64 0, i64 0
%7 = load i32, i32* %6
%8 = icmp sge i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %0
%13 = load i32, i32* @EXIT_SUCCESS
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@SYS_getrandom = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = load i32, i32* @SYS_getrandom
%4 = bitcast [1 x i32]* %1 to i32**
%5 = call i32 @syscall(i32 %3, i32** %4, i32 4)
%6 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%7 = load i32, i32* %6
%8 = icmp sgt i32 %7, -1
br i1 %8, label %9, label %12
9: ; preds = %0
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %0
%13 = load i32, i32* @EXIT_SUCCESS
%14 = call i32 @exit(i32 %13)
unreachable
}
void d_storesw(register unsigned char **ptr, register signed short data) {
  *(*ptr)++ = ((unsigned short)data & 0xff00) >> 8;
  *(*ptr)++ = ((unsigned short)data & 0x00ff) >> 0;
}


x86 assembly (clang, -O0):
<d_storesw>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
and    $0xff00,%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
sar    $0x0,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_storesw>:
mov    %esi,%eax
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %ah,(%rcx)
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
ret

LLVM IR (-O0):
define void @d_storesw(i8** %0, i16 signext %1) {
%3 = alloca i8**
%4 = alloca i16
store i8** %0, i8*** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = and i32 %6, 65280
%8 = ashr i32 %7, 8
%9 = trunc i32 %8 to i8
%10 = load i8**, i8*** %3
%11 = load i8*, i8** %10
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %10
store i8 %9, i8* %11
%13 = load i16, i16* %4
%14 = zext i16 %13 to i32
%15 = and i32 %14, 255
%16 = ashr i32 %15, 0
%17 = trunc i32 %16 to i8
%18 = load i8**, i8*** %3
%19 = load i8*, i8** %18
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %18
store i8 %17, i8* %19
ret void
}

LLVM IR (-O2):
define void @d_storesw(i8** nocapture %0, i16 signext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
%5 = load i8*, i8** %0
%6 = getelementptr inbounds i8, i8* %5, i64 1
store i8* %6, i8** %0
store i8 %4, i8* %5
%7 = trunc i16 %1 to i8
%8 = load i8*, i8** %0
%9 = getelementptr inbounds i8, i8* %8, i64 1
store i8* %9, i8** %0
store i8 %7, i8* %8
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
char *strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *str) {
  char *new_str = (char *)malloc(strlen(str) + 1);
  if (new_str == NULL)
    return NULL;
  return strcpy(new_str, str);
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    116d <strdup+0x3d>
movq   $0x0,-0x8(%rbp)
jmp    117e <strdup+0x4e>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     115a <strdup+0x2a>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
jmp    115c <strdup+0x2c>
xor    %ebx,%ebx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @strlen(i8* %5)
%7 = add nsw i64 %6, 1
%8 = call i64 @malloc(i64 %7)
%9 = inttoptr i64 %8 to i8*
store i8* %9, i8** %4
%10 = load i8*, i8** %4
%11 = icmp eq i8* %10, null
br i1 %11, label %12, label %13
12: ; preds = %1
store i8* null, i8** %2
br label %17
13: ; preds = %1
%14 = load i8*, i8** %4
%15 = load i8*, i8** %3
%16 = call i8* @strcpy(i8* %14, i8* %15)
store i8* %16, i8** %2
br label %17
17: ; preds = %13, %12
%18 = load i8*, i8** %2
ret i8* %18
}

LLVM IR (-O2):
define i8* @strdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = inttoptr i64 %4 to i8*
%8 = tail call i8* @strcpy(i8* %7, i8* dereferenceable(1) %0)
br label %9
9: ; preds = %1, %6
%10 = phi i8* [ %7, %6 ], [ null, %1 ]
ret i8* %10
}