xunge/DecIR huggingface dataset:
/* Variables and functions */
char *int_to_roman(int);
int roman_to_int(char *);
char *subtract_roman(char minuend[], char subtrahend[]) {
  int x = roman_to_int(minuend);
  int y = roman_to_int(subtrahend);
  int difference = x - y;
  return int_to_roman(difference);
}


x86 assembly (clang, -O0):
<subtract_roman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <roman_to_int@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <roman_to_int@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1030 <int_to_roman@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subtract_roman>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1040 <roman_to_int@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <roman_to_int@plt>
sub    %eax,%ebp
mov    %ebp,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <int_to_roman@plt>

LLVM IR (-O0):
define i8* @subtract_roman(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%8 = load i8*, i8** %3
%9 = call i32 @roman_to_int(i8* %8)
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = call i32 @roman_to_int(i8* %10)
store i32 %11, i32* %6
%12 = load i32, i32* %5
%13 = load i32, i32* %6
%14 = sub nsw i32 %12, %13
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = call i8* @int_to_roman(i32 %15)
ret i8* %16
}

LLVM IR (-O2):
define i8* @subtract_roman(i8* %0, i8* %1) {
%3 = tail call i32 @roman_to_int(i8* %0)
%4 = tail call i32 @roman_to_int(i8* %1)
%5 = sub nsw i32 %3, %4
%6 = tail call i8* @int_to_roman(i32 %5)
ret i8* %6
}
/* Variables and functions */
int getgid();
int getuid();
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  printf("uid = %d, gid = %d\n", getuid(), getgid());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <getgid@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <getgid@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"uid = %d, gid = %d\0A\00"
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 = call i32 (...) @getuid()
%7 = call i32 (...) @getgid()
%8 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"uid = %d, gid = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getuid()
%4 = tail call i32 (...) @getgid()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 0
}
signed long signedlong_ignoring_signedchar(signed long x, signed char y) {
  return x;
}


x86 assembly (clang, -O0):
<signedlong_ignoring_signedchar>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signedlong_ignoring_signedchar>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i64 @signedlong_ignoring_signedchar(i64 %0, i8 signext %1) {
%3 = alloca i64
%4 = alloca i8
store i64 %0, i64* %3
store i8 %1, i8* %4
%5 = load i64, i64* %3
ret i64 %5
}

LLVM IR (-O2):
define i64 @signedlong_ignoring_signedchar(i64 returned %0, i8 signext %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void my_printf(char *s) {
  int i = 0;
  while (s[i++] != ' ')
    putchar(s[i - 1]);
}


x86 assembly (clang, -O0):
<my_printf>:
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),%eax
cmp    $0x20,%eax
je     115d <my_printf+0x4d>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <putchar@plt>
jmp    1123 <my_printf+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_printf>:
push   %rbx
mov    (%rdi),%al
cmp    $0x20,%al
je     1133 <my_printf+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <putchar@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
cmp    $0x20,%al
jne    1120 <my_printf+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @my_printf(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 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 32
br i1 %12, label %13, label %21
13: ; preds = %4
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = sub nsw i32 %15, 1
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %14, i64 %17
%19 = load i8, i8* %18
%20 = call i32 @putchar(i8 signext %19)
br label %4
21: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @my_printf(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 32
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %7, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = add nuw i64 %5, 1
%8 = tail call i32 @putchar(i8 signext %6)
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 32
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ skip_whitespace(char const **);
int blank(const char *s) {
  skip_whitespace(&s);
  return !(*s);
}


x86 assembly (clang, -O0):
<blank>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <skip_whitespace@plt>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blank>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <skip_whitespace@plt>
mov    (%rsp),%rcx
xor    %eax,%eax
cmpb   $0x0,(%rcx)
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @blank(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @skip_whitespace(i8** %2)
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @blank(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @skip_whitespace(i8** %2)
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t xorshift64(uint64_t *random) {
  *random ^= (*random << 13);
  *random ^= (*random >> 7);
  *random ^= (*random << 17);
  return *random;
}


x86 assembly (clang, -O0):
<xorshift64>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0xd,%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
sar    $0x7,%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
shl    $0x11,%ecx
mov    -0x8(%rbp),%rax
xor    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xorshift64>:
mov    (%rdi),%eax
mov    %eax,%ecx
shl    $0xd,%ecx
xor    %eax,%ecx
mov    %ecx,%edx
sar    $0x7,%edx
xor    %ecx,%edx
mov    %edx,%eax
shl    $0x11,%eax
xor    %edx,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define i32 @xorshift64(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = shl i32 %4, 13
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = xor i32 %7, %5
store i32 %8, i32* %6
%9 = load i32*, i32** %2
%10 = load i32, i32* %9
%11 = ashr i32 %10, 7
%12 = load i32*, i32** %2
%13 = load i32, i32* %12
%14 = xor i32 %13, %11
store i32 %14, i32* %12
%15 = load i32*, i32** %2
%16 = load i32, i32* %15
%17 = shl i32 %16, 17
%18 = load i32*, i32** %2
%19 = load i32, i32* %18
%20 = xor i32 %19, %17
store i32 %20, i32* %18
%21 = load i32*, i32** %2
%22 = load i32, i32* %21
ret i32 %22
}

LLVM IR (-O2):
define i32 @xorshift64(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 13
%4 = xor i32 %3, %2
%5 = ashr i32 %4, 7
%6 = xor i32 %5, %4
%7 = shl i32 %6, 17
%8 = xor i32 %7, %6
store i32 %8, i32* %0
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ proc1();
int /*<<< orphan*/ proc4();
void k(int param1) {
  proc1();
  if (param1 > 1) {
    proc4();
  }
  return;
}


x86 assembly (clang, -O0):
<k>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1040 <proc1@plt>
cmpl   $0x1,-0x4(%rbp)
jle    1143 <k+0x23>
mov    $0x0,%al
call   1030 <proc4@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<k>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <proc1@plt>
cmp    $0x2,%ebx
jl     1137 <k+0x17>
xor    %eax,%eax
pop    %rbx
jmp    1030 <proc4@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @k(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @proc1()
%4 = load i32, i32* %2
%5 = icmp sgt i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 (...) @proc4()
br label %8
8: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @k(i32 %0) {
%2 = tail call i32 (...) @proc1()
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @proc4()
br label %6
6: ; preds = %4, %1
ret void
}
void foo812(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo812(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_array(int *array, int size) {
  for (int i = 0; i < size; i++) {
    printf("%d ", array[i]);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<print_array>:
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 <print_array+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 <print_array+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_array+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 <print_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_array(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 ([4 x i8], [4 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 = [4 x i8] c"%d \00"
define void @print_array(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 ([4 x i8], [4 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
}
void __NOP(void) { __asm volatile("nop"); }


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

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

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

LLVM IR (-O2):
define void @__NOP() {
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void version() { printf("Version %s\n", "0.2.0"); }


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

x86 assembly (clang, -O2):
<version>:
lea    0xee9(%rip),%rdi
lea    0xeee(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Version %s\0A\00"
@.str.1 = [6 x i8] c"0.2.0\00"
define void @version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Version %s\0A\00"
@.str.1 = [6 x i8] c"0.2.0\00"
define void @version() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ early_main();
void kernel_main() { early_main(); }


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

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

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

LLVM IR (-O2):
define void @kernel_main() {
%1 = tail call i32 (...) @early_main()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ set_recursive_depth(int);
void set_recursive_depth_2() { set_recursive_depth(2); }


x86 assembly (clang, -O0):
<set_recursive_depth_2>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <set_recursive_depth@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_recursive_depth_2>:
mov    $0x2,%edi
jmp    1030 <set_recursive_depth@plt>

LLVM IR (-O0):
define void @set_recursive_depth_2() {
%1 = call i32 @set_recursive_depth(i32 2)
ret void
}

LLVM IR (-O2):
define void @set_recursive_depth_2() {
%1 = tail call i32 @set_recursive_depth(i32 2)
ret void
}
int cmp(const long a, const long b) { return a - b; }


x86 assembly (clang, -O0):
<cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
sub    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @cmp(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @cmp(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isprint(int);
void t_isprint_0xc0() {
  Assert_real((isprint(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_isprint.c",
              965, ("isprint should be 0 for 0xc0"));
}


x86 assembly (clang, -O0):
<t_isprint_0xc0>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc0,%edi
call   1030 <isprint@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_isprint_0xc0>:
push   %rax
mov    $0xc0,%edi
call   1030 <isprint@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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xc0\00"
define void @t_isprint_0xc0() {
%1 = call i64 @isprint(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_isprint.c\00"
@.str.1 = [29 x i8] c"isprint should be 0 for 0xc0\00"
define void @t_isprint_0xc0() {
%1 = tail call i64 @isprint(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
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void Free(void **ptr) {
  if (*ptr) {
    free(*ptr);
    *ptr = NULL;
  }
}


x86 assembly (clang, -O0):
<Free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1141 <Free+0x31>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rax
movq   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Free>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1128 <Free+0x18>
call   1030 <free@plt>
movq   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
define void @Free(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8**, i8*** %2
%8 = load i8*, i8** %7
%9 = call i32 @free(i8* %8)
%10 = load i8**, i8*** %2
store i8* null, i8** %10
br label %11
11: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @Free(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @free(i8* %2)
store i8* null, i8** %0
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ KEY_LEFTSHIFT;
int /*<<< orphan*/ pressEvKey(int /*<<< orphan*/);
int /*<<< orphan*/ releaseEvKey(int /*<<< orphan*/);
int /*<<< orphan*/ sendEvKey(int);
void sendShiftEvKey(int evKey) {
  pressEvKey(KEY_LEFTSHIFT);
  sendEvKey(evKey);
  releaseEvKey(KEY_LEFTSHIFT);
}


x86 assembly (clang, -O0):
<sendShiftEvKey>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%edi
call   1030 <pressEvKey@plt>
mov    -0x4(%rbp),%edi
call   1050 <sendEvKey@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%edi
call   1040 <releaseEvKey@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendShiftEvKey>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
mov    0x2ea3(%rip),%r14
mov    (%r14),%edi
call   1030 <pressEvKey@plt>
mov    %ebx,%edi
call   1050 <sendEvKey@plt>
mov    (%r14),%edi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <releaseEvKey@plt>

LLVM IR (-O0):
@KEY_LEFTSHIFT = global i32 0
define void @sendShiftEvKey(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @KEY_LEFTSHIFT
%4 = call i32 @pressEvKey(i32 %3)
%5 = load i32, i32* %2
%6 = call i32 @sendEvKey(i32 %5)
%7 = load i32, i32* @KEY_LEFTSHIFT
%8 = call i32 @releaseEvKey(i32 %7)
ret void
}

LLVM IR (-O2):
@KEY_LEFTSHIFT = global i32 0
define void @sendShiftEvKey(i32 %0) {
%2 = load i32, i32* @KEY_LEFTSHIFT
%3 = tail call i32 @pressEvKey(i32 %2)
%4 = tail call i32 @sendEvKey(i32 %0)
%5 = load i32, i32* @KEY_LEFTSHIFT
%6 = tail call i32 @releaseEvKey(i32 %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t read_u32(volatile void *reg) { return *((uint32_t *)reg); }


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

x86 assembly (clang, -O2):
<read_u32>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @read_u32(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @read_u32(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int time(int /*<<< orphan*/ *);
unsigned get_rand_seed(void) { return time(NULL); }


x86 assembly (clang, -O0):
<get_rand_seed>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <time@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rand_seed>:
xor    %edi,%edi
jmp    1030 <time@plt>

LLVM IR (-O0):
define i32 @get_rand_seed() {
%1 = call i32 @time(i32* null)
ret i32 %1
}

LLVM IR (-O2):
define i32 @get_rand_seed() {
%1 = tail call i32 @time(i32* null)
ret i32 %1
}
/* Variables and functions */
int islower(char c) { return c >= 'a' && c <= 'z'; }


x86 assembly (clang, -O0):
<islower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x61,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <islower+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islower>:
add    $0x9f,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @islower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 97
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 122
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @islower(i8 signext %0) {
%2 = add i8 %0, -97
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
double BounceEaseOut(int);
double BounceEaseIn(double p) { return 1 - BounceEaseOut(1 - p); }


x86 assembly (clang, -O0):
<BounceEaseIn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1030 <BounceEaseOut@plt>
movaps %xmm0,%xmm1
movsd  0xec2(%rip),%xmm0
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<BounceEaseIn>:
push   %rax
movsd  0xee7(%rip),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
call   1030 <BounceEaseOut@plt>
movsd  0xed2(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @BounceEaseIn(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fsub double 1.000000e+00, %3
%5 = fptosi double %4 to i32
%6 = call double @BounceEaseOut(i32 %5)
%7 = fsub double 1.000000e+00, %6
ret double %7
}

LLVM IR (-O2):
define double @BounceEaseIn(double %0) {
%2 = fsub double 1.000000e+00, %0
%3 = fptosi double %2 to i32
%4 = tail call double @BounceEaseOut(i32 %3)
%5 = fsub double 1.000000e+00, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ print_stack_trace();
int /*<<< orphan*/ printk(char *, ...);
void panic(const char *msg) {
  printk("*** System panic: %s\n", msg);
  print_stack_trace();
  printk("***\n");
  for (;;)
    ;
}


x86 assembly (clang, -O0):
<panic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
mov    $0x0,%al
call   1040 <print_stack_trace@plt>
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printk@plt>
jmp    1153 <panic+0x33>

x86 assembly (clang, -O2):
<panic>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1030 <printk@plt>
xor    %eax,%eax
call   1040 <print_stack_trace@plt>
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <printk@plt>
nopw   0x0(%rax,%rax,1)
jmp    1150 <panic+0x30>

LLVM IR (-O0):
@.str = [22 x i8] c"*** System panic: %s\0A\00"
@.str.1 = [5 x i8] c"***\0A\00"
define void @panic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 (...) @print_stack_trace()
%6 = call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %7, %1
br label %7
}

LLVM IR (-O2):
@.str = [22 x i8] c"*** System panic: %s\0A\00"
@.str.1 = [5 x i8] c"***\0A\00"
define void @panic(i8* %0) {
%2 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 (...) @print_stack_trace()
%4 = tail call i32 (i8*, ...) @printk(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %5, %1
br label %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
struct netfpga {
  int dummy;
};

/* Variables and functions */
int nf2_linux_write(struct netfpga *nf, void *ctx, uint32_t reg, void *buf,
                    size_t buf_len) {
  (void)nf;
  (void)ctx;
  (void)reg;
  (void)buf;
  (void)buf_len;
  return (0);
}


x86 assembly (clang, -O0):
<nf2_linux_write>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.netfpga = type { i32 }
define i32 @nf2_linux_write(%struct.netfpga* %0, i8* %1, i32 %2, i8* %3, i64 %4) {
%6 = alloca %struct.netfpga*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
store %struct.netfpga* %0, %struct.netfpga** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store i8* %3, i8** %9
store i64 %4, i64* %10
%11 = load %struct.netfpga*, %struct.netfpga** %6
%12 = load i8*, i8** %7
%13 = load i32, i32* %8
%14 = load i8*, i8** %9
%15 = load i64, i64* %10
ret i32 0
}

LLVM IR (-O2):
%struct.netfpga = type { i32 }
define i32 @nf2_linux_write(%struct.netfpga* nocapture readnone %0, i8* nocapture readnone %1, i32 %2, i8* nocapture readnone %3, i64 %4) {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
__attribute__((always_)) int8_t detexSignInt32(int v) {
  return (int8_t)((v >> 31) | -(-v >> 31));
}


x86 assembly (clang, -O0):
<detexSignInt32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
xor    %edx,%edx
sub    -0x4(%rbp),%edx
sar    $0x1f,%edx
xor    %ecx,%ecx
sub    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<detexSignInt32>:
mov    %edi,%ecx
sar    $0x1f,%ecx
xor    %eax,%eax
test   %edi,%edi
setg   %al
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @detexSignInt32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 31
%5 = load i32, i32* %2
%6 = sub nsw i32 0, %5
%7 = ashr i32 %6, 31
%8 = sub nsw i32 0, %7
%9 = or i32 %4, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @detexSignInt32(i32 %0) {
%2 = ashr i32 %0, 31
%3 = icmp sgt i32 %0, 0
%4 = zext i1 %3 to i32
%5 = or i32 %2, %4
ret i32 %5
}
/* Variables and functions */
double ass_strtod(char *, char **);
int mystrtod(char **p, double *res) {
  char *start = *p;
  *res = ass_strtod(*p, p);
  return *p != start;
}


x86 assembly (clang, -O0):
<mystrtod>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <ass_strtod@plt>
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
cmp    -0x18(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrtod>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <ass_strtod@plt>
movsd  %xmm0,(%r14)
xor    %eax,%eax
cmp    %r15,(%rbx)
setne  %al
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @mystrtod(i8** %0, double* %1) {
%3 = alloca i8**
%4 = alloca double*
%5 = alloca i8*
store i8** %0, i8*** %3
store double* %1, double** %4
%6 = load i8**, i8*** %3
%7 = load i8*, i8** %6
store i8* %7, i8** %5
%8 = load i8**, i8*** %3
%9 = load i8*, i8** %8
%10 = load i8**, i8*** %3
%11 = call double @ass_strtod(i8* %9, i8** %10)
%12 = load double*, double** %4
store double %11, double* %12
%13 = load i8**, i8*** %3
%14 = load i8*, i8** %13
%15 = load i8*, i8** %5
%16 = icmp ne i8* %14, %15
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @mystrtod(i8** %0, double* nocapture writeonly %1) {
%3 = load i8*, i8** %0
%4 = tail call double @ass_strtod(i8* %3, i8** %0)
store double %4, double* %1
%5 = load i8*, i8** %0
%6 = icmp ne i8* %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
int test_imm_E7int8_mem(signed char *val) {
  return ((*val) & (0xE7 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_E7int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, -25
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void foo_2_1_1_1_2_2_2_1_1() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, long, int);
void uninitvar_fseek(void) {
  FILE *stream;
  long int offset;
  int origin;
  (void)fseek(stream, offset, origin);
}


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

x86 assembly (clang, -O2):
<uninitvar_fseek>:
jmp    1030 <fseek@plt>

LLVM IR (-O0):
define void @uninitvar_fseek() {
%1 = alloca i32*
%2 = alloca i64
%3 = alloca i32
%4 = load i32*, i32** %1
%5 = load i64, i64* %2
%6 = load i32, i32* %3
%7 = call i32 @fseek(i32* %4, i64 %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @uninitvar_fseek() {
%1 = tail call i32 @fseek(i32* undef, i64 undef, i32 undef)
ret void
}
double dot_prod(double v1[3], double v2[3]) {
  return v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


x86 assembly (clang, -O0):
<dot_prod>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x10(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot_prod>:
movsd  0x8(%rdi),%xmm0
mulsd  0x8(%rsi),%xmm0
movsd  (%rdi),%xmm1
mulsd  (%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  0x10(%rdi),%xmm0
mulsd  0x10(%rsi),%xmm0
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dot_prod(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %4
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %3
%12 = getelementptr inbounds double, double* %11, i64 1
%13 = load double, double* %12
%14 = load double*, double** %4
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = fmul double %13, %16
%18 = call double @llvm.fmuladd.f64(double %7, double %10, double %17)
%19 = load double*, double** %3
%20 = getelementptr inbounds double, double* %19, i64 2
%21 = load double, double* %20
%22 = load double*, double** %4
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = call double @llvm.fmuladd.f64(double %21, double %24, double %18)
ret double %25
}

LLVM IR (-O2):
define double @dot_prod(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = load double, double* %5
%7 = getelementptr inbounds double, double* %1, i64 1
%8 = load double, double* %7
%9 = fmul double %6, %8
%10 = tail call double @llvm.fmuladd.f64(double %3, double %4, double %9)
%11 = getelementptr inbounds double, double* %0, i64 2
%12 = load double, double* %11
%13 = getelementptr inbounds double, double* %1, i64 2
%14 = load double, double* %13
%15 = tail call double @llvm.fmuladd.f64(double %12, double %14, double %10)
ret double %15
}
float inverse_t_alpha(long iter, long length, float alpha) {
  float c;
  c = length / 100.0;
  return (alpha * c / (c + iter));
}


x86 assembly (clang, -O0):
<inverse_t_alpha>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xee1(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
mulss  -0x18(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
cvtsi2ssq -0x8(%rbp),%xmm2
addss  %xmm2,%xmm1
divss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<inverse_t_alpha>:
cvtsi2sd %rsi,%xmm1
divsd  0xef3(%rip),%xmm1
cvtsd2ss %xmm1,%xmm1
cvtsi2ss %rdi,%xmm2
mulss  %xmm1,%xmm0
addss  %xmm1,%xmm2
divss  %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @inverse_t_alpha(i64 %0, i64 %1, float %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca float
%7 = alloca float
store i64 %0, i64* %4
store i64 %1, i64* %5
store float %2, float* %6
%8 = load i64, i64* %5
%9 = sitofp i64 %8 to double
%10 = fdiv double %9, 1.000000e+02
%11 = fptrunc double %10 to float
store float %11, float* %7
%12 = load float, float* %6
%13 = load float, float* %7
%14 = fmul float %12, %13
%15 = load float, float* %7
%16 = load i64, i64* %4
%17 = sitofp i64 %16 to float
%18 = fadd float %15, %17
%19 = fdiv float %14, %18
ret float %19
}

LLVM IR (-O2):
define float @inverse_t_alpha(i64 %0, i64 %1, float %2) {
%4 = sitofp i64 %1 to double
%5 = fdiv double %4, 1.000000e+02
%6 = fptrunc double %5 to float
%7 = fmul float %6, %2
%8 = sitofp i64 %0 to float
%9 = fadd float %8, %6
%10 = fdiv float %7, %9
ret float %10
}
unsigned xrop3_205_0_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;
  stk2 = D | T;
  stk2 = ~stk2;
  stk1 = S | stk2;
  return stk1;
}


x86 assembly (clang, -O0):
<xrop3_205_0_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
or     -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @xrop3_205_0_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
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = or i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %9
%26 = xor i32 %25, -1
store i32 %26, i32* %9
%27 = load i32, i32* %6
%28 = load i32, i32* %9
%29 = or i32 %27, %28
store i32 %29, i32* %8
%30 = load i32, i32* %8
ret i32 %30
}

LLVM IR (-O2):
define i32 @xrop3_205_0_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 = xor i32 %5, -1
%7 = shl nsw i32 %6, 8
%8 = or i32 %4, %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ wint_t;

/* Variables and functions */
int __infer_nondet_int();
int iswpunct(wint_t wc) { return __infer_nondet_int(); }


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

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

LLVM IR (-O0):
define i32 @iswpunct(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @__infer_nondet_int()
ret i32 %3
}

LLVM IR (-O2):
define i32 @iswpunct(i32 %0) {
%2 = tail call i32 (...) @__infer_nondet_int()
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ nextword(int);
void skipchunk(int n, size_t size) {
  size_t rest = size % sizeof(size_t);
  size -= rest;
  while (size > 0) {
    nextword(n);
    size -= sizeof(size_t);
  }
  if (rest != 0)
    nextword(n);
}


x86 assembly (clang, -O0):
<skipchunk>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x7,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rcx
mov    -0x10(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jbe    115e <skipchunk+0x4e>
mov    -0x4(%rbp),%edi
call   1030 <nextword@plt>
mov    -0x10(%rbp),%rax
sub    $0x8,%rax
mov    %rax,-0x10(%rbp)
jmp    113a <skipchunk+0x2a>
cmpq   $0x0,-0x18(%rbp)
je     1171 <skipchunk+0x61>
mov    -0x4(%rbp),%edi
call   1030 <nextword@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipchunk>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
test   $0xfffffffffffffff8,%rsi
je     113d <skipchunk+0x2d>
mov    %r14,%rbx
and    $0xfffffffffffffff8,%rbx
neg    %rbx
nopl   0x0(%rax)
mov    %ebp,%edi
call   1030 <nextword@plt>
add    $0x8,%rbx
jne    1130 <skipchunk+0x20>
test   $0x7,%r14b
je     114e <skipchunk+0x3e>
mov    %ebp,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <nextword@plt>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @skipchunk(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%6 = load i64, i64* %4
%7 = urem i64 %6, 8
store i64 %7, i64* %5
%8 = load i64, i64* %5
%9 = load i64, i64* %4
%10 = sub i64 %9, %8
store i64 %10, i64* %4
br label %11
11: ; preds = %14, %2
%12 = load i64, i64* %4
%13 = icmp ugt i64 %12, 0
br i1 %13, label %14, label %19
14: ; preds = %11
%15 = load i32, i32* %3
%16 = call i32 @nextword(i32 %15)
%17 = load i64, i64* %4
%18 = sub i64 %17, 8
store i64 %18, i64* %4
br label %11
19: ; preds = %11
%20 = load i64, i64* %5
%21 = icmp ne i64 %20, 0
br i1 %21, label %22, label %25
22: ; preds = %19
%23 = load i32, i32* %3
%24 = call i32 @nextword(i32 %23)
br label %25
25: ; preds = %22, %19
ret void
}

LLVM IR (-O2):
define void @skipchunk(i32 %0, i64 %1) {
%3 = and i64 %1, 7
%4 = and i64 %1, -8
%5 = icmp eq i64 %4, 0
br i1 %5, label %11, label %6
6: ; preds = %2, %6
%7 = phi i64 [ %9, %6 ], [ %4, %2 ]
%8 = tail call i32 @nextword(i32 %0)
%9 = add i64 %7, -8
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %2
%12 = icmp eq i64 %3, 0
br i1 %12, label %15, label %13
13: ; preds = %11
%14 = tail call i32 @nextword(i32 %0)
br label %15
15: ; preds = %13, %11
ret void
}
void I210ToARGBRow_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @I210ToARGBRow_Any_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void chaz_Probe_die_usage(void) {
  fprintf(stderr,
          "Usage: ./charmonize --cc=CC_COMMAND [--enable-c] "
          "[--enable-perl] [--enable-python] [--enable-ruby] -- CFLAGS\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [110 x i8] c"Usage: ./charmonize --cc=CC_COMMAND [--enable-c] [--enable-perl] [--enable-python] [--enable-ruby] -- CFLAGS\0A\00"
define void @chaz_Probe_die_usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [110 x i8] c"Usage: ./charmonize --cc=CC_COMMAND [--enable-c] [--enable-perl] [--enable-python] [--enable-ruby] -- CFLAGS\0A\00"
define void @chaz_Probe_die_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([110 x i8], [110 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef scalar_t__ int64_t;

/* Variables and functions */
int /*<<< orphan*/ set_rounding();
void cvt_d_l(const int64_t *source, double *dest) {
  set_rounding();
  *dest = (double)*source;
}


x86 assembly (clang, -O0):
<cvt_d_l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <set_rounding@plt>
mov    -0x8(%rbp),%rax
cvtsi2sdq (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cvt_d_l>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <set_rounding@plt>
cvtsi2sdq (%rbx),%xmm0
movsd  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @cvt_d_l(i64* %0, double* %1) {
%3 = alloca i64*
%4 = alloca double*
store i64* %0, i64** %3
store double* %1, double** %4
%5 = call i32 (...) @set_rounding()
%6 = load i64*, i64** %3
%7 = load i64, i64* %6
%8 = sitofp i64 %7 to double
%9 = load double*, double** %4
store double %8, double* %9
ret void
}

LLVM IR (-O2):
define void @cvt_d_l(i64* nocapture %0, double* nocapture writeonly %1) {
%3 = tail call i32 (...) @set_rounding()
%4 = load i64, i64* %0
%5 = sitofp i64 %4 to double
store double %5, double* %1
ret void
}
void DBGPRINTF(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @DBGPRINTF(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
long sysconf(int name) {
  (void)name;
  puts("sysconf: not implemented");
  return -1;
}


x86 assembly (clang, -O0):
<sysconf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffffffffffff,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sysconf>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffffffffffff,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [25 x i8] c"sysconf: not implemented\00"
define i64 @sysconf(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @puts(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i64 -1
}

LLVM IR (-O2):
@.str = [25 x i8] c"sysconf: not implemented\00"
define i64 @sysconf(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
ret i64 -1
}
/* Variables and functions */
int /*<<< orphan*/ poll_key();
void pause() { poll_key(); }


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

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

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

LLVM IR (-O2):
define void @pause() {
%1 = tail call i32 (...) @poll_key()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void my_func(int signum) { printf("If you want to quit,please try SIGQUIT\n"); }


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

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

LLVM IR (-O0):
@.str = [40 x i8] c"If you want to quit,please try SIGQUIT\0A\00"
define void @my_func(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [39 x i8] c"If you want to quit,please try SIGQUIT\00"
define void @my_func(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
ret void
}