xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Programa versão %s\n", "2.02");
  printf("O numero pi vale: %f\n", 3.1416);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
lea    0xef0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
movsd  0xebd(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
lea    0xefe(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
movsd  0xecb(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"Programa vers\C3\A3o %s\0A\00"
@.str.1 = [5 x i8] c"2.02\00"
@.str.2 = [22 x i8] c"O numero pi vale: %f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double 3.141600e+00)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"Programa vers\C3\A3o %s\0A\00"
@.str.1 = [5 x i8] c"2.02\00"
@.str.2 = [22 x i8] c"O numero pi vale: %f\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), double 3.141600e+00)
ret i32 0
}
/* Variables and functions */
int ENXIO;
int nc_pm8xxx_mpp_config_bi_dir(unsigned mpp, unsigned level,
                                unsigned control) {
  return -ENXIO;
}


x86 assembly (clang, -O0):
<nc_pm8xxx_mpp_config_bi_dir>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
xor    %eax,%eax
mov    0x2eca(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nc_pm8xxx_mpp_config_bi_dir>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENXIO = global i32 0
define i32 @nc_pm8xxx_mpp_config_bi_dir(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* @ENXIO
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@ENXIO = global i32 0
define i32 @nc_pm8xxx_mpp_config_bi_dir(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @ENXIO
%5 = sub nsw i32 0, %4
ret i32 %5
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t days_from_0(int32_t year) {
  year--;
  return 365 * year + (year / 400) - (year / 100) + (year / 4);
}


x86 assembly (clang, -O0):
<days_from_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
imul   $0x16d,-0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<days_from_0>:
lea    -0x1(%rdi),%eax
imul   $0x16d,%eax,%ecx
movslq %eax,%rdx
imul   $0x51eb851f,%rdx,%rax
mov    %rax,%rsi
shr    $0x3f,%rsi
sar    $0x27,%rax
add    %esi,%eax
add    %ecx,%eax
imul   $0xffffffffae147ae1,%rdx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
sar    $0x25,%rcx
add    %esi,%ecx
add    %eax,%ecx
lea    0x2(%rdi),%eax
test   %edx,%edx
cmovns %edx,%eax
sar    $0x2,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @days_from_0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = mul nsw i32 365, %5
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 400
%9 = add nsw i32 %6, %8
%10 = load i32, i32* %2
%11 = sdiv i32 %10, 100
%12 = sub nsw i32 %9, %11
%13 = load i32, i32* %2
%14 = sdiv i32 %13, 4
%15 = add nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @days_from_0(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = mul nsw i32 %2, 365
%4 = sdiv i32 %2, 400
%5 = add nsw i32 %3, %4
%6 = sdiv i32 %2, -100
%7 = add i32 %5, %6
%8 = sdiv i32 %2, 4
%9 = add nsw i32 %7, %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, char *);
double divide(double d1, double d2) {
  if (d2 == 0.0) {
    printf("%lf%s", d2, "不能为0");
    return 0;
  }
  return d1 / d2;
}


x86 assembly (clang, -O0):
<divide>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    115f <divide+0x4f>
jp     115f <divide+0x4f>
movsd  -0x18(%rbp),%xmm0
lea    0xeba(%rip),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <printf@plt>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    116e <divide+0x5e>
movsd  -0x10(%rbp),%xmm0
divsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide>:
xorpd  %xmm2,%xmm2
ucomisd %xmm2,%xmm1
jne    113d <divide+0x2d>
jp     113d <divide+0x2d>
push   %rax
lea    0xedc(%rip),%rdi
lea    0xedb(%rip),%rsi
movapd %xmm1,%xmm0
call   1030 <printf@plt>
xorpd  %xmm0,%xmm0
add    $0x8,%rsp
ret
divsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%lf%s\00"
@.str.1 = [11 x i8] c"\E4\B8\8D\E8\83\BD\E4\B8\BA0\00"
define double @divide(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %4
store double %1, double* %5
%6 = load double, double* %5
%7 = fcmp oeq double %6, 0.000000e+00
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load double, double* %5
%10 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %9, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
store double 0.000000e+00, double* %3
br label %15
11: ; preds = %2
%12 = load double, double* %4
%13 = load double, double* %5
%14 = fdiv double %12, %13
store double %14, double* %3
br label %15
15: ; preds = %11, %8
%16 = load double, double* %3
ret double %16
}

LLVM IR (-O2):
@.str = [6 x i8] c"%lf%s\00"
@.str.1 = [11 x i8] c"\E4\B8\8D\E8\83\BD\E4\B8\BA0\00"
define double @divide(double %0, double %1) {
%3 = fcmp oeq double %1, 0.000000e+00
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
br label %8
6: ; preds = %2
%7 = fdiv double %0, %1
br label %8
8: ; preds = %6, %4
%9 = phi double [ 0.000000e+00, %4 ], [ %7, %6 ]
ret double %9
}
int main() {
  assert(({
           __typeof(6) a = (6);
           __typeof(5) b = (5);
           a < b ? a : b;
         }) == 5);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x6,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1144 <main+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114a <main+0x3a>
mov    -0xc(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
mov    $0x0,%al
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 6, i32* %2
store i32 5, i32* %3
%5 = load i32, i32* %2
%6 = load i32, i32* %3
%7 = icmp slt i32 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = load i32, i32* %2
br label %12
10: ; preds = %0
%11 = load i32, i32* %3
br label %12
12: ; preds = %10, %8
%13 = phi i32 [ %9, %8 ], [ %11, %10 ]
store i32 %13, i32* %4
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 5
%16 = zext i1 %15 to i32
%17 = call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 %16)
%18 = load i32, i32* %1
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32, ...) bitcast (i32 (...)* @assert to i32 (i32, ...)*)(i32 1)
ret i32 0
}
FNIEMOP_DEF(iemOp_Grp7_vmresume) {
  AssertFailed();
  return IEMOP_RAISE_INVALID_OPCODE();
}


x86 assembly (clang, -O0):
<FNIEMOP_DEF>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <AssertFailed@plt>
mov    $0x0,%al
call   1030 <IEMOP_RAISE_INVALID_OPCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @AssertFailed()
%4 = call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %4
}

LLVM IR (-O2):
define i32 @FNIEMOP_DEF(i32 %0) {
%2 = tail call i32 (...) @AssertFailed()
%3 = tail call i32 (...) @IEMOP_RAISE_INVALID_OPCODE()
ret i32 %3
}
int ls_cost_nm2_work(int *sz_arg, int *sz_res, int *sz_iw, int *sz_w) {
  if (sz_arg)
    *sz_arg = 2;
  if (sz_res)
    *sz_res = 2;
  if (sz_iw)
    *sz_iw = 0;
  if (sz_w)
    *sz_w = 1;
  return 0;
}


x86 assembly (clang, -O0):
<ls_cost_nm2_work>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1129 <ls_cost_nm2_work+0x29>
mov    -0x8(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x10(%rbp)
je     113e <ls_cost_nm2_work+0x3e>
mov    -0x10(%rbp),%rax
movl   $0x2,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     1153 <ls_cost_nm2_work+0x53>
mov    -0x18(%rbp),%rax
movl   $0x0,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     1168 <ls_cost_nm2_work+0x68>
mov    -0x20(%rbp),%rax
movl   $0x1,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_cost_nm2_work>:
test   %rdi,%rdi
je     110b <ls_cost_nm2_work+0xb>
movl   $0x2,(%rdi)
test   %rsi,%rsi
je     1116 <ls_cost_nm2_work+0x16>
movl   $0x2,(%rsi)
test   %rdx,%rdx
je     1121 <ls_cost_nm2_work+0x21>
movl   $0x0,(%rdx)
test   %rcx,%rcx
je     112c <ls_cost_nm2_work+0x2c>
movl   $0x1,(%rcx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ls_cost_nm2_work(i32* writeonly %0, i32* writeonly %1, i32* writeonly %2, i32* writeonly %3) {
%5 = icmp eq i32* %0, null
br i1 %5, label %7, label %6
6: ; preds = %4
store i32 2, i32* %0
br label %7
7: ; preds = %6, %4
%8 = icmp eq i32* %1, null
br i1 %8, label %10, label %9
9: ; preds = %7
store i32 2, i32* %1
br label %10
10: ; preds = %9, %7
%11 = icmp eq i32* %2, null
br i1 %11, label %13, label %12
12: ; preds = %10
store i32 0, i32* %2
br label %13
13: ; preds = %12, %10
%14 = icmp eq i32* %3, null
br i1 %14, label %16, label %15
15: ; preds = %13
store i32 1, i32* %3
br label %16
16: ; preds = %15, %13
ret i32 0
}
data(nd, pc, buf) register char *buf;
{
  newline(nd, pc, 0);
  do
    byte(*buf++);
  while (--nd);
  endline();
}


x86 assembly (clang, -O0):
<data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
mov    $0x0,%al
call   1030 <newline@plt>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%edi
mov    $0x0,%al
call   1040 <byte@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jne    1151 <data+0x21>
mov    $0x0,%al
call   1050 <endline@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<data>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %edi,%ebp
xor    %edx,%edx
xor    %eax,%eax
call   1030 <newline@plt>
mov    %ebp,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%edi
xor    %eax,%eax
call   1040 <byte@plt>
add    $0x1,%rbx
cmp    %ebx,%ebp
jne    1150 <data+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <endline@plt>

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

LLVM IR (-O2):
define i32 @data(i32 %0, i32 %1, i8* nocapture %2) {
%4 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @newline to i32 (i32, i32, i32, ...)*)(i32 %0, i32 %1, i32 0)
br label %5
5: ; preds = %5, %3
%6 = phi i32 [ %0, %3 ], [ %12, %5 ]
%7 = phi i8* [ %2, %3 ], [ %8, %5 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %7
%10 = sext i8 %9 to i32
%11 = tail call i32 (i32, ...) bitcast (i32 (...)* @byte to i32 (i32, ...)*)(i32 %10)
%12 = add nsw i32 %6, -1
%13 = icmp eq i32 %12, 0
br i1 %13, label %14, label %5
14: ; preds = %5
%15 = tail call i32 (...) @endline()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ error(int, int /*<<< orphan*/, char *, char const *);
int open(char const *, int /*<<< orphan*/);
int randopen(const char *name) {
  int fd = open(name, O_RDONLY);
  if (fd < 0)
    error(1, errno, "Cannot open system random number dev %s", name);
  return fd;
}


x86 assembly (clang, -O0):
<randopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1169 <randopen+0x49>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edi
lea    0xe9c(%rip),%rdx
call   1030 <error@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randopen>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ebb(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,%ebp
test   %eax,%eax
jns    1157 <randopen+0x37>
mov    0x2e97(%rip),%rax
mov    (%rax),%esi
lea    0xeb6(%rip),%rdx
mov    $0x1,%edi
mov    %rbx,%rcx
call   1030 <error@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
@errno = global i32 0
@.str = [40 x i8] c"Cannot open system random number dev %s\00"
define i32 @randopen(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = load i32, i32* @O_RDONLY
%6 = call i32 @open(i8* %4, i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %1
%10 = load i32, i32* @errno
%11 = load i8*, i8** %2
%12 = call i32 @error(i32 1, i32 %10, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %9, %1
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@errno = global i32 0
@.str = [40 x i8] c"Cannot open system random number dev %s\00"
define i32 @randopen(i8* %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* @errno
%7 = tail call i32 @error(i32 1, i32 %6, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %5, %1
ret i32 %3
}
/* Variables and functions */
int ZopfliLengthLimitedCodeLengths(size_t const *, size_t, int, unsigned int *);
int /*<<< orphan*/ assert(int);
void ZopfliCalculateBitLengths(const size_t *count, size_t n, int maxbits,
                               unsigned *bitlengths) {
  int error = ZopfliLengthLimitedCodeLengths(count, n, maxbits, bitlengths);
  (void)error;
  assert(!error);
}


x86 assembly (clang, -O0):
<ZopfliCalculateBitLengths>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
call   1030 <ZopfliLengthLimitedCodeLengths@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x24(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZopfliCalculateBitLengths>:
push   %rax
call   1030 <ZopfliLengthLimitedCodeLengths@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
define void @ZopfliCalculateBitLengths(i64* %0, i64 %1, i32 %2, i32* %3) {
%5 = alloca i64*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32
store i64* %0, i64** %5
store i64 %1, i64* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%10 = load i64*, i64** %5
%11 = load i64, i64* %6
%12 = load i32, i32* %7
%13 = load i32*, i32** %8
%14 = call i32 @ZopfliLengthLimitedCodeLengths(i64* %10, i64 %11, i32 %12, i32* %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
%16 = load i32, i32* %9
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
%20 = call i32 @assert(i32 %19)
ret void
}

LLVM IR (-O2):
define void @ZopfliCalculateBitLengths(i64* %0, i64 %1, i32 %2, i32* %3) {
%5 = tail call i32 @ZopfliLengthLimitedCodeLengths(i64* %0, i64 %1, i32 %2, i32* %3)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
ret void
}
int fun125() { return 125; }


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

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

LLVM IR (-O0):
define i32 @fun125() {
ret i32 125
}

LLVM IR (-O2):
define i32 @fun125() {
ret i32 125
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int kill2(int /*<<< orphan*/, int);
int killpg2(pid_t pgrp, int sig) { return kill2(-pgrp, sig); }


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

x86 assembly (clang, -O2):
<killpg2>:
neg    %edi
jmp    1030 <kill2@plt>

LLVM IR (-O0):
define i32 @killpg2(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 = sub nsw i32 0, %5
%7 = load i32, i32* %4
%8 = call i32 @kill2(i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @killpg2(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %0
%4 = tail call i32 @kill2(i32 %3, i32 %1)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
int access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char *nssrs_str_join(char, char *, char *);
int unlink(char *);
int mock_resolver_clean(char *tmpdir, char *domain) {
  char *file = nssrs_str_join('/', tmpdir, domain);
  int result = 0;
  if (access(file, F_OK) != -1) {
    result = unlink(file);
  }
  free(file);
  return result;
}


x86 assembly (clang, -O0):
<mock_resolver_clean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x2f,%edi
call   1060 <nssrs_str_join@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e60(%rip),%rax
mov    (%rax),%esi
call   1050 <access@plt>
cmp    $0xffffffff,%eax
je     1194 <mock_resolver_clean+0x54>
mov    -0x18(%rbp),%rdi
call   1040 <unlink@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mock_resolver_clean>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x2f,%edi
call   1060 <nssrs_str_join@plt>
mov    %rax,%rbx
mov    0x2e7b(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <access@plt>
cmp    $0xffffffff,%eax
je     1178 <mock_resolver_clean+0x38>
mov    %rbx,%rdi
call   1040 <unlink@plt>
mov    %eax,%ebp
jmp    117a <mock_resolver_clean+0x3a>
xor    %ebp,%ebp
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @mock_resolver_clean(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %4
%9 = call i8* @nssrs_str_join(i8 signext 47, i8* %7, i8* %8)
store i8* %9, i8** %5
store i32 0, i32* %6
%10 = load i8*, i8** %5
%11 = load i32, i32* @F_OK
%12 = call i32 @access(i8* %10, i32 %11)
%13 = icmp ne i32 %12, -1
br i1 %13, label %14, label %17
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = call i32 @unlink(i8* %15)
store i32 %16, i32* %6
br label %17
17: ; preds = %14, %2
%18 = load i8*, i8** %5
%19 = call i32 @free(i8* %18)
%20 = load i32, i32* %6
ret i32 %20
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @mock_resolver_clean(i8* %0, i8* %1) {
%3 = tail call i8* @nssrs_str_join(i8 signext 47, i8* %0, i8* %1)
%4 = load i32, i32* @F_OK
%5 = tail call i32 @access(i8* %3, i32 %4)
%6 = icmp eq i32 %5, -1
br i1 %6, label %9, label %7
7: ; preds = %2
%8 = tail call i32 @unlink(i8* %3)
br label %9
9: ; preds = %7, %2
%10 = phi i32 [ %8, %7 ], [ 0, %2 ]
%11 = tail call i32 @free(i8* %3)
ret i32 %10
}
int foo(int i) { return (i * 8) & 5; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x3,%eax
and    $0x5,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 8
%5 = and i32 %4, 5
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int count0(int /*<<< orphan*/ const);
void countDigits0(size_t length, const uint32_t *dataArray, int *countArray) {
  while (length) {
    *countArray = count0(*dataArray);
    countArray++;
    dataArray++;
    length--;
  }
}


x86 assembly (clang, -O0):
<countDigits0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     116b <countDigits0+0x5b>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <count0@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
jmp    1124 <countDigits0+0x14>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<countDigits0>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %rdi,%rdi
je     1146 <countDigits0+0x36>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%r12
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%edi
call   1030 <count0@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <countDigits0+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @countDigits0(i64 %0, i32* nocapture %1, i32* nocapture writeonly %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %15, label %5
5: ; preds = %3, %5
%6 = phi i32* [ %11, %5 ], [ %2, %3 ]
%7 = phi i32* [ %12, %5 ], [ %1, %3 ]
%8 = phi i64 [ %13, %5 ], [ %0, %3 ]
%9 = load i32, i32* %7
%10 = tail call i32 @count0(i32 %9)
store i32 %10, i32* %6
%11 = getelementptr inbounds i32, i32* %6, i64 1
%12 = getelementptr inbounds i32, i32* %7, i64 1
%13 = add i64 %8, -1
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %3
ret void
}
void audio_resume() {}


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

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

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

LLVM IR (-O2):
define void @audio_resume() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_malloc(int);
int main(void) {
  test_malloc(5);
  test_malloc(1000);
  test_malloc(2 * 1024 * 1024ULL);
  test_malloc(1024 * 1024 * 1024ULL);
  printf("malloctest done.\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <test_malloc@plt>
mov    $0x3e8,%edi
call   1030 <test_malloc@plt>
mov    $0x200000,%edi
call   1030 <test_malloc@plt>
mov    $0x40000000,%edi
call   1030 <test_malloc@plt>
lea    0xeb0(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [17 x i8] c"malloctest done.\00"
define i32 @main() {
%1 = tail call i32 @test_malloc(i32 5)
%2 = tail call i32 @test_malloc(i32 1000)
%3 = tail call i32 @test_malloc(i32 2097152)
%4 = tail call i32 @test_malloc(i32 1073741824)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
char *needMem(int);
char *cloneStringZ(char *s, int size) {
  char *d = needMem(size + 1);
  memcpy(d, s, size);
  d[size] = 0;
  return d;
}


x86 assembly (clang, -O0):
<cloneStringZ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <needMem@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cloneStringZ>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    0x1(%r15),%edi
call   1040 <needMem@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <memcpy@plt>
movslq %r15d,%rax
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @cloneStringZ(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
%8 = call i8* @needMem(i32 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i32 @memcpy(i8* %9, i8* %10, i32 %11)
%13 = load i8*, i8** %5
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
store i8 0, i8* %16
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
define i8* @cloneStringZ(i8* %0, i32 %1) {
%3 = add nsw i32 %1, 1
%4 = tail call i8* @needMem(i32 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i32 %1)
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %4, i64 %6
store i8 0, i8* %7
ret i8* %4
}
void handle_XCPU(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_XCPU(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int num;
  scanf("%d", &num);
  int i;
  for (i = 1; i <= num; i += 2) {
    printf("%d\n", i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movl   $0x1,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     116f <main+0x4f>
mov    -0xc(%rbp),%esi
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0xc(%rbp)
jmp    1146 <main+0x26>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xed5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
cmpl   $0x0,0x4(%rsp)
jle    1163 <main+0x43>
mov    $0x1,%ebx
lea    0xebb(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x2,%ebx
cmp    0x4(%rsp),%ebx
jle    1150 <main+0x30>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp slt i32 %4, 1
br i1 %5, label %12, label %6
6: ; preds = %0, %6
%7 = phi i32 [ %9, %6 ], [ 1, %0 ]
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = add nuw nsw i32 %7, 2
%10 = load i32, i32* %1
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %0
ret i32 0
}
long cachelineboundaryi(long addr) {
  if (addr & 63) {
    return addr + (16 - (addr & 15));
  } else
    return addr;
}


x86 assembly (clang, -O0):
<cachelineboundaryi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x3f,%rax
cmp    $0x0,%rax
je     113a <cachelineboundaryi+0x3a>
mov    -0x10(%rbp),%rax
mov    -0x10(%rbp),%rdx
and    $0xf,%rdx
mov    $0x10,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
jmp    1142 <cachelineboundaryi+0x42>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cachelineboundaryi>:
mov    %edi,%ecx
and    $0x3f,%ecx
mov    %edi,%edx
and    $0xf,%edx
mov    $0x10,%eax
sub    %rdx,%rax
test   %rcx,%rcx
cmove  %rcx,%rax
add    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @cachelineboundaryi(i64 %0) {
%2 = and i64 %0, 63
%3 = icmp eq i64 %2, 0
%4 = and i64 %0, 15
%5 = sub nuw nsw i64 16, %4
%6 = select i1 %3, i64 0, i64 %5
%7 = add nsw i64 %6, %0
ret i64 %7
}
/* Variables and functions */
int /*<<< orphan*/ UI_DEV_DESTROY;
int close(int);
scalar_t__ ioctl(int, int /*<<< orphan*/);
int destroy_uinput_device(int uinput_fd) {
  if (ioctl(uinput_fd, UI_DEV_DESTROY) < 0)
    return -1;
  return close(uinput_fd);
}


x86 assembly (clang, -O0):
<destroy_uinput_device>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    1152 <destroy_uinput_device+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <destroy_uinput_device+0x3d>
mov    -0x8(%rbp),%edi
call   1040 <close@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_uinput_device>:
push   %rbx
mov    %edi,%ebx
mov    0x2ebe(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
test   %rax,%rax
js     113e <destroy_uinput_device+0x1e>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <close@plt>
mov    $0xffffffff,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@UI_DEV_DESTROY = global i32 0
define i32 @destroy_uinput_device(i32 %0) {
%2 = load i32, i32* @UI_DEV_DESTROY
%3 = tail call i64 @ioctl(i32 %0, i32 %2)
%4 = icmp slt i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 @close(i32 %0)
br label %7
7: ; preds = %1, %5
%8 = phi i32 [ %6, %5 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int strcmp(char *const, char *const);
int sl_strcmp(const void *p1, const void *p2) {
  return strcmp(*(char *const *)p1, *(char *const *)p2);
}


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

x86 assembly (clang, -O2):
<sl_strcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @sl_strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i8**
%7 = load i8*, i8** %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = call i32 @strcmp(i8* %7, i8* %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @sl_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
__attribute__((always_)) void sk_membar_acquire__after_atomic_dec() {}


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

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

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

LLVM IR (-O2):
define void @sk_membar_acquire__after_atomic_dec() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void usage(char *name) {
  printf("%s <loop> <round> <case>\n"
         "   <loop>  : The number of iterations in the combine routine.\n"
         "   <round> : The round of the combine routine is evaluated.\n"
         "   <case>  : select which combine routine to be evaluated.\n"
         "             1 - comibne1\n"
         "             2 - comibne2\n"
         "             3 - comibne3\n"
         "             4 - comibne4\n"
         "             5 - comibne5\n"
         "             6 - comibne6\n"
         "             7 - comibne7\n",
         name);
}


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

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [389 x i8] c"%s <loop> <round> <case>\0A <loop> : The number of iterations in the combine routine.\0A <round> : The round of the combine routine is evaluated.\0A <case> : select which combine routine to be evaluated.\0A 1 - comibne1\0A 2 - comibne2\0A 3 - comibne3\0A 4 - comibne4\0A 5 - comibne5\0A 6 - comibne6\0A 7 - comibne7\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([389 x i8], [389 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [389 x i8] c"%s <loop> <round> <case>\0A <loop> : The number of iterations in the combine routine.\0A <round> : The round of the combine routine is evaluated.\0A <case> : select which combine routine to be evaluated.\0A 1 - comibne1\0A 2 - comibne2\0A 3 - comibne3\0A 4 - comibne4\0A 5 - comibne5\0A 6 - comibne6\0A 7 - comibne7\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([389 x i8], [389 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
char *COM_SkipPath(char *);
int /*<<< orphan*/ Q_strncpyz(char *, char *, scalar_t__);
scalar_t__ strlen(char *);
void COM_StripFilename(char *in, char *out) {
  char *end;
  Q_strncpyz(out, in, strlen(in) + 1);
  end = COM_SkipPath(out);
  *end = 0;
}


x86 assembly (clang, -O0):
<COM_StripFilename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <Q_strncpyz@plt>
mov    -0x10(%rbp),%rdi
call   1040 <COM_SkipPath@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<COM_StripFilename>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <Q_strncpyz@plt>
mov    %r14,%rdi
call   1040 <COM_SkipPath@plt>
movb   $0x0,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @COM_StripFilename(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8*, i8** %3
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %9, 1
%11 = call i32 @Q_strncpyz(i8* %6, i8* %7, i64 %10)
%12 = load i8*, i8** %4
%13 = call i8* @COM_SkipPath(i8* %12)
store i8* %13, i8** %5
%14 = load i8*, i8** %5
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
define void @COM_StripFilename(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, 1
%5 = tail call i32 @Q_strncpyz(i8* %1, i8* %0, i64 %4)
%6 = tail call i8* @COM_SkipPath(i8* %1)
store i8 0, i8* %6
ret void
}
write_tiff_image(image_file_name, array) char image_file_name[];
short **array;
{}


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

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

LLVM IR (-O0):
define i32 @write_tiff_image(i8* %0, i16** %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i16**
store i8* %0, i8** %4
store i16** %1, i16*** %5
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @write_tiff_image(i8* nocapture readnone %0, i16** nocapture readnone %1) {
ret i32 undef
}
long long return_ll(long long ll) { return ll; }


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

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

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

LLVM IR (-O2):
define i64 @return_ll(i64 returned %0) {
ret i64 %0
}
/* Variables and functions */
int f209(int *);
int f210(int *p) { return f209(p); }


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

x86 assembly (clang, -O2):
<f210>:
jmp    1030 <f209@plt>

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

LLVM IR (-O2):
define i32 @f210(i32* %0) {
%2 = tail call i32 @f209(i32* %0)
ret i32 %2
}
void op_null() {}


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

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

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

LLVM IR (-O2):
define void @op_null() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dec();
int /*<<< orphan*/ hex();
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char InputSymbol[2];
  scanf("%[^\n]s", InputSymbol);
  if (InputSymbol[0] == 'd')
    dec();
  if (InputSymbol[0] == 'h')
    hex();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x6(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1040 <scanf@plt>
movsbl -0x6(%rbp),%eax
cmp    $0x64,%eax
jne    1163 <main+0x33>
mov    $0x0,%al
call   1030 <dec@plt>
movsbl -0x6(%rbp),%eax
cmp    $0x68,%eax
jne    1177 <main+0x47>
mov    $0x0,%al
call   1050 <hex@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x6(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x6(%rsp),%al
cmp    $0x64,%al
jne    1155 <main+0x25>
xor    %eax,%eax
call   1030 <dec@plt>
mov    0x6(%rsp),%al
cmp    $0x68,%al
jne    1160 <main+0x30>
xor    %eax,%eax
call   1050 <hex@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%[^\0A]s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 100
br i1 %8, label %9, label %11
9: ; preds = %0
%10 = call i32 (...) @dec()
br label %11
11: ; preds = %9, %0
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %2, i64 0, i64 0
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 104
br i1 %15, label %16, label %18
16: ; preds = %11
%17 = call i32 (...) @hex()
br label %18
18: ; preds = %16, %11
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%[^\0A]s\00"
define i32 @main() {
%1 = alloca [2 x i8]
%2 = getelementptr inbounds [2 x i8], [2 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = load i8, i8* %2
%5 = icmp eq i8 %4, 100
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 (...) @dec()
%8 = load i8, i8* %2
br label %9
9: ; preds = %6, %0
%10 = phi i8 [ %8, %6 ], [ %4, %0 ]
%11 = icmp eq i8 %10, 104
br i1 %11, label %12, label %14
12: ; preds = %9
%13 = call i32 (...) @hex()
br label %14
14: ; preds = %12, %9
ret i32 0
}
int f5(int v, int x[v]) { return 0; }


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f5(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 = zext i32 %5 to i64
ret i32 0
}

LLVM IR (-O2):
define i32 @f5(i32 %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__5__GeneralIO__makeInput();
void CC2420TransmitP__SFD__makeInput(void) {
  Msp430GpioC__5__GeneralIO__makeInput();
}


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

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

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

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