xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned char *chacha12_decrypt(unsigned char *, size_t *,
                                unsigned char const *, size_t,
                                unsigned char const *, unsigned char const *);
unsigned char *crypt_decrypt_chacha12(unsigned char *out, size_t *out_len,
                                      const unsigned char *in, size_t in_len,
                                      const unsigned char *nonce,
                                      const unsigned char *key) {
  return chacha12_decrypt(out, out_len, in, in_len, nonce, key);
}


x86 assembly (clang, -O0):
<crypt_decrypt_chacha12>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    -0x30(%rbp),%r9
call   1030 <chacha12_decrypt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crypt_decrypt_chacha12>:
jmp    1030 <chacha12_decrypt@plt>

LLVM IR (-O0):
define i8* @crypt_decrypt_chacha12(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = alloca i8*
%8 = alloca i64*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i8*
%12 = alloca i8*
store i8* %0, i8** %7
store i64* %1, i64** %8
store i8* %2, i8** %9
store i64 %3, i64* %10
store i8* %4, i8** %11
store i8* %5, i8** %12
%13 = load i8*, i8** %7
%14 = load i64*, i64** %8
%15 = load i8*, i8** %9
%16 = load i64, i64* %10
%17 = load i8*, i8** %11
%18 = load i8*, i8** %12
%19 = call i8* @chacha12_decrypt(i8* %13, i64* %14, i8* %15, i64 %16, i8* %17, i8* %18)
ret i8* %19
}

LLVM IR (-O2):
define i8* @crypt_decrypt_chacha12(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5) {
%7 = tail call i8* @chacha12_decrypt(i8* %0, i64* %1, i8* %2, i64 %3, i8* %4, i8* %5)
ret i8* %7
}
/* Type definitions */
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double getCurrentTime(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  double curr = (tv.tv_sec) * 1000 + (tv.tv_usec) / 1000;
  return curr;
}


x86 assembly (clang, -O0):
<getCurrentTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCurrentTime>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
imul   $0x3e8,(%rsp),%eax
movslq 0x4(%rsp),%rcx
imul   $0x10624dd3,%rcx,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
add    %eax,%ecx
cvtsi2sd %ecx,%xmm0
pop    %rax
ret

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

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define double @getCurrentTime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000
%10 = add nsw i32 %9, %6
%11 = sitofp i32 %10 to double
ret double %11
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int G38_f(char *s) {
  debug("G38_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<G38_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xef9(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<G38_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf05(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"G38_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G38_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [46 x i8] c"G38_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @G38_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ egg_secure_free_full(void *, int);
void egg_secure_free(void *memory) { egg_secure_free_full(memory, 0x0001); }


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

x86 assembly (clang, -O2):
<egg_secure_free>:
mov    $0x1,%esi
jmp    1030 <egg_secure_free_full@plt>

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

LLVM IR (-O2):
define void @egg_secure_free(i8* %0) {
%2 = tail call i32 @egg_secure_free_full(i8* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void catch_chld(int sig) { printf("CHLD\n"); }


x86 assembly (clang, -O0):
<catch_chld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [5 x i8] c"CHLD\00"
define void @catch_chld(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
ret void
}
char *break_caesar_cipher(char *ciphertext, char *known_word) {
  char *plaintext = "";
  return plaintext;
}


x86 assembly (clang, -O0):
<break_caesar_cipher>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeed(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<break_caesar_cipher>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @break_caesar_cipher(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %5
ret i8* %6
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @break_caesar_cipher(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
long random();
double uniformdoublerand() {
  double result;
  long a, b;
  a = random();
  b = random();
  result = (double)(a - 1073741824) * 8388608.0 + (double)(b >> 8);
  return result;
}


x86 assembly (clang, -O0):
<uniformdoublerand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x0,%al
call   1030 <random@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <random@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x40000000,%rax
cvtsi2sd %rax,%xmm0
mov    -0x18(%rbp),%rax
sar    $0x8,%rax
cvtsi2sd %rax,%xmm1
movsd  0xeae(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uniformdoublerand>:
push   %rbx
xor    %eax,%eax
call   1030 <random@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <random@plt>
add    $0xffffffffc0000000,%rbx
cvtsi2sd %rbx,%xmm0
sar    $0x8,%rax
cvtsi2sd %rax,%xmm1
mulsd  0xec1(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @uniformdoublerand() {
%1 = alloca double
%2 = alloca i64
%3 = alloca i64
%4 = call i64 (...) @random()
store i64 %4, i64* %2
%5 = call i64 (...) @random()
store i64 %5, i64* %3
%6 = load i64, i64* %2
%7 = sub nsw i64 %6, 1073741824
%8 = sitofp i64 %7 to double
%9 = load i64, i64* %3
%10 = ashr i64 %9, 8
%11 = sitofp i64 %10 to double
%12 = call double @llvm.fmuladd.f64(double %8, double 0x4160000000000000, double %11)
store double %12, double* %1
%13 = load double, double* %1
ret double %13
}

LLVM IR (-O2):
define double @uniformdoublerand() {
%1 = tail call i64 (...) @random()
%2 = tail call i64 (...) @random()
%3 = add nsw i64 %1, -1073741824
%4 = sitofp i64 %3 to double
%5 = ashr i64 %2, 8
%6 = sitofp i64 %5 to double
%7 = tail call double @llvm.fmuladd.f64(double %4, double 0x4160000000000000, double %6)
ret double %7
}
void ff_hevc_put_hevc_bi_w_qpel_h4_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_w_qpel_h4_12_sse4() {
ret void
}
/* Variables and functions */
char *collect_regular_string(char *);
char *collect_weird_string(char *);
scalar_t__ weird(char *);
char *parse_string(char *string) {
  if (weird(string))
    return collect_weird_string(string);
  else
    return collect_regular_string(string);
}


x86 assembly (clang, -O0):
<parse_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <weird@plt>
cmp    $0x0,%rax
je     1161 <parse_string+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <collect_weird_string@plt>
mov    %rax,-0x8(%rbp)
jmp    116e <parse_string+0x3e>
mov    -0x10(%rbp),%rdi
call   1040 <collect_regular_string@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_string>:
push   %rbx
mov    %rdi,%rbx
call   1050 <weird@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     1147 <parse_string+0x17>
pop    %rbx
jmp    1030 <collect_weird_string@plt>
pop    %rbx
jmp    1040 <collect_regular_string@plt>

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

LLVM IR (-O2):
define i8* @parse_string(i8* %0) {
%2 = tail call i64 @weird(i8* %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i8* @collect_weird_string(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i8* @collect_regular_string(i8* %0)
br label %8
8: ; preds = %6, %4
%9 = phi i8* [ %5, %4 ], [ %7, %6 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ link_failure_ynl();
scalar_t__ ynl(int, long double);
void test_ynl(int x, long double ld) {
  if (ynl(x, ld) != ynl(x, ld))
    link_failure_ynl();
}


x86 assembly (clang, -O0):
<test_ynl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
fldt   0x10(%rbp)
mov    %edi,-0x4(%rbp)
fstpt  -0x20(%rbp)
mov    -0x4(%rbp),%edi
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <ynl@plt>
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <ynl@plt>
mov    %rax,%rcx
mov    -0x28(%rbp),%rax
cmp    %rcx,%rax
je     116c <test_ynl+0x4c>
mov    $0x0,%al
call   1040 <link_failure_ynl@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ynl>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %edi,%ebx
fldt   0x40(%rsp)
fld    %st(0)
fstpt  0x1c(%rsp)
fstpt  (%rsp)
call   1030 <ynl@plt>
mov    %rax,%r14
fldt   0x1c(%rsp)
fstpt  (%rsp)
mov    %ebx,%edi
call   1030 <ynl@plt>
cmp    %rax,%r14
jne    1159 <test_ynl+0x39>
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
jmp    1040 <link_failure_ynl@plt>

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

LLVM IR (-O2):
define void @test_ynl(i32 %0, x86_fp80 %1) {
%3 = tail call i64 @ynl(i32 %0, x86_fp80 %1)
%4 = tail call i64 @ynl(i32 %0, x86_fp80 %1)
%5 = icmp eq i64 %3, %4
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (...) @link_failure_ynl()
br label %8
8: ; preds = %6, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblock_is_read_only() {
  printf("NOT IMPLEMENTED:"
         "pa_memblock_is_read_only"
         "\n");
}


x86 assembly (clang, -O0):
<pa_memblock_is_read_only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [41 x i8] c"NOT IMPLEMENTED:pa_memblock_is_read_only\00"
define i32 @pa_memblock_is_read_only() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int sd_bus_set_bus_client(void *bus,
                                                                 int b) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_set_bus_client>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_set_bus_client>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_set_bus_client(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_set_bus_client(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
int length(char string[]) {
  int index;
  for (index = 0; string[index] != '\0'; ++index)
    continue;
  return (index);
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <length+0x37>
jmp    1129 <length+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <length+0x10>
ret

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

LLVM IR (-O2):
define i32 @length(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ interpreter();
int main(void) {
  interpreter();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @interpreter()
ret i32 0
}
/* Variables and functions */
int strlen(char *);
char *unbracket(char *cp) {
  char *ep;
  if (*cp == '[') {
    ep = cp + (strlen(cp) - 1);
    if (*ep == ']') {
      *ep = '\0';
      ++cp;
    }
  }
  return (cp);
}


x86 assembly (clang, -O0):
<unbracket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    1178 <unbracket+0x68>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5d,%eax
jne    1173 <unbracket+0x63>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1178 <unbracket+0x68>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unbracket>:
push   %rbx
mov    %rdi,%rbx
cmpb   $0x5b,(%rdi)
jne    1133 <unbracket+0x23>
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0x5d,-0x1(%rax,%rbx,1)
jne    1133 <unbracket+0x23>
movb   $0x0,-0x1(%rbx,%rax,1)
add    $0x1,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @unbracket(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 91
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %0)
%6 = add nsw i32 %5, -1
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 93
br i1 %10, label %11, label %13
11: ; preds = %4
store i8 0, i8* %8
%12 = getelementptr inbounds i8, i8* %0, i64 1
br label %13
13: ; preds = %4, %11, %1
%14 = phi i8* [ %12, %11 ], [ %0, %4 ], [ %0, %1 ]
ret i8* %14
}
void XWithdrawWindow() {}


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

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

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

LLVM IR (-O2):
define void @XWithdrawWindow() {
ret void
}
extern void _sfcbIndAuditLog(char *operation, char *objinfo) { return; }


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

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

LLVM IR (-O0):
define void @_sfcbIndAuditLog(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @_sfcbIndAuditLog(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
struct item_head {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ reiserfs_warning(char *);
int errcatch_bytes_number(struct item_head *ih, int block_size) {
  reiserfs_warning("green-16001: Invalid item type observed, run fsck ASAP\n");
  return 0;
}


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

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

LLVM IR (-O0):
%struct.item_head = type { i32 }
@.str = [56 x i8] c"green-16001: Invalid item type observed, run fsck ASAP\0A\00"
define i32 @errcatch_bytes_number(%struct.item_head* %0, i32 %1) {
%3 = alloca %struct.item_head*
%4 = alloca i32
store %struct.item_head* %0, %struct.item_head** %3
store i32 %1, i32* %4
%5 = call i32 @reiserfs_warning(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
%struct.item_head = type { i32 }
@.str = [56 x i8] c"green-16001: Invalid item type observed, run fsck ASAP\0A\00"
define i32 @errcatch_bytes_number(%struct.item_head* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @reiserfs_warning(i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int get_rw_offset(int);
unsigned int proctal_x86_64_dr_rw(unsigned long long dr7, int r) {
  int offset = get_rw_offset(r);
  if (offset == -1) {
    return 0;
  }
  unsigned int mask = 0x3u << offset;
  return (dr7 & mask) >> offset;
}


x86 assembly (clang, -O0):
<proctal_x86_64_dr_rw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1030 <get_rw_offset@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1140 <proctal_x86_64_dr_rw+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1160 <proctal_x86_64_dr_rw+0x50>
mov    -0x18(%rbp),%ecx
mov    $0x3,%eax
shl    %cl,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
and    %rcx,%rax
mov    -0x18(%rbp),%ecx
shr    %cl,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proctal_x86_64_dr_rw>:
push   %rbx
mov    %rdi,%rbx
mov    %esi,%edi
call   1030 <get_rw_offset@plt>
mov    %eax,%ecx
mov    $0x3,%eax
shl    %cl,%eax
and    %eax,%ebx
shr    %cl,%rbx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
cmove  %eax,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @proctal_x86_64_dr_rw(i64 %0, i32 %1) {
%3 = tail call i32 @get_rw_offset(i32 %1)
%4 = icmp eq i32 %3, -1
%5 = shl i32 3, %3
%6 = zext i32 %5 to i64
%7 = and i64 %6, %0
%8 = zext i32 %3 to i64
%9 = lshr i64 %7, %8
%10 = trunc i64 %9 to i32
%11 = select i1 %4, i32 0, i32 %10
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ cap_user_header_t;
typedef int /*<<< orphan*/ cap_user_data_t;

/* Variables and functions */
int capSet(cap_user_header_t hdr, cap_user_data_t data) {
  int capset(cap_user_header_t hdr, cap_user_data_t data);
  return capset(hdr, data);
}


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

x86 assembly (clang, -O2):
<capSet>:
jmp    1030 <capset@plt>

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

LLVM IR (-O2):
define i32 @capSet(i32 %0, i32 %1) {
%3 = tail call i32 @capset(i32 %0, i32 %1)
ret i32 %3
}
long get_userblock_size_(void) { return 0; }


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

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

LLVM IR (-O0):
define i64 @get_userblock_size_() {
ret i64 0
}

LLVM IR (-O2):
define i64 @get_userblock_size_() {
ret i64 0
}
/* Variables and functions */
scalar_t__ eq(float, float);
int ge(float x, float y) { return ((x > y) || eq(x, y)); }


x86 assembly (clang, -O0):
<ge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mov    $0x1,%al
ucomiss -0x8(%rbp),%xmm0
mov    %al,-0x9(%rbp)
ja     114f <ge+0x3f>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <eq@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ge>:
mov    $0x1,%eax
ucomiss %xmm1,%xmm0
ja     112f <ge+0x1f>
push   %rax
call   1030 <eq@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @ge(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp ogt float %5, %6
br i1 %7, label %13, label %8
8: ; preds = %2
%9 = load float, float* %3
%10 = load float, float* %4
%11 = call i64 @eq(float %9, float %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %2
%14 = phi i1 [ true, %2 ], [ %12, %8 ]
%15 = zext i1 %14 to i32
ret i32 %15
}

LLVM IR (-O2):
define i32 @ge(float %0, float %1) {
%3 = fcmp ogt float %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i64 @eq(float %0, float %1)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %2
%9 = phi i32 [ 1, %2 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ verbose(char *, char *, int);
void cleanup_exit(int exit_code) {
  verbose("%s: exit with code %d\n", "seama", exit_code);
  exit(exit_code);
}


x86 assembly (clang, -O0):
<cleanup_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xecb(%rip),%rdi
lea    0xedb(%rip),%rsi
call   1030 <verbose@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<cleanup_exit>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
lea    0xee6(%rip),%rsi
mov    %ebx,%edx
call   1030 <verbose@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"%s: exit with code %d\0A\00"
@.str.1 = [6 x i8] c"seama\00"
define void @cleanup_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @verbose(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s: exit with code %d\0A\00"
@.str.1 = [6 x i8] c"seama\00"
define void @cleanup_exit(i32 %0) {
%2 = tail call i32 @verbose(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %0)
%3 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  int i;
  printf("ASCII TABLE");
  for (i = 0; i <= 255; i++)
    printf("\n%d - %c", i, i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1163 <main+0x53>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1134 <main+0x24>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xee6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee4(%rip),%rbx
xor    %ebp,%ebp
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %ebp,%edx
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x1,%ebp
cmp    $0x100,%ebp
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [12 x i8] c"ASCII TABLE\00"
@.str.1 = [9 x i8] c"\0A%d - %c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 255
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %2
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %1
ret i32 %15
}

LLVM IR (-O2):
@.str = [12 x i8] c"ASCII TABLE\00"
@.str.1 = [9 x i8] c"\0A%d - %c\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
%3 = phi i32 [ 0, %0 ], [ %5, %2 ]
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %3, i32 %3)
%5 = add nuw nsw i32 %3, 1
%6 = icmp eq i32 %5, 256
br i1 %6, label %7, label %2
7: ; preds = %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int read_i2c_reg(int, int, int /*<<< orphan*/ *);
int piups_getvcc(int file_i2c, uint16_t *vcc) {
  return read_i2c_reg(file_i2c, 0x20, vcc);
}


x86 assembly (clang, -O0):
<piups_getvcc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    $0x20,%esi
call   1030 <read_i2c_reg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<piups_getvcc>:
mov    %rsi,%rdx
mov    $0x20,%esi
jmp    1030 <read_i2c_reg@plt>

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

LLVM IR (-O2):
define i32 @piups_getvcc(i32 %0, i32* %1) {
%3 = tail call i32 @read_i2c_reg(i32 %0, i32 32, i32* %1)
ret i32 %3
}
unsigned char *get_last_name(const unsigned char *str) {
  if (!str)
    return 0;
  char *p = strrchr(str, '/');
  if (!p)
    return strdup(str);
  return strdup(p + 1);
}


x86 assembly (clang, -O0):
<get_last_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1144 <get_last_name+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1184 <get_last_name+0x64>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1173 <get_last_name+0x53>
mov    -0x10(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
jmp    1184 <get_last_name+0x64>
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1040 <strdup@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_last_name>:
test   %rdi,%rdi
je     1144 <get_last_name+0x24>
push   %rbx
mov    %rdi,%rbx
mov    $0x2f,%esi
call   1030 <strrchr@plt>
lea    0x1(%rax),%rdi
test   %rax,%rax
cmove  %rbx,%rdi
pop    %rbx
jmp    1040 <strdup@plt>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define noalias i8* @get_last_name(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = tail call i8* @strrchr(i8* %0, i32 47)
%5 = icmp eq i8* %4, null
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = select i1 %5, i8* %0, i8* %6
%8 = tail call i8* @strdup(i8* %7)
br label %9
9: ; preds = %3, %1
%10 = phi i8* [ null, %1 ], [ %8, %3 ]
ret i8* %10
}
/* Variables and functions */
int /*<<< orphan*/ is_prime(size_t);
size_t next_prime(size_t seed) {
  seed |= 1;
  while (!is_prime(seed))
    seed += 2;
  return seed;
}


x86 assembly (clang, -O0):
<next_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
or     $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <is_prime@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1146 <next_prime+0x36>
jmp    1157 <next_prime+0x47>
mov    -0x8(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x8(%rbp)
jmp    1128 <next_prime+0x18>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_prime>:
push   %rbx
mov    %rdi,%rbx
or     $0x1,%rbx
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <is_prime@plt>
add    $0x2,%rbx
test   %eax,%eax
je     1120 <next_prime+0x10>
add    $0xfffffffffffffffe,%rbx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i64 @next_prime(i64 %0) {
%2 = or i64 %0, 1
br label %3
3: ; preds = %3, %1
%4 = phi i64 [ %2, %1 ], [ %7, %3 ]
%5 = tail call i32 @is_prime(i64 %4)
%6 = icmp eq i32 %5, 0
%7 = add i64 %4, 2
br i1 %6, label %3, label %8
8: ; preds = %3
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ SHA_CTX;

/* Variables and functions */
void *g_malloc(int, int);
void *ssl_sha1_info_create(void) { return g_malloc(sizeof(SHA_CTX), 1); }


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

x86 assembly (clang, -O2):
<ssl_sha1_info_create>:
mov    $0x4,%edi
mov    $0x1,%esi
jmp    1030 <g_malloc@plt>

LLVM IR (-O0):
define i8* @ssl_sha1_info_create() {
%1 = call i8* @g_malloc(i32 4, i32 1)
ret i8* %1
}

LLVM IR (-O2):
define i8* @ssl_sha1_info_create() {
%1 = tail call i8* @g_malloc(i32 4, i32 1)
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ free(double *);
int DestroyVec(double *b) {
  free(b);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @DestroyVec(double* nocapture %0) {
%2 = tail call i32 @free(double* %0)
ret i32 0
}
/* Type definitions */
struct cli_interface_cmdresp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cli_service_show_date_resp(struct cli_interface_cmdresp *,
                                              void *);
void cli_service_show_cliversion_resp(struct cli_interface_cmdresp *resp,
                                      void *priv) {
  cli_service_show_date_resp(resp, priv);
}


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

x86 assembly (clang, -O2):
<cli_service_show_cliversion_resp>:
jmp    1030 <cli_service_show_date_resp@plt>

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

LLVM IR (-O2):
%struct.cli_interface_cmdresp = type { i32 }
define void @cli_service_show_cliversion_resp(%struct.cli_interface_cmdresp* %0, i8* %1) {
%3 = tail call i32 @cli_service_show_date_resp(%struct.cli_interface_cmdresp* %0, i8* %1)
ret void
}
void XInitImage() {}


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

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

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

LLVM IR (-O2):
define void @XInitImage() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sdsfree(void *);
void dictSdsDestructor(void *privdata, void *val) {
  ((void)privdata);
  sdsfree(val);
}


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

x86 assembly (clang, -O2):
<dictSdsDestructor>:
mov    %rsi,%rdi
jmp    1030 <sdsfree@plt>

LLVM IR (-O0):
define void @dictSdsDestructor(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 @sdsfree(i8* %6)
ret void
}

LLVM IR (-O2):
define void @dictSdsDestructor(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @sdsfree(i8* %1)
ret void
}
void insertNumber() {}


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

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

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

LLVM IR (-O2):
define void @insertNumber() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ count_sort(int *, int);
int /*<<< orphan*/ dump(int *, int);
int /*<<< orphan*/ printf(char *);
int count_sort_test() {
  int a[10] = {1, 5, 6, 8, 10, 9, 3, 1, 2, 1};
  printf("\r\n conunt sort test ....");
  count_sort(a, 10);
  dump(a, 10);
  return 0;
}


x86 assembly (clang, -O0):
<count_sort_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xead(%rip),%rsi
mov    $0x28,%edx
call   1050 <memcpy@plt>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1060 <count_sort@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1040 <dump@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<count_sort_test>:
push   %rbx
sub    $0x30,%rsp
mov    0xee4(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xeac(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1050 <count_sort@plt>
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <dump@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.count_sort_test.a = [10 x i32] [i32 1, i32 5, i32 6, i32 8, i32 10, i32 9, i32 3, i32 1, i32 2, i32 1]
@.str = [25 x i8] c"\0D\0A conunt sort test ....\00"
define i32 @count_sort_test() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%5 = call i32 @count_sort(i32* %4, i32 10)
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%7 = call i32 @dump(i32* %6, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.count_sort_test.a = [10 x i32] [i32 1, i32 5, i32 6, i32 8, i32 10, i32 9, i32 3, i32 1, i32 2, i32 1]
@.str = [25 x i8] c"\0D\0A conunt sort test ....\00"
define i32 @count_sort_test() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%5 = call i32 @count_sort(i32* %4, i32 10)
%6 = call i32 @dump(i32* %4, i32 10)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int null_medium_changed(uint8_t id) { return (0); }


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

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

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

LLVM IR (-O2):
define i32 @null_medium_changed(i32 %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char str[] = "CAFECAFE";
  char buffer[8];
  strcpy(buffer, str);
  printf("%s\n", buffer);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xed1(%rip),%rax
mov    %rax,-0x9(%rbp)
mov    0xecf(%rip),%al
mov    %al,-0x1(%rbp)
lea    -0x11(%rbp),%rdi
lea    -0x9(%rbp),%rsi
call   1030 <strcpy@plt>
lea    -0x11(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movabs $0x4546414345464143,%rax
41 46 45
mov    %rax,0x8(%rsp)
movb   $0x0,0x10(%rsp)
lea    0x18(%rsp),%rbx
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xeb7(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [9 x i8] c"CAFECAFE\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [8 x i8]
%3 = bitcast [9 x i8]* %1 to i8*
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%6 = call i32 @strcpy(i8* %4, i8* %5)
%7 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [9 x i8] c"CAFECAFE\00"
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [9 x i8]
%2 = alloca [8 x i8]
%3 = getelementptr inbounds [9 x i8], [9 x i8]* %1, i64 0, i64 0
%4 = getelementptr inbounds [8 x i8], [8 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %3)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret i32 0
}
void av_dict_free() {}


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

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

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

LLVM IR (-O2):
define void @av_dict_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_getpwnam_free() {
  printf("NOT IMPLEMENTED:"
         "pa_getpwnam_free"
         "\n");
}


x86 assembly (clang, -O0):
<pa_getpwnam_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [33 x i8] c"NOT IMPLEMENTED:pa_getpwnam_free\00"
define i32 @pa_getpwnam_free() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @str, i64 0, i64 0))
ret i32 undef
}