xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char *);
void welcome(void) {
  ft_putstr("Welcome to ");
  ft_putstr("\033[1;32m");
  ft_putstr("msh");
  ft_putstr("\033[0m");
  ft_putstr(", the friendly interactive shell !\n");
}


x86 assembly (clang, -O0):
<welcome>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <ft_putstr@plt>
lea    0xee5(%rip),%rdi
call   1030 <ft_putstr@plt>
lea    0xee1(%rip),%rdi
call   1030 <ft_putstr@plt>
lea    0xed9(%rip),%rdi
call   1030 <ft_putstr@plt>
lea    0xed2(%rip),%rdi
call   1030 <ft_putstr@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<welcome>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <ft_putstr@plt>
lea    0xee8(%rip),%rdi
call   1030 <ft_putstr@plt>
lea    0xee4(%rip),%rdi
call   1030 <ft_putstr@plt>
lea    0xedc(%rip),%rdi
call   1030 <ft_putstr@plt>
lea    0xed5(%rip),%rdi
pop    %rax
jmp    1030 <ft_putstr@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Welcome to \00"
@.str.1 = [8 x i8] c"\1B[1;32m\00"
@.str.2 = [4 x i8] c"msh\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.4 = [36 x i8] c", the friendly interactive shell !\0A\00"
define void @welcome() {
%1 = call i32 @ft_putstr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @ft_putstr(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Welcome to \00"
@.str.1 = [8 x i8] c"\1B[1;32m\00"
@.str.2 = [4 x i8] c"msh\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.4 = [36 x i8] c", the friendly interactive shell !\0A\00"
define void @welcome() {
%1 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
void *_Addresses_Add_offset(void *base, size_t offset) {
  return (base + offset);
}


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

x86 assembly (clang, -O2):
<_Addresses_Add_offset>:
lea    (%rdi,%rsi,1),%rax
ret

LLVM IR (-O0):
define i8* @_Addresses_Add_offset(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = getelementptr i8, i8* %5, i64 %6
ret i8* %7
}

LLVM IR (-O2):
define i8* @_Addresses_Add_offset(i8* readnone %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 %1
ret i8* %3
}
double leaky_activate(const double x) { return (x > 0) ? x : .1 * x; }


x86 assembly (clang, -O0):
<leaky_activate>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    112a <leaky_activate+0x2a>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    113c <leaky_activate+0x3c>
movsd  0xece(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<leaky_activate>:
movsd  0xef8(%rip),%xmm1
mulsd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
cmpltsd %xmm0,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @leaky_activate(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load double, double* %2
br label %10
7: ; preds = %1
%8 = load double, double* %2
%9 = fmul double 1.000000e-01, %8
br label %10
10: ; preds = %7, %5
%11 = phi double [ %6, %5 ], [ %9, %7 ]
ret double %11
}

LLVM IR (-O2):
define double @leaky_activate(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = fmul double %0, 1.000000e-01
%4 = select i1 %2, double %0, double %3
ret double %4
}
float __attribute__((target("arch=haswell"))) foo(float x, float y) {
  return x * y;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
vmovss %xmm0,-0x4(%rbp)
vmovss %xmm1,-0x8(%rbp)
vmovss -0x4(%rbp),%xmm0
vmulss -0x8(%rbp),%xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
vmulss %xmm1,%xmm0,%xmm0
ret

LLVM IR (-O0):
define float @foo(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fmul float %5, %6
ret float %7
}

LLVM IR (-O2):
define float @foo(float %0, float %1) {
%3 = fmul float %0, %1
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ orgfx_wait(int);
void orgfx_set_colors(unsigned int color0, unsigned int color1,
                      unsigned int color2) {
  orgfx_wait(3);
  *((volatile unsigned int *)((0xB8000000 + 0x84))) = color0;
  *((volatile unsigned int *)((0xB8000000 + 0x88))) = color1;
  *((volatile unsigned int *)((0xB8000000 + 0x8c))) = color2;
}


x86 assembly (clang, -O0):
<orgfx_set_colors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x3,%edi
call   1030 <orgfx_wait@plt>
mov    -0x4(%rbp),%ecx
mov    $0xb8000084,%eax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%ecx
mov    $0xb8000088,%eax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
mov    $0xb800008c,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orgfx_set_colors>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x3,%edi
call   1030 <orgfx_wait@plt>
mov    $0xb8000084,%eax
mov    %ebx,(%rax)
mov    %ebp,0x4(%rax)
mov    %r14d,0x8(%rax)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @orgfx_set_colors(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = call i32 @orgfx_wait(i32 3)
%8 = load i32, i32* %4
store volatile i32 %8, i32* inttoptr (i64 3087007876 to i32*)
%9 = load i32, i32* %5
store volatile i32 %9, i32* inttoptr (i64 3087007880 to i32*)
%10 = load i32, i32* %6
store volatile i32 %10, i32* inttoptr (i64 3087007884 to i32*)
ret void
}

LLVM IR (-O2):
define void @orgfx_set_colors(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @orgfx_wait(i32 3)
store volatile i32 %0, i32* inttoptr (i64 3087007876 to i32*)
store volatile i32 %1, i32* inttoptr (i64 3087007880 to i32*)
store volatile i32 %2, i32* inttoptr (i64 3087007884 to i32*)
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
unsigned __VERIFIER_nondet_unsigned() {
  unsigned initialValue;
  int byteOffset = 0;
  uint8_t *initialValueAsByte = (uint8_t *)&initialValue;
  for (; byteOffset < sizeof(unsigned); ++byteOffset) {
    initialValueAsByte[byteOffset] = 0;
  }
  return initialValue;
}


x86 assembly (clang, -O0):
<__VERIFIER_nondet_unsigned>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
movslq -0x8(%rbp),%rax
cmp    $0x4,%rax
jae    113f <__VERIFIER_nondet_unsigned+0x3f>
mov    -0x10(%rbp),%rax
movslq -0x8(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1113 <__VERIFIER_nondet_unsigned+0x13>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__VERIFIER_nondet_unsigned() {
ret i32 undef
}
/* Variables and functions */
void *malloc(size_t);
void *memset(void *, int, size_t);
int /*<<< orphan*/ oom_killer();
void *xmalloc(size_t s) {
  void *ptr = malloc(s);
  if (!ptr)
    oom_killer();
  return memset(ptr, 0x00, s);
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115b <xmalloc+0x2b>
mov    $0x0,%al
call   1050 <oom_killer@plt>
mov    -0x10(%rbp),%rdi
mov    %rdi,-0x18(%rbp)
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113d <xmalloc+0x1d>
xor    %eax,%eax
call   1040 <oom_killer@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xmalloc(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 %10, label %8
8: ; preds = %1
%9 = call i32 (...) @oom_killer()
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
%12 = load i64, i64* %2
ret i8* %11
}

LLVM IR (-O2):
define noalias i8* @xmalloc(i64 %0) {
%2 = call i8* @calloc(i64 1, i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @oom_killer()
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int default_compkey(const void *k1, const void *k2) {
  if ((size_t)k1 < (size_t)k2)
    return -1;
  else if ((size_t)k1 == (size_t)k2)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<default_compkey>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    %rcx,%rax
jae    1129 <default_compkey+0x29>
movl   $0xffffffff,-0x4(%rbp)
jmp    114d <default_compkey+0x4d>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
cmp    %rcx,%rax
jne    1146 <default_compkey+0x46>
movl   $0x0,-0x4(%rbp)
jmp    114d <default_compkey+0x4d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_compkey>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
setne  %cl
mov    $0xffffffff,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @default_compkey(i8* readnone %0, i8* readnone %1) {
%3 = icmp ult i8* %0, %1
%4 = icmp ne i8* %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double atanh(double);
double pop(struct lifo *);
double opr_atanh(struct lifo *stack) {
  double op = pop(stack);
  return atanh(op);
}


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

x86 assembly (clang, -O2):
<opr_atanh>:
push   %rax
call   1040 <pop@plt>
pop    %rax
jmp    1030 <atanh@plt>

LLVM IR (-O0):
%struct.lifo = type { i32 }
define double @opr_atanh(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
%3 = alloca double
store %struct.lifo* %0, %struct.lifo** %2
%4 = load %struct.lifo*, %struct.lifo** %2
%5 = call double @pop(%struct.lifo* %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @atanh(double %6)
ret double %7
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
define double @opr_atanh(%struct.lifo* %0) {
%2 = tail call double @pop(%struct.lifo* %0)
%3 = tail call double @atanh(double %2)
ret double %3
}
void do_prefetch_abort(struct pt_regs *pt_regs) { return; }


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

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

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

LLVM IR (-O2):
%struct.pt_regs = type opaque
define void @do_prefetch_abort(%struct.pt_regs* nocapture %0) {
ret void
}
long long fn1(int p) { return p ? p : 1; }


x86 assembly (clang, -O0):
<fn1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     111c <fn1+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <fn1+0x29>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <fn1+0x29>
mov    -0x8(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn1>:
test   %edi,%edi
mov    $0x1,%eax
cmovne %edi,%eax
cltq
ret

LLVM IR (-O0):
define i64 @fn1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi i32 [ %6, %5 ], [ 1, %7 ]
%10 = sext i32 %9 to i64
ret i64 %10
}

LLVM IR (-O2):
define i64 @fn1(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i32 1, i32 %0
%4 = sext i32 %3 to i64
ret i64 %4
}
/* Variables and functions */
bool def_shell_sort_inc_comp(int *x, int *y) {
  if (*x < *y)
    return true;
  else
    return false;
}


x86 assembly (clang, -O0):
<def_shell_sort_inc_comp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <def_shell_sort_inc_comp+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1131 <def_shell_sort_inc_comp+0x31>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_shell_sort_inc_comp>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    (%rsi),%ecx
setl   %al
ret

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

LLVM IR (-O2):
define i32 @def_shell_sort_inc_comp(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
%5 = icmp slt i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int inflateEnd(struct z_stream_s *strm) { return -2; }


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

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

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

LLVM IR (-O2):
%struct.z_stream_s = type opaque
define i32 @inflateEnd(%struct.z_stream_s* nocapture readnone %0) {
ret i32 -2
}
unsigned int cgc_memset(void *buf, unsigned char ch, unsigned int n) {
  if (0 == n) {
    return 0;
  }
  unsigned char *p_buf = (unsigned char *)buf;
  for (unsigned int i = 0; i < n; i++) {
    p_buf[i] = ch;
  }
  return n;
}


x86 assembly (clang, -O0):
<cgc_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %edx,-0x18(%rbp)
xor    %eax,%eax
cmp    -0x18(%rbp),%eax
jne    1128 <cgc_memset+0x28>
movl   $0x0,-0x4(%rbp)
jmp    1164 <cgc_memset+0x64>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x18(%rbp),%eax
jae    115e <cgc_memset+0x5e>
mov    -0x11(%rbp),%dl
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1137 <cgc_memset+0x37>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgc_memset>:
push   %rbx
mov    %edx,%ebx
test   %edx,%edx
je     1122 <cgc_memset+0x12>
mov    %ebx,%edx
movzbl %sil,%esi
call   1030 <memset@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @cgc_memset(i8* %0, i8 zeroext %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
store i8* %0, i8** %5
store i8 %1, i8* %6
store i32 %2, i32* %7
%10 = load i32, i32* %7
%11 = icmp eq i32 0, %10
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 0, i32* %4
br label %30
13: ; preds = %3
%14 = load i8*, i8** %5
store i8* %14, i8** %8
store i32 0, i32* %9
br label %15
15: ; preds = %25, %13
%16 = load i32, i32* %9
%17 = load i32, i32* %7
%18 = icmp ult i32 %16, %17
br i1 %18, label %19, label %28
19: ; preds = %15
%20 = load i8, i8* %6
%21 = load i8*, i8** %8
%22 = load i32, i32* %9
%23 = zext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
store i8 %20, i8* %24
br label %25
25: ; preds = %19
%26 = load i32, i32* %9
%27 = add i32 %26, 1
store i32 %27, i32* %9
br label %15
28: ; preds = %15
%29 = load i32, i32* %7
store i32 %29, i32* %4
br label %30
30: ; preds = %28, %12
%31 = load i32, i32* %4
ret i32 %31
}

LLVM IR (-O2):
define i32 @cgc_memset(i8* nocapture writeonly %0, i8 zeroext %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %3
ret i32 %2
}
void willusgui_semaphore_close(void *semaphore) {}


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

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

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

LLVM IR (-O2):
define void @willusgui_semaphore_close(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef int GLint;
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ GL_CULL_FACE;
int /*<<< orphan*/ draw_room();
int /*<<< orphan*/ draw_sphere(int /*<<< orphan*/);
int /*<<< orphan*/ draw_torus(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
void draw_scene(GLdouble degrees, GLint bits) {
  glEnable(GL_CULL_FACE);
  draw_room();
  if (bits & 1)
    draw_torus(degrees);
  if (bits & 2)
    draw_sphere(degrees);
}


x86 assembly (clang, -O0):
<draw_scene>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
mov    $0x0,%al
call   1030 <draw_room@plt>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     117a <draw_scene+0x3a>
mov    -0x4(%rbp),%edi
call   1060 <draw_torus@plt>
mov    -0x8(%rbp),%eax
and    $0x2,%eax
cmp    $0x0,%eax
je     1191 <draw_scene+0x51>
mov    -0x4(%rbp),%edi
call   1050 <draw_sphere@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_scene>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
mov    0x2e92(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
xor    %eax,%eax
call   1030 <draw_room@plt>
test   $0x1,%bpl
je     1169 <draw_scene+0x29>
mov    %ebx,%edi
call   1060 <draw_torus@plt>
test   $0x2,%bpl
jne    1176 <draw_scene+0x36>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <draw_sphere@plt>

LLVM IR (-O0):
@GL_CULL_FACE = global i32 0
define void @draw_scene(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* @GL_CULL_FACE
%6 = call i32 @glEnable(i32 %5)
%7 = call i32 (...) @draw_room()
%8 = load i32, i32* %4
%9 = and i32 %8, 1
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* %3
%13 = call i32 @draw_torus(i32 %12)
br label %14
14: ; preds = %11, %2
%15 = load i32, i32* %4
%16 = and i32 %15, 2
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %21
18: ; preds = %14
%19 = load i32, i32* %3
%20 = call i32 @draw_sphere(i32 %19)
br label %21
21: ; preds = %18, %14
ret void
}

LLVM IR (-O2):
@GL_CULL_FACE = global i32 0
define void @draw_scene(i32 %0, i32 %1) {
%3 = load i32, i32* @GL_CULL_FACE
%4 = tail call i32 @glEnable(i32 %3)
%5 = tail call i32 (...) @draw_room()
%6 = and i32 %1, 1
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @draw_torus(i32 %0)
br label %10
10: ; preds = %8, %2
%11 = and i32 %1, 2
%12 = icmp eq i32 %11, 0
br i1 %12, label %15, label %13
13: ; preds = %10
%14 = tail call i32 @draw_sphere(i32 %0)
br label %15
15: ; preds = %13, %10
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int main() {
  int a;
  int b;
  a = -__VERIFIER_nondet_int();
  b = -__VERIFIER_nondet_int();
  while (a > b) {
    b = b + a;
    a = a + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <__VERIFIER_nondet_int@plt>
mov    %eax,%ecx
xor    %eax,%eax
sub    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1162 <main+0x52>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113f <main+0x2f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
%5 = sub nsw i32 0, %4
store i32 %5, i32* %2
%6 = call i32 (...) @__VERIFIER_nondet_int()
%7 = sub nsw i32 0, %6
store i32 %7, i32* %3
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = icmp sgt i32 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %8
%13 = load i32, i32* %3
%14 = load i32, i32* %2
%15 = add nsw i32 %13, %14
store i32 %15, i32* %3
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %8
18: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 (...) @__VERIFIER_nondet_int()
ret i32 0
}
/* Variables and functions */
int PMPI_Buffer_attach(void *, int);
int MPI_Buffer_attach(void *buffer, int size) {
  ;
  return PMPI_Buffer_attach(buffer, size);
}


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

x86 assembly (clang, -O2):
<MPI_Buffer_attach>:
jmp    1030 <PMPI_Buffer_attach@plt>

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

LLVM IR (-O2):
define i32 @MPI_Buffer_attach(i8* %0, i32 %1) {
%3 = tail call i32 @PMPI_Buffer_attach(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ mkdir(char *, int);
void Sys_Mkdir(char *path) { mkdir(path, 0777); }


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

x86 assembly (clang, -O2):
<Sys_Mkdir>:
mov    $0x1ff,%esi
jmp    1030 <mkdir@plt>

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

LLVM IR (-O2):
define void @Sys_Mkdir(i8* nocapture %0) {
%2 = tail call i32 @mkdir(i8* %0, i32 511)
ret void
}
int rqueue_mid_idx(int idx) {
  return (++idx + (10 * 2 + 1) / 2) % (10 * 2 + 1);
}


x86 assembly (clang, -O0):
<rqueue_mid_idx>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
add    $0xa,%eax
mov    $0x15,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rqueue_mid_idx>:
add    $0xb,%edi
movslq %edi,%rax
imul   $0x30c30c31,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,4),%edx
lea    (%rcx,%rdx,4),%ecx
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @rqueue_mid_idx(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
store i32 %4, i32* %2
%5 = add nsw i32 %4, 10
%6 = srem i32 %5, 21
ret i32 %6
}

LLVM IR (-O2):
define i32 @rqueue_mid_idx(i32 %0) {
%2 = add nsw i32 %0, 11
%3 = srem i32 %2, 21
ret i32 %3
}
/* Variables and functions */
long long l_mod(long long *, long long *);
long long intr_wrap_387(long long p1, long long p2) { return l_mod(&p1, &p2); }


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

x86 assembly (clang, -O2):
<intr_wrap_387>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   1030 <l_mod@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i64 @intr_wrap_387(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @l_mod(i64* %3, i64* %4)
ret i64 %5
}

LLVM IR (-O2):
define i64 @intr_wrap_387(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = call i64 @l_mod(i64* %3, i64* %4)
ret i64 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int pthread_join(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ puts(char *);
void *tf2(void *arg) {
  int a;
  a = pthread_join((pthread_t)arg, NULL);
  puts("2nd join returned");
  printf("a = %i\n", a);
  return (void *)1l;
}


x86 assembly (clang, -O0):
<tf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <pthread_join@plt>
mov    %eax,-0xc(%rbp)
lea    0xeab(%rip),%rdi
call   1030 <puts@plt>
mov    -0xc(%rbp),%esi
lea    0xeae(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tf2>:
push   %rbx
xor    %esi,%esi
call   1050 <pthread_join@plt>
mov    %eax,%ebx
lea    0xebf(%rip),%rdi
call   1030 <puts@plt>
lea    0xec5(%rip),%rdi
mov    %ebx,%esi
call   1040 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"2nd join returned\00"
@.str.1 = [8 x i8] c"a = %i\0A\00"
define i8* @tf2(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i32
%6 = call i32 @pthread_join(i32 %5, i32* null)
store i32 %6, i32* %3
%7 = call i32 @puts(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %3
%9 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i8* inttoptr (i64 1 to i8*)
}

LLVM IR (-O2):
@.str = [18 x i8] c"2nd join returned\00"
@.str.1 = [8 x i8] c"a = %i\0A\00"
define i8* @tf2(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @pthread_join(i32 %3, i32* null)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i8* inttoptr (i64 1 to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ clone_object(int /*<<< orphan*/);
int /*<<< orphan*/ dpeek();
int /*<<< orphan*/ drepl(int /*<<< orphan*/);
void primitive_clone(void) { drepl(clone_object(dpeek())); }


x86 assembly (clang, -O0):
<primitive_clone>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1050 <clone_object@plt>
mov    %eax,%edi
call   1040 <drepl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_clone>:
push   %rax
xor    %eax,%eax
call   1030 <dpeek@plt>
mov    %eax,%edi
call   1050 <clone_object@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <drepl@plt>

LLVM IR (-O0):
define void @primitive_clone() {
%1 = call i32 (...) @dpeek()
%2 = call i32 @clone_object(i32 %1)
%3 = call i32 @drepl(i32 %2)
ret void
}

LLVM IR (-O2):
define void @primitive_clone() {
%1 = tail call i32 (...) @dpeek()
%2 = tail call i32 @clone_object(i32 %1)
%3 = tail call i32 @drepl(i32 %2)
ret void
}
void xive_kexec_teardown_cpu(int secondary) {}


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

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

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

LLVM IR (-O2):
define void @xive_kexec_teardown_cpu(i32 %0) {
ret void
}
void parse_message(char *message, int len, struct operation *operation) {
  return;
}


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

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

LLVM IR (-O0):
%struct.operation = type opaque
define void @parse_message(i8* %0, i32 %1, %struct.operation* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca %struct.operation*
store i8* %0, i8** %4
store i32 %1, i32* %5
store %struct.operation* %2, %struct.operation** %6
ret void
}

LLVM IR (-O2):
%struct.operation = type opaque
define void @parse_message(i8* nocapture %0, i32 %1, %struct.operation* nocapture %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ OCSP_CERTID;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
int /*<<< orphan*/ ASN1_item_free(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ OCSP_CERTID_it;
void OCSP_CERTID_free(OCSP_CERTID *a) {
  ASN1_item_free((ASN1_VALUE *)a, &OCSP_CERTID_it);
}


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

x86 assembly (clang, -O2):
<OCSP_CERTID_free>:
mov    0x2ee1(%rip),%rsi
jmp    1030 <ASN1_item_free@plt>

LLVM IR (-O0):
@OCSP_CERTID_it = global i32 0
define void @OCSP_CERTID_free(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @ASN1_item_free(i32* %3, i32* @OCSP_CERTID_it)
ret void
}

LLVM IR (-O2):
@OCSP_CERTID_it = global i32 0
define void @OCSP_CERTID_free(i32* %0) {
%2 = tail call i32 @ASN1_item_free(i32* %0, i32* @OCSP_CERTID_it)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Jmove(int, int /*<<< orphan*/);
int /*<<< orphan*/ Jprintf(char *);
help() {
  Jmove(3, 0);
  Jprintf("\tHelp или Справка - краткая справка по командам\n\n\r");
  Jprintf("\n\t*\t- шаг\n\r");
  Jprintf("\n\t/\t- переключение цветовой палитры\n\r");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <Jmove@plt>
lea    0xec5(%rip),%rdi
call   1040 <Jprintf@plt>
lea    0xf0e(%rip),%rdi
call   1040 <Jprintf@plt>
lea    0xf11(%rip),%rdi
call   1040 <Jprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
push   %rax
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <Jmove@plt>
lea    0xecc(%rip),%rdi
call   1040 <Jprintf@plt>
lea    0xf15(%rip),%rdi
call   1040 <Jprintf@plt>
lea    0xf18(%rip),%rdi
pop    %rax
jmp    1040 <Jprintf@plt>

LLVM IR (-O0):
@.str = [85 x i8] c"\09Help \D0\B8\D0\BB\D0\B8 \D0\A1\D0\BF\D1\80\D0\B0\D0\B2\D0\BA\D0\B0 - \D0\BA\D1\80\D0\B0\D1\82\D0\BA\D0\B0\D1\8F \D1\81\D0\BF\D1\80\D0\B0\D0\B2\D0\BA\D0\B0 \D0\BF\D0\BE \D0\BA\D0\BE\D0\BC\D0\B0\D0\BD\D0\B4\D0\B0\D0\BC\0A\0A\0D\00"
@.str.1 = [15 x i8] c"\0A\09*\09- \D1\88\D0\B0\D0\B3\0A\0D\00"
@.str.2 = [65 x i8] c"\0A\09/\09- \D0\BF\D0\B5\D1\80\D0\B5\D0\BA\D0\BB\D1\8E\D1\87\D0\B5\D0\BD\D0\B8\D0\B5 \D1\86\D0\B2\D0\B5\D1\82\D0\BE\D0\B2\D0\BE\D0\B9 \D0\BF\D0\B0\D0\BB\D0\B8\D1\82\D1\80\D1\8B\0A\0D\00"
define i32 @help() {
%1 = alloca i32
%2 = call i32 @Jmove(i32 3, i32 0)
%3 = call i32 @Jprintf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @Jprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @Jprintf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
%6 = load i32, i32* %1
ret i32 %6
}

LLVM IR (-O2):
@.str = [85 x i8] c"\09Help \D0\B8\D0\BB\D0\B8 \D0\A1\D0\BF\D1\80\D0\B0\D0\B2\D0\BA\D0\B0 - \D0\BA\D1\80\D0\B0\D1\82\D0\BA\D0\B0\D1\8F \D1\81\D0\BF\D1\80\D0\B0\D0\B2\D0\BA\D0\B0 \D0\BF\D0\BE \D0\BA\D0\BE\D0\BC\D0\B0\D0\BD\D0\B4\D0\B0\D0\BC\0A\0A\0D\00"
@.str.1 = [15 x i8] c"\0A\09*\09- \D1\88\D0\B0\D0\B3\0A\0D\00"
@.str.2 = [65 x i8] c"\0A\09/\09- \D0\BF\D0\B5\D1\80\D0\B5\D0\BA\D0\BB\D1\8E\D1\87\D0\B5\D0\BD\D0\B8\D0\B5 \D1\86\D0\B2\D0\B5\D1\82\D0\BE\D0\B2\D0\BE\D0\B9 \D0\BF\D0\B0\D0\BB\D0\B8\D1\82\D1\80\D1\8B\0A\0D\00"
define i32 @help() {
%1 = tail call i32 @Jmove(i32 3, i32 0)
%2 = tail call i32 @Jprintf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @Jprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @Jprintf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.2, i64 0, i64 0))
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwaddstr(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/, char const *);
int /*<<< orphan*/ werase(int /*<<< orphan*/ *);
int /*<<< orphan*/ wrefresh(int /*<<< orphan*/ *);
void update_msgbox(WINDOW *w, const char *msg) {
  werase(w);
  mvwaddstr(w, 0, 0, msg);
  wrefresh(w);
}


x86 assembly (clang, -O0):
<update_msgbox>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <werase@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rcx
xor    %edx,%edx
mov    %edx,%esi
call   1040 <mvwaddstr@plt>
mov    -0x8(%rbp),%rdi
call   1030 <wrefresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_msgbox>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1050 <werase@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    %r14,%rcx
call   1040 <mvwaddstr@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <wrefresh@plt>

LLVM IR (-O0):
define void @update_msgbox(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = call i32 @werase(i32* %5)
%7 = load i32*, i32** %3
%8 = load i8*, i8** %4
%9 = call i32 @mvwaddstr(i32* %7, i32 0, i32 0, i8* %8)
%10 = load i32*, i32** %3
%11 = call i32 @wrefresh(i32* %10)
ret void
}

LLVM IR (-O2):
define void @update_msgbox(i32* %0, i8* %1) {
%3 = tail call i32 @werase(i32* %0)
%4 = tail call i32 @mvwaddstr(i32* %0, i32 0, i32 0, i8* %1)
%5 = tail call i32 @wrefresh(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int /*<<< orphan*/ test3();
scalar_t__ test4();
int /*<<< orphan*/ test5();
int main() {
  int rv = 0;
  test1();
  test2();
  test3();
  rv += test4();
  test5();
  return rv;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1050 <test1@plt>
mov    $0x0,%al
call   1070 <test2@plt>
mov    $0x0,%al
call   1040 <test3@plt>
mov    $0x0,%al
call   1060 <test4@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <test5@plt>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <test1@plt>
xor    %eax,%eax
call   1070 <test2@plt>
xor    %eax,%eax
call   1040 <test3@plt>
xor    %eax,%eax
call   1060 <test4@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <test5@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @test1()
%4 = call i32 (...) @test2()
%5 = call i32 (...) @test3()
%6 = call i64 (...) @test4()
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = add nsw i64 %8, %6
%10 = trunc i64 %9 to i32
store i32 %10, i32* %2
%11 = call i32 (...) @test5()
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 (...) @test2()
%3 = tail call i32 (...) @test3()
%4 = tail call i64 (...) @test4()
%5 = trunc i64 %4 to i32
%6 = tail call i32 (...) @test5()
ret i32 %5
}
unsigned int autofs_type_trigger(unsigned int type) {
  return (type == 2U || type == 4U);
}


x86 assembly (clang, -O0):
<autofs_type_trigger>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x2,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1120 <autofs_type_trigger+0x20>
cmpl   $0x4,-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):
<autofs_type_trigger>:
add    $0xfffffffe,%edi
xor    %eax,%eax
test   $0xfffffffd,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @autofs_type_trigger(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 2
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp eq i32 %6, 4
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 @autofs_type_trigger(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = icmp eq i32 %0, 4
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_autospawn_lock_done() {
  printf("NOT IMPLEMENTED:"
         "pa_autospawn_lock_done"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [39 x i8] c"NOT IMPLEMENTED:pa_autospawn_lock_done\00"
define i32 @pa_autospawn_lock_done() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
double add_float(int, int);
int /*<<< orphan*/ printf(char *, double);
int main(int argc, char *argv[]) {
  printf("%f\n", add_float(1, 2));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @add_float(i32 1, i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
void HandleSIGCHLD(int unused_signo) { (void)unused_signo; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ F_RDLCK;
int /*<<< orphan*/ _fd_test_lock(int, int /*<<< orphan*/);
pid_t fd_is_read_lock_blocked(int fd) { return (_fd_test_lock(fd, F_RDLCK)); }


x86 assembly (clang, -O0):
<fd_is_read_lock_blocked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
call   1030 <_fd_test_lock@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fd_is_read_lock_blocked>:
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <_fd_test_lock@plt>

LLVM IR (-O0):
@F_RDLCK = global i32 0
define i32 @fd_is_read_lock_blocked(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @F_RDLCK
%5 = call i32 @_fd_test_lock(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@F_RDLCK = global i32 0
define i32 @fd_is_read_lock_blocked(i32 %0) {
%2 = load i32, i32* @F_RDLCK
%3 = tail call i32 @_fd_test_lock(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
double SIN_POS(double);
double SIN(double x) {
  if (x < 0)
    return -SIN_POS(-x);
  else
    return SIN_POS(x);
}


x86 assembly (clang, -O0):
<SIN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    116d <SIN+0x5d>
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
call   1030 <SIN_POS@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    117c <SIN+0x6c>
movsd  -0x10(%rbp),%xmm0
call   1030 <SIN_POS@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SIN>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    1132 <SIN+0x22>
push   %rax
xorpd  0xedd(%rip),%xmm0
call   1030 <SIN_POS@plt>
xorpd  0xed0(%rip),%xmm0
pop    %rax
ret
jmp    1030 <SIN_POS@plt>

LLVM IR (-O0):
define double @SIN(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = fneg double %7
%9 = call double @SIN_POS(double %8)
%10 = fneg double %9
store double %10, double* %2
br label %14
11: ; preds = %1
%12 = load double, double* %3
%13 = call double @SIN_POS(double %12)
store double %13, double* %2
br label %14
14: ; preds = %11, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @SIN(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fneg double %0
%5 = tail call double @SIN_POS(double %4)
%6 = fneg double %5
br label %9
7: ; preds = %1
%8 = tail call double @SIN_POS(double %0)
br label %9
9: ; preds = %7, %3
%10 = phi double [ %6, %3 ], [ %8, %7 ]
ret double %10
}
void paren_check(int cquad[], int pnctn_sts[]) {
  if (cquad[3] == '(') {
    ++pnctn_sts[3];
  }
  if (cquad[3] == ')') {
    --pnctn_sts[3];
  }
}


x86 assembly (clang, -O0):
<paren_check>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x28,0xc(%rax)
jne    1127 <paren_check+0x27>
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0x1,%ecx
mov    %ecx,0xc(%rax)
mov    -0x8(%rbp),%rax
cmpl   $0x29,0xc(%rax)
jne    1142 <paren_check+0x42>
mov    -0x10(%rbp),%rax
mov    0xc(%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<paren_check>:
mov    0xc(%rdi),%eax
cmp    $0x28,%eax
je     110e <paren_check+0xe>
cmp    $0x29,%eax
je     111a <paren_check+0x1a>
ret
addl   $0x1,0xc(%rsi)
mov    0xc(%rdi),%eax
cmp    $0x29,%eax
jne    110d <paren_check+0xd>
addl   $0xffffffff,0xc(%rsi)
ret

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

LLVM IR (-O2):
define void @paren_check(i32* nocapture %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 40
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = getelementptr inbounds i32, i32* %1, i64 3
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
%10 = load i32, i32* %3
br label %11
11: ; preds = %6, %2
%12 = phi i32 [ %10, %6 ], [ %4, %2 ]
%13 = icmp eq i32 %12, 41
br i1 %13, label %14, label %18
14: ; preds = %11
%15 = getelementptr inbounds i32, i32* %1, i64 3
%16 = load i32, i32* %15
%17 = add nsw i32 %16, -1
store i32 %17, i32* %15
br label %18
18: ; preds = %14, %11
ret void
}