xunge/DecIR huggingface dataset:
void glmGenerateZeroVector3d(double v[3]) {
  v[0] = 0;
  v[1] = 0;
  v[2] = 0;
}


x86 assembly (clang, -O0):
<glmGenerateZeroVector3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateZeroVector3d>:
xorps  %xmm0,%xmm0
movups %xmm0,(%rdi)
movq   $0x0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @glmGenerateZeroVector3d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
store double 0.000000e+00, double* %4
%5 = load double*, double** %2
%6 = getelementptr inbounds double, double* %5, i64 1
store double 0.000000e+00, double* %6
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 2
store double 0.000000e+00, double* %8
ret void
}

LLVM IR (-O2):
define void @glmGenerateZeroVector3d(double* nocapture writeonly %0) {
%2 = bitcast double* %0 to i8*
ret void
}
/* Variables and functions */
int is_substring(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
size_t strlen(char const *);
int is_rotation(const char *s1, const char *s2) {
  size_t s1_len = strlen(s1);
  char buff[s1_len * 2 + 1];
  strcpy(buff, s1);
  strcpy(buff + s1_len, s1);
  return is_substring(buff, s2);
}


x86 assembly (clang, -O0):
<is_rotation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
lea    0x1(%rcx,%rcx,1),%rax
mov    %rsp,%rdx
mov    %rdx,-0x20(%rbp)
lea    0x10(%rcx,%rcx,1),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0x30(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x30(%rbp),%rdi
add    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x30(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <is_substring@plt>
mov    -0x20(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_rotation>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
mov    %rax,%r12
mov    %rsp,%rbx
add    %rax,%rax
add    $0x10,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
add    %rbx,%r12
mov    %r12,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <is_substring@plt>
lea    -0x20(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_rotation(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
%7 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = mul i64 %10, 2
%12 = add i64 %11, 1
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %6
%14 = alloca i8, i64 %12
store i64 %12, i64* %7
%15 = load i8*, i8** %3
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i64, i64* %5
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = load i8*, i8** %3
%20 = call i32 @strcpy(i8* %18, i8* %19)
%21 = load i8*, i8** %4
%22 = call i32 @is_substring(i8* %14, i8* %21)
%23 = load i8*, i8** %6
ret i32 %22
}

LLVM IR (-O2):
define i32 @is_rotation(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = shl i64 %3, 1
%5 = or i64 %4, 1
%6 = alloca i8, i64 %5
%7 = call i32 @strcpy(i8* %6, i8* %0)
%8 = getelementptr inbounds i8, i8* %6, i64 %3
%9 = call i32 @strcpy(i8* %8, i8* %0)
%10 = call i32 @is_substring(i8* %6, i8* %1)
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ die(char *);
void usage(void) { die("relocs [--reloc-info|--text|--bin|--keep] vmlinux\n"); }


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

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

LLVM IR (-O0):
@.str = [51 x i8] c"relocs [--reloc-info|--text|--bin|--keep] vmlinux\0A\00"
define void @usage() {
%1 = call i32 @die(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"relocs [--reloc-info|--text|--bin|--keep] vmlinux\0A\00"
define void @usage() {
%1 = tail call i32 @die(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ display_thread_sched_attr(char *);
int /*<<< orphan*/ printf(char *);
void *thread_start(void *arg) {
  printf("[thread_start] is Running\n");
  display_thread_sched_attr("Scheduler attributes of new thread");
  return NULL;
}


x86 assembly (clang, -O0):
<thread_start>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
call   1040 <display_thread_sched_attr@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_start>:
push   %rax
lea    0xefb(%rip),%rdi
call   1030 <puts@plt>
lea    0xecc(%rip),%rdi
call   1040 <display_thread_sched_attr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"[thread_start] is Running\0A\00"
@.str.1 = [35 x i8] c"Scheduler attributes of new thread\00"
define i8* @thread_start(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @display_thread_sched_attr(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str.1 = [35 x i8] c"Scheduler attributes of new thread\00"
@str = [26 x i8] c"[thread_start] is Running\00"
define noalias i8* @thread_start(i8* nocapture readnone %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @display_thread_sched_attr(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0))
ret i8* null
}
int iswhitespace(int ch) {
  unsigned int i = ch - 1;
  if (i >= 32)
    return 0;
  return 0x80001100 >> i & 1;
}


x86 assembly (clang, -O0):
<iswhitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jb     1126 <iswhitespace+0x26>
movl   $0x0,-0x4(%rbp)
jmp    1136 <iswhitespace+0x36>
mov    -0xc(%rbp),%ecx
mov    $0x80001100,%eax
shr    %cl,%eax
and    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswhitespace>:
mov    %edi,%ecx
add    $0xffffffff,%ecx
mov    $0x80001100,%edx
shr    %cl,%edx
and    $0x1,%edx
xor    %eax,%eax
cmp    $0x20,%ecx
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define i32 @iswhitespace(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = sub nsw i32 %5, 1
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = icmp uge i32 %7, 32
br i1 %8, label %9, label %10
9: ; preds = %1
store i32 0, i32* %2
br label %14
10: ; preds = %1
%11 = load i32, i32* %4
%12 = lshr i32 -2147479296, %11
%13 = and i32 %12, 1
store i32 %13, i32* %2
br label %14
14: ; preds = %10, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @iswhitespace(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = icmp ugt i32 %2, 31
%4 = lshr i32 -2147479296, %2
%5 = and i32 %4, 1
%6 = select i1 %3, i32 0, i32 %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ R_ETHER_Close_ZC2();
int lan_close(void) {
  R_ETHER_Close_ZC2();
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @lan_close() {
%1 = call i32 (...) @R_ETHER_Close_ZC2()
ret i32 0
}

LLVM IR (-O2):
define i32 @lan_close() {
%1 = tail call i32 (...) @R_ETHER_Close_ZC2()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ executeSql(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ rmConfigRow(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
void addConfigRow(char *key, char *value) {
  rmConfigRow(key);
  char sql[200];
  sprintf(sql, "INSERT INTO config values ('%s', '%s')", key, value);
  executeSql(sql, NULL);
}


x86 assembly (clang, -O0):
<addConfigRow>:
push   %rbp
mov    %rsp,%rbp
sub    $0xe0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rmConfigRow@plt>
lea    -0xe0(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe9e(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0xe0(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <executeSql@plt>
add    $0xe0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addConfigRow>:
push   %r15
push   %r14
push   %rbx
sub    $0xd0,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <rmConfigRow@plt>
lea    0xeb2(%rip),%rsi
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1050 <sprintf@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1030 <executeSql@plt>
add    $0xd0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [39 x i8] c"INSERT INTO config values ('%s', '%s')\00"
define void @addConfigRow(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [200 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @rmConfigRow(i8* %6)
%8 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
%12 = getelementptr inbounds [200 x i8], [200 x i8]* %5, i64 0, i64 0
%13 = call i32 @executeSql(i8* %12, i32* null)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"INSERT INTO config values ('%s', '%s')\00"
define void @addConfigRow(i8* %0, i8* %1) {
%3 = alloca [200 x i8]
%4 = tail call i32 @rmConfigRow(i8* %0)
%5 = getelementptr inbounds [200 x i8], [200 x i8]* %3, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%7 = call i32 @executeSql(i8* %5, i32* null)
ret void
}
/* Type definitions */
struct mntent {
  char *mnt_fsname;
  char *mnt_dir;
  char *mnt_type;
  char *mnt_opts;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, char *, char *, char *);
void au_print_ent(struct mntent *ent) {
  printf("%s on %s type %s (%s)\n", ent->mnt_fsname, ent->mnt_dir,
         ent->mnt_type, ent->mnt_opts);
}


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

x86 assembly (clang, -O2):
<au_print_ent>:
mov    (%rdi),%rsi
mov    0x8(%rdi),%rdx
mov    0x10(%rdi),%rcx
mov    0x18(%rdi),%r8
lea    0xeda(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
%struct.mntent = type { i8*, i8*, i8*, i8* }
@.str = [23 x i8] c"%s on %s type %s (%s)\0A\00"
define void @au_print_ent(%struct.mntent* nocapture %0) {
%2 = getelementptr inbounds %struct.mntent, %struct.mntent* %0, i64 0, i32 0
%3 = load i8*, i8** %2
%4 = getelementptr inbounds %struct.mntent, %struct.mntent* %0, i64 0, i32 1
%5 = load i8*, i8** %4
%6 = getelementptr inbounds %struct.mntent, %struct.mntent* %0, i64 0, i32 2
%7 = load i8*, i8** %6
%8 = getelementptr inbounds %struct.mntent, %struct.mntent* %0, i64 0, i32 3
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %5, i8* %7, i8* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wm_debug(char *);
void toggle_maximize() { wm_debug("Maximize"); }


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

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

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

LLVM IR (-O2):
@.str = [9 x i8] c"Maximize\00"
define void @toggle_maximize() {
%1 = tail call i32 @wm_debug(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret void
}
int main(int argc, const char *argv[]) {
  if (argc < 2)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1128 <main+0x28>
movl   $0x1,-0x4(%rbp)
jmp    112f <main+0x2f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %eax,%eax
cmp    $0x2,%edi
setl   %al
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 2
%4 = zext i1 %3 to i32
ret i32 %4
}
int probe_function(int n) {
  int probe_variable;
  probe_variable = n * 10;
  return probe_variable;
}


x86 assembly (clang, -O0):
<probe_function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0xa,-0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<probe_function>:
add    %edi,%edi
lea    (%rdi,%rdi,4),%eax
ret

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

LLVM IR (-O2):
define i32 @probe_function(i32 %0) {
%2 = mul nsw i32 %0, 10
ret i32 %2
}
int test_imm_14uint16_mem(unsigned short *val) {
  return ((*val) & (0x14 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_14uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0x14,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_14uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 20
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ choiceExecution();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("\n This calendar works for year between 1952 and 4902.");
  choiceExecution();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [54 x i8] c"\0A This calendar works for year between 1952 and 4902.\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @choiceExecution()
ret i32 0
}

LLVM IR (-O2):
@.str = [54 x i8] c"\0A This calendar works for year between 1952 and 4902.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @choiceExecution()
ret i32 0
}
/* Variables and functions */
int tolower(int);
void test_tolower_symbolic2(int x) {
  if (x > 255) {
    int ret = tolower(x);
    (void)ret;
  }
}


x86 assembly (clang, -O0):
<test_tolower_symbolic2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jle    1133 <test_tolower_symbolic2+0x23>
mov    -0x4(%rbp),%edi
call   1030 <tolower@plt>
mov    %eax,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_tolower_symbolic2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 255
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = call i32 @tolower(i32 %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
br label %10
10: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @test_tolower_symbolic2(i32 %0) {
ret void
}
/* Variables and functions */
int posix_memalign(void **, size_t, size_t);
int ofi_memalign(void **memptr, size_t alignment, size_t size) {
  return posix_memalign(memptr, alignment, size);
}


x86 assembly (clang, -O0):
<ofi_memalign>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <posix_memalign@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofi_memalign>:
jmp    1030 <posix_memalign@plt>

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

LLVM IR (-O2):
define i32 @ofi_memalign(i8** %0, i64 %1, i64 %2) {
%4 = tail call i32 @posix_memalign(i8** %0, i64 %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void handler(int signum) { exit(1); }


x86 assembly (clang, -O0):
<handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<handler>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @handler(i32 %0) {
%2 = tail call i32 @exit(i32 1)
unreachable
}
unsigned short get_u16_raw(void *addr) {
  unsigned char *b = addr;
  return ((b[1] << 8) | (b[0] << 0));
}


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

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

LLVM IR (-O0):
define zeroext i16 @get_u16_raw(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 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 8
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 0
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 0
%15 = or i32 %9, %14
%16 = trunc i32 %15 to i16
ret i16 %16
}

LLVM IR (-O2):
define zeroext i16 @get_u16_raw(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = zext i8 %3 to i16
%5 = shl nuw i16 %4, 8
%6 = load i8, i8* %0
%7 = zext i8 %6 to i16
%8 = or i16 %5, %7
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ msg(char *);
int /*<<< orphan*/ printf(char *);
void sigint(int arg) {
  printf("\n");
  msg("User sent Interrupt. Shutting down.");
  exit(0);
}


x86 assembly (clang, -O0):
<sigint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
lea    0xeb4(%rip),%rdi
call   1050 <msg@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<sigint>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xebe(%rip),%rdi
call   1050 <msg@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [36 x i8] c"User sent Interrupt. Shutting down.\00"
define void @sigint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @msg(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [36 x i8] c"User sent Interrupt. Shutting down.\00"
define void @sigint(i32 %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @msg(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct map {
  int dummy;
};

/* Variables and functions */
int map_set(struct map *, char const *, char const *);
int map_dup(const char *key, const char *value, void *data) {
  struct map *map = data;
  return map_set(map, key, value);
}


x86 assembly (clang, -O0):
<map_dup>:
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    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <map_set@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map_dup>:
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    %rax,%rdi
jmp    1030 <map_set@plt>

LLVM IR (-O0):
%struct.map = type { i32 }
define i32 @map_dup(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.map*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to %struct.map*
store %struct.map* %9, %struct.map** %7
%10 = load %struct.map*, %struct.map** %7
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = call i32 @map_set(%struct.map* %10, i8* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.map = type { i32 }
define i32 @map_dup(i8* %0, i8* %1, i8* %2) {
%4 = bitcast i8* %2 to %struct.map*
%5 = tail call i32 @map_set(%struct.map* %4, i8* %0, i8* %1)
ret i32 %5
}
__attribute__((visibility("hidden"))) void
COREARRAY_Parallel_Call(void (*Proc)(void *, int, void *), void *thread,
                        int i_thread, void *param) {
  (*Proc)(thread, i_thread, param);
}


x86 assembly (clang, -O0):
<COREARRAY_Parallel_Call>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<COREARRAY_Parallel_Call>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %edx,%esi
mov    %rcx,%rdx
jmp    *%rax

LLVM IR (-O0):
define hidden void @COREARRAY_Parallel_Call(void (i8*, i32, i8*)* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca void (i8*, i32, i8*)*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store void (i8*, i32, i8*)* %0, void (i8*, i32, i8*)** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load void (i8*, i32, i8*)*, void (i8*, i32, i8*)** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
ret void
}

LLVM IR (-O2):
define hidden void @COREARRAY_Parallel_Call(void (i8*, i32, i8*)* nocapture %0, i8* %1, i32 %2, i8* %3) {
tail call void %0(i8* %1, i32 %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ debugger_init();
int /*<<< orphan*/ foo();
int main(int argc, char **argv) {
  debugger_init();
  foo();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @debugger_init()
%4 = tail call i32 (...) @foo()
ret i32 0
}
/* Variables and functions */
char *getenv(char *);
const char *conf_get_configname(void) {
  char *name = getenv("AUTOTOOLER_CONFIG");
  return name ? name : ".config";
}


x86 assembly (clang, -O0):
<conf_get_configname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1140 <conf_get_configname+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_configname+0x40>
lea    0xecb(%rip),%rax
mov    %rax,-0x10(%rbp)
jmp    1150 <conf_get_configname+0x40>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<conf_get_configname>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <getenv@plt>
test   %rax,%rax
lea    0xeeb(%rip),%rcx
cmove  %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"AUTOTOOLER_CONFIG\00"
@.str.1 = [8 x i8] c".config\00"
define i8* @conf_get_configname() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %0
%6 = load i8*, i8** %1
br label %8
7: ; preds = %0
br label %8
8: ; preds = %7, %5
%9 = phi i8* [ %6, %5 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), %7 ]
ret i8* %9
}

LLVM IR (-O2):
@.str = [18 x i8] c"AUTOTOOLER_CONFIG\00"
@.str.1 = [8 x i8] c".config\00"
define i8* @conf_get_configname() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
%3 = select i1 %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %1
ret i8* %3
}
void gtk_tree_path_get_depth() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_path_get_depth() {
ret void
}
/* Variables and functions */
int rand();
int randT() { return rand() % 10; }


x86 assembly (clang, -O0):
<randT>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<randT>:
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,4),%ecx
sub    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @randT() {
%1 = call i32 (...) @rand()
%2 = srem i32 %1, 10
ret i32 %2
}

LLVM IR (-O2):
define i32 @randT() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 10
ret i32 %2
}
void ff_hevc_put_hevc_uni_qpel_hv24_10_avx2() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @net_dmaengine_get() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char, unsigned char);
void term_color(unsigned char bg, unsigned char fg) {
  printf("\033[%d;%dm", bg, fg);
}


x86 assembly (clang, -O0):
<term_color>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    -0x1(%rbp),%al
lea    0xed2(%rip),%rdi
movzbl %al,%esi
movzbl -0x2(%rbp),%edx
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<term_color>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dm\00"
define void @term_color(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
store i8 %0, i8* %3
store i8 %1, i8* %4
%5 = load i8, i8* %3
%6 = load i8, i8* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 zeroext %5, i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dm\00"
define void @term_color(i8 zeroext %0, i8 zeroext %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8 zeroext %0, i8 zeroext %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EnableInterrupts();
void SysTick_Init(void) {
  (*((volatile unsigned long *)0xE000E010)) = 0;
  (*((volatile unsigned long *)0xE000E014)) = 80000 - 1;
  (*((volatile unsigned long *)0xE000E018)) = 0;
  (*((volatile unsigned long *)0xE000ED20)) =
      ((*((volatile unsigned long *)0xE000ED20)) & 0x00FFFFFF) | 0x40000000;
  (*((volatile unsigned long *)0xE000E010)) = 0x07;
  EnableInterrupts();
}


x86 assembly (clang, -O0):
<SysTick_Init>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe000e010,%eax
movq   $0x0,(%rax)
mov    $0xe000e014,%eax
movq   $0x1387f,(%rax)
mov    $0xe000e018,%eax
movq   $0x0,(%rax)
mov    $0xe000ed20,%eax
mov    (%rax),%rcx
and    $0xffffff,%rcx
or     $0x40000000,%rcx
mov    $0xe000ed20,%eax
mov    %rcx,(%rax)
mov    $0xe000e010,%eax
movq   $0x7,(%rax)
mov    $0x0,%al
call   1030 <EnableInterrupts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTick_Init>:
mov    $0xe000e010,%eax
movq   $0x0,(%rax)
movq   $0x1387f,0x4(%rax)
movq   $0x0,0x8(%rax)
mov    0xd10(%rax),%rcx
and    $0xffffff,%ecx
or     $0x40000000,%rcx
mov    %rcx,0xd10(%rax)
movq   $0x7,(%rax)
xor    %eax,%eax
jmp    1030 <EnableInterrupts@plt>

LLVM IR (-O0):
define void @SysTick_Init() {
store volatile i64 0, i64* inttoptr (i64 3758153744 to i64*)
store volatile i64 79999, i64* inttoptr (i64 3758153748 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758153752 to i64*)
%1 = load volatile i64, i64* inttoptr (i64 3758157088 to i64*)
%2 = and i64 %1, 16777215
%3 = or i64 %2, 1073741824
store volatile i64 %3, i64* inttoptr (i64 3758157088 to i64*)
store volatile i64 7, i64* inttoptr (i64 3758153744 to i64*)
%4 = call i32 (...) @EnableInterrupts()
ret void
}

LLVM IR (-O2):
define void @SysTick_Init() {
store volatile i64 0, i64* inttoptr (i64 3758153744 to i64*)
store volatile i64 79999, i64* inttoptr (i64 3758153748 to i64*)
store volatile i64 0, i64* inttoptr (i64 3758153752 to i64*)
%1 = load volatile i64, i64* inttoptr (i64 3758157088 to i64*)
%2 = and i64 %1, 16777215
%3 = or i64 %2, 1073741824
store volatile i64 %3, i64* inttoptr (i64 3758157088 to i64*)
store volatile i64 7, i64* inttoptr (i64 3758153744 to i64*)
%4 = tail call i32 (...) @EnableInterrupts()
ret void
}
int main(void) {
  struct bar {
    int a;
    int b : 9;
  } a;
  a.b = 0;
  a.a = 4;
  return a.a;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    -0xc(%rbp),%ax
and    $0xfe00,%ax
or     $0x0,%ax
mov    %ax,-0xc(%rbp)
movl   $0x4,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bar = type { i32, i16 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.bar
store i32 0, i32* %1
%3 = getelementptr inbounds %struct.bar, %struct.bar* %2, i32 0, i32 1
%4 = load i16, i16* %3
%5 = and i16 %4, -512
%6 = or i16 %5, 0
store i16 %6, i16* %3
%7 = getelementptr inbounds %struct.bar, %struct.bar* %2, i32 0, i32 0
store i32 4, i32* %7
%8 = getelementptr inbounds %struct.bar, %struct.bar* %2, i32 0, i32 0
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
unsigned long long nbyte(long long nnibble) {
  return nnibble / 2 + nnibble % 2;
}


x86 assembly (clang, -O0):
<nbyte>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    -0x10(%rbp),%rax
add    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nbyte>:
mov    %rdi,%rax
shr    $0x3f,%rax
add    %rdi,%rax
mov    %rax,%rcx
and    $0xfffffffffffffffe,%rcx
sub    %rcx,%rdi
sar    %rax
add    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @nbyte(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sdiv i64 %3, 2
%5 = load i64, i64* %2
%6 = srem i64 %5, 2
%7 = add nsw i64 %4, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @nbyte(i64 %0) {
%2 = sdiv i64 %0, 2
%3 = srem i64 %0, 2
%4 = add nsw i64 %2, %3
ret i64 %4
}
int test_1(int x, int n) {
  n &= 0x1f;
  x &= ~(0x01 << n);
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @test_1(i32 %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = xor i32 %4, -1
%6 = and i32 %5, %0
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ Executor_Init();
scalar_t__ Executor_Run();
int AppMain(void) {
  Executor_Init();
  while (Executor_Run())
    ;
  return 0;
}


x86 assembly (clang, -O0):
<AppMain>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <Executor_Init@plt>
mov    $0x0,%al
call   1040 <Executor_Run@plt>
cmp    $0x0,%rax
je     1141 <AppMain+0x21>
jmp    112b <AppMain+0xb>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AppMain>:
push   %rax
xor    %eax,%eax
call   1030 <Executor_Init@plt>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <Executor_Run@plt>
test   %rax,%rax
jne    1130 <AppMain+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @AppMain() {
%1 = call i32 (...) @Executor_Init()
br label %2
2: ; preds = %5, %0
%3 = call i64 (...) @Executor_Run()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %2
br label %2
6: ; preds = %2
ret i32 0
}

LLVM IR (-O2):
define i32 @AppMain() {
%1 = tail call i32 (...) @Executor_Init()
br label %2
2: ; preds = %2, %0
%3 = tail call i64 (...) @Executor_Run()
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ unlink(char *);
void stopit() {
  unlink("/etc/nologin");
  unlink("/fastboot");
  unlink("/forcefsck");
  unlink("/var/run/shutdown.pid");
  printf("\r\nShutdown cancelled.\r\n");
  exit(0);
}


x86 assembly (clang, -O0):
<stopit>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec6(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec4(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec3(%rip),%rdi
call   1030 <unlink@plt>
lea    0xecd(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<stopit>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec9(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec7(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec6(%rip),%rdi
call   1030 <unlink@plt>
lea    0xed0(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/etc/nologin\00"
@.str.1 = [10 x i8] c"/fastboot\00"
@.str.2 = [11 x i8] c"/forcefsck\00"
@.str.3 = [22 x i8] c"/var/run/shutdown.pid\00"
@.str.4 = [24 x i8] c"\0D\0AShutdown cancelled.\0D\0A\00"
define void @stopit() {
%1 = call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @unlink(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @unlink(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"/etc/nologin\00"
@.str.1 = [10 x i8] c"/fastboot\00"
@.str.2 = [11 x i8] c"/forcefsck\00"
@.str.3 = [22 x i8] c"/var/run/shutdown.pid\00"
@str = [23 x i8] c"\0D\0AShutdown cancelled.\0D\00"
define void @stopit() {
%1 = tail call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @unlink(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @unlink(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
struct ybp_event {
  int dummy;
};
struct ybp_binlog_parser {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ ybp_print_event(struct ybp_event *,
                                   struct ybp_binlog_parser *,
                                   int /*<<< orphan*/ *, int /*<<< orphan*/,
                                   int /*<<< orphan*/, int /*<<< orphan*/ *);
void ybp_print_event_simple(struct ybp_event *restrict e,
                            struct ybp_binlog_parser *restrict p,
                            FILE *restrict stream) {
  ybp_print_event(e, p, stream, 0, 0, NULL);
}


x86 assembly (clang, -O0):
<ybp_print_event_simple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %r8d,%r8d
xor    %eax,%eax
mov    %eax,%r9d
mov    %r8d,%ecx
call   1030 <ybp_print_event@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ybp_print_event_simple>:
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
jmp    1030 <ybp_print_event@plt>

LLVM IR (-O0):
%struct.ybp_event = type { i32 }
%struct.ybp_binlog_parser = type { i32 }
define void @ybp_print_event_simple(%struct.ybp_event* noalias %0, %struct.ybp_binlog_parser* noalias %1, i32* noalias %2) {
%4 = alloca %struct.ybp_event*
%5 = alloca %struct.ybp_binlog_parser*
%6 = alloca i32*
store %struct.ybp_event* %0, %struct.ybp_event** %4
store %struct.ybp_binlog_parser* %1, %struct.ybp_binlog_parser** %5
store i32* %2, i32** %6
%7 = load %struct.ybp_event*, %struct.ybp_event** %4
%8 = load %struct.ybp_binlog_parser*, %struct.ybp_binlog_parser** %5
%9 = load i32*, i32** %6
%10 = call i32 @ybp_print_event(%struct.ybp_event* %7, %struct.ybp_binlog_parser* %8, i32* %9, i32 0, i32 0, i32* null)
ret void
}

LLVM IR (-O2):
%struct.ybp_event = type { i32 }
%struct.ybp_binlog_parser = type { i32 }
define void @ybp_print_event_simple(%struct.ybp_event* noalias %0, %struct.ybp_binlog_parser* noalias %1, i32* noalias %2) {
%4 = tail call i32 @ybp_print_event(%struct.ybp_event* %0, %struct.ybp_binlog_parser* %1, i32* %2, i32 0, i32 0, i32* null)
ret void
}
/* Type definitions */
struct msghdr {
  int dummy;
};
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ socketcall_cp(int /*<<< orphan*/ (*)(int, struct msghdr *,
                                                        int),
                                 int, struct msghdr *, int, int /*<<< orphan*/,
                                 int /*<<< orphan*/, int /*<<< orphan*/);
ssize_t recvmsg(int fd, struct msghdr *msg, int flags) {
  ssize_t r;
  r = socketcall_cp(recvmsg, fd, msg, flags, 0, 0, 0);
  return r;
}


x86 assembly (clang, -O0):
<recvmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    0x2ead(%rip),%rdi
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <socketcall_cp@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recvmsg>:
push   %rax
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
movl   $0x0,(%rsp)
mov    0x2eba(%rip),%rdi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <socketcall_cp@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.msghdr = type { i32 }
define i32 @recvmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.msghdr*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store %struct.msghdr* %1, %struct.msghdr** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load %struct.msghdr*, %struct.msghdr** %5
%10 = load i32, i32* %6
%11 = call i32 @socketcall_cp(i32 (i32, %struct.msghdr*, i32)* @recvmsg, i32 %8, %struct.msghdr* %9, i32 %10, i32 0, i32 0, i32 0)
store i32 %11, i32* %7
%12 = load i32, i32* %7
ret i32 %12
}

LLVM IR (-O2):
%struct.msghdr = type { i32 }
define i32 @recvmsg(i32 %0, %struct.msghdr* %1, i32 %2) {
%4 = tail call i32 @socketcall_cp(i32 (i32, %struct.msghdr*, i32)* @recvmsg, i32 %0, %struct.msghdr* %1, i32 %2, i32 0, i32 0, i32 0)
ret i32 %4
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int32_t iscntrl(uint32_t c) {
  if ((c < 32) || (c == 127))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<iscntrl>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
jl     111b <iscntrl+0x1b>
cmpl   $0x7f,-0x8(%rbp)
jne    1127 <iscntrl+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <iscntrl+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iscntrl>:
cmp    $0x20,%edi
setl   %al
cmp    $0x7f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @iscntrl(i32 %0) {
%2 = icmp slt i32 %0, 32
%3 = icmp eq i32 %0, 127
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR9F_set(void) { return U_WMRCORENONE_set("U_WMR9F"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR9F\00"
define i8* @U_WMR9F_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR9F\00"
define i8* @U_WMR9F_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void int2human_usage() {
  printf("Usage: int2human integer1 integer2 integer3 ...\n\n"
         " Where integerX is an integer to convert to human readable form. If "
         "multiple\n"
         " integers are supplied, the output is delimited by a space. "
         "Currently this\n"
         " program is limited to integers the width of the system's unsigned "
         "long. If no\n"
         " command line arguments are supplied, stdin is used.\n\n");
}


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

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

LLVM IR (-O0):
@.str = [335 x i8] c"Usage: int2human integer1 integer2 integer3 ...\0A\0A Where integerX is an integer to convert to human readable form. If multiple\0A integers are supplied, the output is delimited by a space. Currently this\0A program is limited to integers the width of the system's unsigned long. If no\0A command line arguments are supplied, stdin is used.\0A\0A\00"
define void @int2human_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([335 x i8], [335 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [334 x i8] c"Usage: int2human integer1 integer2 integer3 ...\0A\0A Where integerX is an integer to convert to human readable form. If multiple\0A integers are supplied, the output is delimited by a space. Currently this\0A program is limited to integers the width of the system's unsigned long. If no\0A command line arguments are supplied, stdin is used.\0A\00"
define void @int2human_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([334 x i8], [334 x i8]* @str, i64 0, i64 0))
ret void
}