xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void display_array2(int *array, int size) {
  for (int i = 0; i < size; i++) {
    printf("element:%d --> value:%d\n", i, array[i]);
  }
}


x86 assembly (clang, -O0):
<display_array2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <display_array2+0x4a>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <display_array2+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<display_array2>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <display_array2+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <display_array2+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [25 x i8] c"element:%d --> value:%d\0A\00"
define void @display_array2(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"element:%d --> value:%d\0A\00"
define void @display_array2(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %13, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = trunc i64 %8 to i32
%12 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %10)
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_context_move_source_output_by_index() {
  printf("NOT IMPLEMENTED:"
         "pa_context_move_source_output_by_index"
         "\n");
}


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

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

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

LLVM IR (-O2):
@str = [55 x i8] c"NOT IMPLEMENTED:pa_context_move_source_output_by_index\00"
define i32 @pa_context_move_source_output_by_index() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([55 x i8], [55 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int getkey();
int /*<<< orphan*/ idle();
int /*<<< orphan*/ keypressed();
int waitforkey(void) {
  do
    idle();
  while (!keypressed());
  return getkey();
}


x86 assembly (clang, -O0):
<waitforkey>:
push   %rbp
mov    %rsp,%rbp
jmp    1139 <waitforkey+0x9>
mov    $0x0,%al
call   1040 <idle@plt>
mov    $0x0,%al
call   1030 <keypressed@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1139 <waitforkey+0x9>
mov    $0x0,%al
call   1050 <getkey@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitforkey>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <idle@plt>
xor    %eax,%eax
call   1030 <keypressed@plt>
test   %eax,%eax
je     1140 <waitforkey+0x10>
xor    %eax,%eax
pop    %rcx
jmp    1050 <getkey@plt>

LLVM IR (-O0):
define i32 @waitforkey() {
br label %1
1: ; preds = %3, %0
%2 = call i32 (...) @idle()
br label %3
3: ; preds = %1
%4 = call i32 (...) @keypressed()
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %1, label %7
7: ; preds = %3
%8 = call i32 (...) @getkey()
ret i32 %8
}

LLVM IR (-O2):
define i32 @waitforkey() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @idle()
%3 = tail call i32 (...) @keypressed()
%4 = icmp eq i32 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
%6 = tail call i32 (...) @getkey()
ret i32 %6
}
int main(int argc, char *argv[]) {
  argc += 1;
  argv += 1;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 1
store i8** %9, i8*** %5
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
int isValid(char a, char b) {
  if (a == '1' || (a == '2' && b < '7'))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isValid>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x31,%eax
je     1137 <isValid+0x37>
movsbl -0x5(%rbp),%eax
cmp    $0x32,%eax
jne    1143 <isValid+0x43>
movsbl -0x6(%rbp),%eax
cmp    $0x37,%eax
jge    1143 <isValid+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <isValid+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isValid>:
cmp    $0x31,%dil
sete   %al
cmp    $0x32,%dil
sete   %cl
cmp    $0x37,%sil
setl   %dl
and    %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @isValid(i8 signext %0, i8 signext %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 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 49
br i1 %8, label %17, label %9
9: ; preds = %2
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 50
br i1 %12, label %13, label %18
13: ; preds = %9
%14 = load i8, i8* %5
%15 = sext i8 %14 to i32
%16 = icmp slt i32 %15, 55
br i1 %16, label %17, label %18
17: ; preds = %13, %2
store i32 1, i32* %3
br label %19
18: ; preds = %13, %9
store i32 0, i32* %3
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %3
ret i32 %20
}

LLVM IR (-O2):
define i32 @isValid(i8 signext %0, i8 signext %1) {
%3 = icmp eq i8 %0, 49
%4 = icmp eq i8 %0, 50
%5 = icmp slt i8 %1, 55
%6 = and i1 %4, %5
%7 = or i1 %3, %6
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ local_mcu_Pin2_clear__E();
void pollen_parts_Led2_off__E() {
  { local_mcu_Pin2_clear__E(); }
}


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

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

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

LLVM IR (-O2):
define void @pollen_parts_Led2_off__E() {
%1 = tail call i32 (...) @local_mcu_Pin2_clear__E()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_execveat;
int syscall(int /*<<< orphan*/, int, char const *, char *const *, char *const *,
            int);
int execveat(int dirfd, const char *pathname, char *const argv[],
             char *const envp[], int flags) {
  return syscall(SYS_execveat, dirfd, pathname, argv, envp, flags);
}


x86 assembly (clang, -O0):
<execveat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    -0x24(%rbp),%r9d
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<execveat>:
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_execveat = global i32 0
define i32 @execveat(i32 %0, i8* %1, i8** %2, i8** %3, i32 %4) {
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8**
%9 = alloca i8**
%10 = alloca i32
store i32 %0, i32* %6
store i8* %1, i8** %7
store i8** %2, i8*** %8
store i8** %3, i8*** %9
store i32 %4, i32* %10
%11 = load i32, i32* @SYS_execveat
%12 = load i32, i32* %6
%13 = load i8*, i8** %7
%14 = load i8**, i8*** %8
%15 = load i8**, i8*** %9
%16 = load i32, i32* %10
%17 = call i32 @syscall(i32 %11, i32 %12, i8* %13, i8** %14, i8** %15, i32 %16)
ret i32 %17
}

LLVM IR (-O2):
@SYS_execveat = global i32 0
define i32 @execveat(i32 %0, i8* %1, i8** %2, i8** %3, i32 %4) {
%6 = load i32, i32* @SYS_execveat
%7 = tail call i32 @syscall(i32 %6, i32 %0, i8* %1, i8** %2, i8** %3, i32 %4)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ qAwkClose();
int /*<<< orphan*/ qFree();
int /*<<< orphan*/ qSessionFree();
void qFreeAll(void) {
  qFree();
  qSessionFree();
  qAwkClose();
}


x86 assembly (clang, -O0):
<qFreeAll>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <qFree@plt>
mov    $0x0,%al
call   1030 <qSessionFree@plt>
mov    $0x0,%al
call   1050 <qAwkClose@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<qFreeAll>:
push   %rax
xor    %eax,%eax
call   1040 <qFree@plt>
xor    %eax,%eax
call   1030 <qSessionFree@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <qAwkClose@plt>

LLVM IR (-O0):
define void @qFreeAll() {
%1 = call i32 (...) @qFree()
%2 = call i32 (...) @qSessionFree()
%3 = call i32 (...) @qAwkClose()
ret void
}

LLVM IR (-O2):
define void @qFreeAll() {
%1 = tail call i32 (...) @qFree()
%2 = tail call i32 (...) @qSessionFree()
%3 = tail call i32 (...) @qAwkClose()
ret void
}
/* Variables and functions */
long double tanh(double);
long double tanhl(long double x) { return tanh((double)x); }


x86 assembly (clang, -O0):
<tanhl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <tanh@plt>
fld    %st(0)
fstp   %st(0)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tanhl>:
fldt   0x8(%rsp)
fstpl  -0x8(%rsp)
movsd  -0x8(%rsp),%xmm0
jmp    1030 <tanh@plt>

LLVM IR (-O0):
define x86_fp80 @tanhl(x86_fp80 %0) {
%2 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %2
%3 = load x86_fp80, x86_fp80* %2
%4 = fptrunc x86_fp80 %3 to double
%5 = call x86_fp80 @tanh(double %4)
ret x86_fp80 %5
}

LLVM IR (-O2):
define x86_fp80 @tanhl(x86_fp80 %0) {
%2 = fptrunc x86_fp80 %0 to double
%3 = tail call x86_fp80 @tanh(double %2)
ret x86_fp80 %3
}
/* Variables and functions */
int /*<<< orphan*/ _test_MAX_biggerulong_smallerint(int /*<<< orphan*/, int);
int _test_various_MAX_biggerulong_smallerint() {
  _test_MAX_biggerulong_smallerint(0, -1);
  return 0;
}


x86 assembly (clang, -O0):
<_test_various_MAX_biggerulong_smallerint>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <_test_MAX_biggerulong_smallerint@plt>
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_test_various_MAX_biggerulong_smallerint() {
%1 = call i32 @_test_MAX_biggerulong_smallerint(i32 0, i32 -1)
ret i32 0
}

LLVM IR (-O2):
define i32 @_test_various_MAX_biggerulong_smallerint() {
%1 = tail call i32 @_test_MAX_biggerulong_smallerint(i32 0, i32 -1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage(void) {
  printf("Usage: brpn [flags]\n");
  printf("\n");
  printf("Flags:\n");
  printf("   -h --help .................... Print help\n");
  printf("   -v --version ................. Print version\n");
}


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

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xed6(%rip),%rdi
call   1040 <puts@plt>
lea    0xed1(%rip),%rdi
call   1040 <puts@plt>
lea    0xef2(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Usage: brpn [flags]\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [8 x i8] c"Flags:\0A\00"
@.str.3 = [46 x i8] c" -h --help .................... Print help\0A\00"
@.str.4 = [49 x i8] c" -v --version ................. Print version\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [20 x i8] c"Usage: brpn [flags]\00"
@str.5 = [7 x i8] c"Flags:\00"
@str.6 = [45 x i8] c" -h --help .................... Print help\00"
@str.7 = [48 x i8] c" -v --version ................. Print version\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.6, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.7, i64 0, i64 0))
ret void
}
void capturingNegbehind2CAPTURING_NEGBEHIND() {}


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

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

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

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

/* Variables and functions */
int ean8_cc(struct zint_symbol *, unsigned char const *, int, char *,
            int /*<<< orphan*/);
int ean8(struct zint_symbol *symbol, const unsigned char source[], int length,
         char dest[]) {
  return ean8_cc(symbol, source, length, dest, 0);
}


x86 assembly (clang, -O0):
<ean8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <ean8_cc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ean8>:
xor    %r8d,%r8d
jmp    1030 <ean8_cc@plt>

LLVM IR (-O0):
%struct.zint_symbol = type { i32 }
define i32 @ean8(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca %struct.zint_symbol*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store %struct.zint_symbol* %0, %struct.zint_symbol** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load %struct.zint_symbol*, %struct.zint_symbol** %5
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = load i8*, i8** %8
%13 = call i32 @ean8_cc(%struct.zint_symbol* %9, i8* %10, i32 %11, i8* %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
%struct.zint_symbol = type { i32 }
define i32 @ean8(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @ean8_cc(%struct.zint_symbol* %0, i8* %1, i32 %2, i8* %3, i32 0)
ret i32 %5
}
double fatorial(double a) {
  double fat = 1, i;
  for (i = 1; i <= a; i++) {
    fat *= i;
  }
  return fat;
}


x86 assembly (clang, -O0):
<fatorial>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     115d <fatorial+0x5d>
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xeb2(%rip),%xmm0
addsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1123 <fatorial+0x23>
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<fatorial>:
movsd  0xef8(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     112e <fatorial+0x2e>
movsd  0xeea(%rip),%xmm2
movapd %xmm2,%xmm3
movapd %xmm2,%xmm1
xchg   %ax,%ax
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm3
ucomisd %xmm3,%xmm0
jae    1120 <fatorial+0x20>
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @fatorial(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 1.000000e+00, double* %3
store double 1.000000e+00, double* %4
br label %5
5: ; preds = %13, %1
%6 = load double, double* %4
%7 = load double, double* %2
%8 = fcmp ole double %6, %7
br i1 %8, label %9, label %16
9: ; preds = %5
%10 = load double, double* %4
%11 = load double, double* %3
%12 = fmul double %11, %10
store double %12, double* %3
br label %13
13: ; preds = %9
%14 = load double, double* %4
%15 = fadd double %14, 1.000000e+00
store double %15, double* %4
br label %5
16: ; preds = %5
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @fatorial(double %0) {
%2 = fcmp ult double %0, 1.000000e+00
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi double [ %7, %3 ], [ 1.000000e+00, %1 ]
%5 = phi double [ %6, %3 ], [ 1.000000e+00, %1 ]
%6 = fmul double %5, %4
%7 = fadd double %4, 1.000000e+00
%8 = fcmp ugt double %7, %0
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi double [ 1.000000e+00, %1 ], [ %6, %3 ]
ret double %10
}
void gtk_tree_view_get_rules_hint() {}


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_get_rules_hint() {
ret void
}
int do_485() { return 485; }


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

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

LLVM IR (-O0):
define i32 @do_485() {
ret i32 485
}

LLVM IR (-O2):
define i32 @do_485() {
ret i32 485
}
/* Variables and functions */
size_t strcspn(char *, char *);
void chomp(char *line) { line[strcspn(line, "\n")] = '\0'; }


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed1(%rip),%rsi
call   1030 <strcspn@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <strcspn@plt>
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"\0A\00"
define void @chomp(i8* nocapture %0) {
%2 = tail call i64 @strcspn(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds i8, i8* %0, i64 %2
store i8 0, i8* %3
ret void
}
/* Type definitions */
typedef int uint32_t;
typedef scalar_t__ in;

/* Variables and functions */
void swap32_a_store(uint32_t *out, uint32_t in) {
  *out = ((uint32_t)((((uint32_t)(in) & (uint32_t)0x000000ffUL) << 24) |
                     (((uint32_t)(in) & (uint32_t)0x0000ff00UL) << 8) |
                     (((uint32_t)(in) & (uint32_t)0x00ff0000UL) >> 8) |
                     (((uint32_t)(in) & (uint32_t)0xff000000UL) >> 24)));
}


x86 assembly (clang, -O0):
<swap32_a_store>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0xff,%ecx
shl    $0x18,%ecx
mov    -0xc(%rbp),%eax
and    $0xff00,%eax
shl    $0x8,%eax
or     %eax,%ecx
mov    -0xc(%rbp),%eax
and    $0xff0000,%eax
sar    $0x8,%eax
or     %eax,%ecx
mov    -0xc(%rbp),%eax
and    $0xff000000,%eax
sar    $0x18,%eax
or     %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap32_a_store>:
mov    %esi,%eax
and    $0xffffff,%eax
bswap  %eax
sar    $0x18,%esi
or     %eax,%esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @swap32_a_store(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = shl i32 %6, 24
%8 = load i32, i32* %4
%9 = and i32 %8, 65280
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = load i32, i32* %4
%13 = and i32 %12, 16711680
%14 = ashr i32 %13, 8
%15 = or i32 %11, %14
%16 = load i32, i32* %4
%17 = and i32 %16, -16777216
%18 = ashr i32 %17, 24
%19 = or i32 %15, %18
%20 = load i32*, i32** %3
store i32 %19, i32* %20
ret void
}

LLVM IR (-O2):
define void @swap32_a_store(i32* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 16777215
%4 = tail call i32 @llvm.bswap.i32(i32 %3)
%5 = ashr i32 %1, 24
%6 = or i32 %4, %5
store i32 %6, i32* %0
ret void
}
/* Variables and functions */
void *malloc(size_t);
void *ft_memalloc(size_t size) {
  size_t i;
  void *new;
  if (!(new = malloc(size)))
    return (NULL);
  i = 0;
  while (i < size) {
    ((unsigned char *)new)[i] = 0;
    i++;
  }
  return (new);
}


x86 assembly (clang, -O0):
<ft_memalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1140 <ft_memalloc+0x30>
movq   $0x0,-0x8(%rbp)
jmp    117b <ft_memalloc+0x6b>
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1173 <ft_memalloc+0x63>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1148 <ft_memalloc+0x38>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_memalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1146 <ft_memalloc+0x26>
test   %r14,%r14
je     1146 <ft_memalloc+0x26>
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define noalias i8* @ft_memalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp ne i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ put8(unsigned char);
void xor_reg8_imm8(int reg8, unsigned char imm8) {
  put8(0x40);
  put8(0x80);
  put8(0xF0 + reg8);
  put8(imm8);
}


x86 assembly (clang, -O0):
<xor_reg8_imm8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %edi,-0x4(%rbp)
mov    %al,-0x5(%rbp)
mov    $0x40,%edi
call   1030 <put8@plt>
mov    $0x80,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%eax
add    $0xf0,%eax
movzbl %al,%edi
call   1030 <put8@plt>
movzbl -0x5(%rbp),%edi
call   1030 <put8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor_reg8_imm8>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x40,%edi
call   1030 <put8@plt>
mov    $0x80,%edi
call   1030 <put8@plt>
add    $0xf0,%bpl
movzbl %bpl,%edi
call   1030 <put8@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <put8@plt>

LLVM IR (-O0):
define void @xor_reg8_imm8(i32 %0, i8 zeroext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = call i32 @put8(i8 zeroext 64)
%6 = call i32 @put8(i8 zeroext -128)
%7 = load i32, i32* %3
%8 = add nsw i32 240, %7
%9 = trunc i32 %8 to i8
%10 = call i32 @put8(i8 zeroext %9)
%11 = load i8, i8* %4
%12 = call i32 @put8(i8 zeroext %11)
ret void
}

LLVM IR (-O2):
define void @xor_reg8_imm8(i32 %0, i8 zeroext %1) {
%3 = tail call i32 @put8(i8 zeroext 64)
%4 = tail call i32 @put8(i8 zeroext -128)
%5 = trunc i32 %0 to i8
%6 = add i8 %5, -16
%7 = tail call i32 @put8(i8 zeroext %6)
%8 = tail call i32 @put8(i8 zeroext %1)
ret void
}
int main(void) {
  long l;
  l = atol("1000000");
  printf("%s%ld\n%s%ld\n", "The string \"1000000\" converted to long int is ",
         l, "The converted value divided by 2 is ", l / 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1040 <atol@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    $0x2,%ecx
cqto
idiv   %rcx
mov    -0x18(%rbp),%rdx
mov    %rax,%r8
lea    0xea1(%rip),%rdi
lea    0xea7(%rip),%rsi
lea    0xecf(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1040 <atol@plt>
movslq %eax,%rdx
mov    %edx,%eax
shr    $0x1f,%eax
add    %edx,%eax
sar    %eax
movslq %eax,%r8
lea    0xec3(%rip),%rdi
lea    0xec9(%rip),%rsi
lea    0xef1(%rip),%rcx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"1000000\00"
@.str.1 = [13 x i8] c"%s%ld\0A%s%ld\0A\00"
@.str.2 = [47 x i8] c"The string \221000000\22 converted to long int is \00"
@.str.3 = [37 x i8] c"The converted value divided by 2 is \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @atol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = sext i32 %3 to i64
store i64 %4, i64* %2
%5 = load i64, i64* %2
%6 = load i64, i64* %2
%7 = sdiv i64 %6, 2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i64 %5, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i64 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"1000000\00"
@.str.1 = [13 x i8] c"%s%ld\0A%s%ld\0A\00"
@.str.2 = [47 x i8] c"The string \221000000\22 converted to long int is \00"
@.str.3 = [37 x i8] c"The converted value divided by 2 is \00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @atol to i32 (i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%2 = sext i32 %1 to i64
%3 = sdiv i32 %1, 2
%4 = sext i32 %3 to i64
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0), i64 %2, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0), i64 %4)
ret i32 0
}
long main() { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @main() {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isspace(int);
void t_isspace_0xec() {
  Assert_real((isspace(236) == 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_isspace.c",
              1185, ("isspace should be 0 for 0xec"));
}


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

x86 assembly (clang, -O2):
<t_isspace_0xec>:
push   %rax
mov    $0xec,%edi
call   1030 <isspace@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4a1,%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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xec\00"
define void @t_isspace_0xec() {
%1 = call i64 @isspace(i32 236)
%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 1185, 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_isspace.c\00"
@.str.1 = [29 x i8] c"isspace should be 0 for 0xec\00"
define void @t_isspace_0xec() {
%1 = tail call i64 @isspace(i32 236)
%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 1185, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ tty_raw_mode();
int main(int argc, char **argv) {
  tty_raw_mode();
  while (1) {
    char ch;
    read(0, &ch, 1);
    printf("%d\n", ch);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <tty_raw_mode@plt>
xor    %edi,%edi
lea    -0x11(%rbp),%rsi
mov    $0x1,%edx
call   1050 <read@plt>
lea    0xe9c(%rip),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <printf@plt>
jmp    114d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <tty_raw_mode@plt>
lea    0x7(%rsp),%r14
lea    0xeb9(%rip),%rbx
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <read@plt>
movsbl 0x7(%rsp),%esi
mov    %rbx,%rdi
call   1030 <printf@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 (...) @tty_raw_mode()
br label %8
8: ; preds = %2, %8
%9 = call i32 @read(i32 0, i8* %6, i32 1)
%10 = load i8, i8* %6
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %10)
br label %8
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = tail call i32 (...) @tty_raw_mode()
br label %5
5: ; preds = %2, %5
%6 = call i32 @read(i32 0, i8* %3, i32 1)
%7 = load i8, i8* %3
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %5
}
void func_loopfb(void) {
  extern void func_loopfb_marker(void);
  func_loopfb_marker();
}


x86 assembly (clang, -O0):
<func_loopfb>:
push   %rbp
mov    %rsp,%rbp
call   1030 <func_loopfb_marker@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_loopfb>:
jmp    1030 <func_loopfb_marker@plt>

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

LLVM IR (-O2):
define void @func_loopfb() {
tail call void @func_loopfb_marker()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcmp(unsigned char *, unsigned char *, int);
int /*<<< orphan*/ sha1_do_hmac(void *, unsigned char *, int, unsigned long,
                                unsigned char *);
int sha1_verify(void *handle, unsigned char *blk, int len, unsigned long seq) {
  unsigned char correct[20];
  sha1_do_hmac(handle, blk, len, seq, correct);
  return !memcmp(correct, blk + len, 20);
}


x86 assembly (clang, -O0):
<sha1_verify>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%rcx
lea    -0x40(%rbp),%r8
call   1030 <sha1_do_hmac@plt>
lea    -0x40(%rbp),%rdi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
add    %rax,%rsi
mov    $0x14,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha1_verify>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rsp,%r15
mov    %r15,%r8
call   1030 <sha1_do_hmac@plt>
movslq %ebx,%rsi
add    %r14,%rsi
mov    %r15,%rdi
mov    $0x14,%edx
call   1040 <memcmp@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @sha1_verify(i8* %0, i8* %1, i32 %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64
%9 = alloca [20 x i8]
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i64 %3, i64* %8
%10 = load i8*, i8** %5
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = load i64, i64* %8
%14 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%15 = call i32 @sha1_do_hmac(i8* %10, i8* %11, i32 %12, i64 %13, i8* %14)
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %9, i64 0, i64 0
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = call i32 @memcmp(i8* %16, i8* %20, i32 20)
%22 = icmp ne i32 %21, 0
%23 = xor i1 %22, true
%24 = zext i1 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
define i32 @sha1_verify(i8* %0, i8* %1, i32 %2, i64 %3) {
%5 = alloca [20 x i8]
%6 = getelementptr inbounds [20 x i8], [20 x i8]* %5, i64 0, i64 0
%7 = call i32 @sha1_do_hmac(i8* %0, i8* %1, i32 %2, i64 %3, i8* %6)
%8 = sext i32 %2 to i64
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = call i32 @memcmp(i8* %6, i8* %9, i32 20)
%11 = icmp eq i32 %10, 0
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
struct rlimit {
  int /*<<< orphan*/ rlim_max;
  int /*<<< orphan*/ rlim_cur;
};
typedef int /*<<< orphan*/ rlim_t;

/* Variables and functions */
int /*<<< orphan*/ SYS_setrlimit;
int syscall2(int /*<<< orphan*/, int, uintptr_t);
int sys_setrlimit(int resource, rlim_t limit) {
  const struct rlimit buf = {
      .rlim_cur = limit,
      .rlim_max = limit,
  };
  return syscall2(SYS_setrlimit, resource, (uintptr_t)&buf);
}


x86 assembly (clang, -O0):
<sys_setrlimit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
lea    -0x10(%rbp),%rdx
call   1030 <syscall2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_setrlimit>:
push   %rax
mov    %edi,%eax
mov    %esi,(%rsp)
mov    %esi,0x4(%rsp)
mov    0x2ec7(%rip),%rcx
mov    (%rcx),%edi
mov    %rsp,%rdx
mov    %eax,%esi
call   1030 <syscall2@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.rlimit = type { i32, i32 }
@SYS_setrlimit = global i32 0
define i32 @sys_setrlimit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.rlimit
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %5, i32 0, i32 0
%7 = load i32, i32* %4
store i32 %7, i32* %6
%8 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %5, i32 0, i32 1
%9 = load i32, i32* %4
store i32 %9, i32* %8
%10 = load i32, i32* @SYS_setrlimit
%11 = load i32, i32* %3
%12 = ptrtoint %struct.rlimit* %5 to i64
%13 = call i32 @syscall2(i32 %10, i32 %11, i64 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.rlimit = type { i32, i32 }
@SYS_setrlimit = global i32 0
define i32 @sys_setrlimit(i32 %0, i32 %1) {
%3 = alloca %struct.rlimit
%4 = bitcast %struct.rlimit* %3 to i8*
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %3, i64 0, i32 0
store i32 %1, i32* %5
%6 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %3, i64 0, i32 1
store i32 %1, i32* %6
%7 = load i32, i32* @SYS_setrlimit
%8 = ptrtoint %struct.rlimit* %3 to i64
%9 = call i32 @syscall2(i32 %7, i32 %0, i64 %8)
ret i32 %9
}
void SteamGameServer_Shutdown(void) { xlogf("%s\n", __func__); }


x86 assembly (clang, -O0):
<SteamGameServer_Shutdown>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee2(%rip),%rsi
mov    $0x0,%al
call   1030 <xlogf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SteamGameServer_Shutdown>:
lea    0xee9(%rip),%rdi
lea    0xee6(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@__func__.SteamGameServer_Shutdown = [25 x i8] c"SteamGameServer_Shutdown\00"
define void @SteamGameServer_Shutdown() {
%1 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @__func__.SteamGameServer_Shutdown, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@__func__.SteamGameServer_Shutdown = [25 x i8] c"SteamGameServer_Shutdown\00"
define void @SteamGameServer_Shutdown() {
%1 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([25 x i8], [25 x i8]* @__func__.SteamGameServer_Shutdown, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *strchr(char const *, char);
int get_addr_type(const char *addr) {
  if (NULL != strchr(addr, ':')) {
    return 6;
  } else if (NULL != strchr(addr, '.')) {
    return 4;
  } else {
    return -1;
  }
}


x86 assembly (clang, -O0):
<get_addr_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1144 <get_addr_type+0x34>
movl   $0x6,-0x4(%rbp)
jmp    1173 <get_addr_type+0x63>
mov    -0x10(%rbp),%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     116c <get_addr_type+0x5c>
movl   $0x4,-0x4(%rbp)
jmp    1173 <get_addr_type+0x63>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_addr_type>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3a,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
mov    $0x6,%eax
test   %rcx,%rcx
je     112d <get_addr_type+0x1d>
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x2e,%esi
call   1030 <strchr@plt>
cmp    $0x1,%rax
sbb    %eax,%eax
or     $0x4,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @get_addr_type(i8* %0) {
%2 = tail call i32* @strchr(i8* %0, i8 signext 58)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i32* @strchr(i8* %0, i8 signext 46)
%6 = icmp eq i32* %5, null
%7 = select i1 %6, i32 -1, i32 4
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 6, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ itex2MML_restart();
int /*<<< orphan*/ itex2MML_setup(char const *, unsigned long);
int itex2MML_yyparse(int /*<<< orphan*/);
int itex2MML_filter(const char *buffer, unsigned long length) {
  itex2MML_setup(buffer, length);
  itex2MML_restart();
  return itex2MML_yyparse(0);
}


x86 assembly (clang, -O0):
<itex2MML_filter>:
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 <itex2MML_setup@plt>
mov    $0x0,%al
call   1040 <itex2MML_restart@plt>
xor    %edi,%edi
call   1050 <itex2MML_yyparse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<itex2MML_filter>:
push   %rax
call   1030 <itex2MML_setup@plt>
xor    %eax,%eax
call   1040 <itex2MML_restart@plt>
xor    %edi,%edi
pop    %rax
jmp    1050 <itex2MML_yyparse@plt>

LLVM IR (-O0):
define i32 @itex2MML_filter(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @itex2MML_setup(i8* %5, i64 %6)
%8 = call i32 (...) @itex2MML_restart()
%9 = call i32 @itex2MML_yyparse(i32 0)
ret i32 %9
}

LLVM IR (-O2):
define i32 @itex2MML_filter(i8* %0, i64 %1) {
%3 = tail call i32 @itex2MML_setup(i8* %0, i64 %1)
%4 = tail call i32 (...) @itex2MML_restart()
%5 = tail call i32 @itex2MML_yyparse(i32 0)
ret i32 %5
}
unsigned int getUnsignedInt(char *ptr) {
  return (unsigned char)ptr[0] + (((unsigned int)(unsigned char)ptr[1]) << 8);
}


x86 assembly (clang, -O0):
<getUnsignedInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getUnsignedInt>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @getUnsignedInt(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl i32 %10, 8
%12 = add i32 %6, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @getUnsignedInt(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = shl nuw nsw i32 %6, 8
%8 = or i32 %7, %3
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ cblByteOrderSwap16(int /*<<< orphan*/);
uint16_t cblByteOrderSwap16BigToHost(uint16_t swap) {
  return cblByteOrderSwap16(swap);
}


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

x86 assembly (clang, -O2):
<cblByteOrderSwap16BigToHost>:
jmp    1030 <cblByteOrderSwap16@plt>

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

LLVM IR (-O2):
define i32 @cblByteOrderSwap16BigToHost(i32 %0) {
%2 = tail call i32 @cblByteOrderSwap16(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ write(char *, char *, char *);
void function_priority(char *prior) { write("csv-task.csv", "%s,", prior); }


x86 assembly (clang, -O0):
<function_priority>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xed9(%rip),%rdi
lea    0xedf(%rip),%rsi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<function_priority>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_priority(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"csv-task.csv\00"
@.str.1 = [4 x i8] c"%s,\00"
define void @function_priority(i8* %0) {
%2 = tail call i32 @write(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emulatorSocketInit();
void usbInit(void) { emulatorSocketInit(); }


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

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

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

LLVM IR (-O2):
define void @usbInit() {
%1 = tail call i32 (...) @emulatorSocketInit()
ret void
}