xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ X509_VAL;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_VAL_it;
X509_VAL *X509_VAL_new(void) { return (X509_VAL *)ASN1_item_new(&X509_VAL_it); }


x86 assembly (clang, -O0):
<X509_VAL_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_VAL_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@X509_VAL_it = global i32 0
define i32* @X509_VAL_new() {
%1 = call i64 @ASN1_item_new(i32* @X509_VAL_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@X509_VAL_it = global i32 0
define i32* @X509_VAL_new() {
%1 = tail call i64 @ASN1_item_new(i32* @X509_VAL_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
/* Variables and functions */
int /*<<< orphan*/ orgfx_wait(int);
void orgfx_set_colorkey(unsigned int colorkey) {
  orgfx_wait(1);
  *((volatile unsigned int *)((0xB8000000 + 0x0c))) = colorkey;
}


x86 assembly (clang, -O0):
<orgfx_set_colorkey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1030 <orgfx_wait@plt>
mov    -0x4(%rbp),%ecx
mov    $0xb800000c,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orgfx_set_colorkey>:
push   %rbx
mov    %edi,%ebx
mov    $0x1,%edi
call   1030 <orgfx_wait@plt>
mov    $0xb800000c,%eax
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @orgfx_set_colorkey(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @orgfx_wait(i32 1)
%4 = load i32, i32* %2
store volatile i32 %4, i32* inttoptr (i64 3087007756 to i32*)
ret void
}

LLVM IR (-O2):
define void @orgfx_set_colorkey(i32 %0) {
%2 = tail call i32 @orgfx_wait(i32 1)
store volatile i32 %0, i32* inttoptr (i64 3087007756 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double, double, double, double);
void print(double v) { printf("|%13.4a|%13.4f|%13.4e|%13.4g|\n", v, v, v, v); }


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  -0x8(%rbp),%xmm3
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
lea    0xee9(%rip),%rdi
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"|%13.4a|%13.4f|%13.4e|%13.4g|\0A\00"
define void @print(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = load double, double* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %3, double %4, double %5, double %6)
ret void
}

LLVM IR (-O2):
@.str = [31 x i8] c"|%13.4a|%13.4f|%13.4e|%13.4g|\0A\00"
define void @print(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %0, double %0, double %0, double %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mtspr(scalar_t__, unsigned long);
unsigned long int clear_ttmr() {
  unsigned long int ttmr = 0x00000000;
  (mtspr(((10 << (11)) + 0), ttmr));
  return ttmr;
}


x86 assembly (clang, -O0):
<clear_ttmr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x5000,%edi
call   1030 <mtspr@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_ttmr>:
push   %rax
mov    $0x5000,%edi
xor    %esi,%esi
call   1030 <mtspr@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @clear_ttmr() {
%1 = alloca i64
store i64 0, i64* %1
%2 = load i64, i64* %1
%3 = call i32 @mtspr(i64 20480, i64 %2)
%4 = load i64, i64* %1
ret i64 %4
}

LLVM IR (-O2):
define i64 @clear_ttmr() {
%1 = tail call i32 @mtspr(i64 20480, i64 0)
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
char *malloc(int);
int /*<<< orphan*/ stdin;
size_t strcspn(char *, char *);
char *read_string() {
  char *ret = malloc(100 + 10);
  fgets(ret, 100, stdin);
  ret[strcspn(ret, "\r\n")] = 0;
  return ret;
}


x86 assembly (clang, -O0):
<read_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x6e,%edi
call   1050 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e97(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1040 <fgets@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe90(%rip),%rsi
call   1030 <strcspn@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_string>:
push   %rbx
mov    $0x6e,%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1040 <fgets@plt>
lea    0xea5(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcspn@plt>
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@stdin = global i32 0
@.str = [3 x i8] c"\0D\0A\00"
define i8* @read_string() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 110)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %3, i32 100, i32 %4)
%6 = load i8*, i8** %1
%7 = load i8*, i8** %1
%8 = call i64 @strcspn(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%9 = getelementptr inbounds i8, i8* %6, i64 %8
store i8 0, i8* %9
%10 = load i8*, i8** %1
ret i8* %10
}

LLVM IR (-O2):
@stdin = global i32 0
@.str = [3 x i8] c"\0D\0A\00"
define i8* @read_string() {
%1 = tail call dereferenceable_or_null(110) i8* @malloc(i32 110)
%2 = load i32, i32* @stdin
%3 = tail call i32 @fgets(i8* %1, i32 100, i32 %2)
%4 = tail call i64 @strcspn(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds i8, i8* %1, i64 %4
store i8 0, i8* %5
ret i8* %1
}
/* Variables and functions */
int /*<<< orphan*/ make_licensed_prog();
int real_epoll_create(int);
int evil_epoll_create(int flags) {
  int ret = 0;
  make_licensed_prog();
  ret = real_epoll_create(flags);
  return ret;
}


x86 assembly (clang, -O0):
<evil_epoll_create>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <make_licensed_prog@plt>
mov    -0x4(%rbp),%edi
call   1040 <real_epoll_create@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evil_epoll_create>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <make_licensed_prog@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <real_epoll_create@plt>

LLVM IR (-O0):
define i32 @evil_epoll_create(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %3
%4 = call i32 (...) @make_licensed_prog()
%5 = load i32, i32* %2
%6 = call i32 @real_epoll_create(i32 %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @evil_epoll_create(i32 %0) {
%2 = tail call i32 (...) @make_licensed_prog()
%3 = tail call i32 @real_epoll_create(i32 %0)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;
typedef scalar_t__ wctype_t;
typedef int /*<<< orphan*/ __locale_t;

/* Variables and functions */
int wctype_table_lookup(char const *, int /*<<< orphan*/);
int __iswctype_l(wint_t wc, wctype_t desc, __locale_t locale) {
  if (desc == (wctype_t)0)
    return 0;
  return wctype_table_lookup((const char *)desc, wc);
}


x86 assembly (clang, -O0):
<__iswctype_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1139 <__iswctype_l+0x29>
movl   $0x0,-0x4(%rbp)
jmp    1148 <__iswctype_l+0x38>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <wctype_table_lookup@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__iswctype_l>:
test   %rsi,%rsi
je     1121 <__iswctype_l+0x11>
mov    %edi,%eax
mov    %rsi,%rdi
mov    %eax,%esi
jmp    1030 <wctype_table_lookup@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @__iswctype_l(i32 %0, i64 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %5
store i64 %1, i64* %6
store i32 %2, i32* %7
%8 = load i64, i64* %6
%9 = icmp eq i64 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3
store i32 0, i32* %4
br label %16
11: ; preds = %3
%12 = load i64, i64* %6
%13 = inttoptr i64 %12 to i8*
%14 = load i32, i32* %5
%15 = call i32 @wctype_table_lookup(i8* %13, i32 %14)
store i32 %15, i32* %4
br label %16
16: ; preds = %11, %10
%17 = load i32, i32* %4
ret i32 %17
}

LLVM IR (-O2):
define i32 @__iswctype_l(i32 %0, i64 %1, i32 %2) {
%4 = icmp eq i64 %1, 0
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = inttoptr i64 %1 to i8*
%7 = tail call i32 @wctype_table_lookup(i8* %6, i32 %0)
br label %8
8: ; preds = %3, %5
%9 = phi i32 [ %7, %5 ], [ 0, %3 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void *malloc(int);
void f3(int size) {
  if (size < 0) {
    void *ptr = malloc(size);
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<f3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    114a <f3+0x2a>
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f3>:
test   %edi,%edi
js     1125 <f3+0x5>
ret
push   %rax
call   1040 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @f3(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i8* @malloc(i32 %0)
%5 = tail call i32 @free(i8* %4)
br label %6
6: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ WriteInstruction(char *);
void CR_SpriteLeft(void) { WriteInstruction("dec (ix+9)"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"dec (ix+9)\00"
define void @CR_SpriteLeft() {
%1 = call i32 @WriteInstruction(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"dec (ix+9)\00"
define void @CR_SpriteLeft() {
%1 = tail call i32 @WriteInstruction(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int gdt_compare_string(const void *p1, const void *p2) {
  char *s1 = *((char **)p1);
  char *s2 = *((char **)p2);
  return strcmp(s1, s2);
}


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

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

LLVM IR (-O0):
define i32 @gdt_compare_string(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = call i32 @strcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @gdt_compare_string(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
scalar_t__ isspace(char const);
int strcmp(char const *, char const *);
int bgp_field_compare(const char *s1, const char *s2) {
  int i = 0;
  while (isspace(s1[i]))
    i++;
  return strcmp(s1 + i, s2);
}


x86 assembly (clang, -O0):
<bgp_field_compare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     1160 <bgp_field_compare+0x40>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <bgp_field_compare+0x17>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bgp_field_compare>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl 0x1(%r15,%rbx,1),%edi
call   1030 <isspace@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1140 <bgp_field_compare+0x20>
mov    %ebx,%eax
add    %rax,%r15
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @bgp_field_compare(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = tail call i64 @isspace(i8 signext %6)
%8 = icmp eq i64 %7, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
%11 = and i64 %4, 4294967295
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = tail call i32 @strcmp(i8* %12, i8* dereferenceable(1) %1)
ret i32 %13
}
/* Variables and functions */
size_t max(size_t a, size_t b) {
  if (a > b)
    return a;
  return b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1127 <max+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    112f <max+0x2f>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
scalar_t__ deen_emalloc(scalar_t__);
int /*<<< orphan*/ sprintf(char *, char *, char const *, char *, char const *);
scalar_t__ strlen(char const *);
char *deen_leaf_path(const char *root_dir, const char *leafname) {
  char *result = (char *)deen_emalloc(strlen(root_dir) + strlen(leafname) + 2);
  sprintf(result, "%s%s%s", root_dir, "/", leafname);
  return result;
}


x86 assembly (clang, -O0):
<deen_leaf_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x20(%rbp),%rdi
add    %rax,%rdi
add    $0x2,%rdi
call   1030 <deen_emalloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%r8
lea    0xe83(%rip),%rsi
lea    0xe83(%rip),%rcx
call   1050 <sprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deen_leaf_path>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
lea    (%rbx,%rax,1),%rdi
add    $0x2,%rdi
call   1030 <deen_emalloc@plt>
mov    %rax,%rbx
lea    0xe9e(%rip),%rsi
lea    0xe9e(%rip),%rcx
mov    %rax,%rdi
mov    %r15,%rdx
mov    %r14,%r8
call   1050 <sprintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [2 x i8] c"/\00"
define i8* @deen_leaf_path(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
%10 = add nsw i64 %7, %9
%11 = add nsw i64 %10, 2
%12 = call i64 @deen_emalloc(i64 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %5
%14 = load i8*, i8** %5
%15 = load i8*, i8** %3
%16 = load i8*, i8** %4
%17 = call i32 @sprintf(i8* %14, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %16)
%18 = load i8*, i8** %5
ret i8* %18
}

LLVM IR (-O2):
@.str = [7 x i8] c"%s%s%s\00"
@.str.1 = [2 x i8] c"/\00"
define i8* @deen_leaf_path(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add i64 %3, 2
%6 = add i64 %5, %4
%7 = tail call i64 @deen_emalloc(i64 %6)
%8 = inttoptr i64 %7 to i8*
%9 = tail call i32 @sprintf(i8* dereferenceable(1) %8, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* %1)
ret i8* %8
}
int eis5_to_temp(int eis5temp) {
  unsigned char exp;
  int temp = 0;
  exp = (eis5temp >> 11) & 0x0F;
  temp = (eis5temp & 0x07FF) << exp;
  if (eis5temp >> 15 == 1)
    temp = -temp;
  return temp;
}


x86 assembly (clang, -O0):
<eis5_to_temp>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xb,%eax
and    $0xf,%eax
mov    %al,-0x5(%rbp)
mov    -0x4(%rbp),%eax
and    $0x7ff,%eax
movzbl -0x5(%rbp),%ecx
shl    %cl,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xf,%eax
cmp    $0x1,%eax
jne    1142 <eis5_to_temp+0x42>
xor    %eax,%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<eis5_to_temp>:
mov    %edi,%ecx
shr    $0xb,%ecx
mov    %edi,%edx
and    $0x7ff,%edx
and    $0xf,%cl
shl    %cl,%edx
and    $0xffff8000,%edi
mov    %edx,%eax
neg    %eax
cmp    $0x8000,%edi
cmovne %edx,%eax
ret

LLVM IR (-O0):
define i32 @eis5_to_temp(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
%5 = load i32, i32* %2
%6 = ashr i32 %5, 11
%7 = and i32 %6, 15
%8 = trunc i32 %7 to i8
store i8 %8, i8* %3
%9 = load i32, i32* %2
%10 = and i32 %9, 2047
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %10, %12
store i32 %13, i32* %4
%14 = load i32, i32* %2
%15 = ashr i32 %14, 15
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %20
17: ; preds = %1
%18 = load i32, i32* %4
%19 = sub nsw i32 0, %18
store i32 %19, i32* %4
br label %20
20: ; preds = %17, %1
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @eis5_to_temp(i32 %0) {
%2 = lshr i32 %0, 11
%3 = and i32 %2, 15
%4 = and i32 %0, 2047
%5 = shl nuw nsw i32 %4, %3
%6 = and i32 %0, -32768
%7 = icmp eq i32 %6, 32768
%8 = sub nsw i32 0, %5
%9 = select i1 %7, i32 %8, i32 %5
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int null_free(BIO *a) {
  if (a == NULL)
    return (0);
  return (1);
}


x86 assembly (clang, -O0):
<null_free>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <null_free+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1126 <null_free+0x26>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<null_free>:
xor    %eax,%eax
test   %rdi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @null_free(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
store i32* %0, i32** %3
%4 = load i32*, i32** %3
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %8
7: ; preds = %1
store i32 1, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @null_free(i32* readnone %0) {
%2 = icmp ne i32* %0, null
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void sub_eax_imm32(unsigned int imm32) {
  put8(0x2D);
  put32(imm32);
}


x86 assembly (clang, -O0):
<sub_eax_imm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x2d,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub_eax_imm32>:
push   %rbx
mov    %edi,%ebx
mov    $0x2d,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @sub_eax_imm32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @put8(i32 45)
%4 = load i32, i32* %2
%5 = call i32 @put32(i32 %4)
ret void
}

LLVM IR (-O2):
define void @sub_eax_imm32(i32 %0) {
%2 = tail call i32 @put8(i32 45)
%3 = tail call i32 @put32(i32 %0)
ret void
}
double tsd2dt(tsec)
double tsec;
{
  double date, time;
  ts2dt(tsec, &date, &time);
  return (time);
}


x86 assembly (clang, -O0):
<tsd2dt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsd2dt>:
sub    $0x18,%rsp
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @tsd2dt(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
%5 = load double, double* %2
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %5, double* %3, double* %4)
%7 = load double, double* %4
ret double %7
}

LLVM IR (-O2):
define double @tsd2dt(double %0) {
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %2 to i8*
%5 = bitcast double* %3 to i8*
%6 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %0, double* %2, double* %3)
%7 = load double, double* %3
ret double %7
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t hack_getl(const uint8_t *buf) {
  return (((uint32_t)buf[0]) << 24) | (((uint32_t)buf[1]) << 16) |
         (((uint32_t)buf[2]) << 8) | ((uint32_t)buf[3]);
}


x86 assembly (clang, -O0):
<hack_getl>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%rcx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x18(%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hack_getl>:
mov    (%rdi),%eax
mov    0x8(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x10(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0x18(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @hack_getl(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = getelementptr inbounds i64, i64* %3, i64 0
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 24
%8 = load i64*, i64** %2
%9 = getelementptr inbounds i64, i64* %8, i64 1
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 16
%13 = or i32 %7, %12
%14 = load i64*, i64** %2
%15 = getelementptr inbounds i64, i64* %14, i64 2
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = shl i32 %17, 8
%19 = or i32 %13, %18
%20 = load i64*, i64** %2
%21 = getelementptr inbounds i64, i64* %20, i64 3
%22 = load i64, i64* %21
%23 = trunc i64 %22 to i32
%24 = or i32 %19, %23
ret i32 %24
}

LLVM IR (-O2):
define i32 @hack_getl(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = trunc i64 %2 to i32
%4 = shl i32 %3, 24
%5 = getelementptr inbounds i64, i64* %0, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 16
%9 = or i32 %8, %4
%10 = getelementptr inbounds i64, i64* %0, i64 2
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = shl i32 %12, 8
%14 = or i32 %9, %13
%15 = getelementptr inbounds i64, i64* %0, i64 3
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = or i32 %14, %17
ret i32 %18
}
/* Type definitions */
struct RNAplot_args_info {
  int dummy;
};

/* Variables and functions */
int RNAplot_cmdline_parser2(int, char **, struct RNAplot_args_info *,
                            int /*<<< orphan*/, int, int);
int RNAplot_cmdline_parser(int argc, char **argv,
                           struct RNAplot_args_info *args_info) {
  return RNAplot_cmdline_parser2(argc, argv, args_info, 0, 1, 1);
}


x86 assembly (clang, -O0):
<RNAplot_cmdline_parser>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %ecx,%ecx
mov    $0x1,%r9d
mov    %r9d,%r8d
call   1030 <RNAplot_cmdline_parser2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNAplot_cmdline_parser>:
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    $0x1,%r9d
jmp    1030 <RNAplot_cmdline_parser2@plt>

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

LLVM IR (-O2):
%struct.RNAplot_args_info = type { i32 }
define i32 @RNAplot_cmdline_parser(i32 %0, i8** %1, %struct.RNAplot_args_info* %2) {
%4 = tail call i32 @RNAplot_cmdline_parser2(i32 %0, i8** %1, %struct.RNAplot_args_info* %2, i32 0, i32 1, i32 1)
ret i32 %4
}
/* Variables and functions */
scalar_t__ malloc(int);
int /*<<< orphan*/ strcpy(char *, char *);
int text_length(char *);
char *text_copy(char *text) {
  int size = text_length(text);
  char *copied_text = (char *)malloc(sizeof(char) * (size + 1));
  strcpy(copied_text, text);
  return copied_text;
}


x86 assembly (clang, -O0):
<text_copy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <text_length@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @text_copy(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @text_length(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = add nsw i32 %7, 1
%9 = sext i32 %8 to i64
%10 = mul i64 1, %9
%11 = trunc i64 %10 to i32
%12 = call i64 @malloc(i32 %11)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %4
%14 = load i8*, i8** %4
%15 = load i8*, i8** %2
%16 = call i32 @strcpy(i8* %14, i8* %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
define i8* @text_copy(i8* %0) {
%2 = tail call i32 @text_length(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
scalar_t__ regmatchInsensitive(char *, char *);
int isLogLevel(char *string) {
  if (regmatchInsensitive(string, "^logLevel=[1-9]+$")) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<isLogLevel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <regmatchInsensitive@plt>
cmp    $0x0,%rax
je     1142 <isLogLevel+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <isLogLevel+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLogLevel>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <regmatchInsensitive@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"^logLevel=[1-9]+$\00"
define i32 @isLogLevel(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @regmatchInsensitive(i8* %4, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [18 x i8] c"^logLevel=[1-9]+$\00"
define i32 @isLogLevel(i8* %0) {
%2 = tail call i64 @regmatchInsensitive(i8* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int xmlUCSIsBlockElements(int code) {
  return (((code >= 0x2580) && (code <= 0x259F)));
}


x86 assembly (clang, -O0):
<xmlUCSIsBlockElements>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x2580,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1126 <xmlUCSIsBlockElements+0x26>
cmpl   $0x259f,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmlUCSIsBlockElements>:
and    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x2580,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @xmlUCSIsBlockElements(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 9600
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 9631
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @xmlUCSIsBlockElements(i32 %0) {
%2 = and i32 %0, -32
%3 = icmp eq i32 %2, 9600
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int my_strlen(char *);
int /*<<< orphan*/ print_fatal_error(int);
void check_ops(char *ops) {
  if (my_strlen(ops) != 7)
    print_fatal_error(5);
}


x86 assembly (clang, -O0):
<check_ops>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <my_strlen@plt>
cmp    $0x7,%eax
je     1148 <check_ops+0x28>
mov    $0x5,%edi
call   1040 <print_fatal_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_ops>:
push   %rax
call   1030 <my_strlen@plt>
cmp    $0x7,%eax
jne    112d <check_ops+0xd>
pop    %rax
ret
mov    $0x5,%edi
pop    %rax
jmp    1040 <print_fatal_error@plt>

LLVM IR (-O0):
define void @check_ops(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @my_strlen(i8* %3)
%5 = icmp ne i32 %4, 7
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @print_fatal_error(i32 5)
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @check_ops(i8* %0) {
%2 = tail call i32 @my_strlen(i8* %0)
%3 = icmp eq i32 %2, 7
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @print_fatal_error(i32 5)
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, "klogin [-l username] hostname\n\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"klogin [-l username] hostname\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"klogin [-l username] hostname\0A\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct NCER {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ ncer_dump(struct NCER *, int /*<<< orphan*/ *);
struct NCER *open_nitro(char *, char);
void dump_ncer(void) {
  struct NCER *ncer = open_nitro("venu.ncer", 'NCER');
  ncer_dump(ncer, NULL);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<dump_ncer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
mov    $0x52,%esi
call   1030 <open_nitro@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <ncer_dump@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<dump_ncer>:
push   %rax
lea    0xec8(%rip),%rdi
mov    $0x52,%esi
call   1030 <open_nitro@plt>
mov    %rax,%rdi
xor    %esi,%esi
call   1040 <ncer_dump@plt>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.NCER = type { i32 }
@.str = [10 x i8] c"venu.ncer\00"
@EXIT_SUCCESS = global i32 0
define void @dump_ncer() {
%1 = alloca %struct.NCER*
%2 = call %struct.NCER* @open_nitro(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 82)
store %struct.NCER* %2, %struct.NCER** %1
%3 = load %struct.NCER*, %struct.NCER** %1
%4 = call i32 @ncer_dump(%struct.NCER* %3, i32* null)
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
%struct.NCER = type { i32 }
@.str = [10 x i8] c"venu.ncer\00"
@EXIT_SUCCESS = global i32 0
define void @dump_ncer() {
%1 = tail call %struct.NCER* @open_nitro(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 82)
%2 = tail call i32 @ncer_dump(%struct.NCER* %1, i32* null)
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef unsigned long u_int16_t;

/* Variables and functions */
int test_bit_u16(int nr, const u_int16_t *addr) {
  return ((1UL << (nr & 15)) & (addr[nr >> 4])) != 0;
}


x86 assembly (clang, -O0):
<test_bit_u16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    -0x10(%rbp),%rcx
mov    -0x4(%rbp),%edx
sar    $0x4,%edx
movslq %edx,%rdx
and    (%rcx,%rdx,8),%rax
cmp    $0x0,%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bit_u16>:
mov    %edi,%eax
and    $0xf,%al
sar    $0x4,%edi
movslq %edi,%rcx
mov    (%rsi,%rcx,8),%ecx
movzbl %al,%edx
xor    %eax,%eax
bt     %edx,%ecx
setb   %al
ret

LLVM IR (-O0):
define i32 @test_bit_u16(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 = and i32 %5, 15
%7 = zext i32 %6 to i64
%8 = shl i64 1, %7
%9 = load i64*, i64** %4
%10 = load i32, i32* %3
%11 = ashr i32 %10, 4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i64, i64* %9, i64 %12
%14 = load i64, i64* %13
%15 = and i64 %8, %14
%16 = icmp ne i64 %15, 0
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @test_bit_u16(i32 %0, i64* nocapture %1) {
%3 = and i32 %0, 15
%4 = zext i32 %3 to i64
%5 = shl nuw nsw i64 1, %4
%6 = ashr i32 %0, 4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i64, i64* %1, i64 %7
%9 = load i64, i64* %8
%10 = and i64 %9, %5
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
void loop1(int sum, int n) {
  for (; n != 0; --n) {
    sum += n;
  }
  return;
}


x86 assembly (clang, -O0):
<loop1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112b <loop1+0x2b>
mov    -0x8(%rbp),%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    110a <loop1+0xa>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @loop1(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pixel_unpack_u8s16_uv(unsigned char *, short *, int);
int /*<<< orphan*/ pixel_unpack_u8s16_y(unsigned char *, short *, int);
void llconv_yvu_planar_u8s16(unsigned char *source, short int *dest,
                             int nbpixels) {
  pixel_unpack_u8s16_y(source, dest, nbpixels >> 3);
  pixel_unpack_u8s16_uv(&source[nbpixels], &dest[nbpixels], nbpixels >> 4);
}


x86 assembly (clang, -O0):
<llconv_yvu_planar_u8s16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
sar    $0x3,%edx
call   1030 <pixel_unpack_u8s16_y@plt>
mov    -0x8(%rbp),%rdi
movslq -0x14(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x1,%rax
add    %rax,%rsi
mov    -0x14(%rbp),%edx
sar    $0x4,%edx
call   1040 <pixel_unpack_u8s16_uv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<llconv_yvu_planar_u8s16>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
sar    $0x3,%edx
call   1030 <pixel_unpack_u8s16_y@plt>
movslq %ebp,%rdx
add    %rdx,%rbx
lea    (%r14,%rdx,2),%rsi
sar    $0x4,%edx
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <pixel_unpack_u8s16_uv@plt>

LLVM IR (-O0):
define void @llconv_yvu_planar_u8s16(i8* %0, i16* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i16*
%6 = alloca i32
store i8* %0, i8** %4
store i16* %1, i16** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i16*, i16** %5
%9 = load i32, i32* %6
%10 = ashr i32 %9, 3
%11 = call i32 @pixel_unpack_u8s16_y(i8* %7, i16* %8, i32 %10)
%12 = load i8*, i8** %4
%13 = load i32, i32* %6
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i16*, i16** %5
%17 = load i32, i32* %6
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i16, i16* %16, i64 %18
%20 = load i32, i32* %6
%21 = ashr i32 %20, 4
%22 = call i32 @pixel_unpack_u8s16_uv(i8* %15, i16* %19, i32 %21)
ret void
}

LLVM IR (-O2):
define void @llconv_yvu_planar_u8s16(i8* %0, i16* %1, i32 %2) {
%4 = ashr i32 %2, 3
%5 = tail call i32 @pixel_unpack_u8s16_y(i8* %0, i16* %1, i32 %4)
%6 = sext i32 %2 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = getelementptr inbounds i16, i16* %1, i64 %6
%9 = ashr i32 %2, 4
%10 = tail call i32 @pixel_unpack_u8s16_uv(i8* %7, i16* %8, i32 %9)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int in(uint32_t i, uint32_t *arr) {
  while (*arr) {
    if (*arr++ == i) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<in>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpq   $0x0,(%rax)
je     1147 <in+0x47>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%rax
cmp    -0x10(%rbp),%rax
jne    1142 <in+0x42>
movl   $0x1,-0x4(%rbp)
jmp    114e <in+0x4e>
jmp    110c <in+0xc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in>:
mov    (%rsi),%rax
test   %rax,%rax
je     1117 <in+0x17>
add    $0x8,%rsi
cmp    %rdi,%rax
jne    1100 <in>
mov    $0x1,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @in(i64 %0, i64* nocapture %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64* [ %1, %2 ], [ %8, %7 ]
%5 = load i64, i64* %4
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = getelementptr inbounds i64, i64* %4, i64 1
%9 = icmp eq i64 %5, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %7
%11 = phi i32 [ 1, %7 ], [ 0, %3 ]
ret i32 %11
}
void UYVYToYRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @UYVYToYRow_Any_AVX2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ msf_pattern_create(int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char ownme[256];
  msf_pattern_create(500, ownme);
  printf("%s\n", ownme);
  return (0);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [256 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [256 x i8], [256 x i8]* %2, i64 0, i64 0
%4 = call i32 @msf_pattern_create(i32 500, i8* %3)
%5 = getelementptr inbounds [256 x i8], [256 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 [256 x i8]
%2 = getelementptr inbounds [256 x i8], [256 x i8]* %1, i64 0, i64 0
%3 = call i32 @msf_pattern_create(i32 500, 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
}
/* Variables and functions */
int check_arg_dev(int, char **);
int open_dev(char *);
size_t optind;
int get_dev(int argc, char **argv) {
  int ret;
  ret = check_arg_dev(argc, argv);
  if (ret)
    return ret;
  return open_dev(argv[optind]);
}


x86 assembly (clang, -O0):
<get_dev>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <check_arg_dev@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1153 <get_dev+0x33>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116d <get_dev+0x4d>
mov    -0x10(%rbp),%rax
mov    0x2e8a(%rip),%rcx
mov    (%rcx),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <open_dev@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_dev>:
push   %rbx
mov    %rsi,%rbx
call   1040 <check_arg_dev@plt>
test   %eax,%eax
je     112f <get_dev+0xf>
pop    %rbx
ret
mov    0x2eb2(%rip),%rax
mov    (%rax),%rax
mov    (%rbx,%rax,8),%rdi
pop    %rbx
jmp    1030 <open_dev@plt>

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

LLVM IR (-O2):
@optind = global i64 0
define i32 @get_dev(i32 %0, i8** %1) {
%3 = tail call i32 @check_arg_dev(i32 %0, i8** %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = load i64, i64* @optind
%7 = getelementptr inbounds i8*, i8** %1, i64 %6
%8 = load i8*, i8** %7
%9 = tail call i32 @open_dev(i8* %8)
br label %10
10: ; preds = %2, %5
%11 = phi i32 [ %9, %5 ], [ %3, %2 ]
ret i32 %11
}
void yydestruct(const char *yymsg, int yytype, int *yyvaluep) {
  ((void)(yyvaluep));
  if (!yymsg)
    yymsg = "Deleting";
  ;
  switch (yytype) {
  default:
    break;
  }
}


x86 assembly (clang, -O0):
<yydestruct>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1125 <yydestruct+0x25>
lea    0xedf(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112a <yydestruct+0x2a>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [9 x i8] c"Deleting\00"
define void @yydestruct(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
%8 = load i8*, i8** %4
%9 = icmp ne i8* %8, null
br i1 %9, label %11, label %10
10: ; preds = %3
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8** %4
br label %11
11: ; preds = %10, %3
%12 = load i32, i32* %5
switch i32 %12, label %13 [
]
13: ; preds = %11
br label %14
14: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @yydestruct(i8* nocapture %0, i32 %1, i32* nocapture %2) {
ret void
}