xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
scalar_t__ rightrot(unsigned int, int);
int main(void) {
  printf("%u", (unsigned)rightrot((unsigned)8, (int)1));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x8,%edi
mov    $0x1,%esi
call   1040 <rightrot@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%u\00"
define i32 @main() {
%1 = tail call i64 @rightrot(i32 8, i32 1)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Variables and functions */
int exp(float);
float chi2_k4_cdf(float x) { return 1 - exp(-x / 2) * (1 + x / 2); }


x86 assembly (clang, -O0):
<chi2_k4_cdf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  0xecd(%rip),%xmm1
divss  %xmm1,%xmm0
call   1030 <exp@plt>
cvtsi2ss %eax,%xmm0
movss  -0x4(%rbp),%xmm2
movss  0xeb3(%rip),%xmm1
divss  %xmm1,%xmm2
movss  0xea3(%rip),%xmm1
addss  %xmm2,%xmm1
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
mulss  %xmm1,%xmm0
movss  0xe86(%rip),%xmm1
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chi2_k4_cdf>:
push   %rax
movaps %xmm0,%xmm1
movss  %xmm0,0x4(%rsp)
movss  0xede(%rip),%xmm0
mulss  %xmm1,%xmm0
call   1030 <exp@plt>
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
movss  0x4(%rsp),%xmm2
mulss  0xec4(%rip),%xmm2
movss  0xec0(%rip),%xmm0
addss  %xmm0,%xmm2
mulss  %xmm1,%xmm2
subss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @chi2_k4_cdf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fneg float %3
%5 = fdiv float %4, 2.000000e+00
%6 = call i32 @exp(float %5)
%7 = sitofp i32 %6 to float
%8 = load float, float* %2
%9 = fdiv float %8, 2.000000e+00
%10 = fadd float 1.000000e+00, %9
%11 = fneg float %7
%12 = call float @llvm.fmuladd.f32(float %11, float %10, float 1.000000e+00)
ret float %12
}

LLVM IR (-O2):
define float @chi2_k4_cdf(float %0) {
%2 = fmul float %0, -5.000000e-01
%3 = tail call i32 @exp(float %2)
%4 = sitofp i32 %3 to float
%5 = fmul float %0, 5.000000e-01
%6 = fadd float %5, 1.000000e+00
%7 = fneg float %4
%8 = tail call float @llvm.fmuladd.f32(float %7, float %6, float 1.000000e+00)
ret float %8
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void le16enc(void *pp, uint16_t u) {
  uint8_t *p = (uint8_t *)pp;
  p[0] = u & 0xff;
  p[1] = (u >> 8) & 0xff;
}


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

x86 assembly (clang, -O2):
<le16enc>:
mov    %esi,%eax
movzbl %al,%ecx
mov    %ecx,(%rdi)
movzbl %ah,%eax
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @le16enc(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32, i32* %4
%9 = and i32 %8, 255
%10 = load i32*, i32** %5
%11 = getelementptr inbounds i32, i32* %10, i64 0
store i32 %9, i32* %11
%12 = load i32, i32* %4
%13 = ashr i32 %12, 8
%14 = and i32 %13, 255
%15 = load i32*, i32** %5
%16 = getelementptr inbounds i32, i32* %15, i64 1
store i32 %14, i32* %16
ret void
}

LLVM IR (-O2):
define void @le16enc(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
%4 = and i32 %1, 255
store i32 %4, i32* %3
%5 = lshr i32 %1, 8
%6 = and i32 %5, 255
%7 = getelementptr inbounds i8, i8* %0, i64 4
%8 = bitcast i8* %7 to i32*
store i32 %6, i32* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int8_t;

/* Variables and functions */
void arc4random_addrandom(u_int8_t *dat, int datlen) {}


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

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

LLVM IR (-O0):
define void @arc4random_addrandom(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
define void @arc4random_addrandom(i32* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void ADCSequenceUnderflowClear(unsigned long ulBase,
                               unsigned long ulSequenceNum) {
  DEBUG_ASSERT((ulBase == 0x40038000) || (ulBase == 0x40039000));
  DEBUG_ASSERT(ulSequenceNum < 4);
  (*((volatile unsigned long *)(ulBase + 0x00000018))) = 1 << ulSequenceNum;
}


x86 assembly (clang, -O0):
<ADCSequenceUnderflowClear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%al
cmpq   $0x40038000,-0x8(%rbp)
40
mov    %al,-0x11(%rbp)
je     1141 <ADCSequenceUnderflowClear+0x31>
cmpq   $0x40039000,-0x8(%rbp)
40
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x4,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
movslq %eax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x18(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ADCSequenceUnderflowClear>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rdi,%rax
and    $0xffffffffffffefff,%rax
xor    %edi,%edi
cmp    $0x40038000,%rax
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x4,%rbx
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
mov    $0x1,%eax
mov    %ebx,%ecx
shl    %cl,%eax
cltq
mov    %rax,0x18(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ADCSequenceUnderflowClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = icmp eq i64 %5, 1073971200
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 1073975296
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ true, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @DEBUG_ASSERT(i32 %12)
%14 = load i64, i64* %4
%15 = icmp ult i64 %14, 4
%16 = zext i1 %15 to i32
%17 = call i32 @DEBUG_ASSERT(i32 %16)
%18 = load i64, i64* %4
%19 = trunc i64 %18 to i32
%20 = shl i32 1, %19
%21 = sext i32 %20 to i64
%22 = load i64, i64* %3
%23 = add i64 %22, 24
%24 = inttoptr i64 %23 to i64*
store volatile i64 %21, i64* %24
ret void
}

LLVM IR (-O2):
define void @ADCSequenceUnderflowClear(i64 %0, i64 %1) {
%3 = and i64 %0, -4097
%4 = icmp eq i64 %3, 1073971200
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = icmp ult i64 %1, 4
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = trunc i64 %1 to i32
%11 = shl nuw i32 1, %10
%12 = sext i32 %11 to i64
%13 = add i64 %0, 24
%14 = inttoptr i64 %13 to i64*
store volatile i64 %12, i64* %14
ret void
}
unsigned int log10_(long unsigned int l) {
  long unsigned int c;
  unsigned int i;
  i = 0;
  c = 1;
  while (c < l) {
    i += 1;
    c = c * 10;
  }
  return i;
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<log10_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x1,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    113c <log10_+0x3c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
imul   $0xa,-0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <log10_+0x17>
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<log10_>:
xor    %eax,%eax
cmp    $0x2,%rdi
jb     111f <log10_+0x1f>
mov    $0x1,%ecx
xor    %eax,%eax
nop
add    $0x1,%eax
add    %rcx,%rcx
lea    (%rcx,%rcx,4),%rcx
cmp    %rdi,%rcx
jb     1110 <log10_+0x10>
ret

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

LLVM IR (-O2):
define i32 @log10_(i64 %0) {
%2 = icmp ugt i64 %0, 1
br i1 %2, label %3, label %9
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i64 [ %7, %3 ], [ 1, %1 ]
%6 = add i32 %4, 1
%7 = mul i64 %5, 10
%8 = icmp ult i64 %7, %0
br i1 %8, label %3, label %9
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %10
}
/* Variables and functions */
scalar_t__ RAND_MAX;
scalar_t__ rand();
float randomNumber(float max) {
  float x = ((float)rand() / (float)(RAND_MAX)) * max;
  return x;
}


x86 assembly (clang, -O0):
<randomNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb8(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<randomNumber>:
push   %rax
movss  %xmm0,0x4(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm2
mov    0x2ebe(%rip),%rax
cvtsi2ssq (%rax),%xmm1
divss  %xmm1,%xmm2
movss  0x4(%rsp),%xmm0
mulss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global i64 0
define float @randomNumber(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = call i64 (...) @rand()
%5 = sitofp i64 %4 to float
%6 = load i64, i64* @RAND_MAX
%7 = sitofp i64 %6 to float
%8 = fdiv float %5, %7
%9 = load float, float* %2
%10 = fmul float %8, %9
store float %10, float* %3
%11 = load float, float* %3
ret float %11
}

LLVM IR (-O2):
@RAND_MAX = global i64 0
define float @randomNumber(float %0) {
%2 = tail call i64 (...) @rand()
%3 = sitofp i64 %2 to float
%4 = load i64, i64* @RAND_MAX
%5 = sitofp i64 %4 to float
%6 = fdiv float %3, %5
%7 = fmul float %6, %0
ret float %7
}
void do_bgfg(char **argv) { return; }


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

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

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

LLVM IR (-O2):
define void @do_bgfg(i8** nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ errno;
int ioctl(int fd, int request, ...) {
  errno = EINVAL;
  return -1;
}


x86 assembly (clang, -O0):
<ioctl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2ec7(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec6(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @ioctl(i32 %0, i32 %1, ...) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@EINVAL = global i32 0
@errno = global i32 0
define i32 @ioctl(i32 %0, i32 %1, ...) {
%3 = load i32, i32* @EINVAL
store i32 %3, i32* @errno
ret i32 -1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long subwindow;
};
typedef TYPE_1__ XPointerMovedEvent;

/* Variables and functions */
void set_XPointerMovedEvent_subwindow(void *_p, unsigned long _v) {
  ((XPointerMovedEvent *)_p)->subwindow = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XPointerMovedEvent_subwindow(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int M_PI;
float degreeToRadian(int d) { return d * M_PI / 180.; }


x86 assembly (clang, -O0):
<degreeToRadian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
imul   (%rcx),%eax
cvtsi2sd %eax,%xmm0
movsd  0xee0(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<degreeToRadian>:
mov    0x2ee1(%rip),%rax
imul   (%rax),%edi
cvtsi2sd %edi,%xmm0
divsd  0xeea(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
@M_PI = global i32 0
define float @degreeToRadian(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @M_PI
%5 = mul nsw i32 %3, %4
%6 = sitofp i32 %5 to double
%7 = fdiv double %6, 1.800000e+02
%8 = fptrunc double %7 to float
ret float %8
}

LLVM IR (-O2):
@M_PI = global i32 0
define float @degreeToRadian(i32 %0) {
%2 = load i32, i32* @M_PI
%3 = mul nsw i32 %2, %0
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, 1.800000e+02
%6 = fptrunc double %5 to float
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ puthexdig(int);
void iprint(int number) {
  long i;
  for (i = 1000000000; i > 0; i = i / 10) {
    puthexdig(number / i);
    number = number % i;
  }
  return;
}


x86 assembly (clang, -O0):
<iprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x3b9aca00,-0x10(%rbp)
3b
cmpq   $0x0,-0x10(%rbp)
jle    1165 <iprint+0x55>
movslq -0x4(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %eax,%edi
call   1030 <puthexdig@plt>
movslq -0x4(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %edx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
jmp    1123 <iprint+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iprint>:
push   %r15
push   %r14
push   %rbx
mov    %edi,%r14d
mov    $0x3b9aca00,%ebx
movabs $0xcccccccccccccccd,%r15
cc cc cc
jmp    1153 <iprint+0x43>
nopl   0x0(%rax)
cqto
idiv   %rbx
mov    %rdx,%r14
mov    %rax,%rdi
call   1030 <puthexdig@plt>
mov    %rbx,%rax
mul    %r15
shr    $0x3,%rdx
cmp    $0x9,%rbx
mov    %rdx,%rbx
jbe    1170 <iprint+0x60>
movslq %r14d,%rax
mov    %rax,%rcx
or     %rbx,%rcx
shr    $0x20,%rcx
jne    1130 <iprint+0x20>
mov    %r14d,%eax
xor    %edx,%edx
div    %ebx
mov    %eax,%edi
mov    %edx,%r14d
jmp    113b <iprint+0x2b>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @iprint(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
store i64 1000000000, i64* %3
br label %4
4: ; preds = %19, %1
%5 = load i64, i64* %3
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %22
7: ; preds = %4
%8 = load i32, i32* %2
%9 = sext i32 %8 to i64
%10 = load i64, i64* %3
%11 = sdiv i64 %9, %10
%12 = trunc i64 %11 to i32
%13 = call i32 @puthexdig(i32 %12)
%14 = load i32, i32* %2
%15 = sext i32 %14 to i64
%16 = load i64, i64* %3
%17 = srem i64 %15, %16
%18 = trunc i64 %17 to i32
store i32 %18, i32* %2
br label %19
19: ; preds = %7
%20 = load i64, i64* %3
%21 = sdiv i64 %20, 10
store i64 %21, i64* %3
br label %4
22: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @iprint(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i64 [ 1000000000, %1 ], [ %11, %2 ]
%4 = phi i32 [ %0, %1 ], [ %10, %2 ]
%5 = sext i32 %4 to i64
%6 = sdiv i64 %5, %3
%7 = trunc i64 %6 to i32
%8 = tail call i32 @puthexdig(i32 %7)
%9 = srem i64 %5, %3
%10 = trunc i64 %9 to i32
%11 = udiv i64 %3, 10
%12 = icmp ult i64 %3, 10
br i1 %12, label %13, label %2
13: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WriteEncodedInt(int);
void WriteEncodedSignedInt(int v) {
  int sign = 0;
  if (v < 0) {
    sign = 1;
    v = -v;
  }
  v <<= 1;
  if (sign)
    v |= 1;
  WriteEncodedInt(v);
  return;
}


x86 assembly (clang, -O0):
<WriteEncodedSignedInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    113b <WriteEncodedSignedInt+0x2b>
movl   $0x1,-0x8(%rbp)
xor    %eax,%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1157 <WriteEncodedSignedInt+0x47>
mov    -0x4(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <WriteEncodedInt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteEncodedSignedInt>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
shrd   $0x1f,%eax,%edi
jmp    1030 <WriteEncodedInt@plt>

LLVM IR (-O0):
define void @WriteEncodedSignedInt(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
store i32 1, i32* %3
%7 = load i32, i32* %2
%8 = sub nsw i32 0, %7
store i32 %8, i32* %2
br label %9
9: ; preds = %6, %1
%10 = load i32, i32* %2
%11 = shl i32 %10, 1
store i32 %11, i32* %2
%12 = load i32, i32* %3
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %17
14: ; preds = %9
%15 = load i32, i32* %2
%16 = or i32 %15, 1
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %9
%18 = load i32, i32* %2
%19 = call i32 @WriteEncodedInt(i32 %18)
ret void
}

LLVM IR (-O2):
define void @WriteEncodedSignedInt(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
%3 = tail call i32 @llvm.fshl.i32(i32 %2, i32 %0, i32 1)
%4 = tail call i32 @WriteEncodedInt(i32 %3)
ret void
}
/* Variables and functions */
int SDL_strtol(char const *, void *, int /*<<< orphan*/);
int SDL_atoi(const char *string) { return SDL_strtol(string, ((void *)0), 0); }


x86 assembly (clang, -O0):
<SDL_atoi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <SDL_strtol@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SDL_atoi>:
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <SDL_strtol@plt>

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

LLVM IR (-O2):
define i32 @SDL_atoi(i8* %0) {
%2 = tail call i32 @SDL_strtol(i8* %0, i8* null, i32 0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void *malloc(size_t);
void *cgdb_malloc(size_t size) {
  void *t = malloc(size);
  if (t)
    return t;
  exit(-1);
}


x86 assembly (clang, -O0):
<cgdb_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114e <cgdb_malloc+0x2e>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<cgdb_malloc>:
push   %rax
call   1030 <malloc@plt>
test   %rax,%rax
je     112d <cgdb_malloc+0xd>
pop    %rcx
ret
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define noalias i8* @cgdb_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
ret i8* %2
5: ; preds = %1
%6 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
double get_alphaN_table(double, double);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ setup_alphaN_table();
int main() {
  setup_alphaN_table();
  printf("VE: %.2f\n", get_alphaN_table(600.0, 25.0));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <setup_alphaN_table@plt>
movsd  0xebd(%rip),%xmm0
movsd  0xebd(%rip),%xmm1
call   1050 <get_alphaN_table@plt>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <setup_alphaN_table@plt>
movsd  0xec0(%rip),%xmm0
movsd  0xec0(%rip),%xmm1
call   1050 <get_alphaN_table@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"VE: %.2f\0A\00"
define i32 @main() {
%1 = call i32 (...) @setup_alphaN_table()
%2 = call double @get_alphaN_table(double 6.000000e+02, double 2.500000e+01)
%3 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"VE: %.2f\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @setup_alphaN_table()
%2 = tail call double @get_alphaN_table(double 6.000000e+02, double 2.500000e+01)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double %2)
ret i32 0
}
/* Variables and functions */
int cio_read(int);
int /*<<< orphan*/ cio_skip(int);
void j2k_read_ppm() {
  int len;
  len = cio_read(2);

  cio_skip(len - 2);
}


x86 assembly (clang, -O0):
<j2k_read_ppm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2,%edi
call   1040 <cio_read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
call   1030 <cio_skip@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j2k_read_ppm>:
push   %rax
mov    $0x2,%edi
call   1040 <cio_read@plt>
lea    -0x2(%rax),%edi
pop    %rax
jmp    1030 <cio_skip@plt>

LLVM IR (-O0):
define void @j2k_read_ppm() {
%1 = alloca i32
%2 = call i32 @cio_read(i32 2)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = sub nsw i32 %3, 2
%5 = call i32 @cio_skip(i32 %4)
ret void
}

LLVM IR (-O2):
define void @j2k_read_ppm() {
%1 = tail call i32 @cio_read(i32 2)
%2 = add nsw i32 %1, -2
%3 = tail call i32 @cio_skip(i32 %2)
ret void
}
void splice_to_pipe(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<splice_to_pipe>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<splice_to_pipe>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.splice_to_pipe = [15 x i8] c"splice_to_pipe\00"
define void @splice_to_pipe() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.splice_to_pipe, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.splice_to_pipe = [15 x i8] c"splice_to_pipe\00"
define void @splice_to_pipe() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.splice_to_pipe, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DoCodeBraW();
int /*<<< orphan*/ SkipiWord();
scalar_t__ cctrue();
void DoCodeBccW(void) {
  if (cctrue()) {
    DoCodeBraW();
  } else {
    SkipiWord();
  }
}


x86 assembly (clang, -O0):
<DoCodeBccW>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <cctrue@plt>
cmp    $0x0,%rax
je     1151 <DoCodeBccW+0x21>
mov    $0x0,%al
call   1050 <DoCodeBraW@plt>
jmp    1158 <DoCodeBccW+0x28>
mov    $0x0,%al
call   1030 <SkipiWord@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoCodeBccW>:
push   %rax
xor    %eax,%eax
call   1040 <cctrue@plt>
test   %rax,%rax
je     1145 <DoCodeBccW+0x15>
xor    %eax,%eax
pop    %rcx
jmp    1050 <DoCodeBraW@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SkipiWord@plt>

LLVM IR (-O0):
define void @DoCodeBccW() {
%1 = call i64 (...) @cctrue()
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 (...) @DoCodeBraW()
br label %7
5: ; preds = %0
%6 = call i32 (...) @SkipiWord()
br label %7
7: ; preds = %5, %3
ret void
}

LLVM IR (-O2):
define void @DoCodeBccW() {
%1 = tail call i64 (...) @cctrue()
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @DoCodeBraW()
br label %7
5: ; preds = %0
%6 = tail call i32 (...) @SkipiWord()
br label %7
7: ; preds = %5, %3
ret void
}
void i2d_X509_REQ_INFO(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_X509_REQ_INFO() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ qd_div(double *, double const *, double *);
void qd_div_d_qd(double a, const double *b, double *c) {
  double qd_a[4];
  qd_a[0] = a;
  qd_a[1] = 0.0;
  qd_a[2] = 0.0;
  qd_a[3] = 0.0;
  qd_div(qd_a, b, c);
}


x86 assembly (clang, -O0):
<qd_div_d_qd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <qd_div@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qd_div_d_qd>:
sub    $0x28,%rsp
mov    %rsi,%rdx
mov    %rdi,%rsi
movsd  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movq   $0x0,0x18(%rsp)
mov    %rsp,%rdi
call   1030 <qd_div@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @qd_div_d_qd(double %0, double* %1, double* %2) {
%4 = alloca double
%5 = alloca double*
%6 = alloca double*
%7 = alloca [4 x double]
store double %0, double* %4
store double* %1, double** %5
store double* %2, double** %6
%8 = load double, double* %4
%9 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
store double %8, double* %9
%10 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 1
store double 0.000000e+00, double* %10
%11 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 2
store double 0.000000e+00, double* %11
%12 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 3
store double 0.000000e+00, double* %12
%13 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%14 = load double*, double** %5
%15 = load double*, double** %6
%16 = call i32 @qd_div(double* %13, double* %14, double* %15)
ret void
}

LLVM IR (-O2):
define void @qd_div_d_qd(double %0, double* %1, double* %2) {
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %4 to i8*
%6 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
store double %0, double* %6
%7 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 1
%8 = bitcast double* %7 to i8*
%9 = call i32 @qd_div(double* %6, double* %1, double* %2)
ret void
}
/* Variables and functions */
char *strerror_l(int, int /*<<< orphan*/);
char *strerror(int errnum) { return strerror_l(errnum, 0); }


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

x86 assembly (clang, -O2):
<strerror>:
xor    %esi,%esi
jmp    1030 <strerror_l@plt>

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

LLVM IR (-O2):
define i8* @strerror(i32 %0) {
%2 = tail call i8* @strerror_l(i32 %0, i32 0)
ret i8* %2
}
/* Variables and functions */
char *read_proc_line(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
char *readpidstat(int pid) {
  char filename[255 + 1];
  sprintf(filename, "/proc/%d/stat", pid);
  return read_proc_line(filename);
}


x86 assembly (clang, -O0):
<readpidstat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x110(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec1(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x110(%rbp),%rdi
call   1030 <read_proc_line@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readpidstat>:
push   %rbx
sub    $0x100,%rsp
mov    %edi,%edx
lea    0xecf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <read_proc_line@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"/proc/%d/stat\00"
define i8* @readpidstat(i32 %0) {
%2 = alloca i32
%3 = alloca [256 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%8 = call i8* @read_proc_line(i8* %7)
ret i8* %8
}

LLVM IR (-O2):
@.str = [14 x i8] c"/proc/%d/stat\00"
define i8* @readpidstat(i32 %0) {
%2 = alloca [256 x i8]
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i8* @read_proc_line(i8* %3)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char, unsigned char, unsigned char,
                          unsigned char, unsigned char);
unsigned char test_func_fn(unsigned char a1, unsigned char a2, unsigned char a3,
                           unsigned char a4) {
  unsigned char result;
  result = a1 + a2 + a3 + a4;
  printf("%d %d %d %d: %d\n", a1, a2, a3, a4, result);
  return result;
}


x86 assembly (clang, -O0):
<test_func_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %sil,%dl
mov    %dil,%sil
mov    %sil,-0x1(%rbp)
mov    %dl,-0x2(%rbp)
mov    %cl,-0x3(%rbp)
mov    %al,-0x4(%rbp)
movzbl -0x1(%rbp),%eax
movzbl -0x2(%rbp),%ecx
add    %ecx,%eax
movzbl -0x3(%rbp),%ecx
add    %ecx,%eax
movzbl -0x4(%rbp),%ecx
add    %ecx,%eax
mov    %al,-0x5(%rbp)
mov    -0x1(%rbp),%sil
mov    -0x2(%rbp),%dl
mov    -0x3(%rbp),%cl
mov    -0x4(%rbp),%al
lea    0xea4(%rip),%rdi
movzbl %sil,%esi
movzbl %dl,%edx
movzbl %cl,%ecx
movzbl %al,%r8d
movzbl -0x5(%rbp),%r9d
call   1030 <printf@plt>
movzbl -0x5(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_func_fn>:
push   %rbx
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    (%rdx,%rsi,1),%eax
add    %cl,%al
add    %r8b,%al
movzbl %al,%ebx
lea    0xed4(%rip),%rdi
mov    %ebx,%r9d
call   1030 <printf@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"%d %d %d %d: %d\0A\00"
define zeroext i8 @test_func_fn(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8 %0, i8* %5
store i8 %1, i8* %6
store i8 %2, i8* %7
store i8 %3, i8* %8
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = load i8, i8* %6
%13 = zext i8 %12 to i32
%14 = add nsw i32 %11, %13
%15 = load i8, i8* %7
%16 = zext i8 %15 to i32
%17 = add nsw i32 %14, %16
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = add nsw i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %9
%22 = load i8, i8* %5
%23 = load i8, i8* %6
%24 = load i8, i8* %7
%25 = load i8, i8* %8
%26 = load i8, i8* %9
%27 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 zeroext %22, i8 zeroext %23, i8 zeroext %24, i8 zeroext %25, i8 zeroext %26)
%28 = load i8, i8* %9
ret i8 %28
}

LLVM IR (-O2):
@.str = [17 x i8] c"%d %d %d %d: %d\0A\00"
define zeroext i8 @test_func_fn(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3) {
%5 = add i8 %1, %0
%6 = add i8 %5, %2
%7 = add i8 %6, %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8 zeroext %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8 zeroext %7)
ret i8 %7
}
/* Variables and functions */
int close_imb();
int termIPMI(void) { return (close_imb()); }


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

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

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

LLVM IR (-O2):
define i32 @termIPMI() {
%1 = tail call i32 (...) @close_imb()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main_menu() {
  printf("Hello :)\n\n");
  printf("Please select one of the following options:\n1) Change/view input "
         "file.\n2) Check the validity ofthe equations in the file.\n3) "
         "Transform valid equations to Postfix format.\n4) Calculate the "
         "result of valid equations (This is done through postfix format and "
         "using stacks).\n5) Save results of the program to another "
         "file.\n\n\tq) To quit the program.\n");
}


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"Hello :)\0A\0A\00"
@.str.1 = [344 x i8] c"Please select one of the following options:\0A1) Change/view input file.\0A2) Check the validity ofthe equations in the file.\0A3) Transform valid equations to Postfix format.\0A4) Calculate the result of valid equations (This is done through postfix format and using stacks).\0A5) Save results of the program to another file.\0A\0A\09q) To quit the program.\0A\00"
define void @main_menu() {
%1 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([344 x i8], [344 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [10 x i8] c"Hello :)\0A\00"
@str.2 = [343 x i8] c"Please select one of the following options:\0A1) Change/view input file.\0A2) Check the validity ofthe equations in the file.\0A3) Transform valid equations to Postfix format.\0A4) Calculate the result of valid equations (This is done through postfix format and using stacks).\0A5) Save results of the program to another file.\0A\0A\09q) To quit the program.\00"
define void @main_menu() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([343 x i8], [343 x i8]* @str.2, i64 0, i64 0))
ret void
}
void ff_hevc_put_hevc_bi_epel_h48_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h48_8_avx2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_str_not_equal_(char *, int, char *, char *);
void test_str_not_equal_pass() {
  assert_str_not_equal_("/scratch/repos/new/home/jordi_armengol_estape/"
                        "c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/"
                        "assertive/refs/heads/master/test/pass_test.c",
                        26, ("lorem"), ("ipsum"));
}


x86 assembly (clang, -O0):
<test_str_not_equal_pass>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1a,%esi
lea    0xf69(%rip),%rdx
lea    0xf68(%rip),%rcx
call   1030 <assert_str_not_equal_@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_str_not_equal_pass>:
lea    0xee9(%rip),%rdi
lea    0xf72(%rip),%rdx
lea    0xf71(%rip),%rcx
mov    $0x1a,%esi
jmp    1030 <assert_str_not_equal_@plt>

LLVM IR (-O0):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
@.str.1 = [6 x i8] c"lorem\00"
@.str.2 = [6 x i8] c"ipsum\00"
define void @test_str_not_equal_pass() {
%1 = call i32 @assert_str_not_equal_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [144 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/hughbien/assertive/refs/heads/master/test/pass_test.c\00"
@.str.1 = [6 x i8] c"lorem\00"
@.str.2 = [6 x i8] c"ipsum\00"
define void @test_str_not_equal_pass() {
%1 = tail call i32 @assert_str_not_equal_(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str, i64 0, i64 0), i32 26, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void syntax() {
  printf("SYNTAX: splitwiki num_split prefix\n");
  exit(0);
}


x86 assembly (clang, -O0):
<syntax>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<syntax>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [36 x i8] c"SYNTAX: splitwiki num_split prefix\0A\00"
define void @syntax() {
%1 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [35 x i8] c"SYNTAX: splitwiki num_split prefix\00"
define void @syntax() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
void finalize_frag() {}


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

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

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

LLVM IR (-O2):
define void @finalize_frag() {
ret void
}
/* Variables and functions */
int dcloadsyscall(int, int, char *, int);
int write(int file, char *ptr, int len) {
  if (*(unsigned int *)0x8c004004 == 0xdeadbeef)
    return dcloadsyscall(1, file, ptr, len);
  else
    return -1;
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x8c004004,%eax
cmpl   $0xdeadbeef,(%rax)
jne    114f <write+0x3f>
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    $0x1,%edi
call   1030 <dcloadsyscall@plt>
mov    %eax,-0x4(%rbp)
jmp    1156 <write+0x46>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
mov    $0x8c004004,%eax
cmpl   $0xdeadbeef,(%rax)
jne    112e <write+0x1e>
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <dcloadsyscall@plt>
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* inttoptr (i64 2348826628 to i32*)
%9 = icmp eq i32 %8, -559038737
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @dcloadsyscall(i32 1, i32 %11, i8* %12, i32 %13)
store i32 %14, i32* %4
br label %16
15: ; preds = %3
store i32 -1, i32* %4
br label %16
16: ; preds = %15, %10
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @write(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* inttoptr (i64 2348826628 to i32*)
%5 = icmp eq i32 %4, -559038737
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @dcloadsyscall(i32 1, i32 %0, i8* %1, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ -1, %3 ]
ret i32 %9
}
/* Variables and functions */
int LLI2C_output_clock(int);
int LLI2C_output_data(int /*<<< orphan*/);
int send_i2c_ack(void) {
  int err;
  err = LLI2C_output_data(0);
  if (err)
    return err;
  err = LLI2C_output_clock(1);
  if (err)
    return err;
  err = LLI2C_output_clock(0);
  if (err)
    return err;
  return 0;
}


x86 assembly (clang, -O0):
<send_i2c_ack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1030 <LLI2C_output_data@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1147 <send_i2c_ack+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118f <send_i2c_ack+0x6f>
mov    $0x1,%edi
call   1040 <LLI2C_output_clock@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1169 <send_i2c_ack+0x49>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118f <send_i2c_ack+0x6f>
xor    %edi,%edi
call   1040 <LLI2C_output_clock@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1188 <send_i2c_ack+0x68>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118f <send_i2c_ack+0x6f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_i2c_ack>:
push   %rax
xor    %edi,%edi
call   1030 <LLI2C_output_data@plt>
test   %eax,%eax
jne    113a <send_i2c_ack+0x1a>
mov    $0x1,%edi
call   1040 <LLI2C_output_clock@plt>
test   %eax,%eax
je     113c <send_i2c_ack+0x1c>
pop    %rcx
ret
xor    %edi,%edi
pop    %rax
jmp    1040 <LLI2C_output_clock@plt>

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

LLVM IR (-O2):
define i32 @send_i2c_ack() {
%1 = tail call i32 @LLI2C_output_data(i32 0)
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %8
3: ; preds = %0
%4 = tail call i32 @LLI2C_output_clock(i32 1)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @LLI2C_output_clock(i32 0)
br label %8
8: ; preds = %6, %3, %0
%9 = phi i32 [ %1, %0 ], [ %4, %3 ], [ %7, %6 ]
ret i32 %9
}
AR0IR1(r0, r1, x0, x1, p0, p1) float r0, r1;
float *p0, *p1;
{ (p0[10000000]) = (*p1); }


x86 assembly (clang, -O0):
<AR0IR1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm1,-0x30(%rbp)
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %edi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x20(%rbp),%rax
movss  %xmm0,0x2625a00(%rax)
02
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0IR1>:
movss  (%rcx),%xmm0
movss  %xmm0,0x2625a00(%rdx)
02
ret

LLVM IR (-O0):
define i32 @AR0IR1(double %0, double %1, i32 %2, i32 %3, float* %4, float* %5) {
%7 = alloca i32
%8 = alloca float
%9 = alloca float
%10 = alloca i32
%11 = alloca i32
%12 = alloca float*
%13 = alloca float*
%14 = fptrunc double %0 to float
%15 = fptrunc double %1 to float
store float %14, float* %8
store float %15, float* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store float* %4, float** %12
store float* %5, float** %13
%16 = load float*, float** %13
%17 = load float, float* %16
%18 = load float*, float** %12
%19 = getelementptr inbounds float, float* %18, i64 10000000
store float %17, float* %19
%20 = load i32, i32* %7
ret i32 %20
}

LLVM IR (-O2):
define i32 @AR0IR1(double %0, double %1, i32 %2, i32 %3, float* nocapture writeonly %4, float* nocapture %5) {
%7 = load float, float* %5
%8 = getelementptr inbounds float, float* %4, i64 10000000
store float %7, float* %8
ret i32 undef
}
unsigned int CharClass_IsLower(char ch) {
  return (ch >= 'a') && (ch <= 'z');
  __builtin_unreachable();
}


x86 assembly (clang, -O0):
<CharClass_IsLower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <CharClass_IsLower+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharClass_IsLower>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @CharClass_IsLower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @CharClass_IsLower(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}