xunge/DecIR huggingface dataset:
/* Type definitions */
struct record_data {
  int dummy;
};

/* Variables and functions */
char *GET_RECORD_QSTRING(struct record_data *);
int /*<<< orphan*/ policer_params_set(void *, char const *, char const *);
int set_policer_param(const char *param, void *data, void *extra) {
  struct record_data *rd = data;
  const char *str = GET_RECORD_QSTRING(rd);
  if (str) {
    policer_params_set(extra, param, str);
  }
  return 0;
}


x86 assembly (clang, -O0):
<set_policer_param>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <GET_RECORD_QSTRING@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     1165 <set_policer_param+0x45>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <policer_params_set@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_policer_param>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <GET_RECORD_QSTRING@plt>
test   %rax,%rax
je     1145 <set_policer_param+0x25>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1040 <policer_params_set@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.record_data = type { i32 }
define i32 @set_policer_param(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca %struct.record_data*
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to %struct.record_data*
store %struct.record_data* %10, %struct.record_data** %7
%11 = load %struct.record_data*, %struct.record_data** %7
%12 = call i8* @GET_RECORD_QSTRING(%struct.record_data* %11)
store i8* %12, i8** %8
%13 = load i8*, i8** %8
%14 = icmp ne i8* %13, null
br i1 %14, label %15, label %20
15: ; preds = %3
%16 = load i8*, i8** %6
%17 = load i8*, i8** %4
%18 = load i8*, i8** %8
%19 = call i32 @policer_params_set(i8* %16, i8* %17, i8* %18)
br label %20
20: ; preds = %15, %3
ret i32 0
}

LLVM IR (-O2):
%struct.record_data = type { i32 }
define i32 @set_policer_param(i8* %0, i8* %1, i8* %2) {
%4 = bitcast i8* %1 to %struct.record_data*
%5 = tail call i8* @GET_RECORD_QSTRING(%struct.record_data* %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = tail call i32 @policer_params_set(i8* %2, i8* %0, i8* %5)
br label %9
9: ; preds = %7, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rightrot(int, int);
int main(void) {
  printf("%u\n", rightrot(3, 1));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main() {
%1 = tail call i32 @rightrot(i32 3, i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ _delay_loop_1(int);
void _delay_us(uint32_t __us) {
  uint32_t __ticks;
  __ticks = 72000000UL / 1000000;
  __ticks *= __us;
  __ticks /= 6;
  _delay_loop_1(__ticks);
}


x86 assembly (clang, -O0):
<_delay_us>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x48,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <_delay_loop_1@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_delay_us>:
shl    $0x2,%edi
lea    (%rdi,%rdi,2),%edi
jmp    1030 <_delay_loop_1@plt>

LLVM IR (-O0):
define void @_delay_us(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 72, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, %4
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = sdiv i32 %7, 6
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = call i32 @_delay_loop_1(i32 %9)
ret void
}

LLVM IR (-O2):
define void @_delay_us(i32 %0) {
%2 = mul nsw i32 %0, 12
%3 = tail call i32 @_delay_loop_1(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glutBitmapCharacter(void *, char);
scalar_t__ strlen(char *);
void print_bitmap_string(void *font, char *s) {
  if (s && strlen(s)) {
    while (*s) {
      glutBitmapCharacter(font, *s);
      s++;
    }
  }
}


x86 assembly (clang, -O0):
<print_bitmap_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1186 <print_bitmap_string+0x66>
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%rax
je     1186 <print_bitmap_string+0x66>
jmp    1153 <print_bitmap_string+0x33>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1181 <print_bitmap_string+0x61>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
call   1030 <glutBitmapCharacter@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1153 <print_bitmap_string+0x33>
jmp    1186 <print_bitmap_string+0x66>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_bitmap_string>:
push   %r14
push   %rbx
push   %rax
test   %rsi,%rsi
je     1146 <print_bitmap_string+0x36>
mov    %rsi,%rbx
mov    (%rsi),%al
test   %al,%al
je     1146 <print_bitmap_string+0x36>
mov    %rdi,%r14
add    $0x1,%rbx
nopl   0x0(%rax)
movsbl %al,%esi
mov    %r14,%rdi
call   1030 <glutBitmapCharacter@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <print_bitmap_string+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @print_bitmap_string(i8* %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %14, label %4
4: ; preds = %2
%5 = load i8, i8* %1
%6 = icmp eq i8 %5, 0
br i1 %6, label %14, label %7
7: ; preds = %4, %7
%8 = phi i8* [ %11, %7 ], [ %1, %4 ]
%9 = phi i8 [ %12, %7 ], [ %5, %4 ]
%10 = tail call i32 @glutBitmapCharacter(i8* %0, i8 signext %9)
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_nondet_String();
int /*<<< orphan*/ cstrpbrk(int /*<<< orphan*/, int /*<<< orphan*/);
int main() {
  cstrpbrk(__VERIFIER_nondet_String(), __VERIFIER_nondet_String());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_String@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <__VERIFIER_nondet_String@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1030 <cstrpbrk@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_String@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <__VERIFIER_nondet_String@plt>
mov    %ebx,%edi
mov    %eax,%esi
call   1030 <cstrpbrk@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @__VERIFIER_nondet_String()
%3 = call i32 (...) @__VERIFIER_nondet_String()
%4 = call i32 @cstrpbrk(i32 %2, i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_String()
%2 = tail call i32 (...) @__VERIFIER_nondet_String()
%3 = tail call i32 @cstrpbrk(i32 %1, i32 %2)
ret i32 0
}
void *dlopen(const char *filename, int flag) {
  puts("# ");
  puts(__FUNCTION__);
  puts("()\n");
  delay(100000000);
  (void)(filename);
  (void)(flag);
  return 0;
}


x86 assembly (clang, -O0):
<dlopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
mov    $0x0,%al
call   1040 <delay@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dlopen>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xecd(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
lea    0xec6(%rip),%rdi
xor    %eax,%eax
call   1030 <puts@plt>
mov    $0x5f5e100,%edi
xor    %eax,%eax
call   1040 <delay@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.dlopen = [7 x i8] c"dlopen\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i8* @dlopen(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.dlopen, i64 0, i64 0))
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
%9 = load i8*, i8** %3
%10 = load i32, i32* %4
ret i8* null
}

LLVM IR (-O2):
@.str = [3 x i8] c"# \00"
@__FUNCTION__.dlopen = [7 x i8] c"dlopen\00"
@.str.1 = [4 x i8] c"()\0A\00"
define i8* @dlopen(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @__FUNCTION__.dlopen, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @puts to i32 (i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @delay to i32 (i32, ...)*)(i32 100000000)
ret i8* null
}
const char *Ref_Name(void) { return "Ref"; }


x86 assembly (clang, -O0):
<Ref_Name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Ref_Name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"Ref\00"
define i8* @Ref_Name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"Ref\00"
define i8* @Ref_Name() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, unsigned char);
void sprint_inc_Rn(char *str, unsigned char n) {
  sprintf(str, "INC   R%X                        ", n);
}


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

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

LLVM IR (-O0):
@.str = [34 x i8] c"INC R%X \00"
define void @sprint_inc_Rn(i8* %0, i8 zeroext %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 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %6)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"INC R%X \00"
define void @sprint_inc_Rn(i8* nocapture writeonly %0, i8 zeroext %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ write(int, void const *, size_t);
ssize_t WriteToNet(int sock, const void *buf, size_t count) {
  return write(sock, buf, count);
}


x86 assembly (clang, -O0):
<WriteToNet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteToNet>:
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define i32 @WriteToNet(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ brsh_teardown();
scalar_t__ brsh_ui_inited();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ vprintf(char const *, int /*<<< orphan*/);
void brain_vfatal_(char const *in_message, va_list in_args) {
  if (brsh_ui_inited())
    brsh_teardown();
  vprintf(in_message, in_args);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<brain_vfatal_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <brsh_ui_inited@plt>
cmp    $0x0,%rax
je     1167 <brain_vfatal_+0x27>
mov    $0x0,%al
call   1050 <brsh_teardown@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1040 <vprintf@plt>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<brain_vfatal_>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <brsh_ui_inited@plt>
test   %rax,%rax
je     115b <brain_vfatal_+0x1b>
xor    %eax,%eax
call   1050 <brsh_teardown@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
call   1040 <vprintf@plt>
mov    0x2e74(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
define void @brain_vfatal_(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = call i64 (...) @brsh_ui_inited()
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 (...) @brsh_teardown()
br label %9
9: ; preds = %7, %2
%10 = load i8*, i8** %3
%11 = load i32, i32* %4
%12 = call i32 @vprintf(i8* %10, i32 %11)
%13 = load i32, i32* @EXIT_FAILURE
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
define void @brain_vfatal_(i8* nocapture %0, i32 %1) {
%3 = tail call i64 (...) @brsh_ui_inited()
%4 = icmp eq i64 %3, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 (...) @brsh_teardown()
br label %7
7: ; preds = %5, %2
%8 = tail call i32 @vprintf(i8* %0, i32 %1)
%9 = load i32, i32* @EXIT_FAILURE
%10 = tail call i32 @exit(i32 %9)
unreachable
}
void uart_default_tx_wait_blocking() {}


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

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

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

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

/* Variables and functions */
int sbuf_cat(struct sbuf *, char const *);
int /*<<< orphan*/ sbuf_clear(struct sbuf *);
int sbuf_cpy(struct sbuf *s, const char *str) {
  do {
  } while (0);
  do {
  } while (0);
  sbuf_clear(s);
  return (sbuf_cat(s, str));
}


x86 assembly (clang, -O0):
<sbuf_cpy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
jmp    1135 <sbuf_cpy+0x15>
jmp    113a <sbuf_cpy+0x1a>
jmp    113f <sbuf_cpy+0x1f>
mov    -0x8(%rbp),%rdi
call   1040 <sbuf_clear@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <sbuf_cat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbuf_cpy>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <sbuf_clear@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <sbuf_cat@plt>

LLVM IR (-O0):
%struct.sbuf = type { i32 }
define i32 @sbuf_cpy(%struct.sbuf* %0, i8* %1) {
%3 = alloca %struct.sbuf*
%4 = alloca i8*
store %struct.sbuf* %0, %struct.sbuf** %3
store i8* %1, i8** %4
br label %5
5: ; preds = %2
br label %6
6: ; preds = %5
br label %7
7: ; preds = %6
br label %8
8: ; preds = %7
%9 = load %struct.sbuf*, %struct.sbuf** %3
%10 = call i32 @sbuf_clear(%struct.sbuf* %9)
%11 = load %struct.sbuf*, %struct.sbuf** %3
%12 = load i8*, i8** %4
%13 = call i32 @sbuf_cat(%struct.sbuf* %11, i8* %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.sbuf = type { i32 }
define i32 @sbuf_cpy(%struct.sbuf* %0, i8* %1) {
%3 = tail call i32 @sbuf_clear(%struct.sbuf* %0)
%4 = tail call i32 @sbuf_cat(%struct.sbuf* %0, i8* %1)
ret i32 %4
}
int bswap(int x) {
  asm("mov 8(%ebp), %eax");
  asm("bswap %eax");
}


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

x86 assembly (clang, -O2):
<bswap>:
mov    0x8(%ebp),%eax
bswap  %eax
ret

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

LLVM IR (-O2):
define i32 @bswap(i32 %0) {
tail call void asm sideeffect "mov 8(%ebp), %eax", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "bswap %eax", "~{dirflag},~{fpsr},~{flags}"()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("hello this is nake main!\n"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"hello this is nake main!\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [25 x i8] c"hello this is nake main!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int abs(int);
int g_abs(int i) { return abs(i); }


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

x86 assembly (clang, -O2):
<g_abs>:
mov    %edi,%eax
neg    %eax
cmovs  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @g_abs(i32 %0) {
%2 = tail call i32 @llvm.abs.i32(i32 %0, i1 true)
ret i32 %2
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  int /*<<< orphan*/ tv_sec;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ timestamp_seconds(int /*<<< orphan*/);
int timestamp_useconds(int /*<<< orphan*/);
void timestamp_to_timespec(int64_t v, struct timespec *ts) {
  ts->tv_sec = timestamp_seconds(v);
  ts->tv_nsec = timestamp_useconds(v) * 1000;
}


x86 assembly (clang, -O0):
<timestamp_to_timespec>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <timestamp_seconds@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x4(%rbp),%edi
call   1030 <timestamp_useconds@plt>
imul   $0x3e8,%eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timestamp_to_timespec>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
call   1040 <timestamp_seconds@plt>
mov    %eax,0x4(%rbx)
mov    %ebp,%edi
call   1030 <timestamp_useconds@plt>
imul   $0x3e8,%eax,%eax
mov    %eax,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @timestamp_to_timespec(i32 %0, %struct.timespec* %1) {
%3 = alloca i32
%4 = alloca %struct.timespec*
store i32 %0, i32* %3
store %struct.timespec* %1, %struct.timespec** %4
%5 = load i32, i32* %3
%6 = call i32 @timestamp_seconds(i32 %5)
%7 = load %struct.timespec*, %struct.timespec** %4
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %7, i32 0, i32 1
store i32 %6, i32* %8
%9 = load i32, i32* %3
%10 = call i32 @timestamp_useconds(i32 %9)
%11 = mul nsw i32 %10, 1000
%12 = load %struct.timespec*, %struct.timespec** %4
%13 = getelementptr inbounds %struct.timespec, %struct.timespec* %12, i32 0, i32 0
store i32 %11, i32* %13
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @timestamp_to_timespec(i32 %0, %struct.timespec* nocapture writeonly %1) {
%3 = tail call i32 @timestamp_seconds(i32 %0)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i32 %3, i32* %4
%5 = tail call i32 @timestamp_useconds(i32 %0)
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 %6, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getConfigHome(char **);
int /*<<< orphan*/ strmcat(char **, char *);
void getConfigApp(char **path, char *app_name) {
  getConfigHome(path);
  if (*path) {
    strmcat(path, "/");
    strmcat(path, app_name);
  }
}


x86 assembly (clang, -O0):
<getConfigApp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getConfigHome@plt>
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1164 <getConfigApp+0x44>
mov    -0x8(%rbp),%rdi
lea    0xeae(%rip),%rsi
call   1040 <strmcat@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strmcat@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getConfigApp>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <getConfigHome@plt>
cmpq   $0x0,(%rbx)
je     1156 <getConfigApp+0x36>
lea    0xec4(%rip),%rsi
mov    %rbx,%rdi
call   1040 <strmcat@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strmcat@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [2 x i8] c"/\00"
define void @getConfigApp(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 = call i32 @getConfigHome(i8** %5)
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
%9 = icmp ne i8* %8, null
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i8**, i8*** %3
%12 = call i32 @strmcat(i8** %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%13 = load i8**, i8*** %3
%14 = load i8*, i8** %4
%15 = call i32 @strmcat(i8** %13, i8* %14)
br label %16
16: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"/\00"
define void @getConfigApp(i8** %0, i8* %1) {
%3 = tail call i32 @getConfigHome(i8** %0)
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @strmcat(i8** %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @strmcat(i8** %0, i8* %1)
br label %9
9: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int print_usage() {
  printf(" Usage: sor_print [options]\n");
  printf(" Option:\n");
  printf(" \t[ -s <vector size> ] (default: %d)\n", 1024);
  printf(" \t[ -f <input file name> ]\n");
  return 1;
}


x86 assembly (clang, -O0):
<print_usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef0(%rip),%rdi
mov    $0x400,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_usage>:
push   %rax
lea    0xefe(%rip),%rdi
call   1030 <puts@plt>
lea    0xf0e(%rip),%rdi
call   1030 <puts@plt>
lea    0xec0(%rip),%rdi
mov    $0x400,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c" Usage: sor_print [options]\0A\00"
@.str.1 = [10 x i8] c" Option:\0A\00"
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
@.str.3 = [28 x i8] c" \09[ -f <input file name> ]\0A\00"
define i32 @print_usage() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@.str.2 = [38 x i8] c" \09[ -s <vector size> ] (default: %d)\0A\00"
@str = [28 x i8] c" Usage: sor_print [options]\00"
@str.4 = [9 x i8] c" Option:\00"
@str.5 = [27 x i8] c" \09[ -f <input file name> ]\00"
define i32 @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 1024)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.5, i64 0, i64 0))
ret i32 1
}
void _cycles(unsigned long long *u) { *u = 0; }


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

x86 assembly (clang, -O2):
<_cycles>:
movq   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @_cycles(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
store i64 0, i64* %3
ret void
}

LLVM IR (-O2):
define void @_cycles(i64* nocapture writeonly %0) {
store i64 0, i64* %0
ret void
}
/* Variables and functions */
void zero_argvs(int start, int end, char **argv) {
  int i;
  for (i = start; i <= end; i++) {
    argv[i] = NULL;
  }
}


x86 assembly (clang, -O0):
<zero_argvs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jg     113e <zero_argvs+0x3e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1114 <zero_argvs+0x14>
pop    %rbp
ret

x86 assembly (clang, -O2):
<zero_argvs>:
sub    %edi,%esi
jl     112f <zero_argvs+0x1f>
push   %rax
movslq %edi,%rax
lea    (%rdx,%rax,8),%rdi
lea    0x8(,%rsi,8),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

LLVM IR (-O0):
define void @zero_argvs(i32 %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i8** %2, i8*** %6
%8 = load i32, i32* %4
store i32 %8, i32* %7
br label %9
9: ; preds = %18, %3
%10 = load i32, i32* %7
%11 = load i32, i32* %5
%12 = icmp sle i32 %10, %11
br i1 %12, label %13, label %21
13: ; preds = %9
%14 = load i8**, i8*** %6
%15 = load i32, i32* %7
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8*, i8** %14, i64 %16
store i8* null, i8** %17
br label %18
18: ; preds = %13
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
store i32 %20, i32* %7
br label %9
21: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @zero_argvs(i32 %0, i32 %1, i8** nocapture writeonly %2) {
%4 = icmp slt i32 %1, %0
br i1 %4, label %13, label %5
5: ; preds = %3
%6 = sext i32 %0 to i64
%7 = getelementptr i8*, i8** %2, i64 %6
%8 = bitcast i8** %7 to i8*
%9 = sub i32 %1, %0
%10 = zext i32 %9 to i64
%11 = shl nuw nsw i64 %10, 3
%12 = add nuw nsw i64 %11, 8
br label %13
13: ; preds = %5, %3
ret void
}
/* Variables and functions */
double biggest(float, float, float);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, float *);
int main() {
  float a, b, c;
  scanf("%f", &a);
  scanf("%f", &b);
  scanf("%f", &c);
  printf("%g\n", biggest(a, b, c));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1050 <scanf@plt>
lea    0xe9a(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
movss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
movss  -0x10(%rbp),%xmm2
call   1040 <biggest@plt>
lea    0xe79(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
lea    0x4(%rsp),%rsi
mov    %rbx,%rdi
call   1050 <scanf@plt>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
movss  0x4(%rsp),%xmm2
call   1040 <biggest@plt>
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %4)
%8 = load float, float* %2
%9 = load float, float* %3
%10 = load float, float* %4
%11 = call double @biggest(float %8, float %9, float %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [4 x i8] c"%g\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %1)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %2)
%9 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float* %3)
%10 = load float, float* %1
%11 = load float, float* %2
%12 = load float, float* %3
%13 = call double @biggest(float %10, float %11, float %12)
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), double %13)
ret i32 0
}
int tdefault_stopped_by_sw_breakpoint(struct target_ops *self) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.target_ops = type opaque
define i32 @tdefault_stopped_by_sw_breakpoint(%struct.target_ops* nocapture readnone %0) {
ret i32 0
}
int pci_v3_early_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pci_v3_early_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ open_kernel();
int /*<<< orphan*/ open_unix();
void open_all(void) {
  open_kernel();
  open_unix();
}


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

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

LLVM IR (-O0):
define void @open_all() {
%1 = call i32 (...) @open_kernel()
%2 = call i32 (...) @open_unix()
ret void
}

LLVM IR (-O2):
define void @open_all() {
%1 = tail call i32 (...) @open_kernel()
%2 = tail call i32 (...) @open_unix()
ret void
}
void initialize_cuda_aware_mpi_() {}


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

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

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

LLVM IR (-O2):
define void @initialize_cuda_aware_mpi_() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int write_dobldobl_target_solutions(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(237, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<write_dobldobl_target_solutions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xed,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_dobldobl_target_solutions>:
mov    $0xed,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_dobldobl_target_solutions() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 237, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_dobldobl_target_solutions() {
%1 = tail call i32 @_ada_use_c2phc(i32 237, i32* undef, i32* undef, double* undef)
ret i32 %1
}
unsigned char CharToBase(char charBase) {
  if (charBase == 'A')
    return 0x00;
  else if (charBase == 'C')
    return 0x01;
  else if (charBase == 'T')
    return 0x02;
  else if (charBase == 'G')
    return 0x03;
  return 0x00;
}


x86 assembly (clang, -O0):
<CharToBase>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jne    1120 <CharToBase+0x20>
movb   $0x0,-0x1(%rbp)
jmp    1175 <CharToBase+0x75>
movsbl -0x2(%rbp),%eax
cmp    $0x43,%eax
jne    1136 <CharToBase+0x36>
movb   $0x1,-0x1(%rbp)
jmp    1175 <CharToBase+0x75>
movsbl -0x2(%rbp),%eax
cmp    $0x54,%eax
jne    114c <CharToBase+0x4c>
movb   $0x2,-0x1(%rbp)
jmp    1175 <CharToBase+0x75>
movsbl -0x2(%rbp),%eax
cmp    $0x47,%eax
jne    1162 <CharToBase+0x62>
movb   $0x3,-0x1(%rbp)
jmp    1175 <CharToBase+0x75>
jmp    1167 <CharToBase+0x67>
jmp    116c <CharToBase+0x6c>
jmp    1171 <CharToBase+0x71>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CharToBase>:
cmp    $0x54,%dil
je     1115 <CharToBase+0x15>
cmp    $0x47,%dil
je     1118 <CharToBase+0x18>
cmp    $0x43,%dil
jne    111b <CharToBase+0x1b>
mov    $0x1,%al
ret
mov    $0x2,%al
ret
mov    $0x3,%al
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @CharToBase(i8 signext %0) {
switch i8 %0, label %5 [
i8 71, label %4
i8 67, label %2
i8 84, label %3
]
2: ; preds = %1
br label %5
3: ; preds = %1
br label %5
4: ; preds = %1
br label %5
5: ; preds = %1, %4, %3, %2
%6 = phi i8 [ 1, %2 ], [ 2, %3 ], [ 3, %4 ], [ 0, %1 ]
ret i8 %6
}
/* Variables and functions */
int /*<<< orphan*/ bbm_write(void *, int, int /*<<< orphan*/);
scalar_t__ fc8080_channel_deselect(void *, unsigned char, unsigned char);
int fc8080_data_deselect(void *handle, unsigned char subch_id,
                         unsigned char buf_id) {
  if (fc8080_channel_deselect(handle, subch_id, buf_id) != 0)
    return 1;
  bbm_write(handle, 0x0910 + buf_id, 0);
  return 0;
}


x86 assembly (clang, -O0):
<fc8080_data_deselect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x10(%rbp)
mov    %cl,-0x11(%rbp)
mov    %al,-0x12(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x11(%rbp),%al
movzbl %al,%esi
movzbl -0x12(%rbp),%edx
call   1040 <fc8080_channel_deselect@plt>
cmp    $0x0,%rax
je     1160 <fc8080_data_deselect+0x40>
movl   $0x1,-0x4(%rbp)
jmp    117c <fc8080_data_deselect+0x5c>
mov    -0x10(%rbp),%rdi
movzbl -0x12(%rbp),%esi
add    $0x910,%esi
xor    %edx,%edx
call   1030 <bbm_write@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fc8080_data_deselect>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rdi,%r14
call   1040 <fc8080_channel_deselect@plt>
mov    $0x1,%ebx
test   %rax,%rax
jne    114e <fc8080_data_deselect+0x2e>
movzbl %bpl,%esi
add    $0x910,%esi
xor    %ebx,%ebx
mov    %r14,%rdi
xor    %edx,%edx
call   1030 <bbm_write@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @fc8080_data_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i8
store i8* %0, i8** %5
store i8 %1, i8* %6
store i8 %2, i8* %7
%8 = load i8*, i8** %5
%9 = load i8, i8* %6
%10 = load i8, i8* %7
%11 = call i64 @fc8080_channel_deselect(i8* %8, i8 zeroext %9, i8 zeroext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 1, i32* %4
br label %20
14: ; preds = %3
%15 = load i8*, i8** %5
%16 = load i8, i8* %7
%17 = zext i8 %16 to i32
%18 = add nsw i32 2320, %17
%19 = call i32 @bbm_write(i8* %15, i32 %18, i32 0)
store i32 0, i32* %4
br label %20
20: ; preds = %14, %13
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @fc8080_data_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i64 @fc8080_channel_deselect(i8* %0, i8 zeroext %1, i8 zeroext %2)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = zext i8 %2 to i32
%8 = add nuw nsw i32 %7, 2320
%9 = tail call i32 @bbm_write(i8* %0, i32 %8, i32 0)
br label %10
10: ; preds = %3, %6
%11 = phi i32 [ 0, %6 ], [ 1, %3 ]
ret i32 %11
}
/* Type definitions */
struct ofpbuf {
  int dummy;
};

/* Variables and functions */
struct ofpbuf *ofpbuf_new(size_t);
int /*<<< orphan*/ ofpbuf_put(struct ofpbuf *, void const *, size_t);
struct ofpbuf *ofpbuf_clone_data(const void *data, size_t size) {
  struct ofpbuf *b = ofpbuf_new(size);
  ofpbuf_put(b, data, size);
  return b;
}


x86 assembly (clang, -O0):
<ofpbuf_clone_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <ofpbuf_new@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1030 <ofpbuf_put@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofpbuf_clone_data>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
call   1040 <ofpbuf_new@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1030 <ofpbuf_put@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.ofpbuf = type { i32 }
define %struct.ofpbuf* @ofpbuf_clone_data(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca %struct.ofpbuf*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = call %struct.ofpbuf* @ofpbuf_new(i64 %6)
store %struct.ofpbuf* %7, %struct.ofpbuf** %5
%8 = load %struct.ofpbuf*, %struct.ofpbuf** %5
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = call i32 @ofpbuf_put(%struct.ofpbuf* %8, i8* %9, i64 %10)
%12 = load %struct.ofpbuf*, %struct.ofpbuf** %5
ret %struct.ofpbuf* %12
}

LLVM IR (-O2):
%struct.ofpbuf = type { i32 }
define %struct.ofpbuf* @ofpbuf_clone_data(i8* %0, i64 %1) {
%3 = tail call %struct.ofpbuf* @ofpbuf_new(i64 %1)
%4 = tail call i32 @ofpbuf_put(%struct.ofpbuf* %3, i8* %0, i64 %1)
ret %struct.ofpbuf* %3
}
void gtk_toolbar_space_style_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toolbar_space_style_get_type() {
ret void
}
/* Variables and functions */
scalar_t__ sqrt(int);
int isqrt(int v) { return (int)(sqrt(v + 0.5)); }


x86 assembly (clang, -O0):
<isqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xed8(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isqrt>:
cvtsi2sd %edi,%xmm0
addsd  0xee4(%rip),%xmm0
cvttsd2si %xmm0,%edi
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define i32 @isqrt(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fadd double %4, 5.000000e-01
%6 = fptosi double %5 to i32
%7 = call i64 @sqrt(i32 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @isqrt(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fadd double %2, 5.000000e-01
%4 = fptosi double %3 to i32
%5 = tail call i64 @sqrt(i32 %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
float _atanf(float);
float atanf(float x) { return _atanf(x); }


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

x86 assembly (clang, -O2):
<atanf>:
jmp    1030 <_atanf@plt>

LLVM IR (-O0):
define float @atanf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @_atanf(float %3)
ret float %4
}

LLVM IR (-O2):
define float @atanf(float %0) {
%2 = tail call float @_atanf(float %0)
ret float %2
}
void outportb(int port, int data) {
  __asm__ volatile("outb %0,%1"
                   :
                   : "a"((unsigned char)data), "d"((unsigned short)port));
}


x86 assembly (clang, -O0):
<outportb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
mov    %cx,%dx
out    %al,(%dx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<outportb>:
mov    %esi,%eax
mov    %edi,%edx
out    %al,(%dx)
ret

LLVM IR (-O0):
define void @outportb(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 = trunc i32 %5 to i8
%7 = load i32, i32* %3
%8 = trunc i32 %7 to i16
ret void
}

LLVM IR (-O2):
define void @outportb(i32 %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = trunc i32 %0 to i16
tail call void asm sideeffect "outb $0,$1", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i8 %3, i16 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g5_run();
void(g5_run_)() { g5_run(); }


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

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

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

LLVM IR (-O2):
define void @g5_run_() {
%1 = tail call i32 (...) @g5_run()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_90C141(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_90C141() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}