xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void __free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @__free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ iscntrl(int);
void t_iscntrl_0x01() {
  Assert_real((iscntrl(1)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              10, ("iscntrl should be 1 for 0x01"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x01>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <iscntrl@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0xa,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x01>:
push   %rax
mov    $0x1,%edi
call   1030 <iscntrl@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0xa,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x01\00"
define void @t_iscntrl_0x01() {
%1 = call i32 @iscntrl(i32 1)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 1 for 0x01\00"
define void @t_iscntrl_0x01() {
%1 = tail call i32 @iscntrl(i32 1)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 10, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double bar(double x) { return 1.0; }


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

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

LLVM IR (-O0):
define double @bar(double %0) {
%2 = alloca double
store double %0, double* %2
ret double 1.000000e+00
}

LLVM IR (-O2):
define double @bar(double %0) {
ret double 1.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ puts(char *);
void zby_hit_good_trap() {
  puts("\x1b[32m"
       "HIT GOOD TRAP"
       "\x1b[0m");
  exit(0);
}


x86 assembly (clang, -O0):
<zby_hit_good_trap>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<zby_hit_good_trap>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"\1B[32mHIT GOOD TRAP\1B[0m\00"
define void @zby_hit_good_trap() {
%1 = call i32 @puts(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"\1B[32mHIT GOOD TRAP\1B[0m\00"
define void @zby_hit_good_trap() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
void gentlbwi() {}


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

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

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

LLVM IR (-O2):
define void @gentlbwi() {
ret void
}
/* Variables and functions */
unsigned long __arch_copy_from_user(void *, void const *, unsigned long);
unsigned long __copy_from_user(void *to, const void *from, unsigned long n) {
  return __arch_copy_from_user(to, from, n);
}


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

x86 assembly (clang, -O2):
<__copy_from_user>:
jmp    1030 <__arch_copy_from_user@plt>

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

LLVM IR (-O2):
define i64 @__copy_from_user(i8* %0, i8* %1, i64 %2) {
%4 = tail call i64 @__arch_copy_from_user(i8* %0, i8* %1, i64 %2)
ret i64 %4
}
int CloseLink(LinkId)
int LinkId;
{}


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

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

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

LLVM IR (-O2):
define i32 @CloseLink(i32 %0) {
ret i32 undef
}
/* Variables and functions */
scalar_t__ xisascii(int);
int xisgraph(int c) { return (c > (int)' ' && xisascii(c)); }


x86 assembly (clang, -O0):
<xisgraph>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    113c <xisgraph+0x2c>
mov    -0x4(%rbp),%edi
call   1030 <xisascii@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xisgraph>:
xor    %eax,%eax
cmp    $0x21,%edi
jl     112c <xisgraph+0x1c>
push   %rax
call   1030 <xisascii@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @xisgraph(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 32
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i64 @xisascii(i32 %6)
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %5, %1
%10 = phi i1 [ false, %1 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @xisgraph(i32 %0) {
%2 = icmp sgt i32 %0, 32
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i64 @xisascii(i32 %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 0, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ srand(unsigned int);
void reset_random_number_generator(unsigned int seed) { srand(seed); }


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

x86 assembly (clang, -O2):
<reset_random_number_generator>:
jmp    1030 <srand@plt>

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

LLVM IR (-O2):
define void @reset_random_number_generator(i32 %0) {
%2 = tail call i32 @srand(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *);
int /*<<< orphan*/ output_byte(int);
int /*<<< orphan*/ output_modrm(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ output_sib(int /*<<< orphan*/, int, int);
void emit_fldcw_stack(void) {
  assem_debug("fldcw (%%esp)");
  output_byte(0xd9);
  output_modrm(0, 4, 5);
  output_sib(0, 4, 4);
}


x86 assembly (clang, -O0):
<emit_fldcw_stack>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd9,%edi
call   1040 <output_byte@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x5,%edx
call   1050 <output_modrm@plt>
xor    %edi,%edi
mov    $0x4,%edx
mov    %edx,%esi
call   1060 <output_sib@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fldcw_stack>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd9,%edi
call   1040 <output_byte@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x5,%edx
call   1050 <output_modrm@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x4,%edx
pop    %rax
jmp    1060 <output_sib@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"fldcw (%%esp)\00"
define void @emit_fldcw_stack() {
%1 = call i32 @assem_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @output_byte(i32 217)
%3 = call i32 @output_modrm(i32 0, i32 4, i32 5)
%4 = call i32 @output_sib(i32 0, i32 4, i32 4)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"fldcw (%%esp)\00"
define void @emit_fldcw_stack() {
%1 = tail call i32 @assem_debug(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output_byte(i32 217)
%3 = tail call i32 @output_modrm(i32 0, i32 4, i32 5)
%4 = tail call i32 @output_sib(i32 0, i32 4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ edit_main();
void main(void) { edit_main(); }


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

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

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

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 (...) @edit_main()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ crb_puts(int /*<<< orphan*/, char *, int);
void output_crnl(void) { crb_puts(0, "\r\n", 2); }


x86 assembly (clang, -O0):
<output_crnl>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x2,%edx
call   1030 <crb_puts@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_crnl>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
mov    $0x2,%edx
jmp    1030 <crb_puts@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define void @output_crnl() {
%1 = call i32 @crb_puts(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define void @output_crnl() {
%1 = tail call i32 @crb_puts(i32 0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ol(char *);
asl() {
  ol("MOV  CL,AL");
  ol("MOV  AX,BX");
  ol("SAL  AX,CL");
}


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

x86 assembly (clang, -O2):
<asl>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <ol@plt>
lea    0xee7(%rip),%rdi
call   1030 <ol@plt>
lea    0xee6(%rip),%rdi
pop    %rax
jmp    1030 <ol@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"MOV CL,AL\00"
@.str.1 = [11 x i8] c"MOV AX,BX\00"
@.str.2 = [11 x i8] c"SAL AX,CL\00"
define i32 @asl() {
%1 = alloca i32
%2 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%5 = load i32, i32* %1
ret i32 %5
}

LLVM IR (-O2):
@.str = [11 x i8] c"MOV CL,AL\00"
@.str.1 = [11 x i8] c"MOV AX,BX\00"
@.str.2 = [11 x i8] c"SAL AX,CL\00"
define i32 @asl() {
%1 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @ol(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
ret i32 undef
}
int CMod_SurfaceFlags(int oldcontents) {
  switch (oldcontents) {
  case -3:
  case -4:
  case -5:
    return 0x20;
  case -6:
    return 0x4 | 0x10 | 0x20 | 0x20000;
  }
  return 0;
}


x86 assembly (clang, -O0):
<CMod_SurfaceFlags>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xfffffffa,%eax
je     113b <CMod_SurfaceFlags+0x3b>
jmp    111b <CMod_SurfaceFlags+0x1b>
mov    -0xc(%rbp),%eax
add    $0x5,%eax
sub    $0x2,%eax
ja     1147 <CMod_SurfaceFlags+0x47>
jmp    112f <CMod_SurfaceFlags+0x2f>
movl   $0x20,-0x4(%rbp)
jmp    114e <CMod_SurfaceFlags+0x4e>
movl   $0x20034,-0x4(%rbp)
jmp    114e <CMod_SurfaceFlags+0x4e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CMod_SurfaceFlags>:
add    $0x6,%edi
xor    %eax,%eax
cmp    $0x3,%edi
ja     1117 <CMod_SurfaceFlags+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @CMod_SurfaceFlags(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 -3, label %5
i32 -4, label %5
i32 -5, label %5
i32 -6, label %6
]
5: ; preds = %1, %1, %1
store i32 32, i32* %2
br label %8
6: ; preds = %1
store i32 131124, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@switch.table.CMod_SurfaceFlags = [4 x i32] [i32 131124, i32 32, i32 32, i32 32]
define i32 @CMod_SurfaceFlags(i32 %0) {
%2 = add i32 %0, 6
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.CMod_SurfaceFlags, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
void mlx5_vhca_event_stop(struct mlx5_core_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.mlx5_core_dev = type opaque
define void @mlx5_vhca_event_stop(%struct.mlx5_core_dev* nocapture %0) {
ret void
}
void dcic1_iomux_config() {}


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

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

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

LLVM IR (-O2):
define void @dcic1_iomux_config() {
ret void
}
/* Type definitions */
struct fa_status {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ print_error(char *);
bool status_empty_sniffer(struct fa_status *status) {
  return ({
    print_error("No status for empty sniffer");
    false;
  });
}


x86 assembly (clang, -O0):
<status_empty_sniffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <print_error@plt>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.fa_status = type { i32 }
@.str = [28 x i8] c"No status for empty sniffer\00"
define i32 @status_empty_sniffer(%struct.fa_status* %0) {
%2 = alloca %struct.fa_status*
%3 = alloca i32
store %struct.fa_status* %0, %struct.fa_status** %2
%4 = call i32 @print_error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
%5 = load i32, i32* %3
ret i32 %5
}

LLVM IR (-O2):
%struct.fa_status = type { i32 }
@.str = [28 x i8] c"No status for empty sniffer\00"
define i32 @status_empty_sniffer(%struct.fa_status* nocapture readnone %0) {
%2 = tail call i32 @print_error(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int get();
int cget() {
  register int c;
  do {
    c = get();
  } while (c == 0x1E);
  return (c);
}


x86 assembly (clang, -O0):
<cget>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <get@plt>
mov    %eax,-0x4(%rbp)
cmpl   $0x1e,-0x4(%rbp)
je     1118 <cget+0x8>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cget>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <get@plt>
cmp    $0x1e,%eax
je     1120 <cget+0x10>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @cget() {
%1 = alloca i32
br label %2
2: ; preds = %4, %0
%3 = call i32 (...) @get()
store i32 %3, i32* %1
br label %4
4: ; preds = %2
%5 = load i32, i32* %1
%6 = icmp eq i32 %5, 30
br i1 %6, label %2, label %7
7: ; preds = %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
define i32 @cget() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @get()
%3 = icmp eq i32 %2, 30
br i1 %3, label %1, label %4
4: ; preds = %1
ret i32 %2
}
/* Type definitions */
typedef int time_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int time(int /*<<< orphan*/);
int main() {
  int i;
  time_t t;
  printf("%d\n", time(0));
  for (i = 0; i < 10000000; ++i)
    t = time(0);
  printf("%d\n", time(0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x989680,-0x8(%rbp)
jge    1170 <main+0x50>
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    114b <main+0x2b>
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1040 <time@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x989680,%ebx
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1040 <time@plt>
add    $0xffffffff,%ebx
jne    1140 <main+0x20>
xor    %edi,%edi
call   1040 <time@plt>
lea    0xea6(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @time(i32 0)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
store i32 0, i32* %2
br label %6
6: ; preds = %11, %0
%7 = load i32, i32* %2
%8 = icmp slt i32 %7, 10000000
br i1 %8, label %9, label %14
9: ; preds = %6
%10 = call i32 @time(i32 0)
store i32 %10, i32* %3
br label %11
11: ; preds = %9
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %6
14: ; preds = %6
%15 = call i32 @time(i32 0)
%16 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
br label %3
3: ; preds = %0, %3
%4 = phi i32 [ 0, %0 ], [ %6, %3 ]
%5 = tail call i32 @time(i32 0)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 10000000
br i1 %7, label %8, label %3
8: ; preds = %3
%9 = tail call i32 @time(i32 0)
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}
char *getnum(n)
long n;
{
  static char buf[20];
  fillnum(n, buf);
  return buf;
}


x86 assembly (clang, -O0):
<getnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f19(%rip),%rsi
mov    $0x0,%al
call   1030 <fillnum@plt>
lea    0x2f0b(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnum>:
push   %rbx
lea    0x2f28(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <fillnum@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@getnum.buf = internal global [20 x i8] zeroinitializer
define i8* @getnum(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 (i64, i8*, ...) bitcast (i32 (...)* @fillnum to i32 (i64, i8*, ...)*)(i64 %3, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @getnum.buf, i64 0, i64 0))
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @getnum.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@getnum.buf = internal global [20 x i8] zeroinitializer
define i8* @getnum(i64 %0) {
%2 = tail call i32 (i64, i8*, ...) bitcast (i32 (...)* @fillnum to i32 (i64, i8*, ...)*)(i64 %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @getnum.buf, i64 0, i64 0))
ret i8* getelementptr inbounds ([20 x i8], [20 x i8]* @getnum.buf, i64 0, i64 0)
}
void EC_KEY_check_key(void) {}


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

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

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

LLVM IR (-O2):
define void @EC_KEY_check_key() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _genieWriteStr(int, char *);
int /*<<< orphan*/ gcvt(float, int, char *);
int _genieWriteStrFloat(int index, float n, int precision) {
  char str[sizeof(long)];
  gcvt(n, precision, str);
  _genieWriteStr(index, str);
  return 0;
}


x86 assembly (clang, -O0):
<_genieWriteStrFloat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
mov    -0xc(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1030 <gcvt@plt>
mov    -0x4(%rbp),%edi
lea    -0x14(%rbp),%rsi
call   1040 <_genieWriteStr@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_genieWriteStrFloat>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    %rsp,%r14
mov    %esi,%edi
mov    %r14,%rsi
call   1030 <gcvt@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1040 <_genieWriteStr@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @_genieWriteStrFloat(i32 %0, float %1, i32 %2) {
%4 = alloca i32
%5 = alloca float
%6 = alloca i32
%7 = alloca [8 x i8]
store i32 %0, i32* %4
store float %1, float* %5
store i32 %2, i32* %6
%8 = load float, float* %5
%9 = load i32, i32* %6
%10 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%11 = call i32 @gcvt(float %8, i32 %9, i8* %10)
%12 = load i32, i32* %4
%13 = getelementptr inbounds [8 x i8], [8 x i8]* %7, i64 0, i64 0
%14 = call i32 @_genieWriteStr(i32 %12, i8* %13)
ret i32 0
}

LLVM IR (-O2):
define i32 @_genieWriteStrFloat(i32 %0, float %1, i32 %2) {
%4 = alloca [8 x i8]
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%6 = call i32 @gcvt(float %1, i32 %2, i8* %5)
%7 = call i32 @_genieWriteStr(i32 %0, i8* %5)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigfillset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void sig_blockall(void) {
  sigset_t set;
  sigfillset(&set);
  sigprocmask(SIG_BLOCK, &set, NULL);
}


x86 assembly (clang, -O0):
<sig_blockall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigfillset@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_blockall>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigfillset@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIG_BLOCK = global i32 0
define void @sig_blockall() {
%1 = alloca i32
%2 = call i32 @sigfillset(i32* %1)
%3 = load i32, i32* @SIG_BLOCK
%4 = call i32 @sigprocmask(i32 %3, i32* %1, i32* null)
ret void
}

LLVM IR (-O2):
@SIG_BLOCK = global i32 0
define void @sig_blockall() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigfillset(i32* %1)
%4 = load i32, i32* @SIG_BLOCK
%5 = call i32 @sigprocmask(i32 %4, i32* %1, i32* null)
ret void
}
float HMM_Lerp(float A, float Time, float B) {
  ;
  float Result = (1.0f - Time) * A + Time * B;
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_Lerp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  0xee5(%rip),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0xc(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_Lerp>:
movss  0xef8(%rip),%xmm3
subss  %xmm1,%xmm3
mulss  %xmm1,%xmm2
mulss  %xmm3,%xmm0
addss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @HMM_Lerp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %5
%9 = fsub float 1.000000e+00, %8
%10 = load float, float* %4
%11 = load float, float* %5
%12 = load float, float* %6
%13 = fmul float %11, %12
%14 = call float @llvm.fmuladd.f32(float %9, float %10, float %13)
store float %14, float* %7
%15 = load float, float* %7
ret float %15
}

LLVM IR (-O2):
define float @HMM_Lerp(float %0, float %1, float %2) {
%4 = fsub float 1.000000e+00, %1
%5 = fmul float %1, %2
%6 = tail call float @llvm.fmuladd.f32(float %4, float %0, float %5)
ret float %6
}
double UC_11_1_4(double F_t_s_d, double F_v_s_d, double F_t_u_d,
                 double F_v_u_d) {
  return ((F_v_s_d / F_v_u_d) + (F_t_s_d / (1.4 * F_t_u_d)));
}


x86 assembly (clang, -O0):
<UC_11_1_4>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xed1(%rip),%xmm2
mulsd  -0x18(%rbp),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<UC_11_1_4>:
mulsd  0xef8(%rip),%xmm2
unpcklpd %xmm0,%xmm1
unpcklpd %xmm2,%xmm3
divpd  %xmm3,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @UC_11_1_4(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %6
%10 = load double, double* %8
%11 = fdiv double %9, %10
%12 = load double, double* %5
%13 = load double, double* %7
%14 = fmul double 1.400000e+00, %13
%15 = fdiv double %12, %14
%16 = fadd double %11, %15
ret double %16
}

LLVM IR (-O2):
define double @UC_11_1_4(double %0, double %1, double %2, double %3) {
%5 = fmul double %2, 1.400000e+00
%6 = insertelement <2 x double> poison, double %1, i64 0
%7 = insertelement <2 x double> %6, double %0, i64 1
%8 = insertelement <2 x double> poison, double %3, i64 0
%9 = insertelement <2 x double> %8, double %5, i64 1
%10 = fdiv <2 x double> %7, %9
%11 = shufflevector <2 x double> %10, <2 x double> poison, <2 x i32> <i32 1, i32 undef>
%12 = fadd <2 x double> %10, %11
%13 = extractelement <2 x double> %12, i64 0
ret double %13
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_cmpunord_ps(int /*<<< orphan*/, int /*<<< orphan*/);
__m128 test_mm_cmpunord_ps(__m128 __a, __m128 __b) {
  return _mm_cmpunord_ps(__a, __b);
}


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

x86 assembly (clang, -O2):
<test_mm_cmpunord_ps>:
jmp    1030 <_mm_cmpunord_ps@plt>

LLVM IR (-O0):
define i32 @test_mm_cmpunord_ps(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 = call i32 @_mm_cmpunord_ps(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_mm_cmpunord_ps(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_cmpunord_ps(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int ex_put_init_global(int, int, int, int, int, int);
int ne_test_pinig(int fileid) {
  int nng = 100, neg = 50, nebg = 5, nnsg = 2, nssg = 3;
  return (ex_put_init_global(fileid, nng, neg, nebg, nnsg, nssg));
}


x86 assembly (clang, -O0):
<ne_test_pinig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x64,-0x8(%rbp)
movl   $0x32,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movl   $0x3,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
call   1030 <ex_put_init_global@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_test_pinig>:
mov    $0x64,%esi
mov    $0x32,%edx
mov    $0x5,%ecx
mov    $0x2,%r8d
mov    $0x3,%r9d
jmp    1030 <ex_put_init_global@plt>

LLVM IR (-O0):
define i32 @ne_test_pinig(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %2
store i32 100, i32* %3
store i32 50, i32* %4
store i32 5, i32* %5
store i32 2, i32* %6
store i32 3, i32* %7
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = load i32, i32* %5
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i32 @ex_put_init_global(i32 %8, i32 %9, i32 %10, i32 %11, i32 %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
define i32 @ne_test_pinig(i32 %0) {
%2 = tail call i32 @ex_put_init_global(i32 %0, i32 100, i32 50, i32 5, i32 2, i32 3)
ret i32 %2
}
int test1(int a) { return !(a & 4); }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x4,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
xor    %eax,%eax
test   $0x4,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @test1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 4
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @test1(i32 %0) {
%2 = lshr i32 %0, 2
%3 = and i32 %2, 1
%4 = xor i32 %3, 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ vfork();
int main(int argc, char *argv[]) {
  for (;;)
    vfork();
}


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)
call   1030 <vfork@plt>
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
call   1030 <vfork@plt>
jmp    1120 <main+0x10>

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
br label %6
6: ; preds = %6, %2
%7 = call i32 @vfork()
br label %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
br label %3
3: ; preds = %3, %2
%4 = call i32 @vfork()
br label %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;
struct cw_LogWriter {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ vprintf(char const *, int /*<<< orphan*/);
void write(int level, const char *format, va_list args,
           struct cw_LogWriter *w) {
  vprintf(format, args);
  printf("\n");
}


x86 assembly (clang, -O0):
<write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <vprintf@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write>:
push   %rax
mov    %rsi,%rdi
mov    %edx,%esi
call   1040 <vprintf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
%struct.cw_LogWriter = type { i32 }
define void @write(i32 %0, i8* nocapture %1, i32 %2, %struct.cw_LogWriter* nocapture readnone %3) {
%5 = tail call i32 @vprintf(i8* %1, i32 %2)
%6 = tail call i32 @putchar(i32 10)
ret void
}
void RTAvlPVGetBestFit(void) {}


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

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

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

LLVM IR (-O2):
define void @RTAvlPVGetBestFit() {
ret void
}
void restore_mode(void) {}


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

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

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

LLVM IR (-O2):
define void @restore_mode() {
ret void
}
/* Variables and functions */
int null_iterator(char **label) {
  static int state = 0;
  if (NULL == label) {
    state = 0;
    return 0;
  }
  *label = "ALL";
  state++;
  return state == 1 ? 0 : -1;
}


x86 assembly (clang, -O0):
<null_iterator>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
jne    112a <null_iterator+0x2a>
movl   $0x0,0x2f06(%rip)
movl   $0x0,-0x4(%rbp)
jmp    115d <null_iterator+0x5d>
mov    -0x10(%rbp),%rax
lea    0xecb(%rip),%rcx
mov    %rcx,(%rax)
mov    0x2ee6(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2edd(%rip)
mov    0x2ed7(%rip),%edx
mov    $0xffffffff,%eax
xor    %ecx,%ecx
cmp    $0x1,%edx
cmove  %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_iterator>:
test   %rdi,%rdi
je     1123 <null_iterator+0x23>
lea    0xef4(%rip),%rax
mov    %rax,(%rdi)
mov    0x2f0f(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2f06(%rip)
neg    %eax
sbb    %eax,%eax
ret
movl   $0x0,0x2ef7(%rip)
xor    %eax,%eax
ret

LLVM IR (-O0):
@null_iterator.state = internal global i32 0
@.str = [4 x i8] c"ALL\00"
define i32 @null_iterator(i8** %0) {
%2 = alloca i32
%3 = alloca i8**
store i8** %0, i8*** %3
%4 = load i8**, i8*** %3
%5 = icmp eq i8** null, %4
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* @null_iterator.state
store i32 0, i32* %2
br label %15
7: ; preds = %1
%8 = load i8**, i8*** %3
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %8
%9 = load i32, i32* @null_iterator.state
%10 = add nsw i32 %9, 1
store i32 %10, i32* @null_iterator.state
%11 = load i32, i32* @null_iterator.state
%12 = icmp eq i32 %11, 1
%13 = zext i1 %12 to i64
%14 = select i1 %12, i32 0, i32 -1
store i32 %14, i32* %2
br label %15
15: ; preds = %7, %6
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@null_iterator.state = internal unnamed_addr global i32 0
@.str = [4 x i8] c"ALL\00"
define i32 @null_iterator(i8** writeonly %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %3, label %4
3: ; preds = %1
store i32 0, i32* @null_iterator.state
br label %9
4: ; preds = %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %0
%5 = load i32, i32* @null_iterator.state
%6 = add nsw i32 %5, 1
store i32 %6, i32* @null_iterator.state
%7 = icmp ne i32 %5, 0
%8 = sext i1 %7 to i32
br label %9
9: ; preds = %4, %3
%10 = phi i32 [ 0, %3 ], [ %8, %4 ]
ret i32 %10
}
int test_imm_DDuint64_highword_mem(unsigned long long *val) {
  return ((*val >> 32) & (0xDD << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DDuint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
shr    $0x20,%rdx
and    $0xdd,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_DDuint64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 32
%6 = and i64 %5, 221
%7 = icmp ne i64 %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_DDuint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 949187772416
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void L_RestoreConfig(void) {}


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

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

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

LLVM IR (-O2):
define void @L_RestoreConfig() {
ret void
}
void BurnYM2151SelectRegister(const unsigned char nRegister) {
  extern unsigned int nBurnCurrentYM2151Register;
  nBurnCurrentYM2151Register = nRegister;
}


x86 assembly (clang, -O0):
<BurnYM2151SelectRegister>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%ecx
mov    0x2ecb(%rip),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<BurnYM2151SelectRegister>:
mov    0x2ed9(%rip),%rax
mov    %edi,(%rax)
ret

LLVM IR (-O0):
@nBurnCurrentYM2151Register = external global i32
define void @BurnYM2151SelectRegister(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
store i32 %4, i32* @nBurnCurrentYM2151Register
ret void
}

LLVM IR (-O2):
@nBurnCurrentYM2151Register = external global i32
define void @BurnYM2151SelectRegister(i8 zeroext %0) {
%2 = zext i8 %0 to i32
store i32 %2, i32* @nBurnCurrentYM2151Register
ret void
}
/* Variables and functions */
int /*<<< orphan*/ metal_machine_cache_flush(void *, unsigned int);
void metal_cache_flush(void *addr, unsigned int len) {
  metal_machine_cache_flush(addr, len);
}


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

x86 assembly (clang, -O2):
<metal_cache_flush>:
jmp    1030 <metal_machine_cache_flush@plt>

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

LLVM IR (-O2):
define void @metal_cache_flush(i8* %0, i32 %1) {
%3 = tail call i32 @metal_machine_cache_flush(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ setuid(int);
int /*<<< orphan*/ system(char *);
int main(int argc, char **argv) {
  if (argc != 3)
    return 1;
  int uid = atoi(argv[1]);
  setuid(uid);
  system(argv[2]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     115c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1188 <main+0x58>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <setuid@plt>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
call   1030 <system@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x3,%edi
jne    115a <main+0x2a>
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <atoi@plt>
mov    %eax,%edi
call   1050 <setuid@plt>
mov    0x10(%rbx),%rdi
call   1030 <system@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 3
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %21
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @atoi(i8* %13)
store i32 %14, i32* %6
%15 = load i32, i32* %6
%16 = call i32 @setuid(i32 %15)
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32 @system(i8* %19)
store i32 0, i32* %3
br label %21
21: ; preds = %10, %9
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 3
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = tail call i32 @setuid(i32 %7)
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @system(i8* %10)
br label %12
12: ; preds = %2, %4
%13 = phi i32 [ 0, %4 ], [ 1, %2 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Open Source Sw Project\n");
  printf("first GitHub Tranning\n");
  printf("second GitHub Tranning\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"Open Source Sw Project\0A\00"
@.str.1 = [23 x i8] c"first GitHub Tranning\0A\00"
@.str.2 = [24 x i8] c"second GitHub Tranning\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [23 x i8] c"Open Source Sw Project\00"
@str.3 = [22 x i8] c"first GitHub Tranning\00"
@str.4 = [23 x i8] c"second GitHub Tranning\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int min_funksjon(int, int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int c = min_funksjon(2, 3);
  printf("c=%d", c);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <min_funksjon@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
mov    $0x3,%esi
call   1030 <min_funksjon@plt>
lea    0xec9(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [5 x i8] c"c=%d\00"
define i32 @main() {
%1 = tail call i32 @min_funksjon(i32 2, i32 3)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int test_imm_C7uint32_reg(unsigned int val) {
  return ((val) & (0xC7 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_C7uint32_reg(i32 %0) {
%2 = and i32 %0, 199
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fatal(char *);
void wr_init(const char *fname) {
  fatal("saroute"
        ":Not enough information is known about this format to write it.\n");
}


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

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

LLVM IR (-O0):
@.str = [72 x i8] c"saroute:Not enough information is known about this format to write it.\0A\00"
define void @wr_init(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @fatal(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [72 x i8] c"saroute:Not enough information is known about this format to write it.\0A\00"
define void @wr_init(i8* nocapture readnone %0) {
%2 = tail call i32 @fatal(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void exit_fn(int status, void *__data) {
  printf("exit status: %d, data: %d\n", status, *(int *)__data);
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"exit status: %d, data: %d\0A\00"
define void @exit_fn(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"exit status: %d, data: %d\0A\00"
define void @exit_fn(i32 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %4)
ret void
}