xunge/DecIR huggingface dataset:
void test1(float f1, double f2, float f3) {}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movsd  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test1(float %0, double %1, float %2) {
%4 = alloca float
%5 = alloca double
%6 = alloca float
store float %0, float* %4
store double %1, double* %5
store float %2, float* %6
ret void
}

LLVM IR (-O2):
define void @test1(float %0, double %1, float %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, unsigned char);
void dprint(unsigned char value) { debug("0x%02x", value); }


x86 assembly (clang, -O0):
<dprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <debug@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dprint>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <debug@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"0x%02x\00"
define void @dprint(i8 zeroext %0) {
%2 = tail call i32 @debug(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ atoi(char const *);
int set_flag_table_3_4(unsigned char **, int /*<<< orphan*/);
int f_set_flag_table_3_4(int mode, unsigned char **sec, float *data,
                         unsigned int ndata, char *inv_out, void **local,
                         const char *arg1) {
  if (mode >= 0)
    return set_flag_table_3_4(sec, atoi(arg1));
  return 0;
}


x86 assembly (clang, -O0):
<f_set_flag_table_3_4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
cmpl   $0x0,-0x8(%rbp)
jl     1170 <f_set_flag_table_3_4+0x50>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    0x10(%rbp),%rdi
call   1040 <atoi@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
call   1030 <set_flag_table_3_4@plt>
mov    %eax,-0x4(%rbp)
jmp    1177 <f_set_flag_table_3_4+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_set_flag_table_3_4>:
test   %edi,%edi
js     113d <f_set_flag_table_3_4+0x1d>
push   %rbx
mov    %rsi,%rbx
mov    0x10(%rsp),%rdi
call   1040 <atoi@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1030 <set_flag_table_3_4@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @f_set_flag_table_3_4(i32 %0, i8** %1, float* nocapture readnone %2, i32 %3, i8* nocapture readnone %4, i8** nocapture readnone %5, i8* nocapture %6) {
%8 = icmp sgt i32 %0, -1
br i1 %8, label %9, label %12
9: ; preds = %7
%10 = tail call i32 @atoi(i8* %6)
%11 = tail call i32 @set_flag_table_3_4(i8** %1, i32 %10)
br label %12
12: ; preds = %7, %9
%13 = phi i32 [ %11, %9 ], [ 0, %7 ]
ret i32 %13
}
cmd_ungag(name) char *name;
{ remove_gag(name); }


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

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

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

LLVM IR (-O2):
define i32 @cmd_ungag(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @remove_gag to i32 (i8*, ...)*)(i8* %0)
ret i32 undef
}
void ff_hevc_put_hevc_epel_v64_8_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_v64_8_avx2() {
ret void
}
int libetpan_get_version_major(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @libetpan_get_version_major() {
ret i32 1
}

LLVM IR (-O2):
define i32 @libetpan_get_version_major() {
ret i32 1
}
/* Variables and functions */
scalar_t__ _PDCLIB_atomax(char const *);
long int atol(const char *s) { return (long int)_PDCLIB_atomax(s); }


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

x86 assembly (clang, -O2):
<atol>:
jmp    1030 <_PDCLIB_atomax@plt>

LLVM IR (-O0):
define i64 @atol(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @_PDCLIB_atomax(i8* %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @atol(i8* %0) {
%2 = tail call i64 @_PDCLIB_atomax(i8* %0)
ret i64 %2
}
/* Type definitions */
struct udev {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ get_sys_link(struct udev *, char *, char const *, char *,
                                size_t);
ssize_t util_get_sys_subsystem(struct udev *udev, const char *syspath,
                               char *subsystem, size_t size) {
  return get_sys_link(udev, "subsystem", syspath, subsystem, size);
}


x86 assembly (clang, -O0):
<util_get_sys_subsystem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xec1(%rip),%rsi
call   1030 <get_sys_link@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<util_get_sys_subsystem>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee0(%rip),%rsi
jmp    1030 <get_sys_link@plt>

LLVM IR (-O0):
%struct.udev = type { i32 }
@.str = [10 x i8] c"subsystem\00"
define i32 @util_get_sys_subsystem(%struct.udev* %0, i8* %1, i8* %2, i64 %3) {
%5 = alloca %struct.udev*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i64
store %struct.udev* %0, %struct.udev** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load %struct.udev*, %struct.udev** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i64, i64* %8
%13 = call i32 @get_sys_link(%struct.udev* %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.udev = type { i32 }
@.str = [10 x i8] c"subsystem\00"
define i32 @util_get_sys_subsystem(%struct.udev* %0, i8* %1, i8* %2, i64 %3) {
%5 = tail call i32 @get_sys_link(%struct.udev* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i64 %3)
ret i32 %5
}
int main(void) {
#pragma acc parallel vector_length(64)
  {
#pragma acc loop worker
    for (unsigned int i = 0; i < 32; i++)
#pragma acc loop vector
      for (unsigned int j = 0; j < 64; j++)
        ;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jae    1153 <main+0x53>
movl   $0x0,-0xc(%rbp)
cmpl   $0x40,-0xc(%rbp)
jae    1140 <main+0x40>
jmp    1132 <main+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <main+0x23>
jmp    1145 <main+0x45>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1112 <main+0x12>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef char *uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
uint8_t inportb(uint16_t port) {
  uint8_t ret;
  asm volatile("inb %%dx,%%al" : "=a"(ret) : "d"(port));
  return ret;
}


x86 assembly (clang, -O0):
<inportb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
in     (%dx),%al
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inportb>:
mov    %edi,%edx
in     (%dx),%al
ret

LLVM IR (-O0):
define i8* @inportb(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i8* asm sideeffect "inb %dx,%al", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @inportb(i32 %0) {
%2 = tail call i8* asm sideeffect "inb %dx,%al", "={ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i8* %2
}
void stat_irq_start(struct irq_desc *desc) {}


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

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

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

LLVM IR (-O2):
%struct.irq_desc = type opaque
define void @stat_irq_start(%struct.irq_desc* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int /*<<< orphan*/ _unsupported();
int pthread_cond_init(pthread_cond_t *cond, const pthread_condattr_t *attr) {
  _unsupported();
  return -1;
}


x86 assembly (clang, -O0):
<pthread_cond_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <_unsupported@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pthread_cond_init(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = call i32 (...) @_unsupported()
ret i32 -1
}

LLVM IR (-O2):
define i32 @pthread_cond_init(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = tail call i32 (...) @_unsupported()
ret i32 -1
}
void abcdefghi12(void) {
  const char(*ss)[12] = &__func__;
  static int arr[sizeof(__func__) == 12 ? 1 : -1];
}


x86 assembly (clang, -O0):
<abcdefghi12>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
mov    %rax,-0x8(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
@__func__.abcdefghi12 = [12 x i8] c"abcdefghi12\00"
@abcdefghi12.arr = internal global [1 x i32] zeroinitializer
define void @abcdefghi12() {
%1 = alloca [12 x i8]*
store [12 x i8]* @__func__.abcdefghi12, [12 x i8]** %1
ret void
}

LLVM IR (-O2):
define void @abcdefghi12() {
ret void
}
void xfs_debug(const struct xfs_mount *mp, const char *fmt, ...) {}


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

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

LLVM IR (-O0):
%struct.xfs_mount = type opaque
define void @xfs_debug(%struct.xfs_mount* %0, i8* %1, ...) {
%3 = alloca %struct.xfs_mount*
%4 = alloca i8*
store %struct.xfs_mount* %0, %struct.xfs_mount** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
%struct.xfs_mount = type opaque
define void @xfs_debug(%struct.xfs_mount* nocapture %0, i8* nocapture %1, ...) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fprintf(int /*<<< orphan*/ *, char *, double);
int print_adv_score(FILE *fp, double score) {
  if (1 != fprintf(fp, "ADV_SCORE=%lf\n", score)) {
    return EOF;
  }
  return 1;
}


x86 assembly (clang, -O0):
<print_adv_score>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x18(%rbp),%xmm0
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     1156 <print_adv_score+0x46>
mov    0x2e9c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <print_adv_score+0x4d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_adv_score>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <fprintf@plt>
cmp    $0x1,%eax
je     112b <print_adv_score+0x1b>
mov    0x2ebf(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"ADV_SCORE=%lf\0A\00"
@EOF = global i32 0
define i32 @print_adv_score(i32* %0, double %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double
store i32* %0, i32** %4
store double %1, double* %5
%6 = load i32*, i32** %4
%7 = load double, double* %5
%8 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %7)
%9 = icmp ne i32 1, %8
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* @EOF
store i32 %11, i32* %3
br label %13
12: ; preds = %2
store i32 1, i32* %3
br label %13
13: ; preds = %12, %10
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
@.str = [15 x i8] c"ADV_SCORE=%lf\0A\00"
@EOF = global i32 0
define i32 @print_adv_score(i32* nocapture %0, double %1) {
%3 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), double %1)
%4 = icmp eq i32 %3, 1
%5 = load i32, i32* @EOF
%6 = select i1 %4, i32 1, i32 %5
ret i32 %6
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int /*<<< orphan*/ printerrno(char *, char const *);
scalar_t__ stat(char const *, struct stat *);
int filesize(const char *filename) {
  struct stat st;
  if (stat(filename, &st) < 0) {
    printerrno("stat(%s)", filename);
    return -1;
  }
  return st.st_size;
}


x86 assembly (clang, -O0):
<filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <stat@plt>
cmp    $0x0,%rax
jge    115f <filesize+0x3f>
mov    -0x10(%rbp),%rsi
lea    0xeb2(%rip),%rdi
call   1030 <printerrno@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1165 <filesize+0x45>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filesize>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rsi
call   1040 <stat@plt>
test   %rax,%rax
js     113d <filesize+0x1d>
mov    0x8(%rsp),%eax
jmp    1151 <filesize+0x31>
lea    0xebc(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printerrno@plt>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [9 x i8] c"stat(%s)\00"
define i32 @filesize(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printerrno(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %11
8: ; preds = %1
%9 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%10 = load i32, i32* %9
br label %11
11: ; preds = %8, %6
%12 = phi i32 [ -1, %6 ], [ %10, %8 ]
ret i32 %12
}
void f1p_ia(const int *p __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @f1p_ia(i32* nocapture %0) {
ret void
}
/* Type definitions */
struct _fat_ptr {
  int dummy;
};

/* Variables and functions */
void *Cyc_Absyn_aggregate_type(unsigned int, struct _fat_ptr *);
void *Cyc_Absyn_strct(struct _fat_ptr *name) {
  void *_T0;
  _T0 = Cyc_Absyn_aggregate_type(0U, name);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_Absyn_strct>:
mov    %rdi,%rsi
xor    %edi,%edi
jmp    1030 <Cyc_Absyn_aggregate_type@plt>

LLVM IR (-O0):
%struct._fat_ptr = type { i32 }
define i8* @Cyc_Absyn_strct(%struct._fat_ptr* %0) {
%2 = alloca %struct._fat_ptr*
%3 = alloca i8*
store %struct._fat_ptr* %0, %struct._fat_ptr** %2
%4 = load %struct._fat_ptr*, %struct._fat_ptr** %2
%5 = call i8* @Cyc_Absyn_aggregate_type(i32 0, %struct._fat_ptr* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
%struct._fat_ptr = type { i32 }
define i8* @Cyc_Absyn_strct(%struct._fat_ptr* %0) {
%2 = tail call i8* @Cyc_Absyn_aggregate_type(i32 0, %struct._fat_ptr* %0)
ret i8* %2
}
__attribute__((always_)) const unsigned int __generic_swab32(unsigned int x) {
  return ((((unsigned char *)&x)[0] << 24) | (((unsigned char *)&x)[1] << 16) |
          (((unsigned char *)&x)[2] << 8) | (((unsigned char *)&x)[3]));
}


x86 assembly (clang, -O0):
<__generic_swab32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movzbl -0x4(%rbp),%eax
shl    $0x18,%eax
movzbl -0x3(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzbl -0x2(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__generic_swab32>:
mov    %edi,%eax
bswap  %eax
ret

LLVM IR (-O0):
define i32 @__generic_swab32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = bitcast i32* %2 to i8*
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl i32 %6, 24
%8 = bitcast i32* %2 to i8*
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %7, %12
%14 = bitcast i32* %2 to i8*
%15 = getelementptr inbounds i8, i8* %14, i64 2
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %13, %18
%20 = bitcast i32* %2 to i8*
%21 = getelementptr inbounds i8, i8* %20, i64 3
%22 = load i8, i8* %21
%23 = zext i8 %22 to i32
%24 = or i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @__generic_swab32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ panic(char const *);
extern void assert_outputf(const char *condition, const char *file, int line,
                           const char *module, const char *func,
                           const char *description) {
  panic(description);
}


x86 assembly (clang, -O0):
<assert_outputf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <panic@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assert_outputf>:
mov    %r9,%rdi
jmp    1030 <panic@plt>

LLVM IR (-O0):
define void @assert_outputf(i8* %0, i8* %1, i32 %2, i8* %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i8* %1, i8** %8
store i32 %2, i32* %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %12
%14 = call i32 @panic(i8* %13)
ret void
}

LLVM IR (-O2):
define void @assert_outputf(i8* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i8* nocapture readnone %4, i8* %5) {
%7 = tail call i32 @panic(i8* %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void leave(int *x) { printf("byebye %d\n", *x); }


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

x86 assembly (clang, -O2):
<leave>:
mov    (%rdi),%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"byebye %d\0A\00"
define void @leave(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void main() { putchar('a'); }


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

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

LLVM IR (-O0):
define void @main() {
%1 = call i32 @putchar(i8 signext 97)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @putchar(i8 signext 97)
ret void
}
void qnx_joypad_destroy(void) {}


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

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

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

LLVM IR (-O2):
define void @qnx_joypad_destroy() {
ret void
}
void sme_event_auth(struct wpa_supplicant *wpa_s, union wpa_event_data *data) {}


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

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

LLVM IR (-O0):
%struct.wpa_supplicant = type opaque
%union.wpa_event_data = type opaque
define void @sme_event_auth(%struct.wpa_supplicant* %0, %union.wpa_event_data* %1) {
%3 = alloca %struct.wpa_supplicant*
%4 = alloca %union.wpa_event_data*
store %struct.wpa_supplicant* %0, %struct.wpa_supplicant** %3
store %union.wpa_event_data* %1, %union.wpa_event_data** %4
ret void
}

LLVM IR (-O2):
%struct.wpa_supplicant = type opaque
%union.wpa_event_data = type opaque
define void @sme_event_auth(%struct.wpa_supplicant* nocapture %0, %union.wpa_event_data* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void Version(int argc, char *argv[]) { printf("version v7.0\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"version v7.0\0A\00"
define void @Version(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"version v7.0\00"
define void @Version(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int foo(int);
int main() {
  int a = 5;
  return foo(a);
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0x5,%edi
jmp    1030 <foo@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 5)
ret i32 %1
}
void show_pending_phase2(const struct connection *c, const struct state *st) {}


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

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

LLVM IR (-O0):
%struct.connection = type opaque
%struct.state = type opaque
define void @show_pending_phase2(%struct.connection* %0, %struct.state* %1) {
%3 = alloca %struct.connection*
%4 = alloca %struct.state*
store %struct.connection* %0, %struct.connection** %3
store %struct.state* %1, %struct.state** %4
ret void
}

LLVM IR (-O2):
%struct.connection = type opaque
%struct.state = type opaque
define void @show_pending_phase2(%struct.connection* nocapture %0, %struct.state* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncmp(char *, char *, int);
void strncmp_diff_length_2() {
  char *x = "12345";
  char *y = "123";
  clang_analyzer_eval(strncmp(x, y, 5) > 0);
}


x86 assembly (clang, -O0):
<strncmp_diff_length_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
setg   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_diff_length_2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
test   %rax,%rax
setg   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"123\00"
define void @strncmp_diff_length_2() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncmp(i8* %3, i8* %4, i32 5)
%6 = icmp sgt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"12345\00"
@.str.1 = [4 x i8] c"123\00"
define void @strncmp_diff_length_2() {
%1 = tail call i64 @strncmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = icmp sgt i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(int *, int, int, int /*<<< orphan*/ *);
void fwrite_int(FILE *fp, int i) { fwrite(&i, 4, 1, fp); }


x86 assembly (clang, -O0):
<fwrite_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rcx
lea    -0xc(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fwrite_int>:
push   %rax
mov    %rdi,%rcx
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @fwrite_int(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 = call i32 @fwrite(i32* %4, i32 4, i32 1, i32* %5)
ret void
}

LLVM IR (-O2):
define void @fwrite_int(i32* nocapture %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @fwrite(i32* %3, i32 4, i32 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strcat(char *, char *);
char *bufcon_puts(char *buffer, char *str) {
  strcat(buffer, str);
  return buffer;
}


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

x86 assembly (clang, -O2):
<bufcon_puts>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcat@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @bufcon_puts(i8* returned %0, i8* %1) {
%3 = tail call i32 @strcat(i8* %0, i8* %1)
ret i8* %0
}
void calcula(int *c) {
  printf("calcula %d %d\n", (*c), c);
  (*c)++;
  printf("calcula %d %d\n", (*c), c);
}


x86 assembly (clang, -O0):
<calcula>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcula>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rdi),%esi
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
call   1030 <printf@plt>
mov    (%rbx),%esi
add    $0x1,%esi
mov    %esi,(%rbx)
mov    %r14,%rdi
mov    %rbx,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [15 x i8] c"calcula %d %d\0A\00"
define void @calcula(i32* %0) {
%2 = load i32, i32* %0
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2, i32* %0)
%4 = load i32, i32* %0
%5 = add nsw i32 %4, 1
store i32 %5, i32* %0
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %5, i32* %0)
ret void
}
/* Variables and functions */
int command(int, int, int /*<<< orphan*/);
int tmp006_stop_sampling(void) { return command(2, 1, 0); }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
mov    $0x1,%esi
xor    %edx,%edx
call   1030 <command@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    $0x2,%edi
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <command@plt>

LLVM IR (-O0):
define i32 @tmp006_stop_sampling() {
%1 = call i32 @command(i32 2, i32 1, i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @tmp006_stop_sampling() {
%1 = tail call i32 @command(i32 2, i32 1, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(short *, short *, long);
void copy_svector(short *src, long nl1, long nh1, short *dst, long nl2,
                  long nh2) {
  long len = nh1 - nl1 + 1;
  static long size = sizeof(short);
  memcpy(dst + nl2, src + nl1, len * size);
}


x86 assembly (clang, -O0):
<copy_svector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x18(%rbp),%rax
sub    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rax
shl    $0x1,%rax
add    %rax,%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
add    %rax,%rsi
mov    -0x38(%rbp),%rdx
imul   0x2ebe(%rip),%rdx
call   1030 <memcpy@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_svector>:
sub    %rsi,%rdx
lea    (%rcx,%r8,2),%rax
lea    (%rdi,%rsi,2),%rsi
add    %rdx,%rdx
add    $0x2,%rdx
mov    %rax,%rdi
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
@copy_svector.size = internal global i64 2
define void @copy_svector(i16* %0, i64 %1, i64 %2, i16* %3, i64 %4, i64 %5) {
%7 = alloca i16*
%8 = alloca i64
%9 = alloca i64
%10 = alloca i16*
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
store i16* %0, i16** %7
store i64 %1, i64* %8
store i64 %2, i64* %9
store i16* %3, i16** %10
store i64 %4, i64* %11
store i64 %5, i64* %12
%14 = load i64, i64* %9
%15 = load i64, i64* %8
%16 = sub nsw i64 %14, %15
%17 = add nsw i64 %16, 1
store i64 %17, i64* %13
%18 = load i16*, i16** %10
%19 = load i64, i64* %11
%20 = getelementptr inbounds i16, i16* %18, i64 %19
%21 = load i16*, i16** %7
%22 = load i64, i64* %8
%23 = getelementptr inbounds i16, i16* %21, i64 %22
%24 = load i64, i64* %13
%25 = load i64, i64* @copy_svector.size
%26 = mul nsw i64 %24, %25
%27 = call i32 @memcpy(i16* %20, i16* %23, i64 %26)
ret void
}

LLVM IR (-O2):
define void @copy_svector(i16* %0, i64 %1, i64 %2, i16* %3, i64 %4, i64 %5) {
%7 = sub nsw i64 %2, %1
%8 = getelementptr inbounds i16, i16* %3, i64 %4
%9 = getelementptr inbounds i16, i16* %0, i64 %1
%10 = shl i64 %7, 1
%11 = add i64 %10, 2
%12 = tail call i32 @memcpy(i16* %8, i16* %9, i64 %11)
ret void
}
/* Variables and functions */
int check_addr(unsigned char *, long);
int loader_TAPE_check(const char *filename, unsigned char *data, long size) {
  if (size > 128)
    if ((data[16] >= 2) && (data[16] <= 0x0a))
      return check_addr(data, size - 128);
  return 0;
}


x86 assembly (clang, -O0):
<loader_TAPE_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x80,-0x20(%rbp)
jle    1175 <loader_TAPE_check+0x65>
mov    -0x18(%rbp),%rax
movzbl 0x10(%rax),%eax
cmp    $0x2,%eax
jl     1170 <loader_TAPE_check+0x60>
mov    -0x18(%rbp),%rax
movzbl 0x10(%rax),%eax
cmp    $0xa,%eax
jg     1170 <loader_TAPE_check+0x60>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
sub    $0x80,%rsi
call   1030 <check_addr@plt>
mov    %eax,-0x4(%rbp)
jmp    117c <loader_TAPE_check+0x6c>
jmp    1175 <loader_TAPE_check+0x65>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<loader_TAPE_check>:
cmp    $0x81,%rdx
jl     1131 <loader_TAPE_check+0x21>
mov    0x10(%rsi),%al
add    $0xfe,%al
cmp    $0x8,%al
ja     1131 <loader_TAPE_check+0x21>
add    $0xffffffffffffff80,%rdx
mov    %rsi,%rdi
mov    %rdx,%rsi
jmp    1030 <check_addr@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @loader_TAPE_check(i8* nocapture readnone %0, i8* %1, i64 %2) {
%4 = icmp sgt i64 %2, 128
br i1 %4, label %5, label %13
5: ; preds = %3
%6 = getelementptr inbounds i8, i8* %1, i64 16
%7 = load i8, i8* %6
%8 = add i8 %7, -2
%9 = icmp ult i8 %8, 9
br i1 %9, label %10, label %13
10: ; preds = %5
%11 = add nsw i64 %2, -128
%12 = tail call i32 @check_addr(i8* %1, i64 %11)
br label %13
13: ; preds = %3, %5, %10
%14 = phi i32 [ %12, %10 ], [ 0, %5 ], [ 0, %3 ]
ret i32 %14
}
zleep(t) int t;
{
  t = t / 1000;
  if (t == 0)
    t = 1;
  sleep(t);
}


x86 assembly (clang, -O0):
<zleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113a <zleep+0x2a>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <sleep@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zleep>:
mov    %edi,%eax
lea    0x3e7(%rax),%ecx
mov    $0x1,%edi
cmp    $0x7cf,%ecx
jb     113b <zleep+0x2b>
cltq
imul   $0x10624dd3,%rax,%rdi
mov    %rdi,%rax
shr    $0x3f,%rax
sar    $0x26,%rdi
add    %eax,%edi
xor    %eax,%eax
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define i32 @zleep(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sdiv i32 %4, 1000
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 1, i32* %3
br label %9
9: ; preds = %8, %1
%10 = load i32, i32* %3
%11 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 %10)
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @zleep(i32 %0) {
%2 = sdiv i32 %0, 1000
%3 = add i32 %0, 999
%4 = icmp ult i32 %3, 1999
%5 = select i1 %4, i32 1, i32 %2
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 %5)
ret i32 undef
}
void clac(void) { __asm__ volatile("clac"); }


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

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

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

LLVM IR (-O2):
define void @clac() {
tail call void asm sideeffect "clac", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ http_reply(int, int /*<<< orphan*/ *, int, char *, char *,
                              char *);
void do_404(char *item, int fd) {
  http_reply(fd, NULL, 404, "Not Found", "text/plain",
             "The item you seek is not here");
}


x86 assembly (clang, -O0):
<do_404>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x194,%edx
lea    0xece(%rip),%rcx
lea    0xed1(%rip),%r8
lea    0xed5(%rip),%r9
call   1030 <http_reply@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_404>:
mov    %esi,%edi
lea    0xee7(%rip),%rcx
lea    0xeea(%rip),%r8
lea    0xeee(%rip),%r9
xor    %esi,%esi
mov    $0x194,%edx
jmp    1030 <http_reply@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Not Found\00"
@.str.1 = [11 x i8] c"text/plain\00"
@.str.2 = [30 x i8] c"The item you seek is not here\00"
define void @do_404(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @http_reply(i32 %5, i32* null, i32 404, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Not Found\00"
@.str.1 = [11 x i8] c"text/plain\00"
@.str.2 = [30 x i8] c"The item you seek is not here\00"
define void @do_404(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @http_reply(i32 %1, i32* null, i32 404, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ VRAMclear();
int /*<<< orphan*/ VRAMupdateLCD();
int LCDclear(void) {
  VRAMclear();
  VRAMupdateLCD();
  return 0;
}


x86 assembly (clang, -O0):
<LCDclear>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <VRAMclear@plt>
mov    $0x0,%al
call   1040 <VRAMupdateLCD@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @LCDclear() {
%1 = call i32 (...) @VRAMclear()
%2 = call i32 (...) @VRAMupdateLCD()
ret i32 0
}

LLVM IR (-O2):
define i32 @LCDclear() {
%1 = tail call i32 (...) @VRAMclear()
%2 = tail call i32 (...) @VRAMupdateLCD()
ret i32 0
}
int aa_pro_ctr_a09(int chan, unsigned char *buf, int len) {
  hu_log(6, "hu_aap", __func__, "!!!!!!!!");
  return (-1);
}


x86 assembly (clang, -O0):
<aa_pro_ctr_a09>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x6,%edi
lea    0xed2(%rip),%rsi
lea    0xed2(%rip),%rdx
lea    0xeda(%rip),%rcx
mov    $0x0,%al
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aa_pro_ctr_a09>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee8(%rip),%rdx
lea    0xef0(%rip),%rcx
mov    $0x6,%edi
xor    %eax,%eax
call   1030 <hu_log@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a09 = [15 x i8] c"aa_pro_ctr_a09\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a09(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 = call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a09, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@.str = [7 x i8] c"hu_aap\00"
@__func__.aa_pro_ctr_a09 = [15 x i8] c"aa_pro_ctr_a09\00"
@.str.1 = [9 x i8] c"!!!!!!!!\00"
define i32 @aa_pro_ctr_a09(i32 %0, i8* nocapture readnone %1, i32 %2) {
%4 = tail call i32 (i32, i8*, i8*, i8*, ...) bitcast (i32 (...)* @hu_log to i32 (i32, i8*, i8*, i8*, ...)*)(i32 6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @__func__.aa_pro_ctr_a09, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 -1
}
int _test_control_change(void *buffer) {
  return (((unsigned char *)buffer)[0] & 0xf0) == (0xb << 4);
}


x86 assembly (clang, -O0):
<_test_control_change>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
and    $0xf0,%eax
cmp    $0xb0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_test_control_change>:
mov    (%rdi),%cl
and    $0xf0,%cl
xor    %eax,%eax
cmp    $0xb0,%cl
sete   %al
ret

LLVM IR (-O0):
define i32 @_test_control_change(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = and i32 %6, 240
%8 = icmp eq i32 %7, 176
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @_test_control_change(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -16
%4 = icmp eq i8 %3, -80
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int divider(int, int);
int main(void) {
  int res;
  int par0 = 16;
  int par1 = 2;
  res = divider(par0, par1);
  return res;
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0x10,%edi
mov    $0x2,%esi
jmp    1030 <divider@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 16, i32* %3
store i32 2, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @divider(i32 %5, i32 %6)
store i32 %7, i32* %2
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @divider(i32 16, i32 2)
ret i32 %1
}
/* Variables and functions */
scalar_t__ floor(double);
int Round(double arg) { return ((int)floor(arg + 0.5)); }


x86 assembly (clang, -O0):
<Round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Round>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define i32 @Round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = call i64 @floor(double %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @Round(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call i64 @floor(double %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}