xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ disk_format();
int /*<<< orphan*/ fs_init();
void test_init() {
  disk_format();
  fs_init();
}


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

x86 assembly (clang, -O2):
<test_init>:
push   %rax
xor    %eax,%eax
call   1040 <disk_format@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <fs_init@plt>

LLVM IR (-O0):
define void @test_init() {
%1 = call i32 (...) @disk_format()
%2 = call i32 (...) @fs_init()
ret void
}

LLVM IR (-O2):
define void @test_init() {
%1 = tail call i32 (...) @disk_format()
%2 = tail call i32 (...) @fs_init()
ret void
}
/* Type definitions */
struct config_options {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ set_bin_refine_scheme(struct config_options *, int);
void reset_bin_refine_scheme(struct config_options *options) {
  set_bin_refine_scheme(options, 0x0);
}


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

x86 assembly (clang, -O2):
<reset_bin_refine_scheme>:
xor    %esi,%esi
jmp    1030 <set_bin_refine_scheme@plt>

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

LLVM IR (-O2):
%struct.config_options = type { i32 }
define void @reset_bin_refine_scheme(%struct.config_options* %0) {
%2 = tail call i32 @set_bin_refine_scheme(%struct.config_options* %0, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ctrl_outl(int, int);
extern void harp_set_vpp_on(void) { ctrl_outl(1, (0xa7000000 + 0x00000010)); }


x86 assembly (clang, -O0):
<harp_set_vpp_on>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0xa7000010,%esi
call   1030 <ctrl_outl@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<harp_set_vpp_on>:
mov    $0x1,%edi
mov    $0xa7000010,%esi
jmp    1030 <ctrl_outl@plt>

LLVM IR (-O0):
define void @harp_set_vpp_on() {
%1 = call i32 @ctrl_outl(i32 1, i32 -1493172208)
ret void
}

LLVM IR (-O2):
define void @harp_set_vpp_on() {
%1 = tail call i32 @ctrl_outl(i32 1, i32 -1493172208)
ret void
}
int f(int j) {
  switch (j) {
  case 3:
    return 4;
  default:
    return 5;
  }
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
jne    1124 <f+0x24>
jmp    1118 <f+0x18>
movl   $0x4,-0x4(%rbp)
jmp    112b <f+0x2b>
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
cmp    $0x3,%edi
sete   %al
xor    $0x5,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp eq i32 %0, 3
%3 = select i1 %2, i32 4, i32 5
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ xml_deinit();
void geo_rd_deinit(void) { xml_deinit(); }


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

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

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

LLVM IR (-O2):
define void @geo_rd_deinit() {
%1 = tail call i32 (...) @xml_deinit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ write_reg(int, int /*<<< orphan*/);
void cleanup(int signo) {
  write_reg(0x04, 0);
  exit(1);
}


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

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <write_reg@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
define void @cleanup(i32 %0) {
%2 = tail call i32 @write_reg(i32 4, i32 0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
unsigned long insert_nb(insn, value, errmsg)
unsigned long insn;
long value;
const char **errmsg;
{
  if (value < 0 || value > 32)
    *errmsg = "value out of range";
  if (value == 32)
    value = 0;
  return insn | ((value & 0x1f) << 11);
}


x86 assembly (clang, -O0):
<insert_nb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jl     1126 <insert_nb+0x26>
cmpq   $0x20,-0x10(%rbp)
jle    1134 <insert_nb+0x34>
mov    -0x18(%rbp),%rax
lea    0xecf(%rip),%rcx
mov    %rcx,(%rax)
cmpq   $0x20,-0x10(%rbp)
jne    1147 <insert_nb+0x47>
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
and    $0x1f,%rcx
shl    $0xb,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_nb>:
cmp    $0x21,%rsi
jb     1110 <insert_nb+0x10>
lea    0xef3(%rip),%rax
mov    %rax,(%rdx)
shl    $0xb,%esi
movzwl %si,%eax
or     %rdi,%rax
ret

LLVM IR (-O0):
@.str = [19 x i8] c"value out of range\00"
define i64 @insert_nb(i64 %0, i64 %1, i8** %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8**
store i64 %0, i64* %4
store i64 %1, i64* %5
store i8** %2, i8*** %6
%7 = load i64, i64* %5
%8 = icmp slt i64 %7, 0
br i1 %8, label %12, label %9
9: ; preds = %3
%10 = load i64, i64* %5
%11 = icmp sgt i64 %10, 32
br i1 %11, label %12, label %14
12: ; preds = %9, %3
%13 = load i8**, i8*** %6
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %13
br label %14
14: ; preds = %12, %9
%15 = load i64, i64* %5
%16 = icmp eq i64 %15, 32
br i1 %16, label %17, label %18
17: ; preds = %14
store i64 0, i64* %5
br label %18
18: ; preds = %17, %14
%19 = load i64, i64* %4
%20 = load i64, i64* %5
%21 = and i64 %20, 31
%22 = shl i64 %21, 11
%23 = or i64 %19, %22
ret i64 %23
}

LLVM IR (-O2):
@.str = [19 x i8] c"value out of range\00"
define i64 @insert_nb(i64 %0, i64 %1, i8** nocapture writeonly %2) {
%4 = icmp ugt i64 %1, 32
br i1 %4, label %5, label %6
5: ; preds = %3
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8** %2
br label %6
6: ; preds = %3, %5
%7 = shl i64 %1, 11
%8 = and i64 %7, 63488
%9 = or i64 %8, %0
ret i64 %9
}
unsigned int f(unsigned int a, unsigned int b, unsigned int c) {
  a += (unsigned short)b * (unsigned short)c;
  if (!a)
    return 10;
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
movzwl %ax,%eax
mov    -0x10(%rbp),%ecx
movzwl %cx,%ecx
imul   %ecx,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1138 <f+0x38>
movl   $0xa,-0x4(%rbp)
jmp    113e <f+0x3e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movzwl %si,%eax
movzwl %dx,%ecx
imul   %eax,%ecx
add    %edi,%ecx
mov    $0xa,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %1, 65535
%5 = and i32 %2, 65535
%6 = mul nuw nsw i32 %5, %4
%7 = add i32 %6, %0
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 10, i32 %7
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("\nrgb565 raw extraction tool by Oussema HARBI "
         "<oussema.elharbi@gmail.com>\n");
  printf("Usage : rgb565extract source_file dump_file yStart yEnd width\n");
  printf(
      "Example : ./rgb565extract Settings.raw settings_half.raw 0 240 800\n\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf25(%rip),%rdi
call   1030 <puts@plt>
lea    0xf57(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [74 x i8] c"\0Argb565 raw extraction tool by Oussema HARBI <oussema.elharbi@gmail.com>\0A\00"
@.str.1 = [63 x i8] c"Usage : rgb565extract source_file dump_file yStart yEnd width\0A\00"
@.str.2 = [69 x i8] c"Example : ./rgb565extract Settings.raw settings_half.raw 0 240 800\0A\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [73 x i8] c"\0Argb565 raw extraction tool by Oussema HARBI <oussema.elharbi@gmail.com>\00"
@str.3 = [62 x i8] c"Usage : rgb565extract source_file dump_file yStart yEnd width\00"
@str.4 = [68 x i8] c"Example : ./rgb565extract Settings.raw settings_half.raw 0 240 800\0A\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([73 x i8], [73 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([68 x i8], [68 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
int openmax();
int /*<<< orphan*/ printf(char *, int);
int main() { printf("openmax %d\n", openmax()); }


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"openmax %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @openmax()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ time(int /*<<< orphan*/);
int delay(long seconds) {
  time_t t1;
  t1 = time(0) + seconds;
  while (time(0) < t1)
    ;
}


x86 assembly (clang, -O0):
<delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
xor    %edi,%edi
call   1030 <time@plt>
cmp    -0x18(%rbp),%rax
jge    1141 <delay+0x31>
jmp    112b <delay+0x1b>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %edi,%edi
call   1030 <time@plt>
mov    %rax,%rbx
add    %r14,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
call   1030 <time@plt>
cmp    %rbx,%rax
jl     1130 <delay+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @delay(i64 %0) {
%2 = tail call i64 @time(i32 0)
%3 = add nsw i64 %2, %0
br label %4
4: ; preds = %4, %1
%5 = tail call i64 @time(i32 0)
%6 = icmp slt i64 %5, %3
br i1 %6, label %4, label %7
7: ; preds = %4
ret i32 undef
}
int divpwr2(int x, int n) { return (x + ((x >> 31) & ((1 << n) + ~0))) >> n; }


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

x86 assembly (clang, -O2):
<divpwr2>:
mov    %esi,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
not    %edx
mov    %edi,%eax
sar    $0x1f,%eax
and    %edx,%eax
add    %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @divpwr2(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* %3
%7 = ashr i32 %6, 31
%8 = load i32, i32* %4
%9 = shl i32 1, %8
%10 = add nsw i32 %9, -1
%11 = and i32 %7, %10
%12 = add nsw i32 %5, %11
%13 = load i32, i32* %4
%14 = ashr i32 %12, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @divpwr2(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = icmp slt i32 %0, 0
%6 = select i1 %5, i32 %4, i32 0
%7 = add nsw i32 %6, %0
%8 = ashr i32 %7, %1
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void _usage(FILE *f) {
  fprintf(f, "usage: resu user:group -- cmd [args...]\n");
}


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

x86 assembly (clang, -O2):
<_usage>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x28,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [41 x i8] c"usage: resu user:group -- cmd [args...]\0A\00"
define void @_usage(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [41 x i8] c"usage: resu user:group -- cmd [args...]\0A\00"
define void @_usage(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 40, i64 1, i32* %0)
ret void
}
/* Variables and functions */
scalar_t__ j0l(long double);
int /*<<< orphan*/ link_failure_j0l();
void test_j0l(long double ld) {
  if (j0l(ld) != j0l(ld))
    link_failure_j0l();
}


x86 assembly (clang, -O0):
<test_j0l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <j0l@plt>
mov    %rax,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1040 <j0l@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
je     1163 <test_j0l+0x43>
mov    $0x0,%al
call   1030 <link_failure_j0l@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_j0l>:
push   %rbx
sub    $0x20,%rsp
fldt   0x30(%rsp)
fld    %st(0)
fstpt  0x14(%rsp)
fstpt  (%rsp)
call   1040 <j0l@plt>
mov    %rax,%rbx
fldt   0x14(%rsp)
fstpt  (%rsp)
call   1040 <j0l@plt>
cmp    %rax,%rbx
jne    1151 <test_j0l+0x31>
add    $0x20,%rsp
pop    %rbx
ret
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
jmp    1030 <link_failure_j0l@plt>

LLVM IR (-O0):
define void @test_j0l(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = call i64 @j0l(x86_fp80 %3)
%5 = load x86_fp80, x86_fp80* %2
%6 = call i64 @j0l(x86_fp80 %5)
%7 = icmp ne i64 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @link_failure_j0l()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @test_j0l(x86_fp80 %0) {
%2 = tail call i64 @j0l(x86_fp80 %0)
%3 = tail call i64 @j0l(x86_fp80 %0)
%4 = icmp eq i64 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call i32 (...) @link_failure_j0l()
br label %7
7: ; preds = %5, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putch(int /*<<< orphan*/);
void puts(char *s) {
  while (*s)
    putch(*s++);
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <puts+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putch@plt>
jmp    111c <puts+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <puts+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putch@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <puts+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @puts(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = getelementptr inbounds i8, i8* %8, i32 1
store i8* %9, i8** %2
%10 = load i8, i8* %8
%11 = sext i8 %10 to i32
%12 = call i32 @putch(i32 %11)
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @puts(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @putch(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Type definitions */
struct termios {
  int c_cflag;
};
typedef int speed_t;

/* Variables and functions */
int CBAUD;
int CBAUDEX;
speed_t cfgetospeed(const struct termios *termios_p) {
  return termios_p->c_cflag & (CBAUD | CBAUDEX);
}


x86 assembly (clang, -O0):
<cfgetospeed>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    0x2ebb(%rip),%rcx
mov    (%rcx),%ecx
mov    0x2ec2(%rip),%rdx
or     (%rdx),%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfgetospeed>:
mov    0x2ec9(%rip),%rcx
mov    0x2ed2(%rip),%rax
mov    (%rax),%eax
or     (%rcx),%eax
and    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@CBAUD = global i32 0
@CBAUDEX = global i32 0
define i32 @cfgetospeed(%struct.termios* %0) {
%2 = alloca %struct.termios*
store %struct.termios* %0, %struct.termios** %2
%3 = load %struct.termios*, %struct.termios** %2
%4 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = load i32, i32* @CBAUD
%7 = load i32, i32* @CBAUDEX
%8 = or i32 %6, %7
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@CBAUD = global i32 0
@CBAUDEX = global i32 0
define i32 @cfgetospeed(%struct.termios* nocapture %0) {
%2 = getelementptr inbounds %struct.termios, %struct.termios* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = load i32, i32* @CBAUD
%5 = load i32, i32* @CBAUDEX
%6 = or i32 %5, %4
%7 = and i32 %6, %3
ret i32 %7
}
/* Variables and functions */
void *malloc(size_t);
void *MALLOC(size_t size) {
  void *p;
  p = malloc(size);
  return p;
}


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

x86 assembly (clang, -O2):
<MALLOC>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @MALLOC(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
int doublecmp(void *p1, void *p2) {
  double *d1 = p1, *d2 = p2;
  return *d1 > *d2 ? 1 : (*d1 < *d2 ? -1 : 0);
}


x86 assembly (clang, -O0):
<doublecmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomisd (%rax),%xmm0
jbe    113f <doublecmp+0x3f>
mov    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    1160 <doublecmp+0x60>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x20(%rbp),%rax
movsd  (%rax),%xmm0
xor    %eax,%eax
mov    $0xffffffff,%ecx
ucomisd %xmm1,%xmm0
cmova  %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<doublecmp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
neg    %ecx
ucomisd %xmm1,%xmm0
mov    $0x1,%eax
cmovbe %ecx,%eax
ret

LLVM IR (-O0):
define i32 @doublecmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double*
%6 = alloca double*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to double*
store double* %8, double** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to double*
store double* %10, double** %6
%11 = load double*, double** %5
%12 = load double, double* %11
%13 = load double*, double** %6
%14 = load double, double* %13
%15 = fcmp ogt double %12, %14
br i1 %15, label %16, label %17
16: ; preds = %2
br label %25
17: ; preds = %2
%18 = load double*, double** %5
%19 = load double, double* %18
%20 = load double*, double** %6
%21 = load double, double* %20
%22 = fcmp olt double %19, %21
%23 = zext i1 %22 to i64
%24 = select i1 %22, i32 -1, i32 0
br label %25
25: ; preds = %17, %16
%26 = phi i32 [ 1, %16 ], [ %24, %17 ]
ret i32 %26
}

LLVM IR (-O2):
define i32 @doublecmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = fcmp olt double %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void escreveNumerosAsc(int a, int b) {
  for (a = a; a <= b; ++a) {
    printf("%d\t", a);
  }
}


x86 assembly (clang, -O0):
<escreveNumerosAsc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     114d <escreveNumerosAsc+0x3d>
mov    -0x4(%rbp),%esi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1124 <escreveNumerosAsc+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<escreveNumerosAsc>:
push   %rbp
push   %r14
push   %rbx
cmp    %esi,%edi
jg     1141 <escreveNumerosAsc+0x31>
mov    %esi,%ebx
mov    %edi,%ebp
add    $0x1,%ebx
lea    0xeda(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    %ebp,%ebx
jne    1130 <escreveNumerosAsc+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\09\00"
define void @escreveNumerosAsc(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, %1
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %0, %2 ]
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = add i32 %5, 1
%8 = icmp eq i32 %5, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void uart_init(void) {
  outb(0x0, 0x3f8 + 0x01);
  outb(0x01, 0x3f8 + 0x02);
  outb(0x80 | 0x3, 0x3f8 + 0x03);
  outb((1) & 0xFF, 0x3f8 + 0x00);
  outb(((1) >> 8) & 0xFF, 0x3f8 + 0x01);
  outb(0x3, 0x3f8 + 0x03);
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x3f9,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x3fa,%esi
call   1030 <outb@plt>
mov    $0x83,%edi
mov    $0x3fb,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x3f8,%esi
call   1030 <outb@plt>
xor    %edi,%edi
mov    $0x3f9,%esi
call   1030 <outb@plt>
mov    $0x3,%edi
mov    $0x3fb,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
push   %rax
xor    %edi,%edi
mov    $0x3f9,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x3fa,%esi
call   1030 <outb@plt>
mov    $0x83,%edi
mov    $0x3fb,%esi
call   1030 <outb@plt>
mov    $0x1,%edi
mov    $0x3f8,%esi
call   1030 <outb@plt>
xor    %edi,%edi
mov    $0x3f9,%esi
call   1030 <outb@plt>
mov    $0x3,%edi
mov    $0x3fb,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @uart_init() {
%1 = call i32 @outb(i32 0, i32 1017)
%2 = call i32 @outb(i32 1, i32 1018)
%3 = call i32 @outb(i32 131, i32 1019)
%4 = call i32 @outb(i32 1, i32 1016)
%5 = call i32 @outb(i32 0, i32 1017)
%6 = call i32 @outb(i32 3, i32 1019)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
%1 = tail call i32 @outb(i32 0, i32 1017)
%2 = tail call i32 @outb(i32 1, i32 1018)
%3 = tail call i32 @outb(i32 131, i32 1019)
%4 = tail call i32 @outb(i32 1, i32 1016)
%5 = tail call i32 @outb(i32 0, i32 1017)
%6 = tail call i32 @outb(i32 3, i32 1019)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ReduceCentered_1D(double *, long, double *, double *, long);
int /*<<< orphan*/ ReduceStandard_1D(double *, long, double *, double *, long);
extern void Reduce_1D(double In[], long NxIn, double Out[], double g[], long ng,
                      short IsCentered) {
  if (IsCentered)
    ReduceCentered_1D(In, NxIn, Out, g, ng);
  else
    ReduceStandard_1D(In, NxIn, Out, g, ng);
}


x86 assembly (clang, -O0):
<Reduce_1D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r9w,%ax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %ax,-0x2a(%rbp)
cmpw   $0x0,-0x2a(%rbp)
je     116d <Reduce_1D+0x4d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1030 <ReduceCentered_1D@plt>
jmp    1186 <Reduce_1D+0x66>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
call   1040 <ReduceStandard_1D@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reduce_1D>:
test   %r9w,%r9w
je     112b <Reduce_1D+0xb>
jmp    1030 <ReduceCentered_1D@plt>
jmp    1040 <ReduceStandard_1D@plt>

LLVM IR (-O0):
define void @Reduce_1D(double* %0, i64 %1, double* %2, double* %3, i64 %4, i16 signext %5) {
%7 = alloca double*
%8 = alloca i64
%9 = alloca double*
%10 = alloca double*
%11 = alloca i64
%12 = alloca i16
store double* %0, double** %7
store i64 %1, i64* %8
store double* %2, double** %9
store double* %3, double** %10
store i64 %4, i64* %11
store i16 %5, i16* %12
%13 = load i16, i16* %12
%14 = icmp ne i16 %13, 0
br i1 %14, label %15, label %22
15: ; preds = %6
%16 = load double*, double** %7
%17 = load i64, i64* %8
%18 = load double*, double** %9
%19 = load double*, double** %10
%20 = load i64, i64* %11
%21 = call i32 @ReduceCentered_1D(double* %16, i64 %17, double* %18, double* %19, i64 %20)
br label %29
22: ; preds = %6
%23 = load double*, double** %7
%24 = load i64, i64* %8
%25 = load double*, double** %9
%26 = load double*, double** %10
%27 = load i64, i64* %11
%28 = call i32 @ReduceStandard_1D(double* %23, i64 %24, double* %25, double* %26, i64 %27)
br label %29
29: ; preds = %22, %15
ret void
}

LLVM IR (-O2):
define void @Reduce_1D(double* %0, i64 %1, double* %2, double* %3, i64 %4, i16 signext %5) {
%7 = icmp eq i16 %5, 0
br i1 %7, label %10, label %8
8: ; preds = %6
%9 = tail call i32 @ReduceCentered_1D(double* %0, i64 %1, double* %2, double* %3, i64 %4)
br label %12
10: ; preds = %6
%11 = tail call i32 @ReduceStandard_1D(double* %0, i64 %1, double* %2, double* %3, i64 %4)
br label %12
12: ; preds = %10, %8
ret void
}
/* Variables and functions */
int /*<<< orphan*/ aflags_clobber();
int /*<<< orphan*/ bbcount();
int /*<<< orphan*/ callpic_mov();
int /*<<< orphan*/ callpic_pop();
int /*<<< orphan*/ compiler_inscount();
int /*<<< orphan*/ cond_br();
int /*<<< orphan*/ empty();
int /*<<< orphan*/ inscount();
int /*<<< orphan*/ nonleaf();
int /*<<< orphan*/ tls_clobber();
int /*<<< orphan*/ xax_arg();
int main(void) {
  empty();
  inscount();
  callpic_pop();
  callpic_mov();
  nonleaf();
  cond_br();
  tls_clobber();
  aflags_clobber();
  compiler_inscount();
  xax_arg();
  bbcount();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1080 <empty@plt>
mov    $0x0,%al
call   10a0 <inscount@plt>
mov    $0x0,%al
call   1090 <callpic_pop@plt>
mov    $0x0,%al
call   10b0 <callpic_mov@plt>
mov    $0x0,%al
call   1070 <nonleaf@plt>
mov    $0x0,%al
call   10c0 <cond_br@plt>
mov    $0x0,%al
call   1040 <tls_clobber@plt>
mov    $0x0,%al
call   10d0 <aflags_clobber@plt>
mov    $0x0,%al
call   1030 <compiler_inscount@plt>
mov    $0x0,%al
call   1050 <xax_arg@plt>
mov    $0x0,%al
call   1060 <bbcount@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1080 <empty@plt>
xor    %eax,%eax
call   10a0 <inscount@plt>
xor    %eax,%eax
call   1090 <callpic_pop@plt>
xor    %eax,%eax
call   10b0 <callpic_mov@plt>
xor    %eax,%eax
call   1070 <nonleaf@plt>
xor    %eax,%eax
call   10c0 <cond_br@plt>
xor    %eax,%eax
call   1040 <tls_clobber@plt>
xor    %eax,%eax
call   10d0 <aflags_clobber@plt>
xor    %eax,%eax
call   1030 <compiler_inscount@plt>
xor    %eax,%eax
call   1050 <xax_arg@plt>
xor    %eax,%eax
call   1060 <bbcount@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @empty()
%2 = call i32 (...) @inscount()
%3 = call i32 (...) @callpic_pop()
%4 = call i32 (...) @callpic_mov()
%5 = call i32 (...) @nonleaf()
%6 = call i32 (...) @cond_br()
%7 = call i32 (...) @tls_clobber()
%8 = call i32 (...) @aflags_clobber()
%9 = call i32 (...) @compiler_inscount()
%10 = call i32 (...) @xax_arg()
%11 = call i32 (...) @bbcount()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @empty()
%2 = tail call i32 (...) @inscount()
%3 = tail call i32 (...) @callpic_pop()
%4 = tail call i32 (...) @callpic_mov()
%5 = tail call i32 (...) @nonleaf()
%6 = tail call i32 (...) @cond_br()
%7 = tail call i32 (...) @tls_clobber()
%8 = tail call i32 (...) @aflags_clobber()
%9 = tail call i32 (...) @compiler_inscount()
%10 = tail call i32 (...) @xax_arg()
%11 = tail call i32 (...) @bbcount()
ret i32 0
}
unsigned vax_to_local_int_(const unsigned *i) { return *i; }


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

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

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

LLVM IR (-O2):
define i32 @vax_to_local_int_(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
int dir(int pos) { return pos << 1 | 1; }


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

x86 assembly (clang, -O2):
<dir>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @dir(i32 %0) {
%2 = shl i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
int check_header() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @check_header() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EscreveCaractereLCD(char);
void EscreveFraseRamLCD(char *buffer) {
  while (*buffer) {
    EscreveCaractereLCD(*buffer);
    buffer++;
  }
}


x86 assembly (clang, -O0):
<EscreveFraseRamLCD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1146 <EscreveFraseRamLCD+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <EscreveCaractereLCD@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <EscreveFraseRamLCD+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EscreveFraseRamLCD>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <EscreveFraseRamLCD+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <EscreveCaractereLCD@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <EscreveFraseRamLCD+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @EscreveFraseRamLCD(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %7, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i8*, i8** %2
%9 = load i8, i8* %8
%10 = call i32 @EscreveCaractereLCD(i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @EscreveFraseRamLCD(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = tail call i32 @EscreveCaractereLCD(i8 signext %5)
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t temper(uint32_t y) {
  y ^= (y >> 11);
  y ^= (y << 7) & 0x9d2c5680U;
  y ^= (y << 15) & 0xefc60000U;
  y ^= (y >> 18);
  return y;
}


x86 assembly (clang, -O0):
<temper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xb,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x7,%eax
and    $0x9d2c5680,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0xf,%eax
and    $0xefc60000,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x12,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<temper>:
mov    %edi,%eax
sar    $0xb,%eax
xor    %edi,%eax
mov    %eax,%ecx
shl    $0x7,%ecx
and    $0x9d2c5680,%ecx
xor    %eax,%ecx
mov    %ecx,%edx
shl    $0xf,%edx
and    $0xefc60000,%edx
xor    %ecx,%edx
mov    %edx,%eax
sar    $0x12,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @temper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 11
%5 = load i32, i32* %2
%6 = xor i32 %5, %4
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = shl i32 %7, 7
%9 = and i32 %8, -1658038656
%10 = load i32, i32* %2
%11 = xor i32 %10, %9
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = shl i32 %12, 15
%14 = and i32 %13, -272236544
%15 = load i32, i32* %2
%16 = xor i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = ashr i32 %17, 18
%19 = load i32, i32* %2
%20 = xor i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @temper(i32 %0) {
%2 = ashr i32 %0, 11
%3 = xor i32 %2, %0
%4 = shl i32 %3, 7
%5 = and i32 %4, -1658038656
%6 = xor i32 %5, %3
%7 = shl i32 %6, 15
%8 = and i32 %7, -272236544
%9 = xor i32 %8, %6
%10 = ashr i32 %9, 18
%11 = xor i32 %10, %9
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr,
          "Usage: cmr-mergebucket [-x <delimiter] <glob> [<glob ...]\n");
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [59 x i8] c"Usage: cmr-mergebucket [-x <delimiter] <glob> [<glob ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [59 x i8] c"Usage: cmr-mergebucket [-x <delimiter] <glob> [<glob ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
ret void
}
int test_imm_AEuint8_reg(unsigned char val) {
  return ((val) & (0xAE << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_AEuint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0xae,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_AEuint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -82
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
extern char *str_int(int i) {
  static char buf[24];
  sprintf(buf, "%d", i);
  return buf;
}


x86 assembly (clang, -O0):
<str_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
lea    0xed4(%rip),%rsi
call   1030 <sprintf@plt>
lea    0x2f08(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_int>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rsi
mov    %rbx,%rdi
call   1030 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@str_int.buf = internal global [24 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @str_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @sprintf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str_int.buf, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str_int.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@str_int.buf = internal global [24 x i8] zeroinitializer
@.str = [3 x i8] c"%d\00"
define i8* @str_int(i32 %0) {
%2 = tail call i32 @sprintf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str_int.buf, i64 0, i64 0), i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* getelementptr inbounds ([24 x i8], [24 x i8]* @str_int.buf, i64 0, i64 0)
}
void gtk_window_add_accel_group() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_add_accel_group() {
ret void
}
void gtk_list_store_insert_after() {}


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

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

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

LLVM IR (-O2):
define void @gtk_list_store_insert_after() {
ret void
}
/* Variables and functions */
scalar_t__ elapsed_time();
int /*<<< orphan*/ printf(char *, double);
void print_elapsed_time_norm(int n, int count, int sz) {
  double t;
  t = (double)elapsed_time() / n;
  t = t / (double)sz * (double)count;
  printf("%.2f ", t);
}


x86 assembly (clang, -O0):
<print_elapsed_time_norm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1030 <elapsed_time@plt>
cvtsi2sd %rax,%xmm0
cvtsi2sdl -0x4(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
lea    0xe8d(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_elapsed_time_norm>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <elapsed_time@plt>
cvtsi2sd %rax,%xmm1
cvtsi2sd %ebp,%xmm0
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsi2sd %r14d,%xmm0
mulsd  %xmm1,%xmm0
lea    0xea3(%rip),%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%.2f \00"
define void @print_elapsed_time_norm(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = call i64 (...) @elapsed_time()
%9 = sitofp i64 %8 to double
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to double
%12 = fdiv double %9, %11
store double %12, double* %7
%13 = load double, double* %7
%14 = load i32, i32* %6
%15 = sitofp i32 %14 to double
%16 = fdiv double %13, %15
%17 = load i32, i32* %5
%18 = sitofp i32 %17 to double
%19 = fmul double %16, %18
store double %19, double* %7
%20 = load double, double* %7
%21 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %20)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%.2f \00"
define void @print_elapsed_time_norm(i32 %0, i32 %1, i32 %2) {
%4 = tail call i64 (...) @elapsed_time()
%5 = sitofp i64 %4 to double
%6 = sitofp i32 %0 to double
%7 = fdiv double %5, %6
%8 = sitofp i32 %2 to double
%9 = fdiv double %7, %8
%10 = sitofp i32 %1 to double
%11 = fmul double %9, %10
%12 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %11)
ret void
}
int mtime_spawn_listener() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @mtime_spawn_listener() {
ret i32 0
}
int CompareDefault(void *Data1, void *Data2) { return -1; }


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

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

LLVM IR (-O0):
define i32 @CompareDefault(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret i32 -1
}

LLVM IR (-O2):
define i32 @CompareDefault(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 -1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int getFileLen(FILE *fp) {
  fseek(fp, 0L, SEEK_END);
  int len = ftell(fp);
  fseek(fp, 0L, SEEK_SET);
  return len;
}


x86 assembly (clang, -O0):
<getFileLen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e7f(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <fseek@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getFileLen>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ebb(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @getFileLen(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = load i32, i32* @SEEK_END
%6 = call i32 @fseek(i32* %4, i64 0, i32 %5)
%7 = load i32*, i32** %2
%8 = call i32 @ftell(i32* %7)
store i32 %8, i32* %3
%9 = load i32*, i32** %2
%10 = load i32, i32* @SEEK_SET
%11 = call i32 @fseek(i32* %9, i64 0, i32 %10)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
define i32 @getFileLen(i32* nocapture %0) {
%2 = load i32, i32* @SEEK_END
%3 = tail call i32 @fseek(i32* %0, i64 0, i32 %2)
%4 = tail call i32 @ftell(i32* %0)
%5 = load i32, i32* @SEEK_SET
%6 = tail call i32 @fseek(i32* %0, i64 0, i32 %5)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
uint64_t *foo() { return NULL; }


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

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

LLVM IR (-O0):
define i32* @foo() {
ret i32* null
}

LLVM IR (-O2):
define noalias i32* @foo() {
ret i32* null
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ properties;
};
typedef TYPE_1__ XFontStruct;

/* Variables and functions */
void *get_XFontStruct_properties(void *_p) {
  return (void *)((XFontStruct *)_p)->properties;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i8* @get_XFontStruct_properties(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @get_XFontStruct_properties(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}