xunge/DecIR huggingface dataset:
/* Variables and functions */
int is_composite(int const);
int check_force_gs1(const int symbology) {
  switch (symbology) {
  case 16:
  case 72:
  case 75:
  case 31:
  case 81:
    return 1;
    break;
  }
  return is_composite(symbology);
}


x86 assembly (clang, -O0):
<check_force_gs1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x10,%eax
je     1173 <check_force_gs1+0x63>
jmp    112f <check_force_gs1+0x1f>
mov    -0xc(%rbp),%eax
sub    $0x1f,%eax
je     1173 <check_force_gs1+0x63>
jmp    1140 <check_force_gs1+0x30>
mov    -0xc(%rbp),%eax
sub    $0x48,%eax
je     1173 <check_force_gs1+0x63>
jmp    1151 <check_force_gs1+0x41>
mov    -0xc(%rbp),%eax
sub    $0x4b,%eax
je     1173 <check_force_gs1+0x63>
jmp    1162 <check_force_gs1+0x52>
mov    -0xc(%rbp),%eax
sub    $0x51,%eax
jne    117f <check_force_gs1+0x6f>
jmp    1173 <check_force_gs1+0x63>
movl   $0x1,-0x4(%rbp)
jmp    118a <check_force_gs1+0x7a>
mov    -0x8(%rbp),%edi
call   1030 <is_composite@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_force_gs1>:
lea    -0x1f(%rdi),%eax
cmp    $0x32,%eax
ja     1128 <check_force_gs1+0x18>
movabs $0x4120000000001,%rcx
bt     %rax,%rcx
jb     112d <check_force_gs1+0x1d>
cmp    $0x10,%edi
jne    1133 <check_force_gs1+0x23>
mov    $0x1,%eax
ret
jmp    1030 <is_composite@plt>

LLVM IR (-O0):
define i32 @check_force_gs1(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %6 [
i32 16, label %5
i32 72, label %5
i32 75, label %5
i32 31, label %5
i32 81, label %5
]
5: ; preds = %1, %1, %1, %1, %1
store i32 1, i32* %2
br label %9
6: ; preds = %1
%7 = load i32, i32* %3
%8 = call i32 @is_composite(i32 %7)
store i32 %8, i32* %2
br label %9
9: ; preds = %6, %5
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @check_force_gs1(i32 %0) {
switch i32 %0, label %2 [
i32 16, label %4
i32 72, label %4
i32 75, label %4
i32 31, label %4
i32 81, label %4
]
2: ; preds = %1
%3 = tail call i32 @is_composite(i32 %0)
br label %4
4: ; preds = %1, %1, %1, %1, %1, %2
%5 = phi i32 [ %3, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
int kupa() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @kupa() {
ret i32 0
}
int foo(int a) {
  if (a < 0)
    return -(1 + 0);
  if (a > 100)
    return -1;
  return a * 2 + 1;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <foo+0x1d>
movl   $0xffffffff,-0x4(%rbp)
jmp    113f <foo+0x3f>
cmpl   $0x64,-0x8(%rbp)
jle    1133 <foo+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    113f <foo+0x3f>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cmp    $0x65,%edi
lea    0x1(%rdi,%rdi,1),%ecx
mov    $0xffffffff,%eax
cmovb  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = icmp ugt i32 %0, 100
%3 = shl nsw i32 %0, 1
%4 = or i32 %3, 1
%5 = select i1 %2, i32 -1, i32 %4
ret i32 %5
}
int test01(int a, int b) { return (a >= b) ? 0x7FFFFFFF : 0x80000000; }


x86 assembly (clang, -O0):
<test01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%esi
mov    $0x80000000,%eax
mov    $0x7fffffff,%ecx
cmp    %esi,%edx
cmovge %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test01>:
xor    %eax,%eax
cmp    %esi,%edi
setl   %al
add    $0x7fffffff,%eax
ret

LLVM IR (-O0):
define i32 @test01(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 = icmp sge i32 %5, %6
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 2147483647, i32 -2147483648
ret i32 %9
}

LLVM IR (-O2):
define i32 @test01(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 -2147483648, i32 2147483647
ret i32 %4
}
/* Type definitions */
struct pbc_pattern {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _pbcM_free(struct pbc_pattern *);
void pbc_pattern_delete(struct pbc_pattern *pat) { _pbcM_free(pat); }


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

x86 assembly (clang, -O2):
<pbc_pattern_delete>:
jmp    1030 <_pbcM_free@plt>

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

LLVM IR (-O2):
%struct.pbc_pattern = type { i32 }
define void @pbc_pattern_delete(%struct.pbc_pattern* %0) {
%2 = tail call i32 @_pbcM_free(%struct.pbc_pattern* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void outhex(char *str) {
  while (*str) {
    printf("'%X' ", *str++ & 0xFFU);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<outhex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1154 <outhex+0x44>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%esi
and    $0xff,%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    111c <outhex+0xc>
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<outhex>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1158 <outhex+0x38>
mov    %rdi,%rbx
add    $0x1,%rbx
lea    0xec8(%rip),%r14
nopl   0x0(%rax,%rax,1)
movzbl %al,%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <outhex+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"'%X' \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @outhex(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 %14
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 = and i32 %11, 255
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %3
14: ; preds = %3
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"'%X' \00"
define void @outhex(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 = zext i8 %5 to i32
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Tfailed(char *);
void Toutputerr(void) { Tfailed("write error on test harness output"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"write error on test harness output\00"
define void @Toutputerr() {
%1 = call i32 @Tfailed(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"write error on test harness output\00"
define void @Toutputerr() {
%1 = tail call i32 @Tfailed(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}
void disable_servo_interrupt(void) {
  (*(volatile unsigned long *)(((0xFFFFF000) + 0x014))) = 0x20;
}


x86 assembly (clang, -O0):
<disable_servo_interrupt>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffff014,%eax
movq   $0x20,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<disable_servo_interrupt>:
mov    $0xfffff014,%eax
movq   $0x20,(%rax)
ret

LLVM IR (-O0):
define void @disable_servo_interrupt() {
store volatile i64 32, i64* inttoptr (i64 4294963220 to i64*)
ret void
}

LLVM IR (-O2):
define void @disable_servo_interrupt() {
store volatile i64 32, i64* inttoptr (i64 4294963220 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int sfun(void) {
  puts("sfun");
  return 42;
}


x86 assembly (clang, -O0):
<sfun>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2a,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfun>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2a,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"sfun\00"
define i32 @sfun() {
%1 = call i32 @puts(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 42
}

LLVM IR (-O2):
@.str = [5 x i8] c"sfun\00"
define i32 @sfun() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 42
}
/* Variables and functions */
int digits_in_binary(int);
int compare_two(int a, int b) {
  int result_a = digits_in_binary(a);
  int result_b = digits_in_binary(b);
  if (a > b)
    return 1;
  else if (a == b)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<compare_two>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <digits_in_binary@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <digits_in_binary@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    114c <compare_two+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    116b <compare_two+0x5b>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jne    1164 <compare_two+0x54>
movl   $0x0,-0x4(%rbp)
jmp    116b <compare_two+0x5b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_two>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
xor    %eax,%eax
cmp    %esi,%edi
setne  %al
neg    %eax
cmp    %esi,%edi
mov    $0x1,%ebp
cmovle %eax,%ebp
call   1030 <digits_in_binary@plt>
mov    %ebx,%edi
call   1030 <digits_in_binary@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @compare_two(i32 %0, i32 %1) {
%3 = tail call i32 @digits_in_binary(i32 %0)
%4 = tail call i32 @digits_in_binary(i32 %1)
%5 = icmp sgt i32 %0, %1
%6 = icmp ne i32 %0, %1
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
void author() {
  fprintf(stdout,
          "\x1b[33m"
          "Written by: "
          "\x1b[37m"
          "%s\n\n"
          "\x1b[0m",
          "Gustavo Pantuza (gustavopantuza@gmail.com)");
}


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

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

LLVM IR (-O0):
@stdout = global i32 0
@.str = [31 x i8] c"\1B[33mWritten by: \1B[37m%s\0A\0A\1B[0m\00"
@.str.1 = [43 x i8] c"Gustavo Pantuza (gustavopantuza@gmail.com)\00"
define void @author() {
%1 = load i32, i32* @stdout
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [31 x i8] c"\1B[33mWritten by: \1B[37m%s\0A\0A\1B[0m\00"
@.str.1 = [43 x i8] c"Gustavo Pantuza (gustavopantuza@gmail.com)\00"
define void @author() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __senderr(int /*<<< orphan*/ *, char const *,
                             int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
void __senderrstr(const char *str) { __senderr(NULL, str, strlen(str)); }


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

x86 assembly (clang, -O2):
<__senderrstr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
xor    %edi,%edi
mov    %rbx,%rsi
mov    %eax,%edx
pop    %rbx
jmp    1040 <__senderr@plt>

LLVM IR (-O0):
define void @__senderrstr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @__senderr(i32* null, i8* %3, i32 %5)
ret void
}

LLVM IR (-O2):
define void @__senderrstr(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @__senderr(i32* null, i8* %0, i32 %2)
ret void
}
int test1(void) {
  goto test1a;
  int x = 0;
test1a:
  x = 0;
  return x;
}


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

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

LLVM IR (-O0):
define i32 @test1() {
%1 = alloca i32
br label %2
2: ; preds = %0
store i32 0, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @test1() {
ret i32 0
}
/* Type definitions */
struct forth_instance {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ term_raw_off(struct forth_instance *);
void die(struct forth_instance *fi) {
  term_raw_off(fi);
  exit(0);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <term_raw_off@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <term_raw_off@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
%struct.forth_instance = type { i32 }
define void @die(%struct.forth_instance* %0) {
%2 = alloca %struct.forth_instance*
store %struct.forth_instance* %0, %struct.forth_instance** %2
%3 = load %struct.forth_instance*, %struct.forth_instance** %2
%4 = call i32 @term_raw_off(%struct.forth_instance* %3)
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.forth_instance = type { i32 }
define void @die(%struct.forth_instance* %0) {
%2 = tail call i32 @term_raw_off(%struct.forth_instance* %0)
%3 = tail call i32 @exit(i32 0)
unreachable
}
__attribute__((__no__)) void __softboundmpx_stub(void) { return; }


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
size_t file_size_bytes(FILE *fp) {
  size_t count = -1;
  do {
    fgetc(fp);
    count++;
  } while (!feof(fp));
  rewind(fp);
  return count;
}


x86 assembly (clang, -O0):
<file_size_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0xffffffffffffffff,-0x10(%rbp)
ff
mov    -0x8(%rbp),%rdi
call   1040 <fgetc@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1144 <file_size_bytes+0x14>
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_size_bytes>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xffffffffffffffff,%rbx
xchg   %ax,%ax
mov    %r14,%rdi
call   1040 <fgetc@plt>
add    $0x1,%rbx
mov    %r14,%rdi
call   1050 <feof@plt>
test   %eax,%eax
je     1140 <file_size_bytes+0x10>
mov    %r14,%rdi
call   1030 <rewind@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @file_size_bytes(i32* %0) {
%2 = alloca i32*
%3 = alloca i64
store i32* %0, i32** %2
store i64 -1, i64* %3
br label %4
4: ; preds = %9, %1
%5 = load i32*, i32** %2
%6 = call i32 @fgetc(i32* %5)
%7 = load i64, i64* %3
%8 = add i64 %7, 1
store i64 %8, i64* %3
br label %9
9: ; preds = %4
%10 = load i32*, i32** %2
%11 = call i32 @feof(i32* %10)
%12 = icmp ne i32 %11, 0
%13 = xor i1 %12, true
br i1 %13, label %4, label %14
14: ; preds = %9
%15 = load i32*, i32** %2
%16 = call i32 @rewind(i32* %15)
%17 = load i64, i64* %3
ret i64 %17
}

LLVM IR (-O2):
define i64 @file_size_bytes(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ -1, %1 ], [ %5, %2 ]
%4 = tail call i32 @fgetc(i32* %0)
%5 = add i64 %3, 1
%6 = tail call i32 @feof(i32* %0)
%7 = icmp eq i32 %6, 0
br i1 %7, label %2, label %8
8: ; preds = %2
%9 = tail call i32 @rewind(i32* %0)
ret i64 %5
}
void SockSSLConnect(struct Sock *out_sock) {}


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

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

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

LLVM IR (-O2):
%struct.Sock = type opaque
define void @SockSSLConnect(%struct.Sock* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int random();
int /*<<< orphan*/ sleep(int);
void Pensar(int i) {
  sleep(random() % 10);
  printf("Filosofo %d Pensando\n", i);
}


x86 assembly (clang, -O0):
<Pensar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <random@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%esi
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pensar>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <random@plt>
movslq %eax,%rdi
imul   $0x66666667,%rdi,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%edi
call   1050 <sleep@plt>
lea    0xe9c(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Filosofo %d Pensando\0A\00"
define void @Pensar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @random()
%4 = srem i32 %3, 10
%5 = call i32 @sleep(i32 %4)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"Filosofo %d Pensando\0A\00"
define void @Pensar(i32 %0) {
%2 = tail call i32 (...) @random()
%3 = srem i32 %2, 10
%4 = tail call i32 @sleep(i32 %3)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pio_outword(unsigned char, unsigned int);
void pio_rep_outword(unsigned char addrDataReg, unsigned char *bufAddr,
                     long wordCnt) {
  while (wordCnt > 0) {
    pio_outword(addrDataReg, *(unsigned int *)bufAddr);
    bufAddr += 2;
    wordCnt--;
  }
}


x86 assembly (clang, -O0):
<pio_rep_outword>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jle    115f <pio_rep_outword+0x4f>
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rcx
mov    (%rcx),%esi
movzbl %al,%edi
call   1030 <pio_outword@plt>
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x18(%rbp)
jmp    1126 <pio_rep_outword+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pio_rep_outword>:
push   %rbp
push   %r14
push   %rbx
test   %rdx,%rdx
jle    1147 <pio_rep_outword+0x37>
mov    %rdx,%r14
mov    %rsi,%rbx
add    $0x1,%r14
movzbl %dil,%ebp
nopw   0x0(%rax,%rax,1)
mov    (%rbx),%esi
mov    %ebp,%edi
call   1030 <pio_outword@plt>
add    $0x2,%rbx
add    $0xffffffffffffffff,%r14
cmp    $0x1,%r14
ja     1130 <pio_rep_outword+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @pio_rep_outword(i8 zeroext %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
br label %7
7: ; preds = %10, %3
%8 = load i64, i64* %6
%9 = icmp sgt i64 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %7
%11 = load i8, i8* %4
%12 = load i8*, i8** %5
%13 = bitcast i8* %12 to i32*
%14 = load i32, i32* %13
%15 = call i32 @pio_outword(i8 zeroext %11, i32 %14)
%16 = load i8*, i8** %5
%17 = getelementptr inbounds i8, i8* %16, i64 2
store i8* %17, i8** %5
%18 = load i64, i64* %6
%19 = add nsw i64 %18, -1
store i64 %19, i64* %6
br label %7
20: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @pio_rep_outword(i8 zeroext %0, i8* nocapture %1, i64 %2) {
%4 = icmp sgt i64 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3, %5
%6 = phi i64 [ %12, %5 ], [ %2, %3 ]
%7 = phi i8* [ %11, %5 ], [ %1, %3 ]
%8 = bitcast i8* %7 to i32*
%9 = load i32, i32* %8
%10 = tail call i32 @pio_outword(i8 zeroext %0, i32 %9)
%11 = getelementptr inbounds i8, i8* %7, i64 2
%12 = add nsw i64 %6, -1
%13 = icmp ugt i64 %6, 1
br i1 %13, label %5, label %14
14: ; preds = %5, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HibernateWriteComplete();
void HibernateIntDisable(unsigned long ulIntFlags) {

  ;
  (*((volatile unsigned long *)(0x400FC014))) &= ~ulIntFlags;
  HibernateWriteComplete();
}


x86 assembly (clang, -O0):
<HibernateIntDisable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    $0xffffffffffffffff,%rax
mov    $0x400fc014,%ecx
mov    (%rcx),%rcx
and    %rax,%rcx
mov    $0x400fc014,%eax
mov    %rcx,(%rax)
mov    $0x0,%al
call   1030 <HibernateWriteComplete@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<HibernateIntDisable>:
not    %rdi
and    %rdi,0x400fc014
40
xor    %eax,%eax
jmp    1030 <HibernateWriteComplete@plt>

LLVM IR (-O0):
define void @HibernateIntDisable(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = xor i64 %3, -1
%5 = load volatile i64, i64* inttoptr (i64 1074774036 to i64*)
%6 = and i64 %5, %4
store volatile i64 %6, i64* inttoptr (i64 1074774036 to i64*)
%7 = call i32 (...) @HibernateWriteComplete()
ret void
}

LLVM IR (-O2):
define void @HibernateIntDisable(i64 %0) {
%2 = xor i64 %0, -1
%3 = load volatile i64, i64* inttoptr (i64 1074774036 to i64*)
%4 = and i64 %3, %2
store volatile i64 %4, i64* inttoptr (i64 1074774036 to i64*)
%5 = tail call i32 (...) @HibernateWriteComplete()
ret void
}
void USERNOTICE_free(void) {}


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

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

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

LLVM IR (-O2):
define void @USERNOTICE_free() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
void rtp2435r_set_interval(uint8_t *header, uint16_t interval) {
  header[0] = (interval & 0xFF00) >> 8;
  header[1] = interval & 0xFF;
}


x86 assembly (clang, -O0):
<rtp2435r_set_interval>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtp2435r_set_interval>:
mov    %esi,%eax
movzbl %ah,%ecx
mov    %ecx,(%rdi)
movzbl %al,%eax
mov    %eax,0x4(%rdi)
ret

LLVM IR (-O0):
define void @rtp2435r_set_interval(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 65280
%7 = ashr i32 %6, 8
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 0
store i32 %7, i32* %9
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 1
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
define void @rtp2435r_set_interval(i32* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = and i32 %3, 255
store i32 %4, i32* %0
%5 = and i32 %1, 255
%6 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %5, i32* %6
ret void
}
void routing_return(int target, char *s, char *t) {}


x86 assembly (clang, -O0):
<routing_return>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @routing_return(i32 %0, i8* nocapture %1, i8* nocapture %2) {
ret void
}
/* Variables and functions */
int euler_problem_77();
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%d\n", euler_problem_77());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @euler_problem_77()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_est_date_ini(char *est_ini) {
  write("csv-task.csv", "%s,", est_ini);
}


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

x86 assembly (clang, -O2):
<function_est_date_ini>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <write@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_est_date_ini(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void circle() {
  printf("\n  *  *   ");
  printf("\n *    *   ");
  printf("\n*      *   ");
  printf("\n *    *   ");
  printf("\n  *  *   ");
}


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

x86 assembly (clang, -O2):
<circle>:
push   %r14
push   %rbx
push   %rax
lea    0xee5(%rip),%r14
mov    %r14,%rdi
call   1030 <printf@plt>
lea    0xee1(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"\0A * * \00"
@.str.1 = [12 x i8] c"\0A * * \00"
@.str.2 = [13 x i8] c"\0A* * \00"
define void @circle() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SEQ_PGM_CHANGE(int /*<<< orphan*/, int, int);
void seq_program(int chn, int pgm) { SEQ_PGM_CHANGE(0, chn, pgm); }


x86 assembly (clang, -O0):
<seq_program>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
xor    %edi,%edi
call   1030 <SEQ_PGM_CHANGE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_program>:
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <SEQ_PGM_CHANGE@plt>

LLVM IR (-O0):
define void @seq_program(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 @SEQ_PGM_CHANGE(i32 0, i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @seq_program(i32 %0, i32 %1) {
%3 = tail call i32 @SEQ_PGM_CHANGE(i32 0, i32 %0, i32 %1)
ret void
}
/* Variables and functions */
scalar_t__ errno;
int /*<<< orphan*/ strtol(char const *, char **, int);
int pidfile(const char *file) {
  char *end;
  errno = 0;
  strtol(file, &end, 10);
  if (*end != '\0')
    return 0;
  if (errno != 0)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<pidfile>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    0x2ebd(%rip),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1158 <pidfile+0x48>
movl   $0x0,-0x4(%rbp)
jmp    117c <pidfile+0x6c>
mov    0x2e81(%rip),%rax
cmpq   $0x0,(%rax)
je     1175 <pidfile+0x65>
movl   $0x0,-0x4(%rbp)
jmp    117c <pidfile+0x6c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pidfile>:
push   %rbx
sub    $0x10,%rsp
mov    0x2ec4(%rip),%rbx
movq   $0x0,(%rbx)
lea    0x8(%rsp),%rsi
mov    $0xa,%edx
call   1030 <strtol@plt>
mov    0x8(%rsp),%rax
cmpb   $0x0,(%rax)
sete   %al
cmpq   $0x0,(%rbx)
sete   %cl
and    %al,%cl
movzbl %cl,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@errno = global i64 0
define i32 @pidfile(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i64 0, i64* @errno
%5 = load i8*, i8** %3
%6 = call i32 @strtol(i8* %5, i8** %4, i32 10)
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 0, i32* %2
br label %17
12: ; preds = %1
%13 = load i64, i64* @errno
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 0, i32* %2
br label %17
16: ; preds = %12
store i32 1, i32* %2
br label %17
17: ; preds = %16, %15, %11
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
@errno = global i64 0
define i32 @pidfile(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
store i64 0, i64* @errno
%4 = call i32 @strtol(i8* %0, i8** %2, i32 10)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = load i64, i64* @errno
%9 = icmp eq i64 %8, 0
%10 = select i1 %7, i1 %9, i1 false
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void output_function_xml_post() { printf("</responses>\n"); }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"</responses>\0A\00"
define void @output_function_xml_post() {
%1 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"</responses>\00"
define void @output_function_xml_post() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int pipe(int *);
void testpipe() {
  int fd[2];
  int result = pipe(fd);
  if (result < 0) {
  } else {
  }
}


x86 assembly (clang, -O0):
<testpipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
call   1030 <pipe@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1133 <testpipe+0x23>
jmp    1138 <testpipe+0x28>
jmp    1138 <testpipe+0x28>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testpipe>:
push   %rax
mov    %rsp,%rdi
call   1030 <pipe@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @testpipe() {
%1 = alloca [2 x i32]
%2 = alloca i32
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i32 @pipe(i32* %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %0
br label %9
8: ; preds = %0
br label %9
9: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @testpipe() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
%4 = call i32 @pipe(i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void version(void) {
  printf("gbk2uni, version "
         "0.22"
         ", initially implemented by cxterm and ZLB in Jan. 2003\n");
  printf("\t enhanced by hooklee in Mar. 2003.\n");
  printf("\t please visit www.ctex.org and www.chinatex.org for more "
         "information.\n");
}


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

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

LLVM IR (-O0):
@.str = [77 x i8] c"gbk2uni, version 0.22, initially implemented by cxterm and ZLB in Jan. 2003\0A\00"
@.str.1 = [37 x i8] c"\09 enhanced by hooklee in Mar. 2003.\0A\00"
@.str.2 = [72 x i8] c"\09 please visit www.ctex.org and www.chinatex.org for more information.\0A\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [76 x i8] c"gbk2uni, version 0.22, initially implemented by cxterm and ZLB in Jan. 2003\00"
@str.3 = [36 x i8] c"\09 enhanced by hooklee in Mar. 2003.\00"
@str.4 = [71 x i8] c"\09 please visit www.ctex.org and www.chinatex.org for more information.\00"
define void @version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([71 x i8], [71 x i8]* @str.4, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *env_get(char *);
scalar_t__ is_conf_file(char const *const);
int cfg_has_old_format(void) {
  const char *const myvifmrc = env_get("MYVIFMRC");
  return (myvifmrc != NULL) && is_conf_file(myvifmrc);
}


x86 assembly (clang, -O0):
<cfg_has_old_format>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <env_get@plt>
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     115b <cfg_has_old_format+0x3b>
mov    -0x8(%rbp),%rdi
call   1030 <is_conf_file@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfg_has_old_format>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <env_get@plt>
test   %rax,%rax
je     1147 <cfg_has_old_format+0x27>
mov    %rax,%rdi
call   1030 <is_conf_file@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"MYVIFMRC\00"
define i32 @cfg_has_old_format() {
%1 = alloca i8*
%2 = call i8* @env_get(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = call i64 @is_conf_file(i8* %6)
%8 = icmp ne i64 %7, 0
br label %9
9: ; preds = %5, %0
%10 = phi i1 [ false, %0 ], [ %8, %5 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
@.str = [9 x i8] c"MYVIFMRC\00"
define i32 @cfg_has_old_format() {
%1 = tail call i8* @env_get(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i8* %1, null
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i64 @is_conf_file(i8* %1)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
void mod_random_is_GPL_compatible() {}


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

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

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

LLVM IR (-O2):
define void @mod_random_is_GPL_compatible() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ datf_save();
void dat_save(void) { datf_save(); }


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

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

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

LLVM IR (-O2):
define void @dat_save() {
%1 = tail call i32 (...) @datf_save()
ret void
}
/* Type definitions */
struct geometry_struct {
  int dummy;
};

/* Variables and functions */
int cylinder_overlaps_sphere(struct geometry_struct *,
                             struct geometry_struct *);
int sphere_overlaps_cylinder(struct geometry_struct *geometry_sph,
                             struct geometry_struct *geometry_cyl) {
  return cylinder_overlaps_sphere(geometry_cyl, geometry_sph);
}


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

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

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

LLVM IR (-O2):
%struct.geometry_struct = type { i32 }
define i32 @sphere_overlaps_cylinder(%struct.geometry_struct* %0, %struct.geometry_struct* %1) {
%3 = tail call i32 @cylinder_overlaps_sphere(%struct.geometry_struct* %1, %struct.geometry_struct* %0)
ret i32 %3
}
/* Variables and functions */
unsigned int vabsdiffs2(unsigned int, unsigned int);
unsigned int vsads2(unsigned int a, unsigned int b) {
  unsigned int r, s;
  s = vabsdiffs2(a, b);
  r = (s >> 16) + (s & 0x0000ffff);
  return r;
}


x86 assembly (clang, -O0):
<vsads2>:
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 <vabsdiffs2@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
shr    $0x10,%eax
mov    -0x10(%rbp),%ecx
and    $0xffff,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vsads2>:
push   %rax
call   1030 <vabsdiffs2@plt>
movzwl %ax,%ecx
shr    $0x10,%eax
add    %eax,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @vsads2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @vabsdiffs2(i32 %7, i32 %8)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = lshr i32 %10, 16
%12 = load i32, i32* %6
%13 = and i32 %12, 65535
%14 = add i32 %11, %13
store i32 %14, i32* %5
%15 = load i32, i32* %5
ret i32 %15
}

LLVM IR (-O2):
define i32 @vsads2(i32 %0, i32 %1) {
%3 = tail call i32 @vabsdiffs2(i32 %0, i32 %1)
%4 = lshr i32 %3, 16
%5 = and i32 %3, 65535
%6 = add nuw nsw i32 %4, %5
ret i32 %6
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void USBDMAChannelEnable(uint32_t ui32Base, uint32_t ui32Channel) {
  ASSERT(ui32Base == 0x40050000);
  ASSERT(ui32Channel < 8);
  (*((volatile uint32_t *)(ui32Base + 0x00000204 + (0x10 * ui32Channel)))) |=
      0x00000001;
}


x86 assembly (clang, -O0):
<USBDMAChannelEnable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x40050000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
cmpl   $0x8,-0x8(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%eax
add    $0x204,%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
add    %ecx,%eax
cltq
mov    (%rax),%ecx
or     $0x1,%ecx
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<USBDMAChannelEnable>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
cmp    $0x40050000,%ebp
sete   %dil
call   1030 <ASSERT@plt>
xor    %edi,%edi
cmp    $0x8,%ebx
setl   %dil
call   1030 <ASSERT@plt>
movslq %ebp,%rax
movslq %ebx,%rcx
shl    $0x4,%rcx
orl    $0x1,0x204(%rax,%rcx,1)
01
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @USBDMAChannelEnable(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 = icmp eq i32 %5, 1074069504
%7 = zext i1 %6 to i32
%8 = call i32 @ASSERT(i32 %7)
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 8
%11 = zext i1 %10 to i32
%12 = call i32 @ASSERT(i32 %11)
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 516
%15 = load i32, i32* %4
%16 = mul nsw i32 16, %15
%17 = add nsw i32 %14, %16
%18 = sext i32 %17 to i64
%19 = inttoptr i64 %18 to i32*
%20 = load volatile i32, i32* %19
%21 = or i32 %20, 1
store volatile i32 %21, i32* %19
ret void
}

LLVM IR (-O2):
define void @USBDMAChannelEnable(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 1074069504
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
%6 = icmp slt i32 %1, 8
%7 = zext i1 %6 to i32
%8 = tail call i32 @ASSERT(i32 %7)
%9 = add nsw i32 %0, 516
%10 = shl nsw i32 %1, 4
%11 = add nsw i32 %9, %10
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
%15 = or i32 %14, 1
store volatile i32 %15, i32* %13
ret void
}
int compint(const void *a, const void *b) {
  register const int *A = a;
  register const int *B = b;
  return *B - *A;
}


x86 assembly (clang, -O0):
<compint>:
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    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @compint(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = load i32, i32* %11
%13 = load i32*, i32** %5
%14 = load i32, i32* %13
%15 = sub nsw i32 %12, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @compint(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %5, %6
ret i32 %7
}