xunge/DecIR huggingface dataset:
/* Variables and functions */
int mainsocket_get();
int main_socket(void) { return mainsocket_get(); }


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

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

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

LLVM IR (-O2):
define i32 @main_socket() {
%1 = tail call i32 (...) @mainsocket_get()
ret i32 %1
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t hash_string(char *string) {
  {
    uint64_t hash = 5381;
    int c;
    while ((c = (unsigned char)*string++) != 0)
      hash = ((hash << 5) + hash) + c;
    return hash;
  }
}


x86 assembly (clang, -O0):
<hash_string>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x1505,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
je     1141 <hash_string+0x41>
mov    -0xc(%rbp),%eax
shl    $0x5,%eax
add    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash_string+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_string>:
mov    (%rdi),%cl
test   %cl,%cl
je     1138 <hash_string+0x38>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <hash_string+0x20>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @hash_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %9, %4 ], [ %0, %1 ]
%7 = phi i32 [ %11, %4 ], [ 5381, %1 ]
%8 = zext i8 %5 to i32
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = mul i32 %7, 33
%11 = add nsw i32 %10, %8
%12 = load i8, i8* %9
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i32 [ 5381, %1 ], [ %11, %4 ]
ret i32 %15
}
void __lock() { asm volatile("cli" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @__lock() {
tail call void asm sideeffect "cli", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
bool unicode_is_valid_code_point(uint32_t code_point) {
  return code_point <= 0x10FFFF && code_point != 0xFFFE &&
         !(code_point >= 0xD800 && code_point <= 0xDFFF);
}


x86 assembly (clang, -O0):
<unicode_is_valid_code_point>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x10ffff,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jg     1152 <unicode_is_valid_code_point+0x52>
xor    %eax,%eax
cmpl   $0xfffe,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     1152 <unicode_is_valid_code_point+0x52>
xor    %eax,%eax
cmpl   $0xd800,-0x4(%rbp)
mov    %al,-0x6(%rbp)
jl     114a <unicode_is_valid_code_point+0x4a>
cmpl   $0xdfff,-0x4(%rbp)
setle  %al
mov    %al,-0x6(%rbp)
mov    -0x6(%rbp),%al
xor    $0xff,%al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<unicode_is_valid_code_point>:
cmp    $0x110000,%edi
setl   %al
cmp    $0xfffe,%edi
setne  %cl
and    %al,%cl
and    $0xfffff800,%edi
cmp    $0xd800,%edi
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @unicode_is_valid_code_point(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 1114111
br i1 %4, label %5, label %17
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 65534
br i1 %7, label %8, label %17
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp sge i32 %9, 55296
br i1 %10, label %11, label %14
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp sle i32 %12, 57343
br label %14
14: ; preds = %11, %8
%15 = phi i1 [ false, %8 ], [ %13, %11 ]
%16 = xor i1 %15, true
br label %17
17: ; preds = %14, %5, %1
%18 = phi i1 [ false, %5 ], [ false, %1 ], [ %16, %14 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @unicode_is_valid_code_point(i32 %0) {
%2 = icmp slt i32 %0, 1114112
%3 = icmp ne i32 %0, 65534
%4 = and i1 %2, %3
%5 = and i32 %0, -2048
%6 = icmp ne i32 %5, 55296
%7 = and i1 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int rand();
long random() { return (long)rand() << 16 + rand(); }


x86 assembly (clang, -O0):
<random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <rand@plt>
cltq
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
add    $0x10,%ecx
mov    %ecx,%ecx
shl    %cl,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<random>:
push   %rbx
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rbx
xor    %eax,%eax
call   1030 <rand@plt>
lea    0x10(%rax),%ecx
shl    %cl,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @random() {
%1 = call i32 (...) @rand()
%2 = sext i32 %1 to i64
%3 = call i32 (...) @rand()
%4 = add nsw i32 16, %3
%5 = zext i32 %4 to i64
%6 = shl i64 %2, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @random() {
%1 = tail call i32 (...) @rand()
%2 = sext i32 %1 to i64
%3 = tail call i32 (...) @rand()
%4 = add nsw i32 %3, 16
%5 = zext i32 %4 to i64
%6 = shl i64 %2, %5
ret i64 %6
}
/* Variables and functions */
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ tgt_gettime();
void read_random(char *out) {
  int t;
  srand(tgt_gettime());
  t = rand();
  out[9] = t & 0xff;
  out[8] = (t >> 8) & 0xff;
}


x86 assembly (clang, -O0):
<read_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <tgt_gettime@plt>
mov    %eax,%edi
call   1030 <srand@plt>
mov    $0x0,%al
call   1050 <rand@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x9(%rax)
mov    -0xc(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x8(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_random>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <tgt_gettime@plt>
mov    %eax,%edi
call   1030 <srand@plt>
xor    %eax,%eax
call   1050 <rand@plt>
rol    $0x8,%ax
mov    %ax,0x8(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @read_random(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 (...) @tgt_gettime()
%5 = call i32 @srand(i32 %4)
%6 = call i32 (...) @rand()
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 9
store i8 %9, i8* %11
%12 = load i32, i32* %3
%13 = ashr i32 %12, 8
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i64 8
store i8 %15, i8* %17
ret void
}

LLVM IR (-O2):
define void @read_random(i8* nocapture writeonly %0) {
%2 = tail call i32 (...) @tgt_gettime()
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @rand()
%5 = trunc i32 %4 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 9
store i8 %5, i8* %6
%7 = lshr i32 %4, 8
%8 = trunc i32 %7 to i8
%9 = getelementptr inbounds i8, i8* %0, i64 8
store i8 %8, i8* %9
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ evutil_socket_t;

/* Variables and functions */
int evutil_closesocket(evutil_socket_t sock) {
  (void)sock;
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @evutil_closesocket(i32 %0) {
ret i32 -1
}
void spawnGate() {}


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

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

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

LLVM IR (-O2):
define void @spawnGate() {
ret void
}
extern int __attribute__((__section__(".init.text"))) elv_register(void) {
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @elv_register() section ".init.text" {
ret i32 0
}

LLVM IR (-O2):
define i32 @elv_register() section ".init.text" {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_led(int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char buf[5 * 32];
  print_led(1234567, buf);
  printf("%s\n", buf);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xb0(%rbp),%rsi
mov    $0x12d687,%edi
call   1040 <print_led@plt>
lea    -0xb0(%rbp),%rsi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xa0,%rsp
mov    %rsp,%rbx
mov    $0x12d687,%edi
mov    %rbx,%rsi
call   1040 <print_led@plt>
lea    0xec1(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [160 x i8]
%2 = getelementptr inbounds [160 x i8], [160 x i8]* %1, i64 0, i64 0
%3 = call i32 @print_led(i32 1234567, i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
void gtk_text_buffer_remove_tag() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_remove_tag() {
ret void
}
void poner_a_cero(float gano[12][2]) {
  int mes, tarifa;
  for (mes = 0; mes < 12; mes = mes + 1) {
    for (tarifa = 0; tarifa < 2; tarifa = tarifa + 1) {
      gano[mes][tarifa] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<poner_a_cero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xc,-0xc(%rbp)
jge    1166 <poner_a_cero+0x66>
movl   $0x0,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    1153 <poner_a_cero+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x3,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
xorps  %xmm0,%xmm0
movss  %xmm0,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <poner_a_cero+0x20>
jmp    1158 <poner_a_cero+0x58>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <poner_a_cero+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<poner_a_cero>:
xorps  %xmm0,%xmm0
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @poner_a_cero([2 x float]* nocapture writeonly %0) {
%2 = bitcast [2 x float]* %0 to i8*
ret void
}
int hashtbl_int64_equals(const void *a, const void *b) {
  return *((const long long int *)a) == *((const long long int *)b);
}


x86 assembly (clang, -O0):
<hashtbl_int64_equals>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hashtbl_int64_equals>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
sete   %al
ret

LLVM IR (-O0):
define i32 @hashtbl_int64_equals(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 = bitcast i8* %5 to i64*
%7 = load i64, i64* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i64*
%10 = load i64, i64* %9
%11 = icmp eq i64 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @hashtbl_int64_equals(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp eq i64 %4, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ output_q_hex(long);
void output_id() {
  long id;
  id = *(long *)0x100000120;
  output_q_hex(id);
  return;
}


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

x86 assembly (clang, -O2):
<output_id>:
movabs $0x100000120,%rax
mov    (%rax),%rdi
jmp    1030 <output_q_hex@plt>

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

LLVM IR (-O2):
define void @output_id() {
%1 = load i64, i64* inttoptr (i64 4294967584 to i64*)
%2 = tail call i32 @output_q_hex(i64 %1)
ret void
}
/* Variables and functions */
scalar_t__ ft_atoull(char const *);
unsigned int ft_atoui(const char *str) {
  return ((unsigned int)ft_atoull(str));
}


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

x86 assembly (clang, -O2):
<ft_atoui>:
jmp    1030 <ft_atoull@plt>

LLVM IR (-O0):
define i32 @ft_atoui(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i64 @ft_atoull(i8* %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @ft_atoui(i8* %0) {
%2 = tail call i64 @ft_atoull(i8* %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ bef_push(int);
int ins_nm4() {
  bef_push(4);
  return 1;
}


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

x86 assembly (clang, -O2):
<ins_nm4>:
push   %rax
mov    $0x4,%edi
call   1030 <bef_push@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @ins_nm4() {
%1 = call i32 @bef_push(i32 4)
ret i32 1
}

LLVM IR (-O2):
define i32 @ins_nm4() {
%1 = tail call i32 @bef_push(i32 4)
ret i32 1
}
void NETSCAPE_SPKI_sign(void) {}


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

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

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

LLVM IR (-O2):
define void @NETSCAPE_SPKI_sign() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char const *);
void die(const char *msg) {
  perror(msg);
  exit(errno);
}


x86 assembly (clang, -O0):
<die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    0x2ea4(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<die>:
push   %rax
call   1030 <perror@plt>
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
define void @die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = load i32, i32* @errno
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
define void @die(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = load i32, i32* @errno
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, void *, void *);
void __cyg_profile_func_entry(void *callee, void *callsite) {
  printf("Entry %p in %p\n", callee, callsite);
}


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

x86 assembly (clang, -O2):
<__cyg_profile_func_entry>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"Entry %p in %p\0A\00"
define void @__cyg_profile_func_entry(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"Entry %p in %p\0A\00"
define void @__cyg_profile_func_entry(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
void UARTModemControlClear(unsigned int baseAdd, unsigned int ctrlFlags) {
  (*((volatile unsigned int *)(baseAdd + (0x10)))) &=
      ~(ctrlFlags & ((0x00000020u) | (0x00000002u)));
}


x86 assembly (clang, -O0):
<UARTModemControlClear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edx
and    $0x22,%edx
xor    $0xffffffff,%edx
mov    -0x4(%rbp),%eax
add    $0x10,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTModemControlClear>:
not    %esi
or     $0xffffffdd,%esi
add    $0x10,%edi
and    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @UARTModemControlClear(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 34
%7 = xor i32 %6, -1
%8 = load i32, i32* %3
%9 = add i32 %8, 16
%10 = zext i32 %9 to i64
%11 = inttoptr i64 %10 to i32*
%12 = load volatile i32, i32* %11
%13 = and i32 %12, %7
store volatile i32 %13, i32* %11
ret void
}

LLVM IR (-O2):
define void @UARTModemControlClear(i32 %0, i32 %1) {
%3 = and i32 %1, 34
%4 = xor i32 %3, -1
%5 = add i32 %0, 16
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
%9 = and i32 %8, %4
store volatile i32 %9, i32* %7
ret void
}
/* Type definitions */
struct f_thr_args {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fio_main(struct f_thr_args *);
void *fio_thread(void *fio_args) {
  struct f_thr_args *fa = (struct f_thr_args *)fio_args;
  fio_main(fa);
  return NULL;
}


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

x86 assembly (clang, -O2):
<fio_thread>:
push   %rax
call   1030 <fio_main@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.f_thr_args = type { i32 }
define i8* @fio_thread(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.f_thr_args*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.f_thr_args*
store %struct.f_thr_args* %5, %struct.f_thr_args** %3
%6 = load %struct.f_thr_args*, %struct.f_thr_args** %3
%7 = call i32 @fio_main(%struct.f_thr_args* %6)
ret i8* null
}

LLVM IR (-O2):
%struct.f_thr_args = type { i32 }
define noalias i8* @fio_thread(i8* %0) {
%2 = bitcast i8* %0 to %struct.f_thr_args*
%3 = tail call i32 @fio_main(%struct.f_thr_args* %2)
ret i8* null
}
/* Variables and functions */
int build_month_num(char *);
int /*<<< orphan*/ sscanf(char *, char *, char *);
int build_month() {
  char monthname[20];
  sscanf("Mar 17 2022", "%s %*d %*d", monthname);
  return build_month_num(monthname);
}


x86 assembly (clang, -O0):
<build_month>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x20(%rbp),%rdx
lea    0xecd(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1040 <sscanf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <build_month_num@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_month>:
push   %rbx
sub    $0x20,%rsp
lea    0xed4(%rip),%rdi
lea    0xed9(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdx
call   1040 <sscanf@plt>
mov    %rbx,%rdi
call   1030 <build_month_num@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Mar 17 2022\00"
@.str.1 = [11 x i8] c"%s %*d %*d\00"
define i32 @build_month() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @sscanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%5 = call i32 @build_month_num(i8* %4)
ret i32 %5
}

LLVM IR (-O2):
@.str = [12 x i8] c"Mar 17 2022\00"
@.str.1 = [11 x i8] c"%s %*d %*d\00"
define i32 @build_month() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @sscanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%4 = call i32 @build_month_num(i8* %2)
ret i32 %4
}
void t3() {}


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

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

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

LLVM IR (-O2):
define void @t3() {
ret void
}
void mem_text_writeable_spinlock(unsigned long *flags) {}


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

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

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

LLVM IR (-O2):
define void @mem_text_writeable_spinlock(i64* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ get_mxcsr();
int /*<<< orphan*/ print_mxcsr(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void dump_mxcsr() { print_mxcsr(stdout, get_mxcsr()); }


x86 assembly (clang, -O0):
<dump_mxcsr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <get_mxcsr@plt>
mov    -0x4(%rbp),%edi
mov    %eax,%esi
call   1030 <print_mxcsr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dump_mxcsr>:
push   %rbx
mov    0x2eb8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <get_mxcsr@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1030 <print_mxcsr@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @dump_mxcsr() {
%1 = load i32, i32* @stdout
%2 = call i32 (...) @get_mxcsr()
%3 = call i32 @print_mxcsr(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @dump_mxcsr() {
%1 = load i32, i32* @stdout
%2 = tail call i32 (...) @get_mxcsr()
%3 = tail call i32 @print_mxcsr(i32 %1, i32 %2)
ret void
}
void enterSysPatchOok(void) {}


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

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

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

LLVM IR (-O2):
define void @enterSysPatchOok() {
ret void
}
void tegra_mipi_cal_write(struct tegra_mipi_cal *mipi_cal, unsigned long val,
                          unsigned long reg) {}


x86 assembly (clang, -O0):
<tegra_mipi_cal_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
%struct.tegra_mipi_cal = type opaque
define void @tegra_mipi_cal_write(%struct.tegra_mipi_cal* nocapture %0, i64 %1, i64 %2) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DummyNotificationReceiverP__Boot__booted();
void RealMainP__Boot__booted(void) {
  DummyNotificationReceiverP__Boot__booted();
}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @amd_iommu_apply_ivrs_quirks() {
ret void
}
/* Variables and functions */
int atoi(char *);
void Dec2Bin(char dec[], char bin[]) {
  int decimal = atoi(dec);
  int valeur = 32768;
  for (int i = 0; i >= 15; i++) {
    float temp = (float)decimal;
    if (temp / valeur > 1) {
      decimal /= 2;
      bin[i] = '1';
    } else {
      bin[i] = '0';
    }
    valeur /= 2;
  }
}


x86 assembly (clang, -O0):
<Dec2Bin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
mov    %eax,-0x14(%rbp)
movl   $0x8000,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0xf,-0x1c(%rbp)
jl     11b4 <Dec2Bin+0xa4>
cvtsi2ssl -0x14(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
cvtsi2ssl -0x18(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  0xe9c(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    118c <Dec2Bin+0x7c>
mov    -0x14(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x31,(%rax,%rcx,1)
jmp    1198 <Dec2Bin+0x88>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movb   $0x30,(%rax,%rcx,1)
mov    -0x18(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    113a <Dec2Bin+0x2a>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Dec2Bin(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
store i8* %0, i8** %3
store i8* %1, i8** %4
%9 = load i8*, i8** %3
%10 = call i32 @atoi(i8* %9)
store i32 %10, i32* %5
store i32 32768, i32* %6
store i32 0, i32* %7
br label %11
11: ; preds = %37, %2
%12 = load i32, i32* %7
%13 = icmp sge i32 %12, 15
br i1 %13, label %14, label %40
14: ; preds = %11
%15 = load i32, i32* %5
%16 = sitofp i32 %15 to float
store float %16, float* %8
%17 = load float, float* %8
%18 = load i32, i32* %6
%19 = sitofp i32 %18 to float
%20 = fdiv float %17, %19
%21 = fcmp ogt float %20, 1.000000e+00
br i1 %21, label %22, label %29
22: ; preds = %14
%23 = load i32, i32* %5
%24 = sdiv i32 %23, 2
store i32 %24, i32* %5
%25 = load i8*, i8** %4
%26 = load i32, i32* %7
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
store i8 49, i8* %28
br label %34
29: ; preds = %14
%30 = load i8*, i8** %4
%31 = load i32, i32* %7
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i8, i8* %30, i64 %32
store i8 48, i8* %33
br label %34
34: ; preds = %29, %22
%35 = load i32, i32* %6
%36 = sdiv i32 %35, 2
store i32 %36, i32* %6
br label %37
37: ; preds = %34
%38 = load i32, i32* %7
%39 = add nsw i32 %38, 1
store i32 %39, i32* %7
br label %11
40: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @Dec2Bin(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: lprm [-] [-Pprinter] [[job #] [user] ...]\n");
  exit(2);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x2,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [50 x i8] c"usage: lprm [-] [-Pprinter] [[job #] [user] ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 2)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [50 x i8] c"usage: lprm [-] [-Pprinter] [[job #] [user] ...]\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 2)
unreachable
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ memcpy(void *, void *, size_t);
void *memdup(void *ptr, size_t size) {
  void *ptr_cpy = malloc(size);
  memcpy(ptr_cpy, ptr, size);
  return ptr_cpy;
}


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

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

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

LLVM IR (-O2):
define i8* @memdup(i8* %0, i64 %1) {
%3 = tail call i8* @malloc(i64 %1)
%4 = tail call i32 @memcpy(i8* %3, i8* %0, i64 %1)
ret i8* %3
}
void XCopyGC() {}


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

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

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

LLVM IR (-O2):
define void @XCopyGC() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ rmdir(char *);
void create_dir_cleanup(char *dir) { rmdir(dir); }


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

x86 assembly (clang, -O2):
<create_dir_cleanup>:
jmp    1030 <rmdir@plt>

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

LLVM IR (-O2):
define void @create_dir_cleanup(i8* nocapture %0) {
%2 = tail call i32 @rmdir(i8* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int /*<<< orphan*/ BIO_C_GET_WRITE_GUARANTEE;
size_t BIO_ctrl(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/,
                int /*<<< orphan*/ *);
size_t BIO_ctrl_get_write_guarantee(BIO *bio) {
  return BIO_ctrl(bio, BIO_C_GET_WRITE_GUARANTEE, 0, NULL);
}


x86 assembly (clang, -O0):
<BIO_ctrl_get_write_guarantee>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <BIO_ctrl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BIO_ctrl_get_write_guarantee>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <BIO_ctrl@plt>

LLVM IR (-O0):
@BIO_C_GET_WRITE_GUARANTEE = global i32 0
define i64 @BIO_ctrl_get_write_guarantee(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @BIO_C_GET_WRITE_GUARANTEE
%5 = call i64 @BIO_ctrl(i32* %3, i32 %4, i32 0, i32* null)
ret i64 %5
}

LLVM IR (-O2):
@BIO_C_GET_WRITE_GUARANTEE = global i32 0
define i64 @BIO_ctrl_get_write_guarantee(i32* %0) {
%2 = load i32, i32* @BIO_C_GET_WRITE_GUARANTEE
%3 = tail call i64 @BIO_ctrl(i32* %0, i32 %2, i32 0, i32* null)
ret i64 %3
}
void gtk_policy_type_get_type() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ node_del(struct list_node *);
int /*<<< orphan*/ node_init(struct list_node *);
void node_del_init(struct list_node *node) {
  node_del(node);
  node_init(node);
}


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

x86 assembly (clang, -O2):
<node_del_init>:
push   %rbx
mov    %rdi,%rbx
call   1040 <node_del@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <node_init@plt>

LLVM IR (-O0):
%struct.list_node = type { i32 }
define void @node_del_init(%struct.list_node* %0) {
%2 = alloca %struct.list_node*
store %struct.list_node* %0, %struct.list_node** %2
%3 = load %struct.list_node*, %struct.list_node** %2
%4 = call i32 @node_del(%struct.list_node* %3)
%5 = load %struct.list_node*, %struct.list_node** %2
%6 = call i32 @node_init(%struct.list_node* %5)
ret void
}

LLVM IR (-O2):
%struct.list_node = type { i32 }
define void @node_del_init(%struct.list_node* %0) {
%2 = tail call i32 @node_del(%struct.list_node* %0)
%3 = tail call i32 @node_init(%struct.list_node* %0)
ret void
}
void g_value_get_boolean() {}


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

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

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

LLVM IR (-O2):
define void @g_value_get_boolean() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ rotl64(int /*<<< orphan*/, int);
uint64_t bmw_large_r2(uint64_t x) {
  uint64_t r;
  r = rotl64(x, 11);
  return r;
}


x86 assembly (clang, -O0):
<bmw_large_r2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0xb,%esi
call   1030 <rotl64@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmw_large_r2>:
mov    $0xb,%esi
jmp    1030 <rotl64@plt>

LLVM IR (-O0):
define i32 @bmw_large_r2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @rotl64(i32 %4, i32 11)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @bmw_large_r2(i32 %0) {
%2 = tail call i32 @rotl64(i32 %0, i32 11)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ SSL_CTX_free(void *);
void dv_openssl_ctx_free(void *ctx) { SSL_CTX_free(ctx); }


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

x86 assembly (clang, -O2):
<dv_openssl_ctx_free>:
jmp    1030 <SSL_CTX_free@plt>

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

LLVM IR (-O2):
define void @dv_openssl_ctx_free(i8* %0) {
%2 = tail call i32 @SSL_CTX_free(i8* %0)
ret void
}
void gtk_text_view_get_left_margin() {}


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

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

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

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

/* Variables and functions */
__attribute__((always_)) int detexPixel32GetSignedG16(uint32_t pixel) {
  return (int16_t)((pixel & 0xFFFF0000) >> 16);
}


x86 assembly (clang, -O0):
<detexPixel32GetSignedG16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xffff0000,%eax
shr    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<detexPixel32GetSignedG16>:
mov    %edi,%eax
shr    $0x10,%eax
ret

LLVM IR (-O0):
define i32 @detexPixel32GetSignedG16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, -65536
%5 = lshr i32 %4, 16
ret i32 %5
}

LLVM IR (-O2):
define i32 @detexPixel32GetSignedG16(i32 %0) {
%2 = lshr i32 %0, 16
ret i32 %2
}
/* Variables and functions */
int sprintf(char *, char *, long);
int bufNum(char buf[(8 * ((int)sizeof(long))) / 2], long n) {
  return sprintf(buf, "%ld", n);
}


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

x86 assembly (clang, -O2):
<bufNum>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <sprintf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%ld\00"
define i32 @bufNum(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
define i32 @bufNum(i8* nocapture writeonly %0, i64 %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i32 %3
}
void g_source_remove_poll() {}


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

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

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

LLVM IR (-O2):
define void @g_source_remove_poll() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ out_asm(char *, char const *);
void impl_jmp_lbl(const char *lbl) { out_asm("j %s", lbl); }


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

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

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

LLVM IR (-O2):
@.str = [5 x i8] c"j %s\00"
define void @impl_jmp_lbl(i8* %0) {
%2 = tail call i32 @out_asm(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int64_t gettime(void) {
  struct timespec t;
  clock_gettime(CLOCK_MONOTONIC, &t);
  int64_t n = t.tv_sec;
  n = n * 1000 * 1000 * 1000 + t.tv_nsec;
  return n;
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
imul   $0x3e8,-0xc(%rbp),%eax
imul   $0x3e8,%eax,%eax
imul   $0x3e8,%eax,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
imul   $0x3b9aca00,(%rsp),%eax
add    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @gettime() {
%1 = alloca %struct.timespec
%2 = alloca i32
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%6 = load i32, i32* %5
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = mul nsw i32 %7, 1000
%9 = mul nsw i32 %8, 1000
%10 = mul nsw i32 %9, 1000
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%12 = load i32, i32* %11
%13 = add nsw i32 %10, %12
store i32 %13, i32* %2
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @gettime() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul i32 %6, 1000000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = add nsw i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int memcmp(double *, double *, int);
int dbl_memcmp(double *x, double *y) { return memcmp(x, y, sizeof(double)); }


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

x86 assembly (clang, -O2):
<dbl_memcmp>:
mov    $0x8,%edx
jmp    1030 <memcmp@plt>

LLVM IR (-O0):
define i32 @dbl_memcmp(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double*, double** %4
%7 = call i32 @memcmp(double* %5, double* %6, i32 8)
ret i32 %7
}

LLVM IR (-O2):
define i32 @dbl_memcmp(double* %0, double* %1) {
%3 = tail call i32 @memcmp(double* %0, double* %1, i32 8)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, int);
void InitIntData(void *p, int n) { memset(p, 0, sizeof(int) * n); }


x86 assembly (clang, -O0):
<InitIntData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitIntData>:
lea    0x0(,%rsi,4),%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @InitIntData(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = mul i64 4, %7
%9 = trunc i64 %8 to i32
%10 = call i32 @memset(i8* %5, i32 0, i32 %9)
ret void
}

LLVM IR (-O2):
define void @InitIntData(i8* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32 @memset(i8* %0, i32 0, i32 %3)
ret void
}
int test_imm_1Auint64_lowword_mem(unsigned long long *val) {
  return ((*val) & (0x1A << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_1Auint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 26
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_END;
int smp_sio_seek(int /*<<< orphan*/ *, long, int /*<<< orphan*/);
int smp_sio_seek_end_offset(FILE *fp, long offset) {
  return smp_sio_seek(fp, offset, SEEK_END);
}


x86 assembly (clang, -O0):
<smp_sio_seek_end_offset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x2eb9(%rip),%rax
mov    (%rax),%edx
call   1030 <smp_sio_seek@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smp_sio_seek_end_offset>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edx
jmp    1030 <smp_sio_seek@plt>

LLVM IR (-O0):
@SEEK_END = global i32 0
define i32 @smp_sio_seek_end_offset(i32* %0, i64 %1) {
%3 = alloca i32*
%4 = alloca i64
store i32* %0, i32** %3
store i64 %1, i64* %4
%5 = load i32*, i32** %3
%6 = load i64, i64* %4
%7 = load i32, i32* @SEEK_END
%8 = call i32 @smp_sio_seek(i32* %5, i64 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
@SEEK_END = global i32 0
define i32 @smp_sio_seek_end_offset(i32* %0, i64 %1) {
%3 = load i32, i32* @SEEK_END
%4 = tail call i32 @smp_sio_seek(i32* %0, i64 %1, i32 %3)
ret i32 %4
}