xunge/DecIR huggingface dataset:
void print_warning(warn_no) int warn_no;
{
  switch (warn_no) {
  case 1:
    puts("\n\n               Problem with toolkit binary\n");
    puts("\n  Contents of .Berr (may not be relevant):\n\n");
    system("cat .Berr");
    break;
  }
}


x86 assembly (clang, -O0):
<print_warning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
jne    1166 <print_warning+0x46>
jmp    113c <print_warning+0x1c>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xefd(%rip),%rdi
mov    $0x0,%al
call   1040 <system@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_warning>:
cmp    $0x1,%edi
jne    1151 <print_warning+0x31>
push   %rax
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xef3(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xf13(%rip),%rdi
xor    %eax,%eax
pop    %rcx
jmp    1040 <system@plt>
ret

LLVM IR (-O0):
@.str = [46 x i8] c"\0A\0A Problem with toolkit binary\0A\00"
@.str.1 = [46 x i8] c"\0A Contents of .Berr (may not be relevant):\0A\0A\00"
@.str.2 = [10 x i8] c"cat .Berr\00"
define void @print_warning(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %8 [
i32 1, label %4
]
4: ; preds = %1
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %8
8: ; preds = %1, %4
ret void
}

LLVM IR (-O2):
@.str = [46 x i8] c"\0A\0A Problem with toolkit binary\0A\00"
@.str.1 = [46 x i8] c"\0A Contents of .Berr (may not be relevant):\0A\0A\00"
@.str.2 = [10 x i8] c"cat .Berr\00"
define void @print_warning(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) bitcast (i32 (...)* @system to i32 (i8*, ...)*)(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %7
7: ; preds = %1, %3
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int mmio_read_32(uintptr_t);
int /*<<< orphan*/ mmio_write_32(uintptr_t, int);
void mmio_setbits_32(uintptr_t addr, uint32_t set) {
  mmio_write_32(addr, mmio_read_32(addr) | set);
}


x86 assembly (clang, -O0):
<mmio_setbits_32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <mmio_read_32@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
or     -0xc(%rbp),%esi
call   1030 <mmio_write_32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmio_setbits_32>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%r14
call   1040 <mmio_read_32@plt>
or     %eax,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mmio_write_32@plt>

LLVM IR (-O0):
define void @mmio_setbits_32(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %3
%7 = call i32 @mmio_read_32(i64 %6)
%8 = load i32, i32* %4
%9 = or i32 %7, %8
%10 = call i32 @mmio_write_32(i64 %5, i32 %9)
ret void
}

LLVM IR (-O2):
define void @mmio_setbits_32(i64 %0, i32 %1) {
%3 = tail call i32 @mmio_read_32(i64 %0)
%4 = or i32 %3, %1
%5 = tail call i32 @mmio_write_32(i64 %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void external(void) {
  static unsigned int extfuncvar;
  printf("external function\n");
}


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

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

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

LLVM IR (-O2):
@str = [18 x i8] c"external function\00"
define void @external() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str, i64 0, i64 0))
ret void
}
void BN_mod_mul_montgomery(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_mod_mul_montgomery() {
ret void
}
/* Variables and functions */
int dtx_utf8_nbytes(char *);
char *dtx_utf8_next_char(char *str) { return str + dtx_utf8_nbytes(str); }


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

x86 assembly (clang, -O2):
<dtx_utf8_next_char>:
push   %rbx
mov    %rdi,%rbx
call   1030 <dtx_utf8_nbytes@plt>
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @dtx_utf8_next_char(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @dtx_utf8_nbytes(i8* %4)
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i8, i8* %3, i64 %6
ret i8* %7
}

LLVM IR (-O2):
define i8* @dtx_utf8_next_char(i8* %0) {
%2 = tail call i32 @dtx_utf8_nbytes(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
ret i8* %4
}
/* Variables and functions */
bool ispalindromein(int number, int base) {
  int i = number;
  int result = 0;
  do {
    result = result * base + (i % base);
  } while (i /= base);
  return result == number;
}


x86 assembly (clang, -O0):
<ispalindromein>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    -0x14(%rbp),%eax
add    %edx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jne    1117 <ispalindromein+0x17>
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ispalindromein>:
xor    %ecx,%ecx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cltd
idiv   %esi
mov    %ecx,%r8d
imul   %esi,%r8d
mov    %edx,%ecx
add    %r8d,%ecx
test   %eax,%eax
jne    1110 <ispalindromein+0x10>
xor    %eax,%eax
cmp    %edi,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @ispalindromein(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
%7 = load i32, i32* %3
store i32 %7, i32* %5
store i32 0, i32* %6
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %4
%11 = mul nsw i32 %9, %10
%12 = load i32, i32* %5
%13 = load i32, i32* %4
%14 = srem i32 %12, %13
%15 = add nsw i32 %11, %14
store i32 %15, i32* %6
br label %16
16: ; preds = %8
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = sdiv i32 %18, %17
store i32 %19, i32* %5
%20 = icmp ne i32 %19, 0
br i1 %20, label %8, label %21
21: ; preds = %16
%22 = load i32, i32* %6
%23 = load i32, i32* %3
%24 = icmp eq i32 %22, %23
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @ispalindromein(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %9, %3 ]
%5 = phi i32 [ 0, %2 ], [ %8, %3 ]
%6 = mul nsw i32 %5, %1
%7 = srem i32 %4, %1
%8 = add nsw i32 %6, %7
%9 = sdiv i32 %4, %1
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %3
11: ; preds = %3
%12 = icmp eq i32 %8, %0
%13 = zext i1 %12 to i32
ret i32 %13
}
isatty(fd) int fd;
{ return 1; }


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

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

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

LLVM IR (-O2):
define i32 @isatty(i32 %0) {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ If();
void While() { If(); }


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

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

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

LLVM IR (-O2):
define void @While() {
%1 = tail call i32 (...) @If()
ret void
}
/* Variables and functions */
char *strrchr(char const *, char);
char *qfits_get_ext_name(const char *filename) {
  char *p;
  p = strrchr(filename, '.');
  return p ? p + 1 : NULL;
}


x86 assembly (clang, -O0):
<qfits_get_ext_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114a <qfits_get_ext_name+0x3a>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1155 <qfits_get_ext_name+0x45>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1155 <qfits_get_ext_name+0x45>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qfits_get_ext_name>:
push   %rax
mov    $0x2e,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rcx
test   %rax,%rax
cmovne %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i8* @qfits_get_ext_name(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strrchr(i8* %4, i8 signext 46)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %8
%13 = phi i8* [ %10, %8 ], [ null, %11 ]
ret i8* %13
}

LLVM IR (-O2):
define i8* @qfits_get_ext_name(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 46)
%3 = icmp eq i8* %2, null
%4 = getelementptr inbounds i8, i8* %2, i64 1
%5 = select i1 %3, i8* null, i8* %4
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(long long);
void ft_putnb(long long num) {
  if (num < 10)
    ft_putchar(num + '0');
  if (num >= 10) {
    ft_putnb((num / 10));
    ft_putchar((num % 10) + '0');
  }
}


x86 assembly (clang, -O0):
<ft_putnb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0xa,-0x8(%rbp)
jge    1144 <ft_putnb+0x24>
mov    -0x8(%rbp),%rdi
add    $0x30,%rdi
call   1040 <ft_putchar@plt>
cmpq   $0xa,-0x8(%rbp)
jl     117f <ft_putnb+0x5f>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,%rdi
call   1030 <ft_putnb@plt>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rdx,%rdi
add    $0x30,%rdi
call   1040 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnb>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
cmp    $0x9,%rdi
jg     1133 <ft_putnb+0x13>
add    $0x30,%rbx
jmp    1160 <ft_putnb+0x40>
movabs $0xcccccccccccccccd,%rcx
cc cc cc
mov    %rbx,%rax
mul    %rcx
mov    %rdx,%r14
shr    $0x3,%r14
mov    %r14,%rdi
call   1030 <ft_putnb@plt>
add    %r14,%r14
lea    (%r14,%r14,4),%rax
sub    %rax,%rbx
or     $0x30,%rbx
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_putnb(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp slt i64 %3, 10
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i64, i64* %2
%7 = add nsw i64 %6, 48
%8 = call i32 @ft_putchar(i64 %7)
br label %9
9: ; preds = %5, %1
%10 = load i64, i64* %2
%11 = icmp sge i64 %10, 10
br i1 %11, label %12, label %19
12: ; preds = %9
%13 = load i64, i64* %2
%14 = sdiv i64 %13, 10
%15 = load i64, i64* %2
%16 = srem i64 %15, 10
%17 = add nsw i64 %16, 48
%18 = call i32 @ft_putchar(i64 %17)
br label %19
19: ; preds = %12, %9
ret void
}

LLVM IR (-O2):
define void @ft_putnb(i64 %0) {
%2 = icmp slt i64 %0, 10
br i1 %2, label %3, label %8
3: ; preds = %1
%4 = add nsw i64 %0, 48
br label %5
5: ; preds = %3, %8
%6 = phi i64 [ %4, %3 ], [ %11, %8 ]
%7 = tail call i32 @ft_putchar(i64 %6)
ret void
8: ; preds = %1
%9 = udiv i64 %0, 10
tail call void @ft_putnb(i64 %9)
%10 = urem i64 %0, 10
%11 = or i64 %10, 48
br label %5
}
void ff_hevc_put_hevc_bi_epel_v64_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v64_8_avx2() {
ret void
}
double mkPosNan(void) { return 0.0 / 0.0; }


x86 assembly (clang, -O0):
<mkPosNan>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mkPosNan>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @mkPosNan() {
ret double 0x7FF8000000000000
}

LLVM IR (-O2):
define double @mkPosNan() {
ret double 0x7FF8000000000000
}
/* Type definitions */
struct kmod_module_version {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct kmod_module_version *);
void kmod_module_version_free(struct kmod_module_version *version) {
  free(version);
}


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

x86 assembly (clang, -O2):
<kmod_module_version_free>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.kmod_module_version = type { i32 }
define void @kmod_module_version_free(%struct.kmod_module_version* %0) {
%2 = alloca %struct.kmod_module_version*
store %struct.kmod_module_version* %0, %struct.kmod_module_version** %2
%3 = load %struct.kmod_module_version*, %struct.kmod_module_version** %2
%4 = call i32 @free(%struct.kmod_module_version* %3)
ret void
}

LLVM IR (-O2):
%struct.kmod_module_version = type { i32 }
define void @kmod_module_version_free(%struct.kmod_module_version* nocapture %0) {
%2 = tail call i32 @free(%struct.kmod_module_version* %0)
ret void
}
unsigned short UINT16ARRAY(const void *x) {
  unsigned char *p = (unsigned char *)x;
  return p[0] | (p[1] << 8);
}


x86 assembly (clang, -O0):
<UINT16ARRAY>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define zeroext i16 @UINT16ARRAY(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i16
%7 = shl nuw i16 %6, 8
%8 = or i16 %7, %3
ret i16 %8
}
double hour2min(double x) { return (x * 60.0); }


x86 assembly (clang, -O0):
<hour2min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<hour2min>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @hour2min(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 6.000000e+01
ret double %4
}

LLVM IR (-O2):
define double @hour2min(double %0) {
%2 = fmul double %0, 6.000000e+01
ret double %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t fwrite(char const *, size_t, int, int /*<<< orphan*/ *);
int msgpack_fbuffer_write(void *data, const char *buf, size_t len) {
  return (len == fwrite(buf, len, 1, (FILE *)data)) ? 0 : -1;
}


x86 assembly (clang, -O0):
<msgpack_fbuffer_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rcx
mov    $0x1,%edx
call   1030 <fwrite@plt>
mov    -0x20(%rbp),%rdx
mov    %rax,%rsi
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<msgpack_fbuffer_write>:
push   %rbx
mov    %rdx,%rbx
mov    %rdi,%rcx
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    $0x1,%edx
call   1030 <fwrite@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @msgpack_fbuffer_write(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i64, i64* %6
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i32*
%12 = call i64 @fwrite(i8* %8, i64 %9, i32 1, i32* %11)
%13 = icmp eq i64 %7, %12
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 0, i32 -1
ret i32 %15
}

LLVM IR (-O2):
define i32 @msgpack_fbuffer_write(i8* nocapture %0, i8* nocapture %1, i64 %2) {
%4 = bitcast i8* %0 to i32*
%5 = tail call i64 @fwrite(i8* %1, i64 %2, i32 1, i32* %4)
%6 = icmp ne i64 %5, %2
%7 = sext i1 %6 to i32
ret i32 %7
}
void print(char *ptr) {}


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

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

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

LLVM IR (-O2):
define void @print(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *__ulltoa_internal__(unsigned int, char *, int, int /*<<< orphan*/, int);
char *utoa(unsigned int value, char *str, int base) {
  return __ulltoa_internal__(value, str, base, 0, 0xFFFFFFFF);
}


x86 assembly (clang, -O0):
<utoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
xor    %ecx,%ecx
mov    $0xffffffff,%r8d
call   1030 <__ulltoa_internal__@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utoa>:
xor    %ecx,%ecx
mov    $0xffffffff,%r8d
jmp    1030 <__ulltoa_internal__@plt>

LLVM IR (-O0):
define i8* @utoa(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 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i8* @__ulltoa_internal__(i32 %7, i8* %8, i32 %9, i32 0, i32 -1)
ret i8* %10
}

LLVM IR (-O2):
define i8* @utoa(i32 %0, i8* %1, i32 %2) {
%4 = tail call i8* @__ulltoa_internal__(i32 %0, i8* %1, i32 %2, i32 0, i32 -1)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
void enter(char str[100]) { fgets(str, 100, stdin); }


x86 assembly (clang, -O0):
<enter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1030 <fgets@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<enter>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
jmp    1030 <fgets@plt>

LLVM IR (-O0):
@stdin = global i32 0
define void @enter(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 100, i32 %4)
ret void
}

LLVM IR (-O2):
@stdin = global i32 0
define void @enter(i8* %0) {
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* %0, i32 100, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void uart1_puts_p(const char *progmem_s) {
  printf("uart1_puts_P(%s)\n", progmem_s);
}


x86 assembly (clang, -O0):
<uart1_puts_p>:
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):
<uart1_puts_p>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"uart1_puts_P(%s)\0A\00"
define void @uart1_puts_p(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("Hello world from OpenACC\n");
  printf("Code compiled without OpenACC\n");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [26 x i8] c"Hello world from OpenACC\0A\00"
@.str.1 = [31 x i8] c"Code compiled without OpenACC\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"Hello world from OpenACC\00"
@str.2 = [30 x i8] c"Code compiled without OpenACC\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
void get_odirs(int dir, int *odir1, int *odir2) {
  *odir1 = dir % 3 + 1;
  *odir2 = (dir + 1) % 3 + 1;
}


x86 assembly (clang, -O0):
<get_odirs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    -0x10(%rbp),%rax
mov    %edx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_odirs>:
movslq %edi,%rax
imul   $0x55555556,%rax,%rcx
mov    %rcx,%rdi
shr    $0x3f,%rdi
shr    $0x20,%rcx
add    %edi,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,(%rsi)
mov    %eax,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x55555556,%rcx,%rcx
mov    %rcx,%rsi
shr    $0x3f,%rsi
shr    $0x20,%rcx
add    %esi,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
add    %ecx,%eax
add    $0x2,%eax
mov    %eax,(%rdx)
ret

LLVM IR (-O0):
define void @get_odirs(i32 %0, i32* %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
store i32 %0, i32* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = srem i32 %7, 3
%9 = add nsw i32 %8, 1
%10 = load i32*, i32** %5
store i32 %9, i32* %10
%11 = load i32, i32* %4
%12 = add nsw i32 %11, 1
%13 = srem i32 %12, 3
%14 = add nsw i32 %13, 1
%15 = load i32*, i32** %6
store i32 %14, i32* %15
ret void
}

LLVM IR (-O2):
define void @get_odirs(i32 %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = srem i32 %0, 3
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = add nsw i32 %0, 1
%7 = srem i32 %6, 3
%8 = add nsw i32 %7, 1
store i32 %8, i32* %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *s) {
  fprintf(stderr, "usage: %s [-v] interface [target ...]\n", s);
  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
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [39 x i8] c"usage: %s [-v] interface [target ...]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int index_external_remove_document(struct index *index, int did) { return 0; }


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

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

LLVM IR (-O0):
%struct.index = type opaque
define i32 @index_external_remove_document(%struct.index* %0, i32 %1) {
%3 = alloca %struct.index*
%4 = alloca i32
store %struct.index* %0, %struct.index** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
%struct.index = type opaque
define i32 @index_external_remove_document(%struct.index* nocapture readnone %0, i32 %1) {
ret i32 0
}
main() {
  printf("hello %d\n", "yo");
  printf("hello %s\n", 2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeeb(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee0(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [10 x i8] c"hello %d\0A\00"
@.str.1 = [3 x i8] c"yo\00"
@.str.2 = [10 x i8] c"hello %s\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 2)
ret i32 0
}
void shiftNextTypes(int *nextTypes) {
  int i;
  for (i = 0; i < 13; i++) {
    nextTypes[i] = nextTypes[i + 1];
  }
  nextTypes[i] = -1;
  return;
}


x86 assembly (clang, -O0):
<shiftNextTypes>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xd,-0xc(%rbp)
jge    1142 <shiftNextTypes+0x42>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <shiftNextTypes+0xf>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movl   $0xffffffff,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<shiftNextTypes>:
movups 0x4(%rdi),%xmm0
movups 0x14(%rdi),%xmm1
movups 0x24(%rdi),%xmm2
movups %xmm0,(%rdi)
movups %xmm1,0x10(%rdi)
movups %xmm2,0x20(%rdi)
mov    0x34(%rdi),%eax
mov    %eax,0x30(%rdi)
movl   $0xffffffff,0x34(%rdi)
ret

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

LLVM IR (-O2):
define void @shiftNextTypes(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
%3 = getelementptr i32, i32* %0, i64 1
%4 = bitcast i32* %3 to i8*
%5 = getelementptr inbounds i32, i32* %0, i64 13
store i32 -1, i32* %5
ret void
}
int countDigits(int n) {
  int counter = 0;
  if (n == 0)
    return 1;
  while (n != 0) {
    n /= 10;
    ++counter;
  }
  return counter;
}


x86 assembly (clang, -O0):
<countDigits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1124 <countDigits+0x24>
movl   $0x1,-0x4(%rbp)
jmp    1155 <countDigits+0x55>
jmp    1129 <countDigits+0x29>
cmpl   $0x0,-0x8(%rbp)
je     114f <countDigits+0x4f>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1129 <countDigits+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<countDigits>:
test   %edi,%edi
je     1133 <countDigits+0x33>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <countDigits+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @countDigits(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %11
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *buildSuffix() {
  char *suffix;
  suffix = malloc(sizeof(char) * strlen(".dat"));
  strcpy(suffix, ".dat");
  return suffix;
}


x86 assembly (clang, -O0):
<buildSuffix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1040 <strlen@plt>
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildSuffix>:
push   %r14
push   %rbx
push   %rax
lea    0xec5(%rip),%r14
mov    %r14,%rdi
call   1040 <strlen@plt>
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [5 x i8] c".dat\00"
define i8* @buildSuffix() {
%1 = alloca i8*
%2 = call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = sext i32 %2 to i64
%4 = mul i64 1, %3
%5 = trunc i64 %4 to i32
%6 = call i8* @malloc(i32 %5)
store i8* %6, i8** %1
%7 = load i8*, i8** %1
%8 = call i32 @strcpy(i8* %7, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%9 = load i8*, i8** %1
ret i8* %9
}

LLVM IR (-O2):
@.str = [5 x i8] c".dat\00"
define i8* @buildSuffix() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%2 = tail call i8* @malloc(i32 %1)
%3 = tail call i32 @strcpy(i8* %2, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Variables and functions */
int tou_clear_error(int);
int clear_tou_socket_error(int fd) { return tou_clear_error(fd); }


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

x86 assembly (clang, -O2):
<clear_tou_socket_error>:
jmp    1030 <tou_clear_error@plt>

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

LLVM IR (-O2):
define i32 @clear_tou_socket_error(i32 %0) {
%2 = tail call i32 @tou_clear_error(i32 %0)
ret i32 %2
}
int execute_lsetxattr() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_lsetxattr() {
ret i32 0
}
/* Type definitions */
struct node {
  int dummy;
};

/* Variables and functions */
struct node *initialise_node(int);
int main() {
  struct node *node = initialise_node(5);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1030 <initialise_node@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
store i32 0, i32* %1
%3 = call %struct.node* @initialise_node(i32 5)
store %struct.node* %3, %struct.node** %2
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @main() {
%1 = tail call %struct.node* @initialise_node(i32 5)
ret i32 0
}
void foo_2_2_1_2_1_2_1_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_1_2_1_2_2() {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
void nvic_irq_setprio(uint8_t n, uint8_t prio) {
  volatile uint8_t *nvic_ipri = ((volatile uint8_t *)((0xE000E400) + n));
  *nvic_ipri = prio;
}


x86 assembly (clang, -O0):
<nvic_irq_setprio>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0xe000e400,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nvic_irq_setprio>:
mov    $0xe000e400,%eax
mov    %rsi,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @nvic_irq_setprio(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = add nsw i64 3758154752, %6
%8 = inttoptr i64 %7 to i64*
store i64* %8, i64** %5
%9 = load i64, i64* %4
%10 = load i64*, i64** %5
store volatile i64 %9, i64* %10
ret void
}

LLVM IR (-O2):
define void @nvic_irq_setprio(i64 %0, i64 %1) {
%3 = add nsw i64 %0, 3758154752
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
int getPrecedence(char operator) {
  if (operator== '*' || operator== '/') {
    return 2;
  }
  return 1;
}


x86 assembly (clang, -O0):
<getPrecedence>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x2a,%eax
je     1124 <getPrecedence+0x24>
movsbl -0x5(%rbp),%eax
cmp    $0x2f,%eax
jne    1130 <getPrecedence+0x30>
movl   $0x2,-0x4(%rbp)
jmp    1137 <getPrecedence+0x37>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getPrecedence>:
cmp    $0x2f,%dil
sete   %al
cmp    $0x2a,%dil
sete   %cl
or     %al,%cl
movzbl %cl,%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @getPrecedence(i8 signext %0) {
%2 = icmp eq i8 %0, 47
%3 = icmp eq i8 %0, 42
%4 = or i1 %2, %3
%5 = select i1 %4, i32 2, i32 1
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ GMP_RNDD;
int /*<<< orphan*/ mpfr_set_default_rounding_mode(int /*<<< orphan*/);
double add_lo(double x, double y) {
  mpfr_set_default_rounding_mode(GMP_RNDD);
  ;
  return (x + y);
}


x86 assembly (clang, -O0):
<add_lo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
call   1030 <mpfr_set_default_rounding_mode@plt>
movsd  -0x8(%rbp),%xmm0
addsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_lo>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1030 <mpfr_set_default_rounding_mode@plt>
movsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@GMP_RNDD = global i32 0
define double @add_lo(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load i32, i32* @GMP_RNDD
%6 = call i32 @mpfr_set_default_rounding_mode(i32 %5)
%7 = load double, double* %3
%8 = load double, double* %4
%9 = fadd double %7, %8
ret double %9
}

LLVM IR (-O2):
@GMP_RNDD = global i32 0
define double @add_lo(double %0, double %1) {
%3 = load i32, i32* @GMP_RNDD
%4 = tail call i32 @mpfr_set_default_rounding_mode(i32 %3)
%5 = fadd double %0, %1
ret double %5
}
extern __attribute__((__gnu___)) long double __attribute__((__const__))
creall(long double _Complex _Z) {
  return __real__ _Z;
}


x86 assembly (clang, -O0):
<creall>:
push   %rbp
mov    %rsp,%rbp
lea    0x10(%rbp),%rax
fldt   (%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<creall>:
fldt   0x8(%rsp)
ret

LLVM IR (-O0):
define x86_fp80 @creall({ x86_fp80, x86_fp80 }* byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i32 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %3
}

LLVM IR (-O2):
define x86_fp80 @creall({ x86_fp80, x86_fp80 }* nocapture byval({ x86_fp80, x86_fp80 }) align 16 %0) {
%2 = getelementptr inbounds { x86_fp80, x86_fp80 }, { x86_fp80, x86_fp80 }* %0, i64 0, i32 0
%3 = load x86_fp80, x86_fp80* %2
ret x86_fp80 %3
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int solcon_create_solution_output_file(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(131, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<solcon_create_solution_output_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x83,%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):
<solcon_create_solution_output_file>:
mov    $0x83,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @solcon_create_solution_output_file() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 131, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void changeVars(int *varA, int varB) {
  *varA = 100;
  varB = 100;
}


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

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

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

LLVM IR (-O2):
define void @changeVars(i32* nocapture writeonly %0, i32 %1) {
store i32 100, i32* %0
ret void
}
int fn2(int x, int y) { return ~(x & y) & x; }


x86 assembly (clang, -O0):
<fn2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
and    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn2>:
mov    %esi,%eax
not    %eax
and    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @fn2(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
int g(long long a) { return a << 32; }


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

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

LLVM IR (-O0):
define i32 @g(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = shl i64 %3, 32
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @g(i64 %0) {
ret i32 0
}
void foo431(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo431(i32 %0) {
ret void
}
char *_glp_strspx(char *str) {
  char *s, *t;
  for (s = t = str; *s; s++) {
    if (*s != ' ')
      *t++ = *s;
  }
  *t = '\0';
  return str;
}


x86 assembly (clang, -O0):
<_glp_strspx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115e <_glp_strspx+0x5e>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
je     1148 <_glp_strspx+0x48>
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    114d <_glp_strspx+0x4d>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1114 <_glp_strspx+0x14>
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_glp_strspx>:
mov    %rdi,%rax
mov    %rdi,%rdx
mov    %rdi,%rsi
jmp    1114 <_glp_strspx+0x14>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rdx
movzbl (%rdx),%ecx
cmp    $0x20,%cl
je     1110 <_glp_strspx+0x10>
test   %cl,%cl
je     1128 <_glp_strspx+0x28>
mov    %cl,(%rsi)
add    $0x1,%rsi
jmp    1110 <_glp_strspx+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define i8* @_glp_strspx(i8* returned %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i8* [ %0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %11
i8 32, label %8
]
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %5, i8* %4
br label %8
8: ; preds = %2, %6
%9 = phi i8* [ %7, %6 ], [ %4, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
store i8 0, i8* %4
ret i8* %0
}
int do_quit(inputfilename, lineno, argc, argv)
char *inputfilename;
int lineno;
int argc;
char **argv;
{
  die(0);
  return -1;
}


x86 assembly (clang, -O0):
<do_quit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
xor    %edi,%edi
mov    $0x0,%al
call   1030 <die@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_quit>:
push   %rax
xor    %edi,%edi
xor    %eax,%eax
call   1030 <die@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @do_quit(i8* %0, i32 %1, i32 %2, i8** %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8**
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%9 = call i32 (i32, ...) bitcast (i32 (...)* @die to i32 (i32, ...)*)(i32 0)
ret i32 -1
}

LLVM IR (-O2):
define i32 @do_quit(i8* nocapture readnone %0, i32 %1, i32 %2, i8** nocapture readnone %3) {
%5 = tail call i32 (i32, ...) bitcast (i32 (...)* @die to i32 (i32, ...)*)(i32 0)
ret i32 -1
}