xunge/DecIR huggingface dataset:
__attribute__((no, noclone)) void foo(int x) {
  if (x != 1)
    __builtin_abort();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
je     112a <foo+0x1a>
call   1030 <abort@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x1,%edi
jne    1116 <foo+0x6>
ret
push   %rax
call   1030 <abort@plt>

LLVM IR (-O0):
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 1
br i1 %4, label %5, label %6
5: ; preds = %1
unreachable
6: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @foo(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %4, label %3
3: ; preds = %1
tail call void @abort()
unreachable
4: ; preds = %1
ret void
}
int test_imm_2Aint64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x2A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_2Aint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 2752512
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
double dc_dmu(double phi, double mu) {
  return (1.0 + (1.2 - 1.0) * (phi * phi) * (3.0 - 2.0 * phi));
}


x86 assembly (clang, -O0):
<dc_dmu>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  0xef0(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm2
addsd  %xmm2,%xmm2
movsd  0xed3(%rip),%xmm1
subsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebb(%rip),%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dc_dmu>:
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  0xef0(%rip),%xmm2
addsd  %xmm0,%xmm0
movsd  0xeec(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
addsd  0xee4(%rip),%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dc_dmu(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = fmul double %5, %6
%8 = fmul double 0x3FC9999999999998, %7
%9 = load double, double* %3
%10 = call double @llvm.fmuladd.f64(double -2.000000e+00, double %9, double 3.000000e+00)
%11 = call double @llvm.fmuladd.f64(double %8, double %10, double 1.000000e+00)
ret double %11
}

LLVM IR (-O2):
define double @dc_dmu(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fmul double %3, 0x3FC9999999999998
%5 = tail call double @llvm.fmuladd.f64(double %0, double -2.000000e+00, double 3.000000e+00)
%6 = tail call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
ret double %6
}
void ScaleRowDown4Box_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown4Box_Any_NEON() {
ret void
}
int cmp_ull(const void *ap, const void *bp) {
  unsigned long long a = *(unsigned long long *)ap;
  unsigned long long b = *(unsigned long long *)bp;
  if (a < b)
    return -1;
  else if (b < a)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<cmp_ull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    113c <cmp_ull+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_ull+0x5d>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jae    1156 <cmp_ull+0x56>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_ull+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_ull>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rax,%rcx
setb   %dl
mov    $0xffffffff,%eax
cmovbe %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_ull(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp ult i64 %4, %6
%8 = icmp ult i64 %6, %4
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
char *tilde_expand(dirname)
char *dirname;
{ return (0L); }


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

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

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

LLVM IR (-O2):
define noalias i8* @tilde_expand(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ bar();
int /*<<< orphan*/ foo();
int main() {
  foo();
  bar();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @foo()
%2 = tail call i32 (...) @bar()
ret i32 0
}
printlabel(label) int label;
{
  outstr("cc");
  outdec(label);
}


x86 assembly (clang, -O0):
<printlabel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <outstr@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1040 <outdec@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printlabel>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <outstr@plt>
mov    %ebx,%edi
xor    %eax,%eax
pop    %rbx
jmp    1040 <outdec@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"cc\00"
define i32 @printlabel(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @outdec to i32 (i32, ...)*)(i32 %5)
%7 = load i32, i32* %2
ret i32 %7
}

LLVM IR (-O2):
@.str = [3 x i8] c"cc\00"
define i32 @printlabel(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @outstr to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @outdec to i32 (i32, ...)*)(i32 %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ds2770_writeBit(int);
void ds2770_writeByte(int hexNum) {
  int i;
  for (i = 0; i < 8; i++) {
    ds2770_writeBit(hexNum & 0x01);
    hexNum >>= 1;
  }
}


x86 assembly (clang, -O0):
<ds2770_writeByte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    114e <ds2770_writeByte+0x3e>
mov    -0x4(%rbp),%edi
and    $0x1,%edi
call   1030 <ds2770_writeBit@plt>
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1122 <ds2770_writeByte+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ds2770_writeByte>:
push   %rbx
mov    %edi,%ebx
and    $0x1,%edi
call   1030 <ds2770_writeBit@plt>
mov    %ebx,%edi
shr    %edi
and    $0x1,%edi
call   1030 <ds2770_writeBit@plt>
mov    %ebx,%edi
shr    $0x2,%edi
and    $0x1,%edi
call   1030 <ds2770_writeBit@plt>
mov    %ebx,%edi
shr    $0x3,%edi
and    $0x1,%edi
call   1030 <ds2770_writeBit@plt>
mov    %ebx,%edi
shr    $0x4,%edi
and    $0x1,%edi
call   1030 <ds2770_writeBit@plt>
mov    %ebx,%edi
shr    $0x5,%edi
and    $0x1,%edi
call   1030 <ds2770_writeBit@plt>
mov    %ebx,%edi
shr    $0x6,%edi
and    $0x1,%edi
call   1030 <ds2770_writeBit@plt>
shr    $0x7,%ebx
and    $0x1,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <ds2770_writeBit@plt>

LLVM IR (-O0):
define void @ds2770_writeByte(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 8
br i1 %6, label %7, label %16
7: ; preds = %4
%8 = load i32, i32* %2
%9 = and i32 %8, 1
%10 = call i32 @ds2770_writeBit(i32 %9)
%11 = load i32, i32* %2
%12 = ashr i32 %11, 1
store i32 %12, i32* %2
br label %13
13: ; preds = %7
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %4
16: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @ds2770_writeByte(i32 %0) {
%2 = and i32 %0, 1
%3 = tail call i32 @ds2770_writeBit(i32 %2)
%4 = lshr i32 %0, 1
%5 = and i32 %4, 1
%6 = tail call i32 @ds2770_writeBit(i32 %5)
%7 = lshr i32 %0, 2
%8 = and i32 %7, 1
%9 = tail call i32 @ds2770_writeBit(i32 %8)
%10 = lshr i32 %0, 3
%11 = and i32 %10, 1
%12 = tail call i32 @ds2770_writeBit(i32 %11)
%13 = lshr i32 %0, 4
%14 = and i32 %13, 1
%15 = tail call i32 @ds2770_writeBit(i32 %14)
%16 = lshr i32 %0, 5
%17 = and i32 %16, 1
%18 = tail call i32 @ds2770_writeBit(i32 %17)
%19 = lshr i32 %0, 6
%20 = and i32 %19, 1
%21 = tail call i32 @ds2770_writeBit(i32 %20)
%22 = lshr i32 %0, 7
%23 = and i32 %22, 1
%24 = tail call i32 @ds2770_writeBit(i32 %23)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *);
void pri_log(char *str1, char *str) { printf("%s str is : %s\n", str1, str); }


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

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

LLVM IR (-O0):
@.str = [16 x i8] c"%s str is : %s\0A\00"
define void @pri_log(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"%s str is : %s\0A\00"
define void @pri_log(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
unsigned short load_word(unsigned char *ptr) {
  unsigned short *p = (unsigned short *)ptr;
  return *p;
}


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

x86 assembly (clang, -O2):
<load_word>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define zeroext i16 @load_word(i8* %0) {
%2 = alloca i8*
%3 = alloca i16*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i16*
store i16* %5, i16** %3
%6 = load i16*, i16** %3
%7 = load i16, i16* %6
ret i16 %7
}

LLVM IR (-O2):
define zeroext i16 @load_word(i8* nocapture %0) {
%2 = bitcast i8* %0 to i16*
%3 = load i16, i16* %2
ret i16 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwaddstr(int /*<<< orphan*/ *, int, int, char *);
void legs4(WINDOW *win) {
  mvwaddstr(win, 6, 6, "( )______( /");
  mvwaddstr(win, 7, 5, "(/          \\");
  mvwaddstr(win, 8, 0, "v___=             ----^");
}


x86 assembly (clang, -O0):
<legs4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%edx
lea    0xed4(%rip),%rcx
mov    %edx,%esi
call   1030 <mvwaddstr@plt>
mov    -0x8(%rbp),%rdi
mov    $0x7,%esi
mov    $0x5,%edx
lea    0xec5(%rip),%rcx
call   1030 <mvwaddstr@plt>
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
xor    %edx,%edx
lea    0xebc(%rip),%rcx
call   1030 <mvwaddstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<legs4>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rcx
mov    $0x6,%esi
mov    $0x6,%edx
call   1030 <mvwaddstr@plt>
lea    0xedc(%rip),%rcx
mov    %rbx,%rdi
mov    $0x7,%esi
mov    $0x5,%edx
call   1030 <mvwaddstr@plt>
lea    0xed1(%rip),%rcx
mov    %rbx,%rdi
mov    $0x8,%esi
xor    %edx,%edx
pop    %rbx
jmp    1030 <mvwaddstr@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"( )______( /\00"
@.str.1 = [14 x i8] c"(/ \\\00"
@.str.2 = [24 x i8] c"v___= ----^\00"
define void @legs4(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @mvwaddstr(i32* %3, i32 6, i32 6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @mvwaddstr(i32* %5, i32 7, i32 5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%7 = load i32*, i32** %2
%8 = call i32 @mvwaddstr(i32* %7, i32 8, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"( )______( /\00"
@.str.1 = [14 x i8] c"(/ \\\00"
@.str.2 = [24 x i8] c"v___= ----^\00"
define void @legs4(i32* %0) {
%2 = tail call i32 @mvwaddstr(i32* %0, i32 6, i32 6, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @mvwaddstr(i32* %0, i32 7, i32 5, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @mvwaddstr(i32* %0, i32 8, i32 0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Type definitions */
struct node {
  int dummy;
};
struct generator {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ write_comment(struct generator *, struct node *);
int /*<<< orphan*/ writef(struct generator *, char *, struct node *);
void generate_delete(struct generator *g, struct node *p) {
  write_comment(g, p);
  writef(g, "~Mslice_del();~N", p);
}


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

x86 assembly (clang, -O2):
<generate_delete>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <write_comment@plt>
lea    0xeca(%rip),%rsi
mov    %rbx,%rdi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <writef@plt>

LLVM IR (-O0):
%struct.generator = type { i32 }
%struct.node = type { i32 }
@.str = [17 x i8] c"~Mslice_del();~N\00"
define void @generate_delete(%struct.generator* %0, %struct.node* %1) {
%3 = alloca %struct.generator*
%4 = alloca %struct.node*
store %struct.generator* %0, %struct.generator** %3
store %struct.node* %1, %struct.node** %4
%5 = load %struct.generator*, %struct.generator** %3
%6 = load %struct.node*, %struct.node** %4
%7 = call i32 @write_comment(%struct.generator* %5, %struct.node* %6)
%8 = load %struct.generator*, %struct.generator** %3
%9 = load %struct.node*, %struct.node** %4
%10 = call i32 @writef(%struct.generator* %8, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), %struct.node* %9)
ret void
}

LLVM IR (-O2):
%struct.generator = type { i32 }
%struct.node = type { i32 }
@.str = [17 x i8] c"~Mslice_del();~N\00"
define void @generate_delete(%struct.generator* %0, %struct.node* %1) {
%3 = tail call i32 @write_comment(%struct.generator* %0, %struct.node* %1)
%4 = tail call i32 @writef(%struct.generator* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), %struct.node* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ indigoFree(int);
int indigoLoadSmarts(int);
int indigoReadString(char const *);
__attribute__((visibility("default"))) int
indigoLoadSmartsFromString(const char *string) {
  int source = indigoReadString(string);
  int result;
  if (source <= 0)
    return -1;
  result = indigoLoadSmarts(source);
  indigoFree(source);
  return result;
}


x86 assembly (clang, -O0):
<indigoLoadSmartsFromString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <indigoReadString@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     115e <indigoLoadSmartsFromString+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <indigoLoadSmartsFromString+0x47>
mov    -0x14(%rbp),%edi
call   1040 <indigoLoadSmarts@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <indigoFree@plt>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indigoLoadSmartsFromString>:
push   %rbp
push   %rbx
push   %rax
call   1050 <indigoReadString@plt>
test   %eax,%eax
jle    1152 <indigoLoadSmartsFromString+0x22>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <indigoLoadSmarts@plt>
mov    %eax,%ebp
mov    %ebx,%edi
call   1030 <indigoFree@plt>
mov    %ebp,%eax
jmp    1157 <indigoLoadSmartsFromString+0x27>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @indigoLoadSmartsFromString(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 @indigoReadString(i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp sle i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %17
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 @indigoLoadSmarts(i32 %12)
store i32 %13, i32* %5
%14 = load i32, i32* %4
%15 = call i32 @indigoFree(i32 %14)
%16 = load i32, i32* %5
store i32 %16, i32* %2
br label %17
17: ; preds = %11, %10
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @indigoLoadSmartsFromString(i8* %0) {
%2 = tail call i32 @indigoReadString(i8* %0)
%3 = icmp slt i32 %2, 1
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @indigoLoadSmarts(i32 %2)
%6 = tail call i32 @indigoFree(i32 %2)
br label %7
7: ; preds = %1, %4
%8 = phi i32 [ %5, %4 ], [ -1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memtrap_update() {
  printf("NOT IMPLEMENTED:"
         "pa_memtrap_update"
         "\n");
}


x86 assembly (clang, -O0):
<pa_memtrap_update>:
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_memtrap_update>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [34 x i8] c"NOT IMPLEMENTED:pa_memtrap_update\00"
define i32 @pa_memtrap_update() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void InitWSA() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int /*<<< orphan*/);
int /*<<< orphan*/ _UARTBaseValid(int);
void UARTSmartCardDisable(uint32_t ui32Base) {
  ASSERT(_UARTBaseValid(ui32Base));
  (*((volatile uint32_t *)(ui32Base + 0x00000030))) &= ~0x00000008;
}


x86 assembly (clang, -O0):
<UARTSmartCardDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
cltq
mov    (%rax),%ecx
and    $0xfffffff7,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTSmartCardDisable>:
push   %rbx
mov    %edi,%ebx
call   1030 <_UARTBaseValid@plt>
mov    %eax,%edi
call   1040 <ASSERT@plt>
movslq %ebx,%rax
andl   $0xfffffff7,0x30(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @UARTSmartCardDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_UARTBaseValid(i32 %3)
%5 = call i32 @ASSERT(i32 %4)
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 48
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
%10 = load volatile i32, i32* %9
%11 = and i32 %10, -9
store volatile i32 %11, i32* %9
ret void
}

LLVM IR (-O2):
define void @UARTSmartCardDisable(i32 %0) {
%2 = tail call i32 @_UARTBaseValid(i32 %0)
%3 = tail call i32 @ASSERT(i32 %2)
%4 = add nsw i32 %0, 48
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -9
store volatile i32 %8, i32* %6
ret void
}
/* Variables and functions */
float log10(float);
float pow(int, float);
float exponential_custom_io(float step, float max_steps, float max_val) {
  float R = max_steps * log10(2) / log10(max_val);
  return pow(2, (step / R)) - 1;
}


x86 assembly (clang, -O0):
<exponential_custom_io>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  0xebb(%rip),%xmm0
call   1040 <log10@plt>
movaps %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
mulss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
call   1040 <log10@plt>
movaps %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movss  0xe6a(%rip),%xmm1
subss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exponential_custom_io>:
push   %rax
movss  %xmm0,0x4(%rsp)
mulss  0xed1(%rip),%xmm1
movss  %xmm1,(%rsp)
movaps %xmm2,%xmm0
call   1040 <log10@plt>
movss  (%rsp),%xmm1
divss  %xmm0,%xmm1
movss  0x4(%rsp),%xmm0
divss  %xmm1,%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
addss  0xea3(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @exponential_custom_io(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %5
%9 = call float @log10(float 2.000000e+00)
%10 = fmul float %8, %9
%11 = load float, float* %6
%12 = call float @log10(float %11)
%13 = fdiv float %10, %12
store float %13, float* %7
%14 = load float, float* %4
%15 = load float, float* %7
%16 = fdiv float %14, %15
%17 = call float @pow(i32 2, float %16)
%18 = fsub float %17, 1.000000e+00
ret float %18
}

LLVM IR (-O2):
define float @exponential_custom_io(float %0, float %1, float %2) {
%4 = fmul float %1, 0x3FD3441360000000
%5 = tail call float @log10(float %2)
%6 = fdiv float %4, %5
%7 = fdiv float %0, %6
%8 = tail call float @pow(i32 2, float %7)
%9 = fadd float %8, -1.000000e+00
ret float %9
}
/* Type definitions */
typedef int /*<<< orphan*/ usage;
struct rusage {
  int ru_nvcsw;
};

/* Variables and functions */
int /*<<< orphan*/ memset(struct rusage *, int /*<<< orphan*/, int);
int main(void) {
  struct rusage usage;
  (void)memset(&usage, 0, sizeof(usage));
  return usage.ru_nvcsw;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1030 <memset@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.rusage = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.rusage
store i32 0, i32* %1
%3 = call i32 @memset(%struct.rusage* %2, i32 0, i32 4)
%4 = getelementptr inbounds %struct.rusage, %struct.rusage* %2, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.rusage = type { i32 }
define i32 @main() {
%1 = alloca %struct.rusage
%2 = bitcast %struct.rusage* %1 to i8*
%3 = call i32 @memset(%struct.rusage* %1, i32 0, i32 4)
%4 = getelementptr inbounds %struct.rusage, %struct.rusage* %1, i64 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ uart_s_write(int /*<<< orphan*/);
void type(char *str) {
  while (*str)
    uart_s_write(*str++);
}


x86 assembly (clang, -O0):
<type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <type+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <uart_s_write@plt>
jmp    111c <type+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<type>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <type+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <uart_s_write@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <type+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @type(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @uart_s_write(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
char *U_EMR_CORE5(int);
char *U_EMRCLOSEFIGURE_set(void) { return (U_EMR_CORE5(61)); }


x86 assembly (clang, -O0):
<U_EMRCLOSEFIGURE_set>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3d,%edi
call   1030 <U_EMR_CORE5@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_EMRCLOSEFIGURE_set>:
mov    $0x3d,%edi
jmp    1030 <U_EMR_CORE5@plt>

LLVM IR (-O0):
define i8* @U_EMRCLOSEFIGURE_set() {
%1 = call i8* @U_EMR_CORE5(i32 61)
ret i8* %1
}

LLVM IR (-O2):
define i8* @U_EMRCLOSEFIGURE_set() {
%1 = tail call i8* @U_EMR_CORE5(i32 61)
ret i8* %1
}
void foo125(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo125(i32 %0) {
ret void
}
unsigned xrop3_107_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = T | S;
  stk3 = D & stk4;
  stk2 = S ^ stk3;
  stk1 = T ^ stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_107_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
or     -0xc(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%eax
and    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_107_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %edi,%esi
xor    %ecx,%esi
xor    %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_107_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %7
%25 = load i32, i32* %6
%26 = or i32 %24, %25
store i32 %26, i32* %11
%27 = load i32, i32* %5
%28 = load i32, i32* %11
%29 = and i32 %27, %28
store i32 %29, i32* %10
%30 = load i32, i32* %6
%31 = load i32, i32* %10
%32 = xor i32 %30, %31
store i32 %32, i32* %9
%33 = load i32, i32* %7
%34 = load i32, i32* %9
%35 = xor i32 %33, %34
store i32 %35, i32* %8
%36 = load i32, i32* %8
%37 = xor i32 %36, -1
store i32 %37, i32* %8
%38 = load i32, i32* %8
%39 = load i32, i32* %6
%40 = xor i32 %39, -1
%41 = and i32 %38, %40
%42 = load i32, i32* %5
%43 = load i32, i32* %6
%44 = and i32 %42, %43
%45 = or i32 %41, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_107_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i8 %1, %0
%8 = zext i8 %7 to i32
%9 = xor i32 %4, %8
%10 = xor i32 %9, %6
%11 = or i32 %10, %4
%12 = xor i32 %11, -1
%13 = or i32 %12, %3
ret i32 %13
}
void set_u16(void *vd, unsigned short int v) {
  unsigned char *d = (unsigned char *)vd;
  d[0] = v >> 8;
  d[1] = v >> 0;
}


x86 assembly (clang, -O0):
<set_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
movzwl -0xa(%rbp),%eax
sar    $0x0,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_u16>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @set_u16(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
%5 = alloca i8*
store i8* %0, i8** %3
store i16 %1, i16* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i16, i16* %4
%8 = zext i16 %7 to i32
%9 = ashr i32 %8, 8
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %5
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i16, i16* %4
%14 = zext i16 %13 to i32
%15 = ashr i32 %14, 0
%16 = trunc i32 %15 to i8
%17 = load i8*, i8** %5
%18 = getelementptr inbounds i8, i8* %17, i64 1
store i8 %16, i8* %18
ret void
}

LLVM IR (-O2):
define void @set_u16(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = lshr i16 %1, 8
%4 = trunc i16 %3 to i8
store i8 %4, i8* %0
%5 = trunc i16 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void endDescribeFunVerbose() { printf("\n"); }


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

x86 assembly (clang, -O2):
<endDescribeFunVerbose>:
mov    $0xa,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @endDescribeFunVerbose() {
%1 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int html_tablecontents(char *, int, int, int, int, char *);
int html_tabledata(int align, int colspan, int rowspan, int nowrap,
                   char *text) {
  return html_tablecontents("TD", align, colspan, rowspan, nowrap, text);
}


x86 assembly (clang, -O0):
<html_tabledata>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x18(%rbp),%r9
lea    0xec0(%rip),%rdi
call   1030 <html_tablecontents@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<html_tabledata>:
mov    %r8,%r9
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
mov    %edi,%esi
lea    0xedd(%rip),%rdi
jmp    1030 <html_tablecontents@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"TD\00"
define i32 @html_tabledata(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i32, i32* %8
%14 = load i32, i32* %9
%15 = load i8*, i8** %10
%16 = call i32 @html_tablecontents(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %12, i32 %13, i32 %14, i8* %15)
ret i32 %16
}

LLVM IR (-O2):
@.str = [3 x i8] c"TD\00"
define i32 @html_tabledata(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = tail call i32 @html_tablecontents(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i8* %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ my_sqrt(double);
int main(void) {
  my_sqrt(19.5);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
call   1030 <my_sqrt@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @my_sqrt(double 1.950000e+01)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @my_sqrt(double 1.950000e+01)
ret i32 0
}
const char *pathconN_nm8_name_in(int i) {
  switch (i) {
  case 0:
    return "i0";
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<pathconN_nm8_name_in>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
test   %eax,%eax
jne    1127 <pathconN_nm8_name_in+0x27>
jmp    1117 <pathconN_nm8_name_in+0x17>
lea    0xee2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <pathconN_nm8_name_in+0x2f>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pathconN_nm8_name_in>:
xor    %eax,%eax
test   %edi,%edi
lea    0xef5(%rip),%rcx
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"i0\00"
define i8* @pathconN_nm8_name_in(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 0, label %5
]
5: ; preds = %1
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8** %2
br label %7
6: ; preds = %1
store i8* null, i8** %2
br label %7
7: ; preds = %6, %5
%8 = load i8*, i8** %2
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"i0\00"
define i8* @pathconN_nm8_name_in(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* null
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ intro();
int /*<<< orphan*/ new_game();
int main(int argc, char *argv[]) {
  chdir("/usr/lib/trek/");
  intro();
  new_game();
  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)
lea    0xeb3(%rip),%rdi
call   1050 <chdir@plt>
mov    $0x0,%al
call   1040 <intro@plt>
mov    $0x0,%al
call   1030 <new_game@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1050 <chdir@plt>
xor    %eax,%eax
call   1040 <intro@plt>
xor    %eax,%eax
call   1030 <new_game@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"/usr/lib/trek/\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 i32 @chdir(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = call i32 (...) @intro()
%8 = call i32 (...) @new_game()
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"/usr/lib/trek/\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @chdir(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (...) @intro()
%5 = tail call i32 (...) @new_game()
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void adc_int_clr(uint32_t *adc) { adc[0x00C / 4] |= 0x01; }


x86 assembly (clang, -O0):
<adc_int_clr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
or     $0x1,%ecx
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<adc_int_clr>:
orb    $0x1,0xc(%rdi)
ret

LLVM IR (-O0):
define void @adc_int_clr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
%6 = or i32 %5, 1
store i32 %6, i32* %4
ret void
}

LLVM IR (-O2):
define void @adc_int_clr(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = or i32 %3, 1
store i32 %4, i32* %2
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int celcon_length_of_supports(int *r, int *length) {
  int fail;
  double *c;
  fail = _ada_use_c2phc4c(85, r, length, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<celcon_length_of_supports>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x55,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<celcon_length_of_supports>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x55,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @celcon_length_of_supports(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %3
%8 = load i32*, i32** %4
%9 = load double*, double** %6
%10 = call i32 @_ada_use_c2phc4c(i32 85, i32* %7, i32* %8, double* %9, i32 0)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @celcon_length_of_supports(i32* %0, i32* %1) {
%3 = tail call i32 @_ada_use_c2phc4c(i32 85, i32* %0, i32* %1, double* undef, i32 0)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ lisys_error_set(int, int /*<<< orphan*/ *);
char *lisys_user_get_name(int uid) {
  lisys_error_set(1024, NULL);
  return NULL;
}


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

x86 assembly (clang, -O2):
<lisys_user_get_name>:
push   %rax
mov    $0x400,%edi
xor    %esi,%esi
call   1030 <lisys_error_set@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @lisys_user_get_name(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @lisys_error_set(i32 1024, i32* null)
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @lisys_user_get_name(i32 %0) {
%2 = tail call i32 @lisys_error_set(i32 1024, i32* null)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ atmel_atmega_PB4_clear__E();
int /*<<< orphan*/ atmel_atmega_PB4_makeOutput__E();
void test121_Test_01_pollen__ready__E() {
  atmel_atmega_PB4_clear__E();
  atmel_atmega_PB4_makeOutput__E();
}


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

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

LLVM IR (-O0):
define void @test121_Test_01_pollen__ready__E() {
%1 = call i32 (...) @atmel_atmega_PB4_clear__E()
%2 = call i32 (...) @atmel_atmega_PB4_makeOutput__E()
ret void
}

LLVM IR (-O2):
define void @test121_Test_01_pollen__ready__E() {
%1 = tail call i32 (...) @atmel_atmega_PB4_clear__E()
%2 = tail call i32 (...) @atmel_atmega_PB4_makeOutput__E()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int system(char *);
void stop_camera() {
  int rc = system("pkill capture");
  printf("Stop camera: %s\n", rc ? "Not ok" : "Ok");
}


x86 assembly (clang, -O0):
<stop_camera>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <system@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
lea    0xee5(%rip),%rsi
lea    0xed7(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop_camera>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <system@plt>
test   %eax,%eax
lea    0xef0(%rip),%rax
lea    0xee2(%rip),%rsi
cmove  %rax,%rsi
lea    0xec6(%rip),%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"pkill capture\00"
@.str.1 = [17 x i8] c"Stop camera: %s\0A\00"
@.str.2 = [7 x i8] c"Not ok\00"
@.str.3 = [3 x i8] c"Ok\00"
define void @stop_camera() {
%1 = alloca i32
%2 = call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"pkill capture\00"
@.str.1 = [17 x i8] c"Stop camera: %s\0A\00"
@.str.2 = [7 x i8] c"Not ok\00"
@.str.3 = [3 x i8] c"Ok\00"
define void @stop_camera() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}
/* Type definitions */
typedef size_t ssize_t;

/* Variables and functions */
int /*<<< orphan*/ perror(char *);
size_t write(int, void const *, size_t);
ssize_t write_wrapper(int fd, const void *buf, size_t count) {
  ssize_t s;
  if ((s = write(fd, buf, count)) < count)
    perror("write");
  return s;
}


x86 assembly (clang, -O0):
<write_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %rax,-0x20(%rbp)
cmp    -0x18(%rbp),%rax
jae    115d <write_wrapper+0x3d>
lea    0xea8(%rip),%rdi
call   1040 <perror@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_wrapper>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%rbx
call   1030 <write@plt>
mov    %rax,%r14
cmp    %rbx,%rax
jb     113f <write_wrapper+0x1f>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xeba(%rip),%rdi
call   1040 <perror@plt>
jmp    1134 <write_wrapper+0x14>

LLVM IR (-O0):
@.str = [6 x i8] c"write\00"
define i64 @write_wrapper(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i64 @write(i32 %8, i8* %9, i64 %10)
store i64 %11, i64* %7
%12 = load i64, i64* %6
%13 = icmp ult i64 %11, %12
br i1 %13, label %14, label %16
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %16
16: ; preds = %14, %3
%17 = load i64, i64* %7
ret i64 %17
}

LLVM IR (-O2):
@.str = [6 x i8] c"write\00"
define i64 @write_wrapper(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i64 @write(i32 %0, i8* %1, i64 %2)
%5 = icmp ult i64 %4, %2
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ init_gen8_instdone();
void init_gen9_instdone(void) { init_gen8_instdone(); }


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

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

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

LLVM IR (-O2):
define void @init_gen9_instdone() {
%1 = tail call i32 (...) @init_gen8_instdone()
ret void
}
void foo_2_1_1_1_1_2_2_1_2() {}


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

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

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

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