xunge/DecIR huggingface dataset:
void g_date_add_months() {}


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

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

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

LLVM IR (-O2):
define void @g_date_add_months() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getpid();
int waitpid(int /*<<< orphan*/, int *, int);
int bad_waitpid(void *addr) { return waitpid(getpid(), (int *)addr, (int)0); }


x86 assembly (clang, -O0):
<bad_waitpid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1040 <waitpid@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bad_waitpid>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %eax,%edi
mov    %rbx,%rsi
xor    %edx,%edx
pop    %rbx
jmp    1040 <waitpid@plt>

LLVM IR (-O0):
define i32 @bad_waitpid(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @getpid()
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = call i32 @waitpid(i32 %3, i32* %5, i32 0)
ret i32 %6
}

LLVM IR (-O2):
define i32 @bad_waitpid(i8* %0) {
%2 = tail call i32 (...) @getpid()
%3 = bitcast i8* %0 to i32*
%4 = tail call i32 @waitpid(i32 %2, i32* %3, i32 0)
ret i32 %4
}
int *reverse_array(int *array, int array_size) {}


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

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

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

LLVM IR (-O2):
define noalias i32* @reverse_array(i32* nocapture readnone %0, i32 %1) {
ret i32* undef
}
int main(int argc, char **argv) {
  static int x;
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2f0c(%rip),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@main.x = internal global i32 0
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 = load i32, i32* @main.x
ret i32 %6
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
char *strsep(char **, char const *);
char *strtok(char *s, const char *delim) {
  static char *holder;
  if (s)
    holder = s;
  return strsep(&holder, delim);
}


x86 assembly (clang, -O0):
<strtok>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1136 <strtok+0x26>
mov    -0x8(%rbp),%rax
mov    %rax,0x2efa(%rip)
mov    -0x10(%rbp),%rsi
lea    0x2eef(%rip),%rdi
call   1030 <strsep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtok>:
test   %rdi,%rdi
je     111c <strtok+0xc>
mov    %rdi,0x2f14(%rip)
lea    0x2f0d(%rip),%rdi
jmp    1030 <strsep@plt>

LLVM IR (-O0):
@strtok.holder = internal global i8* null
define i8* @strtok(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* %5, null
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = load i8*, i8** %3
store i8* %8, i8** @strtok.holder
br label %9
9: ; preds = %7, %2
%10 = load i8*, i8** %4
%11 = call i8* @strsep(i8** @strtok.holder, i8* %10)
ret i8* %11
}

LLVM IR (-O2):
@strtok.holder = internal global i8* null
define i8* @strtok(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %5, label %4
4: ; preds = %2
store i8* %0, i8** @strtok.holder
br label %5
5: ; preds = %4, %2
%6 = tail call i8* @strsep(i8** @strtok.holder, i8* %1)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void func1() {
  int i;
  if (i < 5) {
    printf("1\n");
    exit(0);
  }
  printf("2\n");
  return;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x5,-0x4(%rbp)
jge    1145 <func1+0x25>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"1\0A\00"
@.str.1 = [3 x i8] c"2\0A\00"
define void @func1() {
%1 = alloca i32
%2 = load i32, i32* %1
%3 = icmp slt i32 %2, 5
br i1 %3, label %4, label %7
4: ; preds = %0
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @exit(i32 0)
unreachable
7: ; preds = %0
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
ret void
}

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


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

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

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

LLVM IR (-O2):
define void @gtk_tree_model_get_type() {
ret void
}
/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int, int);
int /*<<< orphan*/ pthread_self();
void *myfuc(void *parm) {
  int *par = (int *)parm;
  printf("thread id = %lx, pid = %d, parm = %d\n", pthread_self(),
         (int)getpid(), *par);
  return NULL;
}


x86 assembly (clang, -O0):
<myfuc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myfuc>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %eax,%eax
call   1050 <pthread_self@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1030 <getpid@plt>
mov    (%rbx),%ecx
lea    0xeb1(%rip),%rdi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [38 x i8] c"thread id = %lx, pid = %d, parm = %d\0A\00"
define i8* @myfuc(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
store i32* %5, i32** %3
%6 = call i32 (...) @pthread_self()
%7 = call i64 (...) @getpid()
%8 = trunc i64 %7 to i32
%9 = load i32*, i32** %3
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %8, i32 %10)
ret i8* null
}

LLVM IR (-O2):
@.str = [38 x i8] c"thread id = %lx, pid = %d, parm = %d\0A\00"
define noalias i8* @myfuc(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 (...) @pthread_self()
%4 = tail call i64 (...) @getpid()
%5 = trunc i64 %4 to i32
%6 = load i32, i32* %2
%7 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5, i32 %6)
ret i8* null
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ Machine_Check(int, char *);
int32_t get_word(int32_t id, int32_t addr) {
  Machine_Check(0x00000008 | 0x00000002, "pio_term registers are byte wide");
  return 0;
}


x86 assembly (clang, -O0):
<get_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xa,%edi
lea    0xed6(%rip),%rsi
call   1030 <Machine_Check@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_word>:
push   %rax
lea    0xee8(%rip),%rsi
mov    $0xa,%edi
call   1030 <Machine_Check@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [33 x i8] c"pio_term registers are byte wide\00"
define i32 @get_word(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @Machine_Check(i32 10, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [33 x i8] c"pio_term registers are byte wide\00"
define i32 @get_word(i32 %0, i32 %1) {
%3 = tail call i32 @Machine_Check(i32 10, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void HostEnd() {}


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

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

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

LLVM IR (-O2):
define void @HostEnd() {
ret void
}
void vector_multiply3(double a[3], double b[3], double m[3]) {
  for (int i = 0; i < 3; ++i) {
    m[i] = a[i] * b[i];
  }
}


x86 assembly (clang, -O0):
<vector_multiply3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x3,-0x1c(%rbp)
jge    1156 <vector_multiply3+0x56>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mulsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <vector_multiply3+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<vector_multiply3>:
movsd  (%rdi),%xmm0
mulsd  (%rsi),%xmm0
movsd  %xmm0,(%rdx)
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  %xmm0,0x8(%rdx)
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
movsd  %xmm0,0x10(%rdx)
ret

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

LLVM IR (-O2):
define void @vector_multiply3(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = fmul double %4, %5
store double %6, double* %2
%7 = getelementptr inbounds double, double* %0, i64 1
%8 = load double, double* %7
%9 = getelementptr inbounds double, double* %1, i64 1
%10 = load double, double* %9
%11 = fmul double %8, %10
%12 = getelementptr inbounds double, double* %2, i64 1
store double %11, double* %12
%13 = getelementptr inbounds double, double* %0, i64 2
%14 = load double, double* %13
%15 = getelementptr inbounds double, double* %1, i64 2
%16 = load double, double* %15
%17 = fmul double %14, %16
%18 = getelementptr inbounds double, double* %2, i64 2
store double %17, double* %18
ret void
}
/* Type definitions */
struct buffer {
  int dummy;
};

/* Variables and functions */
scalar_t__ buffer_size(struct buffer const *);
bool buffer_empty(const struct buffer *__restrict buf) {
  return buffer_size(buf) == 0;
}


x86 assembly (clang, -O0):
<buffer_empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <buffer_size@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buffer_empty>:
push   %rax
call   1030 <buffer_size@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.buffer = type { i32 }
define i32 @buffer_empty(%struct.buffer* noalias %0) {
%2 = alloca %struct.buffer*
store %struct.buffer* %0, %struct.buffer** %2
%3 = load %struct.buffer*, %struct.buffer** %2
%4 = call i64 @buffer_size(%struct.buffer* %3)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
%struct.buffer = type { i32 }
define i32 @buffer_empty(%struct.buffer* noalias %0) {
%2 = tail call i64 @buffer_size(%struct.buffer* %0)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void Dico_String_Stop(int nb_consts) {}


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

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

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

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

/* Variables and functions */
int bme_packet_read(int /*<<< orphan*/, void *, int);
int bme_read(int32_t sd, void *msg, int bytes) {
  return bme_packet_read(sd, msg, bytes);
}


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

x86 assembly (clang, -O2):
<bme_read>:
jmp    1030 <bme_packet_read@plt>

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

LLVM IR (-O2):
define i32 @bme_read(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @bme_packet_read(i32 %0, i8* %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
float rand();
float uniform(float a, float b) { return rand() * (b - a) + a; }


x86 assembly (clang, -O0):
<uniform>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
movss  -0x4(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniform>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
movss  (%rsp),%xmm1
movss  0x4(%rsp),%xmm2
subss  %xmm1,%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @uniform(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = call float (...) @rand()
%6 = load float, float* %4
%7 = load float, float* %3
%8 = fsub float %6, %7
%9 = load float, float* %3
%10 = call float @llvm.fmuladd.f32(float %5, float %8, float %9)
ret float %10
}

LLVM IR (-O2):
define float @uniform(float %0, float %1) {
%3 = tail call float (...) @rand()
%4 = fsub float %1, %0
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float %0)
ret float %5
}
void foo_1_2_2_2_2_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_1_2_2_2_2_1_2_1_1() {
ret void
}
void av_expr_parse() {}


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

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

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

LLVM IR (-O2):
define void @av_expr_parse() {
ret void
}
void g_hook_list_clear() {}


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

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

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

LLVM IR (-O2):
define void @g_hook_list_clear() {
ret void
}
int test_imm_A9int8_mem(signed char *val) {
  return ((*val) & (0xA9 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A9int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0xa9,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A9int8_mem>:
testb  $0xa9,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_A9int8_mem(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = and i32 %5, 169
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_A9int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -87
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void gdk_image_set_colormap() {}


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

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

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

LLVM IR (-O2):
define void @gdk_image_set_colormap() {
ret void
}
double doublemod(double a, double b) {
  int i;
  double value;
  i = (int)a / b;
  value = a - i * b;
  return value;
}


x86 assembly (clang, -O0):
<doublemod>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
cvttsd2si -0x8(%rbp),%eax
cvtsi2sd %eax,%xmm0
divsd  -0x10(%rbp),%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm1
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<doublemod>:
cvttpd2dq %xmm0,%xmm2
cvtdq2pd %xmm2,%xmm2
divsd  %xmm1,%xmm2
cvttpd2dq %xmm2,%xmm2
cvtdq2pd %xmm2,%xmm2
mulsd  %xmm1,%xmm2
subsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @doublemod(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca i32
%6 = alloca double
store double %0, double* %3
store double %1, double* %4
%7 = load double, double* %3
%8 = fptosi double %7 to i32
%9 = sitofp i32 %8 to double
%10 = load double, double* %4
%11 = fdiv double %9, %10
%12 = fptosi double %11 to i32
store i32 %12, i32* %5
%13 = load double, double* %3
%14 = load i32, i32* %5
%15 = sitofp i32 %14 to double
%16 = load double, double* %4
%17 = fneg double %15
%18 = call double @llvm.fmuladd.f64(double %17, double %16, double %13)
store double %18, double* %6
%19 = load double, double* %6
ret double %19
}

LLVM IR (-O2):
define double @doublemod(double %0, double %1) {
%3 = fptosi double %0 to i32
%4 = sitofp i32 %3 to double
%5 = fdiv double %4, %1
%6 = fptosi double %5 to i32
%7 = sitofp i32 %6 to double
%8 = fneg double %7
%9 = tail call double @llvm.fmuladd.f64(double %8, double %1, double %0)
ret double %9
}
void remove(file) char *file;
{ unlink(file); }


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

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

LLVM IR (-O0):
define void @remove(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %3)
ret void
}

LLVM IR (-O2):
define void @remove(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @unlink to i32 (i8*, ...)*)(i8* %0)
ret void
}
struct {
  float a[1];
} f24(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<f24>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <f24+0x9>
jmp    1109 <f24+0x9>

x86 assembly (clang, -O2):
<f24>:
jmp    1100 <f24>

LLVM IR (-O0):
define float @f24() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define float @f24() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
scalar_t__ mkfifo(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int make_fifo(const char *pathname, mode_t mode) {
  if (mkfifo(pathname, mode) < 0) {
    fprintf(stderr, "cannot create FIFO %s: %m\n", pathname);
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<make_fifo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1040 <mkfifo@plt>
cmp    $0x0,%rax
jge    116a <make_fifo+0x4a>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xea7(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1171 <make_fifo+0x51>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_fifo>:
push   %rbx
mov    %rdi,%rbx
call   1040 <mkfifo@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
js     1138 <make_fifo+0x18>
pop    %rbx
ret
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [27 x i8] c"cannot create FIFO %s: %m\0A\00"
define i32 @make_fifo(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
%6 = load i8*, i8** %4
%7 = load i32, i32* %5
%8 = call i64 @mkfifo(i8* %6, i32 %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %14
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %4
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %12)
store i32 0, i32* %3
br label %15
14: ; preds = %2
store i32 1, i32* %3
br label %15
15: ; preds = %14, %10
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"cannot create FIFO %s: %m\0A\00"
define i32 @make_fifo(i8* %0, i32 %1) {
%3 = tail call i64 @mkfifo(i8* %0, i32 %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %2, %5
%9 = phi i32 [ 0, %5 ], [ 1, %2 ]
ret i32 %9
}
void fc14(int n) {
  goto a;
  {
    typedef int(*b)[n];
    {
      typedef int(*c)[n];
      0;
    }
    {
      typedef int(*d)[n];
      0;
    };
    typedef int(*e)[n];
    0;
  };
  {
    typedef int(*f)[n];
    {
      typedef int(*g)[n];
      0;
    };
    {
      typedef int(*h)[n];
      0;
    };
    ;
    typedef int(*i)[n];
    0;
  };
a:;
  typedef int(*j)[n];
  0;
}


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

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

LLVM IR (-O0):
define void @fc14(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %20
3: ; No predecessors!
%4 = load i32, i32* %2
%5 = zext i32 %4 to i64
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = load i32, i32* %2
%11 = zext i32 %10 to i64
%12 = load i32, i32* %2
%13 = zext i32 %12 to i64
%14 = load i32, i32* %2
%15 = zext i32 %14 to i64
%16 = load i32, i32* %2
%17 = zext i32 %16 to i64
%18 = load i32, i32* %2
%19 = zext i32 %18 to i64
br label %20
20: ; preds = %3, %1
%21 = load i32, i32* %2
%22 = zext i32 %21 to i64
ret void
}

LLVM IR (-O2):
define void @fc14(i32 %0) {
ret void
}
void foo690(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo690(i32 %0) {
ret void
}
/* Variables and functions */
int write(int, int *, int);
int putchar(int ch) {
  return write(1, &ch, 1);
  return 0;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edx
lea    -0x4(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @putchar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @write(i32 1, i32* %2, i32 1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_apcmd_cfg_80211d_usage(void) {
  printf("\nUsage: cfg_80211d <state 0/1> <country Country_code> \n");
  return;
}


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

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

LLVM IR (-O0):
@.str = [56 x i8] c"\0AUsage: cfg_80211d <state 0/1> <country Country_code> \0A\00"
define void @print_apcmd_cfg_80211d_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [55 x i8] c"\0AUsage: cfg_80211d <state 0/1> <country Country_code> \00"
define void @print_apcmd_cfg_80211d_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nsc_assert(int);
void ttymodem(void) {
  nsc_assert(0 && "This function is unimplemented.");
  ;
}


x86 assembly (clang, -O0):
<ttymodem>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ttymodem>:
xor    %edi,%edi
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
define void @ttymodem() {
%1 = call i32 @nsc_assert(i32 0)
ret void
}

LLVM IR (-O2):
define void @ttymodem() {
%1 = tail call i32 @nsc_assert(i32 0)
ret void
}
/* Variables and functions */
int ft_is_prime(int);
int ft_find_next_prime(int nb) {
  int temp;
  temp = ft_is_prime(nb);
  if (temp == 1)
    return (nb);
  while (1) {
    nb++;
    temp = ft_is_prime(nb);
    if (temp == 1)
      return (nb);
  }
}


x86 assembly (clang, -O0):
<ft_find_next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <ft_is_prime@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    113b <ft_find_next_prime+0x2b>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <ft_find_next_prime+0x5e>
jmp    1140 <ft_find_next_prime+0x30>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <ft_is_prime@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1169 <ft_find_next_prime+0x59>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116e <ft_find_next_prime+0x5e>
jmp    1140 <ft_find_next_prime+0x30>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_find_next_prime>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
call   1030 <ft_is_prime@plt>
cmp    $0x1,%eax
je     1131 <ft_find_next_prime+0x21>
add    $0x1,%ebx
mov    %ebx,%edi
jmp    1120 <ft_find_next_prime+0x10>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ft_find_next_prime(i32 %0) {
%2 = tail call i32 @ft_is_prime(i32 %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %9, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %6, %4 ], [ %0, %1 ]
%6 = add nsw i32 %5, 1
%7 = tail call i32 @ft_is_prime(i32 %6)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = phi i32 [ %0, %1 ], [ %6, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ outl(unsigned int, int);
int /*<<< orphan*/ slow_down_io();
void outl_p(unsigned int value, int port) {
  outl(value, port);
  slow_down_io();
}


x86 assembly (clang, -O0):
<outl_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <outl@plt>
mov    $0x0,%al
call   1040 <slow_down_io@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @outl_p(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @outl(i32 %5, i32 %6)
%8 = call i32 (...) @slow_down_io()
ret void
}

LLVM IR (-O2):
define void @outl_p(i32 %0, i32 %1) {
%3 = tail call i32 @outl(i32 %0, i32 %1)
%4 = tail call i32 (...) @slow_down_io()
ret void
}
void ff_hevc_put_hevc_bi_qpel_hv64_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_hv64_8_sse4() {
ret void
}
int ueld_os_umount_all() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @ueld_os_umount_all() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_src(char *);
void quit_handler(void) { write_src("exit(EXIT_SUCCESS);\n"); }


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"exit(EXIT_SUCCESS);\0A\00"
define void @quit_handler() {
%1 = call i32 @write_src(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"exit(EXIT_SUCCESS);\0A\00"
define void @quit_handler() {
%1 = tail call i32 @write_src(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret void
}
void PGMPhysWriteGCPtr(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ avl_remove(struct avl_tree *, struct avl_node *);
__attribute__((always_)) void __attribute__((deprecated))
avl_delete(struct avl_tree *tree, struct avl_node *node) {
  avl_remove(tree, node);
}


x86 assembly (clang, -O0):
<avl_delete>:
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 <avl_remove@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<avl_delete>:
jmp    1030 <avl_remove@plt>

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

LLVM IR (-O2):
%struct.avl_tree = type { i32 }
%struct.avl_node = type { i32 }
define void @avl_delete(%struct.avl_tree* %0, %struct.avl_node* %1) {
%3 = tail call i32 @avl_remove(%struct.avl_tree* %0, %struct.avl_node* %1)
ret void
}
/* Type definitions */
struct symbol {
  int dummy;
};
struct expression {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ internal_warning(char *);
struct symbol *symbol_generic(char *);
struct symbol *struct_unnamed_field(const struct expression *const_expr) {
  internal_warning("struct_unnamed_field not implemented");
  return symbol_generic("struct.unnamed");
}


x86 assembly (clang, -O0):
<struct_unnamed_field>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <internal_warning@plt>
lea    0xee6(%rip),%rdi
call   1030 <symbol_generic@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<struct_unnamed_field>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <internal_warning@plt>
lea    0xef1(%rip),%rdi
pop    %rax
jmp    1030 <symbol_generic@plt>

LLVM IR (-O0):
%struct.symbol = type { i32 }
%struct.expression = type { i32 }
@.str = [37 x i8] c"struct_unnamed_field not implemented\00"
@.str.1 = [15 x i8] c"struct.unnamed\00"
define %struct.symbol* @struct_unnamed_field(%struct.expression* %0) {
%2 = alloca %struct.expression*
store %struct.expression* %0, %struct.expression** %2
%3 = call i32 @internal_warning(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%4 = call %struct.symbol* @symbol_generic(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret %struct.symbol* %4
}

LLVM IR (-O2):
%struct.symbol = type { i32 }
%struct.expression = type { i32 }
@.str = [37 x i8] c"struct_unnamed_field not implemented\00"
@.str.1 = [15 x i8] c"struct.unnamed\00"
define %struct.symbol* @struct_unnamed_field(%struct.expression* nocapture readnone %0) {
%2 = tail call i32 @internal_warning(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%3 = tail call %struct.symbol* @symbol_generic(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
ret %struct.symbol* %3
}
void swap(char *a, char *c) {
  char temp;
  temp = *a;
  *a = *c;
  *c = temp;
}


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

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

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ IntDisable(int);
int /*<<< orphan*/ IntUnregister(int);
void EMACIntUnregister(uint32_t ui32Base) {
  IntDisable(56);
  IntUnregister(56);
}


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

x86 assembly (clang, -O2):
<EMACIntUnregister>:
push   %rax
mov    $0x38,%edi
call   1030 <IntDisable@plt>
mov    $0x38,%edi
pop    %rax
jmp    1040 <IntUnregister@plt>

LLVM IR (-O0):
define void @EMACIntUnregister(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @IntDisable(i32 56)
%4 = call i32 @IntUnregister(i32 56)
ret void
}

LLVM IR (-O2):
define void @EMACIntUnregister(i32 %0) {
%2 = tail call i32 @IntDisable(i32 56)
%3 = tail call i32 @IntUnregister(i32 56)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ draw_shoot_menu();
void render_shoot_menu() { draw_shoot_menu(); }


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

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

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

LLVM IR (-O2):
define void @render_shoot_menu() {
%1 = tail call i32 (...) @draw_shoot_menu()
ret void
}
/* Type definitions */
struct tree {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
struct tree **read_tree_pos();
void copy_node() {
  printf("from ");
  struct tree **from = read_tree_pos();
  printf("to ");
  struct tree **to = read_tree_pos();
  *to = *from;
}


x86 assembly (clang, -O0):
<copy_node>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <read_tree_pos@plt>
mov    %rax,-0x8(%rbp)
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <read_tree_pos@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_node>:
push   %rbx
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <read_tree_pos@plt>
mov    %rax,%rbx
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <read_tree_pos@plt>
mov    (%rbx),%rcx
mov    %rcx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
%struct.tree = type { i32 }
@.str = [6 x i8] c"from \00"
@.str.1 = [4 x i8] c"to \00"
define void @copy_node() {
%1 = alloca %struct.tree**
%2 = alloca %struct.tree**
%3 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%4 = call %struct.tree** (...) @read_tree_pos()
store %struct.tree** %4, %struct.tree*** %1
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%6 = call %struct.tree** (...) @read_tree_pos()
store %struct.tree** %6, %struct.tree*** %2
%7 = load %struct.tree**, %struct.tree*** %1
%8 = load %struct.tree*, %struct.tree** %7
%9 = load %struct.tree**, %struct.tree*** %2
store %struct.tree* %8, %struct.tree** %9
ret void
}

LLVM IR (-O2):
%struct.tree = type { i32 }
@.str = [6 x i8] c"from \00"
@.str.1 = [4 x i8] c"to \00"
define void @copy_node() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%2 = tail call %struct.tree** (...) @read_tree_pos()
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call %struct.tree** (...) @read_tree_pos()
%5 = load %struct.tree*, %struct.tree** %2
store %struct.tree* %5, %struct.tree** %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ findpair(int *, int, int);
void main() {
  int a[] = {3, 5, 6, 1, 7, 2};
  int len = sizeof(a) / sizeof(a[0]);
  findpair(a, len, 13);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
lea    -0x20(%rbp),%rdi
mov    -0x24(%rbp),%esi
mov    $0xd,%edx
call   1030 <findpair@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xef5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0xed9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x6,%esi
mov    $0xd,%edx
call   1030 <findpair@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.a = [6 x i32] [i32 3, i32 5, i32 6, i32 1, i32 7, i32 2]
define void @main() {
%1 = alloca [6 x i32]
%2 = alloca i32
%3 = bitcast [6 x i32]* %1 to i8*
store i32 6, i32* %2
%4 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @findpair(i32* %4, i32 %5, i32 13)
ret void
}

LLVM IR (-O2):
@__const.main.a = [6 x i32] [i32 3, i32 5, i32 6, i32 1, i32 7, i32 2]
define void @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = getelementptr inbounds [6 x i32], [6 x i32]* %1, i64 0, i64 0
%4 = call i32 @findpair(i32* %3, i32 6, i32 13)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_hex8(int, unsigned char);
void print_crit_hex8(unsigned char value) { __console_tx_hex8(2, value); }


x86 assembly (clang, -O0):
<print_crit_hex8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x2,%edi
movzbl -0x1(%rbp),%esi
call   1030 <__console_tx_hex8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_crit_hex8>:
mov    %edi,%esi
mov    $0x2,%edi
jmp    1030 <__console_tx_hex8@plt>

LLVM IR (-O0):
define void @print_crit_hex8(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @__console_tx_hex8(i32 2, i8 zeroext %3)
ret void
}

LLVM IR (-O2):
define void @print_crit_hex8(i8 zeroext %0) {
%2 = tail call i32 @__console_tx_hex8(i32 2, i8 zeroext %0)
ret void
}
void nmi(void) {}


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

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

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

LLVM IR (-O2):
define void @nmi() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lua_getparam(int);
char *lua_getstring(int /*<<< orphan*/);
int /*<<< orphan*/ lua_reportbug(char *);
void luaI_error(void) {
  char *s = lua_getstring(lua_getparam(1));
  if (s == 0)
    s = "(no message)";
  lua_reportbug(s);
}


x86 assembly (clang, -O0):
<luaI_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
call   1050 <lua_getparam@plt>
mov    %eax,%edi
call   1040 <lua_getstring@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1163 <luaI_error+0x33>
lea    0xea1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <lua_reportbug@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luaI_error>:
push   %rax
mov    $0x1,%edi
call   1050 <lua_getparam@plt>
mov    %eax,%edi
call   1040 <lua_getstring@plt>
test   %rax,%rax
lea    0xeb4(%rip),%rdi
cmovne %rax,%rdi
pop    %rax
jmp    1030 <lua_reportbug@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"(no message)\00"
define void @luaI_error() {
%1 = alloca i8*
%2 = call i32 @lua_getparam(i32 1)
%3 = call i8* @lua_getstring(i32 %2)
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %0
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8** %1
br label %7
7: ; preds = %6, %0
%8 = load i8*, i8** %1
%9 = call i32 @lua_reportbug(i8* %8)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"(no message)\00"
define void @luaI_error() {
%1 = tail call i32 @lua_getparam(i32 1)
%2 = tail call i8* @lua_getstring(i32 %1)
%3 = icmp eq i8* %2, null
%4 = select i1 %3, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %2
%5 = tail call i32 @lua_reportbug(i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint8_t;

/* Variables and functions */
uint8_t hfp_subevent_speaker_volume_get_gain(const uint8_t *event) {
  return event[4];
}


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

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

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

LLVM IR (-O2):
define i32 @hfp_subevent_speaker_volume_get_gain(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 4
%3 = load i32, i32* %2
ret i32 %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ cap_style;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
int get_XGCValues_cap_style(void *_p) {
  return (int)((XGCValues *)_p)->cap_style;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XGCValues_cap_style(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
unsigned long get_utime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  unsigned long time_in_micros = 1000000 * tv.tv_sec + tv.tv_usec;
  return time_in_micros;
}


x86 assembly (clang, -O0):
<get_utime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0xf4240,-0x8(%rbp),%eax
add    -0x4(%rbp),%eax
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_utime>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
movslq (%rsp),%rax
imul   $0xf4240,%rax,%rcx
movslq 0x4(%rsp),%rax
add    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i64 @get_utime() {
%1 = alloca %struct.timeval
%2 = alloca i64
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 1000000, %5
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
%10 = sext i32 %9 to i64
store i64 %10, i64* %2
%11 = load i64, i64* %2
ret i64 %11
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i64 @get_utime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = add nsw i32 %6, %8
%10 = sext i32 %9 to i64
ret i64 %10
}