xunge/DecIR huggingface dataset:
void ufs_debugfs_hba_init(struct ufs_hba *hba) {}


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

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

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

LLVM IR (-O2):
%struct.ufs_hba = type opaque
define void @ufs_debugfs_hba_init(%struct.ufs_hba* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stress_set_wcs_method(char *);
void stress_wcs_set_default(void) { stress_set_wcs_method("all"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"all\00"
define void @stress_wcs_set_default() {
%1 = call i32 @stress_set_wcs_method(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"all\00"
define void @stress_wcs_set_default() {
%1 = tail call i32 @stress_set_wcs_method(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
int iterative_euclidean(int x, int y) {
  int swap;
  while (x != 0 && y != 0) {
    swap = x;
    x = y;
    y = swap % y;
  }
  return (x == 0) ? y : x;
}


x86 assembly (clang, -O0):
<iterative_euclidean>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
je     1123 <iterative_euclidean+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1133 <iterative_euclidean+0x33>
jmp    114e <iterative_euclidean+0x4e>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x8(%rbp)
jmp    110a <iterative_euclidean+0xa>
cmpl   $0x0,-0x4(%rbp)
jne    1163 <iterative_euclidean+0x63>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1169 <iterative_euclidean+0x69>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iterative_euclidean>:
mov    %esi,%edx
mov    %edi,%eax
test   %edi,%edi
je     1121 <iterative_euclidean+0x21>
test   %edx,%edx
je     1121 <iterative_euclidean+0x21>
nopl   0x0(%rax)
mov    %edx,%ecx
cltd
idiv   %ecx
test   %ecx,%ecx
je     1123 <iterative_euclidean+0x23>
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <iterative_euclidean+0x10>
jmp    1123 <iterative_euclidean+0x23>
mov    %eax,%ecx
test   %ecx,%ecx
cmovne %ecx,%edx
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @iterative_euclidean(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 0
%4 = icmp ne i32 %1, 0
%5 = and i1 %3, %4
br i1 %5, label %6, label %13
6: ; preds = %2, %6
%7 = phi i32 [ %8, %6 ], [ %0, %2 ]
%8 = phi i32 [ %9, %6 ], [ %1, %2 ]
%9 = srem i32 %7, %8
%10 = icmp ne i32 %8, 0
%11 = icmp ne i32 %9, 0
%12 = select i1 %10, i1 %11, i1 false
br i1 %12, label %6, label %13
13: ; preds = %6, %2
%14 = phi i32 [ %1, %2 ], [ %9, %6 ]
%15 = phi i32 [ %0, %2 ], [ %8, %6 ]
%16 = icmp eq i32 %15, 0
%17 = select i1 %16, i32 %14, i32 %15
ret i32 %17
}
void av_encryption_init_info_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_encryption_init_info_alloc() {
ret void
}
/* Variables and functions */
int execve(char const *, char *const *, char *const *);
int _execve(const char *filename, char *const argv[], char *const envp[]) {
  return execve(filename, argv, envp);
}


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

x86 assembly (clang, -O2):
<_execve>:
jmp    1030 <execve@plt>

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

LLVM IR (-O2):
define i32 @_execve(i8* %0, i8** %1, i8** %2) {
%4 = tail call i32 @execve(i8* %0, i8** %1, i8** %2)
ret i32 %4
}
/* Variables and functions */
void hard_fault_handler(void) {
  while (true)
    ;
}


x86 assembly (clang, -O0):
<hard_fault_handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <hard_fault_handler+0x9>
jmp    1109 <hard_fault_handler+0x9>

x86 assembly (clang, -O2):
<hard_fault_handler>:
jmp    1100 <hard_fault_handler>

LLVM IR (-O0):
define void @hard_fault_handler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @hard_fault_handler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ sla_cr2af_(int *, float *, char *, int *, int);
void slaCr2af(int ndp, float angle, char *sign, int idmsf[4]) {
  sla_cr2af_(&ndp, &angle, sign, idmsf, 1);
}


x86 assembly (clang, -O0):
<slaCr2af>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    -0x4(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x1,%r8d
call   1030 <sla_cr2af_@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaCr2af>:
push   %rax
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
movss  %xmm0,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
mov    $0x1,%r8d
call   1030 <sla_cr2af_@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @slaCr2af(i32 %0, float %1, i8* %2, i32* %3) {
%5 = alloca i32
%6 = alloca float
%7 = alloca i8*
%8 = alloca i32*
store i32 %0, i32* %5
store float %1, float* %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%9 = load i8*, i8** %7
%10 = load i32*, i32** %8
%11 = call i32 @sla_cr2af_(i32* %5, float* %6, i8* %9, i32* %10, i32 1)
ret void
}

LLVM IR (-O2):
define void @slaCr2af(i32 %0, float %1, i8* %2, i32* %3) {
%5 = alloca i32
%6 = alloca float
store i32 %0, i32* %5
store float %1, float* %6
%7 = call i32 @sla_cr2af_(i32* %5, float* %6, i8* %2, i32* %3, i32 1)
ret void
}
/* Type definitions */
typedef char uint8_t;

/* Variables and functions */
int WriteUInt8(char *ptr, int ofs, uint8_t val) {
  ptr[ofs] = val;
  return (ofs + 1);
}


x86 assembly (clang, -O0):
<WriteUInt8>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteUInt8>:
movslq %esi,%rax
mov    %dl,(%rdi,%rax,1)
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @WriteUInt8(i8* nocapture writeonly %0, i32 %1, i8 signext %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %2, i8* %5
%6 = add nsw i32 %1, 1
ret i32 %6
}
int main() {
  if (5 == 5)
    return 5;
  else
    return 4;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int main() {
  printf("Hello world from Alwasam Shigdar!\n");
  printf("I learned that 2+2=%d\n", 4);
  printf("The grade I am working for is:%c\n", 'A');
  printf("The temperture is barely %f\n", 32.000000);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xef7(%rip),%rdi
mov    $0x4,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xefb(%rip),%rdi
mov    $0x41,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xf36(%rip),%rdi
call   1030 <puts@plt>
lea    0xed4(%rip),%rdi
mov    $0x4,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
mov    $0x41,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xee7(%rip),%rdi
movsd  0xe9e(%rip),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"Hello world from Alwasam Shigdar!\0A\00"
@.str.1 = [23 x i8] c"I learned that 2+2=%d\0A\00"
@.str.2 = [34 x i8] c"The grade I am working for is:%c\0A\00"
@.str.3 = [29 x i8] c"The temperture is barely %f\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 4)
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 65)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double 3.200000e+01)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [23 x i8] c"I learned that 2+2=%d\0A\00"
@.str.2 = [34 x i8] c"The grade I am working for is:%c\0A\00"
@.str.3 = [29 x i8] c"The temperture is barely %f\0A\00"
@str = [34 x i8] c"Hello world from Alwasam Shigdar!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i32 4)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 65)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), double 3.200000e+01)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ allocList(int, int *);
int /*<<< orphan*/ freeList(int *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ showBooleanCombi(int *, int /*<<< orphan*/, int);
int main(void) {
  int *ptr;
  int boolean;
  puts("how many boolean valuable? ");
  scanf("%d", &boolean);
  allocList(boolean, ptr);
  showBooleanCombi(ptr, 0, boolean - 1);
  freeList(ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe9a(%rip),%rdi
call   1040 <puts@plt>
lea    0xeaa(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1060 <scanf@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <allocList@plt>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1070 <showBooleanCombi@plt>
mov    -0x10(%rbp),%rdi
call   1050 <freeList@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xea8(%rip),%rdi
call   1040 <puts@plt>
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1060 <scanf@plt>
mov    0x4(%rsp),%edi
call   1030 <allocList@plt>
mov    0x4(%rsp),%edx
add    $0xffffffff,%edx
xor    %esi,%esi
call   1070 <showBooleanCombi@plt>
call   1050 <freeList@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"how many boolean valuable? \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @puts(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %3)
%6 = load i32, i32* %3
%7 = load i32*, i32** %2
%8 = call i32 @allocList(i32 %6, i32* %7)
%9 = load i32*, i32** %2
%10 = load i32, i32* %3
%11 = sub nsw i32 %10, 1
%12 = call i32 @showBooleanCombi(i32* %9, i32 0, i32 %11)
%13 = load i32*, i32** %2
%14 = call i32 @freeList(i32* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"how many boolean valuable? \00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @allocList(i32 %5, i32* undef)
%7 = load i32, i32* %1
%8 = add nsw i32 %7, -1
%9 = call i32 @showBooleanCombi(i32* undef, i32 0, i32 %8)
%10 = call i32 @freeList(i32* undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ InstrCountSetValue(int /*<<< orphan*/);
int /*<<< orphan*/ OperandGetValue();
void Branch(void) { InstrCountSetValue(OperandGetValue()); }


x86 assembly (clang, -O0):
<Branch>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <OperandGetValue@plt>
mov    %eax,%edi
call   1030 <InstrCountSetValue@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Branch>:
push   %rax
xor    %eax,%eax
call   1040 <OperandGetValue@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <InstrCountSetValue@plt>

LLVM IR (-O0):
define void @Branch() {
%1 = call i32 (...) @OperandGetValue()
%2 = call i32 @InstrCountSetValue(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Branch() {
%1 = tail call i32 (...) @OperandGetValue()
%2 = tail call i32 @InstrCountSetValue(i32 %1)
ret void
}
void ff_hevc_put_hevc_uni_epel_v48_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v48_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void testC(float a, float b, float c) { printf("testC float\n"); }


x86 assembly (clang, -O0):
<testC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [12 x i8] c"testC float\00"
define void @testC(float %0, float %1, float %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct stat {
  int st_size;
};

/* Variables and functions */
int /*<<< orphan*/ stat(char const *, struct stat *);
int fileSize(const char *fileName) {
  struct stat st;
  stat(fileName, &st);
  return st.st_size;
}


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

x86 assembly (clang, -O2):
<fileSize>:
push   %rax
mov    %rsp,%rsi
call   1030 <stat@plt>
mov    (%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @fileSize(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @fileSize(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}
/* Type definitions */
struct solo5_start_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ strcpy(char *, char *);
int solo5_app_main(const struct solo5_start_info *si __attribute__((unused))) {
  puts("\n**** Solo5 standalone test_ssp ****\n\n");
  char buffer[16];
  strcpy(buffer, "1234567890123456789012345678901234567890\n");
  puts(buffer);
  return 1;
}


x86 assembly (clang, -O0):
<solo5_app_main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1040 <puts@plt>
lea    -0x20(%rbp),%rdi
lea    0xee4(%rip),%rsi
call   1030 <strcpy@plt>
lea    -0x20(%rbp),%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solo5_app_main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rdi
call   1040 <puts@plt>
lea    0xeef(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <puts@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.solo5_start_info = type { i32 }
@.str = [39 x i8] c"\0A**** Solo5 standalone test_ssp ****\0A\0A\00"
@.str.1 = [42 x i8] c"1234567890123456789012345678901234567890\0A\00"
define i32 @solo5_app_main(%struct.solo5_start_info* %0) {
%2 = alloca %struct.solo5_start_info*
%3 = alloca [16 x i8]
store %struct.solo5_start_info* %0, %struct.solo5_start_info** %2
%4 = call i32 @puts(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%5 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%6 = call i32 @strcpy(i8* %5, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%7 = getelementptr inbounds [16 x i8], [16 x i8]* %3, i64 0, i64 0
%8 = call i32 @puts(i8* %7)
ret i32 1
}

LLVM IR (-O2):
%struct.solo5_start_info = type { i32 }
@.str = [39 x i8] c"\0A**** Solo5 standalone test_ssp ****\0A\0A\00"
@.str.1 = [42 x i8] c"1234567890123456789012345678901234567890\0A\00"
define i32 @solo5_app_main(%struct.solo5_start_info* nocapture readnone %0) {
%2 = alloca [16 x i8]
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [16 x i8], [16 x i8]* %2, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* %4)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ gmx_tune_pme(int, char **);
int main(int argc, char *argv[]) {
  gmx_tune_pme(argc, argv);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <gmx_tune_pme@plt>
xor    %eax,%eax
pop    %rcx
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 = load i8**, i8*** %5
%8 = call i32 @gmx_tune_pme(i32 %6, i8** %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @gmx_tune_pme(i32 %0, i8** %1)
ret i32 0
}
int test_imm_B1uint32_mem(unsigned int *val) {
  return ((*val) & (0xB1 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B1uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0xb1,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B1uint32_mem>:
testb  $0xb1,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_B1uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 177
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
char Xtolower(char);
char *strlwc(char *s) {
  char *p;
  for (p = s; (*p = Xtolower(*p)); p++)
    ;
  return s;
}


x86 assembly (clang, -O0):
<strlwc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <Xtolower@plt>
mov    -0x10(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1154 <strlwc+0x44>
jmp    1143 <strlwc+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1124 <strlwc+0x14>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlwc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <Xtolower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1120 <strlwc+0x10>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strlwc(i8* returned %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call signext i8 @Xtolower(i8 signext %4)
store i8 %5, i8* %3
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %0
}
/* Variables and functions */
int drand48();
void split(int *folds, int n, int nfolds) {
  int i;
  for (i = 0; i < n; i++)
    folds[i] = (int)(drand48() * nfolds);
}


x86 assembly (clang, -O0):
<split>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115b <split+0x4b>
mov    $0x0,%al
call   1030 <drand48@plt>
mov    %eax,%edx
imul   -0x10(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1129 <split+0x19>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<split>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    1148 <split+0x38>
mov    %edx,%r14d
mov    %rdi,%r15
mov    %esi,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
xor    %eax,%eax
call   1030 <drand48@plt>
imul   %r14d,%eax
mov    %eax,(%r15,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1130 <split+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @split(i32* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %1 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %12, %7 ]
%9 = tail call i32 (...) @drand48()
%10 = mul nsw i32 %9, %2
%11 = getelementptr inbounds i32, i32* %0, i64 %8
store i32 %10, i32* %11
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__13__GeneralIO__makeOutput();
void SensirionSht11LogicP__0__CLOCK__makeOutput(void) {
  Msp430GpioC__13__GeneralIO__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @SensirionSht11LogicP__0__CLOCK__makeOutput() {
%1 = tail call i32 (...) @Msp430GpioC__13__GeneralIO__makeOutput()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ssize_t;

/* Variables and functions */
int /*<<< orphan*/ __NR_recvfrom;
int /*<<< orphan*/ syscall(int /*<<< orphan*/, int, void *, size_t, int,
                           int /*<<< orphan*/, int /*<<< orphan*/);
__attribute__((always_)) ssize_t _syscall_recv(int socket, void *buffer,
                                               size_t length, int flags) {
  return syscall(__NR_recvfrom, socket, buffer, length, flags, 0, 0);
}


x86 assembly (clang, -O0):
<_syscall_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    0x2ebb(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
xor    %r9d,%r9d
movl   $0x0,(%rsp)
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_syscall_recv>:
push   %rax
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
movl   $0x0,(%rsp)
xor    %r9d,%r9d
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__NR_recvfrom = global i32 0
define i32 @_syscall_recv(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* @__NR_recvfrom
%10 = load i32, i32* %5
%11 = load i8*, i8** %6
%12 = load i64, i64* %7
%13 = load i32, i32* %8
%14 = call i32 @syscall(i32 %9, i32 %10, i8* %11, i64 %12, i32 %13, i32 0, i32 0)
ret i32 %14
}

LLVM IR (-O2):
@__NR_recvfrom = global i32 0
define i32 @_syscall_recv(i32 %0, i8* %1, i64 %2, i32 %3) {
%5 = load i32, i32* @__NR_recvfrom
%6 = tail call i32 @syscall(i32 %5, i32 %0, i8* %1, i64 %2, i32 %3, i32 0, i32 0)
ret i32 %6
}
/* Variables and functions */
int add1(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int x, y;
  x = add1(40, 2);
  y = add1(100, -5);
  printf("got: %d %d\n", x, y);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x28,%edi
mov    $0x2,%esi
call   1040 <add1@plt>
mov    %eax,-0x8(%rbp)
mov    $0x64,%edi
mov    $0xfffffffb,%esi
call   1040 <add1@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x28,%edi
mov    $0x2,%esi
call   1040 <add1@plt>
mov    %eax,%ebx
mov    $0x64,%edi
mov    $0xfffffffb,%esi
call   1040 <add1@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"got: %d %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 @add1(i32 40, i32 2)
store i32 %4, i32* %2
%5 = call i32 @add1(i32 100, i32 -5)
store i32 %5, i32* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %3
%8 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"got: %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @add1(i32 40, i32 2)
%2 = tail call i32 @add1(i32 100, i32 -5)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %1, i32 %2)
ret i32 0
}
int thousands(int *v) {
  if (*v >= 1000) {
    *v %= 1000;
    return 3 + 8;
  }
  return 0;
}


x86 assembly (clang, -O0):
<thousands>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x3e8,(%rax)
jl     113c <thousands+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    (%rax),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x18(%rbp),%rax
mov    %edx,(%rax)
movl   $0xb,-0x4(%rbp)
jmp    1143 <thousands+0x43>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<thousands>:
mov    (%rdi),%ecx
xor    %eax,%eax
cmp    $0x3e8,%ecx
jl     1128 <thousands+0x28>
mov    %ecx,%eax
imul   $0x10624dd3,%rax,%rax
shr    $0x26,%rax
imul   $0x3e8,%eax,%eax
sub    %eax,%ecx
mov    %ecx,(%rdi)
mov    $0xb,%eax
ret

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

LLVM IR (-O2):
define i32 @thousands(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp sgt i32 %2, 999
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = urem i32 %2, 1000
store i32 %5, i32* %0
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ 11, %4 ], [ 0, %1 ]
ret i32 %7
}
void rcu_check_callbacks(int cpu, int user) {}


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

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

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

LLVM IR (-O2):
define void @rcu_check_callbacks(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef char *uint64_t;

/* Variables and functions */
uint64_t rdmsr(uint64_t n, uint64_t *rd) {
  uint64_t r1;
  uint64_t r2;
  asm volatile("mov %2, %%rcx;\n"
               "rdmsr;\n"
               "mov %%rax, %0;\n"
               "mov %%rdx, %1;\n"
               : "=g"(r1), "=g"(r2)
               : "g"(n)
               : "rax", "rcx", "rdx");
  *rd = r2;
  return r1;
}


x86 assembly (clang, -O0):
<rdmsr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rcx
rdmsr
mov    %rax,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x10(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rdmsr>:
mov    %rdi,-0x18(%rsp)
mov    -0x18(%rsp),%rcx
rdmsr
mov    %rax,-0x8(%rsp)
mov    %rdx,-0x10(%rsp)
mov    -0x10(%rsp),%rax
mov    %rax,(%rsi)
mov    -0x8(%rsp),%rax
ret

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

LLVM IR (-O2):
define i8* @rdmsr(i8* %0, i8** nocapture writeonly %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = bitcast i8** %3 to i8*
%6 = bitcast i8** %4 to i8*
%7 = load i8*, i8** %4
store i8* %7, i8** %1
%8 = load i8*, i8** %3
ret i8* %8
}
long int cast_uint_long(unsigned int x) { return (long int)x; }


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

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

LLVM IR (-O0):
define i64 @cast_uint_long(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
ret i64 %4
}

LLVM IR (-O2):
define i64 @cast_uint_long(i32 %0) {
%2 = zext i32 %0 to i64
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr,
          "Usage: fsaand [-ip d/s[dr]] [-op d/s] [-silent] [-v] [-l/-h]\n");
  fprintf(stderr, "       filename1 filename2 outfilename\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badusage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
lea    0xef5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<badusage>:
push   %rbx
mov    0x2eb8(%rip),%rbx
mov    (%rbx),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
lea    0xeff(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: fsaand [-ip d/s[dr]] [-op d/s] [-silent] [-v] [-l/-h]\0A\00"
@.str.1 = [40 x i8] c" filename1 filename2 outfilename\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"Usage: fsaand [-ip d/s[dr]] [-op d/s] [-silent] [-v] [-l/-h]\0A\00"
@.str.1 = [40 x i8] c" filename1 filename2 outfilename\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isascii(int);
void t_isascii_0xc0() {
  Assert_real((isascii(192) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              965, ("isascii should be 0 for 0xc0"));
}


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

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

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xc0\00"
define void @t_isascii_0xc0() {
%1 = call i64 @isascii(i32 192)
%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 965, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 0 for 0xc0\00"
define void @t_isascii_0xc0() {
%1 = tail call i64 @isascii(i32 192)
%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 965, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
float inverse(int x) { return (1.0 / x + 1 / x); }


x86 assembly (clang, -O0):
<inverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xeec(%rip),%xmm0
divsd  %xmm1,%xmm0
mov    $0x1,%eax
cltd
idivl  -0x4(%rbp)
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse>:
cvtsi2sd %edi,%xmm0
movsd  0xef4(%rip),%xmm1
lea    0x1(%rdi),%eax
xor    %ecx,%ecx
cmp    $0x3,%eax
cmovb  %edi,%ecx
cvtsi2sd %ecx,%xmm2
divsd  %xmm0,%xmm1
addsd  %xmm1,%xmm2
xorps  %xmm0,%xmm0
cvtsd2ss %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @inverse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fdiv double 1.000000e+00, %4
%6 = load i32, i32* %2
%7 = sdiv i32 1, %6
%8 = sitofp i32 %7 to double
%9 = fadd double %5, %8
%10 = fptrunc double %9 to float
ret float %10
}

LLVM IR (-O2):
define float @inverse(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fdiv double 1.000000e+00, %2
%4 = add i32 %0, 1
%5 = icmp ult i32 %4, 3
%6 = select i1 %5, i32 %0, i32 0
%7 = sitofp i32 %6 to double
%8 = fadd double %3, %7
%9 = fptrunc double %8 to float
ret float %9
}
int g_eq(int a, int b) { return a == b; }


x86 assembly (clang, -O0):
<g_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_eq>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @g_eq(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 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @g_eq(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ drawch16(char *, int, int, unsigned char *);
int /*<<< orphan*/ get_asc16_font(unsigned long, unsigned char *);
void putc_lcd_asc16(char *fb, int x, int y, char ch) {
  unsigned long ftoft;
  unsigned char asc16[16];
  ftoft = (unsigned char)ch * 16;
  get_asc16_font(ftoft, asc16);
  drawch16(fb, x, y, asc16);
}


x86 assembly (clang, -O0):
<putc_lcd_asc16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movzbl -0x11(%rbp),%eax
shl    $0x4,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
lea    -0x30(%rbp),%rsi
call   1030 <get_asc16_font@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    -0x30(%rbp),%rcx
call   1040 <drawch16@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc_lcd_asc16>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
movzbl %cl,%edi
shl    $0x4,%rdi
mov    %rsp,%r15
mov    %r15,%rsi
call   1030 <get_asc16_font@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14d,%edx
mov    %r15,%rcx
call   1040 <drawch16@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @putc_lcd_asc16(i8* %0, i32 %1, i32 %2, i8 signext %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8
%9 = alloca i64
%10 = alloca [16 x i8]
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i8 %3, i8* %8
%11 = load i8, i8* %8
%12 = zext i8 %11 to i32
%13 = mul nsw i32 %12, 16
%14 = sext i32 %13 to i64
store i64 %14, i64* %9
%15 = load i64, i64* %9
%16 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%17 = call i32 @get_asc16_font(i64 %15, i8* %16)
%18 = load i8*, i8** %5
%19 = load i32, i32* %6
%20 = load i32, i32* %7
%21 = getelementptr inbounds [16 x i8], [16 x i8]* %10, i64 0, i64 0
%22 = call i32 @drawch16(i8* %18, i32 %19, i32 %20, i8* %21)
ret void
}

LLVM IR (-O2):
define void @putc_lcd_asc16(i8* %0, i32 %1, i32 %2, i8 signext %3) {
%5 = alloca [16 x i8]
%6 = getelementptr inbounds [16 x i8], [16 x i8]* %5, i64 0, i64 0
%7 = zext i8 %3 to i64
%8 = shl nuw nsw i64 %7, 4
%9 = call i32 @get_asc16_font(i64 %8, i8* %6)
%10 = call i32 @drawch16(i8* %0, i32 %1, i32 %2, i8* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Cyc_Tcutil_check_bound(unsigned int, unsigned int, void *,
                                          int /*<<< orphan*/);
void Cyc_Tcutil_check_nonzero_bound(unsigned loc, void *b) {
  Cyc_Tcutil_check_bound(loc, 0U, b, 0);
}


x86 assembly (clang, -O0):
<Cyc_Tcutil_check_nonzero_bound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rdx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1030 <Cyc_Tcutil_check_bound@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Tcutil_check_nonzero_bound>:
mov    %rsi,%rdx
xor    %esi,%esi
xor    %ecx,%ecx
jmp    1030 <Cyc_Tcutil_check_bound@plt>

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

LLVM IR (-O2):
define void @Cyc_Tcutil_check_nonzero_bound(i32 %0, i8* %1) {
%3 = tail call i32 @Cyc_Tcutil_check_bound(i32 %0, i32 0, i8* %1, i32 0)
ret void
}
/* Variables and functions */
char const *getenv(char *);
const char *gp_getenv_display(void) { return getenv("DISPLAY"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"DISPLAY\00"
define i8* @gp_getenv_display() {
%1 = call i8* @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"DISPLAY\00"
define i8* @gp_getenv_display() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int isdigit(int);
int isdigit_(int c) { return isdigit(c); }


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

x86 assembly (clang, -O2):
<isdigit_>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isdigit_(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ output_byte(char);
void output_string(char *ptr) {
  int k;
  k = 0;
  while (output_byte(ptr[k++]))
    ;
}


x86 assembly (clang, -O0):
<output_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0xc(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <output_byte@plt>
cmp    $0x0,%rax
je     114d <output_string+0x3d>
jmp    1123 <output_string+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_string>:
push   %rbx
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl (%rbx),%edi
call   1030 <output_byte@plt>
add    $0x1,%rbx
test   %rax,%rax
jne    1120 <output_string+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @output_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %3
br label %4
4: ; preds = %13, %1
%5 = load i8*, i8** %2
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
store i32 %7, i32* %3
%8 = sext i32 %6 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8, i8* %9
%11 = call i64 @output_byte(i8 signext %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %4
br label %4
14: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @output_string(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %4, %2 ], [ 0, %1 ]
%4 = add nuw i64 %3, 1
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = load i8, i8* %5
%7 = tail call i64 @output_byte(i8 signext %6)
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %2
9: ; preds = %2
ret void
}