xunge/DecIR huggingface dataset:
/* Variables and functions */
size_t strlen(const char *string) {
  const char *start = string;
  if (string) {
    while (*string)
      string++;
  }
  return string - start;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1143 <strlen+0x43>
jmp    1120 <strlen+0x20>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113e <strlen+0x3e>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <strlen+0x20>
jmp    1143 <strlen+0x43>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
test   %rdi,%rdi
je     1121 <strlen+0x21>
lea    -0x1(%rdi),%rcx
nopl   0x0(%rax)
lea    0x1(%rcx),%rax
cmpb   $0x0,0x1(%rcx)
mov    %rax,%rcx
jne    1110 <strlen+0x10>
sub    %rdi,%rax
ret
xor    %eax,%eax
sub    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i8* [ %7, %3 ], [ %0, %1 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %1
%9 = phi i8* [ null, %1 ], [ %4, %3 ]
%10 = ptrtoint i8* %9 to i64
%11 = ptrtoint i8* %0 to i64
%12 = sub i64 %10, %11
ret i64 %12
}
/* Variables and functions */
int foo();
int mod1_bar(void) { return foo(); }


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

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

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

LLVM IR (-O2):
define i32 @mod1_bar() {
%1 = tail call i32 (...) @foo()
ret i32 %1
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ red_mask;
};
typedef TYPE_1__ XVisualInfo;

/* Variables and functions */
unsigned long get_XVisualInfo_red_mask(void *_p) {
  return (unsigned long)((XVisualInfo *)_p)->red_mask;
}


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

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

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

LLVM IR (-O2):
define i64 @get_XVisualInfo_red_mask(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello() { printf("Hello Clever FFI Module!\n"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Hello Clever FFI Module!\0A\00"
define void @hello() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"Hello Clever FFI Module!\00"
define void @hello() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ libfunc();
int main(void) {
  libfunc();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <libfunc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @libfunc()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @libfunc()
ret i32 0
}
/* Variables and functions */
int doubleToRawLongBits(double);
__attribute__((always_)) const int ilogbk(double d) {
  int m = d < 4.9090934652977266E-91;
  d = m ? 2.037035976334486E90 * d : d;
  int q = (doubleToRawLongBits(d) >> 52) & 0x7ff;
  q = m ? q - (300 + 0x03ff) : q - 0x03ff;
  return q;
}


x86 assembly (clang, -O0):
<ilogbk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1156 <ilogbk+0x46>
movsd  0xec1(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1160 <ilogbk+0x50>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <doubleToRawLongBits@plt>
mov    $0x34,%ecx
sar    %cl,%eax
and    $0x7ff,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     119d <ilogbk+0x8d>
mov    -0x10(%rbp),%eax
sub    $0x52b,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a8 <ilogbk+0x98>
mov    -0x10(%rbp),%eax
sub    $0x3ff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ilogbk>:
movsd  0xee8(%rip),%xmm2
movapd %xmm0,%xmm1
cmpltsd 0xee3(%rip),%xmm1
mulsd  %xmm0,%xmm2
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
jmp    1030 <doubleToRawLongBits@plt>

LLVM IR (-O0):
define i32 @ilogbk(double %0) {
%2 = alloca double
%3 = alloca i32
%4 = alloca i32
store double %0, double* %2
%5 = load double, double* %2
%6 = fcmp olt double %5, 0x2D30000000000000
%7 = zext i1 %6 to i32
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load double, double* %2
%12 = fmul double 0x52B0000000000000, %11
br label %15
13: ; preds = %1
%14 = load double, double* %2
br label %15
15: ; preds = %13, %10
%16 = phi double [ %12, %10 ], [ %14, %13 ]
store double %16, double* %2
%17 = load double, double* %2
%18 = call i32 @doubleToRawLongBits(double %17)
%19 = ashr i32 %18, 52
%20 = and i32 %19, 2047
store i32 %20, i32* %4
%21 = load i32, i32* %3
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %15
%24 = load i32, i32* %4
%25 = sub nsw i32 %24, 1323
br label %29
26: ; preds = %15
%27 = load i32, i32* %4
%28 = sub nsw i32 %27, 1023
br label %29
29: ; preds = %26, %23
%30 = phi i32 [ %25, %23 ], [ %28, %26 ]
store i32 %30, i32* %4
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @ilogbk(double %0) {
%2 = fcmp olt double %0, 0x2D30000000000000
%3 = fmul double %0, 0x52B0000000000000
%4 = select i1 %2, double %3, double %0
%5 = tail call i32 @doubleToRawLongBits(double %4)
ret i32 poison
}
/* Variables and functions */
int /*<<< orphan*/ DMTimerCounterSet(int, int);
int /*<<< orphan*/ DMTimerDisable(int);
int /*<<< orphan*/ DMTimerEnable(int);
int /*<<< orphan*/ DMTimerModeConfigure(int, int);
int /*<<< orphan*/ DMTimerPreScalerClkEnable(int, int);
int /*<<< orphan*/ DMTimerReloadSet(int, int);
void dbg_tmr_reset(void) {
  DMTimerDisable((0x48040000));
  DMTimerCounterSet((0x48040000), 0x0);
  DMTimerReloadSet((0x48040000), 0x0);
  DMTimerModeConfigure((0x48040000), ((0x00000002u)));
  DMTimerPreScalerClkEnable((0x48040000),
                            ((2 << (0x00000002u)) | (0x00000020u)));
  DMTimerEnable((0x48040000));
}


x86 assembly (clang, -O0):
<dbg_tmr_reset>:
push   %rbp
mov    %rsp,%rbp
mov    $0x48040000,%edi
call   1030 <DMTimerDisable@plt>
mov    $0x48040000,%edi
xor    %esi,%esi
call   1070 <DMTimerCounterSet@plt>
mov    $0x48040000,%edi
xor    %esi,%esi
call   1040 <DMTimerReloadSet@plt>
mov    $0x48040000,%edi
mov    $0x2,%esi
call   1060 <DMTimerModeConfigure@plt>
mov    $0x48040000,%edi
mov    $0x28,%esi
call   1050 <DMTimerPreScalerClkEnable@plt>
mov    $0x48040000,%edi
call   1080 <DMTimerEnable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbg_tmr_reset>:
push   %rax
mov    $0x48040000,%edi
call   1030 <DMTimerDisable@plt>
mov    $0x48040000,%edi
xor    %esi,%esi
call   1070 <DMTimerCounterSet@plt>
mov    $0x48040000,%edi
xor    %esi,%esi
call   1040 <DMTimerReloadSet@plt>
mov    $0x48040000,%edi
mov    $0x2,%esi
call   1060 <DMTimerModeConfigure@plt>
mov    $0x48040000,%edi
mov    $0x28,%esi
call   1050 <DMTimerPreScalerClkEnable@plt>
mov    $0x48040000,%edi
pop    %rax
jmp    1080 <DMTimerEnable@plt>

LLVM IR (-O0):
define void @dbg_tmr_reset() {
%1 = call i32 @DMTimerDisable(i32 1208221696)
%2 = call i32 @DMTimerCounterSet(i32 1208221696, i32 0)
%3 = call i32 @DMTimerReloadSet(i32 1208221696, i32 0)
%4 = call i32 @DMTimerModeConfigure(i32 1208221696, i32 2)
%5 = call i32 @DMTimerPreScalerClkEnable(i32 1208221696, i32 40)
%6 = call i32 @DMTimerEnable(i32 1208221696)
ret void
}

LLVM IR (-O2):
define void @dbg_tmr_reset() {
%1 = tail call i32 @DMTimerDisable(i32 1208221696)
%2 = tail call i32 @DMTimerCounterSet(i32 1208221696, i32 0)
%3 = tail call i32 @DMTimerReloadSet(i32 1208221696, i32 0)
%4 = tail call i32 @DMTimerModeConfigure(i32 1208221696, i32 2)
%5 = tail call i32 @DMTimerPreScalerClkEnable(i32 1208221696, i32 40)
%6 = tail call i32 @DMTimerEnable(i32 1208221696)
ret void
}
/* Variables and functions */
int bar(int, int, int, int);
int main() {
  int ret;
  ret = bar(1, 2, 3, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <bar@plt>
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bar(i32 1, i32 2, i32 3, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ A_STANDOUT;
int /*<<< orphan*/ attroff(int /*<<< orphan*/);
int /*<<< orphan*/ attron(int /*<<< orphan*/);
int /*<<< orphan*/ fillLine(char *, int);
void renderTopPanel(int scrx) {
  attron(A_STANDOUT);
  fillLine("Folder Curses v. 1.0.0", scrx);
  attroff(A_STANDOUT);
}


x86 assembly (clang, -O0):
<renderTopPanel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1040 <attron@plt>
mov    -0x4(%rbp),%esi
lea    0xead(%rip),%rdi
call   1050 <fillLine@plt>
mov    0x2e81(%rip),%rax
mov    (%rax),%edi
call   1030 <attroff@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<renderTopPanel>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ea3(%rip),%r14
mov    (%r14),%edi
call   1040 <attron@plt>
lea    0xeb4(%rip),%rdi
mov    %ebx,%esi
call   1050 <fillLine@plt>
mov    (%r14),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <attroff@plt>

LLVM IR (-O0):
@A_STANDOUT = global i32 0
@.str = [23 x i8] c"Folder Curses v. 1.0.0\00"
define void @renderTopPanel(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @A_STANDOUT
%4 = call i32 @attron(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @fillLine(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @A_STANDOUT
%8 = call i32 @attroff(i32 %7)
ret void
}

LLVM IR (-O2):
@A_STANDOUT = global i32 0
@.str = [23 x i8] c"Folder Curses v. 1.0.0\00"
define void @renderTopPanel(i32 %0) {
%2 = load i32, i32* @A_STANDOUT
%3 = tail call i32 @attron(i32 %2)
%4 = tail call i32 @fillLine(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = load i32, i32* @A_STANDOUT
%6 = tail call i32 @attroff(i32 %5)
ret void
}
int cpu_map__id_to_cpu(int id) { return id & 0xffff; }


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

x86 assembly (clang, -O2):
<cpu_map__id_to_cpu>:
movzwl %di,%eax
ret

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

LLVM IR (-O2):
define i32 @cpu_map__id_to_cpu(i32 %0) {
%2 = and i32 %0, 65535
ret i32 %2
}
void X509_NAME_get_text_by_OBJ(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_NAME_get_text_by_OBJ() {
ret void
}
void vfoo32(unsigned int *a) {
  int i = 0;
  for (i = 0; i < 128; ++i)
    a[i] = __builtin_bswap32(a[i]);
}


x86 assembly (clang, -O0):
<vfoo32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x80,-0xc(%rbp)
jge    1149 <vfoo32+0x49>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
bswap  %edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <vfoo32+0x16>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vfoo32>:
xor    %eax,%eax
pxor   %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
movdqu (%rdi,%rax,4),%xmm1
movdqu 0x10(%rdi,%rax,4),%xmm2
movdqa %xmm1,%xmm3
punpckhbw %xmm0,%xmm3
pshuflw $0x1b,%xmm3,%xmm3
pshufhw $0x1b,%xmm3,%xmm3
punpcklbw %xmm0,%xmm1
pshuflw $0x1b,%xmm1,%xmm1
pshufhw $0x1b,%xmm1,%xmm1
packuswb %xmm3,%xmm1
movdqa %xmm2,%xmm3
punpckhbw %xmm0,%xmm3
pshuflw $0x1b,%xmm3,%xmm3
pshufhw $0x1b,%xmm3,%xmm3
punpcklbw %xmm0,%xmm2
pshuflw $0x1b,%xmm2,%xmm2
pshufhw $0x1b,%xmm2,%xmm2
packuswb %xmm3,%xmm2
movdqu %xmm1,(%rdi,%rax,4)
movdqu %xmm2,0x10(%rdi,%rax,4)
add    $0x8,%rax
cmp    $0x80,%rax
jne    1110 <vfoo32+0x10>
ret

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

LLVM IR (-O2):
define void @vfoo32(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %14, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = bitcast i32* %4 to <4 x i32>*
%6 = load <4 x i32>, <4 x i32>* %5
%7 = getelementptr inbounds i32, i32* %4, i64 4
%8 = bitcast i32* %7 to <4 x i32>*
%9 = load <4 x i32>, <4 x i32>* %8
%10 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %6)
%11 = call <4 x i32> @llvm.bswap.v4i32(<4 x i32> %9)
%12 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %12
%13 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %13
%14 = add nuw i64 %3, 8
%15 = icmp eq i64 %14, 128
br i1 %15, label %16, label %2
16: ; preds = %2
ret void
}
/* Variables and functions */
int f420(int *);
int f421(int *p) { return f420(p); }


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

x86 assembly (clang, -O2):
<f421>:
jmp    1030 <f420@plt>

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

LLVM IR (-O2):
define i32 @f421(i32* %0) {
%2 = tail call i32 @f420(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int /*<<< orphan*/ basename(char const *);
char *strrchr(char *, char);
char *utils_strdup(int /*<<< orphan*/);
char *_file_info_name_without_extension(const char *filename) {
  assert(filename != NULL);
  char *name = utils_strdup(basename(filename));
  char *ptr = strrchr(name, '.');
  if (ptr) {
    *ptr = '\0';
  }
  return name;
}


x86 assembly (clang, -O0):
<_file_info_name_without_extension>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1060 <basename@plt>
mov    %eax,%edi
call   1030 <utils_strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1196 <_file_info_name_without_extension+0x56>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_file_info_name_without_extension>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1050 <assert@plt>
mov    %rbx,%rdi
call   1060 <basename@plt>
mov    %eax,%edi
call   1030 <utils_strdup@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x2e,%esi
call   1040 <strrchr@plt>
test   %rax,%rax
je     1179 <_file_info_name_without_extension+0x39>
movb   $0x0,(%rax)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @_file_info_name_without_extension(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = icmp ne i8* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %2
%10 = call i32 @basename(i8* %9)
%11 = call i8* @utils_strdup(i32 %10)
store i8* %11, i8** %3
%12 = load i8*, i8** %3
%13 = call i8* @strrchr(i8* %12, i8 signext 46)
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %18
16: ; preds = %1
%17 = load i8*, i8** %4
store i8 0, i8* %17
br label %18
18: ; preds = %16, %1
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
define i8* @_file_info_name_without_extension(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = tail call i32 @basename(i8* %0)
%6 = tail call i8* @utils_strdup(i32 %5)
%7 = tail call i8* @strrchr(i8* dereferenceable(1) %6, i8 signext 46)
%8 = icmp eq i8* %7, null
br i1 %8, label %10, label %9
9: ; preds = %1
store i8 0, i8* %7
br label %10
10: ; preds = %9, %1
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ wNotYet(char *);
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasQuickSort() {
  wNotYet("QuickSort");
  wPushNumber(0);
}


x86 assembly (clang, -O0):
<wBasQuickSort>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <wNotYet@plt>
xor    %edi,%edi
call   1030 <wPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasQuickSort>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <wNotYet@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"QuickSort\00"
define void @wBasQuickSort() {
%1 = call i32 @wNotYet(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @wPushNumber(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"QuickSort\00"
define void @wBasQuickSort() {
%1 = tail call i32 @wNotYet(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @wPushNumber(i32 0)
ret void
}
void problem1() {}


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

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

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

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


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @J400ToARGB() {
ret void
}
int fun255() { return 255; }


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

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

LLVM IR (-O0):
define i32 @fun255() {
ret i32 255
}

LLVM IR (-O2):
define i32 @fun255() {
ret i32 255
}
/* Variables and functions */
int /*<<< orphan*/ ReportCharCtrl(int, char const);
__attribute__((visibility("hidden"))) void
ReportStringCtrl(int level, const char *string) {
  while (*string) {
    ReportCharCtrl(level, *string);
    string++;
  }
}


x86 assembly (clang, -O0):
<ReportStringCtrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     114c <ReportStringCtrl+0x3c>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <ReportCharCtrl@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111f <ReportStringCtrl+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReportStringCtrl>:
push   %rbp
push   %rbx
push   %rax
mov    (%rsi),%al
test   %al,%al
je     1145 <ReportStringCtrl+0x35>
mov    %rsi,%rbx
mov    %edi,%ebp
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%esi
mov    %ebp,%edi
call   1030 <ReportCharCtrl@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <ReportStringCtrl+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define hidden void @ReportStringCtrl(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
br label %5
5: ; preds = %9, %2
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = icmp ne i8 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load i32, i32* %3
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = call i32 @ReportCharCtrl(i32 %10, i8 signext %12)
%14 = load i8*, i8** %4
%15 = getelementptr inbounds i8, i8* %14, i32 1
store i8* %15, i8** %4
br label %5
16: ; preds = %5
ret void
}

LLVM IR (-O2):
define hidden void @ReportStringCtrl(i32 %0, i8* nocapture %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %1, %2 ]
%8 = tail call i32 @ReportCharCtrl(i32 %0, i8 signext %6)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Variables and functions */
char *getenv(char *);
const char *lmc_namespace_root_path() {
  const char *ep = getenv("LMC_NAMESPACES_ROOT_PATH");
  if (ep) {
    return ep;
  }
  return "/var/tmp/localmemcache";
}


x86 assembly (clang, -O0):
<lmc_namespace_root_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <lmc_namespace_root_path+0x30>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    114b <lmc_namespace_root_path+0x3b>
lea    0xed2(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lmc_namespace_root_path>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xef2(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"LMC_NAMESPACES_ROOT_PATH\00"
@.str.1 = [23 x i8] c"/var/tmp/localmemcache\00"
define i8* @lmc_namespace_root_path() {
%1 = alloca i8*
%2 = alloca i8*
%3 = call i8* @getenv(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = load i8*, i8** %2
store i8* %7, i8** %1
br label %9
8: ; preds = %0
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %9
9: ; preds = %8, %6
%10 = load i8*, i8** %1
ret i8* %10
}

LLVM IR (-O2):
@.str = [25 x i8] c"LMC_NAMESPACES_ROOT_PATH\00"
@.str.1 = [23 x i8] c"/var/tmp/localmemcache\00"
define i8* @lmc_namespace_root_path() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
void strcpy1(char *s, char *t) {
  int i;
  i = 0;
  while ((s[i] = t[i]) != '\0')
    i++;
}


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

x86 assembly (clang, -O2):
<strcpy1>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rsi,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <strcpy1+0x10>
ret

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int);
void write_pid_and_port_literal(int portno, char *filename) {
  FILE *pfile;
  pfile = fopen(filename, "w");
  fprintf(pfile, "%d\n", portno);
  fclose(pfile);
}


x86 assembly (clang, -O0):
<write_pid_and_port_literal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb6(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xea1(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_pid_and_port_literal>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rax
mov    %edi,%ebp
lea    0xec1(%rip),%rsi
mov    %rax,%rdi
call   1050 <fopen@plt>
mov    %rax,%rbx
lea    0xeb1(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @write_pid_and_port_literal(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32* @fopen(i8* %6, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %3
%10 = call i32 @fprintf(i32* %8, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
%11 = load i32*, i32** %5
%12 = call i32 @fclose(i32* %11)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define void @write_pid_and_port_literal(i32 %0, i8* nocapture %1) {
%3 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%5 = tail call i32 @fclose(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, char const *);
scalar_t__ system(char *);
bool wd_check(const char *progname) {
  char command[1024];
  snprintf(command, 1024, "pidof %s", progname);
  return system(command) == 0;
}


x86 assembly (clang, -O0):
<wd_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x400,%esi
lea    0xeba(%rip),%rdx
call   1040 <snprintf@plt>
lea    -0x410(%rbp),%rdi
call   1030 <system@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wd_check>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rcx
lea    0xece(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1040 <snprintf@plt>
mov    %rbx,%rdi
call   1030 <system@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"pidof %s\00"
define i32 @wd_check(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 1024, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i64 @system(i8* %7)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
@.str = [9 x i8] c"pidof %s\00"
define i32 @wd_check(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 1024, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = call i64 @system(i8* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
scalar_t__ is_prime(int);
int nth_prime(int n) {
  if (n <= 1)
    return 2;
  int p = 1;
  while (n > 0) {
    p++;
    if (is_prime(p))
      n--;
  }
  return p;
}


x86 assembly (clang, -O0):
<nth_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jg     1131 <nth_prime+0x21>
movl   $0x2,-0x4(%rbp)
jmp    1171 <nth_prime+0x61>
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    116b <nth_prime+0x5b>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <is_prime@plt>
cmp    $0x0,%rax
je     1166 <nth_prime+0x56>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1138 <nth_prime+0x28>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nth_prime>:
push   %rbp
push   %rbx
push   %rax
mov    $0x2,%ebp
cmp    $0x2,%edi
jl     1146 <nth_prime+0x36>
mov    %edi,%ebx
mov    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x1,%ebp
mov    %ebp,%edi
call   1030 <is_prime@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
sub    %ecx,%ebx
jne    1130 <nth_prime+0x20>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @nth_prime(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %12, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 1, %1 ]
%5 = phi i32 [ %10, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = tail call i64 @is_prime(i32 %6)
%8 = icmp ne i64 %7, 0
%9 = sext i1 %8 to i32
%10 = add nsw i32 %5, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %3
12: ; preds = %3, %1
%13 = phi i32 [ 2, %1 ], [ %6, %3 ]
ret i32 %13
}
void ff_hevc_put_hevc_epel_v48_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v48_10_avx2() {
ret void
}
int minKey(int key[]) {
  int min_index, v, min;
  for (v = 0; v < 2; v++)
    if (key[v] < min)
      min = min_index = v;
  return min_index;
}


x86 assembly (clang, -O0):
<minKey>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    1149 <minKey+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x14(%rbp),%eax
jge    1136 <minKey+0x36>
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x14(%rbp)
jmp    113b <minKey+0x3b>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    110f <minKey+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @minKey(i32* nocapture %0) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ Show_library(int /*<<< orphan*/);
int /*<<< orphan*/ triList(int);
void IF_show_libmath(void) { Show_library(triList(2)); }


x86 assembly (clang, -O0):
<IF_show_libmath>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1040 <triList@plt>
mov    %eax,%edi
call   1030 <Show_library@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_show_libmath>:
push   %rax
mov    $0x2,%edi
call   1040 <triList@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <Show_library@plt>

LLVM IR (-O0):
define void @IF_show_libmath() {
%1 = call i32 @triList(i32 2)
%2 = call i32 @Show_library(i32 %1)
ret void
}

LLVM IR (-O2):
define void @IF_show_libmath() {
%1 = tail call i32 @triList(i32 2)
%2 = tail call i32 @Show_library(i32 %1)
ret void
}
/* Variables and functions */
int syscall(int, int *);
int pipe(int fd[2]) { return syscall(42, fd); }


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

x86 assembly (clang, -O2):
<pipe>:
mov    %rdi,%rsi
mov    $0x2a,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @pipe(i32* %0) {
%2 = tail call i32 @syscall(i32 42, i32* %0)
ret i32 %2
}
/* Variables and functions */
int sstrappend(char *, size_t *, size_t, char const *);
int sstrappendch(char str[], size_t *len, size_t size, char c) {
  const char suffix[] = {c, '\0'};
  return sstrappend(str, len, size, suffix);
}


x86 assembly (clang, -O0):
<sstrappendch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
mov    %al,-0x1b(%rbp)
movb   $0x0,-0x1a(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x1b(%rbp),%rcx
call   1030 <sstrappend@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sstrappendch>:
push   %rax
mov    %cl,0x6(%rsp)
movb   $0x0,0x7(%rsp)
lea    0x6(%rsp),%rcx
call   1030 <sstrappend@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @sstrappendch(i8* %0, i64* %1, i64 %2, i8 signext %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i64
%8 = alloca i8
%9 = alloca [2 x i8]
store i8* %0, i8** %5
store i64* %1, i64** %6
store i64 %2, i64* %7
store i8 %3, i8* %8
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%11 = load i8, i8* %8
store i8 %11, i8* %10
%12 = getelementptr inbounds i8, i8* %10, i64 1
store i8 0, i8* %12
%13 = load i8*, i8** %5
%14 = load i64*, i64** %6
%15 = load i64, i64* %7
%16 = getelementptr inbounds [2 x i8], [2 x i8]* %9, i64 0, i64 0
%17 = call i32 @sstrappend(i8* %13, i64* %14, i64 %15, i8* %16)
ret i32 %17
}

LLVM IR (-O2):
define i32 @sstrappendch(i8* %0, i64* %1, i64 %2, i8 signext %3) {
%5 = alloca [2 x i8]
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %3, i8* %6
%7 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 0, i8* %7
%8 = call i32 @sstrappend(i8* %0, i64* %1, i64 %2, i8* %6)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int uint16_t;

/* Variables and functions */
scalar_t__ get8(int /*<<< orphan*/ **);
uint16_t get16(uint8_t **ppv) {
  uint16_t w;
  w = (((uint16_t)get8(ppv)) << 8) | (uint16_t)get8(ppv);
  return w;
}


x86 assembly (clang, -O0):
<get16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get8@plt>
shl    $0x8,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <get8@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%eax
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get16>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <get8@plt>
mov    %rax,%rbx
shl    $0x8,%ebx
mov    %r14,%rdi
call   1030 <get8@plt>
or     %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @get16(i32** %0) {
%2 = alloca i32**
%3 = alloca i32
store i32** %0, i32*** %2
%4 = load i32**, i32*** %2
%5 = call i64 @get8(i32** %4)
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i32**, i32*** %2
%9 = call i64 @get8(i32** %8)
%10 = trunc i64 %9 to i32
%11 = or i32 %7, %10
store i32 %11, i32* %3
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @get16(i32** %0) {
%2 = tail call i64 @get8(i32** %0)
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 8
%5 = tail call i64 @get8(i32** %0)
%6 = trunc i64 %5 to i32
%7 = or i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void uip_log(char *msg) { printf("uip: %s\n", msg); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"uip: %s\0A\00"
define void @uip_log(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ omp_nest_lock_t;

/* Variables and functions */
void c_pomp_unset_nest_lock_(omp_nest_lock_t *s) { (void)0; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int /*<<< orphan*/ waitpid(int, int *, int /*<<< orphan*/);
void sig_chld(int signo) {
  pid_t pid;
  int status;
  while ((pid = waitpid(-1, &status, WNOHANG)) > 0)
    ;
  return;
}


x86 assembly (clang, -O0):
<sig_chld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
lea    -0xc(%rbp),%rsi
call   1030 <waitpid@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1143 <sig_chld+0x33>
jmp    111b <sig_chld+0xb>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_chld>:
push   %r14
push   %rbx
push   %rax
mov    0x2ecd(%rip),%r14
lea    0x4(%rsp),%rbx
mov    (%r14),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1030 <waitpid@plt>
test   %eax,%eax
jg     1120 <sig_chld+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@WNOHANG = global i32 0
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i32 @waitpid(i32 -1, i32* %4, i32 %6)
store i32 %7, i32* %3
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
ret void
}

LLVM IR (-O2):
@WNOHANG = global i32 0
define void @sig_chld(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
br label %4
4: ; preds = %4, %1
%5 = load i32, i32* @WNOHANG
%6 = call i32 @waitpid(i32 -1, i32* %2, i32 %5)
%7 = icmp sgt i32 %6, 0
br i1 %7, label %4, label %8
8: ; preds = %4
ret void
}
/* Variables and functions */
float atof(char *);
int /*<<< orphan*/ cutItem(char *, char *, char, int);
float cutItemToFloat(char *in, char sep, int num) {
  char tmp[512];
  cutItem(in, tmp, sep, num);
  return atof(tmp);
}


x86 assembly (clang, -O0):
<cutItemToFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x210(%rbp),%rsi
mov    -0x9(%rbp),%al
mov    -0x10(%rbp),%ecx
movsbl %al,%edx
call   1040 <cutItem@plt>
lea    -0x210(%rbp),%rdi
call   1030 <atof@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cutItemToFloat>:
push   %rbx
sub    $0x200,%rsp
mov    %edx,%ecx
mov    %esi,%edx
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <cutItem@plt>
mov    %rbx,%rdi
call   1030 <atof@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define float @cutItemToFloat(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i32
%7 = alloca [512 x i8]
store i8* %0, i8** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%10 = load i8, i8* %5
%11 = load i32, i32* %6
%12 = call i32 @cutItem(i8* %8, i8* %9, i8 signext %10, i32 %11)
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%14 = call float @atof(i8* %13)
ret float %14
}

LLVM IR (-O2):
define float @cutItemToFloat(i8* %0, i8 signext %1, i32 %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i32 @cutItem(i8* %0, i8* %5, i8 signext %1, i32 %2)
%7 = call float @atof(i8* %5)
ret float %7
}
int iscntrl(int c) { return (c <= 31 || c == 127); }


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x1f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1120 <iscntrl+0x20>
cmpl   $0x7f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
cmp    $0x20,%edi
setl   %al
cmp    $0x7f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @iscntrl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 31
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 127
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ true, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp slt i32 %0, 32
%3 = icmp eq i32 %0, 127
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ step_hash(int);
int *func_56(int *p_57) {
  step_hash(13);
  return p_57;
}


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

x86 assembly (clang, -O2):
<func_56>:
push   %rbx
mov    %rdi,%rbx
mov    $0xd,%edi
call   1030 <step_hash@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32* @func_56(i32* readnone returned %0) {
%2 = tail call i32 @step_hash(i32 13)
ret i32* %0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_write_standard_Laurent_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(121, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_write_standard_Laurent_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x79,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @syscon_write_standard_Laurent_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 121, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @syscon_write_standard_Laurent_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 121, i32* undef, i32* undef, double* undef)
ret i32 %1
}