xunge/DecIR huggingface dataset:
int bitflips(int i, int j) {
  int xor = i ^ j;
  int count = 0;
  while (xor > 0) {
    if (xor&1) {
      count++;
    }
    xor = xor >> 1;
  }
  return count;
}


x86 assembly (clang, -O0):
<bitflips>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    114a <bitflips+0x4a>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     113c <bitflips+0x3c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111a <bitflips+0x1a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitflips>:
xor    %eax,%eax
xor    %esi,%edi
jle    1120 <bitflips+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <bitflips+0x10>
ret

LLVM IR (-O0):
define i32 @bitflips(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 = xor i32 %7, %8
store i32 %9, i32* %5
store i32 0, i32* %6
br label %10
10: ; preds = %20, %2
%11 = load i32, i32* %5
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i32, i32* %5
%15 = and i32 %14, 1
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %13
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %20
20: ; preds = %17, %13
%21 = load i32, i32* %5
%22 = ashr i32 %21, 1
store i32 %22, i32* %5
br label %10
23: ; preds = %10
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
define i32 @bitflips(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ 0, %2 ]
%7 = phi i32 [ %10, %5 ], [ %3, %2 ]
%8 = and i32 %7, 1
%9 = add nuw nsw i32 %6, %8
%10 = lshr i32 %7, 1
%11 = icmp ult i32 %7, 2
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i32 [ 0, %2 ], [ %9, %5 ]
ret i32 %13
}
/* Type definitions */
struct section_t {
  int dummy;
};

/* Variables and functions */
int config_parse_tag_hostlist(char *, struct section_t *);
int config_parse_tag_from(char *line, struct section_t *section) {
  return config_parse_tag_hostlist(line, section);
}


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

x86 assembly (clang, -O2):
<config_parse_tag_from>:
jmp    1030 <config_parse_tag_hostlist@plt>

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

LLVM IR (-O2):
%struct.section_t = type { i32 }
define i32 @config_parse_tag_from(i8* %0, %struct.section_t* %1) {
%3 = tail call i32 @config_parse_tag_hostlist(i8* %0, %struct.section_t* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ popNarray(char *, unsigned int);
void poppointer8array(char *x, int n) {
  popNarray((char *)x, (unsigned int)(n * 8));
}


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

x86 assembly (clang, -O2):
<poppointer8array>:
shl    $0x3,%esi
jmp    1030 <popNarray@plt>

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

LLVM IR (-O2):
define void @poppointer8array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 3
%4 = tail call i32 @popNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "Usage: kallsyms [--all-symbols] "
                  "[--symbol-prefix=<prefix char>] "
                  "[--page-offset=<CONFIG_PAGE_OFFSET>] "
                  "[--pad=A,B,C] [--pad-file=name] "
                  "< in.map > out.S\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [151 x i8] c"Usage: kallsyms [--all-symbols] [--symbol-prefix=<prefix char>] [--page-offset=<CONFIG_PAGE_OFFSET>] [--pad=A,B,C] [--pad-file=name] < in.map > out.S\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [151 x i8] c"Usage: kallsyms [--all-symbols] [--symbol-prefix=<prefix char>] [--page-offset=<CONFIG_PAGE_OFFSET>] [--pad=A,B,C] [--pad-file=name] < in.map > out.S\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int wchar_t;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ assert(int);
int mbrtowc(int *, char *, int, int /*<<< orphan*/);
int do_test(void) {
  wchar_t output;
  int result;
  output = L'A';
  result = mbrtowc(&output, "", 1, 0);
  assert(result == 0);
  assert(output == 0);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<do_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x41,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <mbrtowc@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
cmpl   $0x0,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_test>:
push   %rax
movl   $0x41,0x4(%rsp)
lea    0xed0(%rip),%rsi
lea    0x4(%rsp),%rdi
mov    $0x1,%edx
xor    %ecx,%ecx
call   1030 <mbrtowc@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmpl   $0x0,0x4(%rsp)
sete   %dil
call   1040 <assert@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@EXIT_SUCCESS = global i32 0
define i32 @do_test() {
%1 = alloca i32
%2 = alloca i32
store i32 65, i32* %1
%3 = call i32 @mbrtowc(i32* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1, i32 0)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %1
%9 = icmp eq i32 %8, 0
%10 = zext i1 %9 to i32
%11 = call i32 @assert(i32 %10)
%12 = load i32, i32* @EXIT_SUCCESS
ret i32 %12
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@EXIT_SUCCESS = global i32 0
define i32 @do_test() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 65, i32* %1
%3 = call i32 @mbrtowc(i32* %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1, i32 0)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i32, i32* %1
%8 = icmp eq i32 %7, 0
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}
void replace_dummy(void) {}


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

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

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

LLVM IR (-O2):
define void @replace_dummy() {
ret void
}
int((f))(int i) { return (i + 1); }


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

x86 assembly (clang, -O2):
<f>:
lea    0x1(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int my_str_islower(char *str) {
  int i;
  char c;
  i = 0;
  while (str[i] != '\0') {
    c = str[i];
    if (c < 'a' || c > 'z') {
      return (0);
    }
    i = i + 1;
  }
  return (1);
}


x86 assembly (clang, -O0):
<my_str_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1166 <my_str_islower+0x66>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x15(%rbp)
movsbl -0x15(%rbp),%eax
cmp    $0x61,%eax
jl     114c <my_str_islower+0x4c>
movsbl -0x15(%rbp),%eax
cmp    $0x7a,%eax
jle    1158 <my_str_islower+0x58>
movl   $0x0,-0x4(%rbp)
jmp    116d <my_str_islower+0x6d>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <my_str_islower+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_islower>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <my_str_islower+0x23>
add    $0x1,%rdi
nop
add    $0x85,%cl
cmp    $0xe5,%cl
jbe    1124 <my_str_islower+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <my_str_islower+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @my_str_islower(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
store i32 0, i32* %4
br label %6
6: ; preds = %28, %1
%7 = load i8*, i8** %3
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %7, i64 %9
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %31
14: ; preds = %6
%15 = load i8*, i8** %3
%16 = load i32, i32* %4
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
store i8 %19, i8* %5
%20 = load i8, i8* %5
%21 = sext i8 %20 to i32
%22 = icmp slt i32 %21, 97
br i1 %22, label %27, label %23
23: ; preds = %14
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = icmp sgt i32 %25, 122
br i1 %26, label %27, label %28
27: ; preds = %23, %14
store i32 0, i32* %2
br label %32
28: ; preds = %23
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %6
31: ; preds = %6
store i32 1, i32* %2
br label %32
32: ; preds = %31, %27
%33 = load i32, i32* %2
ret i32 %33
}

LLVM IR (-O2):
define i32 @my_str_islower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -123
%12 = icmp ult i8 %11, -26
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_error(char *);
void cmd_mvwadd_wch(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_error("UNSUPPORTED");
}


x86 assembly (clang, -O0):
<cmd_mvwadd_wch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    115a <cmd_mvwadd_wch+0x2a>
jmp    1170 <cmd_mvwadd_wch+0x40>
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xe95(%rip),%rdi
call   1050 <report_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_mvwadd_wch>:
push   %rax
mov    $0x1,%esi
call   1030 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1142 <cmd_mvwadd_wch+0x12>
pop    %rax
ret
mov    $0x1,%edi
call   1040 <report_count@plt>
lea    0xead(%rip),%rdi
pop    %rax
jmp    1050 <report_error@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwadd_wch(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 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %12
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"UNSUPPORTED\00"
define void @cmd_mvwadd_wch(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = tail call i32 @report_error(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show() { printf("Hello, World!\n"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"Hello, World!\0A\00"
define void @show() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [14 x i8] c"Hello, World!\00"
define void @show() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
ret void
}
void gtk_menu_get_for_attach_widget() {}


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

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

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

LLVM IR (-O2):
define void @gtk_menu_get_for_attach_widget() {
ret void
}
unsigned int i40e_txd_use_count(unsigned int size) {
  return ((size * 85) >> 20) + 1;
}


x86 assembly (clang, -O0):
<i40e_txd_use_count>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x55,-0x4(%rbp),%eax
shr    $0x14,%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<i40e_txd_use_count>:
imul   $0x55,%edi,%eax
shr    $0x14,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @i40e_txd_use_count(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 85
%5 = lshr i32 %4, 20
%6 = add i32 %5, 1
ret i32 %6
}

LLVM IR (-O2):
define i32 @i40e_txd_use_count(i32 %0) {
%2 = mul i32 %0, 85
%3 = lshr i32 %2, 20
%4 = add nuw nsw i32 %3, 1
ret i32 %4
}
double Power(double a, double b) {
  int tmp = (*(1 + (int *)&a));
  int tmp2 = (int)(b * (tmp - 1072632447) + 1072632447);
  double p = 0.0;
  *(1 + (int *)&p) = tmp2;
  return p;
}


x86 assembly (clang, -O0):
<Power>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%eax
sub    $0x3fef127f,%eax
cvtsi2sd %eax,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xecf(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Power>:
movq   %xmm0,%rax
shr    $0x20,%rax
add    $0xc010ed81,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  %xmm1,%xmm0
addsd  0xedf(%rip),%xmm0
cvttsd2si %xmm0,%eax
shl    $0x20,%rax
movq   %rax,%xmm0
ret

LLVM IR (-O0):
define double @Power(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
store double %0, double* %3
store double %1, double* %4
%8 = bitcast double* %3 to i32*
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
store i32 %10, i32* %5
%11 = load double, double* %4
%12 = load i32, i32* %5
%13 = sub nsw i32 %12, 1072632447
%14 = sitofp i32 %13 to double
%15 = call double @llvm.fmuladd.f64(double %11, double %14, double 0x41CFF7893F800000)
%16 = fptosi double %15 to i32
store i32 %16, i32* %6
store double 0.000000e+00, double* %7
%17 = load i32, i32* %6
%18 = bitcast double* %7 to i32*
%19 = getelementptr inbounds i32, i32* %18, i64 1
store i32 %17, i32* %19
%20 = load double, double* %7
ret double %20
}

LLVM IR (-O2):
define double @Power(double %0, double %1) {
%3 = bitcast double %0 to i64
%4 = lshr i64 %3, 32
%5 = trunc i64 %4 to i32
%6 = add nsw i32 %5, -1072632447
%7 = sitofp i32 %6 to double
%8 = tail call double @llvm.fmuladd.f64(double %1, double %7, double 0x41CFF7893F800000)
%9 = fptosi double %8 to i32
%10 = zext i32 %9 to i64
%11 = shl nuw i64 %10, 32
%12 = bitcast i64 %11 to double
ret double %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
double floor(double);
uint8_t scale_double(double d) {
  d = d <= 1.0 ? d : 1.0;
  double intermediate = floor(d * 255.0);
  return (uint8_t)(intermediate > 255 ? 255 : intermediate);
}


x86 assembly (clang, -O0):
<scale_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jb     113f <scale_double+0x2f>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1151 <scale_double+0x41>
movsd  0xeb9(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1151 <scale_double+0x41>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xea5(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe89(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    119b <scale_double+0x8b>
movsd  0xe77(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
jmp    11a5 <scale_double+0x95>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<scale_double>:
push   %rax
minsd  0xee7(%rip),%xmm0
mulsd  0xee7(%rip),%xmm0
call   1030 <floor@plt>
movsd  0xeda(%rip),%xmm1
minsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @scale_double(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp ole double %4, 1.000000e+00
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load double, double* %2
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %6
%10 = phi double [ %7, %6 ], [ 1.000000e+00, %8 ]
store double %10, double* %2
%11 = load double, double* %2
%12 = fmul double %11, 2.550000e+02
%13 = call double @llvm.floor.f64(double %12)
store double %13, double* %3
%14 = load double, double* %3
%15 = fcmp ogt double %14, 2.550000e+02
br i1 %15, label %16, label %17
16: ; preds = %9
br label %19
17: ; preds = %9
%18 = load double, double* %3
br label %19
19: ; preds = %17, %16
%20 = phi double [ 2.550000e+02, %16 ], [ %18, %17 ]
%21 = fptosi double %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @scale_double(double %0) {
%2 = fcmp ole double %0, 1.000000e+00
%3 = select i1 %2, double %0, double 1.000000e+00
%4 = fmul double %3, 2.550000e+02
%5 = tail call double @llvm.floor.f64(double %4)
%6 = fcmp ogt double %5, 2.550000e+02
%7 = select i1 %6, double 2.550000e+02, double %5
%8 = fptosi double %7 to i32
ret i32 %8
}
__attribute__((no_profile_instrument_function)) int bar() { return 1; }


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 1
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ set;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int pin_to_cpu(int cpu) {
  cpu_set_t set;
  CPU_ZERO(&set);
  CPU_SET(cpu, &set);
  return sched_setaffinity(0, sizeof(set), &set);
}


x86 assembly (clang, -O0):
<pin_to_cpu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pin_to_cpu>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @pin_to_cpu(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @CPU_ZERO(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @CPU_SET(i32 %5, i32* %3)
%7 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %3)
ret i32 %7
}

LLVM IR (-O2):
define i32 @pin_to_cpu(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %2)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
void nputchar(const char *s, int n) {
  while (n-- > 0)
    putchar(*s++);
}


x86 assembly (clang, -O0):
<nputchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    114f <nputchar+0x3f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <putchar@plt>
jmp    111f <nputchar+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nputchar>:
push   %rbp
push   %rbx
push   %rax
test   %esi,%esi
jle    1134 <nputchar+0x24>
mov    %esi,%ebp
mov    %rdi,%rbx
add    $0x1,%ebp
nop
movsbl (%rbx),%edi
add    $0x1,%rbx
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
cmp    $0x1,%ebp
ja     1120 <nputchar+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @nputchar(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ %1, %2 ]
%6 = phi i8* [ %8, %4 ], [ %0, %2 ]
%7 = add nsw i32 %5, -1
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = load i8, i8* %6
%10 = sext i8 %9 to i32
%11 = tail call i32 @putchar(i32 %10)
%12 = icmp ugt i32 %5, 1
br i1 %12, label %4, label %13
13: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char, unsigned int);
void compose_message(char *target, unsigned char led, unsigned int color) {
  sprintf(target, "%i:0x%x", led, color);
}


x86 assembly (clang, -O0):
<compose_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%al
mov    -0x10(%rbp),%ecx
lea    0xeca(%rip),%rsi
movzbl %al,%edx
call   1030 <sprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compose_message>:
mov    %edx,%ecx
mov    %esi,%edx
lea    0xee5(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%i:0x%x\00"
define void @compose_message(i8* %0, i8 zeroext %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i32
store i8* %0, i8** %4
store i8 %1, i8* %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8, i8* %5
%9 = load i32, i32* %6
%10 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 zeroext %8, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"%i:0x%x\00"
define void @compose_message(i8* nocapture writeonly %0, i8 zeroext %1, i32 %2) {
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8 zeroext %1, i32 %2)
ret void
}
int xmlUCSIsArmenian(int code) {
  return (((code >= 0x0530) && (code <= 0x058F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsArmenian>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x530,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsArmenian+0x26>
cmpl   $0x58f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsArmenian>:
add    $0xfffffad0,%edi
xor    %eax,%eax
cmp    $0x60,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @xmlUCSIsArmenian(i32 %0) {
%2 = add i32 %0, -1328
%3 = icmp ult i32 %2, 96
%4 = zext i1 %3 to i32
ret i32 %4
}
int is_valid_escape(char c) {
  char valid_escapes[] = ".#?";
  char *escape_ptr = valid_escapes;
  while (*escape_ptr) {
    if (c == *escape_ptr) {
      return (1);
    }
    escape_ptr++;
  }
  return (0);
}


x86 assembly (clang, -O0):
<is_valid_escape>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    0xef0(%rip),%eax
mov    %eax,-0x9(%rbp)
lea    -0x9(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1158 <is_valid_escape+0x58>
movsbl -0x5(%rbp),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1147 <is_valid_escape+0x47>
movl   $0x1,-0x4(%rbp)
jmp    115f <is_valid_escape+0x5f>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111b <is_valid_escape+0x1b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_valid_escape>:
movl   $0x3f232e,-0x4(%rsp)
lea    -0x3(%rsp),%rax
mov    $0x2e,%cl
nop
cmp    %dil,%cl
je     1123 <is_valid_escape+0x23>
movzbl (%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
jne    1110 <is_valid_escape+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
@__const.is_valid_escape.valid_escapes = [4 x i8] c".#?\00"
define i32 @is_valid_escape(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca [4 x i8]
%5 = alloca i8*
store i8 %0, i8* %3
%6 = bitcast [4 x i8]* %4 to i8*
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
store i8* %7, i8** %5
br label %8
8: ; preds = %20, %1
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = load i8*, i8** %5
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %14, %17
br i1 %18, label %19, label %20
19: ; preds = %12
store i32 1, i32* %2
br label %24
20: ; preds = %12
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %5
br label %8
23: ; preds = %8
store i32 0, i32* %2
br label %24
24: ; preds = %23, %19
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @is_valid_escape(i8 signext %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 4137774, i32* %2
br label %4
4: ; preds = %1, %8
%5 = phi i8* [ %3, %1 ], [ %9, %8 ]
%6 = phi i8 [ 46, %1 ], [ %10, %8 ]
%7 = icmp eq i8 %6, %0
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = getelementptr inbounds i8, i8* %5, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %8, %4
%13 = phi i32 [ 1, %4 ], [ 0, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ stdout;
void goto_xy(int x, int y) {
  printf("\033[%d;%dH", y, x);
  fflush(stdout);
}


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

x86 assembly (clang, -O2):
<goto_xy>:
push   %rax
mov    %edi,%edx
lea    0xed6(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"\1B[%d;%dH\00"
@stdout = global i32 0
define void @goto_xy(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 = load i32, i32* %3
%7 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
ret void
}

LLVM IR (-O2):
@.str = [9 x i8] c"\1B[%d;%dH\00"
@stdout = global i32 0
define void @goto_xy(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %0)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0x60() {
  Assert_real((iscntrl(96) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              485, ("iscntrl should be 0 for `"));
}


x86 assembly (clang, -O0):
<t_iscntrl_0x60>:
push   %rbp
mov    %rsp,%rbp
mov    $0x60,%edi
call   1030 <iscntrl@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x1e5,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_iscntrl_0x60>:
push   %rax
mov    $0x60,%edi
call   1030 <iscntrl@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x1e5,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [26 x i8] c"iscntrl should be 0 for `\00"
define void @t_iscntrl_0x60() {
%1 = tail call i64 @iscntrl(i32 96)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 485, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double MinusOp(double a, double b) { return a - b; }


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

x86 assembly (clang, -O2):
<MinusOp>:
subsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @MinusOp(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fsub double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @MinusOp(double %0, double %1) {
%3 = fsub double %0, %1
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ pprint_incoming();
int /*<<< orphan*/ printf(char *);
void report_inclusion_done(void) {
  pprint_incoming();
  printf("Inclusion done\n");
}


x86 assembly (clang, -O0):
<report_inclusion_done>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <pprint_incoming@plt>
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<report_inclusion_done>:
push   %rax
xor    %eax,%eax
call   1040 <pprint_incoming@plt>
lea    0xed1(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Inclusion done\0A\00"
define void @report_inclusion_done() {
%1 = call i32 (...) @pprint_incoming()
%2 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [15 x i8] c"Inclusion done\00"
define void @report_inclusion_done() {
%1 = tail call i32 (...) @pprint_incoming()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ elfstore_read(char *, unsigned short, unsigned int);
void elfloader_arch_write_rom(unsigned short textoff, unsigned int size,
                              char *mem) {
  elfstore_read(mem, textoff, size);
}


x86 assembly (clang, -O0):
<elfloader_arch_write_rom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x2(%rbp),%ax
mov    -0x8(%rbp),%edx
movzwl %ax,%esi
call   1030 <elfstore_read@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<elfloader_arch_write_rom>:
mov    %rdx,%rax
mov    %esi,%edx
mov    %edi,%esi
mov    %rax,%rdi
jmp    1030 <elfstore_read@plt>

LLVM IR (-O0):
define void @elfloader_arch_write_rom(i16 zeroext %0, i32 %1, i8* %2) {
%4 = alloca i16
%5 = alloca i32
%6 = alloca i8*
store i16 %0, i16* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load i16, i16* %4
%9 = load i32, i32* %5
%10 = call i32 @elfstore_read(i8* %7, i16 zeroext %8, i32 %9)
ret void
}

LLVM IR (-O2):
define void @elfloader_arch_write_rom(i16 zeroext %0, i32 %1, i8* %2) {
%4 = tail call i32 @elfstore_read(i8* %2, i16 zeroext %0, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct sockaddr_storage {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int setsourcefilter(int s, uint32_t interface, const struct sockaddr *group,
                    socklen_t grouplen, uint32_t fmode, uint32_t numsrc,
                    const struct sockaddr_storage *slist) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<setsourcefilter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setsourcefilter>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
%struct.sockaddr_storage = type { i32 }
@ENOSYS = global i32 0
define i32 @setsourcefilter(i32 %0, i32 %1, %struct.sockaddr* %2, i32 %3, i32 %4, i32 %5, %struct.sockaddr_storage* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.sockaddr*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca %struct.sockaddr_storage*
store i32 %0, i32* %8
store i32 %1, i32* %9
store %struct.sockaddr* %2, %struct.sockaddr** %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store %struct.sockaddr_storage* %6, %struct.sockaddr_storage** %14
%15 = load i32, i32* @ENOSYS
%16 = call i32 @__set_errno(i32 %15)
ret i32 -1
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
%struct.sockaddr_storage = type { i32 }
@ENOSYS = global i32 0
define i32 @setsourcefilter(i32 %0, i32 %1, %struct.sockaddr* nocapture readnone %2, i32 %3, i32 %4, i32 %5, %struct.sockaddr_storage* nocapture readnone %6) {
%8 = load i32, i32* @ENOSYS
%9 = tail call i32 @__set_errno(i32 %8)
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("runcom version 0.1 (c) 2003 Fabrice Bellard\n"
         "usage: runcom file.com\n"
         "VM86 Run simple .com DOS executables (linux vm86 test mode)\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [128 x i8] c"runcom version 0.1 (c) 2003 Fabrice Bellard\0Ausage: runcom file.com\0AVM86 Run simple .com DOS executables (linux vm86 test mode)\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([128 x i8], [128 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [127 x i8] c"runcom version 0.1 (c) 2003 Fabrice Bellard\0Ausage: runcom file.com\0AVM86 Run simple .com DOS executables (linux vm86 test mode)\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([127 x i8], [127 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ add512(int, int *);
scalar_t__ add513(int, int *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int main(void) {
  int b0 = -1;
  int b1 = -1;
  if (add512(-512, &b0) != 0 || b0 != -1 || add513(-513, &b1) != 0 ||
      b1 != -513)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
mov    $0xfffffe00,%edi
lea    -0x8(%rbp),%rsi
call   1040 <add512@plt>
cmp    $0x0,%rax
jne    11a4 <main+0x64>
cmpl   $0xffffffff,-0x8(%rbp)
jne    11a4 <main+0x64>
mov    $0xfffffdff,%edi
lea    -0xc(%rbp),%rsi
call   1050 <add513@plt>
cmp    $0x0,%rax
jne    11a4 <main+0x64>
cmpl   $0xfffffdff,-0xc(%rbp)
je     11ab <main+0x6b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
movl   $0xffffffff,(%rsp)
lea    0x4(%rsp),%rsi
mov    $0xfffffe00,%edi
call   1040 <add512@plt>
test   %rax,%rax
jne    118d <main+0x4d>
cmpl   $0xffffffff,0x4(%rsp)
jne    118d <main+0x4d>
mov    %rsp,%rsi
mov    $0xfffffdff,%edi
call   1050 <add513@plt>
test   %rax,%rax
jne    118d <main+0x4d>
cmpl   $0xfffffdff,(%rsp)
jne    118d <main+0x4d>
xor    %edi,%edi
call   1060 <exit@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 -1, i32* %2
store i32 -1, i32* %3
%4 = call i64 @add512(i32 -512, i32* %2)
%5 = icmp ne i64 %4, 0
br i1 %5, label %15, label %6
6: ; preds = %0
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, -1
br i1 %8, label %15, label %9
9: ; preds = %6
%10 = call i64 @add513(i32 -513, i32* %3)
%11 = icmp ne i64 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = icmp ne i32 %13, -513
br i1 %14, label %15, label %17
15: ; preds = %12, %9, %6, %0
%16 = call i32 (...) @abort()
unreachable
17: ; preds = %12
%18 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
%4 = bitcast i32* %2 to i8*
store i32 -1, i32* %2
%5 = call i64 @add512(i32 -512, i32* %1)
%6 = icmp ne i64 %5, 0
%7 = load i32, i32* %1
%8 = icmp ne i32 %7, -1
%9 = select i1 %6, i1 true, i1 %8
br i1 %9, label %16, label %10
10: ; preds = %0
%11 = call i64 @add513(i32 -513, i32* %2)
%12 = icmp ne i64 %11, 0
%13 = load i32, i32* %2
%14 = icmp ne i32 %13, -513
%15 = select i1 %12, i1 true, i1 %14
br i1 %15, label %16, label %18
16: ; preds = %10, %0
%17 = call i32 (...) @abort()
unreachable
18: ; preds = %10
%19 = call i32 @exit(i32 0)
unreachable
}
float foo(void) { return 1.1f + 2.2f + 2.2f; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @foo() {
ret float 5.500000e+00
}

LLVM IR (-O2):
define float @foo() {
ret float 5.500000e+00
}
void gtk_get_default_language() {}


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

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

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

LLVM IR (-O2):
define void @gtk_get_default_language() {
ret void
}
/* Variables and functions */
__attribute__((weak)) void aprinter_platform_debug_write(char const *ptr,
                                                         size_t len) {}


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

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

LLVM IR (-O0):
define weak void @aprinter_platform_debug_write(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define weak void @aprinter_platform_debug_write(i8* %0, i64 %1) {
ret void
}
void gtk_widget_push_colormap() {}


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

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

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

LLVM IR (-O2):
define void @gtk_widget_push_colormap() {
ret void
}
long long llabs(long long j) { return j >= 0 ? j : -j; }


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

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

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

LLVM IR (-O2):
define i64 @llabs(i64 %0) {
%2 = tail call i64 @llvm.abs.i64(i64 %0, i1 true)
ret i64 %2
}
void do_chr(void) {}


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

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

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

LLVM IR (-O2):
define void @do_chr() {
ret void
}
void handle_52(int sig) {}


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

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

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

LLVM IR (-O2):
define void @handle_52(i32 %0) {
ret void
}
void page_tracker_set_trace(struct page *page, unsigned long func, int order) {}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define void @page_tracker_set_trace(%struct.page* %0, i64 %1, i32 %2) {
%4 = alloca %struct.page*
%5 = alloca i64
%6 = alloca i32
store %struct.page* %0, %struct.page** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @page_tracker_set_trace(%struct.page* nocapture %0, i64 %1, i32 %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ Interpolate_2(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int);
uint32_t Interp8(uint32_t c1, uint32_t c2) {
  return Interpolate_2(c1, 5, c2, 3, 3);
}


x86 assembly (clang, -O0):
<Interp8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    $0x5,%esi
mov    $0x3,%r8d
mov    %r8d,%ecx
call   1030 <Interpolate_2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp8>:
mov    %esi,%edx
mov    $0x5,%esi
mov    $0x3,%ecx
mov    $0x3,%r8d
jmp    1030 <Interpolate_2@plt>

LLVM IR (-O0):
define i32 @Interp8(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 @Interpolate_2(i32 %5, i32 5, i32 %6, i32 3, i32 3)
ret i32 %7
}

LLVM IR (-O2):
define i32 @Interp8(i32 %0, i32 %1) {
%3 = tail call i32 @Interpolate_2(i32 %0, i32 5, i32 %1, i32 3, i32 3)
ret i32 %3
}