xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ fun(char *, int);
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("[+] start\n");
  fun(argv[0], 0x120);
  printf("[+] end\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    $0x120,%esi
call   1030 <fun@plt>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rdi
mov    $0x120,%esi
call   1040 <fun@plt>
lea    0xec6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"[+] start\0A\00"
@.str.1 = [9 x i8] c"[+] end\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = load i8**, i8*** %5
%8 = getelementptr inbounds i8*, i8** %7, i64 0
%9 = load i8*, i8** %8
%10 = call i32 @fun(i8* %9, i32 288)
%11 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [10 x i8] c"[+] start\00"
@str.2 = [8 x i8] c"[+] end\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%4 = load i8*, i8** %1
%5 = tail call i32 @fun(i8* %4, i32 288)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str.2, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t ev3_led_set_color(int32_t col) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ev3_led_set_color(i32 %0) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
void chip8_scroll_up(uint16_t op) {}


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

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

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

LLVM IR (-O2):
define void @chip8_scroll_up(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ left_motor_forward(int);
int /*<<< orphan*/ right_motor_forward(int);
void circle_right() {
  left_motor_forward(50 * 1.2);
  right_motor_forward(50 * 1.5);
}


x86 assembly (clang, -O0):
<circle_right>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3c,%edi
call   1030 <left_motor_forward@plt>
mov    $0x4b,%edi
call   1040 <right_motor_forward@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<circle_right>:
push   %rax
mov    $0x3c,%edi
call   1030 <left_motor_forward@plt>
mov    $0x4b,%edi
pop    %rax
jmp    1040 <right_motor_forward@plt>

LLVM IR (-O0):
define void @circle_right() {
%1 = call i32 @left_motor_forward(i32 60)
%2 = call i32 @right_motor_forward(i32 75)
ret void
}

LLVM IR (-O2):
define void @circle_right() {
%1 = tail call i32 @left_motor_forward(i32 60)
%2 = tail call i32 @right_motor_forward(i32 75)
ret void
}
int atoo(char operator) {
  switch (operator) {
  case '+':
    return (4);
  case '-':
    return (5);
  case '*':
    return (6);
  case '/':
    return (7);
  case '^':
    return (8);
  case 'E':
    return (9);
  default:
    return (10);
  }
}


x86 assembly (clang, -O0):
<atoo>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
add    $0xffffffd6,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x34,%eax
ja     117c <atoo+0x7c>
mov    -0x10(%rbp),%rax
lea    0xed5(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x4,-0x4(%rbp)
jmp    1183 <atoo+0x83>
movl   $0x5,-0x4(%rbp)
jmp    1183 <atoo+0x83>
movl   $0x6,-0x4(%rbp)
jmp    1183 <atoo+0x83>
movl   $0x7,-0x4(%rbp)
jmp    1183 <atoo+0x83>
movl   $0x8,-0x4(%rbp)
jmp    1183 <atoo+0x83>
movl   $0x9,-0x4(%rbp)
jmp    1183 <atoo+0x83>
movl   $0xa,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoo>:
add    $0xffffffd6,%edi
cmp    $0x34,%edi
ja     1123 <atoo+0x23>
mov    $0x4,%eax
lea    0xeec(%rip),%rcx
movslq (%rcx,%rdi,4),%rdx
add    %rcx,%rdx
jmp    *%rdx
mov    $0x6,%eax
ret
mov    $0xa,%eax
ret
mov    $0x5,%eax
ret
mov    $0x7,%eax
ret
mov    $0x9,%eax
ret
mov    $0x8,%eax
ret

LLVM IR (-O0):
define i32 @atoo(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
switch i32 %5, label %12 [
i32 43, label %6
i32 45, label %7
i32 42, label %8
i32 47, label %9
i32 94, label %10
i32 69, label %11
]
6: ; preds = %1
store i32 4, i32* %2
br label %13
7: ; preds = %1
store i32 5, i32* %2
br label %13
8: ; preds = %1
store i32 6, i32* %2
br label %13
9: ; preds = %1
store i32 7, i32* %2
br label %13
10: ; preds = %1
store i32 8, i32* %2
br label %13
11: ; preds = %1
store i32 9, i32* %2
br label %13
12: ; preds = %1
store i32 10, i32* %2
br label %13
13: ; preds = %12, %11, %10, %9, %8, %7, %6
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @atoo(i8 signext %0) {
%2 = sext i8 %0 to i32
switch i32 %2, label %8 [
i32 43, label %9
i32 45, label %3
i32 42, label %4
i32 47, label %5
i32 94, label %6
i32 69, label %7
]
3: ; preds = %1
br label %9
4: ; preds = %1
br label %9
5: ; preds = %1
br label %9
6: ; preds = %1
br label %9
7: ; preds = %1
br label %9
8: ; preds = %1
br label %9
9: ; preds = %1, %8, %7, %6, %5, %4, %3
%10 = phi i32 [ 10, %8 ], [ 9, %7 ], [ 8, %6 ], [ 7, %5 ], [ 6, %4 ], [ 5, %3 ], [ 4, %1 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
void *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/);
void *Sys_Time() {
  time_t t = time(0);
  return localtime(&t);
}


x86 assembly (clang, -O0):
<Sys_Time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_Time>:
push   %rax
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @Sys_Time() {
%1 = alloca i32
%2 = call i32 @time(i32 0)
store i32 %2, i32* %1
%3 = call i8* @localtime(i32* %1)
ret i8* %3
}

LLVM IR (-O2):
define i8* @Sys_Time() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @time(i32 0)
store i32 %3, i32* %1
%4 = call i8* @localtime(i32* %1)
ret i8* %4
}
/* Variables and functions */
int StrEqual(char const *, char const *);
int /*<<< orphan*/ assert(int);
int StrEqualLocale(const char *first, const char *second) {
  assert((0 != (first)));
  assert((0 != (second)));
  return StrEqual(first, second);
}


x86 assembly (clang, -O0):
<StrEqualLocale>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <StrEqual@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StrEqualLocale>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <StrEqual@plt>

LLVM IR (-O0):
define i32 @StrEqualLocale(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 = icmp ne i8* null, %5
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load i8*, i8** %4
%10 = icmp ne i8* null, %9
%11 = zext i1 %10 to i32
%12 = call i32 @assert(i32 %11)
%13 = load i8*, i8** %3
%14 = load i8*, i8** %4
%15 = call i32 @StrEqual(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @StrEqualLocale(i8* %0, i8* %1) {
%3 = icmp ne i8* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = icmp ne i8* %1, null
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = tail call i32 @StrEqual(i8* %0, i8* %1)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ clear();
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *);
int /*<<< orphan*/ shutdown_curses();
void resize(int signal) {
  (void)(signal);
  clear();
  shutdown_curses();
  errx(EXIT_FAILURE, "terminal resize");
}


x86 assembly (clang, -O0):
<resize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <clear@plt>
mov    $0x0,%al
call   1040 <shutdown_curses@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
call   1030 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resize>:
push   %rax
xor    %eax,%eax
call   1050 <clear@plt>
xor    %eax,%eax
call   1040 <shutdown_curses@plt>
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
lea    0xeb1(%rip),%rsi
pop    %rax
jmp    1030 <errx@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [16 x i8] c"terminal resize\00"
define void @resize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (...) @clear()
%5 = call i32 (...) @shutdown_curses()
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @errx(i32 %6, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [16 x i8] c"terminal resize\00"
define void @resize(i32 %0) {
%2 = tail call i32 (...) @clear()
%3 = tail call i32 (...) @shutdown_curses()
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @errx(i32 %4, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ copy_str(char *, size_t, char const *);
int /*<<< orphan*/ memmove(char *, char const *, scalar_t__);
int /*<<< orphan*/ split_ext(char *, int *, char const **);
scalar_t__ strlen(char const *);
int apply_e_mod(const char *path, char *buf, size_t buf_len) {
  int root_len;
  const char *ext_pos;
  copy_str(buf, buf_len, path);
  split_ext(buf, &root_len, &ext_pos);
  memmove(buf, ext_pos, strlen(ext_pos) + 1);
  return 0;
}


x86 assembly (clang, -O0):
<apply_e_mod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
call   1040 <copy_str@plt>
mov    -0x10(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
lea    -0x28(%rbp),%rdx
call   1060 <split_ext@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1050 <memmove@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apply_e_mod>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %rsi,%r14
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rdx,%rsi
mov    %rax,%rdx
call   1040 <copy_str@plt>
lea    0x14(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %r14,%rdi
call   1060 <split_ext@plt>
mov    0x8(%rsp),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <memmove@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @apply_e_mod(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = load i8*, i8** %4
%12 = call i32 @copy_str(i8* %9, i64 %10, i8* %11)
%13 = load i8*, i8** %5
%14 = call i32 @split_ext(i8* %13, i32* %7, i8** %8)
%15 = load i8*, i8** %5
%16 = load i8*, i8** %8
%17 = load i8*, i8** %8
%18 = call i64 @strlen(i8* %17)
%19 = add nsw i64 %18, 1
%20 = call i32 @memmove(i8* %15, i8* %16, i64 %19)
ret i32 0
}

LLVM IR (-O2):
define i32 @apply_e_mod(i8* %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = bitcast i32* %4 to i8*
%7 = bitcast i8** %5 to i8*
%8 = tail call i32 @copy_str(i8* %1, i64 %2, i8* %0)
%9 = call i32 @split_ext(i8* %1, i32* %4, i8** %5)
%10 = load i8*, i8** %5
%11 = call i64 @strlen(i8* dereferenceable(1) %10)
%12 = add nsw i64 %11, 1
%13 = call i32 @memmove(i8* %1, i8* %10, i64 %12)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ ERR_load_BIO_strings();
int /*<<< orphan*/ OpenSSL_add_all_algorithms();
int /*<<< orphan*/ SSL_library_init();
int /*<<< orphan*/ SSL_load_error_strings();
void init() {
  SSL_load_error_strings();
  ERR_load_BIO_strings();
  OpenSSL_add_all_algorithms();
  SSL_library_init();
}


x86 assembly (clang, -O0):
<init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <SSL_load_error_strings@plt>
mov    $0x0,%al
call   1060 <ERR_load_BIO_strings@plt>
mov    $0x0,%al
call   1040 <OpenSSL_add_all_algorithms@plt>
mov    $0x0,%al
call   1030 <SSL_library_init@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init>:
push   %rax
xor    %eax,%eax
call   1050 <SSL_load_error_strings@plt>
xor    %eax,%eax
call   1060 <ERR_load_BIO_strings@plt>
xor    %eax,%eax
call   1040 <OpenSSL_add_all_algorithms@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <SSL_library_init@plt>

LLVM IR (-O0):
define void @init() {
%1 = call i32 (...) @SSL_load_error_strings()
%2 = call i32 (...) @ERR_load_BIO_strings()
%3 = call i32 (...) @OpenSSL_add_all_algorithms()
%4 = call i32 (...) @SSL_library_init()
ret void
}

LLVM IR (-O2):
define void @init() {
%1 = tail call i32 (...) @SSL_load_error_strings()
%2 = tail call i32 (...) @ERR_load_BIO_strings()
%3 = tail call i32 (...) @OpenSSL_add_all_algorithms()
%4 = tail call i32 (...) @SSL_library_init()
ret void
}
/* Variables and functions */
int fn_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101(char const *);
int fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101(
    const char *text) {
  int pos = 0;
  pos = fn_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101(text);
  if (pos != -1)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x14(%rbp)
je     1144 <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101>:
jmp    1030 <fn_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101@plt>

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

LLVM IR (-O2):
define i32 @fn_al_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101(i8* %0) {
%2 = tail call i32 @fn_sq_ch_68_ch_97_ch_116_ch_97_ch_116_ch_121_ch_112_ch_101(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ log_removeCallback();
void SSP_RemoveLogCallback() { log_removeCallback(); }


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

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

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

LLVM IR (-O2):
define void @SSP_RemoveLogCallback() {
%1 = tail call i32 (...) @log_removeCallback()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errx(int, char *, char const *);
unsigned long strtoul(char const *, char **, int /*<<< orphan*/);
unsigned long xatoul(const char *p) {
  char *e;
  unsigned long x;
  x = strtoul(p, &e, 0);
  if (*e)
    errx(1, "must be a number: '%s'", p);
  return x;
}


x86 assembly (clang, -O0):
<xatoul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1161 <xatoul+0x41>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
lea    0xea4(%rip),%rsi
call   1030 <errx@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xatoul>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    %rsp,%rsi
xor    %edx,%edx
call   1040 <strtoul@plt>
mov    %rax,%r14
mov    (%rsp),%rax
cmpb   $0x0,(%rax)
je     1151 <xatoul+0x31>
lea    0xebc(%rip),%rsi
mov    $0x1,%edi
mov    %rbx,%rdx
call   1030 <errx@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [23 x i8] c"must be a number: '%s'\00"
define i64 @xatoul(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @strtoul(i8* %5, i8** %3, i32 0)
store i64 %6, i64* %4
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i32 @errx(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %1
%14 = load i64, i64* %4
ret i64 %14
}

LLVM IR (-O2):
@.str = [23 x i8] c"must be a number: '%s'\00"
define i64 @xatoul(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtoul(i8* %0, i8** %2, i32 0)
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = tail call i32 @errx(i32 1, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %10
10: ; preds = %8, %1
ret i64 %4
}
double min(double x, double y) { return x > y ? y : x; }


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112d <min+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1137 <min+0x37>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
minsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @min(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 = fcmp ogt double %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load double, double* %4
br label %12
10: ; preds = %2
%11 = load double, double* %3
br label %12
12: ; preds = %10, %8
%13 = phi double [ %9, %8 ], [ %11, %10 ]
ret double %13
}

LLVM IR (-O2):
define double @min(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %1, double %0
ret double %4
}
int __attribute__((weak)) _init_startup() { return 0; }


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

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

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

LLVM IR (-O2):
define weak i32 @_init_startup() {
ret i32 0
}
/* Variables and functions */
int stindex(char *, char *);
int isin(char *received, char *expected) {
  return (stindex(received, expected) != -1);
}


x86 assembly (clang, -O0):
<isin>:
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 <stindex@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isin>:
push   %rax
call   1030 <stindex@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @isin(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @stindex(i8* %5, i8* %6)
%8 = icmp ne i32 %7, -1
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @isin(i8* %0, i8* %1) {
%3 = tail call i32 @stindex(i8* %0, i8* %1)
%4 = icmp ne i32 %3, -1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ GPS_Math_XYZ_To_LatLonH(double *, double *, double *, double,
                                           double, double, double, double);
void GPS_Math_XYZ_To_Airy1830LatLonH(double *phi, double *lambda, double *H,
                                     double x, double y, double z) {
  double a = 6377563.396;
  double b = 6356256.910;
  GPS_Math_XYZ_To_LatLonH(phi, lambda, H, x, y, z, a, b);
  return;
}


x86 assembly (clang, -O0):
<GPS_Math_XYZ_To_Airy1830LatLonH>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
movsd  %xmm1,-0x28(%rbp)
movsd  %xmm2,-0x30(%rbp)
movsd  0xecd(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
movsd  -0x40(%rbp),%xmm4
call   1030 <GPS_Math_XYZ_To_LatLonH@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPS_Math_XYZ_To_Airy1830LatLonH>:
movsd  0xee8(%rip),%xmm3
movsd  0xee8(%rip),%xmm4
jmp    1030 <GPS_Math_XYZ_To_LatLonH@plt>

LLVM IR (-O0):
define void @GPS_Math_XYZ_To_Airy1830LatLonH(double* %0, double* %1, double* %2, double %3, double %4, double %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double*
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
store double* %0, double** %7
store double* %1, double** %8
store double* %2, double** %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
store double 0x41585416D9581062, double* %13
store double 0x41583F483A3D70A4, double* %14
%15 = load double*, double** %7
%16 = load double*, double** %8
%17 = load double*, double** %9
%18 = load double, double* %10
%19 = load double, double* %11
%20 = load double, double* %12
%21 = load double, double* %13
%22 = load double, double* %14
%23 = call i32 @GPS_Math_XYZ_To_LatLonH(double* %15, double* %16, double* %17, double %18, double %19, double %20, double %21, double %22)
ret void
}

LLVM IR (-O2):
define void @GPS_Math_XYZ_To_Airy1830LatLonH(double* %0, double* %1, double* %2, double %3, double %4, double %5) {
%7 = tail call i32 @GPS_Math_XYZ_To_LatLonH(double* %0, double* %1, double* %2, double %3, double %4, double %5, double 0x41585416D9581062, double 0x41583F483A3D70A4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *argv0, int exit_code) {
  printf("Usage: %s [-h] <file> <prefix>\n"
         "\n"
         "Options:\n"
         "  -h         display help\n",
         argv0);
  exit(exit_code);
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %esi,%ebx
mov    %rdi,%rsi
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [68 x i8] c"Usage: %s [-h] <file> <prefix>\0A\0AOptions:\0A -h display help\0A\00"
define void @usage(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 = call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i32, i32* %4
%8 = call i32 @exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@.str = [68 x i8] c"Usage: %s [-h] <file> <prefix>\0A\0AOptions:\0A -h display help\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([68 x i8], [68 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 %1)
unreachable
}
void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
                             struct snd_soc_jack_gpio *gpios) {}


x86 assembly (clang, -O0):
<snd_soc_jack_free_gpios>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.snd_soc_jack = type opaque
%struct.snd_soc_jack_gpio = type opaque
define void @snd_soc_jack_free_gpios(%struct.snd_soc_jack* nocapture %0, i32 %1, %struct.snd_soc_jack_gpio* nocapture %2) {
ret void
}
/* Type definitions */
typedef unsigned char uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void I2SFrameConfigure(uint32_t ui32Base, uint8_t ui8StatusAD0,
                       uint8_t ui8ChanAD0, uint8_t ui8StatusAD1,
                       uint8_t ui8ChanAD1) {
  ;
  (*((volatile unsigned char *)(0x40021000 + 0x00000008))) =
      (ui8StatusAD0 | ui8StatusAD1);
  (*((volatile unsigned char *)(0x40021000 + 0x00000010))) = ui8ChanAD0;
  (*((volatile unsigned char *)(0x40021000 + 0x00000014))) = ui8ChanAD1;
}


x86 assembly (clang, -O0):
<I2SFrameConfigure>:
push   %rbp
mov    %rsp,%rbp
mov    %r8b,%al
mov    %edi,-0x4(%rbp)
mov    %sil,-0x5(%rbp)
mov    %dl,-0x6(%rbp)
mov    %cl,-0x7(%rbp)
mov    %al,-0x8(%rbp)
movzbl -0x5(%rbp),%eax
movzbl -0x7(%rbp),%ecx
or     %ecx,%eax
mov    %al,%cl
mov    $0x40021008,%eax
mov    %cl,(%rax)
mov    -0x6(%rbp),%cl
mov    $0x40021010,%eax
mov    %cl,(%rax)
mov    -0x8(%rbp),%cl
mov    $0x40021014,%eax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2SFrameConfigure>:
or     %ecx,%esi
mov    %sil,0x40021008
40
mov    %dl,0x40021010
mov    %r8b,0x40021014
40
ret

LLVM IR (-O0):
define void @I2SFrameConfigure(i32 %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8 zeroext %4) {
%6 = alloca i32
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
%10 = alloca i8
store i32 %0, i32* %6
store i8 %1, i8* %7
store i8 %2, i8* %8
store i8 %3, i8* %9
store i8 %4, i8* %10
%11 = load i8, i8* %7
%12 = zext i8 %11 to i32
%13 = load i8, i8* %9
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
%16 = trunc i32 %15 to i8
store volatile i8 %16, i8* inttoptr (i64 1073877000 to i8*)
%17 = load i8, i8* %8
store volatile i8 %17, i8* inttoptr (i64 1073877008 to i8*)
%18 = load i8, i8* %10
store volatile i8 %18, i8* inttoptr (i64 1073877012 to i8*)
ret void
}

LLVM IR (-O2):
define void @I2SFrameConfigure(i32 %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8 zeroext %4) {
%6 = or i8 %3, %1
store volatile i8 %6, i8* inttoptr (i64 1073877000 to i8*)
store volatile i8 %2, i8* inttoptr (i64 1073877008 to i8*)
store volatile i8 %4, i8* inttoptr (i64 1073877012 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isxdigit(int);
void t_isxdigit_0x9f() {
  Assert_real((isxdigit(159) == 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_isxdigit.c",
              800, ("isxdigit should be 0 for 0x9f"));
}


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

x86 assembly (clang, -O2):
<t_isxdigit_0x9f>:
push   %rax
mov    $0x9f,%edi
call   1030 <isxdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x320,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x9f\00"
define void @t_isxdigit_0x9f() {
%1 = call i64 @isxdigit(i32 159)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 800, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isxdigit.c\00"
@.str.1 = [30 x i8] c"isxdigit should be 0 for 0x9f\00"
define void @t_isxdigit_0x9f() {
%1 = tail call i64 @isxdigit(i32 159)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 800, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef scalar_t__ u_int;
typedef scalar_t__ u_char;
typedef int bool_t;
typedef int /*<<< orphan*/ XDR;

/* Variables and functions */
int /*<<< orphan*/ xdr_u_int(int /*<<< orphan*/ *, scalar_t__ *);
bool_t xdr_u_char(XDR *xdr, u_char *cp) {
  u_int u = (*cp);
  if (!xdr_u_int(xdr, &u))
    return 0;
  *cp = (u_char)u;
  return 1;
}


x86 assembly (clang, -O0):
<xdr_u_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <xdr_u_int@plt>
cmp    $0x0,%eax
jne    114d <xdr_u_char+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    115f <xdr_u_char+0x4f>
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xdr_u_char>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    (%rsi),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rsi
call   1030 <xdr_u_int@plt>
test   %eax,%eax
je     113d <xdr_u_char+0x2d>
mov    0x8(%rsp),%rax
mov    %rax,(%rbx)
mov    $0x1,%eax
jmp    113f <xdr_u_char+0x2f>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @xdr_u_char(i32* %0, i64* nocapture %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = load i64, i64* %1
store i64 %5, i64* %3
%6 = call i32 @xdr_u_int(i32* %0, i64* %3)
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = load i64, i64* %3
store i64 %9, i64* %1
br label %10
10: ; preds = %2, %8
%11 = phi i32 [ 1, %8 ], [ 0, %2 ]
ret i32 %11
}
/* Variables and functions */
double fabs(double);
int is_equal(double x1, double x2) { return fabs(x1 - x2) < 1.e-16; }


x86 assembly (clang, -O0):
<is_equal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
movaps 0xef1(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  0xed5(%rip),%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_equal>:
subsd  %xmm1,%xmm0
andpd  0xef4(%rip),%xmm0
movsd  0xefc(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @is_equal(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
%8 = call double @llvm.fabs.f64(double %7)
%9 = fcmp olt double %8, 0x3C9CD2B297D889BC
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @is_equal(double %0, double %1) {
%3 = fsub double %0, %1
%4 = tail call double @llvm.fabs.f64(double %3)
%5 = fcmp olt double %4, 0x3C9CD2B297D889BC
%6 = zext i1 %5 to i32
ret i32 %6
}
void show_net_times(void) {}


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

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

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

LLVM IR (-O2):
define void @show_net_times() {
ret void
}
void lock_release() { return; }


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

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

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

LLVM IR (-O2):
define void @lock_release() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printa(char **);
void help_info() {
  char *msg[] = {"Show summary information about your Pit database. This "
                 "command is as simple as:\n",
                 "   pit info\n", NULL};
  printa(msg);
}


x86 assembly (clang, -O0):
<help_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2ce1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cde(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cdb(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
call   1030 <printa@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<help_info>:
sub    $0x18,%rsp
mov    0x2cf5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
call   1030 <printa@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [81 x i8] c"Show summary information about your Pit database. This command is as simple as:\0A\00"
@.str.1 = [13 x i8] c" pit info\0A\00"
@__const.help_info.msg = [3 x i8*] [i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i32 0, i32 0), i8* null]
define void @help_info() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%4 = call i32 @printa(i8** %3)
ret void
}

LLVM IR (-O2):
@.str = [81 x i8] c"Show summary information about your Pit database. This command is as simple as:\0A\00"
@.str.1 = [13 x i8] c" pit info\0A\00"
@__const.help_info.msg = [3 x i8*] [i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i32 0, i32 0), i8* null]
define void @help_info() {
%1 = alloca [3 x i8*]
%2 = bitcast [3 x i8*]* %1 to i8*
%3 = getelementptr inbounds [3 x i8*], [3 x i8*]* %1, i64 0, i64 0
%4 = call i32 @printa(i8** %3)
ret void
}
void GPUsetMode(unsigned long gdata) {}


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

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

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

LLVM IR (-O2):
define void @GPUsetMode(i64 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_version();
int /*<<< orphan*/ printf(char *);
void print_help() {
  print_version();
  printf("\n"
         "Usage:\n"
         "  hydrogen [file] [arguments...]\n"
         "\n"
         "Options:\n"
         "  --version, -v   Show Hydrogen's version number\n"
         "  --help, -h      Show this help text\n"
         "A REPL is run if no file path is specified.\n");
}


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

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

LLVM IR (-O0):
@.str = [183 x i8] c"\0AUsage:\0A hydrogen [file] [arguments...]\0A\0AOptions:\0A --version, -v Show Hydrogen's version number\0A --help, -h Show this help text\0AA REPL is run if no file path is specified.\0A\00"
define void @print_help() {
%1 = call i32 (...) @print_version()
%2 = call i32 @printf(i8* getelementptr inbounds ([183 x i8], [183 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [182 x i8] c"\0AUsage:\0A hydrogen [file] [arguments...]\0A\0AOptions:\0A --version, -v Show Hydrogen's version number\0A --help, -h Show this help text\0AA REPL is run if no file path is specified.\00"
define void @print_help() {
%1 = tail call i32 (...) @print_version()
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([182 x i8], [182 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ func();
void test1(char *signature) {
  char ch = signature[0];
  if (ch == 15 || ch == 3) {
    if (ch == 15)
      func();
  }
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0xf,%eax
je     113f <test1+0x2f>
movsbl -0x9(%rbp),%eax
cmp    $0x3,%eax
jne    1158 <test1+0x48>
movsbl -0x9(%rbp),%eax
cmp    $0xf,%eax
jne    1153 <test1+0x43>
mov    $0x0,%al
call   1030 <func@plt>
jmp    1158 <test1+0x48>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
cmpb   $0xf,(%rdi)
jne    111c <test1+0xc>
xor    %eax,%eax
jmp    1030 <func@plt>
ret

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

LLVM IR (-O2):
define void @test1(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 15
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @func()
br label %6
6: ; preds = %4, %1
ret void
}
int getValue(int *entry) { return *(entry + 5); }


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

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

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

LLVM IR (-O2):
define i32 @getValue(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 5
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void reszelo() { printf("Reszelem a kodot\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"Reszelem a kodot\0A\00"
define void @reszelo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"Reszelem a kodot\00"
define void @reszelo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct dcadec_stream_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ ta_free(struct dcadec_stream_info *);
void dcadec_stream_free_info(struct dcadec_stream_info *info) { ta_free(info); }


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

x86 assembly (clang, -O2):
<dcadec_stream_free_info>:
jmp    1030 <ta_free@plt>

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

LLVM IR (-O2):
%struct.dcadec_stream_info = type { i32 }
define void @dcadec_stream_free_info(%struct.dcadec_stream_info* %0) {
%2 = tail call i32 @ta_free(%struct.dcadec_stream_info* %0)
ret void
}
/* Variables and functions */
int signal_request();
int ltr_int_rl_suspend() { return signal_request(); }


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

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

LLVM IR (-O0):
define i32 @ltr_int_rl_suspend() {
%1 = call i32 (...) @signal_request()
ret i32 %1
}

LLVM IR (-O2):
define i32 @ltr_int_rl_suspend() {
%1 = tail call i32 (...) @signal_request()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
int __dirfd(int /*<<< orphan*/ *);
int dirfd(DIR *dirp) { return (__dirfd(dirp)); }


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

x86 assembly (clang, -O2):
<dirfd>:
jmp    1030 <__dirfd@plt>

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

LLVM IR (-O2):
define i32 @dirfd(i32* %0) {
%2 = tail call i32 @__dirfd(i32* %0)
ret i32 %2
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XEnterWindowEvent;

/* Variables and functions */
void set_XEnterWindowEvent_window(void *_p, unsigned long _v) {
  ((XEnterWindowEvent *)_p)->window = (unsigned long)_v;
}


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

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

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

LLVM IR (-O2):
define void @set_XEnterWindowEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_swap();
int /*<<< orphan*/ pass();
int main(void) {
  check_swap();
  pass();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <check_swap@plt>
xor    %eax,%eax
call   1030 <pass@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @check_swap()
%2 = tail call i32 (...) @pass()
ret i32 0
}
main() {
  int x[3];
  int y[3];
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [3 x i32]
%2 = alloca [3 x i32]
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ b;
};
struct TYPE_4__ {
  TYPE_1__ data;
};
typedef TYPE_2__ XClientMessageEvent;

/* Variables and functions */
void *get_XClientMessageEvent_data_b(void *_p) {
  return (void *)(((XClientMessageEvent *)_p)->data.b);
}


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

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

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

LLVM IR (-O2):
define i8* @get_XClientMessageEvent_data_b(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void *print_xs(void *unused) {
  while (1) {
    fputc('x', stderr);
  }
  return NULL;
}


x86 assembly (clang, -O0):
<print_xs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
mov    $0x78,%edi
call   1030 <fputc@plt>
jmp    111c <print_xs+0xc>

x86 assembly (clang, -O2):
<print_xs>:
push   %rbx
mov    0x2ec8(%rip),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rbx),%esi
mov    $0x78,%edi
call   1030 <fputc@plt>
jmp    1120 <print_xs+0x10>

LLVM IR (-O0):
@stderr = global i32 0
define i8* @print_xs(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1, %3
%4 = load i32, i32* @stderr
%5 = call i32 @fputc(i8 signext 120, i32 %4)
br label %3
}

LLVM IR (-O2):
@stderr = global i32 0
define noalias i8* @print_xs(i8* nocapture readnone %0) {
br label %2
2: ; preds = %1, %2
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputc(i8 signext 120, i32 %3)
br label %2
}