xunge/DecIR huggingface dataset:
/* Variables and functions */
int bbm_write(void *, unsigned short, unsigned short, unsigned char);
int bbm_com_write(void *handle, unsigned short devid, unsigned short addr,
                  unsigned char data) {
  int res;
  res = bbm_write(handle, devid, addr, data);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %dx,%cx
mov    %si,%dx
mov    %rdi,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %cx,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%cx
mov    -0xc(%rbp),%ax
movzwl %cx,%esi
movzwl %ax,%edx
movzbl -0xd(%rbp),%ecx
call   1030 <bbm_write@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_write>:
jmp    1030 <bbm_write@plt>

LLVM IR (-O0):
define i32 @bbm_com_write(i8* %0, i16 zeroext %1, i16 zeroext %2, i8 zeroext %3) {
%5 = alloca i8*
%6 = alloca i16
%7 = alloca i16
%8 = alloca i8
%9 = alloca i32
store i8* %0, i8** %5
store i16 %1, i16* %6
store i16 %2, i16* %7
store i8 %3, i8* %8
%10 = load i8*, i8** %5
%11 = load i16, i16* %6
%12 = load i16, i16* %7
%13 = load i8, i8* %8
%14 = call i32 @bbm_write(i8* %10, i16 zeroext %11, i16 zeroext %12, i8 zeroext %13)
store i32 %14, i32* %9
%15 = load i32, i32* %9
ret i32 %15
}

LLVM IR (-O2):
define i32 @bbm_com_write(i8* %0, i16 zeroext %1, i16 zeroext %2, i8 zeroext %3) {
%5 = tail call i32 @bbm_write(i8* %0, i16 zeroext %1, i16 zeroext %2, i8 zeroext %3)
ret i32 %5
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
scalar_t__ iswalnum(int);
scalar_t__ xmbtowc(int *, char const *);
int isword(const char *s) {
  wchar_t wc;
  if (xmbtowc(&wc, s) == 0)
    return 0;
  return iswalnum(wc) || wc == L'_';
}


x86 assembly (clang, -O0):
<isword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdi
call   1030 <xmbtowc@plt>
cmp    $0x0,%rax
jne    114f <isword+0x2f>
movl   $0x0,-0x4(%rbp)
jmp    117e <isword+0x5e>
mov    -0x14(%rbp),%edi
call   1040 <iswalnum@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x15(%rbp)
jne    1173 <isword+0x53>
cmpl   $0x5f,-0x14(%rbp)
sete   %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isword>:
push   %rax
mov    %rdi,%rsi
lea    0x4(%rsp),%rdi
call   1030 <xmbtowc@plt>
test   %rax,%rax
je     1151 <isword+0x31>
mov    0x4(%rsp),%edi
call   1040 <iswalnum@plt>
test   %rax,%rax
setne  %al
cmpl   $0x5f,0x4(%rsp)
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isword(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i64 @xmbtowc(i32* %4, i8* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %19
9: ; preds = %1
%10 = load i32, i32* %4
%11 = call i64 @iswalnum(i32 %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %16, label %13
13: ; preds = %9
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 95
br label %16
16: ; preds = %13, %9
%17 = phi i1 [ true, %9 ], [ %15, %13 ]
%18 = zext i1 %17 to i32
store i32 %18, i32* %2
br label %19
19: ; preds = %16, %8
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @isword(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i64 @xmbtowc(i32* %2, i8* %0)
%5 = icmp eq i64 %4, 0
br i1 %5, label %14, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i64 @iswalnum(i32 %7)
%9 = icmp ne i64 %8, 0
%10 = load i32, i32* %2
%11 = icmp eq i32 %10, 95
%12 = select i1 %9, i1 true, i1 %11
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %1, %6
%15 = phi i32 [ %13, %6 ], [ 0, %1 ]
ret i32 %15
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
char _get_digit(uint64_t *fr, int *digit_count) {
  int rval;
  if (*digit_count > 0) {
    *digit_count -= 1;
    *fr = *fr * 10;
    rval = ((*fr >> 60) & 0xF) + '0';
    *fr &= 0x0FFFFFFFFFFFFFFFull;
  } else {
    rval = '0';
  }
  return (char)(rval);
}


x86 assembly (clang, -O0):
<_get_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
jle    1162 <_get_digit+0x62>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
imul   $0xa,(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    $0x3c,%ecx
sar    %cl,%eax
and    $0xf,%eax
add    $0x30,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq (%rax),%rcx
movabs $0xfffffffffffffff,%rdx
ff ff 0f
and    %rdx,%rcx
mov    %ecx,(%rax)
jmp    1169 <_get_digit+0x69>
movl   $0x30,-0x14(%rbp)
mov    -0x14(%rbp),%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_digit>:
mov    (%rsi),%eax
test   %eax,%eax
jle    1114 <_get_digit+0x14>
add    $0xffffffff,%eax
mov    %eax,(%rsi)
mov    (%rdi),%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    %eax,(%rdi)
mov    $0x30,%al
ret

LLVM IR (-O0):
define signext i8 @_get_digit(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %27
9: ; preds = %2
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = sub nsw i32 %11, 1
store i32 %12, i32* %10
%13 = load i32*, i32** %3
%14 = load i32, i32* %13
%15 = mul nsw i32 %14, 10
%16 = load i32*, i32** %3
store i32 %15, i32* %16
%17 = load i32*, i32** %3
%18 = load i32, i32* %17
%19 = ashr i32 %18, 60
%20 = and i32 %19, 15
%21 = add nsw i32 %20, 48
store i32 %21, i32* %5
%22 = load i32*, i32** %3
%23 = load i32, i32* %22
%24 = sext i32 %23 to i64
%25 = and i64 %24, 1152921504606846975
%26 = trunc i64 %25 to i32
store i32 %26, i32* %22
br label %28
27: ; preds = %2
store i32 48, i32* %5
br label %28
28: ; preds = %27, %9
%29 = load i32, i32* %5
%30 = trunc i32 %29 to i8
ret i8 %30
}

LLVM IR (-O2):
define signext i8 @_get_digit(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = add nsw i32 %3, -1
store i32 %6, i32* %1
%7 = load i32, i32* %0
%8 = mul nsw i32 %7, 10
store i32 %8, i32* %0
br label %9
9: ; preds = %2, %5
ret i8 48
}
int second_level_function(int i) { return i * 2; }


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

x86 assembly (clang, -O2):
<second_level_function>:
lea    (%rdi,%rdi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @second_level_function(i32 %0) {
%2 = shl nsw i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(unsigned long volatile);
unsigned long SysCtlPWMClockGet(void) {
  DEBUG_ASSERT((*((volatile unsigned long *)(0x400FE010))) & 0x00100000);
  if (!((*((volatile unsigned long *)(0x400FE060))) & 0x00100000)) {
    return (0x00000000);
  } else {
    return ((*((volatile unsigned long *)(0x400FE060))) &
            (0x00100000 | 0x000E0000));
  }
}


x86 assembly (clang, -O0):
<SysCtlPWMClockGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x400fe010,%eax
mov    (%rax),%rdi
and    $0x100000,%rdi
call   1030 <DEBUG_ASSERT@plt>
mov    $0x400fe060,%eax
mov    (%rax),%rax
and    $0x100000,%rax
cmp    $0x0,%rax
jne    1151 <SysCtlPWMClockGet+0x41>
movq   $0x0,-0x8(%rbp)
jmp    1163 <SysCtlPWMClockGet+0x53>
mov    $0x400fe060,%eax
mov    (%rax),%rax
and    $0x1e0000,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlPWMClockGet>:
push   %rax
mov    0x400fe010,%rdi
40
and    $0x100000,%edi
call   1030 <DEBUG_ASSERT@plt>
testq  $0x100000,0x400fe060
jne    1136 <SysCtlPWMClockGet+0x26>
xor    %eax,%eax
pop    %rcx
ret
mov    0x400fe060,%rax
40
and    $0x1e0000,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @SysCtlPWMClockGet() {
%1 = alloca i64
%2 = load volatile i64, i64* inttoptr (i64 1074782224 to i64*)
%3 = and i64 %2, 1048576
%4 = call i32 @DEBUG_ASSERT(i64 %3)
%5 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%6 = and i64 %5, 1048576
%7 = icmp ne i64 %6, 0
br i1 %7, label %9, label %8
8: ; preds = %0
store i64 0, i64* %1
br label %12
9: ; preds = %0
%10 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%11 = and i64 %10, 1966080
store i64 %11, i64* %1
br label %12
12: ; preds = %9, %8
%13 = load i64, i64* %1
ret i64 %13
}

LLVM IR (-O2):
define i64 @SysCtlPWMClockGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074782224 to i64*)
%2 = and i64 %1, 1048576
%3 = tail call i32 @DEBUG_ASSERT(i64 %2)
%4 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%5 = and i64 %4, 1048576
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %0
%8 = load volatile i64, i64* inttoptr (i64 1074782304 to i64*)
%9 = and i64 %8, 1966080
br label %10
10: ; preds = %0, %7
%11 = phi i64 [ %9, %7 ], [ 0, %0 ]
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ __print_float(float);
int main() {
  float a;
  a = 9.13;
  __print_float(a);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @__print_float(float 0x4022428F60000000)
ret i32 0
}
void gf8mul_00011101(void) {
  __asm__ __volatile__("\tpxor    %xmm7, %xmm3\n"
                       "\tpxor    %xmm7, %xmm2\n"
                       "\tpxor    %xmm7, %xmm1\n"
                       "\tpxor    %xmm6, %xmm2\n"
                       "\tpxor    %xmm6, %xmm1\n"
                       "\tpxor    %xmm6, %xmm0\n"
                       "\tpxor    %xmm5, %xmm7\n"
                       "\tpxor    %xmm5, %xmm1\n"
                       "\tpxor    %xmm5, %xmm0\n"
                       "\tpxor    %xmm4, %xmm7\n"
                       "\tpxor    %xmm4, %xmm6\n"
                       "\tpxor    %xmm4, %xmm0\n"
                       "\tpxor    %xmm3, %xmm7\n"
                       "\tpxor    %xmm3, %xmm6\n"
                       "\tpxor    %xmm3, %xmm5\n"
                       "\tpxor    %xmm2, %xmm6\n"
                       "\tpxor    %xmm2, %xmm5\n"
                       "\tpxor    %xmm2, %xmm4\n"
                       "\tpxor    %xmm1, %xmm5\n"
                       "\tpxor    %xmm1, %xmm4\n"
                       "\tpxor    %xmm1, %xmm3\n"
                       "\tpxor    %xmm0, %xmm4\n"
                       "\tpxor    %xmm0, %xmm3\n"
                       "\tpxor    %xmm0, %xmm2\n");
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
pxor   %xmm7,%xmm3
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm6,%xmm2
pxor   %xmm6,%xmm1
pxor   %xmm6,%xmm0
pxor   %xmm5,%xmm7
pxor   %xmm5,%xmm1
pxor   %xmm5,%xmm0
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm6
pxor   %xmm4,%xmm0
pxor   %xmm3,%xmm7
pxor   %xmm3,%xmm6
pxor   %xmm3,%xmm5
pxor   %xmm2,%xmm6
pxor   %xmm2,%xmm5
pxor   %xmm2,%xmm4
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm4
pxor   %xmm1,%xmm3
pxor   %xmm0,%xmm4
pxor   %xmm0,%xmm3
pxor   %xmm0,%xmm2
pop    %rbp
ret

x86 assembly (clang, -O2):
pxor   %xmm7,%xmm3
pxor   %xmm7,%xmm2
pxor   %xmm7,%xmm1
pxor   %xmm6,%xmm2
pxor   %xmm6,%xmm1
pxor   %xmm6,%xmm0
pxor   %xmm5,%xmm7
pxor   %xmm5,%xmm1
pxor   %xmm5,%xmm0
pxor   %xmm4,%xmm7
pxor   %xmm4,%xmm6
pxor   %xmm4,%xmm0
pxor   %xmm3,%xmm7
pxor   %xmm3,%xmm6
pxor   %xmm3,%xmm5
pxor   %xmm2,%xmm6
pxor   %xmm2,%xmm5
pxor   %xmm2,%xmm4
pxor   %xmm1,%xmm5
pxor   %xmm1,%xmm4
pxor   %xmm1,%xmm3
pxor   %xmm0,%xmm4
pxor   %xmm0,%xmm3
pxor   %xmm0,%xmm2
ret

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

LLVM IR (-O2):
define void @gf8mul_00011101() {
tail call void asm sideeffect "\09pxor %xmm7, %xmm3\0A\09pxor %xmm7, %xmm2\0A\09pxor %xmm7, %xmm1\0A\09pxor %xmm6, %xmm2\0A\09pxor %xmm6, %xmm1\0A\09pxor %xmm6, %xmm0\0A\09pxor %xmm5, %xmm7\0A\09pxor %xmm5, %xmm1\0A\09pxor %xmm5, %xmm0\0A\09pxor %xmm4, %xmm7\0A\09pxor %xmm4, %xmm6\0A\09pxor %xmm4, %xmm0\0A\09pxor %xmm3, %xmm7\0A\09pxor %xmm3, %xmm6\0A\09pxor %xmm3, %xmm5\0A\09pxor %xmm2, %xmm6\0A\09pxor %xmm2, %xmm5\0A\09pxor %xmm2, %xmm4\0A\09pxor %xmm1, %xmm5\0A\09pxor %xmm1, %xmm4\0A\09pxor %xmm1, %xmm3\0A\09pxor %xmm0, %xmm4\0A\09pxor %xmm0, %xmm3\0A\09pxor %xmm0, %xmm2\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
char test_char_8(char a, char b, char c, char d, char e, char f, char g,
                 char h) {
  return '9';
}


x86 assembly (clang, -O0):
<test_char_8>:
push   %rbp
mov    %rsp,%rbp
mov    %r8d,-0x18(%rbp)
mov    %ecx,%eax
mov    -0x18(%rbp),%ecx
mov    %eax,-0x14(%rbp)
mov    %edx,%eax
mov    -0x14(%rbp),%edx
mov    %eax,-0x10(%rbp)
mov    %esi,%eax
mov    -0x10(%rbp),%esi
mov    %eax,-0xc(%rbp)
mov    %edi,%r8d
mov    -0xc(%rbp),%edi
mov    %r9b,%al
mov    0x18(%rbp),%r9b
mov    0x10(%rbp),%r9b
mov    %r8b,-0x1(%rbp)
mov    %dil,-0x2(%rbp)
mov    %sil,-0x3(%rbp)
mov    %dl,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    $0x39,%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_char_8>:
mov    $0x39,%al
ret

LLVM IR (-O0):
define signext i8 @test_char_8(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3, i8 signext %4, i8 signext %5, i8 signext %6, i8 signext %7) {
%9 = alloca i8
%10 = alloca i8
%11 = alloca i8
%12 = alloca i8
%13 = alloca i8
%14 = alloca i8
%15 = alloca i8
%16 = alloca i8
store i8 %0, i8* %9
store i8 %1, i8* %10
store i8 %2, i8* %11
store i8 %3, i8* %12
store i8 %4, i8* %13
store i8 %5, i8* %14
store i8 %6, i8* %15
store i8 %7, i8* %16
ret i8 57
}

LLVM IR (-O2):
define signext i8 @test_char_8(i8 signext %0, i8 signext %1, i8 signext %2, i8 signext %3, i8 signext %4, i8 signext %5, i8 signext %6, i8 signext %7) {
ret i8 57
}
__attribute__((always_)) void kernel_map_pages(struct page *page, int numpages,
                                               int enable) {}


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

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

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

LLVM IR (-O2):
%struct.page = type opaque
define void @kernel_map_pages(%struct.page* nocapture %0, i32 %1, i32 %2) {
ret void
}
/* Variables and functions */
float floor(float);
float saw(float x) { return x - floor(x); }


x86 assembly (clang, -O0):
<saw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <floor@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
subss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saw>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <floorf@plt>
movss  0x4(%rsp),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @saw(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = call float @floor(float %4)
%6 = fsub float %3, %5
ret float %6
}

LLVM IR (-O2):
define float @saw(float %0) {
%2 = tail call float @llvm.floor.f32(float %0)
%3 = fsub float %0, %2
ret float %3
}
void gtk_hscale_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hscale_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float amount, tax;
  printf("Enter an amount: ");
  scanf("%f", &amount);
  tax = (amount / 100) * 5;
  printf("With tax added: $%.2f\n", (amount + tax));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  0xeaa(%rip),%xmm1
divss  %xmm1,%xmm0
movss  0xe9a(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe99(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movaps %xmm0,%xmm1
divss  0xeaf(%rip),%xmm1
mulss  0xeab(%rip),%xmm1
addss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
lea    0xeb2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"Enter an amount: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [23 x i8] c"With tax added: $%.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%6 = load float, float* %2
%7 = fdiv float %6, 1.000000e+02
%8 = fmul float %7, 5.000000e+00
store float %8, float* %3
%9 = load float, float* %2
%10 = load float, float* %3
%11 = fadd float %9, %10
%12 = fpext float %11 to double
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"Enter an amount: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [23 x i8] c"With tax added: $%.2f\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fdiv float %5, 1.000000e+02
%7 = fmul float %6, 5.000000e+00
%8 = fadd float %5, %7
%9 = fpext float %8 to double
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %9)
ret i32 0
}
int putchar2(int ch) {
  while (!((*(volatile unsigned int *)((0x3FF0000 + 0xE008))) & 0x40))
    ;
  (*(volatile unsigned int *)((0x3FF0000 + 0xE00C)) = (ch));
  return 0;
}


x86 assembly (clang, -O0):
<putchar2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x3ffe008,%eax
mov    (%rax),%eax
and    $0x40,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1126 <putchar2+0x26>
jmp    112b <putchar2+0x2b>
jmp    1107 <putchar2+0x7>
mov    -0x4(%rbp),%ecx
mov    $0x3ffe00c,%eax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar2>:
testl  $0x40,0x3ffe008
je     1100 <putchar2>
mov    %edi,0x3ffe00c
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @putchar2(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %8, %1
%4 = load volatile i32, i32* inttoptr (i64 67100680 to i32*)
%5 = and i32 %4, 64
%6 = icmp ne i32 %5, 0
%7 = xor i1 %6, true
br i1 %7, label %8, label %9
8: ; preds = %3
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
store volatile i32 %10, i32* inttoptr (i64 67100684 to i32*)
ret i32 0
}

LLVM IR (-O2):
define i32 @putchar2(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = load volatile i32, i32* inttoptr (i64 67100680 to i32*)
%4 = and i32 %3, 64
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
store volatile i32 %0, i32* inttoptr (i64 67100684 to i32*)
ret i32 0
}
/* Variables and functions */
bool _MP_IndexMasterPage(size_t idx) {
  return (idx <= 8) ? true : ((idx & (8 - 1)) == 0);
}


x86 assembly (clang, -O0):
<_MP_IndexMasterPage>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x8,-0x8(%rbp)
ja     1120 <_MP_IndexMasterPage+0x20>
mov    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <_MP_IndexMasterPage+0x37>
mov    -0x8(%rbp),%rax
and    $0x7,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_MP_IndexMasterPage>:
cmp    $0x9,%rdi
setb   %al
test   $0x7,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @_MP_IndexMasterPage(i64 %0) {
%2 = icmp ult i64 %0, 9
%3 = and i64 %0, 7
%4 = icmp eq i64 %3, 0
%5 = or i1 %2, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ modf(double, double *);
double trunczerod(double f) {
  double intpart;
  modf(f, &intpart);
  return intpart;
}


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

x86 assembly (clang, -O2):
<trunczerod>:
push   %rax
mov    %rsp,%rdi
call   1030 <modf@plt>
movsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @trunczerod(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = call i32 @modf(double %4, double* %3)
%6 = load double, double* %3
ret double %6
}

LLVM IR (-O2):
define double @trunczerod(double %0) {
%2 = alloca double
%3 = bitcast double* %2 to i8*
%4 = call i32 @modf(double %0, double* %2)
%5 = load double, double* %2
ret double %5
}
void DRM_vfree(file, line, func, ptr) char *file, *func;
int line;
void *ptr;
{
  DRM_del(ptr);
  vfree(ptr);
}


x86 assembly (clang, -O0):
<DRM_vfree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1030 <DRM_del@plt>
mov    -0x20(%rbp),%rdi
mov    $0x0,%al
call   1040 <vfree@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DRM_vfree>:
push   %rbx
mov    %rcx,%rbx
mov    %rcx,%rdi
xor    %eax,%eax
call   1030 <DRM_del@plt>
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <vfree@plt>

LLVM IR (-O0):
define void @DRM_vfree(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %8
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @DRM_del to i32 (i8*, ...)*)(i8* %9)
%11 = load i8*, i8** %8
%12 = call i32 (i8*, ...) bitcast (i32 (...)* @vfree to i32 (i8*, ...)*)(i8* %11)
ret void
}

LLVM IR (-O2):
define void @DRM_vfree(i8* nocapture readnone %0, i32 %1, i8* nocapture readnone %2, i8* %3) {
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @DRM_del to i32 (i8*, ...)*)(i8* %3)
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @vfree to i32 (i8*, ...)*)(i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint32_t;

/* Variables and functions */
uint32_t UINT32(const void *const ptr) { return *(const uint32_t *const)ptr; }


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

x86 assembly (clang, -O2):
<UINT32>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @UINT32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @UINT32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ shutdown();
int /*<<< orphan*/ signal(int, int /*<<< orphan*/);
void shutdown_sig(int sig) {
  signal(sig, SIG_IGN);
  shutdown();
}


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

x86 assembly (clang, -O2):
<shutdown_sig>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1040 <signal@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <shutdown@plt>

LLVM IR (-O0):
@SIG_IGN = global i32 0
define void @shutdown_sig(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIG_IGN
%5 = call i32 @signal(i32 %3, i32 %4)
%6 = call i32 (...) @shutdown()
ret void
}

LLVM IR (-O2):
@SIG_IGN = global i32 0
define void @shutdown_sig(i32 %0) {
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %0, i32 %2)
%4 = tail call i32 (...) @shutdown()
ret void
}
void null_timestamp(void *ui) {}


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

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

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

LLVM IR (-O2):
define void @null_timestamp(i8* nocapture %0) {
ret void
}
int extn_initialise(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @extn_initialise() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *, int);
int /*<<< orphan*/ stderr;
void docheck(int condition, const char *msg, int x) {
  if (!condition) {
    fprintf(stderr, "%s failed for character 0x%02x\n", msg, x);
    abort();
  }
}


x86 assembly (clang, -O0):
<docheck>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    115f <docheck+0x3f>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xead(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<docheck>:
test   %edi,%edi
je     1125 <docheck+0x5>
ret
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"%s failed for character 0x%02x\0A\00"
define void @docheck(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %15, label %9
9: ; preds = %3
%10 = load i32, i32* @stderr
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @fprintf(i32 %10, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12)
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %3
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"%s failed for character 0x%02x\0A\00"
define void @docheck(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %9
5: ; preds = %3
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %2)
%8 = tail call i32 (...) @abort()
unreachable
9: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tan(int /*<<< orphan*/);
int /*<<< orphan*/ wPopNumber();
int /*<<< orphan*/ wPushNumber(int /*<<< orphan*/);
void wBasTan() { wPushNumber(tan(wPopNumber())); }


x86 assembly (clang, -O0):
<wBasTan>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <tan@plt>
mov    %eax,%edi
call   1030 <wPushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wBasTan>:
push   %rax
xor    %eax,%eax
call   1040 <wPopNumber@plt>
mov    %eax,%edi
call   1050 <tan@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <wPushNumber@plt>

LLVM IR (-O0):
define void @wBasTan() {
%1 = call i32 (...) @wPopNumber()
%2 = call i32 @tan(i32 %1)
%3 = call i32 @wPushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @wBasTan() {
%1 = tail call i32 (...) @wPopNumber()
%2 = tail call i32 @tan(i32 %1)
%3 = tail call i32 @wPushNumber(i32 %2)
ret void
}
unsigned short mus_char_to_ubshort(const unsigned char *inp) {
  unsigned short o;
  unsigned char *outp;
  outp = (unsigned char *)&o;
  outp[0] = inp[0];
  outp[1] = inp[1];
  return (o);
}


x86 assembly (clang, -O0):
<mus_char_to_ubshort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x1(%rax)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @mus_char_to_ubshort(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %3
%5 = zext i8 %4 to i16
%6 = shl nuw i16 %5, 8
%7 = zext i8 %2 to i16
%8 = or i16 %6, %7
ret i16 %8
}
void end_mutex(volatile int *lock) { *lock = 0; }


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

x86 assembly (clang, -O2):
<end_mutex>:
movl   $0x0,(%rdi)
ret

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

LLVM IR (-O2):
define void @end_mutex(i32* %0) {
store volatile i32 0, i32* %0
ret void
}
void PS_NullRestoreGraphicState(void) {}


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

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

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

LLVM IR (-O2):
define void @PS_NullRestoreGraphicState() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void cprint_(char *c) { printf("%s", c); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @cprint_(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int blankdiff(int big, int small) {
  int i = 1, j = 1;
  while (big >= 10) {
    big /= 10;
    i++;
  }
  while (small >= 10) {
    small /= 10;
    j++;
  }
  return (i - j);
}


x86 assembly (clang, -O0):
<blankdiff>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0xa,-0x4(%rbp)
jl     113e <blankdiff+0x3e>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1118 <blankdiff+0x18>
jmp    1143 <blankdiff+0x43>
cmpl   $0xa,-0x8(%rbp)
jl     1169 <blankdiff+0x69>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1143 <blankdiff+0x43>
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<blankdiff>:
mov    $0x1,%ecx
mov    $0x1,%eax
cmp    $0xa,%edi
jl     1134 <blankdiff+0x34>
mov    $0x1,%eax
mov    $0xcccccccd,%r8d
nopw   0x0(%rax,%rax,1)
mov    %edi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
add    $0x1,%eax
cmp    $0x63,%edi
mov    %edx,%edi
ja     1120 <blankdiff+0x20>
cmp    $0xa,%esi
jl     1164 <blankdiff+0x64>
mov    $0x1,%ecx
mov    $0xcccccccd,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %esi,%edi
imul   %rdx,%rdi
shr    $0x23,%rdi
add    $0x1,%ecx
cmp    $0x63,%esi
mov    %edi,%esi
ja     1150 <blankdiff+0x50>
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @blankdiff(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 9
br i1 %3, label %7, label %4
4: ; preds = %7, %2
%5 = phi i32 [ 1, %2 ], [ %11, %7 ]
%6 = icmp sgt i32 %1, 9
br i1 %6, label %13, label %19
7: ; preds = %2, %7
%8 = phi i32 [ %11, %7 ], [ 1, %2 ]
%9 = phi i32 [ %10, %7 ], [ %0, %2 ]
%10 = udiv i32 %9, 10
%11 = add nuw nsw i32 %8, 1
%12 = icmp ugt i32 %9, 99
br i1 %12, label %7, label %4
13: ; preds = %4, %13
%14 = phi i32 [ %17, %13 ], [ 1, %4 ]
%15 = phi i32 [ %16, %13 ], [ %1, %4 ]
%16 = udiv i32 %15, 10
%17 = add nuw nsw i32 %14, 1
%18 = icmp ugt i32 %15, 99
br i1 %18, label %13, label %19
19: ; preds = %13, %4
%20 = phi i32 [ 1, %4 ], [ %17, %13 ]
%21 = sub nsw i32 %5, %20
ret i32 %21
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *prgname) {
  fprintf(stderr, "%s\n\n",
          "Spindle 2.1 by lft, http://www.linusakesson.net/software/spindle/");
  fprintf(stderr,
          "Usage: %s [-o out.pef] effect.efo [additional-file.prg ...]\n",
          prgname);
  exit(1);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb2(%rip),%r14
mov    (%r14),%edi
lea    0xec8(%rip),%rsi
lea    0xec6(%rip),%rdx
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xef9(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [5 x i8] c"%s\0A\0A\00"
@.str.1 = [66 x i8] c"Spindle 2.1 by lft, http://www.linusakesson.net/software/spindle/\00"
@.str.2 = [61 x i8] c"Usage: %s [-o out.pef] effect.efo [additional-file.prg ...]\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %2
%7 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0), i8* %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [5 x i8] c"%s\0A\0A\00"
@.str.1 = [66 x i8] c"Spindle 2.1 by lft, http://www.linusakesson.net/software/spindle/\00"
@.str.2 = [61 x i8] c"Usage: %s [-o out.pef] effect.efo [additional-file.prg ...]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.1, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ stderr;
void die(char *str) {
  fprintf(stderr, "%s, errno %d", str, errno);
  exit(1);
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [13 x i8] c"%s, errno %d\00"
@errno = global i32 0
define void @die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
%5 = tail call i32 @exit(i32 1)
unreachable
}
void gtk_widget_show_now() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_scale_set_digits() {
ret void
}
void INI_Rename_ffnc_ctx() { ; }


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

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

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

LLVM IR (-O2):
define void @INI_Rename_ffnc_ctx() {
ret void
}
float RGBToGrayF(float r, float g, float b) {
  return 0.299f * r + 0.587f * g + 0.114f * b;
}


x86 assembly (clang, -O0):
<RGBToGrayF>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  0xee8(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  0xed7(%rip),%xmm2
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0xc(%rbp),%xmm0
movss  0xebe(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<RGBToGrayF>:
mulss  0xef8(%rip),%xmm1
mulss  0xef4(%rip),%xmm0
addss  %xmm1,%xmm0
mulss  0xeec(%rip),%xmm2
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @RGBToGrayF(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fmul float 0x3FE2C8B440000000, %8
%10 = call float @llvm.fmuladd.f32(float 0x3FD322D0E0000000, float %7, float %9)
%11 = load float, float* %6
%12 = call float @llvm.fmuladd.f32(float 0x3FBD2F1AA0000000, float %11, float %10)
ret float %12
}

LLVM IR (-O2):
define float @RGBToGrayF(float %0, float %1, float %2) {
%4 = fmul float %1, 0x3FE2C8B440000000
%5 = tail call float @llvm.fmuladd.f32(float %0, float 0x3FD322D0E0000000, float %4)
%6 = tail call float @llvm.fmuladd.f32(float %2, float 0x3FBD2F1AA0000000, float %5)
ret float %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_queue_push() {
  printf("NOT IMPLEMENTED:"
         "pa_queue_push"
         "\n");
}


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

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

LLVM IR (-O2):
@str = [30 x i8] c"NOT IMPLEMENTED:pa_queue_push\00"
define i32 @pa_queue_push() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int strncasecmp(void const *, void const *, int);
int mymemicmp(const void *buf1, const void *buf2, int count) {
  return (strncasecmp(buf1, buf2, count));
}


x86 assembly (clang, -O0):
<mymemicmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <strncasecmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymemicmp>:
jmp    1030 <strncasecmp@plt>

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

LLVM IR (-O2):
define i32 @mymemicmp(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @strncasecmp(i8* %0, i8* %1, i32 %2)
ret i32 %4
}
int f3(int y, int x) {
  int a = x | y;
  return x & a;
}


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

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

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

LLVM IR (-O2):
define i32 @f3(i32 %0, i32 returned %1) {
ret i32 %1
}
int test_imm_8Cint32_reg(int val) { return ((val) & (0x8C << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_8Cint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x8c,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_8Cint32_reg>:
test   $0x8c,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Cint32_reg(i32 %0) {
%2 = and i32 %0, 140
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void handler(void *data) {
  printf("handler %d has been activated\n", (int)(intptr_t)data);
}


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

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

LLVM IR (-O0):
@.str = [31 x i8] c"handler %d has been activated\0A\00"
define void @handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
%6 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"handler %d has been activated\0A\00"
define void @handler(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(char);
int /*<<< orphan*/ outd2(long);
void outdec(long number) {
  if (number < 0) {
    number = -number;
    outbyte('-');
  }
  outd2(number);
}


x86 assembly (clang, -O0):
<outdec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    114b <outdec+0x2b>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    $0x2d,%edi
call   1040 <outbyte@plt>
mov    -0x8(%rbp),%rdi
call   1030 <outd2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outdec>:
push   %rbx
mov    %rdi,%rbx
test   %rdi,%rdi
jns    1136 <outdec+0x16>
neg    %rbx
mov    $0x2d,%edi
call   1040 <outbyte@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <outd2@plt>

LLVM IR (-O0):
define void @outdec(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = sub nsw i64 0, %6
store i64 %7, i64* %2
%8 = call i32 @outbyte(i8 signext 45)
br label %9
9: ; preds = %5, %1
%10 = load i64, i64* %2
%11 = call i32 @outd2(i64 %10)
ret void
}

LLVM IR (-O2):
define void @outdec(i64 %0) {
%2 = icmp slt i64 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = sub nsw i64 0, %0
%5 = tail call i32 @outbyte(i8 signext 45)
br label %6
6: ; preds = %3, %1
%7 = phi i64 [ %4, %3 ], [ %0, %1 ]
%8 = tail call i32 @outd2(i64 %7)
ret void
}