xunge/DecIR huggingface dataset:
BOOST_AUTO_TEST_CASE(abs) {
  TESTCASE1(abs, 0, 0);
  TESTCASE1(abs, 1, 1);
  TESTCASE1(abs, -1, 1);
}


x86 assembly (clang, -O0):
<BOOST_AUTO_TEST_CASE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x8(%rbp),%edi
mov    $0x1,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x8(%rbp),%edi
mov    $0xffffffff,%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <TESTCASE1@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BOOST_AUTO_TEST_CASE>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1030 <TESTCASE1@plt>
mov    %ebx,%edi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <TESTCASE1@plt>
mov    %ebx,%edi
mov    $0xffffffff,%esi
mov    $0x1,%edx
xor    %eax,%eax
pop    %rbx
jmp    1030 <TESTCASE1@plt>

LLVM IR (-O0):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %4, i32 0, i32 0)
%6 = load i32, i32* %3
%7 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %6, i32 1, i32 1)
%8 = load i32, i32* %3
%9 = call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %8, i32 -1, i32 1)
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
define i32 @BOOST_AUTO_TEST_CASE(i32 %0) {
%2 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 0, i32 0)
%3 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 1, i32 1)
%4 = tail call i32 (i32, i32, i32, ...) bitcast (i32 (...)* @TESTCASE1 to i32 (i32, i32, i32, ...)*)(i32 %0, i32 -1, i32 1)
ret i32 undef
}
/* Variables and functions */
float pow(float, int);
float inQuart(float t, float b, float c, float d) {
  return c * pow(t / d, 4) + b;
}


x86 assembly (clang, -O0):
<inQuart>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
divss  -0x10(%rbp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm2
movss  -0x14(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inQuart>:
push   %rax
movss  %xmm2,(%rsp)
movss  %xmm1,0x4(%rsp)
divss  %xmm3,%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
mulss  (%rsp),%xmm0
addss  0x4(%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @inQuart(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %7
%10 = load float, float* %5
%11 = load float, float* %8
%12 = fdiv float %10, %11
%13 = call float @pow(float %12, i32 4)
%14 = load float, float* %6
%15 = call float @llvm.fmuladd.f32(float %9, float %13, float %14)
ret float %15
}

LLVM IR (-O2):
define float @inQuart(float %0, float %1, float %2, float %3) {
%5 = fdiv float %0, %3
%6 = tail call float @pow(float %5, i32 4)
%7 = tail call float @llvm.fmuladd.f32(float %2, float %6, float %1)
ret float %7
}
/* Variables and functions */
scalar_t__ isspace(unsigned char);
char *skip_ws(char *s) {
  while (*s && isspace((unsigned char)*s))
    s++;
  return s;
}


x86 assembly (clang, -O0):
<skip_ws>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1147 <skip_ws+0x37>
mov    -0x8(%rbp),%rax
movzbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1157 <skip_ws+0x47>
jmp    1168 <skip_ws+0x58>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_ws+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_ws>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1139 <skip_ws+0x29>
nopw   0x0(%rax,%rax,1)
movzbl %al,%edi
call   1030 <isspace@plt>
test   %rax,%rax
je     1139 <skip_ws+0x29>
movzbl 0x1(%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <skip_ws+0x10>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @skip_ws(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %15, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = call i64 @isspace(i8 zeroext %10)
%12 = icmp ne i64 %11, 0
br label %13
13: ; preds = %8, %3
%14 = phi i1 [ false, %3 ], [ %12, %8 ]
br i1 %14, label %15, label %18
15: ; preds = %13
%16 = load i8*, i8** %2
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %2
br label %3
18: ; preds = %13
%19 = load i8*, i8** %2
ret i8* %19
}

LLVM IR (-O2):
define i8* @skip_ws(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %9
%5 = phi i8 [ %11, %9 ], [ %2, %1 ]
%6 = phi i8* [ %10, %9 ], [ %0, %1 ]
%7 = tail call i64 @isspace(i8 zeroext %5)
%8 = icmp eq i64 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %4
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %9, %1
%14 = phi i8* [ %0, %1 ], [ %10, %9 ], [ %6, %4 ]
ret i8* %14
}
int d_ne_rr2(double a1, double a2) { return !(((a1) != (a2))); }


x86 assembly (clang, -O0):
<d_ne_rr2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
setne  %al
setp   %cl
or     %cl,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_ne_rr2>:
cmpeqsd %xmm1,%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @d_ne_rr2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp une double %5, %6
%8 = xor i1 %7, true
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @d_ne_rr2(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
int processInput(char *text) {
  int textLength = 0;
  while (text[textLength] != '\0') {
    ++textLength;
  }
  textLength += 1;
  if (textLength > 1025) {
    textLength = 1025;
    text[textLength] = '\0';
  }
  return textLength;
}


x86 assembly (clang, -O0):
<processInput>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1132 <processInput+0x32>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <processInput+0xf>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x401,-0xc(%rbp)
jle    115b <processInput+0x5b>
movl   $0x401,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<processInput>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <processInput+0x10>
lea    -0x1(%rax),%ecx
cmp    $0x400,%ecx
jbe    1131 <processInput+0x31>
movb   $0x0,0x401(%rdi)
mov    $0x401,%eax
ret

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

LLVM IR (-O2):
define i32 @processInput(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
%10 = add nuw nsw i32 %9, 1
%11 = icmp ugt i32 %9, 1024
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %0, i64 1025
store i8 0, i8* %13
br label %14
14: ; preds = %12, %8
%15 = phi i32 [ 1025, %12 ], [ %10, %8 ]
ret i32 %15
}
unsigned int csum_fold(unsigned int sum) {
  while (sum >> 16)
    sum = (sum & 0xffff) + (sum >> 16);
  return ((~(sum << 16)) >> 16);
}


x86 assembly (clang, -O0):
<csum_fold>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x10,%eax
cmp    $0x0,%eax
je     112e <csum_fold+0x2e>
mov    -0x4(%rbp),%eax
and    $0xffff,%eax
mov    -0x4(%rbp),%ecx
shr    $0x10,%ecx
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1107 <csum_fold+0x7>
mov    -0x4(%rbp),%eax
shl    $0x10,%eax
xor    $0xffffffff,%eax
shr    $0x10,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<csum_fold>:
mov    %edi,%eax
cmp    $0x10000,%edi
jb     1121 <csum_fold+0x21>
nopw   0x0(%rax,%rax,1)
mov    %eax,%ecx
shr    $0x10,%ecx
movzwl %ax,%eax
add    %ecx,%eax
cmp    $0xffff,%eax
ja     1110 <csum_fold+0x10>
xor    $0xffff,%eax
ret

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

LLVM IR (-O2):
define i32 @csum_fold(i32 %0) {
%2 = icmp ult i32 %0, 65536
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ %0, %1 ]
%5 = lshr i32 %4, 16
%6 = and i32 %4, 65535
%7 = add nuw nsw i32 %6, %5
%8 = icmp ult i32 %7, 65536
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ %0, %1 ], [ %7, %3 ]
%11 = xor i32 %10, 65535
ret i32 %11
}
int test5(int i, int j) { return (i | j) & j; }


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
and    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5>:
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @test5(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 = or i32 %5, %6
%8 = load i32, i32* %4
%9 = and i32 %7, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @test5(i32 %0, i32 returned %1) {
ret i32 %1
}
/* Variables and functions */
int mvscanw(int, int, char *, short *);
int i2_mvscanw(int y, int x, char *fmt, short *i) {
  return (mvscanw(y, x, fmt, i));
}


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

x86 assembly (clang, -O2):
<i2_mvscanw>:
jmp    1030 <mvscanw@plt>

LLVM IR (-O0):
define i32 @i2_mvscanw(i32 %0, i32 %1, i8* %2, i16* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i16*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i16* %3, i16** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i16*, i16** %8
%13 = call i32 @mvscanw(i32 %9, i32 %10, i8* %11, i16* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @i2_mvscanw(i32 %0, i32 %1, i8* %2, i16* %3) {
%5 = tail call i32 @mvscanw(i32 %0, i32 %1, i8* %2, i16* %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ _io_err(int /*<<< orphan*/, size_t, int,
                           int /*<<< orphan*/ *);
char *fgets(char *, size_t, int /*<<< orphan*/ *);
char *check_fgets(char *ptr, size_t size, FILE *stream) {
  char *res = fgets(ptr, size, stream);
  if (res <= 0)
    _io_err(0, size, 1, stream);
  return res;
}


x86 assembly (clang, -O0):
<check_fgets>:
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 <fgets@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
ja     1168 <check_fgets+0x48>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
xor    %edi,%edi
mov    $0x1,%edx
call   1040 <_io_err@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_fgets>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
call   1030 <fgets@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114a <check_fgets+0x2a>
xor    %edi,%edi
mov    %r15,%rsi
mov    $0x1,%edx
mov    %r14,%rcx
call   1040 <_io_err@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @check_fgets(i8* %0, i64 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %5
%10 = load i32*, i32** %6
%11 = call i8* @fgets(i8* %8, i64 %9, i32* %10)
store i8* %11, i8** %7
%12 = load i8*, i8** %7
%13 = icmp ule i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load i64, i64* %5
%16 = load i32*, i32** %6
%17 = call i32 @_io_err(i32 0, i64 %15, i32 1, i32* %16)
br label %18
18: ; preds = %14, %3
%19 = load i8*, i8** %7
ret i8* %19
}

LLVM IR (-O2):
define i8* @check_fgets(i8* %0, i64 %1, i32* %2) {
%4 = tail call i8* @fgets(i8* %0, i64 %1, i32* %2)
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @_io_err(i32 0, i64 %1, i32 1, i32* %2)
br label %8
8: ; preds = %6, %3
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ parse_name(int /*<<< orphan*/ const *,
                              int /*<<< orphan*/ const *, int /*<<< orphan*/ *);
uint16_t get_name_size(const uint8_t *msg, const uint8_t *pstart) {
  return parse_name(msg, pstart, NULL);
}


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

x86 assembly (clang, -O2):
<get_name_size>:
xor    %edx,%edx
jmp    1030 <parse_name@plt>

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

LLVM IR (-O2):
define i32 @get_name_size(i32* %0, i32* %1) {
%3 = tail call i32 @parse_name(i32* %0, i32* %1, i32* null)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
void version(void) {
  printf("%d.%d.%d-%s ", 2, 1, 0, "devel");
  printf("\n");
  exit(0);
}


x86 assembly (clang, -O0):
<version>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x2,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
lea    0xecf(%rip),%r8
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<version>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0xece(%rip),%r8
mov    $0x2,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"%d.%d.%d-%s \00"
@.str.1 = [6 x i8] c"devel\00"
@.str.2 = [2 x i8] c"\0A\00"
define void @version() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 2, i32 1, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"%d.%d.%d-%s \00"
@.str.1 = [6 x i8] c"devel\00"
define void @version() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 2, i32 1, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @exit(i32 0)
unreachable
}
void av_get_audio_frame_duration2() {}


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

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

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

LLVM IR (-O2):
define void @av_get_audio_frame_duration2() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ db_count_purge();
int /*<<< orphan*/ db_term_purge();
void train_purge(void) {
  db_count_purge();
  db_term_purge();
}


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

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

LLVM IR (-O0):
define void @train_purge() {
%1 = call i32 (...) @db_count_purge()
%2 = call i32 (...) @db_term_purge()
ret void
}

LLVM IR (-O2):
define void @train_purge() {
%1 = tail call i32 (...) @db_count_purge()
%2 = tail call i32 (...) @db_term_purge()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int16_t;
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int /*<<< orphan*/ ns_put16(int /*<<< orphan*/, int /*<<< orphan*/ *);
void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); }


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

x86 assembly (clang, -O2):
<__putshort>:
jmp    1030 <ns_put16@plt>

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

LLVM IR (-O2):
define void @__putshort(i32 %0, i32* %1) {
%3 = tail call i32 @ns_put16(i32 %0, i32* %1)
ret void
}
struct cpuidle_driver *cpuidle_get_driver(void) {
  return ((void *)0);
}


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

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

LLVM IR (-O0):
%struct.cpuidle_driver = type opaque
define %struct.cpuidle_driver* @cpuidle_get_driver() {
ret %struct.cpuidle_driver* null
}

LLVM IR (-O2):
%struct.cpuidle_driver = type opaque
define noalias %struct.cpuidle_driver* @cpuidle_get_driver() {
ret %struct.cpuidle_driver* null
}
int omap_register_i2c_bus_cmdline(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omap_register_i2c_bus_cmdline() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int ksft_exit_pass(void) { exit(0); }


x86 assembly (clang, -O0):
<ksft_exit_pass>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<ksft_exit_pass>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define i32 @ksft_exit_pass() {
%1 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @ksft_exit_pass() {
%1 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ _wall_Sleep(int /*<<< orphan*/, int);
void real_Sleep(uint64_t i_delay) { _wall_Sleep(i_delay, true); }


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

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

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

LLVM IR (-O2):
define void @real_Sleep(i32 %0) {
%2 = tail call i32 @_wall_Sleep(i32 %0, i32 1)
ret void
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int m_strncpy(char *, int, char const *, int);
int m_strnlen(char *, int);
ssize_t m_strncat(char *dst, ssize_t n, const char *src, ssize_t l) {
  ssize_t dlen = m_strnlen(dst, n - 1);
  return dlen + m_strncpy(dst + dlen, n - dlen, src, l);
}


x86 assembly (clang, -O0):
<m_strncat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
sub    $0x1,%esi
call   1030 <m_strnlen@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0x20(%rbp),%rax
add    %rax,%rdi
mov    -0xc(%rbp),%esi
sub    -0x20(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1040 <m_strncpy@plt>
mov    %eax,%ecx
mov    -0x24(%rbp),%eax
add    %ecx,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m_strncat>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
lea    -0x1(%rbp),%esi
call   1030 <m_strnlen@plt>
movslq %eax,%r12
add    %r12,%rbx
sub    %r12d,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1040 <m_strncpy@plt>
add    %r12d,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @m_strncat(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = sub nsw i32 %11, 1
%13 = call i32 @m_strnlen(i8* %10, i32 %12)
store i32 %13, i32* %9
%14 = load i32, i32* %9
%15 = load i8*, i8** %5
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i32, i32* %6
%20 = load i32, i32* %9
%21 = sub nsw i32 %19, %20
%22 = load i8*, i8** %7
%23 = load i32, i32* %8
%24 = call i32 @m_strncpy(i8* %18, i32 %21, i8* %22, i32 %23)
%25 = add nsw i32 %14, %24
ret i32 %25
}

LLVM IR (-O2):
define i32 @m_strncat(i8* %0, i32 %1, i8* %2, i32 %3) {
%5 = add nsw i32 %1, -1
%6 = tail call i32 @m_strnlen(i8* %0, i32 %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = sub nsw i32 %1, %6
%10 = tail call i32 @m_strncpy(i8* %8, i32 %9, i8* %2, i32 %3)
%11 = add nsw i32 %10, %6
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage:\n    convln [-c] [-D dstDir] [-f code] [-t code]"
         " [-v] <srcDir1> [<srcDir2> .. ]\n");
}


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

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

LLVM IR (-O0):
@.str = [87 x i8] c"Usage:\0A convln [-c] [-D dstDir] [-f code] [-t code] [-v] <srcDir1> [<srcDir2> .. ]\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [86 x i8] c"Usage:\0A convln [-c] [-D dstDir] [-f code] [-t code] [-v] <srcDir1> [<srcDir2> .. ]\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void SHL_W_IMM(int reg, int count) {
  addbyte(0x66);
  addbyte(0xc1);
  addbyte(0xc0 | reg | 0x20);
  addbyte(count);
}


x86 assembly (clang, -O0):
<SHL_W_IMM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xc1,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
or     $0x20,%edi
call   1030 <addbyte@plt>
mov    -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SHL_W_IMM>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xc1,%edi
call   1030 <addbyte@plt>
or     $0xe0,%ebp
mov    %ebp,%edi
call   1030 <addbyte@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @SHL_W_IMM(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 193)
%7 = load i32, i32* %3
%8 = or i32 192, %7
%9 = or i32 %8, 32
%10 = call i32 @addbyte(i32 %9)
%11 = load i32, i32* %4
%12 = call i32 @addbyte(i32 %11)
ret void
}

LLVM IR (-O2):
define void @SHL_W_IMM(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 193)
%5 = or i32 %0, 224
%6 = tail call i32 @addbyte(i32 %5)
%7 = tail call i32 @addbyte(i32 %1)
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
int32_t asciiToInt(char *buffer) {
  int32_t number = 0;
  while ((*buffer >= '0') && (*buffer <= '9')) {
    number = number * 10 + (*buffer - '0');
    buffer++;
  }
  return number;
}


x86 assembly (clang, -O0):
<asciiToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0xd(%rbp)
jl     1134 <asciiToInt+0x34>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1144 <asciiToInt+0x44>
jmp    1168 <asciiToInt+0x68>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110f <asciiToInt+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asciiToInt>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <asciiToInt+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <asciiToInt+0x20>
ret

LLVM IR (-O0):
define i32 @asciiToInt(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %16, %1
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp sge i32 %7, 48
br i1 %8, label %9, label %14
9: ; preds = %4
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = icmp sle i32 %12, 57
br label %14
14: ; preds = %9, %4
%15 = phi i1 [ false, %4 ], [ %13, %9 ]
br i1 %15, label %16, label %26
16: ; preds = %14
%17 = load i32, i32* %3
%18 = mul nsw i32 %17, 10
%19 = load i8*, i8** %2
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 48
%23 = add nsw i32 %18, %22
store i32 %23, i32* %3
%24 = load i8*, i8** %2
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %2
br label %4
26: ; preds = %14
%27 = load i32, i32* %3
ret i32 %27
}

LLVM IR (-O2):
define i32 @asciiToInt(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %12, %5 ], [ 0, %1 ]
%8 = phi i8* [ %13, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = add i32 %10, -48
%12 = add i32 %11, %9
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %12, %5 ]
ret i32 %18
}
double fb_TimeSerial(int hour, int minute, int second) {
  double dblHour = 1.0 * (double)hour / 24.0;
  double dblMinute = 1.0 * minute / (24.0 * 60.0);
  double dblSecond = 1.0 * second / (24.0 * 60.0 * 60.0);
  return dblHour + dblMinute + dblSecond;
}


x86 assembly (clang, -O0):
<fb_TimeSerial>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xeee(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xef2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xecc(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xec8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm1
movsd  0xeaa(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xe96(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
addsd  -0x20(%rbp),%xmm0
addsd  -0x28(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fb_TimeSerial>:
cvtsi2sd %esi,%xmm1
divsd  0xef4(%rip),%xmm1
movd   %edx,%xmm0
movd   %edi,%xmm2
punpckldq %xmm0,%xmm2
cvtdq2pd %xmm2,%xmm0
divpd  0xeec(%rip),%xmm0
addsd  %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fb_TimeSerial(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %4
%11 = sitofp i32 %10 to double
%12 = fmul double 1.000000e+00, %11
%13 = fdiv double %12, 2.400000e+01
store double %13, double* %7
%14 = load i32, i32* %5
%15 = sitofp i32 %14 to double
%16 = fmul double 1.000000e+00, %15
%17 = fdiv double %16, 1.440000e+03
store double %17, double* %8
%18 = load i32, i32* %6
%19 = sitofp i32 %18 to double
%20 = fmul double 1.000000e+00, %19
%21 = fdiv double %20, 8.640000e+04
store double %21, double* %9
%22 = load double, double* %7
%23 = load double, double* %8
%24 = fadd double %22, %23
%25 = load double, double* %9
%26 = fadd double %24, %25
ret double %26
}

LLVM IR (-O2):
define double @fb_TimeSerial(i32 %0, i32 %1, i32 %2) {
%4 = sitofp i32 %1 to double
%5 = fdiv double %4, 1.440000e+03
%6 = insertelement <2 x i32> poison, i32 %0, i64 0
%7 = insertelement <2 x i32> %6, i32 %2, i64 1
%8 = sitofp <2 x i32> %7 to <2 x double>
%9 = fdiv <2 x double> %8, <double 2.400000e+01, double 8.640000e+04>
%10 = extractelement <2 x double> %9, i64 0
%11 = fadd double %10, %5
%12 = extractelement <2 x double> %9, i64 1
%13 = fadd double %11, %12
ret double %13
}
int check_uamname(const char *uam) {
  char *p;
  for (p = uam; *p; p++) {
    if (*p == ' ')
      continue;
    if ((*p < 'A') || (*p > 'z'))
      return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<check_uamname>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1174 <check_uamname+0x74>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1132 <check_uamname+0x32>
jmp    1163 <check_uamname+0x63>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1152 <check_uamname+0x52>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x7a,%eax
jle    115e <check_uamname+0x5e>
movl   $0xffffffff,-0x4(%rbp)
jmp    117b <check_uamname+0x7b>
jmp    1163 <check_uamname+0x63>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1110 <check_uamname+0x10>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_uamname>:
jmp    1114 <check_uamname+0x14>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x20,%al
je     1110 <check_uamname+0x10>
test   %al,%al
je     112b <check_uamname+0x2b>
add    $0x85,%al
cmp    $0xc6,%al
jae    1110 <check_uamname+0x10>
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @check_uamname(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %9, %8 ]
%4 = load i8, i8* %3
switch i8 %4, label %5 [
i8 0, label %10
i8 32, label %8
]
5: ; preds = %2
%6 = add i8 %4, -123
%7 = icmp ult i8 %6, -58
br i1 %7, label %10, label %8
8: ; preds = %5, %2
%9 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
10: ; preds = %2, %5
%11 = phi i32 [ -1, %5 ], [ 0, %2 ]
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ _random_64_func(int /*<<< orphan*/, int /*<<< orphan*/);
int64_t AMCRandom64(int64_t min, int64_t max) {
  return _random_64_func(min, max);
}


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

x86 assembly (clang, -O2):
<AMCRandom64>:
jmp    1030 <_random_64_func@plt>

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

LLVM IR (-O2):
define i32 @AMCRandom64(i32 %0, i32 %1) {
%3 = tail call i32 @_random_64_func(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ tzset();
int ch_timezone() {
  tzset();
  return 1;
}


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

x86 assembly (clang, -O2):
<ch_timezone>:
push   %rax
xor    %eax,%eax
call   1030 <tzset@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @ch_timezone() {
%1 = tail call i32 (...) @tzset()
ret i32 1
}
/* Variables and functions */
double atan2(double, double);
scalar_t__ joystickGetAnalog(int, int);
double getJoyPolarRadians() {
  return atan2((double)joystickGetAnalog(1, 2),
               (double)joystickGetAnalog(1, 1));
}


x86 assembly (clang, -O0):
<getJoyPolarRadians>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <joystickGetAnalog@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <joystickGetAnalog@plt>
movsd  -0x8(%rbp),%xmm0
cvtsi2sd %rax,%xmm1
call   1030 <atan2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getJoyPolarRadians>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1040 <joystickGetAnalog@plt>
cvtsi2sd %rax,%xmm0
movsd  %xmm0,(%rsp)
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <joystickGetAnalog@plt>
cvtsi2sd %rax,%xmm1
movsd  (%rsp),%xmm0
pop    %rax
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @getJoyPolarRadians() {
%1 = call i64 @joystickGetAnalog(i32 1, i32 2)
%2 = sitofp i64 %1 to double
%3 = call i64 @joystickGetAnalog(i32 1, i32 1)
%4 = sitofp i64 %3 to double
%5 = call double @atan2(double %2, double %4)
ret double %5
}

LLVM IR (-O2):
define double @getJoyPolarRadians() {
%1 = tail call i64 @joystickGetAnalog(i32 1, i32 2)
%2 = sitofp i64 %1 to double
%3 = tail call i64 @joystickGetAnalog(i32 1, i32 1)
%4 = sitofp i64 %3 to double
%5 = tail call double @atan2(double %2, double %4)
ret double %5
}
/* Variables and functions */
int getch();
char getch_(int);
scalar_t__ isgraph(int);
char testgetch(void) {
  int key = getch();
  if (isgraph(key))
    return getch_(0);
  else
    return getch_(1);
}


x86 assembly (clang, -O0):
<testgetch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <getch@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <isgraph@plt>
cmp    $0x0,%rax
je     1163 <testgetch+0x33>
xor    %edi,%edi
call   1030 <getch_@plt>
mov    %al,-0x1(%rbp)
jmp    1170 <testgetch+0x40>
mov    $0x1,%edi
call   1030 <getch_@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testgetch>:
push   %rax
xor    %eax,%eax
call   1040 <getch@plt>
mov    %eax,%edi
call   1050 <isgraph@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
pop    %rax
jmp    1030 <getch_@plt>

LLVM IR (-O0):
define signext i8 @testgetch() {
%1 = alloca i8
%2 = alloca i32
%3 = call i32 (...) @getch()
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = call i64 @isgraph(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call signext i8 @getch_(i32 0)
store i8 %8, i8* %1
br label %11
9: ; preds = %0
%10 = call signext i8 @getch_(i32 1)
store i8 %10, i8* %1
br label %11
11: ; preds = %9, %7
%12 = load i8, i8* %1
ret i8 %12
}

LLVM IR (-O2):
define signext i8 @testgetch() {
%1 = tail call i32 (...) @getch()
%2 = tail call i64 @isgraph(i32 %1)
%3 = icmp eq i64 %2, 0
%4 = zext i1 %3 to i32
%5 = tail call signext i8 @getch_(i32 %4)
ret i8 %5
}
void init_memory_lock(void) {}


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

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

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

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

/* Variables and functions */
void sha_init(uint32_t *buf) {
  buf[0] = 0x67452301;
  buf[1] = 0xefcdab89;
  buf[2] = 0x98badcfe;
  buf[3] = 0x10325476;
  buf[4] = 0xc3d2e1f0;
}


x86 assembly (clang, -O0):
<sha_init>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x67452301,(%rax)
mov    -0x8(%rbp),%rax
movl   $0xefcdab89,0x4(%rax)
mov    -0x8(%rbp),%rax
movl   $0x98badcfe,0x8(%rax)
mov    -0x8(%rbp),%rax
movl   $0x10325476,0xc(%rax)
mov    -0x8(%rbp),%rax
movl   $0xc3d2e1f0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha_init>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movl   $0xc3d2e1f0,0x10(%rdi)
ret

LLVM IR (-O0):
define void @sha_init(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
store i32 1732584193, i32* %4
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 1
store i32 -271733879, i32* %6
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 2
store i32 -1732584194, i32* %8
%9 = load i32*, i32** %2
%10 = getelementptr inbounds i32, i32* %9, i64 3
store i32 271733878, i32* %10
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i64 4
store i32 -1009589776, i32* %12
ret void
}

LLVM IR (-O2):
define void @sha_init(i32* nocapture writeonly %0) {
%2 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> <i32 1732584193, i32 -271733879, i32 -1732584194, i32 271733878>, <4 x i32>* %2
%3 = getelementptr inbounds i32, i32* %0, i64 4
store i32 -1009589776, i32* %3
ret void
}
/* Variables and functions */
int InitCache();
int StartFileSystem();
int Init() { return (InitCache() != -1 && StartFileSystem() != -1); }


x86 assembly (clang, -O0):
<Init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <InitCache@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0xffffffff,%ecx
mov    %al,-0x1(%rbp)
je     114f <Init+0x2f>
mov    $0x0,%al
call   1030 <StartFileSystem@plt>
cmp    $0xffffffff,%eax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Init>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <InitCache@plt>
cmp    $0xffffffff,%eax
je     113e <Init+0x1e>
xor    %eax,%eax
call   1030 <StartFileSystem@plt>
xor    %ebx,%ebx
cmp    $0xffffffff,%eax
setne  %bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Init() {
%1 = call i32 (...) @InitCache()
%2 = icmp ne i32 %1, -1
br i1 %2, label %3, label %6
3: ; preds = %0
%4 = call i32 (...) @StartFileSystem()
%5 = icmp ne i32 %4, -1
br label %6
6: ; preds = %3, %0
%7 = phi i1 [ false, %0 ], [ %5, %3 ]
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @Init() {
%1 = tail call i32 (...) @InitCache()
%2 = icmp eq i32 %1, -1
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = tail call i32 (...) @StartFileSystem()
%5 = icmp ne i32 %4, -1
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
ret i32 %8
}
void sdb_init_sqlite(void) { ; }


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

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

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

LLVM IR (-O2):
define void @sdb_init_sqlite() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xe1() {
  Assert_real((isascii(225) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              1130, ("isascii should be 0 for 0xe1"));
}


x86 assembly (clang, -O0):
<t_isascii_0xe1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe1,%edi
call   1030 <isascii@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x46a,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0xe1>:
push   %rax
mov    $0xe1,%edi
call   1030 <isascii@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x46a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xe1\00"
define void @t_isascii_0xe1() {
%1 = call i64 @isascii(i32 225)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xe1\00"
define void @t_isascii_0xe1() {
%1 = tail call i64 @isascii(i32 225)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 1130, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ syscall(int, unsigned long, unsigned long, int, int, int, long);
void *mmap(unsigned long len) {
  return (void *)syscall(9, 0UL, len, 0x1 | 0x2, 0x02 | 0x20, -1, 0L);
}


x86 assembly (clang, -O0):
<mmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
mov    $0x9,%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x3,%ecx
mov    $0x22,%r8d
mov    $0xffffffff,%r9d
movq   $0x0,(%rsp)
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmap>:
push   %rax
mov    %rdi,%rdx
movq   $0x0,(%rsp)
mov    $0x9,%edi
xor    %esi,%esi
mov    $0x3,%ecx
mov    $0x22,%r8d
mov    $0xffffffff,%r9d
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i8* @mmap(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @syscall(i32 9, i64 0, i64 %3, i32 3, i32 34, i32 -1, i64 0)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}

LLVM IR (-O2):
define i8* @mmap(i64 %0) {
%2 = tail call i64 @syscall(i32 9, i64 0, i64 %0, i32 3, i32 34, i32 -1, i64 0)
%3 = inttoptr i64 %2 to i8*
ret i8* %3
}
int disable(int i) {
  switch (i) {
  case (0):
    break;
  case (1):
    break;
  default:
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<disable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     112b <disable+0x2b>
jmp    111a <disable+0x1a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     1130 <disable+0x30>
jmp    1135 <disable+0x35>
jmp    113a <disable+0x3a>
jmp    113a <disable+0x3a>
jmp    113a <disable+0x3a>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @disable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
switch i32 %3, label %6 [
i32 0, label %4
i32 1, label %5
]
4: ; preds = %1
br label %7
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %5, %4
ret i32 0
}

LLVM IR (-O2):
define i32 @disable(i32 %0) {
ret i32 0
}
int socket_v_api(void) { return 0x20150625; }


x86 assembly (clang, -O0):
<socket_v_api>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20150625,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @socket_v_api() {
ret i32 538248741
}

LLVM IR (-O2):
define i32 @socket_v_api() {
ret i32 538248741
}