xunge/DecIR huggingface dataset:
/* Variables and functions */
long long strtoll(char const *, char **, int);
long long _be_decode_int(const char **data, long long *data_len) {
  char *endp;
  long long ret = strtoll(*data, &endp, 10);
  *data_len -= (endp - *data);
  *data = endp;
  return ret;
}


x86 assembly (clang, -O0):
<_be_decode_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
lea    -0x18(%rbp),%rsi
mov    $0xa,%edx
call   1030 <strtoll@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
sub    %rax,%rdx
mov    -0x10(%rbp),%rax
mov    (%rax),%rcx
sub    %rdx,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_be_decode_int>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%rdi
mov    %rsp,%rsi
mov    $0xa,%edx
call   1030 <strtoll@plt>
mov    (%rsp),%rcx
mov    (%rbx),%rdx
sub    %rcx,%rdx
add    %rdx,(%r14)
mov    %rcx,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @_be_decode_int(i8** %0, i64* %1) {
%3 = alloca i8**
%4 = alloca i64*
%5 = alloca i8*
%6 = alloca i64
store i8** %0, i8*** %3
store i64* %1, i64** %4
%7 = load i8**, i8*** %3
%8 = load i8*, i8** %7
%9 = call i64 @strtoll(i8* %8, i8** %5, i32 10)
store i64 %9, i64* %6
%10 = load i8*, i8** %5
%11 = load i8**, i8*** %3
%12 = load i8*, i8** %11
%13 = ptrtoint i8* %10 to i64
%14 = ptrtoint i8* %12 to i64
%15 = sub i64 %13, %14
%16 = load i64*, i64** %4
%17 = load i64, i64* %16
%18 = sub nsw i64 %17, %15
store i64 %18, i64* %16
%19 = load i8*, i8** %5
%20 = load i8**, i8*** %3
store i8* %19, i8** %20
%21 = load i64, i64* %6
ret i64 %21
}

LLVM IR (-O2):
define i64 @_be_decode_int(i8** nocapture %0, i64* nocapture %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = load i8*, i8** %0
%6 = call i64 @strtoll(i8* %5, i8** %3, i32 10)
%7 = load i8*, i8** %3
%8 = load i8*, i8** %0
%9 = ptrtoint i8* %7 to i64
%10 = ptrtoint i8* %8 to i64
%11 = sub i64 %10, %9
%12 = load i64, i64* %1
%13 = add i64 %11, %12
store i64 %13, i64* %1
store i8* %7, i8** %0
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ ReadNeededBitMaps(void *);
int /*<<< orphan*/ ReadNeededFloats(void *);
int /*<<< orphan*/ ReadNeededIntegers(void *);
int /*<<< orphan*/ ReadNeededSymbols(void *);
void ReadNeededAtomicValues(void *theEnv) {
  ReadNeededSymbols(theEnv);
  ReadNeededFloats(theEnv);
  ReadNeededIntegers(theEnv);
  ReadNeededBitMaps(theEnv);
}


x86 assembly (clang, -O0):
<ReadNeededAtomicValues>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <ReadNeededSymbols@plt>
mov    -0x8(%rbp),%rdi
call   1040 <ReadNeededFloats@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ReadNeededIntegers@plt>
mov    -0x8(%rbp),%rdi
call   1050 <ReadNeededBitMaps@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ReadNeededAtomicValues>:
push   %rbx
mov    %rdi,%rbx
call   1060 <ReadNeededSymbols@plt>
mov    %rbx,%rdi
call   1040 <ReadNeededFloats@plt>
mov    %rbx,%rdi
call   1030 <ReadNeededIntegers@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1050 <ReadNeededBitMaps@plt>

LLVM IR (-O0):
define void @ReadNeededAtomicValues(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ReadNeededSymbols(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @ReadNeededFloats(i8* %5)
%7 = load i8*, i8** %2
%8 = call i32 @ReadNeededIntegers(i8* %7)
%9 = load i8*, i8** %2
%10 = call i32 @ReadNeededBitMaps(i8* %9)
ret void
}

LLVM IR (-O2):
define void @ReadNeededAtomicValues(i8* %0) {
%2 = tail call i32 @ReadNeededSymbols(i8* %0)
%3 = tail call i32 @ReadNeededFloats(i8* %0)
%4 = tail call i32 @ReadNeededIntegers(i8* %0)
%5 = tail call i32 @ReadNeededBitMaps(i8* %0)
ret void
}
int int_sort(const void *a, const void *b) {
  if (*(int *)a < *(int *)b) {
    return -1;
  } else if (*(int *)a == *(int *)b) {
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<int_sort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <int_sort+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1154 <int_sort+0x54>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1148 <int_sort+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1154 <int_sort+0x54>
jmp    114d <int_sort+0x4d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_sort>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @int_sort(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int mymain();
int main() { return mymain(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @mymain()
ret i32 %1
}
/* Variables and functions */
double floor(double);
double modf(double x, double *ipart) {
  double y = 0;
  y = floor(x);
  *ipart = x - y;
  return y;
}


x86 assembly (clang, -O0):
<modf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <floor@plt>
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modf>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
movsd  %xmm0,0x8(%rsp)
call   1030 <floor@plt>
movsd  0x8(%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define double @modf(double %0, double* %1) {
%3 = alloca double
%4 = alloca double*
%5 = alloca double
store double %0, double* %3
store double* %1, double** %4
store double 0.000000e+00, double* %5
%6 = load double, double* %3
%7 = call double @llvm.floor.f64(double %6)
store double %7, double* %5
%8 = load double, double* %3
%9 = load double, double* %5
%10 = fsub double %8, %9
%11 = load double*, double** %4
store double %10, double* %11
%12 = load double, double* %5
ret double %12
}

LLVM IR (-O2):
define double @modf(double %0, double* nocapture writeonly %1) {
%3 = tail call double @llvm.floor.f64(double %0)
%4 = fsub double %0, %3
store double %4, double* %1
ret double %3
}
void g_main_context_default() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_default() {
ret void
}
/* Variables and functions */
unsigned long long __tzcnt_u64(unsigned long long);
unsigned long long test__tzcnt_u64(unsigned long long __X) {
  return __tzcnt_u64(__X);
}


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

x86 assembly (clang, -O2):
<test__tzcnt_u64>:
jmp    1030 <__tzcnt_u64@plt>

LLVM IR (-O0):
define i64 @test__tzcnt_u64(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @__tzcnt_u64(i64 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @test__tzcnt_u64(i64 %0) {
%2 = tail call i64 @__tzcnt_u64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void usage(char *name) {
  printf("usage: %s [-n] [-h]\n", name);
  printf(" -n Nitro mode\n");
  printf(" -h Print this help message\n");
  return;
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
lea    0xedf(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"usage: %s [-n] [-h]\0A\00"
@.str.1 = [16 x i8] c" -n Nitro mode\0A\00"
@.str.2 = [29 x i8] c" -h Print this help message\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"usage: %s [-n] [-h]\0A\00"
@str = [15 x i8] c" -n Nitro mode\00"
@str.3 = [28 x i8] c" -h Print this help message\00"
define void @usage(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.3, i64 0, i64 0))
ret void
}
void smic_cleanup(struct si_sm_data *kcs) {}


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

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

LLVM IR (-O0):
%struct.si_sm_data = type opaque
define void @smic_cleanup(%struct.si_sm_data* %0) {
%2 = alloca %struct.si_sm_data*
store %struct.si_sm_data* %0, %struct.si_sm_data** %2
ret void
}

LLVM IR (-O2):
%struct.si_sm_data = type opaque
define void @smic_cleanup(%struct.si_sm_data* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ checkIfUnique(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char *str;
  scanf("%s", str);
  if (checkIfUnique(str) == 0) {
    printf("It has duplicate characters");
  } else {
    printf("String has all unique charaters\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <checkIfUnique@plt>
cmp    $0x0,%rax
jne    1173 <main+0x43>
lea    0xe9a(%rip),%rdi
call   1030 <printf@plt>
jmp    117f <main+0x4f>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1060 <scanf@plt>
call   1050 <checkIfUnique@plt>
test   %rax,%rax
je     1165 <main+0x25>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
jmp    1171 <main+0x31>
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [28 x i8] c"It has duplicate characters\00"
@.str.2 = [33 x i8] c"String has all unique charaters\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = load i8*, i8** %2
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i64 @checkIfUnique(i8* %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %0
%9 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [28 x i8] c"It has duplicate characters\00"
@str = [32 x i8] c"String has all unique charaters\00"
define i32 @main() {
%1 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* undef)
%2 = tail call i64 @checkIfUnique(i8* undef)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
br label %8
6: ; preds = %0
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str, i64 0, i64 0))
br label %8
8: ; preds = %6, %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ example(int);
int main(void) {
  example(10);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @example(i32 10)
ret i32 0
}
void rop3_246_1_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D ^ S;
  stk1 = T | stk2;
  *D = (stk1 & (~S)) | (*D & S);
}


x86 assembly (clang, -O0):
<rop3_246_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_246_1_0>:
mov    (%rdi),%al
mov    %eax,%ecx
xor    %sil,%cl
or     %dl,%cl
xor    %cl,%al
and    %sil,%al
xor    %cl,%al
mov    %al,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_246_1_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8*, i8** %4
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i8, i8* %5
%13 = zext i8 %12 to i32
%14 = xor i32 %11, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %8
%16 = load i8, i8* %6
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = or i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = xor i32 %25, -1
%27 = and i32 %23, %26
%28 = load i8*, i8** %4
%29 = load i8, i8* %28
%30 = zext i8 %29 to i32
%31 = load i8, i8* %5
%32 = zext i8 %31 to i32
%33 = and i32 %30, %32
%34 = or i32 %27, %33
%35 = trunc i32 %34 to i8
%36 = load i8*, i8** %4
store i8 %35, i8* %36
ret void
}

LLVM IR (-O2):
define void @rop3_246_1_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = or i8 %5, %2
%7 = xor i8 %1, -1
%8 = and i8 %6, %7
%9 = and i8 %4, %1
%10 = or i8 %8, %9
store i8 %10, i8* %0
ret void
}
void gdb_remove_symbol_file(void *addr) { return; }


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

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

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

LLVM IR (-O2):
define void @gdb_remove_symbol_file(i8* nocapture %0) {
ret void
}
int nibbleToChar(int n) { return (n < 10) ? n + '0' : n + 'A' - 10; }


x86 assembly (clang, -O0):
<nibbleToChar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    111f <nibbleToChar+0x1f>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
mov    %eax,-0x8(%rbp)
jmp    112b <nibbleToChar+0x2b>
mov    -0x4(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nibbleToChar>:
lea    0x37(%rdi),%ecx
lea    0x30(%rdi),%eax
cmp    $0xa,%edi
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @nibbleToChar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 10
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 48
br label %12
8: ; preds = %1
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 65
%11 = sub nsw i32 %10, 10
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ %7, %5 ], [ %11, %8 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @nibbleToChar(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = select i1 %2, i32 48, i32 55
%4 = add nsw i32 %3, %0
ret i32 %4
}
int UAX_Asm_RegTypeEquivP(int reg0, int reg1) {
  if ((reg0 & 0xF0) == (reg1 & 0xF0))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<UAX_Asm_RegTypeEquivP>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf0,%eax
mov    -0xc(%rbp),%ecx
and    $0xf0,%ecx
cmp    %ecx,%eax
jne    112f <UAX_Asm_RegTypeEquivP+0x2f>
movl   $0x1,-0x4(%rbp)
jmp    1136 <UAX_Asm_RegTypeEquivP+0x36>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UAX_Asm_RegTypeEquivP>:
xor    %esi,%edi
xor    %eax,%eax
test   $0xf0,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @UAX_Asm_RegTypeEquivP(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = and i32 %3, 240
%5 = icmp eq i32 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ STDERR_FILENO;
int /*<<< orphan*/ dprintf(int /*<<< orphan*/, char *, int /*<<< orphan*/);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int malloc_check(void *p) {
  if (p == NULL) {
    dprintf(STDERR_FILENO, "ERROR: %s\n", strerror(ENOMEM));
    exit(EXIT_FAILURE);
  } else {
    return (EXIT_SUCCESS);
  }
}


x86 assembly (clang, -O0):
<malloc_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1180 <malloc_check+0x50>
mov    0x2e8a(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2e86(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%edx
lea    0xe93(%rip),%rsi
call   1030 <dprintf@plt>
mov    0x2e57(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    0x2e41(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<malloc_check>:
push   %rbx
test   %rdi,%rdi
je     1141 <malloc_check+0x11>
mov    0x2e8b(%rip),%rax
mov    (%rax),%eax
pop    %rbx
ret
mov    0x2e90(%rip),%rax
mov    (%rax),%ebx
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
call   1050 <strerror@plt>
lea    0xea1(%rip),%rsi
mov    %ebx,%edi
mov    %eax,%edx
call   1030 <dprintf@plt>
mov    0x2e61(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@STDERR_FILENO = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
@ENOMEM = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @malloc_check(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* @STDERR_FILENO
%7 = load i32, i32* @ENOMEM
%8 = call i32 @strerror(i32 %7)
%9 = call i32 @dprintf(i32 %6, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @EXIT_FAILURE
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %1
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@STDERR_FILENO = global i32 0
@.str = [11 x i8] c"ERROR: %s\0A\00"
@ENOMEM = global i32 0
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @malloc_check(i8* readnone %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %10
3: ; preds = %1
%4 = load i32, i32* @STDERR_FILENO
%5 = load i32, i32* @ENOMEM
%6 = tail call i32 @strerror(i32 %5)
%7 = tail call i32 @dprintf(i32 %4, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
%11 = load i32, i32* @EXIT_SUCCESS
ret i32 %11
}
/* Variables and functions */
int strcmp(char const *, char const *);
int compare(const void *first, const void *second) {
  return strcmp((const char *)first, (const char *)second);
}


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

x86 assembly (clang, -O2):
<compare>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @compare(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %3
}
/* Variables and functions */
char *Ivyc_malloc(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *Ivyc_create_identifier(char *str) {
  char *new_str;
  new_str = Ivyc_malloc(strlen(str) + 1);
  strcpy(new_str, str);
  return new_str;
}


x86 assembly (clang, -O0):
<Ivyc_create_identifier>:
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 <Ivyc_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):
<Ivyc_create_identifier>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <Ivyc_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* @Ivyc_create_identifier(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @Ivyc_malloc(i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @Ivyc_create_identifier(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @Ivyc_malloc(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
void init_lcm_registers(void) { unsigned int data_array[16]; }


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

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

LLVM IR (-O0):
define void @init_lcm_registers() {
%1 = alloca [16 x i32]
ret void
}

LLVM IR (-O2):
define void @init_lcm_registers() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned int state;
};
typedef TYPE_1__ XMotionEvent;

/* Variables and functions */
void set_XMotionEvent_state(void *_p, unsigned _v) {
  ((XMotionEvent *)_p)->state = (unsigned)_v;
}


x86 assembly (clang, -O0):
<set_XMotionEvent_state>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XMotionEvent_state>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XMotionEvent_state(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XMotionEvent_state(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
int intel_ich_gpio_set(int, int);
int intel_ich_gpio26_raise(void) { return intel_ich_gpio_set(26, 1); }


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

x86 assembly (clang, -O2):
<intel_ich_gpio26_raise>:
mov    $0x1a,%edi
mov    $0x1,%esi
jmp    1030 <intel_ich_gpio_set@plt>

LLVM IR (-O0):
define i32 @intel_ich_gpio26_raise() {
%1 = call i32 @intel_ich_gpio_set(i32 26, i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @intel_ich_gpio26_raise() {
%1 = tail call i32 @intel_ich_gpio_set(i32 26, i32 1)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ print_content(void *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int print(void *l) {
  print_content(l, 0);
  printf("\n");
  return 1;
}


x86 assembly (clang, -O0):
<print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1040 <print_content@plt>
lea    0xec2(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print>:
push   %rax
xor    %esi,%esi
call   1040 <print_content@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @print(i8* %0) {
%2 = tail call i32 @print_content(i8* %0, i32 0)
%3 = tail call i32 @putchar(i32 10)
ret i32 1
}
/* Variables and functions */
scalar_t__ rint(float);
__attribute__((always_)) long int lrintf(float x) { return (int)(rint(x)); }


x86 assembly (clang, -O0):
<lrintf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <rint@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lrintf>:
push   %rax
call   1030 <rint@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @lrintf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i64 @rint(float %3)
%5 = trunc i64 %4 to i32
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @lrintf(float %0) {
%2 = tail call i64 @rint(float %0)
%3 = shl i64 %2, 32
%4 = ashr exact i64 %3, 32
ret i64 %4
}
/* Variables and functions */
unsigned char *haval160_buffer(unsigned char *, unsigned char const *, size_t);
unsigned char *hash_buffer_haval160(unsigned char *out, const unsigned char *in,
                                    size_t in_len) {
  return haval160_buffer(out, in, in_len);
}


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

x86 assembly (clang, -O2):
<hash_buffer_haval160>:
jmp    1030 <haval160_buffer@plt>

LLVM IR (-O0):
define i8* @hash_buffer_haval160(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i8* @haval160_buffer(i8* %7, i8* %8, i64 %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @hash_buffer_haval160(i8* %0, i8* %1, i64 %2) {
%4 = tail call i8* @haval160_buffer(i8* %0, i8* %1, i64 %2)
ret i8* %4
}
/* Type definitions */
struct terminal {
  int dummy;
};
struct parm_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ move_cursor(struct terminal *, int, int /*<<< orphan*/);
int sum(struct parm_t *);
void curs_up(struct terminal *term, void *arg) {
  int num = sum((struct parm_t *)arg);
  num = (num <= 0) ? 1 : num;
  move_cursor(term, -num, 0);
}


x86 assembly (clang, -O0):
<curs_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <sum@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     1153 <curs_up+0x33>
mov    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1159 <curs_up+0x39>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
sub    -0x14(%rbp),%esi
xor    %edx,%edx
call   1040 <move_cursor@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<curs_up>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
call   1030 <sum@plt>
test   %eax,%eax
mov    $0x1,%esi
cmovg  %eax,%esi
neg    %esi
mov    %rbx,%rdi
xor    %edx,%edx
pop    %rbx
jmp    1040 <move_cursor@plt>

LLVM IR (-O0):
%struct.terminal = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_up(%struct.terminal* %0, i8* %1) {
%3 = alloca %struct.terminal*
%4 = alloca i8*
%5 = alloca i32
store %struct.terminal* %0, %struct.terminal** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to %struct.parm_t*
%8 = call i32 @sum(%struct.parm_t* %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp sle i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %2
br label %14
12: ; preds = %2
%13 = load i32, i32* %5
br label %14
14: ; preds = %12, %11
%15 = phi i32 [ 1, %11 ], [ %13, %12 ]
store i32 %15, i32* %5
%16 = load %struct.terminal*, %struct.terminal** %3
%17 = load i32, i32* %5
%18 = sub nsw i32 0, %17
%19 = call i32 @move_cursor(%struct.terminal* %16, i32 %18, i32 0)
ret void
}

LLVM IR (-O2):
%struct.terminal = type { i32 }
%struct.parm_t = type { i32 }
define void @curs_up(%struct.terminal* %0, i8* %1) {
%3 = bitcast i8* %1 to %struct.parm_t*
%4 = tail call i32 @sum(%struct.parm_t* %3)
%5 = icmp sgt i32 %4, 1
%6 = select i1 %5, i32 %4, i32 1
%7 = sub nsw i32 0, %6
%8 = tail call i32 @move_cursor(%struct.terminal* %0, i32 %7, i32 0)
ret void
}
char to_hex(char code) {
  static char hex[] = "0123456789ABCDEF";
  return hex[code & 15];
}


x86 assembly (clang, -O0):
<to_hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0x2f15(%rip),%rax
movsbl (%rax,%rcx,1),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_hex>:
and    $0xf,%edi
lea    0xef6(%rip),%rax
mov    (%rdi,%rax,1),%al
ret

LLVM IR (-O0):
@to_hex.hex = internal global [17 x i8] c"0123456789ABCDEF\00"
define signext i8 @to_hex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 15
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds [17 x i8], [17 x i8]* @to_hex.hex, i64 0, i64 %6
%8 = load i8, i8* %7
ret i8 %8
}

LLVM IR (-O2):
@to_hex.hex = internal unnamed_addr constant [17 x i8] c"0123456789ABCDEF\00"
define signext i8 @to_hex(i8 signext %0) {
%2 = and i8 %0, 15
%3 = zext i8 %2 to i64
%4 = getelementptr inbounds [17 x i8], [17 x i8]* @to_hex.hex, i64 0, i64 %3
%5 = load i8, i8* %4
ret i8 %5
}
void idr_preload_end(void) {}


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

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

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

LLVM IR (-O2):
define void @idr_preload_end() {
ret void
}
/* Variables and functions */
scalar_t__ rb_isspace(int);
int is_non_newline_space(int c) { return rb_isspace(c) && c != '\n'; }


x86 assembly (clang, -O0):
<is_non_newline_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <rb_isspace@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
je     113f <is_non_newline_space+0x2f>
cmpl   $0xa,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_non_newline_space>:
push   %rbx
mov    %edi,%ebx
call   1030 <rb_isspace@plt>
test   %rax,%rax
setne  %al
cmp    $0xa,%ebx
setne  %cl
and    %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_non_newline_space(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @rb_isspace(i32 %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* %2
%8 = icmp ne i32 %7, 10
br label %9
9: ; preds = %6, %1
%10 = phi i1 [ false, %1 ], [ %8, %6 ]
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @is_non_newline_space(i32 %0) {
%2 = tail call i64 @rb_isspace(i32 %0)
%3 = icmp ne i64 %2, 0
%4 = icmp ne i32 %0, 10
%5 = and i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
void interrupts() {}


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

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

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

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

/* Variables and functions */
int Cyc_block_string_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_block_string(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_block_string_rec(lexbuf, 17);
  return _T0;
}


x86 assembly (clang, -O0):
<Cyc_block_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x11,%esi
call   1030 <Cyc_block_string_rec@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_block_string>:
mov    $0x11,%esi
jmp    1030 <Cyc_block_string_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_block_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_block_string_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 17)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_block_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_block_string_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 17)
ret i32 %2
}
/* Type definitions */
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int /*<<< orphan*/ inet_ntop(int /*<<< orphan*/, int /*<<< orphan*/ *, char *,
                             int);
int /*<<< orphan*/ printf(char *, char *);
void addClient(int s, struct sockaddr_in *newcliaddr) {
  char buf[20];
  inet_ntop(AF_INET, &newcliaddr->sin_addr, buf, sizeof(buf));
  printf("new client: %s\n", buf);
}


x86 assembly (clang, -O0):
<addClient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
lea    -0x30(%rbp),%rdx
mov    $0x14,%ecx
call   1030 <inet_ntop@plt>
lea    -0x30(%rbp),%rsi
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<addClient>:
push   %rbx
sub    $0x20,%rsp
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rbx
mov    %rbx,%rdx
mov    $0x14,%ecx
call   1030 <inet_ntop@plt>
lea    0xebb(%rip),%rdi
mov    %rbx,%rsi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
@AF_INET = global i32 0
@.str = [16 x i8] c"new client: %s\0A\00"
define void @addClient(i32 %0, %struct.sockaddr_in* %1) {
%3 = alloca i32
%4 = alloca %struct.sockaddr_in*
%5 = alloca [20 x i8]
store i32 %0, i32* %3
store %struct.sockaddr_in* %1, %struct.sockaddr_in** %4
%6 = load i32, i32* @AF_INET
%7 = load %struct.sockaddr_in*, %struct.sockaddr_in** %4
%8 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %7, i32 0, i32 0
%9 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%10 = call i32 @inet_ntop(i32 %6, i32* %8, i8* %9, i32 20)
%11 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %11)
ret void
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
@AF_INET = global i32 0
@.str = [16 x i8] c"new client: %s\0A\00"
define void @addClient(i32 %0, %struct.sockaddr_in* %1) {
%3 = alloca [20 x i8]
%4 = getelementptr inbounds [20 x i8], [20 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @AF_INET
%6 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %1, i64 0, i32 0
%7 = call i32 @inet_ntop(i32 %5, i32* %6, i8* %4, i32 20)
%8 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ Status;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
Status XScreenSaverQueryVersion(Display *dpy, int *major_version_return,
                                int *minor_version_return) {}


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

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

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

LLVM IR (-O2):
define i32 @XScreenSaverQueryVersion(i32* nocapture readnone %0, i32* nocapture readnone %1, i32* nocapture readnone %2) {
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void free_uint32_t(uint32_t _val) { return; }


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

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

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

LLVM IR (-O2):
define void @free_uint32_t(i32 %0) {
ret void
}
int foo1(int arg) {
  __asm volatile("" : "+r"(arg));
  return arg;
}


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

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

LLVM IR (-O0):
define i32 @foo1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 asm sideeffect "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
define i32 @foo1(i32 %0) {
%2 = tail call i32 asm sideeffect "", "=r,0,~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i32 %2
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
uint64_t uptsdiff(uint64_t pts1, uint64_t pts2) {
  int64_t diff;
  diff = pts1 - pts2;
  if (diff < 0) {
    diff = (300 * (0x0000000200000000ULL)) + diff;
  }
  return diff;
}


x86 assembly (clang, -O0):
<uptsdiff>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    1135 <uptsdiff+0x35>
movabs $0x25800000000,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uptsdiff>:
sub    %rsi,%rdi
movabs $0x25800000000,%rax
add    %rdi,%rax
test   %rdi,%rdi
cmovns %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @uptsdiff(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = icmp slt i64 %3, 0
%5 = add i64 %3, 2576980377600
%6 = select i1 %4, i64 %5, i64 %3
ret i64 %6
}
void av_cpu_max_align() {}


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

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

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

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

/* Variables and functions */
struct dnaSeq *faReadAllMixableInLf(struct lineFile *, int, int);
int /*<<< orphan*/ lineFileClose(struct lineFile **);
struct lineFile *lineFileOpen(char *, int /*<<< orphan*/);
struct dnaSeq *faReadAllSeqMixable(char *fileName, int isDna, int mixed) {
  struct lineFile *lf = lineFileOpen(fileName, 0);
  struct dnaSeq *seqList = faReadAllMixableInLf(lf, isDna, mixed);
  lineFileClose(&lf);
  return seqList;
}


x86 assembly (clang, -O0):
<faReadAllSeqMixable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
call   1050 <lineFileOpen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1040 <faReadAllMixableInLf@plt>
mov    %rax,-0x20(%rbp)
lea    -0x18(%rbp),%rdi
call   1030 <lineFileClose@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<faReadAllSeqMixable>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%ebp
xor    %esi,%esi
call   1050 <lineFileOpen@plt>
mov    %rax,(%rsp)
mov    %rax,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1040 <faReadAllMixableInLf@plt>
mov    %rax,%rbx
mov    %rsp,%rdi
call   1030 <lineFileClose@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.dnaSeq = type { i32 }
%struct.lineFile = type { i32 }
define %struct.dnaSeq* @faReadAllSeqMixable(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca %struct.lineFile*
%8 = alloca %struct.dnaSeq*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i8*, i8** %4
%10 = call %struct.lineFile* @lineFileOpen(i8* %9, i32 0)
store %struct.lineFile* %10, %struct.lineFile** %7
%11 = load %struct.lineFile*, %struct.lineFile** %7
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = call %struct.dnaSeq* @faReadAllMixableInLf(%struct.lineFile* %11, i32 %12, i32 %13)
store %struct.dnaSeq* %14, %struct.dnaSeq** %8
%15 = call i32 @lineFileClose(%struct.lineFile** %7)
%16 = load %struct.dnaSeq*, %struct.dnaSeq** %8
ret %struct.dnaSeq* %16
}

LLVM IR (-O2):
%struct.dnaSeq = type { i32 }
%struct.lineFile = type { i32 }
define %struct.dnaSeq* @faReadAllSeqMixable(i8* %0, i32 %1, i32 %2) {
%4 = alloca %struct.lineFile*
%5 = bitcast %struct.lineFile** %4 to i8*
%6 = tail call %struct.lineFile* @lineFileOpen(i8* %0, i32 0)
store %struct.lineFile* %6, %struct.lineFile** %4
%7 = tail call %struct.dnaSeq* @faReadAllMixableInLf(%struct.lineFile* %6, i32 %1, i32 %2)
%8 = call i32 @lineFileClose(%struct.lineFile** %4)
ret %struct.dnaSeq* %7
}
int findMinPos(int *el, int len) {
  int i;
  int min = el[0];
  for (i = len - 1; i >= 0; i--) {
    if (el[i] != 1 && el[i] != 0)
      return i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<findMinPos>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jl     1169 <findMinPos+0x69>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
je     1156 <findMinPos+0x56>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     1156 <findMinPos+0x56>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <findMinPos+0x70>
jmp    115b <findMinPos+0x5b>
mov    -0x18(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
jmp    111d <findMinPos+0x1d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<findMinPos>:
mov    %esi,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
test   %eax,%eax
jle    1121 <findMinPos+0x21>
add    $0xffffffffffffffff,%rax
mov    %eax,%ecx
cmpl   $0x2,(%rdi,%rcx,4)
jb     1110 <findMinPos+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @findMinPos(i32* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
%8 = load i32*, i32** %4
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
store i32 %10, i32* %7
%11 = load i32, i32* %5
%12 = sub nsw i32 %11, 1
store i32 %12, i32* %6
br label %13
13: ; preds = %33, %2
%14 = load i32, i32* %6
%15 = icmp sge i32 %14, 0
br i1 %15, label %16, label %36
16: ; preds = %13
%17 = load i32*, i32** %4
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = icmp ne i32 %21, 1
br i1 %22, label %23, label %32
23: ; preds = %16
%24 = load i32*, i32** %4
%25 = load i32, i32* %6
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
%28 = load i32, i32* %27
%29 = icmp ne i32 %28, 0
br i1 %29, label %30, label %32
30: ; preds = %23
%31 = load i32, i32* %6
store i32 %31, i32* %3
br label %37
32: ; preds = %23, %16
br label %33
33: ; preds = %32
%34 = load i32, i32* %6
%35 = add nsw i32 %34, -1
store i32 %35, i32* %6
br label %13
36: ; preds = %13
store i32 0, i32* %3
br label %37
37: ; preds = %36, %30
%38 = load i32, i32* %3
ret i32 %38
}

LLVM IR (-O2):
define i32 @findMinPos(i32* nocapture %0, i32 %1) {
%3 = zext i32 %1 to i64
br label %4
4: ; preds = %9, %2
%5 = phi i64 [ %6, %9 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = trunc i64 %5 to i32
%8 = icmp sgt i32 %7, 0
br i1 %8, label %9, label %16
9: ; preds = %4
%10 = and i64 %6, 4294967295
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp ult i32 %12, 2
br i1 %13, label %4, label %14
14: ; preds = %9
%15 = trunc i64 %6 to i32
br label %16
16: ; preds = %4, %14
%17 = phi i32 [ %15, %14 ], [ 0, %4 ]
ret i32 %17
}