xunge/DecIR huggingface dataset:
int min(int num_seq[5]) {
  int min = num_seq[0];
  for (int i = 1; i < 5; i++) {
    if (num_seq[i] < min)
      min = num_seq[i];
  }
  return (min);
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
cmpl   $0x5,-0x10(%rbp)
jge    1157 <min+0x57>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0xc(%rbp),%eax
jge    1144 <min+0x44>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <min+0x49>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1118 <min+0x18>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    0x8(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    0xc(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
mov    0x10(%rdi),%ecx
cmp    %eax,%ecx
cmovl  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, %2
%6 = select i1 %5, i32 %4, i32 %2
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = icmp slt i32 %8, %6
%10 = select i1 %9, i32 %8, i32 %6
%11 = getelementptr inbounds i32, i32* %0, i64 3
%12 = load i32, i32* %11
%13 = icmp slt i32 %12, %10
%14 = select i1 %13, i32 %12, i32 %10
%15 = getelementptr inbounds i32, i32* %0, i64 4
%16 = load i32, i32* %15
%17 = icmp slt i32 %16, %14
%18 = select i1 %17, i32 %16, i32 %14
ret i32 %18
}
__attribute__((always_)) int
lookup_module_symbol_attrs(unsigned long addr, unsigned long *size,
                           unsigned long *offset, char *modname, char *name) {
  return -34;
}


x86 assembly (clang, -O0):
<lookup_module_symbol_attrs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    $0xffffffde,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @lookup_module_symbol_attrs(i64 %0, i64* %1, i64* %2, i8* %3, i8* %4) {
%6 = alloca i64
%7 = alloca i64*
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i8*
store i64 %0, i64* %6
store i64* %1, i64** %7
store i64* %2, i64** %8
store i8* %3, i8** %9
store i8* %4, i8** %10
ret i32 -34
}

LLVM IR (-O2):
define i32 @lookup_module_symbol_attrs(i64 %0, i64* nocapture readnone %1, i64* nocapture readnone %2, i8* nocapture readnone %3, i8* nocapture readnone %4) {
ret i32 -34
}
void g_strndup() {}


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

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

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

LLVM IR (-O2):
define void @g_strndup() {
ret void
}
/* Variables and functions */
scalar_t__ strcmp(void *, void *);
int string_less_then(void *a, void *b) { return strcmp(a, b) < 0; }


x86 assembly (clang, -O0):
<string_less_then>:
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 <strcmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_less_then>:
push   %rax
call   1030 <strcmp@plt>
shr    $0x3f,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @string_less_then(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 i64 @strcmp(i8* %5, i8* %6)
%8 = icmp slt i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @string_less_then(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
ret i32 %5
}
/* Type definitions */
struct ell_printer {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ putchar(unsigned char);
void ell_stdout_printer_putchar(struct ell_printer *self, unsigned char c) {
  (void)self;
  (void)putchar(c);
}


x86 assembly (clang, -O0):
<ell_stdout_printer_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movzbl -0x9(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ell_stdout_printer_putchar>:
mov    %esi,%edi
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
%struct.ell_printer = type { i32 }
define void @ell_stdout_printer_putchar(%struct.ell_printer* nocapture readnone %0, i8 zeroext %1) {
%3 = tail call i32 @putchar(i8 zeroext %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int WCONTINUED;
int WNOHANG;
int WUNTRACED;
scalar_t__ mark_proc_status(int /*<<< orphan*/, int);
int /*<<< orphan*/ waitpid(int, int *, int);
void check_job_status(void) {
  int status = 0;
  pid_t pid = 0;
  do {
    pid = waitpid(-1, &status, WUNTRACED | WNOHANG | WCONTINUED);
  } while (mark_proc_status(pid, status));
}


x86 assembly (clang, -O0):
<check_job_status>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    0x2e9b(%rip),%rax
mov    (%rax),%edx
mov    0x2ea2(%rip),%rax
or     (%rax),%edx
mov    0x2e79(%rip),%rax
or     (%rax),%edx
mov    $0xffffffff,%edi
lea    -0x4(%rbp),%rsi
call   1030 <waitpid@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
call   1040 <mark_proc_status@plt>
cmp    $0x0,%rax
jne    1136 <check_job_status+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_job_status>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
movl   $0x0,0x4(%rsp)
mov    0x2ea1(%rip),%r14
mov    0x2eaa(%rip),%r15
mov    0x2e83(%rip),%r12
lea    0x4(%rsp),%rbx
nopw   0x0(%rax,%rax,1)
mov    (%r15),%edx
or     (%r14),%edx
or     (%r12),%edx
mov    $0xffffffff,%edi
mov    %rbx,%rsi
call   1030 <waitpid@plt>
mov    0x4(%rsp),%esi
mov    %eax,%edi
call   1040 <mark_proc_status@plt>
test   %rax,%rax
jne    1150 <check_job_status+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@WUNTRACED = global i32 0
@WNOHANG = global i32 0
@WCONTINUED = global i32 0
define void @check_job_status() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* @WUNTRACED
%5 = load i32, i32* @WNOHANG
%6 = or i32 %4, %5
%7 = load i32, i32* @WCONTINUED
%8 = or i32 %6, %7
%9 = call i32 @waitpid(i32 -1, i32* %1, i32 %8)
store i32 %9, i32* %2
br label %10
10: ; preds = %3
%11 = load i32, i32* %2
%12 = load i32, i32* %1
%13 = call i64 @mark_proc_status(i32 %11, i32 %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %3, label %15
15: ; preds = %10
ret void
}

LLVM IR (-O2):
@WUNTRACED = global i32 0
@WNOHANG = global i32 0
@WCONTINUED = global i32 0
define void @check_job_status() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
br label %3
3: ; preds = %3, %0
%4 = load i32, i32* @WUNTRACED
%5 = load i32, i32* @WNOHANG
%6 = or i32 %5, %4
%7 = load i32, i32* @WCONTINUED
%8 = or i32 %6, %7
%9 = call i32 @waitpid(i32 -1, i32* %1, i32 %8)
%10 = load i32, i32* %1
%11 = call i64 @mark_proc_status(i32 %9, i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %3
13: ; preds = %3
ret void
}
__attribute__((no_sanitize_undefined)) void float_zero(void) {
  volatile float a = 4.2f, b = 0.0f, c;
  c = a / b;
}


x86 assembly (clang, -O0):
<float_zero>:
push   %rbp
mov    %rsp,%rbp
movss  0xef4(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<float_zero>:
movl   $0x40866666,-0x8(%rsp)
40
movl   $0x0,-0xc(%rsp)
movss  -0x8(%rsp),%xmm0
divss  -0xc(%rsp),%xmm0
movss  %xmm0,-0x4(%rsp)
ret

LLVM IR (-O0):
define void @float_zero() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
store volatile float 0x4010CCCCC0000000, float* %1
store volatile float 0.000000e+00, float* %2
%4 = load volatile float, float* %1
%5 = load volatile float, float* %2
%6 = fdiv float %4, %5
store volatile float %6, float* %3
ret void
}

LLVM IR (-O2):
define void @float_zero() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
store volatile float 0x4010CCCCC0000000, float* %1
%5 = bitcast float* %2 to i8*
store volatile float 0.000000e+00, float* %2
%6 = bitcast float* %3 to i8*
%7 = load volatile float, float* %1
%8 = load volatile float, float* %2
%9 = fdiv float %7, %8
store volatile float %9, float* %3
ret void
}
/* Type definitions */
struct dumper {
  int dummy;
};
struct cras_expr_expression {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dump_one_expression(struct dumper *,
                                       struct cras_expr_expression const *,
                                       int /*<<< orphan*/);
void cras_expr_expression_dump(struct dumper *d,
                               const struct cras_expr_expression *expr) {
  dump_one_expression(d, expr, 0);
}


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

x86 assembly (clang, -O2):
<cras_expr_expression_dump>:
xor    %edx,%edx
jmp    1030 <dump_one_expression@plt>

LLVM IR (-O0):
%struct.dumper = type { i32 }
%struct.cras_expr_expression = type { i32 }
define void @cras_expr_expression_dump(%struct.dumper* %0, %struct.cras_expr_expression* %1) {
%3 = alloca %struct.dumper*
%4 = alloca %struct.cras_expr_expression*
store %struct.dumper* %0, %struct.dumper** %3
store %struct.cras_expr_expression* %1, %struct.cras_expr_expression** %4
%5 = load %struct.dumper*, %struct.dumper** %3
%6 = load %struct.cras_expr_expression*, %struct.cras_expr_expression** %4
%7 = call i32 @dump_one_expression(%struct.dumper* %5, %struct.cras_expr_expression* %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.dumper = type { i32 }
%struct.cras_expr_expression = type { i32 }
define void @cras_expr_expression_dump(%struct.dumper* %0, %struct.cras_expr_expression* %1) {
%3 = tail call i32 @dump_one_expression(%struct.dumper* %0, %struct.cras_expr_expression* %1, i32 0)
ret void
}
void bar(int x, ...) {}


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

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

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

LLVM IR (-O2):
define void @bar(i32 %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ player_exit_cleanup();
void game_exit_cleanup(void) { player_exit_cleanup(); }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_window_get_accept_focus() {
ret void
}
/* Variables and functions */
int l_le(char *, char *, int, int);
int intr_wrap_603(char *s1, char *s2, int l1, int l2) {
  return l_le(s1, s2, l1, l2);
}


x86 assembly (clang, -O0):
<intr_wrap_603>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x18(%rbp),%ecx
call   1030 <l_le@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_603>:
jmp    1030 <l_le@plt>

LLVM IR (-O0):
define i32 @intr_wrap_603(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i32, i32* %8
%13 = call i32 @l_le(i8* %9, i8* %10, i32 %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @intr_wrap_603(i8* %0, i8* %1, i32 %2, i32 %3) {
%5 = tail call i32 @l_le(i8* %0, i8* %1, i32 %2, i32 %3)
ret i32 %5
}
void wifi_rsp_sme_stop_scan(const struct wifi_msg_sme_stop_scan_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_stop_scan_rsp_t = type opaque
define void @wifi_rsp_sme_stop_scan(%struct.wifi_msg_sme_stop_scan_rsp_t* nocapture %0) {
ret void
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ ungetch(char);
void ungets(char s[]) {
  int i;
  for (i = strlen(s) - 1; i >= 0; i--)
    ungetch(s[i]);
}


x86 assembly (clang, -O0):
<ungets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     1164 <ungets+0x44>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <ungetch@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <ungets+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungets>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1157 <ungets+0x37>
mov    %eax,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
movsbl (%r14,%rax,1),%edi
call   1040 <ungetch@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1140 <ungets+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ungets(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %14
4: ; preds = %1
%5 = zext i32 %2 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ %5, %4 ], [ %8, %6 ]
%8 = add nsw i64 %7, -1
%9 = and i64 %8, 4294967295
%10 = getelementptr inbounds i8, i8* %0, i64 %9
%11 = load i8, i8* %10
%12 = tail call i32 @ungetch(i8 signext %11)
%13 = icmp ugt i64 %7, 1
br i1 %13, label %6, label %14
14: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int danger[] = {};
  int offset = 4000;
  printf("Current value of danger[%ld]: %ld.\n", offset, danger[offset]);
  danger[offset] = 10;
  printf("Current value of danger[%ld]: %ld.\n", offset, danger[offset]);
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xfa0,-0xc(%rbp)
mov    -0xc(%rbp),%esi
movslq -0xc(%rbp),%rax
mov    -0x8(%rbp,%rax,4),%edx
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
movslq -0xc(%rbp),%rax
movl   $0xa,-0x8(%rbp,%rax,4)
mov    -0xc(%rbp),%esi
movslq -0xc(%rbp),%rax
mov    -0x8(%rbp,%rax,4),%edx
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0xfa0,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0xfa0,%esi
mov    $0xa,%edx
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Current value of danger[%ld]: %ld.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [0 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [0 x i32]* %2 to i8*
store i32 4000, i32* %3
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds [0 x i32], [0 x i32]* %2, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %9)
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [0 x i32], [0 x i32]* %2, i64 0, i64 %12
store i32 10, i32* %13
%14 = load i32, i32* %3
%15 = load i32, i32* %3
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [0 x i32], [0 x i32]* %2, i64 0, i64 %16
%18 = load i32, i32* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 %14, i32 %18)
ret i32 1
}

LLVM IR (-O2):
@.str = [36 x i8] c"Current value of danger[%ld]: %ld.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 4000, i32 undef)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 4000, i32 10)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ secure_clear(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void secure_clear_str(char *str) {
  if (!str)
    return;
  secure_clear(str, strlen(str));
}


x86 assembly (clang, -O0):
<secure_clear_str>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <secure_clear_str+0x1c>
jmp    1158 <secure_clear_str+0x38>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <secure_clear@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<secure_clear_str>:
test   %rdi,%rdi
je     1139 <secure_clear_str+0x19>
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <secure_clear@plt>
ret

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

LLVM IR (-O2):
define void @secure_clear_str(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = tail call i32 @secure_clear(i8* %0, i32 %4)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int read(int, char *, int);
char _get_char(int fd) {
  char in;
  if (read(fd, &in, 1) == 1) {
    return in;
  }
  return 0;
}


x86 assembly (clang, -O0):
<_get_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x9(%rbp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
cmp    $0x1,%eax
jne    1140 <_get_char+0x30>
mov    -0x9(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    1144 <_get_char+0x34>
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_get_char>:
push   %rax
lea    0x7(%rsp),%rsi
mov    $0x1,%edx
call   1030 <read@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
movzbl 0x7(%rsp),%eax
cmovne %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define signext i8 @_get_char(i32 %0) {
%2 = alloca i8
%3 = call i32 @read(i32 %0, i8* %2, i32 1)
%4 = icmp eq i32 %3, 1
%5 = load i8, i8* %2
%6 = select i1 %4, i8 %5, i8 0
ret i8 %6
}
int support_avx512() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @support_avx512() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("main\n");
  foo();
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [5 x i8] c"main\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @foo()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ egcd(long, long, long *, long *, long *);
long modinv(long num, long mod) {
  long g = 0;
  long x = 0;
  long y = 0;
  egcd(num, mod, &g, &x, &y);
  if (g == 1) {
    if (x < 0)
      x += mod;
    return x;
  } else
    return 0;
}


x86 assembly (clang, -O0):
<modinv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
lea    -0x30(%rbp),%r8
call   1030 <egcd@plt>
cmpq   $0x1,-0x20(%rbp)
jne    1180 <modinv+0x70>
cmpq   $0x0,-0x28(%rbp)
jge    1173 <modinv+0x63>
mov    -0x18(%rbp),%rax
add    -0x28(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1188 <modinv+0x78>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modinv>:
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%rbx
movq   $0x0,0x10(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x18(%rsp)
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
lea    0x18(%rsp),%r8
call   1030 <egcd@plt>
mov    0x8(%rsp),%rax
mov    %rax,%rcx
sar    $0x3f,%rcx
and    %rbx,%rcx
add    %rax,%rcx
xor    %eax,%eax
cmpq   $0x1,0x10(%rsp)
cmove  %rcx,%rax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @modinv(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = bitcast i64* %3 to i8*
store i64 0, i64* %3
%7 = bitcast i64* %4 to i8*
store i64 0, i64* %4
%8 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%9 = call i32 @egcd(i64 %0, i64 %1, i64* %3, i64* %4, i64* %5)
%10 = load i64, i64* %3
%11 = icmp eq i64 %10, 1
%12 = load i64, i64* %4
%13 = icmp slt i64 %12, 0
%14 = select i1 %13, i64 %1, i64 0
%15 = add nsw i64 %12, %14
%16 = select i1 %11, i64 %15, i64 0
ret i64 %16
}
float file(char *name, int pos) { return 4.0; }


x86 assembly (clang, -O0):
<file>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  0xeed(%rip),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define float @file(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret float 4.000000e+00
}

LLVM IR (-O2):
define float @file(i8* nocapture readnone %0, i32 %1) {
ret float 4.000000e+00
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ sclass_univ_rename_entry(int /*<<< orphan*/,
                                            int /*<<< orphan*/ const *,
                                            int /*<<< orphan*/,
                                            int /*<<< orphan*/ const *,
                                            int /*<<< orphan*/);
uint8_t sclass_mr_rename_entry(uint8_t oldnleng, const uint8_t *oldname,
                               uint8_t newnleng, const uint8_t *newname,
                               uint16_t esclassid) {
  return sclass_univ_rename_entry(oldnleng, oldname, newnleng, newname,
                                  esclassid);
}


x86 assembly (clang, -O0):
<sclass_mr_rename_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    -0x24(%rbp),%r8d
call   1030 <sclass_univ_rename_entry@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sclass_mr_rename_entry>:
jmp    1030 <sclass_univ_rename_entry@plt>

LLVM IR (-O0):
define i32 @sclass_mr_rename_entry(i32 %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32*
%10 = alloca i32
store i32 %0, i32* %6
store i32* %1, i32** %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32*, i32** %7
%13 = load i32, i32* %8
%14 = load i32*, i32** %9
%15 = load i32, i32* %10
%16 = call i32 @sclass_univ_rename_entry(i32 %11, i32* %12, i32 %13, i32* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @sclass_mr_rename_entry(i32 %0, i32* %1, i32 %2, i32* %3, i32 %4) {
%6 = tail call i32 @sclass_univ_rename_entry(i32 %0, i32* %1, i32 %2, i32* %3, i32 %4)
ret i32 %6
}
int test1(void) {
  goto test1a;
  int x = 0;
test1a:
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @test1() {
ret i32 undef
}
void longchar(l, s) long l;
unsigned char *s;
{
  int I;
  for (I = 0; I < 4; ++I) {
    s[I] = l % 256;
    l = l / 256;
  }
  return;
}


x86 assembly (clang, -O0):
<longchar>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jge    1156 <longchar+0x56>
mov    -0x8(%rbp),%rax
mov    $0x100,%ecx
cqto
idiv   %rcx
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
mov    $0x100,%ecx
cqto
idiv   %rcx
mov    %rax,-0x8(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <longchar+0x13>
pop    %rbp
ret

x86 assembly (clang, -O2):
<longchar>:
mov    %dil,(%rsi)
lea    0xff(%rdi),%eax
lea    0xffff(%rdi),%ecx
lea    0xffffff(%rdi),%edx
test   %rdi,%rdi
cmovns %rdi,%rax
mov    %ah,0x1(%rsi)
cmovns %rdi,%rcx
cmovns %rdi,%rdx
shr    $0x10,%rcx
mov    %cl,0x2(%rsi)
shr    $0x18,%rdx
mov    %dl,0x3(%rsi)
ret

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

LLVM IR (-O2):
define void @longchar(i64 %0, i8* nocapture writeonly %1) {
%3 = trunc i64 %0 to i8
store i8 %3, i8* %1
%4 = sdiv i64 %0, 256
%5 = trunc i64 %4 to i8
%6 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %6
%7 = sdiv i64 %0, 65536
%8 = trunc i64 %7 to i8
%9 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %8, i8* %9
%10 = sdiv i64 %0, 16777216
%11 = trunc i64 %10 to i8
%12 = getelementptr inbounds i8, i8* %1, i64 3
store i8 %11, i8* %12
ret void
}
void ScaleRowDown4_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ScaleRowDown4_Any_NEON() {
ret void
}
int ucd_cell_nlist_size(int cell_type) {
  return cell_type + (int)(cell_type < 4 || cell_type == 7);
}


x86 assembly (clang, -O0):
<ucd_cell_nlist_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x1,%al
cmpl   $0x4,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <ucd_cell_nlist_size+0x26>
cmpl   $0x7,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x5(%rbp),%cl
and    $0x1,%cl
movzbl %cl,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucd_cell_nlist_size>:
cmp    $0x4,%edi
setl   %al
cmp    $0x7,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @ucd_cell_nlist_size(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 4
br i1 %5, label %9, label %6
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 7
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ true, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
%12 = add nsw i32 %3, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @ucd_cell_nlist_size(i32 %0) {
%2 = icmp slt i32 %0, 4
%3 = icmp eq i32 %0, 7
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
%6 = add nsw i32 %5, %0
ret i32 %6
}
/* Variables and functions */
scalar_t__ alloca(int);
int /*<<< orphan*/ test12a(char *);
void __attribute__((no)) test12(void) {
  char *save = (char *)alloca(4);
  test12a(save);
}


x86 assembly (clang, -O0):
<test12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <test12a@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test12>:
push   %rax
mov    $0x4,%edi
call   1030 <alloca@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <test12a@plt>

LLVM IR (-O0):
define void @test12() {
%1 = alloca i8*
%2 = call i64 @alloca(i32 4)
%3 = inttoptr i64 %2 to i8*
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = call i32 @test12a(i8* %4)
ret void
}

LLVM IR (-O2):
define void @test12() {
%1 = tail call i64 @alloca(i32 4)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32 @test12a(i8* %2)
ret void
}
void zombiecollect(void) {
  while (0 > 0)
    ;
}


x86 assembly (clang, -O0):
<zombiecollect>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <zombiecollect+0x9>
xor    %eax,%eax
test   $0x1,%al
jne    1118 <zombiecollect+0x18>
jmp    111d <zombiecollect+0x1d>
jmp    1109 <zombiecollect+0x9>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @zombiecollect() {
br label %1
1: ; preds = %2, %0
br i1 false, label %2, label %3
2: ; preds = %1
br label %1
3: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @zombiecollect() {
ret void
}
/* Variables and functions */
float fastersin(float);
float fastersinfull(float x) {
  static const float twopi = 6.2831853071795865f;
  static const float invtwopi = 0.15915494309189534f;
  int k = x * invtwopi;
  float half = (x < 0) ? -0.5f : 0.5f;
  return fastersin((half + k) * twopi - x);
}


x86 assembly (clang, -O0):
<fastersinfull>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xee7(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xec6(%rip),%xmm3
movss  0xec2(%rip),%xmm2
xorps  %xmm1,%xmm1
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtsi2ssl -0x8(%rbp),%xmm1
addss  %xmm1,%xmm0
movss  -0x4(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
movss  0xe79(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <fastersin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastersinfull>:
xorps  %xmm1,%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
seta   %al
movss  0xedd(%rip),%xmm1
mulss  %xmm0,%xmm1
cvttps2dq %xmm1,%xmm1
cvtdq2ps %xmm1,%xmm1
lea    0xed3(%rip),%rcx
addss  (%rcx,%rax,4),%xmm1
mulss  0xec2(%rip),%xmm1
subss  %xmm0,%xmm1
movaps %xmm1,%xmm0
jmp    1030 <fastersin@plt>

LLVM IR (-O0):
@fastersinfull.twopi = internal constant float 0x401921FB60000000
@fastersinfull.invtwopi = internal constant float 0x3FC45F3060000000
define float @fastersinfull(float %0) {
%2 = alloca float
%3 = alloca i32
%4 = alloca float
store float %0, float* %2
%5 = load float, float* %2
%6 = fmul float %5, 0x3FC45F3060000000
%7 = fptosi float %6 to i32
store i32 %7, i32* %3
%8 = load float, float* %2
%9 = fcmp olt float %8, 0.000000e+00
%10 = zext i1 %9 to i64
%11 = select i1 %9, float -5.000000e-01, float 5.000000e-01
store float %11, float* %4
%12 = load float, float* %4
%13 = load i32, i32* %3
%14 = sitofp i32 %13 to float
%15 = fadd float %12, %14
%16 = load float, float* %2
%17 = fneg float %16
%18 = call float @llvm.fmuladd.f32(float %15, float 0x401921FB60000000, float %17)
%19 = call float @fastersin(float %18)
ret float %19
}

LLVM IR (-O2):
define float @fastersinfull(float %0) {
%2 = fmul float %0, 0x3FC45F3060000000
%3 = fptosi float %2 to i32
%4 = fcmp olt float %0, 0.000000e+00
%5 = select i1 %4, float -5.000000e-01, float 5.000000e-01
%6 = sitofp i32 %3 to float
%7 = fadd float %5, %6
%8 = fneg float %0
%9 = tail call float @llvm.fmuladd.f32(float %7, float 0x401921FB60000000, float %8)
%10 = tail call float @fastersin(float %9)
ret float %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int SEEK_END;
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
int ftell(int /*<<< orphan*/ *);
int sfd_filesize(FILE *f) {
  int size, pos = ftell(f);
  fseek(f, 0, SEEK_END);
  size = ftell(f);
  fseek(f, 0, pos);
  return size;
}


x86 assembly (clang, -O0):
<sfd_filesize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ea5(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ftell@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%edx
xor    %esi,%esi
call   1040 <fseek@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sfd_filesize>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <ftell@plt>
mov    %eax,%r14d
mov    0x2eb2(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <fseek@plt>
mov    %rbx,%rdi
call   1030 <ftell@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14d,%edx
call   1040 <fseek@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_END = global i32 0
define i32 @sfd_filesize(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @ftell(i32* %5)
store i32 %6, i32* %4
%7 = load i32*, i32** %2
%8 = load i32, i32* @SEEK_END
%9 = call i32 @fseek(i32* %7, i32 0, i32 %8)
%10 = load i32*, i32** %2
%11 = call i32 @ftell(i32* %10)
store i32 %11, i32* %3
%12 = load i32*, i32** %2
%13 = load i32, i32* %4
%14 = call i32 @fseek(i32* %12, i32 0, i32 %13)
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i32 @sfd_filesize(i32* nocapture %0) {
%2 = tail call i32 @ftell(i32* %0)
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @fseek(i32* %0, i32 0, i32 %3)
%5 = tail call i32 @ftell(i32* %0)
%6 = tail call i32 @fseek(i32* %0, i32 0, i32 %2)
ret i32 %5
}
int fii() {}


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

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

LLVM IR (-O0):
define i32 @fii() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @fii() {
ret i32 undef
}
/* Type definitions */
struct boxed_value {
  int dummy;
};

/* Variables and functions */
struct boxed_value *blts_config_boxed_value_new_string_take(int /*<<< orphan*/);
int /*<<< orphan*/ strdup(char *);
struct boxed_value *blts_config_boxed_value_new_string(char *v) {
  return blts_config_boxed_value_new_string_take(strdup(v));
}


x86 assembly (clang, -O0):
<blts_config_boxed_value_new_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %eax,%edi
call   1030 <blts_config_boxed_value_new_string_take@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blts_config_boxed_value_new_string>:
push   %rax
call   1040 <strdup@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <blts_config_boxed_value_new_string_take@plt>

LLVM IR (-O0):
%struct.boxed_value = type { i32 }
define %struct.boxed_value* @blts_config_boxed_value_new_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strdup(i8* %3)
%5 = call %struct.boxed_value* @blts_config_boxed_value_new_string_take(i32 %4)
ret %struct.boxed_value* %5
}

LLVM IR (-O2):
%struct.boxed_value = type { i32 }
define %struct.boxed_value* @blts_config_boxed_value_new_string(i8* %0) {
%2 = tail call i32 @strdup(i8* %0)
%3 = tail call %struct.boxed_value* @blts_config_boxed_value_new_string_take(i32 %2)
ret %struct.boxed_value* %3
}
/* Variables and functions */
int /*<<< orphan*/ AT_FDCWD;
int /*<<< orphan*/ AT_REMOVEDIR;
int /*<<< orphan*/ __NR_unlinkat;
int syscall(int /*<<< orphan*/, int /*<<< orphan*/, char const *,
            int /*<<< orphan*/);
__attribute__((always_)) int _syscall_rmdir(const char *pathname) {
  return syscall(__NR_unlinkat, AT_FDCWD, pathname, AT_REMOVEDIR);
}


x86 assembly (clang, -O0):
<_syscall_rmdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    0x2e9f(%rip),%rax
mov    (%rax),%ecx
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_rmdir>:
mov    %rdi,%rdx
mov    0x2ece(%rip),%rax
mov    (%rax),%edi
mov    0x2ea5(%rip),%rax
mov    (%rax),%esi
mov    0x2eac(%rip),%rax
mov    (%rax),%ecx
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@__NR_unlinkat = global i32 0
@AT_FDCWD = global i32 0
@AT_REMOVEDIR = global i32 0
define i32 @_syscall_rmdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @__NR_unlinkat
%4 = load i32, i32* @AT_FDCWD
%5 = load i8*, i8** %2
%6 = load i32, i32* @AT_REMOVEDIR
%7 = call i32 @syscall(i32 %3, i32 %4, i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@__NR_unlinkat = global i32 0
@AT_FDCWD = global i32 0
@AT_REMOVEDIR = global i32 0
define i32 @_syscall_rmdir(i8* %0) {
%2 = load i32, i32* @__NR_unlinkat
%3 = load i32, i32* @AT_FDCWD
%4 = load i32, i32* @AT_REMOVEDIR
%5 = tail call i32 @syscall(i32 %2, i32 %3, i8* %0, i32 %4)
ret i32 %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
bool pes_validate(const uint8_t *p_pes) {
  return (p_pes[0] == 0x0 && p_pes[1] == 0x0 && p_pes[2] == 0x1 &&
          p_pes[3] >= 0xbc);
}


x86 assembly (clang, -O0):
<pes_validate>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
jne    1151 <pes_validate+0x51>
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,0x4(%rcx)
mov    %al,-0x9(%rbp)
jne    1151 <pes_validate+0x51>
mov    -0x8(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x1,0x8(%rcx)
mov    %al,-0x9(%rbp)
jne    1151 <pes_validate+0x51>
mov    -0x8(%rbp),%rax
cmpl   $0xbc,0xc(%rax)
setge  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pes_validate>:
xor    %eax,%eax
cmpl   $0x0,(%rdi)
je     1108 <pes_validate+0x8>
ret
cmpl   $0x0,0x4(%rdi)
jne    1107 <pes_validate+0x7>
cmpl   $0x1,0x8(%rdi)
jne    1107 <pes_validate+0x7>
xor    %eax,%eax
cmpl   $0xbc,0xc(%rdi)
setge  %al
ret

LLVM IR (-O0):
define i32 @pes_validate(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %22
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %22
12: ; preds = %7
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = load i32*, i32** %2
%19 = getelementptr inbounds i32, i32* %18, i64 3
%20 = load i32, i32* %19
%21 = icmp sge i32 %20, 188
br label %22
22: ; preds = %17, %12, %7, %1
%23 = phi i1 [ false, %12 ], [ false, %7 ], [ false, %1 ], [ %21, %17 ]
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @pes_validate(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %17
4: ; preds = %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %17
8: ; preds = %4
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = getelementptr inbounds i32, i32* %0, i64 3
%14 = load i32, i32* %13
%15 = icmp sgt i32 %14, 187
%16 = zext i1 %15 to i32
br label %17
17: ; preds = %12, %8, %4, %1
%18 = phi i32 [ 0, %8 ], [ 0, %4 ], [ 0, %1 ], [ %16, %12 ]
ret i32 %18
}
/* Variables and functions */
scalar_t__ VIM_HAPI_StopCapture();
unsigned long V5H_Capture_MultiFrame_Stop(void) {
  { return ((unsigned short)VIM_HAPI_StopCapture()); }
}


x86 assembly (clang, -O0):
<V5H_Capture_MultiFrame_Stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <VIM_HAPI_StopCapture@plt>
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<V5H_Capture_MultiFrame_Stop>:
push   %rax
xor    %eax,%eax
call   1030 <VIM_HAPI_StopCapture@plt>
movzwl %ax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @V5H_Capture_MultiFrame_Stop() {
%1 = call i64 (...) @VIM_HAPI_StopCapture()
%2 = trunc i64 %1 to i16
%3 = zext i16 %2 to i64
ret i64 %3
}

LLVM IR (-O2):
define i64 @V5H_Capture_MultiFrame_Stop() {
%1 = tail call i64 (...) @VIM_HAPI_StopCapture()
%2 = and i64 %1, 65535
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ testforty_state_push(char *, void *);
void testforty_state_push_two(void *context) {
  testforty_state_push("TWO", context);
}


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

x86 assembly (clang, -O2):
<testforty_state_push_two>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <testforty_state_push@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"TWO\00"
define void @testforty_state_push_two(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @testforty_state_push(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"TWO\00"
define void @testforty_state_push_two(i8* %0) {
%2 = tail call i32 @testforty_state_push(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
volatile unsigned int *led_init() {
  volatile unsigned int *gpio = (unsigned int *)0x3F200000;
  gpio[4] |= (1 << 21);
  return gpio;
}


x86 assembly (clang, -O0):
<led_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f200000,%eax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%ecx
or     $0x200000,%ecx
mov    %ecx,0x10(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<led_init>:
orl    $0x200000,0x3f200010
mov    $0x3f200000,%eax
ret

LLVM IR (-O0):
define i32* @led_init() {
%1 = alloca i32*
store i32* inttoptr (i64 1059061760 to i32*), i32** %1
%2 = load i32*, i32** %1
%3 = getelementptr inbounds i32, i32* %2, i64 4
%4 = load volatile i32, i32* %3
%5 = or i32 %4, 2097152
store volatile i32 %5, i32* %3
%6 = load i32*, i32** %1
ret i32* %6
}

LLVM IR (-O2):
define i32* @led_init() {
%1 = load volatile i32, i32* inttoptr (i64 1059061776 to i32*)
%2 = or i32 %1, 2097152
store volatile i32 %2, i32* inttoptr (i64 1059061776 to i32*)
ret i32* inttoptr (i64 1059061760 to i32*)
}