xunge/DecIR huggingface dataset:
/* Variables and functions */
int fc8080_scan_status(void *);
int bbm_com_scan_status(void *handle) {
  int res = 0;
  res = fc8080_scan_status(handle);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_scan_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fc8080_scan_status@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_scan_status>:
jmp    1030 <fc8080_scan_status@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_scan_status(i8* %0) {
%2 = tail call i32 @fc8080_scan_status(i8* %0)
ret i32 %2
}
void test8_HelloWorld_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test8_HelloWorld_targetInit__I() {
ret void
}
/* Variables and functions */
double get_distance_periodic_sqr(double, double, double, double, double, double,
                                 double);
double sqrt(double);
double get_distance_periodic(double x1, double y1, double z1, double x2,
                             double y2, double z2, double cell) {
  double dsqr;
  dsqr = get_distance_periodic_sqr(x1, y1, z1, x2, y2, z2, cell);
  return sqrt(dsqr);
}


x86 assembly (clang, -O0):
<get_distance_periodic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
movsd  %xmm5,-0x30(%rbp)
movsd  %xmm6,-0x38(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
movsd  -0x28(%rbp),%xmm4
movsd  -0x30(%rbp),%xmm5
movsd  -0x38(%rbp),%xmm6
call   1030 <get_distance_periodic_sqr@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
call   1040 <sqrt@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_distance_periodic>:
push   %rax
call   1030 <get_distance_periodic_sqr@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1136 <get_distance_periodic+0x16>
sqrtsd %xmm0,%xmm0
pop    %rax
ret
pop    %rax
jmp    1040 <sqrt@plt>

LLVM IR (-O0):
define double @get_distance_periodic(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %8
store double %1, double* %9
store double %2, double* %10
store double %3, double* %11
store double %4, double* %12
store double %5, double* %13
store double %6, double* %14
%16 = load double, double* %8
%17 = load double, double* %9
%18 = load double, double* %10
%19 = load double, double* %11
%20 = load double, double* %12
%21 = load double, double* %13
%22 = load double, double* %14
%23 = call double @get_distance_periodic_sqr(double %16, double %17, double %18, double %19, double %20, double %21, double %22)
store double %23, double* %15
%24 = load double, double* %15
%25 = call double @sqrt(double %24)
ret double %25
}

LLVM IR (-O2):
define double @get_distance_periodic(double %0, double %1, double %2, double %3, double %4, double %5, double %6) {
%8 = tail call double @get_distance_periodic_sqr(double %0, double %1, double %2, double %3, double %4, double %5, double %6)
%9 = tail call double @sqrt(double %8)
ret double %9
}
void intel_scu_devices_destroy(void) {}


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

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

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

LLVM IR (-O2):
define void @intel_scu_devices_destroy() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
void hack_putl(uint8_t *buf, uint32_t val) {
  buf[0] = (uint8_t)(((val) >> 24) & 0xff);
  buf[1] = (uint8_t)(((val) >> 16) & 0xff);
  buf[2] = (uint8_t)(((val) >> 8) & 0xff);
  buf[3] = (uint8_t)(val & 0xff);
}


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

x86 assembly (clang, -O2):
<hack_putl>:
mov    %esi,%eax
mov    %esi,%ecx
movzbl %ah,%edx
movzbl %al,%esi
shr    $0x18,%eax
mov    %rax,(%rdi)
shr    $0x10,%ecx
movzbl %cl,%eax
mov    %rax,0x8(%rdi)
mov    %rdx,0x10(%rdi)
mov    %rsi,0x18(%rdi)
ret

LLVM IR (-O0):
define void @hack_putl(i64* %0, i32 %1) {
%3 = alloca i64*
%4 = alloca i32
store i64* %0, i64** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = ashr i32 %5, 24
%7 = and i32 %6, 255
%8 = sext i32 %7 to i64
%9 = load i64*, i64** %3
%10 = getelementptr inbounds i64, i64* %9, i64 0
store i64 %8, i64* %10
%11 = load i32, i32* %4
%12 = ashr i32 %11, 16
%13 = and i32 %12, 255
%14 = sext i32 %13 to i64
%15 = load i64*, i64** %3
%16 = getelementptr inbounds i64, i64* %15, i64 1
store i64 %14, i64* %16
%17 = load i32, i32* %4
%18 = ashr i32 %17, 8
%19 = and i32 %18, 255
%20 = sext i32 %19 to i64
%21 = load i64*, i64** %3
%22 = getelementptr inbounds i64, i64* %21, i64 2
store i64 %20, i64* %22
%23 = load i32, i32* %4
%24 = and i32 %23, 255
%25 = sext i32 %24 to i64
%26 = load i64*, i64** %3
%27 = getelementptr inbounds i64, i64* %26, i64 3
store i64 %25, i64* %27
ret void
}

LLVM IR (-O2):
define void @hack_putl(i64* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 24
%4 = zext i32 %3 to i64
store i64 %4, i64* %0
%5 = lshr i32 %1, 16
%6 = and i32 %5, 255
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %0, i64 1
store i64 %7, i64* %8
%9 = lshr i32 %1, 8
%10 = and i32 %9, 255
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds i64, i64* %0, i64 2
store i64 %11, i64* %12
%13 = and i32 %1, 255
%14 = zext i32 %13 to i64
%15 = getelementptr inbounds i64, i64* %0, i64 3
store i64 %14, i64* %15
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t convert(const char *text) {
  uint64_t number = 0;
  for (; *text; text++) {
    char digit = *text - '0';
    number = (number * 10) + digit;
  }
  return number;
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <convert+0x47>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
mov    %al,-0xd(%rbp)
imul   $0xa,-0xc(%rbp),%eax
movsbl -0xd(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <convert+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
mov    (%rdi),%cl
test   %cl,%cl
je     1128 <convert+0x28>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
add    $0xd0,%cl
lea    (%rax,%rax,4),%eax
movsbl %cl,%ecx
lea    (%rcx,%rax,2),%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <convert+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @convert(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i8* [ %12, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 0, %1 ]
%8 = add i8 %5, -48
%9 = mul nsw i32 %7, 10
%10 = sext i8 %8 to i32
%11 = add nsw i32 %9, %10
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int has_il();
int wrap_has_il(void) { return has_il(); }


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

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

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

LLVM IR (-O2):
define i32 @wrap_has_il() {
%1 = tail call i32 (...) @has_il()
ret i32 %1
}
/* Variables and functions */
char *_(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr,
          _("Usage:  %s <operation> [...]\n"
            "operations\n"
            "    {-h --help}\n"
            "    {-V --version}\n"
            "    {-S --set-vcp} device code value\n"
            "    <command> [<args>]\n"),
          name);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
lea    0xeca(%rip),%rdi
call   1040 <_@plt>
mov    %ebp,%edi
mov    %rax,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [136 x i8] c"Usage: %s <operation> [...]\0Aoperations\0A {-h --help}\0A {-V --version}\0A {-S --set-vcp} device code value\0A <command> [<args>]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i8* @_(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0))
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* %4, i8* %5)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [136 x i8] c"Usage: %s <operation> [...]\0Aoperations\0A {-h --help}\0A {-V --version}\0A {-S --set-vcp} device code value\0A <command> [<args>]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* @_(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fprintf(i32 %2, i8* %3, i8* %0)
ret void
}
/* Variables and functions */
int tan(double);
void unrefractGE15(double pr, double tr, double aa, double *ta) {
  double r;
  r = 7.888888e-5 * pr / ((273 + tr) * tan(aa));
  *ta = aa - r;
}


x86 assembly (clang, -O0):
<unrefractGE15>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
mov    %rdi,-0x20(%rbp)
movsd  0xed5(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xebb(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <tan@plt>
movsd  -0x38(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsi2sd %eax,%xmm2
mulsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unrefractGE15>:
push   %rbx
sub    $0x20,%rsp
mov    %rdi,%rbx
movsd  %xmm2,0x10(%rsp)
mulsd  0xeda(%rip),%xmm0
movsd  %xmm0,0x18(%rsp)
addsd  0xed4(%rip),%xmm1
movsd  %xmm1,0x8(%rsp)
movaps %xmm2,%xmm0
call   1030 <tan@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
divsd  %xmm0,%xmm1
addsd  0x10(%rsp),%xmm1
movsd  %xmm1,(%rbx)
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @unrefractGE15(double %0, double %1, double %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double*
%9 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double* %3, double** %8
%10 = load double, double* %5
%11 = fmul double 0x3F14AE24A372EB40, %10
%12 = load double, double* %6
%13 = fadd double 2.730000e+02, %12
%14 = load double, double* %7
%15 = call i32 @tan(double %14)
%16 = sitofp i32 %15 to double
%17 = fmul double %13, %16
%18 = fdiv double %11, %17
store double %18, double* %9
%19 = load double, double* %7
%20 = load double, double* %9
%21 = fsub double %19, %20
%22 = load double*, double** %8
store double %21, double* %22
ret void
}

LLVM IR (-O2):
define void @unrefractGE15(double %0, double %1, double %2, double* nocapture writeonly %3) {
%5 = fmul double %0, 0x3F14AE24A372EB40
%6 = fadd double %1, 2.730000e+02
%7 = tail call i32 @tan(double %2)
%8 = sitofp i32 %7 to double
%9 = fmul double %6, %8
%10 = fdiv double %5, %9
%11 = fsub double %2, %10
store double %11, double* %3
ret void
}
/* Type definitions */
struct gmi_set {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct gmi_set *);
void gmi_free_set(struct gmi_set *s) { free(s); }


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

x86 assembly (clang, -O2):
<gmi_free_set>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.gmi_set = type { i32 }
define void @gmi_free_set(%struct.gmi_set* %0) {
%2 = alloca %struct.gmi_set*
store %struct.gmi_set* %0, %struct.gmi_set** %2
%3 = load %struct.gmi_set*, %struct.gmi_set** %2
%4 = call i32 @free(%struct.gmi_set* %3)
ret void
}

LLVM IR (-O2):
%struct.gmi_set = type { i32 }
define void @gmi_free_set(%struct.gmi_set* nocapture %0) {
%2 = tail call i32 @free(%struct.gmi_set* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cdflib_cumchi(double *, double *, double *, double *);
void cdflib_cumpoi(const double *s, const double *xlam, double *cum,
                   double *ccum) {
  double chi, df;
  df = 2.0e0 * (*s + 1.0e0);
  chi = 2.0e0 * *xlam;
  cdflib_cumchi(&chi, &df, ccum, cum);
  return;
}


x86 assembly (clang, -O0):
<cdflib_cumpoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xed4(%rip),%xmm1
addsd  (%rax),%xmm1
movsd  0xec0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movsd  0xeab(%rip),%xmm0
mulsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x28(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <cdflib_cumchi@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cdflib_cumpoi>:
sub    $0x18,%rsp
mov    %rdx,%rax
movsd  (%rdi),%xmm0
addsd  0xedd(%rip),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  (%rsi),%xmm0
addsd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rcx,%rdx
mov    %rax,%rcx
call   1030 <cdflib_cumchi@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @cdflib_cumpoi(double* %0, double* %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca double*
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
store double* %0, double** %5
store double* %1, double** %6
store double* %2, double** %7
store double* %3, double** %8
%11 = load double*, double** %5
%12 = load double, double* %11
%13 = fadd double %12, 1.000000e+00
%14 = fmul double 2.000000e+00, %13
store double %14, double* %10
%15 = load double*, double** %6
%16 = load double, double* %15
%17 = fmul double 2.000000e+00, %16
store double %17, double* %9
%18 = load double*, double** %8
%19 = load double*, double** %7
%20 = call i32 @cdflib_cumchi(double* %9, double* %10, double* %18, double* %19)
ret void
}

LLVM IR (-O2):
define void @cdflib_cumpoi(double* nocapture %0, double* nocapture %1, double* %2, double* %3) {
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %5 to i8*
%8 = bitcast double* %6 to i8*
%9 = load double, double* %0
%10 = fadd double %9, 1.000000e+00
%11 = fmul double %10, 2.000000e+00
store double %11, double* %6
%12 = load double, double* %1
%13 = fmul double %12, 2.000000e+00
store double %13, double* %5
%14 = call i32 @cdflib_cumchi(double* %5, double* %6, double* %3, double* %2)
ret void
}
void tests_config_parameters_setup(void) {}


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

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

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

LLVM IR (-O2):
define void @tests_config_parameters_setup() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void lb_free(void *ptr) {
  if (ptr)
    free(ptr);
}


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

x86 assembly (clang, -O2):
<lb_free>:
test   %rdi,%rdi
je     111a <lb_free+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @lb_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
char otoa(int operator) {
  switch (operator) {
  case 4:
    return ('+');
  case 5:
    return ('-');
  case 6:
    return ('*');
  case 7:
    return ('/');
  case 8:
    return ('^');
  case 9:
    return ('E');
  default:
    return ('#');
  }
}


x86 assembly (clang, -O0):
<otoa>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xfffffffc,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x5,%eax
ja     1166 <otoa+0x66>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x2b,-0x1(%rbp)
jmp    116a <otoa+0x6a>
movb   $0x2d,-0x1(%rbp)
jmp    116a <otoa+0x6a>
movb   $0x2a,-0x1(%rbp)
jmp    116a <otoa+0x6a>
movb   $0x2f,-0x1(%rbp)
jmp    116a <otoa+0x6a>
movb   $0x5e,-0x1(%rbp)
jmp    116a <otoa+0x6a>
movb   $0x45,-0x1(%rbp)
jmp    116a <otoa+0x6a>
movb   $0x23,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<otoa>:
lea    -0x20(,%rdi,8),%ecx
mov    %edi,%eax
add    $0xfffffffc,%eax
movabs $0x455e2f2a2d2b,%rdx
shr    %cl,%rdx
cmp    $0x6,%eax
mov    $0x23,%eax
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @otoa(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 4, label %5
i32 5, label %6
i32 6, label %7
i32 7, label %8
i32 8, label %9
i32 9, label %10
]
5: ; preds = %1
store i8 43, i8* %2
br label %12
6: ; preds = %1
store i8 45, i8* %2
br label %12
7: ; preds = %1
store i8 42, i8* %2
br label %12
8: ; preds = %1
store i8 47, i8* %2
br label %12
9: ; preds = %1
store i8 94, i8* %2
br label %12
10: ; preds = %1
store i8 69, i8* %2
br label %12
11: ; preds = %1
store i8 35, i8* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i8, i8* %2
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @otoa(i32 %0) {
%2 = add i32 %0, -4
%3 = icmp ult i32 %2, 6
%4 = zext i32 %2 to i48
%5 = shl nuw nsw i48 %4, 3
%6 = lshr i48 76270820535595, %5
%7 = trunc i48 %6 to i8
%8 = select i1 %3, i8 %7, i8 35
ret i8 %8
}
int timeout_version(void) { return 0x20160226; }


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

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

LLVM IR (-O0):
define i32 @timeout_version() {
ret i32 538313254
}

LLVM IR (-O2):
define i32 @timeout_version() {
ret i32 538313254
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ posix_acl_delete(int /*<<< orphan*/, int /*<<< orphan*/);
void posix_acl_remove(uint32_t inode, uint8_t acltype) {
  posix_acl_delete(inode, acltype);
}


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

x86 assembly (clang, -O2):
<posix_acl_remove>:
jmp    1030 <posix_acl_delete@plt>

LLVM IR (-O0):
define void @posix_acl_remove(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 @posix_acl_delete(i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @posix_acl_remove(i32 %0, i32 %1) {
%3 = tail call i32 @posix_acl_delete(i32 %0, i32 %1)
ret void
}
void strcpy_my(char *dest, char *source) {
  int i = 0;
  while (*(source + i) != '\0') {
    *(dest + i) = *(source + i);
    i++;
  }
}


x86 assembly (clang, -O0):
<strcpy_my>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114c <strcpy_my+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcpy_my+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy_my>:
mov    (%rsi),%al
test   %al,%al
je     1120 <strcpy_my+0x20>
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
mov    %al,(%rdi,%rcx,1)
movzbl 0x1(%rsi,%rcx,1),%eax
add    $0x1,%rcx
test   %al,%al
jne    1110 <strcpy_my+0x10>
ret

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

LLVM IR (-O2):
define void @strcpy_my(i8* nocapture writeonly %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2, %5
%6 = phi i64 [ %9, %5 ], [ 0, %2 ]
%7 = phi i8 [ %11, %5 ], [ %3, %2 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 %7, i8* %8
%9 = add nuw nsw i64 %6, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %9
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %5
13: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
uint16_t lget2(const void *p) {
  const uint8_t *u = p;
  assert(p != NULL);
  return ((uint32_t)u[0] | ((uint32_t)u[1] << 8));
}


x86 assembly (clang, -O0):
<lget2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lget2>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    0x8(%rbx),%eax
shl    $0x8,%eax
or     (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @lget2(i8* %0) {
%2 = alloca i8*
%3 = alloca i64*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i64*
store i64* %5, i64** %3
%6 = load i8*, i8** %2
%7 = icmp ne i8* %6, null
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = load i64*, i64** %3
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = load i64*, i64** %3
%15 = getelementptr inbounds i64, i64* %14, i64 1
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %13, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @lget2(i8* %0) {
%2 = bitcast i8* %0 to i64*
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = load i64, i64* %2
%7 = trunc i64 %6 to i32
%8 = getelementptr inbounds i8, i8* %0, i64 8
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 8
%13 = or i32 %12, %7
ret i32 %13
}
void *_Locale_time_create(const char *__DUMMY_PAR) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @_Locale_time_create(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help() {
  printf("dist: compute distances between strings\n");
  printf("  -h --hamming\t\tHamming Distance\n");
  printf("  -l --levenshtein\tLevenshtein Distance\n");
}


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

x86 assembly (clang, -O2):
<help>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rdi
call   1030 <puts@plt>
lea    0xf19(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"dist: compute distances between strings\0A\00"
@.str.1 = [34 x i8] c" -h --hamming\09\09Hamming Distance\0A\00"
@.str.2 = [41 x i8] c" -l --levenshtein\09Levenshtein Distance\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [40 x i8] c"dist: compute distances between strings\00"
@str.3 = [33 x i8] c" -h --hamming\09\09Hamming Distance\00"
@str.4 = [40 x i8] c" -l --levenshtein\09Levenshtein Distance\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @str.4, i64 0, i64 0))
ret void
}
void NEOMOTE_1_DELAY_COUNTER_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @NEOMOTE_1_DELAY_COUNTER_RestoreConfig() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int usage(const char *progname) {
  printf("Usage: %s <type> <args>, where type can be one of: \n"
         "\tinclude - include filter\n"
         "\texclude - exclude filter\n"
         "\tbegin - begin filter\n"
         "\tgrep - grep filter\n",
         progname);
  return 1;
}


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>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [147 x i8] c"Usage: %s <type> <args>, where type can be one of: \0A\09include - include filter\0A\09exclude - exclude filter\0A\09begin - begin filter\0A\09grep - grep filter\0A\00"
define i32 @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 1
}

LLVM IR (-O2):
@.str = [147 x i8] c"Usage: %s <type> <args>, where type can be one of: \0A\09include - include filter\0A\09exclude - exclude filter\0A\09begin - begin filter\0A\09grep - grep filter\0A\00"
define i32 @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([147 x i8], [147 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 1
}
float sqrt2(const float x) {
  union {
    int i;
    float x;
  } u;
  u.x = x;
  u.i = (1 << 29) + (u.i >> 1) - (1 << 22);
  return u.x;
}


x86 assembly (clang, -O0):
<sqrt2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
add    $0x20000000,%eax
sub    $0x400000,%eax
mov    %eax,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sqrt2>:
movd   %xmm0,%eax
sar    %eax
add    $0x1fc00000,%eax
movd   %eax,%xmm0
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define float @sqrt2(float %0) {
%2 = alloca float
%3 = alloca %union.anon
store float %0, float* %2
%4 = load float, float* %2
%5 = bitcast %union.anon* %3 to float*
store float %4, float* %5
%6 = bitcast %union.anon* %3 to i32*
%7 = load i32, i32* %6
%8 = ashr i32 %7, 1
%9 = add nsw i32 536870912, %8
%10 = sub nsw i32 %9, 4194304
%11 = bitcast %union.anon* %3 to i32*
store i32 %10, i32* %11
%12 = bitcast %union.anon* %3 to float*
%13 = load float, float* %12
ret float %13
}

LLVM IR (-O2):
define float @sqrt2(float %0) {
%2 = bitcast float %0 to i32
%3 = ashr i32 %2, 1
%4 = add nsw i32 %3, 532676608
%5 = bitcast i32 %4 to float
ret float %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_shm_punch() {
  printf("NOT IMPLEMENTED:"
         "pa_shm_punch"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [30 x i8] c"NOT IMPLEMENTED:pa_shm_punch\0A\00"
define i32 @pa_shm_punch() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [29 x i8] c"NOT IMPLEMENTED:pa_shm_punch\00"
define i32 @pa_shm_punch() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ assume(int);
int main() {
  int i;
  int n;
  i = 3;
  assume(n >= 0);
  assume(n <= 4);
  int origN;
  origN = n;
  while (n > 0) {
    i = i + 1;
    n = n - 1;
  }
  assert(i >= 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
cmpl   $0x4,-0xc(%rbp)
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assume@plt>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    117f <main+0x5f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    115e <main+0x3e>
cmpl   $0x3,-0x8(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <assume@plt>
mov    $0x1,%edi
call   1040 <assume@plt>
mov    $0x1,%edi
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 3, i32* %2
%5 = load i32, i32* %3
%6 = icmp sge i32 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @assume(i32 %7)
%9 = load i32, i32* %3
%10 = icmp sle i32 %9, 4
%11 = zext i1 %10 to i32
%12 = call i32 @assume(i32 %11)
%13 = load i32, i32* %3
store i32 %13, i32* %4
br label %14
14: ; preds = %17, %0
%15 = load i32, i32* %3
%16 = icmp sgt i32 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %14
%18 = load i32, i32* %2
%19 = add nsw i32 %18, 1
store i32 %19, i32* %2
%20 = load i32, i32* %3
%21 = sub nsw i32 %20, 1
store i32 %21, i32* %3
br label %14
22: ; preds = %14
%23 = load i32, i32* %2
%24 = icmp sge i32 %23, 3
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assume(i32 1)
%2 = tail call i32 @assume(i32 1)
%3 = tail call i32 @assert(i32 1)
ret i32 0
}
void ata_acpi_dissociate(struct ata_host *host) {}


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

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

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

LLVM IR (-O2):
%struct.ata_host = type opaque
define void @ata_acpi_dissociate(%struct.ata_host* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ is_contain_star_or_sharp(char const *);
scalar_t__ is_start_with_number(char const *);
int isCValidVar(const char *str) {
  int flag = 1;
  if (is_start_with_number(str) || is_contain_star_or_sharp(str)) {
    flag = 0;
  }
  return flag;
}


x86 assembly (clang, -O0):
<isCValidVar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <is_start_with_number@plt>
cmp    $0x0,%rax
jne    1159 <isCValidVar+0x39>
mov    -0x8(%rbp),%rdi
call   1040 <is_contain_star_or_sharp@plt>
cmp    $0x0,%rax
je     1160 <isCValidVar+0x40>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isCValidVar>:
push   %rbx
mov    %rdi,%rbx
call   1030 <is_start_with_number@plt>
test   %rax,%rax
jne    113b <isCValidVar+0x1b>
mov    %rbx,%rdi
call   1040 <is_contain_star_or_sharp@plt>
test   %rax,%rax
je     113f <isCValidVar+0x1f>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @isCValidVar(i8* %0) {
%2 = tail call i64 @is_start_with_number(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i64 @is_contain_star_or_sharp(i8* %0)
%6 = icmp eq i64 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %4, %1
br label %8
8: ; preds = %7, %4
%9 = phi i32 [ 0, %7 ], [ 1, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
char *getprogname();
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: %s catfile msgfile ...\n", getprogname());
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <getprogname@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rdx
lea    0xea8(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1030 <getprogname@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"usage: %s catfile msgfile ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i8* (...) @getprogname()
%3 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"usage: %s catfile msgfile ...\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i8* (...) @getprogname()
%3 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
double cdfkap_(double *, double *);
double ccdfkap(double *x, double *para) { return cdfkap_(x, para); }


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

x86 assembly (clang, -O2):
<ccdfkap>:
jmp    1030 <cdfkap_@plt>

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

LLVM IR (-O2):
define double @ccdfkap(double* %0, double* %1) {
%3 = tail call double @cdfkap_(double* %0, double* %1)
ret double %3
}
/* Variables and functions */
char *easy_malloc(size_t);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t strlen(char const *);
char *copy_string_to_heap(const char *string) {
  size_t size = strlen(string);
  char *string_temp = easy_malloc(size + 1);
  memcpy(string_temp, string, size);
  string_temp[size] = '\0';
  return string_temp;
}


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

x86 assembly (clang, -O2):
<copy_string_to_heap>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1040 <strlen@plt>
mov    %rax,%r15
lea    0x1(%rax),%rdi
call   1030 <easy_malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1050 <memcpy@plt>
movb   $0x0,(%rbx,%r15,1)
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @copy_string_to_heap(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @easy_malloc(i64 %3)
%5 = tail call i32 @memcpy(i8* %4, i8* %0, i64 %2)
%6 = getelementptr inbounds i8, i8* %4, i64 %2
store i8 0, i8* %6
ret i8* %4
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
scalar_t__ vfork();
void main() {
  pid_t pid_01;
  pid_01 = vfork();
  if (pid_01 > 0) {
    printf("father \n");
    exit(0);
  } else {
    printf("child \n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <vfork@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jle    1161 <main+0x31>
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <vfork@plt>
test   %rax,%rax
jle    1146 <main+0x16>
lea    0xec3(%rip),%rdi
jmp    114d <main+0x1d>
lea    0xeb3(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"father \0A\00"
@.str.1 = [8 x i8] c"child \0A\00"
define void @main() {
%1 = alloca i64
%2 = call i64 (...) @vfork()
store i64 %2, i64* %1
%3 = load i64, i64* %1
%4 = icmp sgt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %0
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @exit(i32 0)
unreachable
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [7 x i8] c"child \00"
@str.2 = [8 x i8] c"father \00"
define void @main() {
%1 = tail call i64 (...) @vfork()
%2 = icmp sgt i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ close_file();
int /*<<< orphan*/ reedit_ifile(void *);
void *save_curr_ifile();
void reopen_curr_ifile(void) {
  void *save_ifile = save_curr_ifile();
  close_file();
  reedit_ifile(save_ifile);
}


x86 assembly (clang, -O0):
<reopen_curr_ifile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <save_curr_ifile@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <close_file@plt>
mov    -0x8(%rbp),%rdi
call   1050 <reedit_ifile@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reopen_curr_ifile>:
push   %rbx
xor    %eax,%eax
call   1040 <save_curr_ifile@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <close_file@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <reedit_ifile@plt>

LLVM IR (-O0):
define void @reopen_curr_ifile() {
%1 = alloca i8*
%2 = call i8* (...) @save_curr_ifile()
store i8* %2, i8** %1
%3 = call i32 (...) @close_file()
%4 = load i8*, i8** %1
%5 = call i32 @reedit_ifile(i8* %4)
ret void
}

LLVM IR (-O2):
define void @reopen_curr_ifile() {
%1 = tail call i8* (...) @save_curr_ifile()
%2 = tail call i32 (...) @close_file()
%3 = tail call i32 @reedit_ifile(i8* %1)
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ deal_with_declarator();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ read_first_id();
int main(void) {
  read_first_id();
  deal_with_declarator();
  printf("\n");
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <read_first_id@plt>
mov    $0x0,%al
call   1050 <deal_with_declarator@plt>
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <read_first_id@plt>
xor    %eax,%eax
call   1050 <deal_with_declarator@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @read_first_id()
%2 = tail call i32 (...) @deal_with_declarator()
%3 = tail call i32 @putchar(i32 10)
%4 = load i32, i32* @EXIT_SUCCESS
ret i32 %4
}
unsigned int f4(unsigned int x, int y __attribute__((unused))) {
  return (x << ((-1) & (8 * 4 - 1))) | (x >> 1);
}


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1f,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %edi,%eax
ror    %eax
ret

LLVM IR (-O0):
define i32 @f4(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 = shl i32 %5, 31
%7 = load i32, i32* %3
%8 = lshr i32 %7, 1
%9 = or i32 %6, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 31)
ret i32 %3
}