xunge/DecIR huggingface dataset:
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ has_colors();
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_int(int /*<<< orphan*/);
void cmd_has_colors(int nargs, char **args) {
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(1);
  report_int(has_colors());
}


x86 assembly (clang, -O0):
<cmd_has_colors>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1167 <cmd_has_colors+0x27>
jmp    117f <cmd_has_colors+0x3f>
mov    $0x1,%edi
call   1050 <report_count@plt>
mov    $0x0,%al
call   1030 <has_colors@plt>
mov    %eax,%edi
call   1060 <report_int@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_has_colors>:
push   %rax
xor    %esi,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    114f <cmd_has_colors+0xf>
pop    %rax
ret
mov    $0x1,%edi
call   1050 <report_count@plt>
xor    %eax,%eax
call   1030 <has_colors@plt>
mov    %eax,%edi
pop    %rax
jmp    1060 <report_int@plt>

LLVM IR (-O0):
define void @cmd_has_colors(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 0)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %13
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 (...) @has_colors()
%12 = call i32 @report_int(i32 %11)
br label %13
13: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_has_colors(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 0)
%4 = icmp eq i32 %3, 1
br i1 %4, label %9, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 (...) @has_colors()
%8 = tail call i32 @report_int(i32 %7)
br label %9
9: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ test_quant_compression_double();
int /*<<< orphan*/ test_quant_compression_float();
int /*<<< orphan*/ test_quant_decompression_double();
int /*<<< orphan*/ test_quant_decompression_float();
int main(void) {
  test_quant_compression_float();
  test_quant_compression_double();
  test_quant_decompression_float();
  test_quant_decompression_double();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_quant_compression_float@plt>
xor    %eax,%eax
call   1030 <test_quant_compression_double@plt>
xor    %eax,%eax
call   1060 <test_quant_decompression_float@plt>
xor    %eax,%eax
call   1040 <test_quant_decompression_double@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_quant_compression_float()
%3 = call i32 (...) @test_quant_compression_double()
%4 = call i32 (...) @test_quant_decompression_float()
%5 = call i32 (...) @test_quant_decompression_double()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_quant_compression_float()
%2 = tail call i32 (...) @test_quant_compression_double()
%3 = tail call i32 (...) @test_quant_decompression_float()
%4 = tail call i32 (...) @test_quant_decompression_double()
ret i32 0
}
/* Variables and functions */
unsigned int __arch_hweight32(unsigned int);
__attribute__((always_)) unsigned int __arch_hweight16(unsigned int w) {
  return __arch_hweight32(w & 0xffff);
}


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

x86 assembly (clang, -O2):
<__arch_hweight16>:
movzwl %di,%edi
jmp    1030 <__arch_hweight32@plt>

LLVM IR (-O0):
define i32 @__arch_hweight16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 65535
%5 = call i32 @__arch_hweight32(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @__arch_hweight16(i32 %0) {
%2 = and i32 %0, 65535
%3 = tail call i32 @__arch_hweight32(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int flush_buffer() {
  puts("flush_buffer ");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c"flush_buffer \00"
define i32 @flush_buffer() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned long asic_fw_device_owner_value(const unsigned long *reg_value) {
  return (unsigned long)(((((*reg_value) >> 0) & 0xffffffffffffffffULL) << 0));
}


x86 assembly (clang, -O0):
<asic_fw_device_owner_value>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shr    $0x0,%rax
and    $0xffffffffffffffff,%rax
shl    $0x0,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @asic_fw_device_owner_value(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 0
%6 = and i64 %5, -1
%7 = shl i64 %6, 0
ret i64 %7
}

LLVM IR (-O2):
define i64 @asic_fw_device_owner_value(i64* nocapture %0) {
%2 = load i64, i64* %0
ret i64 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
char *asctime(int /*<<< orphan*/);
int /*<<< orphan*/ gmtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *, int);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int func(int ret) {
  time_t timep;
  time(&timep);
  printf("time: %s, ret is %d\n\n\n", asctime(gmtime(&timep)), ret);
  return 0;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1050 <time@plt>
lea    -0x8(%rbp),%rdi
call   1060 <gmtime@plt>
mov    %eax,%edi
call   1030 <asctime@plt>
mov    %rax,%rsi
mov    -0x4(%rbp),%edx
lea    0xe8f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <time@plt>
mov    %rbx,%rdi
call   1060 <gmtime@plt>
mov    %eax,%edi
call   1030 <asctime@plt>
lea    0xe98(%rip),%rdi
mov    %rax,%rsi
mov    %ebp,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [23 x i8] c"time: %s, ret is %d\0A\0A\0A\00"
define i32 @func(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @time(i32* %3)
%5 = call i32 @gmtime(i32* %3)
%6 = call i8* @asctime(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [23 x i8] c"time: %s, ret is %d\0A\0A\0A\00"
define i32 @func(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call i32 @gmtime(i32* %2)
%6 = call i8* @asctime(i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %6, i32 %0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main() {
  double x = 1.0;
  double y = 2.0;
  if ((y > x--) != 1)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xed9(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec4(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  0xea5(%rip),%xmm3
movaps %xmm1,%xmm2
addsd  %xmm3,%xmm2
movsd  %xmm2,-0x10(%rbp)
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
cmp    $0x1,%eax
je     1183 <main+0x63>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
store i32 0, i32* %1
store double 1.000000e+00, double* %2
store double 2.000000e+00, double* %3
%4 = load double, double* %3
%5 = load double, double* %2
%6 = fadd double %5, -1.000000e+00
store double %6, double* %2
%7 = fcmp ogt double %4, %5
%8 = zext i1 %7 to i32
%9 = icmp ne i32 %8, 1
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 (...) @abort()
unreachable
12: ; preds = %0
%13 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
unsigned int ones32(unsigned int x) {
  x -= ((x >> 1) & 0x55555555);
  x = (((x >> 2) & 0x33333333) + (x & 0x33333333));
  x = (((x >> 4) + x) & 0x0f0f0f0f);
  x += (x >> 8);
  x += (x >> 16);
  return (x & 0x0000003f);
}


x86 assembly (clang, -O0):
<ones32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x55555555,%ecx
mov    -0x4(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x2,%eax
and    $0x33333333,%eax
mov    -0x4(%rbp),%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x4,%eax
add    -0x4(%rbp),%eax
and    $0xf0f0f0f,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x8,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x3f,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ones32>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
shr    $0x2,%eax
and    $0x33333333,%eax
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
mov    %eax,%ecx
shr    $0x8,%ecx
add    %eax,%ecx
mov    %ecx,%eax
shr    $0x10,%eax
add    %ecx,%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @ones32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = lshr i32 %3, 1
%5 = and i32 %4, 1431655765
%6 = load i32, i32* %2
%7 = sub i32 %6, %5
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = lshr i32 %8, 2
%10 = and i32 %9, 858993459
%11 = load i32, i32* %2
%12 = and i32 %11, 858993459
%13 = add i32 %10, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
%15 = lshr i32 %14, 4
%16 = load i32, i32* %2
%17 = add i32 %15, %16
%18 = and i32 %17, 252645135
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = lshr i32 %19, 8
%21 = load i32, i32* %2
%22 = add i32 %21, %20
store i32 %22, i32* %2
%23 = load i32, i32* %2
%24 = lshr i32 %23, 16
%25 = load i32, i32* %2
%26 = add i32 %25, %24
store i32 %26, i32* %2
%27 = load i32, i32* %2
%28 = and i32 %27, 63
ret i32 %28
}

LLVM IR (-O2):
define i32 @ones32(i32 %0) {
%2 = lshr i32 %0, 1
%3 = and i32 %2, 1431655765
%4 = sub i32 %0, %3
%5 = lshr i32 %4, 2
%6 = and i32 %5, 858993459
%7 = and i32 %4, 858993459
%8 = add nuw nsw i32 %6, %7
%9 = lshr i32 %8, 4
%10 = add nuw nsw i32 %9, %8
%11 = and i32 %10, 252645135
%12 = lshr i32 %11, 8
%13 = add nuw nsw i32 %12, %11
%14 = lshr i32 %13, 16
%15 = add nuw nsw i32 %14, %13
%16 = and i32 %15, 63
ret i32 %16
}
/* Variables and functions */
void RemoveThread(int threadid) {}


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

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

LLVM IR (-O0):
define void @RemoveThread(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @RemoveThread(i32 %0) {
ret void
}
/* Variables and functions */
bool char_is_oneof(int c, const char *chars) {
  for (const char *ptr = chars;; ptr++) {
    if (*ptr == c)
      return true;
    if (*ptr == '\0')
      break;
  }
  return false;
}


x86 assembly (clang, -O0):
<char_is_oneof>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    -0x8(%rbp),%eax
jne    112f <char_is_oneof+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1161 <char_is_oneof+0x61>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1144 <char_is_oneof+0x44>
jmp    115a <char_is_oneof+0x5a>
jmp    1149 <char_is_oneof+0x49>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1113 <char_is_oneof+0x13>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<char_is_oneof>:
movsbl (%rsi),%ecx
test   %ecx,%ecx
je     110f <char_is_oneof+0xf>
add    $0x1,%rsi
cmp    %edi,%ecx
jne    1100 <char_is_oneof>
xor    %eax,%eax
cmp    %edi,%ecx
sete   %al
ret

LLVM IR (-O0):
define i32 @char_is_oneof(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%7 = load i8*, i8** %5
store i8* %7, i8** %6
br label %8
8: ; preds = %22, %2
%9 = load i8*, i8** %6
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = load i32, i32* %4
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %15
14: ; preds = %8
store i32 1, i32* %3
br label %26
15: ; preds = %8
%16 = load i8*, i8** %6
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %15
br label %25
21: ; preds = %15
br label %22
22: ; preds = %21
%23 = load i8*, i8** %6
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %6
br label %8
25: ; preds = %20
store i32 0, i32* %3
br label %26
26: ; preds = %25, %14
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @char_is_oneof(i32 %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, %0
%8 = icmp eq i8 %5, 0
%9 = or i1 %8, %7
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
%12 = zext i1 %7 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_board(char **board, int n) {
  int i, j;
  for (i = 0; i < n; ++i) {
    printf("%s\n", board[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_board>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <print_board+0x4a>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xebb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_board+0x16>
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_board>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1152 <print_board+0x32>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1040 <puts@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <print_board+0x20>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @print_board(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %0, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @puts(i8* dereferenceable(1) %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Type definitions */
struct _reent {
  int dummy;
};
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
off_t _lseek_r(struct _reent *reent, int fd, off_t offset, int whence) {
  return 0;
}


x86 assembly (clang, -O0):
<_lseek_r>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct._reent = type { i32 }
define i32 @_lseek_r(%struct._reent* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct._reent*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct._reent* %0, %struct._reent** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
%struct._reent = type { i32 }
define i32 @_lseek_r(%struct._reent* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ parallel_clr_ndac(int);
int /*<<< orphan*/ parallel_set_ndac(int);
void parallel_drv1_set_ndac(unsigned char val) {
  if (val) {
    parallel_set_ndac(0x08);
  } else {
    parallel_clr_ndac(~0x08);
  }
}


x86 assembly (clang, -O0):
<parallel_drv1_set_ndac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
cmpb   $0x0,-0x1(%rbp)
je     1147 <parallel_drv1_set_ndac+0x27>
mov    $0x8,%edi
call   1040 <parallel_set_ndac@plt>
jmp    1151 <parallel_drv1_set_ndac+0x31>
mov    $0xfffffff7,%edi
call   1030 <parallel_clr_ndac@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parallel_drv1_set_ndac>:
test   %edi,%edi
je     112e <parallel_drv1_set_ndac+0xe>
mov    $0x8,%edi
jmp    1040 <parallel_set_ndac@plt>
mov    $0xfffffff7,%edi
jmp    1030 <parallel_clr_ndac@plt>

LLVM IR (-O0):
define void @parallel_drv1_set_ndac(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = icmp ne i8 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @parallel_set_ndac(i32 8)
br label %9
7: ; preds = %1
%8 = call i32 @parallel_clr_ndac(i32 -9)
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
define void @parallel_drv1_set_ndac(i8 zeroext %0) {
%2 = icmp eq i8 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @parallel_set_ndac(i32 8)
br label %7
5: ; preds = %1
%6 = tail call i32 @parallel_clr_ndac(i32 -9)
br label %7
7: ; preds = %5, %3
ret void
}
int main(int argc, char **argv) {
  int x;
  double r = argc;
  if (!(0 > r)) {
    x = 7;
  } else {
    x = 42;
  }
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x20(%rbp),%xmm0
ja     1136 <main+0x36>
movl   $0x7,-0x14(%rbp)
jmp    113d <main+0x3d>
movl   $0x2a,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
test   %edi,%edi
mov    $0x2a,%ecx
mov    $0x7,%eax
cmovs  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i32, i32* %4
%9 = sitofp i32 %8 to double
store double %9, double* %7
%10 = load double, double* %7
%11 = fcmp ogt double 0.000000e+00, %10
br i1 %11, label %13, label %12
12: ; preds = %2
store i32 7, i32* %6
br label %14
13: ; preds = %2
store i32 42, i32* %6
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %6
ret i32 %15
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp slt i32 %0, 0
%4 = select i1 %3, i32 42, i32 7
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t etna_umax(uint32_t a, uint32_t b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<etna_umax>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jle    1127 <etna_umax+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <etna_umax+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<etna_umax>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovg  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @etna_umax(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @etna_umax(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
void hw_sound_set_music(int which) {}


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

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

LLVM IR (-O0):
define void @hw_sound_set_music(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @hw_sound_set_music(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void usage(char **argv) {
  printf("%s file\n", argv[0]);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rsi
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    (%rdi),%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"%s file\0A\00"
define void @usage(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = getelementptr inbounds i8*, i8** %3, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [9 x i8] c"%s file\0A\00"
define void @usage(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ DrawCellsBeginLine();
int /*<<< orphan*/ DrawCellsEndLine();
int /*<<< orphan*/ DrawCellsFromStr(char *);
void DrawCellsOneLineStr(char *s) {
  DrawCellsBeginLine();
  DrawCellsFromStr(s);
  DrawCellsEndLine();
}


x86 assembly (clang, -O0):
<DrawCellsOneLineStr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <DrawCellsBeginLine@plt>
mov    -0x8(%rbp),%rdi
call   1030 <DrawCellsFromStr@plt>
mov    $0x0,%al
call   1050 <DrawCellsEndLine@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawCellsOneLineStr>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <DrawCellsBeginLine@plt>
mov    %rbx,%rdi
call   1030 <DrawCellsFromStr@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <DrawCellsEndLine@plt>

LLVM IR (-O0):
define void @DrawCellsOneLineStr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @DrawCellsBeginLine()
%4 = load i8*, i8** %2
%5 = call i32 @DrawCellsFromStr(i8* %4)
%6 = call i32 (...) @DrawCellsEndLine()
ret void
}

LLVM IR (-O2):
define void @DrawCellsOneLineStr(i8* %0) {
%2 = tail call i32 (...) @DrawCellsBeginLine()
%3 = tail call i32 @DrawCellsFromStr(i8* %0)
%4 = tail call i32 (...) @DrawCellsEndLine()
ret void
}
/* Type definitions */
struct ring {
  int dummy;
};

/* Variables and functions */
unsigned int ring_count(struct ring *);
unsigned int ring_read(struct ring *, void *, unsigned int);
unsigned int ring_readall(struct ring *ring, void *buffer, unsigned int count) {
  if (count > ring_count(ring))
    return 0;
  return ring_read(ring, buffer, count);
}


x86 assembly (clang, -O0):
<ring_readall>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ring_count@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%eax
cmp    %ecx,%eax
jbe    115b <ring_readall+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    116e <ring_readall+0x4e>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <ring_read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ring_readall>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <ring_count@plt>
cmp    %ebp,%eax
jae    113c <ring_readall+0x1c>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <ring_read@plt>

LLVM IR (-O0):
%struct.ring = type { i32 }
define i32 @ring_readall(%struct.ring* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.ring*
%6 = alloca i8*
%7 = alloca i32
store %struct.ring* %0, %struct.ring** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = load %struct.ring*, %struct.ring** %5
%10 = call i32 @ring_count(%struct.ring* %9)
%11 = icmp ugt i32 %8, %10
br i1 %11, label %12, label %13
12: ; preds = %3
store i32 0, i32* %4
br label %18
13: ; preds = %3
%14 = load %struct.ring*, %struct.ring** %5
%15 = load i8*, i8** %6
%16 = load i32, i32* %7
%17 = call i32 @ring_read(%struct.ring* %14, i8* %15, i32 %16)
store i32 %17, i32* %4
br label %18
18: ; preds = %13, %12
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
%struct.ring = type { i32 }
define i32 @ring_readall(%struct.ring* %0, i8* %1, i32 %2) {
%4 = tail call i32 @ring_count(%struct.ring* %0)
%5 = icmp ult i32 %4, %2
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @ring_read(%struct.ring* %0, i8* %1, i32 %2)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ %7, %6 ], [ 0, %3 ]
ret i32 %9
}
void g_spawn_command_line_sync() {}


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

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

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

LLVM IR (-O2):
define void @g_spawn_command_line_sync() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void set_pmu_sleep_low() {
  mbus_remote_register_write(
      0x6, 0x17, ((3 << 14) | (0 << 13) | (1 << 9) | (2 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(
      0x6, 0x17, ((3 << 14) | (0 << 13) | (1 << 9) | (2 << 5) | (1)));
  delay(100);
  mbus_remote_register_write(0x6, 0x15,
                             ((0 << 19) | (0 << 18) | (0 << 17) | (3 << 14) |
                              (0 << 13) | (1 << 9) | (2 << 5) | (1)));
  delay(100);
}


x86 assembly (clang, -O0):
<set_pmu_sleep_low>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xc241,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xc241,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xc241,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_pmu_sleep_low>:
push   %rax
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xc241,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x17,%esi
mov    $0xc241,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
call   1030 <delay@plt>
mov    $0x6,%edi
mov    $0x15,%esi
mov    $0xc241,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0x64,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @set_pmu_sleep_low() {
%1 = call i32 @mbus_remote_register_write(i32 6, i32 23, i32 49729)
%2 = call i32 @delay(i32 100)
%3 = call i32 @mbus_remote_register_write(i32 6, i32 23, i32 49729)
%4 = call i32 @delay(i32 100)
%5 = call i32 @mbus_remote_register_write(i32 6, i32 21, i32 49729)
%6 = call i32 @delay(i32 100)
ret void
}

LLVM IR (-O2):
define void @set_pmu_sleep_low() {
%1 = tail call i32 @mbus_remote_register_write(i32 6, i32 23, i32 49729)
%2 = tail call i32 @delay(i32 100)
%3 = tail call i32 @mbus_remote_register_write(i32 6, i32 23, i32 49729)
%4 = tail call i32 @delay(i32 100)
%5 = tail call i32 @mbus_remote_register_write(i32 6, i32 21, i32 49729)
%6 = tail call i32 @delay(i32 100)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void Beep() { putchar('\007'); }


x86 assembly (clang, -O0):
<Beep>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%edi
call   1030 <putchar@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Beep>:
mov    $0x7,%edi
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @Beep() {
%1 = call i32 @putchar(i8 signext 7)
ret void
}

LLVM IR (-O2):
define void @Beep() {
%1 = tail call i32 @putchar(i8 signext 7)
ret void
}
void chmod_internal(path, mode) const char *path;
void *mode;
{
  if (chmod(path, *(int *)mode) < 0)
    rb_sys_fail(path);
}


x86 assembly (clang, -O0):
<chmod_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    $0x0,%al
call   1030 <chmod@plt>
cmp    $0x0,%eax
jge    1155 <chmod_internal+0x35>
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1040 <rb_sys_fail@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chmod_internal>:
push   %rbx
mov    %rdi,%rbx
mov    (%rsi),%esi
xor    %eax,%eax
call   1030 <chmod@plt>
test   %eax,%eax
js     1133 <chmod_internal+0x13>
pop    %rbx
ret
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <rb_sys_fail@plt>

LLVM IR (-O0):
define void @chmod_internal(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @chmod to i32 (i8*, i32, ...)*)(i8* %5, i32 %8)
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i8*, i8** %3
%13 = call i32 (i8*, ...) bitcast (i32 (...)* @rb_sys_fail to i32 (i8*, ...)*)(i8* %12)
br label %14
14: ; preds = %11, %2
ret void
}

LLVM IR (-O2):
define void @chmod_internal(i8* %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = load i32, i32* %3
%5 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @chmod to i32 (i8*, i32, ...)*)(i8* %0, i32 %4)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 (i8*, ...) bitcast (i32 (...)* @rb_sys_fail to i32 (i8*, ...)*)(i8* %0)
br label %9
9: ; preds = %7, %2
ret void
}
/* Type definitions */
typedef void B;

/* Variables and functions */
int /*<<< orphan*/ g3(void *);
int f3(struct B *a) {
  g3(a);
  return a != (void *)0;
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <g3@plt>
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
push   %rbx
mov    %rdi,%rbx
call   1030 <g3@plt>
xor    %eax,%eax
test   %rbx,%rbx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
%struct.B = type opaque
define i32 @f3(%struct.B* %0) {
%2 = alloca %struct.B*
store %struct.B* %0, %struct.B** %2
%3 = load %struct.B*, %struct.B** %2
%4 = bitcast %struct.B* %3 to i8*
%5 = call i32 @g3(i8* %4)
%6 = load %struct.B*, %struct.B** %2
%7 = icmp ne %struct.B* %6, null
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
%struct.B = type opaque
define i32 @f3(%struct.B* %0) {
%2 = bitcast %struct.B* %0 to i8*
%3 = tail call i32 @g3(i8* %2)
%4 = icmp ne %struct.B* %0, null
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ fvec_nan(float *, long);
float *fvec_new(long);
float *fvec_new_nan(long n) {
  float *ret = fvec_new(n);
  fvec_nan(ret, n);
  return ret;
}


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

x86 assembly (clang, -O2):
<fvec_new_nan>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <fvec_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <fvec_nan@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define float* @fvec_new_nan(i64 %0) {
%2 = alloca i64
%3 = alloca float*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call float* @fvec_new(i64 %4)
store float* %5, float** %3
%6 = load float*, float** %3
%7 = load i64, i64* %2
%8 = call i32 @fvec_nan(float* %6, i64 %7)
%9 = load float*, float** %3
ret float* %9
}

LLVM IR (-O2):
define float* @fvec_new_nan(i64 %0) {
%2 = tail call float* @fvec_new(i64 %0)
%3 = tail call i32 @fvec_nan(float* %2, i64 %0)
ret float* %2
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int socklen_t;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int accept_connection(int s) {
  int client_fd;
  struct sockaddr_in client_sock;
  socklen_t sz = sizeof(struct sockaddr_in);
  client_fd = accept(s, (struct sockaddr *)&client_sock, &sz);
  return client_fd;
}


x86 assembly (clang, -O0):
<accept_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0x14(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept_connection>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @accept_connection(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca %struct.sockaddr_in
%5 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %5
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_in* %4 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %5)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @accept_connection(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %3)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putnbr(int);
void ft_add(int a, int b) {
  ft_putnbr(a + b);
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_add>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
add    -0x8(%rbp),%edi
call   1040 <ft_putnbr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_add>:
push   %rax
add    %esi,%edi
call   1040 <ft_putnbr@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <ft_putchar@plt>

LLVM IR (-O0):
define void @ft_add(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 = add nsw i32 %5, %6
%8 = call i32 @ft_putnbr(i32 %7)
%9 = call i32 @ft_putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @ft_add(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
%4 = tail call i32 @ft_putnbr(i32 %3)
%5 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ save_settings();
void default_settings() { save_settings(); }


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

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

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

LLVM IR (-O2):
define void @default_settings() {
%1 = tail call i32 (...) @save_settings()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, long long);
int main(void) {
  printf("%d\n", (long long int)(7));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x7,%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 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 7)
ret i32 0
}
void startselection() {}


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

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

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

LLVM IR (-O2):
define void @startselection() {
ret void
}
int do_778() { return 778; }


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

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

LLVM IR (-O0):
define i32 @do_778() {
ret i32 778
}

LLVM IR (-O2):
define i32 @do_778() {
ret i32 778
}
int hash(char *symbol) {
  unsigned int sum;
  sum = 0;
  while (*symbol) {
    sum = sum * 31 + *symbol;
    symbol++;
  }
  return sum % 27;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     113d <hash+0x3d>
imul   $0x1f,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x1b,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1148 <hash+0x48>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
mov    %eax,%edx
shl    $0x5,%edx
sub    %eax,%edx
movsbl %cl,%eax
add    %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x2f684bdb,%rcx,%rcx
shr    $0x20,%rcx
mov    %eax,%edx
sub    %ecx,%edx
shr    %edx
add    %ecx,%edx
shr    $0x4,%edx
lea    (%rdx,%rdx,8),%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %8, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = load i32, i32* %3
%10 = mul i32 %9, 31
%11 = load i8*, i8** %2
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = add i32 %10, %13
store i32 %14, i32* %3
%15 = load i8*, i8** %2
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %2
br label %4
17: ; preds = %4
%18 = load i32, i32* %3
%19 = urem i32 %18, 27
ret i32 %19
}

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %16, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %11, %4 ], [ %0, %1 ]
%8 = mul i32 %6, 31
%9 = sext i8 %5 to i32
%10 = add i32 %8, %9
%11 = getelementptr inbounds i8, i8* %7, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4
%15 = urem i32 %10, 27
br label %16
16: ; preds = %14, %1
%17 = phi i32 [ 0, %1 ], [ %15, %14 ]
ret i32 %17
}
/* Variables and functions */
float my_scalbnf(float, int);
float my_ldexpf(float x, int n) { return my_scalbnf(x, n); }


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

x86 assembly (clang, -O2):
<my_ldexpf>:
jmp    1030 <my_scalbnf@plt>

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

LLVM IR (-O2):
define float @my_ldexpf(float %0, i32 %1) {
%3 = tail call float @my_scalbnf(float %0, i32 %1)
ret float %3
}
void BN_exp(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_exp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ osn_msgq_init();
int /*<<< orphan*/ osn_task_init();
void osn_init(void) {
  osn_msgq_init();
  osn_task_init();
}


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

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

LLVM IR (-O0):
define void @osn_init() {
%1 = call i32 (...) @osn_msgq_init()
%2 = call i32 (...) @osn_task_init()
ret void
}

LLVM IR (-O2):
define void @osn_init() {
%1 = tail call i32 (...) @osn_msgq_init()
%2 = tail call i32 (...) @osn_task_init()
ret void
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int fstat(int, struct stat *);
int learnFrom(int fd) {
  struct stat s;
  int b = fstat(fd, &s);
  return b;
}


x86 assembly (clang, -O0):
<learnFrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1030 <fstat@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<learnFrom>:
push   %rax
mov    %rsp,%rsi
call   1030 <fstat@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @learnFrom(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.stat
%4 = alloca i32
store i32 %0, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @fstat(i32 %5, %struct.stat* %3)
store i32 %6, i32* %4
%7 = load i32, i32* %4
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @learnFrom(i32 %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @fstat(i32 %0, %struct.stat* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char *, char *, int /*<<< orphan*/);
int match(char *line, char *w) { return strncmp(line, w, strlen(w)) == 0; }


x86 assembly (clang, -O0):
<match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<match>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @match(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i64 @strncmp(i8* %5, i8* %6, i32 %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @match(i8* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i64 @strncmp(i8* %0, i8* %1, i32 %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}