xunge/DecIR huggingface dataset:
/* Type definitions */
struct fix_tag_classifier {
  int dummy;
};

/* Variables and functions */
const struct fix_tag_classifier *
get_group_classifier_in_Stipulations(size_t __tag) {
  (void)__tag;
  return NULL;
}


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

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

LLVM IR (-O0):
%struct.fix_tag_classifier = type { i32 }
define %struct.fix_tag_classifier* @get_group_classifier_in_Stipulations(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
ret %struct.fix_tag_classifier* null
}

LLVM IR (-O2):
%struct.fix_tag_classifier = type { i32 }
define noalias %struct.fix_tag_classifier* @get_group_classifier_in_Stipulations(i64 %0) {
ret %struct.fix_tag_classifier* null
}
float dot2(const int *g, const float x, const float y) {
  return g[0] * x + g[1] * y;
}


x86 assembly (clang, -O0):
<dot2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ssl (%rax),%xmm0
movss  -0xc(%rbp),%xmm2
mov    -0x8(%rbp),%rax
cvtsi2ssl 0x4(%rax),%xmm1
mulss  -0x10(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot2>:
cvtsi2ssl (%rdi),%xmm2
cvtsi2ssl 0x4(%rdi),%xmm3
mulss  %xmm1,%xmm3
mulss  %xmm2,%xmm0
addss  %xmm3,%xmm0
ret

LLVM IR (-O0):
define float @dot2(i32* %0, float %1, float %2) {
%4 = alloca i32*
%5 = alloca float
%6 = alloca float
store i32* %0, i32** %4
store float %1, float* %5
store float %2, float* %6
%7 = load i32*, i32** %4
%8 = getelementptr inbounds i32, i32* %7, i64 0
%9 = load i32, i32* %8
%10 = sitofp i32 %9 to float
%11 = load float, float* %5
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = sitofp i32 %14 to float
%16 = load float, float* %6
%17 = fmul float %15, %16
%18 = call float @llvm.fmuladd.f32(float %10, float %11, float %17)
ret float %18
}

LLVM IR (-O2):
define float @dot2(i32* nocapture %0, float %1, float %2) {
%4 = load i32, i32* %0
%5 = sitofp i32 %4 to float
%6 = getelementptr inbounds i32, i32* %0, i64 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to float
%9 = fmul float %8, %2
%10 = tail call float @llvm.fmuladd.f32(float %5, float %1, float %9)
ret float %10
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlockattr_t;

/* Variables and functions */
int pthread_rwlockattr_getpshared(int /*<<< orphan*/ *, int *);
int my_pthread_rwlockattr_getpshared(pthread_rwlockattr_t *__attr,
                                     int *pshared) {
  pthread_rwlockattr_t *realattr = (pthread_rwlockattr_t *)*(int *)__attr;
  return pthread_rwlockattr_getpshared(realattr, pshared);
}


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

x86 assembly (clang, -O2):
<my_pthread_rwlockattr_getpshared>:
movslq (%rdi),%rdi
jmp    1030 <pthread_rwlockattr_getpshared@plt>

LLVM IR (-O0):
define i32 @my_pthread_rwlockattr_getpshared(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i32*
store i32* %9, i32** %5
%10 = load i32*, i32** %5
%11 = load i32*, i32** %4
%12 = call i32 @pthread_rwlockattr_getpshared(i32* %10, i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @my_pthread_rwlockattr_getpshared(i32* nocapture %0, i32* %1) {
%3 = load i32, i32* %0
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = tail call i32 @pthread_rwlockattr_getpshared(i32* %5, i32* %1)
ret i32 %6
}
/* Variables and functions */
int putc(char, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) { return putc('c', stdout); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb3(%rip),%rax
mov    (%rax),%esi
mov    $0x63,%edi
call   1030 <putc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%esi
mov    $0x63,%edi
jmp    1030 <putc@plt>

LLVM IR (-O0):
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* @stdout
%7 = call i32 @putc(i8 signext 99, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @putc(i8 signext 99, i32 %3)
ret i32 %4
}
/* Variables and functions */
int RSA2048_load(int, char *, unsigned char *, int);
int RSA2048_load_prikey_Q(int fd, unsigned char *RSA2048_Q) {
  int ret;
  ret = RSA2048_load(fd, "BF51018480", RSA2048_Q, 128);
  if (ret != 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<RSA2048_load_prikey_Q>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rdx
lea    0xed3(%rip),%rsi
mov    $0x80,%ecx
call   1030 <RSA2048_load@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1150 <RSA2048_load_prikey_Q+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1157 <RSA2048_load_prikey_Q+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RSA2048_load_prikey_Q>:
push   %rax
mov    %rsi,%rdx
lea    0xee5(%rip),%rsi
mov    $0x80,%ecx
call   1030 <RSA2048_load@plt>
xor    %ecx,%ecx
test   %eax,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"BF51018480\00"
define i32 @RSA2048_load_prikey_Q(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 @RSA2048_load(i32 %7, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %8, i32 128)
store i32 %9, i32* %6
%10 = load i32, i32* %6
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 1, i32* %3
br label %14
13: ; preds = %2
store i32 0, i32* %3
br label %14
14: ; preds = %13, %12
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@.str = [11 x i8] c"BF51018480\00"
define i32 @RSA2048_load_prikey_Q(i32 %0, i8* %1) {
%3 = tail call i32 @RSA2048_load(i32 %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %1, i32 128)
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
char *jid_partial(char *jid, int *len) {
  int n;
  for (n = 0; jid[n] && jid[n] != '/'; n++) {
  }
  *len = n;
  return jid;
}


x86 assembly (clang, -O0):
<jid_partial>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x15(%rbp)
je     1142 <jid_partial+0x42>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
setne  %al
mov    %al,-0x15(%rbp)
mov    -0x15(%rbp),%al
test   $0x1,%al
jne    1152 <jid_partial+0x52>
jmp    1165 <jid_partial+0x65>
jmp    1157 <jid_partial+0x57>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <jid_partial+0x13>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jid_partial>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rax,%rcx,1),%edx
test   %dl,%dl
je     1123 <jid_partial+0x23>
cmp    $0x2f,%dl
je     1123 <jid_partial+0x23>
add    $0x1,%rcx
jmp    1110 <jid_partial+0x10>
mov    %ecx,(%rsi)
ret

LLVM IR (-O0):
define i8* @jid_partial(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
store i32* %1, i32** %4
store i32 0, i32* %5
br label %6
6: ; preds = %25, %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 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %6
%15 = load i8*, i8** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i8, i8* %18
%20 = sext i8 %19 to i32
%21 = icmp ne i32 %20, 47
br label %22
22: ; preds = %14, %6
%23 = phi i1 [ false, %6 ], [ %21, %14 ]
br i1 %23, label %24, label %28
24: ; preds = %22
br label %25
25: ; preds = %24
%26 = load i32, i32* %5
%27 = add nsw i32 %26, 1
store i32 %27, i32* %5
br label %6
28: ; preds = %22
%29 = load i32, i32* %5
%30 = load i32*, i32** %4
store i32 %29, i32* %30
%31 = load i8*, i8** %3
ret i8* %31
}

LLVM IR (-O2):
define i8* @jid_partial(i8* returned %0, i32* nocapture writeonly %1) {
br label %3
3: ; preds = %7, %2
%4 = phi i64 [ %8, %7 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
switch i8 %6, label %7 [
i8 0, label %9
i8 47, label %9
]
7: ; preds = %3
%8 = add nuw i64 %4, 1
br label %3
9: ; preds = %3, %3
%10 = trunc i64 %4 to i32
store i32 %10, i32* %1
ret i8* %0
}
void sdsfreesplitres(char **tokens, int count) {
  if (!tokens)
    return;
  while (count--)
    free(tokens[count]);
  free(tokens);
}


x86 assembly (clang, -O0):
<sdsfreesplitres>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112f <sdsfreesplitres+0x1f>
jmp    1167 <sdsfreesplitres+0x57>
jmp    1134 <sdsfreesplitres+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
je     115e <sdsfreesplitres+0x4e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
jmp    1134 <sdsfreesplitres+0x24>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdsfreesplitres>:
test   %rdi,%rdi
je     1165 <sdsfreesplitres+0x55>
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %esi,%r15d
mov    %rdi,%r14
test   %esi,%esi
je     1152 <sdsfreesplitres+0x42>
movslq %r15d,%rax
lea    (%r14,%rax,8),%r12
add    $0xfffffffffffffff8,%r12
neg    %r15d
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
mov    (%r12,%rbx,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbx
cmp    %ebx,%r15d
jne    1140 <sdsfreesplitres+0x30>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @sdsfreesplitres(i8** %0, i32 %1) {
%3 = icmp eq i8** %0, null
br i1 %3, label %17, label %4
4: ; preds = %2
%5 = icmp eq i32 %1, 0
br i1 %5, label %15, label %6
6: ; preds = %4
%7 = sext i32 %1 to i64
br label %8
8: ; preds = %6, %8
%9 = phi i64 [ %7, %6 ], [ %10, %8 ]
%10 = add nsw i64 %9, -1
%11 = getelementptr inbounds i8*, i8** %0, i64 %10
%12 = load i8*, i8** %11
tail call void @free(i8* %12)
%13 = trunc i64 %10 to i32
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %8
15: ; preds = %8, %4
%16 = bitcast i8** %0 to i8*
tail call void @free(i8* %16)
br label %17
17: ; preds = %2, %15
ret void
}
void lib1_function(void) {}


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

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

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

LLVM IR (-O2):
define void @lib1_function() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ compilerAssert();
void chpl_decRefCountsForDomainsInArrayEltTypes5(void) {
  compilerAssert();
  return;
}


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

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

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

LLVM IR (-O2):
define void @chpl_decRefCountsForDomainsInArrayEltTypes5() {
%1 = tail call i32 (...) @compilerAssert()
ret void
}
int drv_mixed_text_recover(int p) { return p; }


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

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

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

LLVM IR (-O2):
define i32 @drv_mixed_text_recover(i32 returned %0) {
ret i32 %0
}
/* Variables and functions */
void *mem_alloc(int, size_t, char *);
void *mem_alloc_l3align(size_t size, char *str) {
  return mem_alloc((64), size, str);
}


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

x86 assembly (clang, -O2):
<mem_alloc_l3align>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x40,%edi
jmp    1030 <mem_alloc@plt>

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

LLVM IR (-O2):
define i8* @mem_alloc_l3align(i64 %0, i8* %1) {
%3 = tail call i8* @mem_alloc(i32 64, i64 %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void MPI_status(void) { printf("MPI: not supported by this binary\n"); }


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

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

LLVM IR (-O0):
@.str = [35 x i8] c"MPI: not supported by this binary\0A\00"
define void @MPI_status() {
%1 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [34 x i8] c"MPI: not supported by this binary\00"
define void @MPI_status() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
ret void
}
void RandomFunc(unsigned long input[1], unsigned long output[1]) {
  unsigned long state[1];
  unsigned long local1;
  {
    state[0UL] = (input[0UL] + 914778474UL) * 67330564296145686UL;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] = state[local1] + state[0UL];
      local1++;
    }
    output[0UL] = (state[0UL] - 964964849UL) - 1156823440UL;
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
add    $0x3686696a,%rax
movabs $0xef34ca9f65fb16,%rcx
imul   %rcx,%rax
mov    %rax,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x1,-0x20(%rbp)
jae    1160 <RandomFunc+0x60>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp,%rax,8),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1133 <RandomFunc+0x33>
mov    -0x18(%rbp),%rcx
sub    $0x398431f1,%rcx
sub    $0x44f3b990,%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomFunc>:
movabs $0x1de69953ecbf62c,%rax
69 de 01
imul   (%rdi),%rax
movabs $0xbec3d33d4cfc0eb7,%rcx
d3 c3 be
add    %rax,%rcx
mov    %rcx,(%rsi)
ret

LLVM IR (-O0):
define void @RandomFunc(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca [1 x i64]
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = getelementptr inbounds i64, i64* %7, i64 0
%9 = load i64, i64* %8
%10 = add i64 %9, 914778474
%11 = mul i64 %10, 67330564296145686
%12 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %11, i64* %12
store i64 0, i64* %6
br label %13
13: ; preds = %16, %2
%14 = load i64, i64* %6
%15 = icmp ult i64 %14, 1
br i1 %15, label %16, label %26
16: ; preds = %13
%17 = load i64, i64* %6
%18 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 %17
%19 = load i64, i64* %18
%20 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%21 = load i64, i64* %20
%22 = add i64 %19, %21
%23 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
store i64 %22, i64* %23
%24 = load i64, i64* %6
%25 = add i64 %24, 1
store i64 %25, i64* %6
br label %13
26: ; preds = %13
%27 = getelementptr inbounds [1 x i64], [1 x i64]* %5, i64 0, i64 0
%28 = load i64, i64* %27
%29 = sub i64 %28, 964964849
%30 = sub i64 %29, 1156823440
%31 = load i64*, i64** %4
%32 = getelementptr inbounds i64, i64* %31, i64 0
store i64 %30, i64* %32
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i64* nocapture %0, i64* nocapture writeonly %1) {
%3 = load i64, i64* %0
%4 = mul i64 %3, 134661128592291372
%5 = add i64 %4, -4700681325806612809
store i64 %5, i64* %1
ret void
}
int test_imm_DCint64_highword_reg(long long val) {
  return ((val >> 32) & (0xDC << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_DCint64_highword_reg>:
movabs $0xdc00000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_DCint64_highword_reg(i64 %0) {
%2 = and i64 %0, 944892805120
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void buffer_destroy(void *buf) { free(buf); }


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

x86 assembly (clang, -O2):
<buffer_destroy>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @buffer_destroy(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
void crc32_close(unsigned long *value) { *value = ~*value; }


x86 assembly (clang, -O0):
<crc32_close>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
xor    $0xffffffffffffffff,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32_close>:
notq   (%rdi)
ret

LLVM IR (-O0):
define void @crc32_close(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = xor i64 %4, -1
%6 = load i64*, i64** %2
store i64 %5, i64* %6
ret void
}

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

/* Variables and functions */
int /*<<< orphan*/ add();
int /*<<< orphan*/ bym(int /*<<< orphan*/);
void add_bym(uint32_t x) {
  bym(x);
  add();
}


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

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

LLVM IR (-O0):
define void @add_bym(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @bym(i32 %3)
%5 = call i32 (...) @add()
ret void
}

LLVM IR (-O2):
define void @add_bym(i32 %0) {
%2 = tail call i32 @bym(i32 %0)
%3 = tail call i32 (...) @add()
ret void
}
unsigned bitCount_fun_uchar(unsigned char x) {
  unsigned r = x & 1;
  while (x >>= 1)
    r += x & 1;
  return r;
}


x86 assembly (clang, -O0):
<bitCount_fun_uchar>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
mov    %eax,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x1,%eax
mov    %al,-0x1(%rbp)
cmp    $0x0,%al
je     1138 <bitCount_fun_uchar+0x38>
movzbl -0x1(%rbp),%eax
and    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1114 <bitCount_fun_uchar+0x14>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitCount_fun_uchar>:
mov    %edi,%eax
and    $0x1,%eax
cmp    $0x2,%dil
jb     1124 <bitCount_fun_uchar+0x24>
mov    %edi,%ecx
nopl   (%rax)
shr    %cl
mov    %ecx,%edx
and    $0x1,%dl
movzbl %dl,%edx
add    %edx,%eax
cmp    $0x3,%dil
mov    %ecx,%edi
ja     1110 <bitCount_fun_uchar+0x10>
ret

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

LLVM IR (-O2):
define i32 @bitCount_fun_uchar(i8 zeroext %0) {
%2 = and i8 %0, 1
%3 = zext i8 %2 to i32
%4 = icmp ult i8 %0, 2
br i1 %4, label %13, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %8, %5 ], [ %0, %1 ]
%7 = phi i32 [ %11, %5 ], [ %3, %1 ]
%8 = lshr i8 %6, 1
%9 = and i8 %8, 1
%10 = zext i8 %9 to i32
%11 = add i32 %7, %10
%12 = icmp ult i8 %6, 4
br i1 %12, label %13, label %5
13: ; preds = %5, %1
%14 = phi i32 [ %3, %1 ], [ %11, %5 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void getopt_modify_string(char **str, char *newvalue) {
  char *old = *str;
  *str = newvalue;
  if (old != NULL)
    free(old);
}


x86 assembly (clang, -O0):
<getopt_modify_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),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x18(%rbp)
je     114a <getopt_modify_string+0x3a>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getopt_modify_string>:
mov    %rdi,%rax
mov    (%rdi),%rdi
mov    %rsi,(%rax)
test   %rdi,%rdi
je     1123 <getopt_modify_string+0x13>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @getopt_modify_string(i8** nocapture %0, i8* %1) {
%3 = load i8*, i8** %0
store i8* %1, i8** %0
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @free(i8* %3)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Putb(int, int);
extern void DoScan(void) { Putb(0x24, 3); }


x86 assembly (clang, -O0):
<DoScan>:
push   %rbp
mov    %rsp,%rbp
mov    $0x24,%edi
mov    $0x3,%esi
call   1030 <Putb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoScan>:
mov    $0x24,%edi
mov    $0x3,%esi
jmp    1030 <Putb@plt>

LLVM IR (-O0):
define void @DoScan() {
%1 = call i32 @Putb(i32 36, i32 3)
ret void
}

LLVM IR (-O2):
define void @DoScan() {
%1 = tail call i32 @Putb(i32 36, i32 3)
ret void
}
void right_position_encoder_interrupt_init(void) {}


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

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

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

LLVM IR (-O2):
define void @right_position_encoder_interrupt_init() {
ret void
}
/* Type definitions */
typedef size_t uint64_t;

/* Variables and functions */
uint64_t _txFee(uint64_t feePerKb, size_t size) {
  uint64_t standardFee = size * 1000ULL / 1000,
           fee = (((size * feePerKb / 1000) + 99) / 100) * 100;
  return (fee > standardFee) ? fee : standardFee;
}


x86 assembly (clang, -O0):
<_txFee>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
imul   $0x3e8,-0x10(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
imul   -0x8(%rbp),%rax
mov    $0x3e8,%ecx
xor    %edx,%edx
div    %rcx
add    $0x63,%rax
mov    $0x64,%ecx
xor    %edx,%edx
div    %rcx
imul   $0x64,%rax,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
jbe    1166 <_txFee+0x66>
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
jmp    116e <_txFee+0x6e>
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_txFee>:
imul   $0x3e8,%rsi,%rax
shr    $0x3,%rax
movabs $0x20c49ba5e353f7cf,%r8
9b c4 20
mul    %r8
mov    %rdx,%rcx
shr    $0x4,%rcx
imul   %rsi,%rdi
shr    $0x3,%rdi
mov    %rdi,%rax
mul    %r8
shr    $0x4,%rdx
lea    0x63(%rdx),%rax
shr    $0x2,%rax
movabs $0x28f5c28f5c28f5c3,%rdx
c2 f5 28
mul    %rdx
shr    $0x2,%rdx
imul   $0x64,%rdx,%rax
cmp    %rcx,%rax
cmova  %rax,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @_txFee(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %4
%8 = mul i64 %7, 1000
%9 = udiv i64 %8, 1000
store i64 %9, i64* %5
%10 = load i64, i64* %4
%11 = load i64, i64* %3
%12 = mul i64 %10, %11
%13 = udiv i64 %12, 1000
%14 = add i64 %13, 99
%15 = udiv i64 %14, 100
%16 = mul i64 %15, 100
store i64 %16, i64* %6
%17 = load i64, i64* %6
%18 = load i64, i64* %5
%19 = icmp ugt i64 %17, %18
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = load i64, i64* %6
br label %24
22: ; preds = %2
%23 = load i64, i64* %5
br label %24
24: ; preds = %22, %20
%25 = phi i64 [ %21, %20 ], [ %23, %22 ]
ret i64 %25
}

LLVM IR (-O2):
define i64 @_txFee(i64 %0, i64 %1) {
%3 = mul i64 %1, 1000
%4 = udiv i64 %3, 1000
%5 = mul i64 %1, %0
%6 = udiv i64 %5, 1000
%7 = add nuw nsw i64 %6, 99
%8 = urem i64 %7, 100
%9 = sub nuw nsw i64 %7, %8
%10 = icmp ugt i64 %9, %4
%11 = select i1 %10, i64 %9, i64 %4
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ outl(unsigned int, int);
void pci_write_config32(unsigned addr, unsigned int value) {
  outl(0x80000000 | (addr & ~3), 0xCF8);
  outl(value, 0xCFC);
}


x86 assembly (clang, -O0):
<pci_write_config32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
and    $0xfffffffc,%edi
or     $0x80000000,%edi
mov    $0xcf8,%esi
call   1030 <outl@plt>
mov    -0x8(%rbp),%edi
mov    $0xcfc,%esi
call   1030 <outl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pci_write_config32>:
push   %rbx
mov    %esi,%ebx
and    $0x7ffffffc,%edi
or     $0x80000000,%edi
mov    $0xcf8,%esi
call   1030 <outl@plt>
mov    %ebx,%edi
mov    $0xcfc,%esi
pop    %rbx
jmp    1030 <outl@plt>

LLVM IR (-O0):
define void @pci_write_config32(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 = and i32 %5, -4
%7 = or i32 -2147483648, %6
%8 = call i32 @outl(i32 %7, i32 3320)
%9 = load i32, i32* %4
%10 = call i32 @outl(i32 %9, i32 3324)
ret void
}

LLVM IR (-O2):
define void @pci_write_config32(i32 %0, i32 %1) {
%3 = and i32 %0, 2147483644
%4 = or i32 %3, -2147483648
%5 = tail call i32 @outl(i32 %4, i32 3320)
%6 = tail call i32 @outl(i32 %1, i32 3324)
ret void
}
void termend() {}


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

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

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

LLVM IR (-O2):
define void @termend() {
ret void
}
const char *checksum_name(int num) {
  switch (num) {
  case 0:
    return ("none");
  case 1:
    return ("crc32");
  case 2:
    return ("sha256");
  }
  return ("unknown");
}


x86 assembly (clang, -O0):
<checksum_name>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
test   %eax,%eax
je     113c <checksum_name+0x3c>
jmp    111a <checksum_name+0x1a>
mov    -0x10(%rbp),%eax
sub    $0x1,%eax
je     114c <checksum_name+0x4c>
jmp    112b <checksum_name+0x2b>
mov    -0x10(%rbp),%eax
sub    $0x2,%eax
je     115c <checksum_name+0x5c>
jmp    116c <checksum_name+0x6c>
lea    0xebd(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <checksum_name+0x77>
lea    0xeb2(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <checksum_name+0x77>
lea    0xea8(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1177 <checksum_name+0x77>
lea    0xe9f(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<checksum_name>:
cmp    $0x2,%edi
ja     1117 <checksum_name+0x17>
movslq %edi,%rax
lea    0xf0d(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
ret
lea    0xef4(%rip),%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"none\00"
@.str.1 = [6 x i8] c"crc32\00"
@.str.2 = [7 x i8] c"sha256\00"
@.str.3 = [8 x i8] c"unknown\00"
define i8* @checksum_name(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %8 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
]
5: ; preds = %1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %2
br label %9
6: ; preds = %1
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %2
br label %9
7: ; preds = %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8** %2
br label %9
8: ; preds = %1
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8** %2
br label %9
9: ; preds = %8, %7, %6, %5
%10 = load i8*, i8** %2
ret i8* %10
}

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
@.str.1 = [6 x i8] c"crc32\00"
@.str.2 = [7 x i8] c"sha256\00"
@.str.3 = [8 x i8] c"unknown\00"
@reltable.checksum_name = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([5 x i8]* @.str to i64), i64 ptrtoint ([3 x i32]* @reltable.checksum_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([6 x i8]* @.str.1 to i64), i64 ptrtoint ([3 x i32]* @reltable.checksum_name to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([7 x i8]* @.str.2 to i64), i64 ptrtoint ([3 x i32]* @reltable.checksum_name to i64)) to i32)]
define i8* @checksum_name(i32 %0) {
%2 = icmp ult i32 %0, 3
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = sext i32 %0 to i64
%5 = shl i64 %4, 2
%6 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.checksum_name to i8*), i64 %5)
br label %7
7: ; preds = %1, %3
%8 = phi i8* [ %6, %3 ], [ getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), %1 ]
ret i8* %8
}
int in_char_array(char *haystack, char needle) {
  for (char *curr = haystack; *curr != '\0'; curr++) {
    if (*curr == needle) {
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<in_char_array>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     115b <in_char_array+0x5b>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    1145 <in_char_array+0x45>
movl   $0x1,-0x4(%rbp)
jmp    1162 <in_char_array+0x62>
jmp    114a <in_char_array+0x4a>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1116 <in_char_array+0x16>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_char_array>:
movzbl (%rdi),%ecx
test   %cl,%cl
je     1110 <in_char_array+0x10>
add    $0x1,%rdi
cmp    %sil,%cl
jne    1100 <in_char_array>
xor    %eax,%eax
test   %cl,%cl
setne  %al
ret

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

LLVM IR (-O2):
define i32 @in_char_array(i8* nocapture %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = icmp eq i8 %5, %1
%8 = or i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %10, label %3
10: ; preds = %3
%11 = xor i1 %6, true
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("REG_Base: %s\n", "ebx");
  printf("REG_Base: %d\n", 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee1(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x2,%esi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeef(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
mov    $0x2,%esi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [14 x i8] c"REG_Base: %s\0A\00"
@.str.1 = [4 x i8] c"ebx\00"
@.str.2 = [14 x i8] c"REG_Base: %d\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ write_instr(int);
void eval_mod(void) { write_instr(0x14); }


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

x86 assembly (clang, -O2):
<eval_mod>:
mov    $0x14,%edi
jmp    1030 <write_instr@plt>

LLVM IR (-O0):
define void @eval_mod() {
%1 = call i32 @write_instr(i32 20)
ret void
}

LLVM IR (-O2):
define void @eval_mod() {
%1 = tail call i32 @write_instr(i32 20)
ret void
}
/* Variables and functions */
scalar_t__ malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *str_create(char *src) {
  char *newstr;
  newstr = (char *)malloc(strlen(src) + 1);
  strcpy(newstr, src);
  return newstr;
}


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

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

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

LLVM IR (-O2):
define i8* @str_create(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @malloc(i64 %3)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @strcpy(i8* %5, i8* %0)
ret i8* %5
}
/* Variables and functions */
bool nrf53_errata_11(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf53_errata_11() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outb(int, int);
void uart_init() {
  outb(0x3f9, 0x00);
  outb(0x3fb, 0x80);
  outb(0x3f8, 0x03);
  outb(0x3f9, 0x00);
  outb(0x3fb, 0x03);
  outb(0x3fa, 0xc7);
  outb(0x3fc, 0x01);
}


x86 assembly (clang, -O0):
<uart_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3fa,%edi
mov    $0xc7,%esi
call   1030 <outb@plt>
mov    $0x3fc,%edi
mov    $0x1,%esi
call   1030 <outb@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<uart_init>:
push   %rax
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x80,%esi
call   1030 <outb@plt>
mov    $0x3f8,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3f9,%edi
xor    %esi,%esi
call   1030 <outb@plt>
mov    $0x3fb,%edi
mov    $0x3,%esi
call   1030 <outb@plt>
mov    $0x3fa,%edi
mov    $0xc7,%esi
call   1030 <outb@plt>
mov    $0x3fc,%edi
mov    $0x1,%esi
pop    %rax
jmp    1030 <outb@plt>

LLVM IR (-O0):
define void @uart_init() {
%1 = call i32 @outb(i32 1017, i32 0)
%2 = call i32 @outb(i32 1019, i32 128)
%3 = call i32 @outb(i32 1016, i32 3)
%4 = call i32 @outb(i32 1017, i32 0)
%5 = call i32 @outb(i32 1019, i32 3)
%6 = call i32 @outb(i32 1018, i32 199)
%7 = call i32 @outb(i32 1020, i32 1)
ret void
}

LLVM IR (-O2):
define void @uart_init() {
%1 = tail call i32 @outb(i32 1017, i32 0)
%2 = tail call i32 @outb(i32 1019, i32 128)
%3 = tail call i32 @outb(i32 1016, i32 3)
%4 = tail call i32 @outb(i32 1017, i32 0)
%5 = tail call i32 @outb(i32 1019, i32 3)
%6 = tail call i32 @outb(i32 1018, i32 199)
%7 = tail call i32 @outb(i32 1020, i32 1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int wcscmp(int /*<<< orphan*/ const *, int /*<<< orphan*/ const *);
int wcscoll(const wchar_t *l, const wchar_t *r) { return wcscmp(l, r); }


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

x86 assembly (clang, -O2):
<wcscoll>:
jmp    1030 <wcscmp@plt>

LLVM IR (-O0):
define i32 @wcscoll(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 @wcscmp(i32* %5, i32* %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @wcscoll(i32* %0, i32* %1) {
%3 = tail call i32 @wcscmp(i32* %0, i32* %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_foo_foo() { printf("from baz foo foo\n"); }


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

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

LLVM IR (-O0):
@.str = [18 x i8] c"from baz foo foo\0A\00"
define void @print_foo_foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [17 x i8] c"from baz foo foo\00"
define void @print_foo_foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int);
int main(int argc, char const *argv[]) {
  int c;
  c = getchar();
  while (c != EOF) {
    putchar(c);
    c = getchar();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2e9e(%rip),%rcx
cmp    (%rcx),%eax
je     1169 <main+0x49>
mov    -0x14(%rbp),%edi
call   1030 <putchar@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x14(%rbp)
jmp    1140 <main+0x20>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2eb9(%rip),%rbx
cmp    (%rbx),%eax
je     1152 <main+0x32>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @getchar()
store i32 %7, i32* %6
br label %8
8: ; preds = %12, %2
%9 = load i32, i32* %6
%10 = load i32, i32* @EOF
%11 = icmp ne i32 %9, %10
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i32, i32* %6
%14 = call i32 @putchar(i32 %13)
%15 = call i32 (...) @getchar()
store i32 %15, i32* %6
br label %8
16: ; preds = %8
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getchar()
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %12, label %6
6: ; preds = %2, %6
%7 = phi i32 [ %9, %6 ], [ %3, %2 ]
%8 = tail call i32 @putchar(i32 %7)
%9 = tail call i32 (...) @getchar()
%10 = load i32, i32* @EOF
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret i32 0
}
void gdk_x11_image_get_ximage() {}


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

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

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

LLVM IR (-O2):
define void @gdk_x11_image_get_ximage() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CRYPTO_free_ex_index(int /*<<< orphan*/, int);
int /*<<< orphan*/ ERR_get_state();
int /*<<< orphan*/ OPENSSL_INIT_LOAD_CRYPTO_STRINGS;
int /*<<< orphan*/ OPENSSL_init_crypto(int /*<<< orphan*/,
                                       int /*<<< orphan*/ *);
int FuzzerInitialize(int *argc, char ***argv) {
  OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  CRYPTO_free_ex_index(0, -1);
  ERR_get_state();
  return 1;
}


x86 assembly (clang, -O0):
<FuzzerInitialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <OPENSSL_init_crypto@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1050 <CRYPTO_free_ex_index@plt>
mov    $0x0,%al
call   1030 <ERR_get_state@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FuzzerInitialize>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <OPENSSL_init_crypto@plt>
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1050 <CRYPTO_free_ex_index@plt>
xor    %eax,%eax
call   1030 <ERR_get_state@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* %0, i8*** %1) {
%3 = alloca i32*
%4 = alloca i8***
store i32* %0, i32** %3
store i8*** %1, i8**** %4
%5 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%6 = call i32 @OPENSSL_init_crypto(i32 %5, i32* null)
%7 = call i32 @CRYPTO_free_ex_index(i32 0, i32 -1)
%8 = call i32 (...) @ERR_get_state()
ret i32 1
}

LLVM IR (-O2):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%4 = tail call i32 @OPENSSL_init_crypto(i32 %3, i32* null)
%5 = tail call i32 @CRYPTO_free_ex_index(i32 0, i32 -1)
%6 = tail call i32 (...) @ERR_get_state()
ret i32 1
}