xunge/DecIR huggingface dataset:
/* Variables and functions */
double pow(double, double);
double luminosity(double mass_ratio) {
  double n = (mass_ratio < 1.0) ? (1.75 * (mass_ratio - 0.1) + 3.325)
                                : (0.5 * (2.0 - mass_ratio) + 4.4);
  return (pow(mass_ratio, n));
}


x86 assembly (clang, -O0):
<luminosity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1163 <luminosity+0x53>
movsd  -0x8(%rbp),%xmm0
movsd  0xef3(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xed7(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xed3(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    118d <luminosity+0x7d>
movsd  0xead(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe8c(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <pow@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<luminosity>:
movsd  0xee8(%rip),%xmm1
ucomisd %xmm0,%xmm1
jbe    113f <luminosity+0x2f>
movsd  0xefa(%rip),%xmm1
addsd  %xmm0,%xmm1
mulsd  0xef6(%rip),%xmm1
addsd  0xef6(%rip),%xmm1
jmp    1030 <pow@plt>
movsd  0xec1(%rip),%xmm1
subsd  %xmm0,%xmm1
mulsd  0xebd(%rip),%xmm1
addsd  0xebd(%rip),%xmm1
jmp    1030 <pow@plt>

LLVM IR (-O0):
define double @luminosity(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fcmp olt double %4, 1.000000e+00
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %2
%8 = fsub double %7, 1.000000e-01
%9 = call double @llvm.fmuladd.f64(double 1.750000e+00, double %8, double 3.325000e+00)
br label %14
10: ; preds = %1
%11 = load double, double* %2
%12 = fsub double 2.000000e+00, %11
%13 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %12, double 4.400000e+00)
br label %14
14: ; preds = %10, %6
%15 = phi double [ %9, %6 ], [ %13, %10 ]
store double %15, double* %3
%16 = load double, double* %2
%17 = load double, double* %3
%18 = call double @pow(double %16, double %17)
ret double %18
}

LLVM IR (-O2):
define double @luminosity(double %0) {
%2 = fcmp olt double %0, 1.000000e+00
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = fadd double %0, -1.000000e-01
%5 = tail call double @llvm.fmuladd.f64(double %4, double 1.750000e+00, double 3.325000e+00)
br label %9
6: ; preds = %1
%7 = fsub double 2.000000e+00, %0
%8 = tail call double @llvm.fmuladd.f64(double %7, double 5.000000e-01, double 4.400000e+00)
br label %9
9: ; preds = %6, %3
%10 = phi double [ %5, %3 ], [ %8, %6 ]
%11 = tail call double @pow(double %0, double %10)
ret double %11
}
f() {
  _Alignas(8) int x = 1, y = 2;
  _Static_assert(_Alignof(x) == 8, "");
  _Static_assert(_Alignof(y) == 8, "");
  g(x, y);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x8(%rbp)
movl   $0x2,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%esi
mov    $0x0,%al
call   1030 <g@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
mov    $0x1,%edi
mov    $0x2,%esi
xor    %eax,%eax
jmp    1030 <g@plt>

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

LLVM IR (-O2):
define i32 @f() {
%1 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @g to i32 (i32, i32, ...)*)(i32 1, i32 2)
ret i32 undef
}
long kernel__Bool__hash(short int self) {
  long var;
  long var1;
  long var2;
  if (self) {
    var1 = 1;
    var = var1;
    goto RET_LABEL;
  } else {
    var2 = 0;
    var = var2;
    goto RET_LABEL;
  }
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<kernel__Bool__hash>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
cmpw   $0x0,-0x2(%rbp)
je     112b <kernel__Bool__hash+0x2b>
movq   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    113b <kernel__Bool__hash+0x3b>
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @kernel__Bool__hash(i16 signext %0) {
%2 = icmp ne i16 %0, 0
%3 = zext i1 %2 to i64
ret i64 %3
}
void ISR_UART_Interrupt(void) {}


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

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

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

LLVM IR (-O2):
define void @ISR_UART_Interrupt() {
ret void
}
int do_191() { return 191; }


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

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

LLVM IR (-O0):
define i32 @do_191() {
ret i32 191
}

LLVM IR (-O2):
define i32 @do_191() {
ret i32 191
}
/* Type definitions */
struct hash_iter {
  int dummy;
};

/* Variables and functions */
int hash_iter_next_bin(struct hash_iter *, char const **, int /*<<< orphan*/ *,
                       void const **);
bool hash_iter_next(struct hash_iter *iter, const char **key,
                    const void **value) {
  return hash_iter_next_bin(iter, key, NULL, value);
}


x86 assembly (clang, -O0):
<hash_iter_next>:
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),%rcx
xor    %eax,%eax
mov    %eax,%edx
call   1030 <hash_iter_next_bin@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_iter_next>:
mov    %rdx,%rcx
xor    %edx,%edx
jmp    1030 <hash_iter_next_bin@plt>

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

LLVM IR (-O2):
%struct.hash_iter = type { i32 }
define i32 @hash_iter_next(%struct.hash_iter* %0, i8** %1, i8** %2) {
%4 = tail call i32 @hash_iter_next_bin(%struct.hash_iter* %0, i8** %1, i32* null, i8** %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *, int);
void __assert2(const char *expr, const char *function, const char *file,
               int line) {
  ((function) = (function));
  ((file) = (file));
  printf("FAIL - %s at line %d\n", expr, line);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<__assert2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x1c(%rbp),%edx
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e7f(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<__assert2>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
mov    %ecx,%edx
call   1030 <printf@plt>
mov    0x2ea7(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"FAIL - %s at line %d\0A\00"
@EXIT_FAILURE = global i32 0
define void @__assert2(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %6
store i8* %9, i8** %6
%10 = load i8*, i8** %7
store i8* %10, i8** %7
%11 = load i8*, i8** %5
%12 = load i32, i32* %8
%13 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12)
%14 = load i32, i32* @EXIT_FAILURE
%15 = call i32 @exit(i32 %14)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"FAIL - %s at line %d\0A\00"
@EXIT_FAILURE = global i32 0
define void @__assert2(i8* %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
}
/* Variables and functions */
int tolower(char);
int get_char_index(char *str) { return tolower(str[0]) - 'a'; }


x86 assembly (clang, -O0):
<get_char_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <tolower@plt>
sub    $0x61,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_char_index>:
push   %rax
movsbl (%rdi),%edi
call   1030 <tolower@plt>
add    $0xffffff9f,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @get_char_index(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 = call i32 @tolower(i8 signext %5)
%7 = sub nsw i32 %6, 97
ret i32 %7
}

LLVM IR (-O2):
define i32 @get_char_index(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = tail call i32 @tolower(i8 signext %2)
%4 = add nsw i32 %3, -97
ret i32 %4
}
/* Type definitions */
struct timespec {
  int tv_nsec;
  scalar_t__ tv_sec;
};

/* Variables and functions */
int nanosleep(struct timespec *, struct timespec *);
int /*<<< orphan*/ printf(char *, int);
void main() {
  struct timespec test, rem;
  int ret;
  test.tv_sec = 0;
  test.tv_nsec = 5 * 10000;
  ret = nanosleep(&test, &rem);
  printf("Thanks for the nap: %d \n", ret);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movq   $0x0,-0x8(%rbp)
movl   $0xc350,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1040 <nanosleep@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movq   $0x0,0x10(%rsp)
movl   $0xc350,0x8(%rsp)
lea    0x8(%rsp),%rdi
lea    0x18(%rsp),%rsi
call   1040 <nanosleep@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i64 }
@.str = [25 x i8] c"Thanks for the nap: %d \0A\00"
define void @main() {
%1 = alloca %struct.timespec
%2 = alloca %struct.timespec
%3 = alloca i32
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
store i64 0, i64* %4
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
store i32 50000, i32* %5
%6 = call i32 @nanosleep(%struct.timespec* %1, %struct.timespec* %2)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i64 }
@.str = [25 x i8] c"Thanks for the nap: %d \0A\00"
define void @main() {
%1 = alloca %struct.timespec
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %1 to i8*
%4 = bitcast %struct.timespec* %2 to i8*
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
store i64 0, i64* %5
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
store i32 50000, i32* %6
%7 = call i32 @nanosleep(%struct.timespec* %1, %struct.timespec* %2)
%8 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GenFragment(int, unsigned int);
void EmitFill(unsigned long Count) {
  while (Count) {
    unsigned Chunk = (Count > 0xFFFF) ? 0xFFFF : (unsigned)Count;
    Count -= Chunk;
    GenFragment(0x20, Chunk);
  }
}


x86 assembly (clang, -O0):
<EmitFill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1171 <EmitFill+0x61>
cmpq   $0xffff,-0x8(%rbp)
jbe    1142 <EmitFill+0x32>
mov    $0xffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1149 <EmitFill+0x39>
mov    -0x8(%rbp),%rax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%esi
mov    $0x20,%edi
call   1030 <GenFragment@plt>
jmp    111c <EmitFill+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EmitFill>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1143 <EmitFill+0x33>
mov    %rdi,%rbx
nopl   0x0(%rax)
cmp    $0xffff,%rbx
mov    $0xffff,%r14d
cmovb  %rbx,%r14
mov    $0x20,%edi
mov    %r14d,%esi
call   1030 <GenFragment@plt>
sub    %r14,%rbx
jne    1120 <EmitFill+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @EmitFill(i64 %0) {
%2 = alloca i64
%3 = alloca i32
store i64 %0, i64* %2
br label %4
4: ; preds = %14, %1
%5 = load i64, i64* %2
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %22
7: ; preds = %4
%8 = load i64, i64* %2
%9 = icmp ugt i64 %8, 65535
br i1 %9, label %10, label %11
10: ; preds = %7
br label %14
11: ; preds = %7
%12 = load i64, i64* %2
%13 = trunc i64 %12 to i32
br label %14
14: ; preds = %11, %10
%15 = phi i32 [ 65535, %10 ], [ %13, %11 ]
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = zext i32 %16 to i64
%18 = load i64, i64* %2
%19 = sub i64 %18, %17
store i64 %19, i64* %2
%20 = load i32, i32* %3
%21 = call i32 @GenFragment(i32 32, i32 %20)
br label %4
22: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @EmitFill(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %11, label %3
3: ; preds = %1, %3
%4 = phi i64 [ %8, %3 ], [ %0, %1 ]
%5 = icmp ult i64 %4, 65535
%6 = select i1 %5, i64 %4, i64 65535
%7 = trunc i64 %6 to i32
%8 = sub i64 %4, %6
%9 = tail call i32 @GenFragment(i32 32, i32 %7)
%10 = icmp eq i64 %8, 0
br i1 %10, label %11, label %3
11: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printArr(int arr[], int m) {
  for (int i = 0; i < m; i++) {
    printf("%d", arr[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<printArr>:
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    1159 <printArr+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArr+0x16>
lea    0xea3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArr>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printArr+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printArr+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @printArr(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 %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
int ld_blt_rm1(long double a1, long double *a2) {
  return (__builtin_isless(a1, *a2));
}


x86 assembly (clang, -O0):
<ld_blt_rm1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %rdi,-0x18(%rbp)
fldt   -0x10(%rbp)
mov    -0x18(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blt_rm1>:
fldt   0x8(%rsp)
fldt   (%rdi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
seta   %al
ret

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

LLVM IR (-O2):
define i32 @ld_blt_rm1(x86_fp80 %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %1
%4 = fcmp ogt x86_fp80 %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
char *strchr(const char *s, int c) {
  const char ch = c;
  for (; *s != ch; s++)
    if (*s == '\0')
      return NULL;
  return (char *)s;
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %al,-0x15(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x15(%rbp),%ecx
cmp    %ecx,%eax
je     1157 <strchr+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1141 <strchr+0x41>
movq   $0x0,-0x8(%rbp)
jmp    115f <strchr+0x5f>
jmp    1146 <strchr+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1111 <strchr+0x11>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
mov    %rdi,%rax
movsbl %sil,%ecx
movsbl (%rdi),%edx
cmp    %edx,%ecx
je     1120 <strchr+0x20>
xchg   %ax,%ax
test   %dl,%dl
je     1121 <strchr+0x21>
movsbl 0x1(%rax),%edx
add    $0x1,%rax
cmp    %edx,%ecx
jne    1110 <strchr+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
%5 = load i8, i8* %0
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %4, %6
br i1 %7, label %17, label %8
8: ; preds = %2, %12
%9 = phi i8 [ %14, %12 ], [ %5, %2 ]
%10 = phi i8* [ %13, %12 ], [ %0, %2 ]
%11 = icmp eq i8 %9, 0
br i1 %11, label %17, label %12
12: ; preds = %8
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = load i8, i8* %13
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %4, %15
br i1 %16, label %17, label %8
17: ; preds = %8, %12, %2
%18 = phi i8* [ %0, %2 ], [ %13, %12 ], [ null, %8 ]
ret i8* %18
}
void ft_striter(char *s, void (*f)(char *)) {
  if (s && f) {
    while (*s) {
      f(s);
      s++;
    }
  }
}


x86 assembly (clang, -O0):
<ft_striter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1158 <ft_striter+0x58>
cmpq   $0x0,-0x10(%rbp)
je     1158 <ft_striter+0x58>
jmp    112b <ft_striter+0x2b>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1153 <ft_striter+0x53>
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdi
call   *%rax
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    112b <ft_striter+0x2b>
jmp    1158 <ft_striter+0x58>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_striter>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1130 <ft_striter+0x30>
mov    %rsi,%r14
test   %rsi,%rsi
je     1130 <ft_striter+0x30>
mov    %rdi,%rbx
cmpb   $0x0,(%rdi)
je     1130 <ft_striter+0x30>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   *%r14
cmpb   $0x0,0x1(%rbx)
lea    0x1(%rbx),%rbx
jne    1120 <ft_striter+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ft_striter(i8* %0, void (i8*)* %1) {
%3 = icmp ne i8* %0, null
%4 = icmp ne void (i8*)* %1, null
%5 = and i1 %3, %4
br i1 %5, label %6, label %14
6: ; preds = %2
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %6, %9
%10 = phi i8* [ %11, %9 ], [ %0, %6 ]
tail call void %1(i8* %10)
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %9
14: ; preds = %9, %6, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_srli_epi32(int /*<<< orphan*/, int);
__m128i SHR(__m128i x, int n) { return _mm_srli_epi32(x, n); }


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

x86 assembly (clang, -O2):
<SHR>:
jmp    1030 <_mm_srli_epi32@plt>

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

LLVM IR (-O2):
define i32 @SHR(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_srli_epi32(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int cm_delete_entry(char *, char *, char *, char *);
int delpasswd(char *user) {
  int i;
  if ((i = cm_delete_entry(user, "%[^:]:%*[^:]:%*d:%*d:%*[^:]:%*[^:]:%*[^:]",
                           "/etc/passwd", "/etc/.passwd.cm")) != 0) {
    return i;
  }
  return 0;
}


x86 assembly (clang, -O0):
<delpasswd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
lea    0xefc(%rip),%rdx
lea    0xf01(%rip),%rcx
call   1030 <cm_delete_entry@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     1151 <delpasswd+0x41>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1158 <delpasswd+0x48>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delpasswd>:
lea    0xee9(%rip),%rsi
lea    0xf0c(%rip),%rdx
lea    0xf11(%rip),%rcx
jmp    1030 <cm_delete_entry@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"%[^:]:%*[^:]:%*d:%*d:%*[^:]:%*[^:]:%*[^:]\00"
@.str.1 = [12 x i8] c"/etc/passwd\00"
@.str.2 = [16 x i8] c"/etc/.passwd.cm\00"
define i32 @delpasswd(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @cm_delete_entry(i8* %5, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
store i32 %6, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i32, i32* %4
store i32 %9, i32* %2
br label %11
10: ; preds = %1
store i32 0, i32* %2
br label %11
11: ; preds = %10, %8
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
@.str = [42 x i8] c"%[^:]:%*[^:]:%*d:%*d:%*[^:]:%*[^:]:%*[^:]\00"
@.str.1 = [12 x i8] c"/etc/passwd\00"
@.str.2 = [16 x i8] c"/etc/.passwd.cm\00"
define i32 @delpasswd(i8* %0) {
%2 = tail call i32 @cm_delete_entry(i8* %0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void uDMAControlBaseSet(void *pControlTable) {
  DEBUG_ASSERT(((unsigned long)pControlTable & ~0x3FF) ==
               (unsigned long)pControlTable);
  DEBUG_ASSERT((unsigned long)pControlTable >= 0x20000000);
  (*((volatile unsigned long *)(0x400FF008))) = (unsigned long)pControlTable;
}


x86 assembly (clang, -O0):
<uDMAControlBaseSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xfffffffffffffc00,%rax
mov    -0x8(%rbp),%rcx
cmp    %rcx,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rax
cmp    $0x20000000,%rax
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x8(%rbp),%rcx
mov    $0x400ff008,%eax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uDMAControlBaseSet>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   $0x3ff,%ebx
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x20000000,%rbx
setae  %dil
call   1030 <DEBUG_ASSERT@plt>
mov    %rbx,0x400ff008
40
pop    %rbx
ret

LLVM IR (-O0):
define void @uDMAControlBaseSet(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, -1024
%6 = load i8*, i8** %2
%7 = ptrtoint i8* %6 to i64
%8 = icmp eq i64 %5, %7
%9 = zext i1 %8 to i32
%10 = call i32 @DEBUG_ASSERT(i32 %9)
%11 = load i8*, i8** %2
%12 = ptrtoint i8* %11 to i64
%13 = icmp uge i64 %12, 536870912
%14 = zext i1 %13 to i32
%15 = call i32 @DEBUG_ASSERT(i32 %14)
%16 = load i8*, i8** %2
%17 = ptrtoint i8* %16 to i64
store volatile i64 %17, i64* inttoptr (i64 1074786312 to i64*)
ret void
}

LLVM IR (-O2):
define void @uDMAControlBaseSet(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = and i64 %2, -1024
%4 = icmp eq i64 %3, %2
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = icmp ugt i8* %0, inttoptr (i64 536870911 to i8*)
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
store volatile i64 %2, i64* inttoptr (i64 1074786312 to i64*)
ret void
}
/* Type definitions */
struct drunkard {
  int dummy;
};

/* Variables and functions */
scalar_t__ drunkard_rng_chance(struct drunkard *, double);
int /*<<< orphan*/ drunkard_start_random_east_edge(struct drunkard *);
int /*<<< orphan*/ drunkard_start_random_west_edge(struct drunkard *);
void drunkard_start_random_westeast_edge(struct drunkard *drunk) {
  if (drunkard_rng_chance(drunk, 0.5))
    drunkard_start_random_west_edge(drunk);
  else
    drunkard_start_random_east_edge(drunk);
}


x86 assembly (clang, -O0):
<drunkard_start_random_westeast_edge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
movsd  0xeb8(%rip),%xmm0
call   1040 <drunkard_rng_chance@plt>
cmp    $0x0,%rax
je     1165 <drunkard_start_random_westeast_edge+0x35>
mov    -0x8(%rbp),%rdi
call   1030 <drunkard_start_random_west_edge@plt>
jmp    116e <drunkard_start_random_westeast_edge+0x3e>
mov    -0x8(%rbp),%rdi
call   1050 <drunkard_start_random_east_edge@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drunkard_start_random_westeast_edge>:
push   %rbx
mov    %rdi,%rbx
movsd  0xec4(%rip),%xmm0
call   1040 <drunkard_rng_chance@plt>
mov    %rbx,%rdi
test   %rax,%rax
je     114f <drunkard_start_random_westeast_edge+0x1f>
pop    %rbx
jmp    1030 <drunkard_start_random_west_edge@plt>
pop    %rbx
jmp    1050 <drunkard_start_random_east_edge@plt>

LLVM IR (-O0):
%struct.drunkard = type { i32 }
define void @drunkard_start_random_westeast_edge(%struct.drunkard* %0) {
%2 = alloca %struct.drunkard*
store %struct.drunkard* %0, %struct.drunkard** %2
%3 = load %struct.drunkard*, %struct.drunkard** %2
%4 = call i64 @drunkard_rng_chance(%struct.drunkard* %3, double 5.000000e-01)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load %struct.drunkard*, %struct.drunkard** %2
%8 = call i32 @drunkard_start_random_west_edge(%struct.drunkard* %7)
br label %12
9: ; preds = %1
%10 = load %struct.drunkard*, %struct.drunkard** %2
%11 = call i32 @drunkard_start_random_east_edge(%struct.drunkard* %10)
br label %12
12: ; preds = %9, %6
ret void
}

LLVM IR (-O2):
%struct.drunkard = type { i32 }
define void @drunkard_start_random_westeast_edge(%struct.drunkard* %0) {
%2 = tail call i64 @drunkard_rng_chance(%struct.drunkard* %0, double 5.000000e-01)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @drunkard_start_random_west_edge(%struct.drunkard* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @drunkard_start_random_east_edge(%struct.drunkard* %0)
br label %8
8: ; preds = %6, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ echo();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ nl();
int /*<<< orphan*/ nocrmode();
int /*<<< orphan*/ refresh();
void end_disp(void) {
  nocrmode();
  echo();
  nl();
  refresh();
  endwin();
}


x86 assembly (clang, -O0):
<end_disp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <nocrmode@plt>
mov    $0x0,%al
call   1030 <echo@plt>
mov    $0x0,%al
call   1040 <nl@plt>
mov    $0x0,%al
call   1060 <refresh@plt>
mov    $0x0,%al
call   1070 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<end_disp>:
push   %rax
xor    %eax,%eax
call   1050 <nocrmode@plt>
xor    %eax,%eax
call   1030 <echo@plt>
xor    %eax,%eax
call   1040 <nl@plt>
xor    %eax,%eax
call   1060 <refresh@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <endwin@plt>

LLVM IR (-O0):
define void @end_disp() {
%1 = call i32 (...) @nocrmode()
%2 = call i32 (...) @echo()
%3 = call i32 (...) @nl()
%4 = call i32 (...) @refresh()
%5 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @end_disp() {
%1 = tail call i32 (...) @nocrmode()
%2 = tail call i32 (...) @echo()
%3 = tail call i32 (...) @nl()
%4 = tail call i32 (...) @refresh()
%5 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void explain(void) {
  fprintf(stderr, " Usage: ... tcindex [ hash SIZE ] [ mask MASK ]"
                  " [ shift SHIFT ]\n");
  fprintf(stderr, "                    [ pass_on | fall_through ]\n");
  fprintf(stderr, "                    [ classid CLASSID ] "
                  "[ police POLICE_SPEC ]\n");
}


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

x86 assembly (clang, -O2):
<explain>:
push   %rbx
mov    0x2ec8(%rip),%rbx
mov    (%rbx),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf12(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xf34(%rip),%rsi
pop    %rbx
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [65 x i8] c" Usage: ... tcindex [ hash SIZE ] [ mask MASK ] [ shift SHIFT ]\0A\00"
@.str.1 = [48 x i8] c" [ pass_on | fall_through ]\0A\00"
@.str.2 = [64 x i8] c" [ classid CLASSID ] [ police POLICE_SPEC ]\0A\00"
define void @explain() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [65 x i8] c" Usage: ... tcindex [ hash SIZE ] [ mask MASK ] [ shift SHIFT ]\0A\00"
@.str.1 = [48 x i8] c" [ pass_on | fall_through ]\0A\00"
@.str.2 = [64 x i8] c" [ classid CLASSID ] [ police POLICE_SPEC ]\0A\00"
define void @explain() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ islower(int);
void t_islower_0x15() {
  Assert_real((islower(21) == 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_islower.c",
              110, ("islower should be 0 for 0x15"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x15>:
push   %rax
mov    $0x15,%edi
call   1030 <islower@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x6e,%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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x15\00"
define void @t_islower_0x15() {
%1 = call i64 @islower(i32 21)
%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 110, 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_islower.c\00"
@.str.1 = [29 x i8] c"islower should be 0 for 0x15\00"
define void @t_islower_0x15() {
%1 = tail call i64 @islower(i32 21)
%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 110, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double log10(double);
__attribute__((__weak__, __always___)) double softboundcets_log10(double x) {
  return log10(x);
}


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

x86 assembly (clang, -O2):
<softboundcets_log10>:
jmp    1030 <log10@plt>

LLVM IR (-O0):
define weak double @softboundcets_log10(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @log10(double %3)
ret double %4
}

LLVM IR (-O2):
define weak double @softboundcets_log10(double %0) {
%2 = tail call double @log10(double %0)
ret double %2
}
void STEAM_UpdateProgress(void) {}


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

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

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

LLVM IR (-O2):
define void @STEAM_UpdateProgress() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ thrd_t;

/* Variables and functions */
int /*<<< orphan*/ __pthread_join(int /*<<< orphan*/, void **);
int thrd_success;
int thrd_join(thrd_t t, int *res) {
  void *pthread_res;
  __pthread_join(t, &pthread_res);
  if (res)
    *res = (int)(intptr_t)pthread_res;
  return thrd_success;
}


x86 assembly (clang, -O0):
<thrd_join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x18(%rbp),%rsi
call   1030 <__pthread_join@plt>
cmpq   $0x0,-0x10(%rbp)
je     1142 <thrd_join+0x32>
mov    -0x18(%rbp),%rax
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    0x2e9f(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thrd_join>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
lea    0x8(%rsp),%rsi
call   1030 <__pthread_join@plt>
test   %rbx,%rbx
je     112d <thrd_join+0x1d>
mov    0x8(%rsp),%eax
mov    %eax,(%rbx)
mov    0x2eb4(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@thrd_success = global i32 0
define i32 @thrd_join(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i8*
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = call i32 @__pthread_join(i32 %6, i8** %5)
%8 = load i32*, i32** %4
%9 = icmp ne i32* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i8*, i8** %5
%12 = ptrtoint i8* %11 to i64
%13 = trunc i64 %12 to i32
%14 = load i32*, i32** %4
store i32 %13, i32* %14
br label %15
15: ; preds = %10, %2
%16 = load i32, i32* @thrd_success
ret i32 %16
}

LLVM IR (-O2):
@thrd_success = global i32 0
define i32 @thrd_join(i32 %0, i32* writeonly %1) {
%3 = alloca i8*
%4 = bitcast i8** %3 to i8*
%5 = call i32 @__pthread_join(i32 %0, i8** %3)
%6 = icmp eq i32* %1, null
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = ptrtoint i8* %8 to i64
%10 = trunc i64 %9 to i32
store i32 %10, i32* %1
br label %11
11: ; preds = %7, %2
%12 = load i32, i32* @thrd_success
ret i32 %12
}
/* Type definitions */
struct Testing {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ RequireFalse(struct Testing *, int /*<<< orphan*/);
void TestHuffmanDecode(struct Testing *t) { RequireFalse(t, 0); }


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

x86 assembly (clang, -O2):
<TestHuffmanDecode>:
xor    %esi,%esi
jmp    1030 <RequireFalse@plt>

LLVM IR (-O0):
%struct.Testing = type { i32 }
define void @TestHuffmanDecode(%struct.Testing* %0) {
%2 = alloca %struct.Testing*
store %struct.Testing* %0, %struct.Testing** %2
%3 = load %struct.Testing*, %struct.Testing** %2
%4 = call i32 @RequireFalse(%struct.Testing* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.Testing = type { i32 }
define void @TestHuffmanDecode(%struct.Testing* %0) {
%2 = tail call i32 @RequireFalse(%struct.Testing* %0, i32 0)
ret void
}
float get_biggest_of_three(float a, float b, float c) {
  if ((a > b) && (a > c)) {
    return a;
  } else if ((b > a) && (b > c)) {
    return b;
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<get_biggest_of_three>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1140 <get_biggest_of_three+0x40>
movss  -0x8(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1140 <get_biggest_of_three+0x40>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1177 <get_biggest_of_three+0x77>
movss  -0xc(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    116d <get_biggest_of_three+0x6d>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    116d <get_biggest_of_three+0x6d>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1177 <get_biggest_of_three+0x77>
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_biggest_of_three>:
movaps %xmm1,%xmm3
maxss  %xmm2,%xmm3
movaps %xmm0,%xmm4
cmpltss %xmm1,%xmm4
andps  %xmm4,%xmm3
andnps %xmm2,%xmm4
orps   %xmm3,%xmm4
cmpltss %xmm0,%xmm1
cmpltss %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm4,%xmm2
orps   %xmm2,%xmm0
andps  %xmm1,%xmm0
andnps %xmm4,%xmm1
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @get_biggest_of_three(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%8 = load float, float* %5
%9 = load float, float* %6
%10 = fcmp ogt float %8, %9
br i1 %10, label %11, label %17
11: ; preds = %3
%12 = load float, float* %5
%13 = load float, float* %7
%14 = fcmp ogt float %12, %13
br i1 %14, label %15, label %17
15: ; preds = %11
%16 = load float, float* %5
store float %16, float* %4
br label %29
17: ; preds = %11, %3
%18 = load float, float* %6
%19 = load float, float* %5
%20 = fcmp ogt float %18, %19
br i1 %20, label %21, label %27
21: ; preds = %17
%22 = load float, float* %6
%23 = load float, float* %7
%24 = fcmp ogt float %22, %23
br i1 %24, label %25, label %27
25: ; preds = %21
%26 = load float, float* %6
store float %26, float* %4
br label %29
27: ; preds = %21, %17
%28 = load float, float* %7
store float %28, float* %4
br label %29
29: ; preds = %27, %25, %15
%30 = load float, float* %4
ret float %30
}

LLVM IR (-O2):
define float @get_biggest_of_three(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %1
%5 = fcmp ogt float %0, %2
%6 = and i1 %4, %5
%7 = fcmp ogt float %1, %0
%8 = fcmp ogt float %1, %2
%9 = and i1 %7, %8
%10 = select i1 %9, float %1, float %2
%11 = select i1 %6, float %0, float %10
ret float %11
}
/* Variables and functions */
int strlen(char const *);
int stringStat(const char *string, int multiplier, int *count) {
  *count += 1;
  return strlen(string) * multiplier;
}


x86 assembly (clang, -O0):
<stringStat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
imul   -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringStat>:
push   %rbx
mov    %esi,%ebx
addl   $0x1,(%rdx)
call   1030 <strlen@plt>
imul   %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @stringStat(i8* %0, i32 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32*, i32** %6
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 1
store i32 %9, i32* %7
%10 = load i8*, i8** %4
%11 = call i32 @strlen(i8* %10)
%12 = load i32, i32* %5
%13 = mul nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @stringStat(i8* %0, i32 %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
%6 = tail call i32 @strlen(i8* %0)
%7 = mul nsw i32 %6, %1
ret i32 %7
}
unsigned xrop3_28_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = D & T;
  stk2 = S | stk3;
  stk1 = T ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_28_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_28_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
or     %esi,%eax
shl    $0x8,%esi
not    %eax
and    %esi,%eax
or     %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_28_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = shl nuw nsw i32 %5, 8
%7 = or i32 %4, %5
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
%10 = or i32 %9, %3
ret i32 %10
}