xunge/DecIR huggingface dataset:
void Fun_s3_Found_NODE(void) {}


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

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

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

LLVM IR (-O2):
define void @Fun_s3_Found_NODE() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bios_init();
int /*<<< orphan*/ bootinfo_init();
int /*<<< orphan*/ show_menu();
int main() {
  bios_init();
  bootinfo_init();
  show_menu();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @bios_init()
%2 = tail call i32 (...) @bootinfo_init()
%3 = tail call i32 (...) @show_menu()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M669_f(char *s) {
  debug("M669_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M669_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M669_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M669_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M669_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M669_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M669_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void encrypt_password() {
  char *crypted = "No crypt support compiled in.";
  printf("%s\n", crypted);
}


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

x86 assembly (clang, -O2):
<encrypt_password>:
lea    0xf07(%rip),%rdi
lea    0xee2(%rip),%rsi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [30 x i8] c"No crypt support compiled in.\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @encrypt_password() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ pow(int, int);
short int ipv4_get_num_hosts_all(unsigned short int pfxlen, unsigned int *num) {
  if (pfxlen == 0)
    *num = 0xFFFFFFFF;
  else
    *num = (unsigned int)pow(2, 32 - pfxlen);
  return 0;
}


x86 assembly (clang, -O0):
<ipv4_get_num_hosts_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
cmp    $0x0,%eax
jne    113f <ipv4_get_num_hosts_all+0x2f>
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
jmp    115c <ipv4_get_num_hosts_all+0x4c>
movzwl -0x2(%rbp),%eax
mov    $0x20,%esi
sub    %eax,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipv4_get_num_hosts_all>:
push   %rbx
mov    %rsi,%rbx
test   %edi,%edi
je     112e <ipv4_get_num_hosts_all+0x1e>
movzwl %di,%eax
mov    $0x20,%esi
sub    %eax,%esi
mov    $0x2,%edi
call   1030 <pow@plt>
jmp    1133 <ipv4_get_num_hosts_all+0x23>
mov    $0xffffffff,%eax
mov    %eax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i16 @ipv4_get_num_hosts_all(i16 zeroext %0, i32* %1) {
%3 = alloca i16
%4 = alloca i32*
store i16 %0, i16* %3
store i32* %1, i32** %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32*, i32** %4
store i32 -1, i32* %9
br label %17
10: ; preds = %2
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = sub nsw i32 32, %12
%14 = call i64 @pow(i32 2, i32 %13)
%15 = trunc i64 %14 to i32
%16 = load i32*, i32** %4
store i32 %15, i32* %16
br label %17
17: ; preds = %10, %8
ret i16 0
}

LLVM IR (-O2):
define signext i16 @ipv4_get_num_hosts_all(i16 zeroext %0, i32* nocapture writeonly %1) {
%3 = icmp eq i16 %0, 0
br i1 %3, label %9, label %4
4: ; preds = %2
%5 = zext i16 %0 to i32
%6 = sub nsw i32 32, %5
%7 = tail call i64 @pow(i32 2, i32 %6)
%8 = trunc i64 %7 to i32
br label %9
9: ; preds = %2, %4
%10 = phi i32 [ %8, %4 ], [ -1, %2 ]
store i32 %10, i32* %1
ret i16 0
}
int __attribute__((target("tune=sandybridge"))) baz() { return 4; }


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

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

LLVM IR (-O0):
define i32 @baz() {
ret i32 4
}

LLVM IR (-O2):
define i32 @baz() {
ret i32 4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
int /*<<< orphan*/ putc(int, int /*<<< orphan*/ *);
void p_save_cursor(FILE *p, int reg) {
  {
    fprintf(p, "\033[C");
    {
      (void)putc(((1) & 0xFF), (p));
      (void)putc((((1) & 0xFF00) >> 8), (p));
    };
  };
  (void)putc(reg + '\200', p);
}


x86 assembly (clang, -O0):
<p_save_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x8(%rbp),%rsi
mov    $0x1,%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
call   1030 <putc@plt>
mov    -0xc(%rbp),%edi
add    $0xffffff80,%edi
mov    -0x8(%rbp),%rsi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_save_cursor>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0xed1(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
call   1030 <putc@plt>
xor    %edi,%edi
mov    %rbx,%rsi
call   1030 <putc@plt>
add    $0xffffff80,%ebp
mov    %ebp,%edi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <putc@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"\1B[C\00"
define void @p_save_cursor(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 @fprintf(i32* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%7 = load i32*, i32** %3
%8 = call i32 @putc(i32 1, i32* %7)
%9 = load i32*, i32** %3
%10 = call i32 @putc(i32 0, i32* %9)
%11 = load i32, i32* %4
%12 = add nsw i32 %11, -128
%13 = load i32*, i32** %3
%14 = call i32 @putc(i32 %12, i32* %13)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"\1B[C\00"
define void @p_save_cursor(i32* nocapture %0, i32 %1) {
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3, i64 1, i32* %0)
%4 = tail call i32 @putc(i32 1, i32* %0)
%5 = tail call i32 @putc(i32 0, i32* %0)
%6 = add nsw i32 %1, -128
%7 = tail call i32 @putc(i32 %6, i32* %0)
ret void
}
/* Variables and functions */
void *obs_output_get_weak_output(void *);
void *weak_output_ref(void *ref) { return obs_output_get_weak_output(ref); }


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

x86 assembly (clang, -O2):
<weak_output_ref>:
jmp    1030 <obs_output_get_weak_output@plt>

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

LLVM IR (-O2):
define i8* @weak_output_ref(i8* %0) {
%2 = tail call i8* @obs_output_get_weak_output(i8* %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ Thrd_Flush_Buffer(int, int);
unsigned int Thrd_Show_Bits(int, int);
unsigned int Thrd_Get_Bits(signed int t, signed int N) {
  unsigned int Val;
  Val = Thrd_Show_Bits(t, N);
  Thrd_Flush_Buffer(t, N);
  return Val;
}


x86 assembly (clang, -O0):
<Thrd_Get_Bits>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <Thrd_Show_Bits@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <Thrd_Flush_Buffer@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Thrd_Get_Bits>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <Thrd_Show_Bits@plt>
mov    %eax,%r14d
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <Thrd_Flush_Buffer@plt>
mov    %r14d,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @Thrd_Get_Bits(i32 %0, i32 %1) {
%3 = tail call i32 @Thrd_Show_Bits(i32 %0, i32 %1)
%4 = tail call i32 @Thrd_Flush_Buffer(i32 %0, i32 %1)
ret i32 %3
}
void HibernateRTCEnable(void) {
  (*((volatile unsigned long *)(0x400FC010))) |= 0x00000001;
}


x86 assembly (clang, -O0):
<HibernateRTCEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fc010,%eax
mov    (%rax),%rcx
or     $0x1,%rcx
mov    $0x400fc010,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateRTCEnable>:
orq    $0x1,0x400fc010
40 01
ret

LLVM IR (-O0):
define void @HibernateRTCEnable() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = or i64 %1, 1
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
ret void
}

LLVM IR (-O2):
define void @HibernateRTCEnable() {
%1 = load volatile i64, i64* inttoptr (i64 1074774032 to i64*)
%2 = or i64 %1, 1
store volatile i64 %2, i64* inttoptr (i64 1074774032 to i64*)
ret void
}
const char *arith_vers_name(void) { return "arith"; }


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

x86 assembly (clang, -O2):
<arith_vers_name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"arith\00"
define i8* @arith_vers_name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"arith\00"
define i8* @arith_vers_name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
void start_kernel() { asm __volatile__("sti"); }


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

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

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

LLVM IR (-O2):
define void @start_kernel() {
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
float sinf_c(float);
float sinf_neon_sfp(float x) { return sinf_c(x); }


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

x86 assembly (clang, -O2):
<sinf_neon_sfp>:
jmp    1030 <sinf_c@plt>

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

LLVM IR (-O2):
define float @sinf_neon_sfp(float %0) {
%2 = tail call float @sinf_c(float %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ __u8;

/* Variables and functions */
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
scalar_t__ i2c_smbus_write_byte_data(int, int /*<<< orphan*/,
                                     int /*<<< orphan*/);
void mcp_i2c_Write_Byte(int fd, __u8 address, __u8 value) {
  if (i2c_smbus_write_byte_data(fd, address, value) < 0) {
    close(fd);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<mcp_i2c_Write_Byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <i2c_smbus_write_byte_data@plt>
cmp    $0x0,%rax
jge    116b <mcp_i2c_Write_Byte+0x3b>
mov    -0x4(%rbp),%edi
call   1030 <close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mcp_i2c_Write_Byte>:
push   %rbx
mov    %edi,%ebx
call   1040 <i2c_smbus_write_byte_data@plt>
test   %rax,%rax
js     113f <mcp_i2c_Write_Byte+0xf>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <close@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
define void @mcp_i2c_Write_Byte(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i64 @i2c_smbus_write_byte_data(i32 %7, i32 %8, i32 %9)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %16
12: ; preds = %3
%13 = load i32, i32* %4
%14 = call i32 @close(i32 %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @mcp_i2c_Write_Byte(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 @i2c_smbus_write_byte_data(i32 %0, i32 %1, i32 %2)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @close(i32 %0)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
int main(void) { int sockfd; }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void k(char const *input) {
  printf("%s\n", input);
  input = "goodbye 1";
  printf("%s\n", input);
  char buf[16] = "goodbye 1.1";
  input = buf;
  ((char *)(input))[0] = 'G';
  printf("%s\n", input);
}


x86 assembly (clang, -O0):
<k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
mov    0xec2(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xebf(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movb   $0x47,(%rax)
mov    -0x8(%rbp),%rsi
lea    0xe89(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<k>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rsi
lea    0xee1(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xed6(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
movaps 0xed3(%rip),%xmm0
movaps %xmm0,(%rsp)
movb   $0x47,(%rsp)
mov    %rsp,%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [10 x i8] c"goodbye 1\00"
@__const.k.buf = [16 x i8] c"goodbye 1.1\00\00\00\00\00"
define void @k(i8* %0) {
%2 = alloca i8*
%3 = alloca [16 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
store i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8** %2
%6 = load i8*, i8** %2
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = bitcast [16 x i8]* %3 to i8*
%9 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
store i8* %9, i8** %2
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 0
store i8 71, i8* %11
%12 = load i8*, i8** %2
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %12)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [10 x i8] c"goodbye 1\00"
@__const.k.buf = [16 x i8] c"goodbye 1.1\00\00\00\00\00"
define void @k(i8* %0) {
%2 = alloca [16 x i8]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
store i8 71, i8* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
ret void
}
char test_48_0(char *mem) { return __atomic_and_fetch(mem + 4, 1, 4); }


x86 assembly (clang, -O0):
<test_48_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x4,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,-0xc(%rbp)
mov    0x4(%rax),%al
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%sil
mov    %al,%dl
and    %sil,%dl
lock cmpxchg %dl,(%rcx)
sete   %cl
mov    %al,-0x19(%rbp)
test   $0x1,%cl
mov    %al,-0xb(%rbp)
jne    1152 <test_48_0+0x52>
jmp    1127 <test_48_0+0x27>
mov    -0xc(%rbp),%cl
mov    -0x19(%rbp),%al
and    %cl,%al
mov    %al,-0xa(%rbp)
movsbl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_48_0>:
mov    0x4(%rdi),%al
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%ecx
and    $0x1,%cl
lock cmpxchg %cl,0x4(%rdi)
jne    1110 <test_48_0+0x10>
and    $0x1,%al
ret

LLVM IR (-O0):
define signext i8 @test_48_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 4
store i8 1, i8* %3
%7 = load i8, i8* %3
%8 = atomicrmw and i8* %6, i8 %7 acq_rel
%9 = and i8 %8, %7
store i8 %9, i8* %4
%10 = load i8, i8* %4
ret i8 %10
}

LLVM IR (-O2):
define signext i8 @test_48_0(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 4
%3 = atomicrmw and i8* %2, i8 1 acq_rel
%4 = and i8 %3, 1
ret i8 %4
}
int median(int A, int B, int C) {
  if ((A - B) * (C - A) >= 0) {
    return A;
  } else if ((B - A) * (C - B) >= 0) {
    return B;
  } else {
    return C;
  }
}


x86 assembly (clang, -O0):
<median>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0x8(%rbp),%ecx
imul   %ecx,%eax
cmp    $0x0,%eax
jl     1130 <median+0x30>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <median+0x59>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0xc(%rbp),%ecx
imul   %ecx,%eax
cmp    $0x0,%eax
jl     1153 <median+0x53>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <median+0x59>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<median>:
mov    %edi,%eax
mov    %edi,%ecx
sub    %esi,%ecx
mov    %edx,%edi
sub    %eax,%edi
imul   %ecx,%edi
test   %edi,%edi
js     1112 <median+0x12>
ret
mov    %esi,%ecx
sub    %eax,%ecx
mov    %edx,%eax
sub    %esi,%eax
imul   %ecx,%eax
test   %eax,%eax
cmovns %esi,%edx
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @median(i32 %0, i32 %1, i32 %2) {
%4 = sub nsw i32 %0, %1
%5 = sub nsw i32 %2, %0
%6 = mul nsw i32 %5, %4
%7 = icmp sgt i32 %6, -1
br i1 %7, label %14, label %8
8: ; preds = %3
%9 = sub nsw i32 %1, %0
%10 = sub nsw i32 %2, %1
%11 = mul nsw i32 %10, %9
%12 = icmp sgt i32 %11, -1
%13 = select i1 %12, i32 %1, i32 %2
br label %14
14: ; preds = %8, %3
%15 = phi i32 [ %0, %3 ], [ %13, %8 ]
ret i32 %15
}
int main() {
  int a[2];
  a[0] = 0;
  a[1] = 0;
  a[2] = 0;
  return a[0];
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
store i32 0, i32* %3
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
store i32 0, i32* %4
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 2
store i32 0, i32* %5
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
double XrtConvertDtoGfloat(double dfloat) { return dfloat; }


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

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

LLVM IR (-O0):
define double @XrtConvertDtoGfloat(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
ret double %3
}

LLVM IR (-O2):
define double @XrtConvertDtoGfloat(double returned %0) {
ret double %0
}
int do_297() { return 297; }


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

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

LLVM IR (-O0):
define i32 @do_297() {
ret i32 297
}

LLVM IR (-O2):
define i32 @do_297() {
ret i32 297
}
void RTFileAioCtxCreate(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileAioCtxCreate() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ shuffle(void *, size_t, size_t);
int /*<<< orphan*/ sort(void *, size_t, size_t,
                        int (*)(void const *, void const *, void *), void *,
                        int /*<<< orphan*/, size_t);
void quick_sort(void *base, size_t nmemb, size_t size,
                int (*compare)(const void *a, const void *b, void *context),
                void *context) {
  shuffle(base, nmemb, size);
  sort(base, nmemb, size, compare, context, 0, nmemb - 1);
}


x86 assembly (clang, -O0):
<quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <shuffle@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
xor    %r9d,%r9d
mov    %rax,(%rsp)
call   1040 <sort@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quick_sort>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    %r8,%r14
mov    %rcx,%r15
mov    %rdx,%r12
mov    %rsi,%rbx
mov    %rdi,%r13
call   1030 <shuffle@plt>
lea    -0x1(%rbx),%rax
mov    %rax,(%rsp)
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
mov    %r15,%rcx
mov    %r14,%r8
xor    %r9d,%r9d
call   1040 <sort@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @quick_sort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i32 (i8*, i8*, i8*)*
%10 = alloca i8*
store i8* %0, i8** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i32 (i8*, i8*, i8*)* %3, i32 (i8*, i8*, i8*)** %9
store i8* %4, i8** %10
%11 = load i8*, i8** %6
%12 = load i64, i64* %7
%13 = load i64, i64* %8
%14 = call i32 @shuffle(i8* %11, i64 %12, i64 %13)
%15 = load i8*, i8** %6
%16 = load i64, i64* %7
%17 = load i64, i64* %8
%18 = load i32 (i8*, i8*, i8*)*, i32 (i8*, i8*, i8*)** %9
%19 = load i8*, i8** %10
%20 = load i64, i64* %7
%21 = sub i64 %20, 1
%22 = call i32 @sort(i8* %15, i64 %16, i64 %17, i32 (i8*, i8*, i8*)* %18, i8* %19, i32 0, i64 %21)
ret void
}

LLVM IR (-O2):
define void @quick_sort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4) {
%6 = tail call i32 @shuffle(i8* %0, i64 %1, i64 %2)
%7 = add i64 %1, -1
%8 = tail call i32 @sort(i8* %0, i64 %1, i64 %2, i32 (i8*, i8*, i8*)* %3, i8* %4, i32 0, i64 %7)
ret void
}
digit(c) register c;
{ return (c >= '0' && c <= '9'); }


x86 assembly (clang, -O0):
<digit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <digit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<digit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @digit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @digit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_cvolume_avg() {
  printf("NOT IMPLEMENTED:"
         "pa_cvolume_avg"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [31 x i8] c"NOT IMPLEMENTED:pa_cvolume_avg\00"
define i32 @pa_cvolume_avg() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
long long llabs(long long j) {
  if (j < 0) {
    return -j;
  } else {
    return j;
  }
}


x86 assembly (clang, -O0):
<llabs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1122 <llabs+0x22>
xor    %eax,%eax
sub    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <llabs+0x2a>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<llabs>:
mov    %rdi,%rax
neg    %rax
cmovs  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
int new_id() {
  static int current_id = 0;
  current_id = (current_id + 1) % 16000;
  if (current_id == 0)
    current_id = 1;
  return current_id;
}


x86 assembly (clang, -O0):
<new_id>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f1a(%rip),%eax
add    $0x1,%eax
mov    $0x3e80,%ecx
cltd
idiv   %ecx
mov    %edx,0x2f09(%rip)
cmpl   $0x0,0x2f02(%rip)
jne    1132 <new_id+0x32>
movl   $0x1,0x2ef2(%rip)
mov    0x2eec(%rip),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_id>:
mov    0x2f1e(%rip),%eax
mov    %eax,%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
imul   $0x10624dd3,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x2a,%rcx
add    %edx,%ecx
imul   $0x3e80,%ecx,%ecx
neg    %ecx
add    %eax,%ecx
add    $0x1,%ecx
test   %ecx,%ecx
mov    $0x1,%eax
cmovne %ecx,%eax
mov    %eax,0x2ee5(%rip)
ret

LLVM IR (-O0):
@new_id.current_id = internal global i32 0
define i32 @new_id() {
%1 = load i32, i32* @new_id.current_id
%2 = add nsw i32 %1, 1
%3 = srem i32 %2, 16000
store i32 %3, i32* @new_id.current_id
%4 = load i32, i32* @new_id.current_id
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %0
store i32 1, i32* @new_id.current_id
br label %7
7: ; preds = %6, %0
%8 = load i32, i32* @new_id.current_id
ret i32 %8
}

LLVM IR (-O2):
@new_id.current_id = internal unnamed_addr global i32 0
define i32 @new_id() {
%1 = load i32, i32* @new_id.current_id
%2 = add nsw i32 %1, 1
%3 = srem i32 %2, 16000
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 1, i32 %3
store i32 %5, i32* @new_id.current_id
ret i32 %5
}
int f3(int x, int y) {
  if (y == -2)
    __builtin_unreachable();
  return x % -y;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0xfffffffe,-0x8(%rbp)
jne    1114 <f3+0x14>
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
mov    %edi,%eax
neg    %esi
cltd
idiv   %esi
mov    %edx,%eax
ret

LLVM IR (-O0):
define i32 @f3(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 = icmp eq i32 %5, -2
br i1 %6, label %7, label %8
7: ; preds = %2
unreachable
8: ; preds = %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = sub nsw i32 0, %10
%12 = srem i32 %9, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @f3(i32 %0, i32 %1) {
%3 = icmp ne i32 %1, -2
tail call void @llvm.assume(i1 %3)
%4 = sub nsw i32 0, %1
%5 = srem i32 %0, %4
ret i32 %5
}
int ft_numlen(long long n) {
  int len;
  len = 0;
  if (n <= 0)
    len++;
  while (n != 0) {
    n /= 10;
    len++;
  }
  return (len);
}


x86 assembly (clang, -O0):
<ft_numlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jg     1123 <ft_numlen+0x23>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <ft_numlen+0x28>
cmpq   $0x0,-0x8(%rbp)
je     1153 <ft_numlen+0x53>
mov    -0x8(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1128 <ft_numlen+0x28>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_numlen>:
xor    %ecx,%ecx
test   %rdi,%rdi
setle  %cl
je     1144 <ft_numlen+0x44>
movabs $0x6666666666666667,%rsi
66 66 66
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rdi,%rax
imul   %rsi
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x2,%rdx
add    %rax,%rdx
add    $0x1,%ecx
add    $0x9,%rdi
cmp    $0x12,%rdi
mov    %rdx,%rdi
ja     1120 <ft_numlen+0x20>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_numlen(i64 %0) {
%2 = icmp slt i64 %0, 1
%3 = zext i1 %2 to i32
%4 = icmp eq i64 %0, 0
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %9, %5 ], [ %3, %1 ]
%7 = phi i64 [ %8, %5 ], [ %0, %1 ]
%8 = sdiv i64 %7, 10
%9 = add nuw nsw i32 %6, 1
%10 = add i64 %7, 9
%11 = icmp ult i64 %10, 19
br i1 %11, label %12, label %5
12: ; preds = %5, %1
%13 = phi i32 [ %3, %1 ], [ %9, %5 ]
ret i32 %13
}
void ft_swap(int *a, int *b) {
  int tmp_a;
  tmp_a = *a;
  *a = *b;
  *b = tmp_a;
}


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

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

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

LLVM IR (-O2):
define void @ft_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void yyerror(char *x) { printf("%s\n", x); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define void @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ isalpha(int);
scalar_t__ isnum(int);
int isalnum(int c) {
  if (isnum(c) || isalpha(c))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <isnum@plt>
cmp    $0x0,%rax
jne    114f <isalnum+0x2f>
mov    -0x8(%rbp),%edi
call   1030 <isalpha@plt>
cmp    $0x0,%rax
je     115b <isalnum+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <isalnum+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
push   %rbx
mov    %edi,%ebx
call   1040 <isnum@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalnum+0x17>
pop    %rbx
ret
mov    %ebx,%edi
call   1030 <isalpha@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalnum(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isnum(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i64 @isalpha(i32 %8)
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7, %1
store i32 1, i32* %2
br label %13
12: ; preds = %7
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @isalnum(i32 %0) {
%2 = tail call i64 @isnum(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isalpha(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ init(char *);
int ok();
int /*<<< orphan*/ test();
int main() {
  init("switch statement");
  test();
  return ok();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
call   1040 <init@plt>
mov    $0x0,%al
call   1050 <test@plt>
mov    $0x0,%al
call   1030 <ok@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <init@plt>
xor    %eax,%eax
call   1050 <test@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <ok@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"switch statement\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @init(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @test()
%4 = call i32 (...) @ok()
ret i32 %4
}

LLVM IR (-O2):
@.str = [17 x i8] c"switch statement\00"
define i32 @main() {
%1 = tail call i32 @init(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @test()
%3 = tail call i32 (...) @ok()
ret i32 %3
}
/* Type definitions */
typedef unsigned int uint32_t;

/* Variables and functions */
uint32_t rotl32(const uint32_t w, const unsigned c) {
  return (w << c) | (w >> (32 - c));
}


x86 assembly (clang, -O0):
<rotl32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotl32>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @rotl32(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub i32 32, %1
%5 = lshr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
int gensdf_dfcn0(int x0, int y0, int x1, int y1) {
  int dy, dx, d;
  dx = x1 - x0;
  dy = y1 - y0;
  d = dx * dx + dy * dy;
  return (d);
}


x86 assembly (clang, -O0):
<gensdf_dfcn0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x4(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x14(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gensdf_dfcn0>:
sub    %edi,%edx
sub    %esi,%ecx
imul   %edx,%edx
imul   %ecx,%ecx
lea    (%rcx,%rdx,1),%eax
ret

LLVM IR (-O0):
define i32 @gensdf_dfcn0(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%12 = load i32, i32* %7
%13 = load i32, i32* %5
%14 = sub nsw i32 %12, %13
store i32 %14, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %6
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %9
%18 = load i32, i32* %10
%19 = load i32, i32* %10
%20 = mul nsw i32 %18, %19
%21 = load i32, i32* %9
%22 = load i32, i32* %9
%23 = mul nsw i32 %21, %22
%24 = add nsw i32 %20, %23
store i32 %24, i32* %11
%25 = load i32, i32* %11
ret i32 %25
}

LLVM IR (-O2):
define i32 @gensdf_dfcn0(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub nsw i32 %2, %0
%6 = sub nsw i32 %3, %1
%7 = mul nsw i32 %5, %5
%8 = mul nsw i32 %6, %6
%9 = add nuw nsw i32 %8, %7
ret i32 %9
}
/* Type definitions */
struct suffix_mult {
  int dummy;
};

/* Variables and functions */
unsigned int xatoull_sfx(char const *, struct suffix_mult const *);
__attribute__((always_)) unsigned int xatou_sfx(const char *str,
                                                const struct suffix_mult *sfx) {
  return xatoull_sfx(str, sfx);
}


x86 assembly (clang, -O0):
<xatou_sfx>:
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 <xatoull_sfx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xatou_sfx>:
jmp    1030 <xatoull_sfx@plt>

LLVM IR (-O0):
%struct.suffix_mult = type { i32 }
define i32 @xatou_sfx(i8* %0, %struct.suffix_mult* %1) {
%3 = alloca i8*
%4 = alloca %struct.suffix_mult*
store i8* %0, i8** %3
store %struct.suffix_mult* %1, %struct.suffix_mult** %4
%5 = load i8*, i8** %3
%6 = load %struct.suffix_mult*, %struct.suffix_mult** %4
%7 = call i32 @xatoull_sfx(i8* %5, %struct.suffix_mult* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.suffix_mult = type { i32 }
define i32 @xatou_sfx(i8* %0, %struct.suffix_mult* %1) {
%3 = tail call i32 @xatoull_sfx(i8* %0, %struct.suffix_mult* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *, int *);
int main() {
  int a, b, n;
  scanf("%d%d%d", &n, &a, &b);
  printf("%d", n * a * b * 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
mov    -0x10(%rbp),%esi
imul   -0x8(%rbp),%esi
imul   -0xc(%rbp),%esi
shl    $0x1,%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0xc(%rsp),%rsi
lea    0x14(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1040 <scanf@plt>
mov    0xc(%rsp),%esi
imul   0x14(%rsp),%esi
imul   0x10(%rsp),%esi
add    %esi,%esi
lea    0xeae(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d%d%d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = bitcast i32* %1 to i8*
%5 = bitcast i32* %2 to i8*
%6 = bitcast i32* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32* %3, i32* %1, i32* %2)
%8 = load i32, i32* %3
%9 = load i32, i32* %1
%10 = load i32, i32* %2
%11 = shl i32 %8, 1
%12 = mul i32 %11, %9
%13 = mul i32 %12, %10
%14 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int main(int argc, char **argv) {
  if (argc != 2) {
    printf("Usage : strlen <string>\n");
  } else {
    printf("Size: %d    \"%s\"\n\n", strlen(argv[1]), argv[1]);
  }
  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)
cmpl   $0x2,-0x8(%rbp)
je     1153 <main+0x33>
lea    0xeb9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1178 <main+0x58>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <strlen@plt>
mov    %eax,%esi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
cmp    $0x2,%edi
jne    1158 <main+0x28>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <strlen@plt>
mov    0x8(%rbx),%rdx
lea    0xeb3(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1164 <main+0x34>
lea    0xeb4(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"Usage : strlen <string>\0A\00"
@.str.1 = [19 x i8] c"Size: %d \22%s\22\0A\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
br label %19
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @strlen(i8* %13)
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %14, i8* %17)
br label %19
19: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [19 x i8] c"Size: %d \22%s\22\0A\0A\00"
@str = [24 x i8] c"Usage : strlen <string>\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
br label %12
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @strlen(i8* %8)
%10 = load i8*, i8** %7
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %9, i8* %10)
br label %12
12: ; preds = %6, %4
ret i32 0
}