xunge/DecIR huggingface dataset:
/* Variables and functions */
char *malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *_(char *s) {
  char *m = malloc(strlen(s) + 1);
  strcpy(m, s);
  return m;
}


x86 assembly (clang, -O0):
<_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @_(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @_(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
int vorbis_ftoi(double f) { return (int)(f + .5); }


x86 assembly (clang, -O0):
<vorbis_ftoi>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
addsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vorbis_ftoi>:
addsd  0xef8(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @vorbis_ftoi(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = fptosi double %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @vorbis_ftoi(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = fptosi double %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ free(char *);
char *last_rom_path();
int last_rom_exists() {
  char *path = last_rom_path();
  int re = access(path, R_OK) == 0;
  free(path);
  return re;
}


x86 assembly (clang, -O0):
<last_rom_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <last_rom_path@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e92(%rip),%rax
mov    (%rax),%esi
call   1040 <access@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<last_rom_exists>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <last_rom_path@plt>
mov    %rax,%rbx
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1040 <access@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@R_OK = global i32 0
define i32 @last_rom_exists() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i8* (...) @last_rom_path()
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = load i32, i32* @R_OK
%6 = call i64 @access(i8* %4, i32 %5)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
store i32 %8, i32* %2
%9 = load i8*, i8** %1
%10 = call i32 @free(i8* %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@R_OK = global i32 0
define i32 @last_rom_exists() {
%1 = tail call i8* (...) @last_rom_path()
%2 = load i32, i32* @R_OK
%3 = tail call i64 @access(i8* %1, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @free(i8* %1)
ret i32 %5
}
void Logging_log_callback(int channel_id, int line, int par1, int par2) {}


x86 assembly (clang, -O0):
<Logging_log_callback>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Logging_log_callback(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret void
}

LLVM IR (-O2):
define void @Logging_log_callback(i32 %0, i32 %1, i32 %2, i32 %3) {
ret void
}
int chip8_font_8x5_loc(char chr) { return (int)((chr & 0x0F) * 5); }


x86 assembly (clang, -O0):
<chip8_font_8x5_loc>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
imul   $0x5,%eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<chip8_font_8x5_loc>:
and    $0xf,%dil
movzbl %dil,%eax
lea    (%rax,%rax,4),%eax
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @chip8_font_8x5_loc(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 15
%6 = mul nsw i32 %5, 5
ret i32 %6
}

LLVM IR (-O2):
define i32 @chip8_font_8x5_loc(i8 signext %0) {
%2 = and i8 %0, 15
%3 = mul nuw nsw i8 %2, 5
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ write(int /*<<< orphan*/, char *, int);
void init_0(void) { write(STDOUT_FILENO, "DSO init array 0\n", 17); }


x86 assembly (clang, -O0):
<init_0>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ed5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
mov    $0x11,%edx
call   1030 <write@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_0>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
mov    $0x11,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
@.str = [18 x i8] c"DSO init array 0\0A\00"
define void @init_0() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = call i32 @write(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 17)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
@.str = [18 x i8] c"DSO init array 0\0A\00"
define void @init_0() {
%1 = load i32, i32* @STDOUT_FILENO
%2 = tail call i32 @write(i32 %1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 17)
ret void
}
/* Type definitions */
struct forf_env {
  int dummy;
};

/* Variables and functions */
long forf_pop_num(struct forf_env *);
int /*<<< orphan*/ forf_push_num(struct forf_env *, long);
void forf_proc_add(struct forf_env *env) {
  long a = forf_pop_num(env);
  long b = forf_pop_num(env);
  forf_push_num(env, b + a);
}


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

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

LLVM IR (-O0):
%struct.forf_env = type { i32 }
define void @forf_proc_add(%struct.forf_env* %0) {
%2 = alloca %struct.forf_env*
%3 = alloca i64
%4 = alloca i64
store %struct.forf_env* %0, %struct.forf_env** %2
%5 = load %struct.forf_env*, %struct.forf_env** %2
%6 = call i64 @forf_pop_num(%struct.forf_env* %5)
store i64 %6, i64* %3
%7 = load %struct.forf_env*, %struct.forf_env** %2
%8 = call i64 @forf_pop_num(%struct.forf_env* %7)
store i64 %8, i64* %4
%9 = load %struct.forf_env*, %struct.forf_env** %2
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = add nsw i64 %10, %11
%13 = call i32 @forf_push_num(%struct.forf_env* %9, i64 %12)
ret void
}

LLVM IR (-O2):
%struct.forf_env = type { i32 }
define void @forf_proc_add(%struct.forf_env* %0) {
%2 = tail call i64 @forf_pop_num(%struct.forf_env* %0)
%3 = tail call i64 @forf_pop_num(%struct.forf_env* %0)
%4 = add nsw i64 %3, %2
%5 = tail call i32 @forf_push_num(%struct.forf_env* %0, i64 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ non_existent(int);
__attribute__((__optimize__("O2"))) void hooray() { non_existent(1); }


x86 assembly (clang, -O0):
<hooray>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <non_existent@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hooray>:
mov    $0x1,%edi
jmp    1030 <non_existent@plt>

LLVM IR (-O0):
define void @hooray() {
%1 = call i32 @non_existent(i32 1)
ret void
}

LLVM IR (-O2):
define void @hooray() {
%1 = tail call i32 @non_existent(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ and_hl();
void opcode_a6() { and_hl(); }


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

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

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

LLVM IR (-O2):
define void @opcode_a6() {
%1 = tail call i32 (...) @and_hl()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printids(char *);
void *thr_fn(void *arg) {
  printids("new thread: ");
  return (void *)0;
}


x86 assembly (clang, -O0):
<thr_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
call   1030 <printids@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"new thread: \00"
define i8* @thr_fn(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printids(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [13 x i8] c"new thread: \00"
define noalias i8* @thr_fn(i8* nocapture readnone %0) {
%2 = tail call i32 @printids(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i8* null
}
void INT_Excep_PERIB_INTB153(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_PERIB_INTB153() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int nondet_int();
int main() {
  int i, j = nondet_int();
  i = 1;
  if (j > 0)
    j += i;
  assert(i != j);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <nondet_int@plt>
mov    %eax,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1153 <main+0x33>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <nondet_int@plt>
mov    $0x1,%edi
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (...) @nondet_int()
store i32 %4, i32* %3
store i32 1, i32* %2
%5 = load i32, i32* %3
%6 = icmp sgt i32 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %0
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = add nsw i32 %9, %8
store i32 %10, i32* %3
br label %11
11: ; preds = %7, %0
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp ne i32 %12, %13
%15 = zext i1 %14 to i32
%16 = call i32 @assert(i32 %15)
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @nondet_int()
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Type definitions */
struct minix_fs_dat {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ dounlink(struct minix_fs_dat *, char *);
void cmd_unlink(struct minix_fs_dat *fs, int argc, char **argv) {
  int i;
  for (i = 1; i < argc; i++) {
    dounlink(fs, argv[i]);
  }
}


x86 assembly (clang, -O0):
<cmd_unlink>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <cmd_unlink+0x49>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1030 <dounlink@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    112a <cmd_unlink+0x1a>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_unlink>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%esi
jl     1145 <cmd_unlink+0x35>
mov    %rdx,%r14
mov    %rdi,%r15
mov    %esi,%r12d
mov    $0x1,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rsi
mov    %r15,%rdi
call   1030 <dounlink@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <cmd_unlink+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
%struct.minix_fs_dat = type { i32 }
define void @cmd_unlink(%struct.minix_fs_dat* %0, i32 %1, i8** nocapture %2) {
%4 = icmp sgt i32 %1, 1
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 1, %5 ], [ %12, %7 ]
%9 = getelementptr inbounds i8*, i8** %2, i64 %8
%10 = load i8*, i8** %9
%11 = tail call i32 @dounlink(%struct.minix_fs_dat* %0, i8* %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}
/* Variables and functions */
scalar_t__ strncmp(char const *, char *, int);
int /*<<< orphan*/ *strstr(char const *, char *);
int is_ccache_path(const char *path) {
  if (strstr(path, "/.ccache") != NULL)
    return 1;
  if (strncmp(path, "/tmp/.icecream-", 15) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_ccache_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <strstr@plt>
cmp    $0x0,%rax
je     1152 <is_ccache_path+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1184 <is_ccache_path+0x64>
mov    -0x10(%rbp),%rdi
lea    0xeac(%rip),%rsi
mov    $0xf,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    117d <is_ccache_path+0x5d>
movl   $0x1,-0x4(%rbp)
jmp    1184 <is_ccache_path+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ccache_path>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <strstr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     113f <is_ccache_path+0x1f>
pop    %rbx
ret
lea    0xec3(%rip),%rsi
mov    %rbx,%rdi
mov    $0xf,%edx
call   1030 <strncmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"/.ccache\00"
@.str.1 = [16 x i8] c"/tmp/.icecream-\00"
define i32 @is_ccache_path(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32* @strstr(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i32* %5, null
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @strncmp(i8* %9, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 15)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@.str = [9 x i8] c"/.ccache\00"
@.str.1 = [16 x i8] c"/tmp/.icecream-\00"
define i32 @is_ccache_path(i8* %0) {
%2 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @strncmp(i8* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i32 15)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, float, float);
float soma(float, int);
main() {
  int a;
  float b, res;
  a = 10;
  b = 12.3;
  res = soma(b, a);
  printf("A soma de %d com %6.3f é %6.3f\n ", a, b, res);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
movss  0xec2(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%edi
call   1040 <soma@plt>
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
movss  -0xc(%rbp),%xmm0
movss  -0x10(%rbp),%xmm1
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movss  0xed7(%rip),%xmm0
mov    $0xa,%edi
call   1040 <soma@plt>
movaps %xmm0,%xmm1
lea    0xec7(%rip),%rdi
mov    $0xa,%esi
movss  0xeb6(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"A soma de %d com %6.3f \C3\A9 %6.3f\0A \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
store i32 10, i32* %2
store float 0x40289999A0000000, float* %3
%5 = load float, float* %3
%6 = load i32, i32* %2
%7 = call float @soma(float %5, i32 %6)
store float %7, float* %4
%8 = load i32, i32* %2
%9 = load float, float* %3
%10 = load float, float* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %8, float %9, float %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"A soma de %d com %6.3f \C3\A9 %6.3f\0A \00"
define i32 @main() {
%1 = tail call float @soma(float 0x40289999A0000000, i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 10, float 0x40289999A0000000, float %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ close_socket(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ listen(int, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
int svr_listen(int fd) {
  if ((listen(fd, 20)) < 0) {
    perror("Listen Server error !");
    close_socket(fd);
    exit(EXIT_FAILURE);
  }
  printf("listen server ok\n");
  return 0;
}


x86 assembly (clang, -O0):
<svr_listen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x14,%esi
call   1050 <listen@plt>
cmp    $0x0,%rax
jge    1194 <svr_listen+0x44>
lea    0xe87(%rip),%rdi
call   1060 <perror@plt>
mov    -0x4(%rbp),%edi
call   1040 <close_socket@plt>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>
lea    0xe7b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svr_listen>:
push   %rbx
mov    %edi,%ebx
mov    $0x14,%esi
call   1050 <listen@plt>
test   %rax,%rax
js     1172 <svr_listen+0x22>
lea    0xead(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret
lea    0xe87(%rip),%rdi
call   1060 <perror@plt>
mov    %ebx,%edi
call   1040 <close_socket@plt>
mov    0x2e54(%rip),%rax
mov    (%rax),%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Listen Server error !\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [18 x i8] c"listen server ok\0A\00"
define i32 @svr_listen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @listen(i32 %3, i32 20)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = call i32 @close_socket(i32 %8)
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"Listen Server error !\00"
@EXIT_FAILURE = global i32 0
@str = [17 x i8] c"listen server ok\00"
define i32 @svr_listen(i32 %0) {
%2 = tail call i64 @listen(i32 %0, i32 20)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @close_socket(i32 %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void foo338(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo338(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ O_WRONLY;
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int FODevice(char *id) {
  char fn[64];
  strcpy(fn, "/dev/dsp");
  if (id)
    strcat(fn, id);
  return (open(fn, O_WRONLY));
}


x86 assembly (clang, -O0):
<FODevice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1030 <strcpy@plt>
cmpq   $0x0,-0x8(%rbp)
je     1164 <FODevice+0x34>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <strcat@plt>
lea    -0x50(%rbp),%rdi
mov    0x2e69(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FODevice>:
push   %rbx
sub    $0x40,%rsp
mov    %rdi,%rbx
lea    0xec1(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcpy@plt>
test   %rbx,%rbx
je     1157 <FODevice+0x27>
mov    %rsp,%rdi
mov    %rbx,%rsi
call   1050 <strcat@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%esi
mov    %rsp,%rdi
call   1040 <open@plt>
add    $0x40,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"/dev/dsp\00"
@O_WRONLY = global i32 0
define i32 @FODevice(i8* %0) {
%2 = alloca i8*
%3 = alloca [64 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%10 = load i8*, i8** %2
%11 = call i32 @strcat(i8* %9, i8* %10)
br label %12
12: ; preds = %8, %1
%13 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%14 = load i32, i32* @O_WRONLY
%15 = call i32 @open(i8* %13, i32 %14)
ret i32 %15
}

LLVM IR (-O2):
@.str = [9 x i8] c"/dev/dsp\00"
@O_WRONLY = global i32 0
define i32 @FODevice(i8* %0) {
%2 = alloca [64 x i8]
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i8* %0, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = call i32 @strcat(i8* %3, i8* %0)
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* @O_WRONLY
%10 = call i32 @open(i8* %3, i32 %9)
ret i32 %10
}
/* Type definitions */
struct UPnPService {
  int dummy;
};
struct UPnPDevice {
  int dummy;
};

/* Variables and functions */
struct UPnPService *RNDGetService(struct UPnPDevice *, char *, int);
struct UPnPService *RNDGetService_RenderingControl(struct UPnPDevice *device) {
  return (RNDGetService(device,
                        "urn:schemas-upnp-org:service:RenderingControl:1", 47));
}


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

x86 assembly (clang, -O2):
<RNDGetService_RenderingControl>:
lea    0xee9(%rip),%rsi
mov    $0x2f,%edx
jmp    1030 <RNDGetService@plt>

LLVM IR (-O0):
%struct.UPnPService = type { i32 }
%struct.UPnPDevice = type { i32 }
@.str = [48 x i8] c"urn:schemas-upnp-org:service:RenderingControl:1\00"
define %struct.UPnPService* @RNDGetService_RenderingControl(%struct.UPnPDevice* %0) {
%2 = alloca %struct.UPnPDevice*
store %struct.UPnPDevice* %0, %struct.UPnPDevice** %2
%3 = load %struct.UPnPDevice*, %struct.UPnPDevice** %2
%4 = call %struct.UPnPService* @RNDGetService(%struct.UPnPDevice* %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 47)
ret %struct.UPnPService* %4
}

LLVM IR (-O2):
%struct.UPnPService = type { i32 }
%struct.UPnPDevice = type { i32 }
@.str = [48 x i8] c"urn:schemas-upnp-org:service:RenderingControl:1\00"
define %struct.UPnPService* @RNDGetService_RenderingControl(%struct.UPnPDevice* %0) {
%2 = tail call %struct.UPnPService* @RNDGetService(%struct.UPnPDevice* %0, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 47)
ret %struct.UPnPService* %2
}
/* Variables and functions */
int /*<<< orphan*/ ex_int_iisort(int *, int *, int);
int /*<<< orphan*/ ex_int_iqsort(int *, int *, int /*<<< orphan*/, int);
void ex_iqsort(int v[], int iv[], int N) {
  ex_int_iqsort(v, iv, 0, N - 1);
  ex_int_iisort(v, iv, N);
}


x86 assembly (clang, -O0):
<ex_iqsort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <ex_int_iqsort@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <ex_int_iisort@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ex_iqsort>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%rbx
lea    -0x1(%r14),%ecx
xor    %edx,%edx
call   1030 <ex_int_iqsort@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <ex_int_iisort@plt>

LLVM IR (-O0):
define void @ex_iqsort(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %6
%10 = sub nsw i32 %9, 1
%11 = call i32 @ex_int_iqsort(i32* %7, i32* %8, i32 0, i32 %10)
%12 = load i32*, i32** %4
%13 = load i32*, i32** %5
%14 = load i32, i32* %6
%15 = call i32 @ex_int_iisort(i32* %12, i32* %13, i32 %14)
ret void
}

LLVM IR (-O2):
define void @ex_iqsort(i32* %0, i32* %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = tail call i32 @ex_int_iqsort(i32* %0, i32* %1, i32 0, i32 %4)
%6 = tail call i32 @ex_int_iisort(i32* %0, i32* %1, i32 %2)
ret void
}
int ds_modify_callback(void *data, void *param) {
  *(long *)data = (long)param;
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @ds_modify_callback(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
store i64 %6, i64* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @ds_modify_callback(i8* nocapture writeonly %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = bitcast i8* %0 to i64*
store i64 %3, i64* %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ is_prime(int);
int next_prime(int n) {
  if (n % 2 == 0)
    n++;
  for (; !is_prime(n); n = n + 2)
    ;
  return n;
}


x86 assembly (clang, -O0):
<next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1138 <next_prime+0x28>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <next_prime+0x2d>
mov    -0x4(%rbp),%edi
call   1030 <is_prime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    115a <next_prime+0x4a>
jmp    116d <next_prime+0x5d>
jmp    115f <next_prime+0x4f>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
jmp    113d <next_prime+0x2d>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_prime>:
push   %rbx
mov    %edi,%ebx
not    %ebx
and    $0x1,%ebx
add    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
call   1030 <is_prime@plt>
add    $0x2,%ebx
test   %eax,%eax
je     1120 <next_prime+0x10>
add    $0xfffffffe,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @next_prime(i32 %0) {
%2 = and i32 %0, 1
%3 = xor i32 %2, 1
%4 = add nsw i32 %3, %0
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ %4, %1 ], [ %9, %5 ]
%7 = tail call i32 @is_prime(i32 %6)
%8 = icmp eq i32 %7, 0
%9 = add nsw i32 %6, 2
br i1 %8, label %5, label %10
10: ; preds = %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ swapone(int *, int, int);
int swap(int *B, int left, int right) {
  while (left < right) {
    swapone(B, left, right);
    left++;
    right--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1154 <swap+0x44>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <swapone@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1122 <swap+0x12>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %rbp
push   %r14
push   %rbx
cmp    %edx,%esi
jge    1136 <swap+0x26>
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r14
nop
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <swapone@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    %ebx,%ebp
jl     1120 <swap+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @swap(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ %2, %3 ]
%7 = phi i32 [ %9, %5 ], [ %1, %3 ]
%8 = tail call i32 @swapone(i32* %0, i32 %7, i32 %6)
%9 = add nsw i32 %7, 1
%10 = add nsw i32 %6, -1
%11 = icmp slt i32 %9, %10
br i1 %11, label %5, label %12
12: ; preds = %5, %3
ret i32 0
}
void ff_hevc_put_hevc_uni_qpel_v4_8_sse4() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @config_cpu_reset_addr_read() {
ret i32 0
}
/* Variables and functions */
int add(unsigned int, int);
unsigned multiply(unsigned a, unsigned b) {
  if (b == 0)
    return 0;
  return add(a, multiply(a, --b));
}


x86 assembly (clang, -O0):
<multiply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jne    1144 <multiply+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1168 <multiply+0x48>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
add    $0xffffffff,%esi
mov    %esi,-0xc(%rbp)
call   1040 <multiply@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1030 <add@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply>:
test   %esi,%esi
je     1139 <multiply+0x19>
push   %rbx
mov    %edi,%ebx
add    $0xffffffff,%esi
call   1040 <multiply@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <add@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @multiply(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* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %9
8: ; preds = %2
store i32 0, i32* %3
br label %16
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = add i32 %12, -1
store i32 %13, i32* %5
%14 = call i32 @multiply(i32 %11, i32 %13)
%15 = call i32 @add(i32 %10, i32 %14)
store i32 %15, i32* %3
br label %16
16: ; preds = %9, %8
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @multiply(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi i32 [ %9, %6 ], [ 0, %2 ]
ret i32 %5
6: ; preds = %2
%7 = add i32 %1, -1
%8 = tail call i32 @multiply(i32 %0, i32 %7)
%9 = tail call i32 @add(i32 %0, i32 %8)
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ arg();
int /*<<< orphan*/ movi();
int /*<<< orphan*/ ret();
int /*<<< orphan*/ stdarg();
void pcs(void) {
  arg();
  ret();
  stdarg();
  movi();
}


x86 assembly (clang, -O0):
<pcs>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <arg@plt>
mov    $0x0,%al
call   1030 <ret@plt>
mov    $0x0,%al
call   1050 <stdarg@plt>
mov    $0x0,%al
call   1060 <movi@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<pcs>:
push   %rax
xor    %eax,%eax
call   1040 <arg@plt>
xor    %eax,%eax
call   1030 <ret@plt>
xor    %eax,%eax
call   1050 <stdarg@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <movi@plt>

LLVM IR (-O0):
define void @pcs() {
%1 = call i32 (...) @arg()
%2 = call i32 (...) @ret()
%3 = call i32 (...) @stdarg()
%4 = call i32 (...) @movi()
ret void
}

LLVM IR (-O2):
define void @pcs() {
%1 = tail call i32 (...) @arg()
%2 = tail call i32 (...) @ret()
%3 = tail call i32 (...) @stdarg()
%4 = tail call i32 (...) @movi()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char const *);
int /*<<< orphan*/ strcpy(char *, char const *);
void err_handler(char const *cause, int status) {
  char const *err = " Error";
  char aux[150];
  if (status == -1) {
    strcpy(aux, cause);
    perror(strcat(aux, err));
    exit(1);
  }
}


x86 assembly (clang, -O0):
<err_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    0xea7(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1198 <err_handler+0x58>
lea    -0xb0(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0xb0(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1050 <strcat@plt>
mov    %eax,%edi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<err_handler>:
cmp    $0xffffffff,%esi
je     1146 <err_handler+0x6>
ret
push   %rbx
sub    $0xa0,%rsp
mov    %rdi,%rax
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %rax,%rsi
call   1030 <strcpy@plt>
lea    0xe9a(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcat@plt>
mov    %eax,%edi
call   1040 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c" Error\00"
define void @err_handler(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca [150 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %5
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %18
9: ; preds = %2
%10 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 0
%11 = load i8*, i8** %3
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = getelementptr inbounds [150 x i8], [150 x i8]* %6, i64 0, i64 0
%14 = load i8*, i8** %5
%15 = call i32 @strcat(i8* %13, i8* %14)
%16 = call i32 @perror(i32 %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" Error\00"
define void @err_handler(i8* %0, i32 %1) {
%3 = alloca [150 x i8]
%4 = getelementptr inbounds [150 x i8], [150 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %1, -1
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = call i32 @strcpy(i8* %4, i8* %0)
%8 = call i32 @strcat(i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @perror(i32 %8)
%10 = call i32 @exit(i32 1)
unreachable
11: ; preds = %2
ret void
}
void XtRemoveRawEventHandler() {}


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

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

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

LLVM IR (-O2):
define void @XtRemoveRawEventHandler() {
ret void
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int __cpu_to_le16(int);
int ieee80211_is_probe_req(__le16 fc) {
  return (fc & __cpu_to_le16(0x000c | 0x00f0)) ==
         __cpu_to_le16(0x0000 | 0x0040);
}


x86 assembly (clang, -O0):
<ieee80211_is_probe_req>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x40,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_probe_req>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <__cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0x40,%edi
call   1030 <__cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_probe_req(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @__cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @__cpu_to_le16(i32 64)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_probe_req(i32 %0) {
%2 = tail call i32 @__cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @__cpu_to_le16(i32 64)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ RTLD_LAZY;
int /*<<< orphan*/ dlopen(char *, int /*<<< orphan*/);
int main() {
  dlopen("libfoo.dylib", RTLD_LAZY);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
lea    0xed1(%rip),%rdi
call   1030 <dlopen@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [13 x i8] c"libfoo.dylib\00"
@RTLD_LAZY = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @RTLD_LAZY
%3 = call i32 @dlopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"libfoo.dylib\00"
@RTLD_LAZY = global i32 0
define i32 @main() {
%1 = load i32, i32* @RTLD_LAZY
%2 = tail call i32 @dlopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
int clientFun(int oldMaCookie) { return oldMaCookie; }


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

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

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

LLVM IR (-O2):
define i32 @clientFun(i32 returned %0) {
ret i32 %0
}
void unsetbit(unsigned int *map, int bit) {
  unsigned int v = map[bit / (sizeof(unsigned int) * 8)];
  int m = (1 << (bit % (sizeof(unsigned int) * 8))) ^ ((unsigned int)-1);
  map[bit / (sizeof(unsigned int) * 8)] = v & m;
}


x86 assembly (clang, -O0):
<unsetbit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shr    $0x5,%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x10(%rbp)
movslq -0xc(%rbp),%rax
and    $0x1f,%rax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%edx
and    -0x14(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shr    $0x5,%rcx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<unsetbit>:
movslq %esi,%rcx
mov    %rcx,%rax
mov    $0xfffffffe,%edx
rol    %cl,%edx
shr    $0x5,%rax
and    %edx,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @unsetbit(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = load i32, i32* %4
%9 = sext i32 %8 to i64
%10 = udiv i64 %9, 32
%11 = getelementptr inbounds i32, i32* %7, i64 %10
%12 = load i32, i32* %11
store i32 %12, i32* %5
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = urem i64 %14, 32
%16 = trunc i64 %15 to i32
%17 = shl i32 1, %16
%18 = xor i32 %17, -1
store i32 %18, i32* %6
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = and i32 %19, %20
%22 = load i32*, i32** %3
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = udiv i64 %24, 32
%26 = getelementptr inbounds i32, i32* %22, i64 %25
store i32 %21, i32* %26
ret void
}

LLVM IR (-O2):
define void @unsetbit(i32* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = lshr i64 %3, 5
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = and i32 %1, 31
%8 = shl nuw i32 1, %7
%9 = xor i32 %8, -1
%10 = and i32 %6, %9
store i32 %10, i32* %5
ret void
}
/* Type definitions */
struct list_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ INIT_LIST_HEAD(struct list_head *);
int /*<<< orphan*/ list_del(struct list_head *);
void list_del_init(struct list_head *node) {
  list_del(node);
  INIT_LIST_HEAD(node);
}


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

x86 assembly (clang, -O2):
<list_del_init>:
push   %rbx
mov    %rdi,%rbx
call   1030 <list_del@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <INIT_LIST_HEAD@plt>

LLVM IR (-O0):
%struct.list_head = type { i32 }
define void @list_del_init(%struct.list_head* %0) {
%2 = alloca %struct.list_head*
store %struct.list_head* %0, %struct.list_head** %2
%3 = load %struct.list_head*, %struct.list_head** %2
%4 = call i32 @list_del(%struct.list_head* %3)
%5 = load %struct.list_head*, %struct.list_head** %2
%6 = call i32 @INIT_LIST_HEAD(%struct.list_head* %5)
ret void
}

LLVM IR (-O2):
%struct.list_head = type { i32 }
define void @list_del_init(%struct.list_head* %0) {
%2 = tail call i32 @list_del(%struct.list_head* %0)
%3 = tail call i32 @INIT_LIST_HEAD(%struct.list_head* %0)
ret void
}
void testClosureFIrV(void (*closure)(float, int), float a1, int a2) {
  (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureFIrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  -0xc(%rbp),%xmm0
mov    -0x10(%rbp),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureFIrV>:
mov    %rdi,%rax
mov    %esi,%edi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureFIrV(void (float, i32)* %0, float %1, i32 %2) {
%4 = alloca void (float, i32)*
%5 = alloca float
%6 = alloca i32
store void (float, i32)* %0, void (float, i32)** %4
store float %1, float* %5
store i32 %2, i32* %6
%7 = load void (float, i32)*, void (float, i32)** %4
%8 = load float, float* %5
%9 = load i32, i32* %6
ret void
}

LLVM IR (-O2):
define void @testClosureFIrV(void (float, i32)* nocapture %0, float %1, i32 %2) {
tail call void %0(float %1, i32 %2)
ret void
}