xunge/DecIR huggingface dataset:
int Operand_ar0_decode(unsigned int *valp __attribute__((__unused__))) {
  return 0;
}


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

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

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

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

/* Variables and functions */
void VIMSLineBufEnable(uint32_t ui32Base) {
  (*((volatile unsigned long *)(ui32Base + 0x00000004))) &=
      ~(0x00000020 | 0x00000010);
}


x86 assembly (clang, -O0):
<VIMSLineBufEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%rcx
and    $0xffffffffffffffcf,%rcx
mov    %rcx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIMSLineBufEnable>:
andq   $0xffffffffffffffcf,0x4(%rdi)
ret

LLVM IR (-O0):
define void @VIMSLineBufEnable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 4
%5 = inttoptr i64 %4 to i64*
%6 = load volatile i64, i64* %5
%7 = and i64 %6, -49
store volatile i64 %7, i64* %5
ret void
}

LLVM IR (-O2):
define void @VIMSLineBufEnable(i64 %0) {
%2 = add nsw i64 %0, 4
%3 = inttoptr i64 %2 to i64*
%4 = load volatile i64, i64* %3
%5 = and i64 %4, -49
store volatile i64 %5, i64* %3
ret void
}
/* Variables and functions */
int uasm_rel_hi(long val) {
  return ((((val + 0x8000L) >> 16) & 0xffff) ^ 0x8000) - 0x8000;
}


x86 assembly (clang, -O0):
<uasm_rel_hi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8000,%rax
sar    $0x10,%rax
and    $0xffff,%rax
xor    $0x8000,%rax
sub    $0x8000,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uasm_rel_hi>:
shl    $0x20,%rdi
movabs $0x800000000000,%rax
add    %rdi,%rax
sar    $0x30,%rax
ret

LLVM IR (-O0):
define i32 @uasm_rel_hi(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = add nsw i64 %3, 32768
%5 = ashr i64 %4, 16
%6 = and i64 %5, 65535
%7 = xor i64 %6, 32768
%8 = sub nsw i64 %7, 32768
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @uasm_rel_hi(i64 %0) {
%2 = shl i64 %0, 32
%3 = add i64 %2, 140737488355328
%4 = ashr i64 %3, 48
%5 = trunc i64 %4 to i32
ret i32 %5
}
void sighandle(int sig) {}


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

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

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

LLVM IR (-O2):
define void @sighandle(i32 %0) {
ret void
}
/* Variables and functions */
bool nrf51_errata_9(void) { return false; }


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

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

LLVM IR (-O0):
define i32 @nrf51_errata_9() {
ret i32 0
}

LLVM IR (-O2):
define i32 @nrf51_errata_9() {
ret i32 0
}
void bar(void) { (volatile int){3}; }


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
movl   $0x3,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bar>:
movl   $0x3,-0x4(%rsp)
mov    -0x4(%rsp),%eax
ret

LLVM IR (-O0):
define void @bar() {
%1 = alloca i32
store i32 3, i32* %1
%2 = load volatile i32, i32* %1
ret void
}

LLVM IR (-O2):
define void @bar() {
%1 = alloca i32
store i32 3, i32* %1
%2 = load volatile i32, i32* %1
ret void
}
void mtk_fbdev_fini(struct drm_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.drm_device = type opaque
define void @mtk_fbdev_fini(%struct.drm_device* nocapture %0) {
ret void
}
void _TROPOSPHERE_Interpolate(const double x1, const double y1, const double x2,
                              const double y2, const double x, double *y) {
  double dx;
  dx = x2 - x1;
  if (dx < 1e-25 && dx > -1e-25)
    *y = y1;
  *y = y1 + (x - x1) / dx * (y2 - y1);
}


x86 assembly (clang, -O0):
<_TROPOSPHERE_Interpolate>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  %xmm4,-0x28(%rbp)
mov    %rdi,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xec8(%rip),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1167 <_TROPOSPHERE_Interpolate+0x67>
movsd  -0x38(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1167 <_TROPOSPHERE_Interpolate+0x67>
movsd  -0x10(%rbp),%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x10(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  -0x8(%rbp),%xmm0
divsd  -0x38(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
subsd  -0x10(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_TROPOSPHERE_Interpolate>:
subsd  %xmm0,%xmm2
subsd  %xmm0,%xmm4
divsd  %xmm2,%xmm4
subsd  %xmm1,%xmm3
mulsd  %xmm4,%xmm3
addsd  %xmm1,%xmm3
movsd  %xmm3,(%rdi)
ret

LLVM IR (-O0):
define void @_TROPOSPHERE_Interpolate(double %0, double %1, double %2, double %3, double %4, double* %5) {
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double*
%13 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double* %5, double** %12
%14 = load double, double* %9
%15 = load double, double* %7
%16 = fsub double %14, %15
store double %16, double* %13
%17 = load double, double* %13
%18 = fcmp olt double %17, 1.000000e-25
br i1 %18, label %19, label %25
19: ; preds = %6
%20 = load double, double* %13
%21 = fcmp ogt double %20, -1.000000e-25
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load double, double* %8
%24 = load double*, double** %12
store double %23, double* %24
br label %25
25: ; preds = %22, %19, %6
%26 = load double, double* %8
%27 = load double, double* %11
%28 = load double, double* %7
%29 = fsub double %27, %28
%30 = load double, double* %13
%31 = fdiv double %29, %30
%32 = load double, double* %10
%33 = load double, double* %8
%34 = fsub double %32, %33
%35 = call double @llvm.fmuladd.f64(double %31, double %34, double %26)
%36 = load double*, double** %12
store double %35, double* %36
ret void
}

LLVM IR (-O2):
define void @_TROPOSPHERE_Interpolate(double %0, double %1, double %2, double %3, double %4, double* nocapture writeonly %5) {
%7 = fsub double %2, %0
%8 = fsub double %4, %0
%9 = fdiv double %8, %7
%10 = fsub double %3, %1
%11 = tail call double @llvm.fmuladd.f64(double %9, double %10, double %1)
store double %11, double* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void print_usage(void) {
  fprintf(stderr, "usage: "
                  "nsdo"
                  " <namespace> <command> [args...]\n"
                  "       "
                  "nsdo"
                  " { "
                  "--version"
                  " | "
                  "-V"
                  " }\n");
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [76 x i8] c"usage: nsdo <namespace> <command> [args...]\0A nsdo { --version | -V }\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [76 x i8] c"usage: nsdo <namespace> <command> [args...]\0A nsdo { --version | -V }\0A\00"
define void @print_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_create_db();
void test_graph() { test_create_db(); }


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

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

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

LLVM IR (-O2):
define void @test_graph() {
%1 = tail call i32 (...) @test_create_db()
ret void
}
/* Type definitions */
struct hdr_histogram {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ counts_set_direct(struct hdr_histogram *, int /*<<< orphan*/,
                                     int /*<<< orphan*/);
int /*<<< orphan*/ normalize_index(struct hdr_histogram *, int /*<<< orphan*/);
void counts_set_normalised(struct hdr_histogram *h, int32_t index,
                           int64_t value) {
  int32_t normalised_index = normalize_index(h, index);
  counts_set_direct(h, normalised_index, value);
}


x86 assembly (clang, -O0):
<counts_set_normalised>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <normalize_index@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <counts_set_direct@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<counts_set_normalised>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rdi,%rbx
call   1040 <normalize_index@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <counts_set_direct@plt>

LLVM IR (-O0):
%struct.hdr_histogram = type { i32 }
define void @counts_set_normalised(%struct.hdr_histogram* %0, i32 %1, i32 %2) {
%4 = alloca %struct.hdr_histogram*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.hdr_histogram* %0, %struct.hdr_histogram** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load %struct.hdr_histogram*, %struct.hdr_histogram** %4
%9 = load i32, i32* %5
%10 = call i32 @normalize_index(%struct.hdr_histogram* %8, i32 %9)
store i32 %10, i32* %7
%11 = load %struct.hdr_histogram*, %struct.hdr_histogram** %4
%12 = load i32, i32* %7
%13 = load i32, i32* %6
%14 = call i32 @counts_set_direct(%struct.hdr_histogram* %11, i32 %12, i32 %13)
ret void
}

LLVM IR (-O2):
%struct.hdr_histogram = type { i32 }
define void @counts_set_normalised(%struct.hdr_histogram* %0, i32 %1, i32 %2) {
%4 = tail call i32 @normalize_index(%struct.hdr_histogram* %0, i32 %1)
%5 = tail call i32 @counts_set_direct(%struct.hdr_histogram* %0, i32 %4, i32 %2)
ret void
}
char toASCIILower(char c) { return c | ((c >= 'A' && c <= 'Z') << 5); }


x86 assembly (clang, -O0):
<toASCIILower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x2(%rbp)
jl     1130 <toASCIILower+0x30>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x2(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%ecx
shl    $0x5,%ecx
or     %ecx,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toASCIILower>:
lea    -0x41(%rdi),%eax
cmp    $0x1a,%al
setb   %al
shl    $0x5,%al
or     %dil,%al
ret

LLVM IR (-O0):
define signext i8 @toASCIILower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sge i32 %6, 65
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 90
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ false, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
%15 = shl i32 %14, 5
%16 = or i32 %4, %15
%17 = trunc i32 %16 to i8
ret i8 %17
}

LLVM IR (-O2):
define signext i8 @toASCIILower(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = select i1 %3, i8 32, i8 0
%5 = or i8 %4, %0
ret i8 %5
}
int test_imm_7Cint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x7C << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_7Cint64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x7c,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_7Cint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 8126464
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int f122(int *);
int f123(int *p) { return f122(p); }


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

x86 assembly (clang, -O2):
<f123>:
jmp    1030 <f122@plt>

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

LLVM IR (-O2):
define i32 @f123(i32* %0) {
%2 = tail call i32 @f122(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ debugPrint(char *);
int /*<<< orphan*/ next_glPopAttrib();
int /*<<< orphan*/ printGLError();
void glPopAttrib() {
  next_glPopAttrib();
  printGLError();
  debugPrint("glPopAttrib()\n");
}


x86 assembly (clang, -O0):
<glPopAttrib>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <next_glPopAttrib@plt>
mov    $0x0,%al
call   1030 <printGLError@plt>
lea    0xeb7(%rip),%rdi
call   1050 <debugPrint@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glPopAttrib>:
push   %rax
xor    %eax,%eax
call   1040 <next_glPopAttrib@plt>
xor    %eax,%eax
call   1030 <printGLError@plt>
lea    0xeba(%rip),%rdi
pop    %rax
jmp    1050 <debugPrint@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"glPopAttrib()\0A\00"
define void @glPopAttrib() {
%1 = call i32 (...) @next_glPopAttrib()
%2 = call i32 (...) @printGLError()
%3 = call i32 @debugPrint(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"glPopAttrib()\0A\00"
define void @glPopAttrib() {
%1 = tail call i32 (...) @next_glPopAttrib()
%2 = tail call i32 (...) @printGLError()
%3 = tail call i32 @debugPrint(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timeval {
  long tv_sec;
  long tv_usec;
};

/* Variables and functions */
void bot_timeval_set(struct timeval *tv, double dt) {
  long us = dt * 1000000;
  tv->tv_sec = us / 1000000;
  tv->tv_usec = us - tv->tv_sec * 1000000;
}


x86 assembly (clang, -O0):
<bot_timeval_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  0xeeb(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    $0xf4240,%ecx
cqto
idiv   %rcx
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
imul   $0xf4240,(%rax),%rax
sub    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_timeval_set>:
mulsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%rcx
movabs $0x431bde82d7b634db,%rdx
de 1b 43
mov    %rcx,%rax
imul   %rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x12,%rdx
add    %rax,%rdx
mov    %rdx,(%rdi)
imul   $0xfffffffffff0bdc0,%rdx,%rax
add    %rcx,%rax
mov    %rax,0x8(%rdi)
ret

LLVM IR (-O0):
%struct.timeval = type { i64, i64 }
define void @bot_timeval_set(%struct.timeval* %0, double %1) {
%3 = alloca %struct.timeval*
%4 = alloca double
%5 = alloca i64
store %struct.timeval* %0, %struct.timeval** %3
store double %1, double* %4
%6 = load double, double* %4
%7 = fmul double %6, 1.000000e+06
%8 = fptosi double %7 to i64
store i64 %8, i64* %5
%9 = load i64, i64* %5
%10 = sdiv i64 %9, 1000000
%11 = load %struct.timeval*, %struct.timeval** %3
%12 = getelementptr inbounds %struct.timeval, %struct.timeval* %11, i32 0, i32 0
store i64 %10, i64* %12
%13 = load i64, i64* %5
%14 = load %struct.timeval*, %struct.timeval** %3
%15 = getelementptr inbounds %struct.timeval, %struct.timeval* %14, i32 0, i32 0
%16 = load i64, i64* %15
%17 = mul nsw i64 %16, 1000000
%18 = sub nsw i64 %13, %17
%19 = load %struct.timeval*, %struct.timeval** %3
%20 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 1
store i64 %18, i64* %20
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
define void @bot_timeval_set(%struct.timeval* nocapture writeonly %0, double %1) {
%3 = fmul double %1, 1.000000e+06
%4 = fptosi double %3 to i64
%5 = sdiv i64 %4, 1000000
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
store i64 %5, i64* %6
%7 = mul nsw i64 %5, -1000000
%8 = add i64 %7, %4
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
store i64 %8, i64* %9
ret void
}
/* Variables and functions */
int ap_get_single_string_command(int, int, char *, int);
int ap_get_year(int session, char *str) {
  return (ap_get_single_string_command(session, 0xcc14, str, 10));
}


x86 assembly (clang, -O0):
<ap_get_year>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0xcc14,%esi
mov    $0xa,%ecx
call   1030 <ap_get_single_string_command@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ap_get_year>:
mov    %rsi,%rdx
mov    $0xcc14,%esi
mov    $0xa,%ecx
jmp    1030 <ap_get_single_string_command@plt>

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

LLVM IR (-O2):
define i32 @ap_get_year(i32 %0, i8* %1) {
%3 = tail call i32 @ap_get_single_string_command(i32 %0, i32 52244, i8* %1, i32 10)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ machineReset();
int /*<<< orphan*/ machineResume();
void machineStart() {
  machineReset();
  machineResume();
}


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

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

LLVM IR (-O0):
define void @machineStart() {
%1 = call i32 (...) @machineReset()
%2 = call i32 (...) @machineResume()
ret void
}

LLVM IR (-O2):
define void @machineStart() {
%1 = tail call i32 (...) @machineReset()
%2 = tail call i32 (...) @machineResume()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, ("%s: %s filename nblocks blocksize\n"), progname, progname);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
lea    0xebc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rcx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    %rcx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"%s: %s filename nblocks blocksize\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %4, i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"%s: %s filename nblocks blocksize\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int sio_errorf(char *, char const *, char const *);
int sio_errorc(const char *context, const char *errmsg) {
  return sio_errorf("%s: %s", context, errmsg);
}


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

x86 assembly (clang, -O2):
<sio_errorc>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <sio_errorf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"%s: %s\00"
define i32 @sio_errorc(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 = load i8*, i8** %4
%7 = call i32 @sio_errorf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s: %s\00"
define i32 @sio_errorc(i8* %0, i8* %1) {
%3 = tail call i32 @sio_errorf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i32 %3
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ do_add_collector(char *);
int /*<<< orphan*/ list_reflectors(int, struct sockaddr_in *);
void add_collector(int command_sd, struct sockaddr_in *cliAddr, char *cmd) {
  do_add_collector(cmd);
  list_reflectors(command_sd, cliAddr);
}


x86 assembly (clang, -O0):
<add_collector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <do_add_collector@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <list_reflectors@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_collector>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rdx,%rdi
call   1030 <do_add_collector@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <list_reflectors@plt>

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
define void @add_collector(i32 %0, %struct.sockaddr_in* %1, i8* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr_in*
%6 = alloca i8*
store i32 %0, i32* %4
store %struct.sockaddr_in* %1, %struct.sockaddr_in** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = call i32 @do_add_collector(i8* %7)
%9 = load i32, i32* %4
%10 = load %struct.sockaddr_in*, %struct.sockaddr_in** %5
%11 = call i32 @list_reflectors(i32 %9, %struct.sockaddr_in* %10)
ret void
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
define void @add_collector(i32 %0, %struct.sockaddr_in* %1, i8* %2) {
%4 = tail call i32 @do_add_collector(i8* %2)
%5 = tail call i32 @list_reflectors(i32 %0, %struct.sockaddr_in* %1)
ret void
}
/* Type definitions */
struct gg_http {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int gg_search_watch_fd(struct gg_http *h) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<gg_search_watch_fd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg_search_watch_fd>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%eax
mov    0x2ed0(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
%struct.gg_http = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @gg_search_watch_fd(%struct.gg_http* %0) {
%2 = alloca %struct.gg_http*
store %struct.gg_http* %0, %struct.gg_http** %2
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
%struct.gg_http = type { i32 }
@EINVAL = global i32 0
@errno = global i32 0
define i32 @gg_search_watch_fd(%struct.gg_http* nocapture readnone %0) {
%2 = load i32, i32* @EINVAL
store i32 %2, i32* @errno
ret i32 -1
}
_Bool setlt(int X, int Y) { return X < Y; }


x86 assembly (clang, -O0):
<setlt>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<setlt>:
cmp    %esi,%edi
setl   %al
ret

LLVM IR (-O0):
define zeroext i1 @setlt(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 = icmp slt i32 %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @setlt(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
ret i1 %3
}
/* Variables and functions */
int /*<<< orphan*/ goCallback();
void sofunc(void) { goCallback(); }


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

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

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

LLVM IR (-O2):
define void @sofunc() {
%1 = tail call i32 (...) @goCallback()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
size_t read(int, void *, size_t);
int /*<<< orphan*/ stderr;
void sread(int fd, void *buf, size_t count) {
  size_t ret;
  ret = read(fd, buf, count);
  if (ret != count) {
    fprintf(stderr, "cannot read()\n");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<sread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1188 <sread+0x58>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
lea    0xe8b(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sread>:
push   %rbx
mov    %rdx,%rbx
call   1030 <read@plt>
cmp    %rbx,%rax
jne    1140 <sread+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [15 x i8] c"cannot read()\0A\00"
@EXIT_FAILURE = global i32 0
define void @sread(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i64 @read(i32 %8, i8* %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %7
%13 = load i64, i64* %6
%14 = icmp ne i64 %12, %13
br i1 %14, label %15, label %20
15: ; preds = %3
%16 = load i32, i32* @stderr
%17 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%18 = load i32, i32* @EXIT_FAILURE
%19 = call i32 @exit(i32 %18)
unreachable
20: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [15 x i8] c"cannot read()\0A\00"
@EXIT_FAILURE = global i32 0
define void @sread(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @read(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i64 %4, %2
br i1 %5, label %11, label %6
6: ; preds = %3
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
11: ; preds = %3
ret void
}
/* Variables and functions */
unsigned int echo_int_4_marshal_outputs__camkes_ret_fn_459(unsigned int, int *);
unsigned int echo_int_4_marshal_outputs(int *_camkes_return_463) {
  unsigned int _camkes_length_464 = 0;
  _camkes_length_464 = echo_int_4_marshal_outputs__camkes_ret_fn_459(
      _camkes_length_464, _camkes_return_463);
  if (_camkes_length_464 == 0xffffffffU) {
    return 0xffffffffU;
  }
  (void)0;
  return _camkes_length_464;
}


x86 assembly (clang, -O0):
<echo_int_4_marshal_outputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <echo_int_4_marshal_outputs__camkes_ret_fn_459@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
jne    1148 <echo_int_4_marshal_outputs+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    114e <echo_int_4_marshal_outputs+0x3e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<echo_int_4_marshal_outputs>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <echo_int_4_marshal_outputs__camkes_ret_fn_459@plt>

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

LLVM IR (-O2):
define i32 @echo_int_4_marshal_outputs(i32* %0) {
%2 = tail call i32 @echo_int_4_marshal_outputs__camkes_ret_fn_459(i32 0, i32* %0)
ret i32 %2
}
/* Variables and functions */
double Ts_T_fix(double, double);
double Ts_(double s, double alpha __attribute__((unused))) {
  return Ts_T_fix(s, alpha);
}


x86 assembly (clang, -O0):
<Ts_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <Ts_T_fix@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ts_>:
jmp    1030 <Ts_T_fix@plt>

LLVM IR (-O0):
define double @Ts_(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 @Ts_T_fix(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @Ts_(double %0, double %1) {
%3 = tail call double @Ts_T_fix(double %0, double %1)
ret double %3
}
void bios_putchar(int ch) {}


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

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

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

LLVM IR (-O2):
define void @bios_putchar(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ smp_test_stack_init();
void smp_test_stack_main() {
  smp_test_stack_init();
  printf("finished test\n");
}


x86 assembly (clang, -O0):
<smp_test_stack_main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <smp_test_stack_init@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smp_test_stack_main>:
push   %rax
xor    %eax,%eax
call   1040 <smp_test_stack_init@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"finished test\0A\00"
define void @smp_test_stack_main() {
%1 = call i32 (...) @smp_test_stack_init()
%2 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"finished test\00"
define void @smp_test_stack_main() {
%1 = tail call i32 (...) @smp_test_stack_init()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void kill_input() {}


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

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

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

LLVM IR (-O2):
define void @kill_input() {
ret void
}
int toPercent(int x, int max) {
  int y;
  y = (x / max);
  return y;
}


x86 assembly (clang, -O0):
<toPercent>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toPercent>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @toPercent(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = sdiv i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
define i32 @toPercent(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
int topj(int i, int j, int n) { return j; }


x86 assembly (clang, -O0):
<topj>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<topj>:
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @topj(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* %5
ret i32 %7
}

LLVM IR (-O2):
define i32 @topj(i32 %0, i32 returned %1, i32 %2) {
ret i32 %1
}
/* Variables and functions */
scalar_t__ encode_Nucleotide_reverse_comp(char);
void fill_int_reverse_comp(unsigned long long int *nucl_seq, char n1) {
  *nucl_seq <<= 2;
  *nucl_seq += encode_Nucleotide_reverse_comp(n1);
}


x86 assembly (clang, -O0):
<fill_int_reverse_comp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
shl    $0x2,%rcx
mov    %rcx,(%rax)
movsbl -0x9(%rbp),%edi
call   1030 <encode_Nucleotide_reverse_comp@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fill_int_reverse_comp>:
push   %rbx
mov    %rdi,%rbx
shlq   $0x2,(%rdi)
mov    %esi,%edi
call   1030 <encode_Nucleotide_reverse_comp@plt>
add    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @fill_int_reverse_comp(i64* %0, i8 signext %1) {
%3 = alloca i64*
%4 = alloca i8
store i64* %0, i64** %3
store i8 %1, i8* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %5
%7 = shl i64 %6, 2
store i64 %7, i64* %5
%8 = load i8, i8* %4
%9 = call i64 @encode_Nucleotide_reverse_comp(i8 signext %8)
%10 = load i64*, i64** %3
%11 = load i64, i64* %10
%12 = add i64 %11, %9
store i64 %12, i64* %10
ret void
}

LLVM IR (-O2):
define void @fill_int_reverse_comp(i64* nocapture %0, i8 signext %1) {
%3 = load i64, i64* %0
%4 = shl i64 %3, 2
store i64 %4, i64* %0
%5 = tail call i64 @encode_Nucleotide_reverse_comp(i8 signext %1)
%6 = load i64, i64* %0
%7 = add i64 %6, %5
store i64 %7, i64* %0
ret void
}
int generate_tmp_names(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @generate_tmp_names() {
ret i32 1
}

LLVM IR (-O2):
define i32 @generate_tmp_names() {
ret i32 1
}
int divide_by_zero() {
  int a = 1;
  int b = 0;
  return a / b;
}


x86 assembly (clang, -O0):
<divide_by_zero>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @divide_by_zero() {
ret i32 poison
}
int selectPivotIndex(void **vals, int left, int right) { return right; }


x86 assembly (clang, -O0):
<selectPivotIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<selectPivotIndex>:
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @selectPivotIndex(i8** nocapture readnone %0, i32 %1, i32 returned %2) {
ret i32 %2
}
/* Variables and functions */
unsigned int ceilLog2(unsigned int const);
unsigned int BitPerBytePackedChar(const unsigned int alphabetSize) {
  unsigned int bitPerChar;
  bitPerChar = ceilLog2(alphabetSize);
  if (8 / (8 / bitPerChar) > bitPerChar)
    bitPerChar = 8 / (8 / bitPerChar);
  return bitPerChar;
}


x86 assembly (clang, -O0):
<BitPerBytePackedChar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <ceilLog2@plt>
mov    %eax,-0x8(%rbp)
mov    $0x8,%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,%ecx
mov    $0x8,%eax
xor    %edx,%edx
div    %ecx
cmp    -0x8(%rbp),%eax
jbe    115c <BitPerBytePackedChar+0x4c>
mov    $0x8,%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %eax,%ecx
mov    $0x8,%eax
xor    %edx,%edx
div    %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BitPerBytePackedChar>:
push   %rax
call   1030 <ceilLog2@plt>
mov    %eax,%ecx
mov    $0x8,%eax
xor    %edx,%edx
div    %ecx
mov    %eax,%edx
mov    $0x8,%al
movzbl %al,%eax
div    %dl
movzbl %al,%eax
cmp    %eax,%ecx
cmovb  %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @BitPerBytePackedChar(i32 %0) {
%2 = tail call i32 @ceilLog2(i32 %0)
%3 = udiv i32 8, %2
%4 = trunc i32 %3 to i8
%5 = udiv i8 8, %4
%6 = zext i8 %5 to i32
%7 = icmp ult i32 %2, %6
%8 = select i1 %7, i32 %6, i32 %2
ret i32 %8
}
void fc85(int n) {
a : {
  typedef int(*b)[n];
  {
    typedef int(*c)[n];
    0;
  }
  {
    typedef int(*d)[n];
    0;
  }
  goto a;
  ;
  typedef int(*e)[n];
  0;
};
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
  ;
  typedef int(*j)[n];
  0;
}


x86 assembly (clang, -O0):
<fc85>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
jmp    1107 <fc85+0x7>

x86 assembly (clang, -O2):
<fc85>:
jmp    1100 <fc85>

LLVM IR (-O0):
define void @fc85(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
br label %3
10: ; No predecessors!
%11 = load i32, i32* %2
%12 = zext i32 %11 to i64
%13 = load i32, i32* %2
%14 = zext i32 %13 to i64
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = load i32, i32* %2
%18 = zext i32 %17 to i64
%19 = load i32, i32* %2
%20 = zext i32 %19 to i64
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc85(i32 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
int json_get_utf8_char_len(unsigned char ch) {
  if ((ch & 0x80) == 0)
    return 1;
  switch (ch & 0xf0) {
  case 0xf0:
    return 4;
  case 0xe0:
    return 3;
  default:
    return 2;
  }
}


x86 assembly (clang, -O0):
<json_get_utf8_char_len>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
and    $0x80,%eax
cmp    $0x0,%eax
jne    1128 <json_get_utf8_char_len+0x28>
movl   $0x1,-0x4(%rbp)
jmp    1174 <json_get_utf8_char_len+0x74>
movzbl -0x5(%rbp),%eax
and    $0xfffffff0,%eax
mov    %eax,-0xc(%rbp)
sub    $0xe0,%eax
je     1161 <json_get_utf8_char_len+0x61>
jmp    1142 <json_get_utf8_char_len+0x42>
mov    -0xc(%rbp),%eax
sub    $0xf0,%eax
jne    116d <json_get_utf8_char_len+0x6d>
jmp    1155 <json_get_utf8_char_len+0x55>
movl   $0x4,-0x4(%rbp)
jmp    1174 <json_get_utf8_char_len+0x74>
movl   $0x3,-0x4(%rbp)
jmp    1174 <json_get_utf8_char_len+0x74>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<json_get_utf8_char_len>:
mov    $0x1,%eax
test   %dil,%dil
js     110b <json_get_utf8_char_len+0xb>
ret
mov    %edi,%eax
and    $0xf0,%al
xor    %ecx,%ecx
cmp    $0xe0,%al
sete   %cl
or     $0x2,%ecx
cmp    $0xf0,%dil
mov    $0x4,%eax
cmovb  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @json_get_utf8_char_len(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = and i32 %5, 128
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %2
br label %16
9: ; preds = %1
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = and i32 %11, 240
switch i32 %12, label %15 [
i32 240, label %13
i32 224, label %14
]
13: ; preds = %9
store i32 4, i32* %2
br label %16
14: ; preds = %9
store i32 3, i32* %2
br label %16
15: ; preds = %9
store i32 2, i32* %2
br label %16
16: ; preds = %15, %14, %13, %8
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @json_get_utf8_char_len(i8 zeroext %0) {
%2 = icmp sgt i8 %0, -1
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = and i8 %0, -16
%5 = icmp eq i8 %4, -32
%6 = select i1 %5, i32 3, i32 2
%7 = icmp ugt i8 %0, -17
%8 = select i1 %7, i32 4, i32 %6
br label %9
9: ; preds = %3, %1
%10 = phi i32 [ 1, %1 ], [ %8, %3 ]
ret i32 %10
}
void dead_result3(int *data) {
  int k = 0;
  int j = data[1];
  if (j)
    k++;
  else
    k--;
  j = data[2];
  data[j] = 2;
  data[3] = k;
}


x86 assembly (clang, -O0):
<dead_result3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
je     1131 <dead_result3+0x31>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    113a <dead_result3+0x3a>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<dead_result3>:
cmpl   $0x1,0x4(%rdi)
sbb    %eax,%eax
or     $0x1,%eax
movslq 0x8(%rdi),%rcx
movl   $0x2,(%rdi,%rcx,4)
mov    %eax,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @dead_result3(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -1, i32 1
%6 = getelementptr inbounds i32, i32* %0, i64 2
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 2, i32* %9
%10 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %5, i32* %10
ret void
}
char *jReadSkipWhitespace(char *sp) {
  while ((*sp != '\0') && (*sp <= ' '))
    sp++;
  return sp;
}


x86 assembly (clang, -O0):
<jReadSkipWhitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     112d <jReadSkipWhitespace+0x2d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
setle  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    113d <jReadSkipWhitespace+0x3d>
jmp    114e <jReadSkipWhitespace+0x4e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <jReadSkipWhitespace+0x8>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jReadSkipWhitespace>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <jReadSkipWhitespace+0x21>
cmp    $0x21,%cl
jl     1110 <jReadSkipWhitespace+0x10>
ret

LLVM IR (-O0):
define i8* @jReadSkipWhitespace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp sle i32 %11, 32
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @jReadSkipWhitespace(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %8, %2 ]
%4 = load i8, i8* %3
%5 = icmp ne i8 %4, 0
%6 = icmp slt i8 %4, 33
%7 = and i1 %5, %6
%8 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %7, label %2, label %9
9: ; preds = %2
ret i8* %3
}
void XtResizeWidget() {}


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

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

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

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