xunge/DecIR huggingface dataset:
int vartonum(char x) {
  if (x == 'x') {
    return 0;
  }
  if (x == 'y') {
    return 1;
  }
  if (x == 'z') {
    return 2;
  }
  return 0;
}


x86 assembly (clang, -O0):
<vartonum>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x78,%eax
jne    1123 <vartonum+0x23>
movl   $0x0,-0x4(%rbp)
jmp    115c <vartonum+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
jne    113c <vartonum+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115c <vartonum+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jne    1155 <vartonum+0x55>
movl   $0x2,-0x4(%rbp)
jmp    115c <vartonum+0x5c>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<vartonum>:
xor    %ecx,%ecx
cmp    $0x79,%dil
sete   %cl
cmp    $0x7a,%dil
mov    $0x2,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @vartonum(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 120
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 0, i32* %2
br label %19
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = icmp eq i32 %10, 121
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %19
13: ; preds = %8
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 122
br i1 %16, label %17, label %18
17: ; preds = %13
store i32 2, i32* %2
br label %19
18: ; preds = %13
store i32 0, i32* %2
br label %19
19: ; preds = %18, %17, %12, %7
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
define i32 @vartonum(i8 signext %0) {
%2 = icmp eq i8 %0, 121
%3 = zext i1 %2 to i32
%4 = icmp eq i8 %0, 122
%5 = select i1 %4, i32 2, i32 %3
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ EVP_PKEY;
typedef int /*<<< orphan*/ EC_KEY;

/* Variables and functions */
int /*<<< orphan*/ EC_KEY_get0_group(int /*<<< orphan*/ const *);
int /*<<< orphan*/ *EVP_PKEY_get0(int /*<<< orphan*/ *);
int param_missing_gost01(const EVP_PKEY *pk) {
  const EC_KEY *ec = EVP_PKEY_get0((EVP_PKEY *)pk);
  if (!ec)
    return 1;
  if (!EC_KEY_get0_group(ec))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<param_missing_gost01>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <EVP_PKEY_get0@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1150 <param_missing_gost01+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1175 <param_missing_gost01+0x55>
mov    -0x18(%rbp),%rdi
call   1040 <EC_KEY_get0_group@plt>
cmp    $0x0,%eax
jne    116e <param_missing_gost01+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <param_missing_gost01+0x55>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<param_missing_gost01>:
push   %rax
call   1030 <EVP_PKEY_get0@plt>
test   %rax,%rax
je     113e <param_missing_gost01+0x1e>
mov    %rax,%rdi
call   1040 <EC_KEY_get0_group@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @param_missing_gost01(i32* %0) {
%2 = tail call i32* @EVP_PKEY_get0(i32* %0)
%3 = icmp eq i32* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @EC_KEY_get0_group(i32* %2)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int computeArea(int, int /*<<< orphan*/, int, int, int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("%d\n", computeArea(-3, 0, 3, 4, 0, -1, 9, 2));
  printf("%d\n", computeArea(-1500000001, 0, -1500000000, 1, 1500000000, 0,
                             1500000001, 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xfffffffd,%edi
xor    %r8d,%r8d
mov    $0x3,%edx
mov    $0x4,%ecx
mov    $0xffffffff,%r9d
mov    %r8d,%esi
movl   $0x9,(%rsp)
movl   $0x2,0x8(%rsp)
call   1040 <computeArea@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    $0xa697d0ff,%edi
xor    %r9d,%r9d
mov    $0xa697d100,%edx
mov    $0x1,%ecx
mov    $0x59682f00,%r8d
mov    %r9d,%esi
movl   $0x59682f01,(%rsp)
movl   $0x1,0x8(%rsp)
call   1040 <computeArea@plt>
mov    %eax,%esi
lea    0xe5c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xfffffffd,%edi
xor    %esi,%esi
mov    $0x3,%edx
mov    $0x4,%ecx
xor    %r8d,%r8d
mov    $0xffffffff,%r9d
push   $0x2
push   $0x9
call   1040 <computeArea@plt>
add    $0x10,%rsp
lea    0xeb1(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0xa697d0ff,%edi
xor    %esi,%esi
mov    $0xa697d100,%edx
mov    $0x1,%ecx
mov    $0x59682f00,%r8d
xor    %r9d,%r9d
push   $0x1
push   $0x59682f01
call   1040 <computeArea@plt>
add    $0x10,%rsp
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @computeArea(i32 -3, i32 0, i32 3, i32 4, i32 0, i32 -1, i32 9, i32 2)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = call i32 @computeArea(i32 -1500000001, i32 0, i32 -1500000000, i32 1, i32 1500000000, i32 0, i32 1500000001, i32 1)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @computeArea(i32 -3, i32 0, i32 3, i32 4, i32 0, i32 -1, i32 9, i32 2)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @computeArea(i32 -1500000001, i32 0, i32 -1500000000, i32 1, i32 1500000000, i32 0, i32 1500000001, i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
long int fibonacci(long int n) {
  if (n == 0)
    return 0;
  else if (n == 1)
    return 1;
  else
    return fibonacci(n - 1) + fibonacci(n - 2);
}


x86 assembly (clang, -O0):
<fibonacci>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <fibonacci+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1178 <fibonacci+0x68>
cmpq   $0x1,-0x10(%rbp)
jne    114c <fibonacci+0x3c>
movq   $0x1,-0x8(%rbp)
jmp    1178 <fibonacci+0x68>
mov    -0x10(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <fibonacci@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
sub    $0x2,%rdi
call   1030 <fibonacci@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
add    %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fibonacci>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %r14d,%r14d
cmp    $0x2,%rbx
jb     1136 <fibonacci+0x26>
lea    -0x1(%rbx),%rdi
call   1030 <fibonacci@plt>
add    %rax,%r14
add    $0xfffffffffffffffe,%rbx
cmp    $0x2,%rbx
jae    1120 <fibonacci+0x10>
add    %r14,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @fibonacci(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 0, i64* %2
br label %19
7: ; preds = %1
%8 = load i64, i64* %3
%9 = icmp eq i64 %8, 1
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 1, i64* %2
br label %19
11: ; preds = %7
%12 = load i64, i64* %3
%13 = sub nsw i64 %12, 1
%14 = call i64 @fibonacci(i64 %13)
%15 = load i64, i64* %3
%16 = sub nsw i64 %15, 2
%17 = call i64 @fibonacci(i64 %16)
%18 = add nsw i64 %14, %17
store i64 %18, i64* %2
br label %19
19: ; preds = %11, %10, %6
%20 = load i64, i64* %2
ret i64 %20
}

LLVM IR (-O2):
define i64 @fibonacci(i64 %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i64 [ 0, %1 ], [ %10, %6 ]
%4 = phi i64 [ %0, %1 ], [ %9, %6 ]
%5 = icmp ult i64 %4, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = add nsw i64 %4, -1
%8 = tail call i64 @fibonacci(i64 %7)
%9 = add nsw i64 %4, -2
%10 = add nsw i64 %8, %3
br label %2
11: ; preds = %2
%12 = add nsw i64 %4, %3
ret i64 %12
}
h1() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @h1() {
ret i32 0
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ strcpy(char *, char const *const);
int strlen(char const *const);
char *stralloccopy(char const *const str) {
  char *s = malloc((strlen(str) + 1) * sizeof(*s));
  if (s != NULL)
    strcpy(s, str);
  return s;
}


x86 assembly (clang, -O0):
<stralloccopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1171 <stralloccopy+0x41>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stralloccopy>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1157 <stralloccopy+0x27>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @stralloccopy(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = add nsw i32 %5, 1
%7 = sext i32 %6 to i64
%8 = mul i64 %7, 1
%9 = trunc i64 %8 to i32
%10 = call i8* @malloc(i32 %9)
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = icmp ne i8* %11, null
br i1 %12, label %13, label %17
13: ; preds = %1
%14 = load i8*, i8** %3
%15 = load i8*, i8** %2
%16 = call i32 @strcpy(i8* %14, i8* %15)
br label %17
17: ; preds = %13, %1
%18 = load i8*, i8** %3
ret i8* %18
}

LLVM IR (-O2):
define i8* @stralloccopy(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
br label %8
8: ; preds = %6, %1
ret i8* %4
}
int main(void) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ abortTimeslice();
int /*<<< orphan*/ isLiftReady();
void waitLiftReady() {
  while (!isLiftReady()) {
    abortTimeslice();
  }
}


x86 assembly (clang, -O0):
<waitLiftReady>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <waitLiftReady+0x9>
mov    $0x0,%al
call   1030 <isLiftReady@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1145 <waitLiftReady+0x25>
jmp    1151 <waitLiftReady+0x31>
mov    $0x0,%al
call   1040 <abortTimeslice@plt>
jmp    1129 <waitLiftReady+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<waitLiftReady>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <isLiftReady@plt>
test   %eax,%eax
jne    1144 <waitLiftReady+0x24>
xor    %eax,%eax
call   1040 <abortTimeslice@plt>
jmp    1130 <waitLiftReady+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @waitLiftReady() {
br label %1
1: ; preds = %5, %0
%2 = call i32 (...) @isLiftReady()
%3 = icmp ne i32 %2, 0
%4 = xor i1 %3, true
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (...) @abortTimeslice()
br label %1
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @waitLiftReady() {
%1 = tail call i32 (...) @isLiftReady()
%2 = icmp eq i32 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0, %3
%4 = tail call i32 (...) @abortTimeslice()
%5 = tail call i32 (...) @isLiftReady()
%6 = icmp eq i32 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void prtusage(void) {
  printf("Generates N recursive for-loops for the range of nucleotides (i.e. "
         "range of 4).\n");
  printf("You need to give an integer N as argument.\n");
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<prtusage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf1a(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<prtusage>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1c(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [81 x i8] c"Generates N recursive for-loops for the range of nucleotides (i.e. range of 4).\0A\00"
@.str.1 = [44 x i8] c"You need to give an integer N as argument.\0A\00"
@EXIT_FAILURE = global i32 0
define void @prtusage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@str = [80 x i8] c"Generates N recursive for-loops for the range of nucleotides (i.e. range of 4).\00"
@str.2 = [43 x i8] c"You need to give an integer N as argument.\00"
define void @prtusage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.2, i64 0, i64 0))
%3 = load i32, i32* @EXIT_FAILURE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Variables and functions */
float lerp(int /*<<< orphan*/, float, float);
int /*<<< orphan*/ unlerp(float, float, float);
float linear_remap(float x, float a, float b, float c, float d) {
  return lerp(unlerp(x, a, b), c, d);
}


x86 assembly (clang, -O0):
<linear_remap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  %xmm4,-0x14(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
call   1030 <unlerp@plt>
mov    %eax,%edi
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
call   1040 <lerp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<linear_remap>:
push   %rax
movss  %xmm4,0x4(%rsp)
movss  %xmm3,(%rsp)
call   1030 <unlerp@plt>
mov    %eax,%edi
movss  (%rsp),%xmm0
movss  0x4(%rsp),%xmm1
pop    %rax
jmp    1040 <lerp@plt>

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

LLVM IR (-O2):
define float @linear_remap(float %0, float %1, float %2, float %3, float %4) {
%6 = tail call i32 @unlerp(float %0, float %1, float %2)
%7 = tail call float @lerp(i32 %6, float %3, float %4)
ret float %7
}
int insy_aes_gcm_counter_incr_csr_debug_set(
    unsigned int dev_id, union insy_aes_gcm_counter_incr_csr_debug_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<insy_aes_gcm_counter_incr_csr_debug_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.insy_aes_gcm_counter_incr_csr_debug_u = type opaque
define i32 @insy_aes_gcm_counter_incr_csr_debug_set(i32 %0, %union.insy_aes_gcm_counter_incr_csr_debug_u* %1) {
%3 = alloca i32
%4 = alloca %union.insy_aes_gcm_counter_incr_csr_debug_u*
store i32 %0, i32* %3
store %union.insy_aes_gcm_counter_incr_csr_debug_u* %1, %union.insy_aes_gcm_counter_incr_csr_debug_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.insy_aes_gcm_counter_incr_csr_debug_u = type opaque
define i32 @insy_aes_gcm_counter_incr_csr_debug_set(i32 %0, %union.insy_aes_gcm_counter_incr_csr_debug_u* nocapture readnone %1) {
ret i32 1
}
void RTR3InitDll(void) {}


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

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

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

LLVM IR (-O2):
define void @RTR3InitDll() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void show_usage(char *prog) {
  fprintf(stderr, "Usage: %s [-m <limit>] [-f <limit>] [-t temp_dir]\n", prog);
}


x86 assembly (clang, -O0):
<show_usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [51 x i8] c"Usage: %s [-m <limit>] [-f <limit>] [-t temp_dir]\0A\00"
define void @show_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [51 x i8] c"Usage: %s [-m <limit>] [-f <limit>] [-t temp_dir]\0A\00"
define void @show_usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exp(int /*<<< orphan*/);
int /*<<< orphan*/ popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basExp() { pushNumber(exp(popNumber())); }


x86 assembly (clang, -O0):
<basExp>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <exp@plt>
mov    %eax,%edi
call   1040 <pushNumber@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<basExp>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1030 <exp@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <pushNumber@plt>

LLVM IR (-O0):
define void @basExp() {
%1 = call i32 (...) @popNumber()
%2 = call i32 @exp(i32 %1)
%3 = call i32 @pushNumber(i32 %2)
ret void
}

LLVM IR (-O2):
define void @basExp() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @exp(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ plugin_script_config_read(void *);
int plugin_script_config_cb(void *data, const char *option, const char *value) {
  (void)option;
  (void)value;
  plugin_script_config_read(data);
  return 0;
}


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

x86 assembly (clang, -O2):
<plugin_script_config_cb>:
push   %rax
call   1030 <plugin_script_config_read@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @plugin_script_config_cb(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** %5
%8 = load i8*, i8** %6
%9 = load i8*, i8** %4
%10 = call i32 @plugin_script_config_read(i8* %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @plugin_script_config_cb(i8* %0, i8* nocapture readnone %1, i8* nocapture readnone %2) {
%4 = tail call i32 @plugin_script_config_read(i8* %0)
ret i32 0
}
void *drop(void *_set, const void *_element) {
  unsigned char *element = find(_set, _element);
  if (element)
    *element = 255;
  return element;
}


x86 assembly (clang, -O0):
<drop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <find@plt>
cltq
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1147 <drop+0x37>
mov    -0x18(%rbp),%rax
movb   $0xff,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drop>:
push   %rax
xor    %eax,%eax
call   1030 <find@plt>
cltq
test   %eax,%eax
je     1121 <drop+0x11>
movb   $0xff,(%rax)
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @drop(i8* %0, i8* %1) {
%3 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @find to i32 (i8*, i8*, ...)*)(i8* %0, i8* %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
%6 = icmp eq i32 %3, 0
br i1 %6, label %8, label %7
7: ; preds = %2
store i8 -1, i8* %5
br label %8
8: ; preds = %7, %2
ret i8* %5
}
/* Variables and functions */
double pow2(int);
double from_1750flt(short *input) {
  int int_mant;
  double flt_exp;
  signed char int_exp;
  int_exp = (signed char)(input[1] & 0xFF);
  int_mant = ((int)input[0] << 8) | (((int)input[1] & 0xFF00) >> 8);
  flt_exp = pow2((int)int_exp - 23);
  return (double)int_mant * flt_exp;
}


x86 assembly (clang, -O0):
<from_1750flt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl 0x2(%rax),%eax
and    $0xff,%eax
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movswl 0x2(%rcx),%ecx
and    $0xff00,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movsbl -0x19(%rbp),%edi
sub    $0x17,%edi
call   1030 <pow2@plt>
movsd  %xmm0,-0x18(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<from_1750flt>:
push   %rbx
movzwl 0x2(%rdi),%eax
movswl (%rdi),%ecx
shl    $0x8,%ecx
movsbl %al,%edi
mov    %eax,%ebx
shr    $0x8,%ebx
or     %ecx,%ebx
add    $0xffffffe9,%edi
call   1030 <pow2@plt>
cvtsi2sd %ebx,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbx
ret

LLVM IR (-O0):
define double @from_1750flt(i16* %0) {
%2 = alloca i16*
%3 = alloca i32
%4 = alloca double
%5 = alloca i8
store i16* %0, i16** %2
%6 = load i16*, i16** %2
%7 = getelementptr inbounds i16, i16* %6, i64 1
%8 = load i16, i16* %7
%9 = sext i16 %8 to i32
%10 = and i32 %9, 255
%11 = trunc i32 %10 to i8
store i8 %11, i8* %5
%12 = load i16*, i16** %2
%13 = getelementptr inbounds i16, i16* %12, i64 0
%14 = load i16, i16* %13
%15 = sext i16 %14 to i32
%16 = shl i32 %15, 8
%17 = load i16*, i16** %2
%18 = getelementptr inbounds i16, i16* %17, i64 1
%19 = load i16, i16* %18
%20 = sext i16 %19 to i32
%21 = and i32 %20, 65280
%22 = ashr i32 %21, 8
%23 = or i32 %16, %22
store i32 %23, i32* %3
%24 = load i8, i8* %5
%25 = sext i8 %24 to i32
%26 = sub nsw i32 %25, 23
%27 = call double @pow2(i32 %26)
store double %27, double* %4
%28 = load i32, i32* %3
%29 = sitofp i32 %28 to double
%30 = load double, double* %4
%31 = fmul double %29, %30
ret double %31
}

LLVM IR (-O2):
define double @from_1750flt(i16* nocapture %0) {
%2 = getelementptr inbounds i16, i16* %0, i64 1
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = load i16, i16* %0
%6 = sext i16 %5 to i32
%7 = shl nsw i32 %6, 8
%8 = lshr i16 %3, 8
%9 = zext i16 %8 to i32
%10 = or i32 %7, %9
%11 = shl i32 %4, 24
%12 = ashr exact i32 %11, 24
%13 = add nsw i32 %12, -23
%14 = tail call double @pow2(i32 %13)
%15 = sitofp i32 %10 to double
%16 = fmul double %14, %15
ret double %16
}
/* Variables and functions */
int /*<<< orphan*/ printids(void *);
void *thr_fn(void *arg) {
  printids(arg);
  return NULL;
}


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

x86 assembly (clang, -O2):
<thr_fn>:
push   %rax
call   1030 <printids@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @thr_fn(i8* %0) {
%2 = tail call i32 @printids(i8* %0)
ret i8* null
}
void RTLockValidatorSetMayPanic(void) {}


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

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

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

LLVM IR (-O2):
define void @RTLockValidatorSetMayPanic() {
ret void
}
float mph_to_knots(float mph) { return mph / 1.15078; }


x86 assembly (clang, -O0):
<mph_to_knots>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<mph_to_knots>:
cvtss2sd %xmm0,%xmm0
divsd  0xef4(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @mph_to_knots(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fpext float %3 to double
%5 = fdiv double %4, 1.150780e+00
%6 = fptrunc double %5 to float
ret float %6
}

LLVM IR (-O2):
define float @mph_to_knots(float %0) {
%2 = fpext float %0 to double
%3 = fdiv double %2, 1.150780e+00
%4 = fptrunc double %3 to float
ret float %4
}
int factors(int n) {
  int factors = 0;
  int factor = 2;
  while (factor * factor <= n) {
    if (n % factor == 0) {
      n /= factor;
      factors++;
    } else {
      factor++;
    }
  }
  return factors + 1;
}


x86 assembly (clang, -O0):
<factors>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     115d <factors+0x5d>
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    114f <factors+0x4f>
mov    -0xc(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1158 <factors+0x58>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <factors+0x15>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<factors>:
xor    %eax,%eax
cmp    $0x4,%edi
jl     1138 <factors+0x38>
xor    %r9d,%r9d
mov    $0x2,%esi
nop
mov    %edi,%eax
cltd
idiv   %esi
mov    %eax,%r8d
lea    0x1(%r9),%eax
lea    0x1(%rsi),%ecx
test   %edx,%edx
cmove  %r8d,%edi
cmovne %r9d,%eax
cmove  %esi,%ecx
mov    %ecx,%esi
imul   %ecx,%ecx
mov    %eax,%r9d
cmp    %edi,%ecx
jle    1110 <factors+0x10>
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @factors(i32 %0) {
%2 = icmp slt i32 %0, 4
br i1 %2, label %17, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %14, %3 ], [ 2, %1 ]
%5 = phi i32 [ %13, %3 ], [ 0, %1 ]
%6 = phi i32 [ %12, %3 ], [ %0, %1 ]
%7 = srem i32 %6, %4
%8 = sdiv i32 %6, %4
%9 = icmp eq i32 %7, 0
%10 = add nsw i32 %5, 1
%11 = add nsw i32 %4, 1
%12 = select i1 %9, i32 %8, i32 %6
%13 = select i1 %9, i32 %10, i32 %5
%14 = select i1 %9, i32 %4, i32 %11
%15 = mul nsw i32 %14, %14
%16 = icmp sgt i32 %15, %12
br i1 %16, label %17, label %3
17: ; preds = %3, %1
%18 = phi i32 [ 0, %1 ], [ %13, %3 ]
%19 = add nsw i32 %18, 1
ret i32 %19
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void scope2(int a) { printf("%d\n", a); }


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

x86 assembly (clang, -O2):
<scope2>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @scope2(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
double pow(double, double);
double xyz_to_lab(double c) {
  return c > 216.0 / 24389.0 ? pow(c, 1.0 / 3.0)
                             : c * (841.0 / 108.0) + (4.0 / 29.0);
}


x86 assembly (clang, -O0):
<xyz_to_lab>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1150 <xyz_to_lab+0x40>
movsd  -0x8(%rbp),%xmm0
movsd  0xed7(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x10(%rbp)
jmp    1172 <xyz_to_lab+0x62>
movsd  -0x8(%rbp),%xmm0
movsd  0xeab(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xea7(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xyz_to_lab>:
ucomisd 0xee8(%rip),%xmm0
jbe    1127 <xyz_to_lab+0x17>
movsd  0xef6(%rip),%xmm1
jmp    1030 <pow@plt>
mulsd  0xed9(%rip),%xmm0
addsd  0xed9(%rip),%xmm0
ret

LLVM IR (-O0):
define double @xyz_to_lab(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0x3F822354D28F7CD6
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = call double @pow(double %6, double 0x3FD5555555555555)
br label %11
8: ; preds = %1
%9 = load double, double* %2
%10 = call double @llvm.fmuladd.f64(double %9, double 0x401F25ED097B425F, double 0x3FC1A7B9611A7B96)
br label %11
11: ; preds = %8, %5
%12 = phi double [ %7, %5 ], [ %10, %8 ]
ret double %12
}

LLVM IR (-O2):
define double @xyz_to_lab(double %0) {
%2 = fcmp ogt double %0, 0x3F822354D28F7CD6
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call double @pow(double %0, double 0x3FD5555555555555)
br label %7
5: ; preds = %1
%6 = tail call double @llvm.fmuladd.f64(double %0, double 0x401F25ED097B425F, double 0x3FC1A7B9611A7B96)
br label %7
7: ; preds = %5, %3
%8 = phi double [ %4, %3 ], [ %6, %5 ]
ret double %8
}
/* Variables and functions */
size_t rio_writen(int, void *, size_t);
int /*<<< orphan*/ unix_error(char *);
void Rio_writen(int fd, void *usrbuf, size_t n) {
  if (rio_writen(fd, usrbuf, n) != n)
    unix_error("Rio_writen error");
}


x86 assembly (clang, -O0):
<Rio_writen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <rio_writen@plt>
cmp    -0x18(%rbp),%rax
je     1159 <Rio_writen+0x39>
lea    0xeac(%rip),%rdi
call   1040 <unix_error@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Rio_writen>:
push   %rbx
mov    %rdx,%rbx
call   1030 <rio_writen@plt>
cmp    %rbx,%rax
jne    1130 <Rio_writen+0x10>
pop    %rbx
ret
lea    0xec9(%rip),%rdi
pop    %rbx
jmp    1040 <unix_error@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"Rio_writen error\00"
define void @Rio_writen(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i64 @rio_writen(i32 %7, i8* %8, i64 %9)
%11 = load i64, i64* %6
%12 = icmp ne i64 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = call i32 @unix_error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %13, %3
ret void
}

LLVM IR (-O2):
@.str = [17 x i8] c"Rio_writen error\00"
define void @Rio_writen(i32 %0, i8* %1, i64 %2) {
%4 = tail call i64 @rio_writen(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i64 %4, %2
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @unix_error(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret void
}
void i2d_ECPrivateKey_bio(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_ECPrivateKey_bio() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(char const *);
char *ascii_is_valid(const char *str) {
  const char *p;
  assert(str);
  for (p = str; *p; p++)
    if ((unsigned char)*p >= 128)
      return NULL;
  return (char *)str;
}


x86 assembly (clang, -O0):
<ascii_is_valid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     116f <ascii_is_valid+0x5f>
mov    -0x18(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x80,%eax
jl     1159 <ascii_is_valid+0x49>
movq   $0x0,-0x8(%rbp)
jmp    1177 <ascii_is_valid+0x67>
jmp    115e <ascii_is_valid+0x4e>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    112d <ascii_is_valid+0x1d>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ascii_is_valid>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    (%rbx),%al
test   %al,%al
je     1143 <ascii_is_valid+0x33>
lea    0x1(%rbx),%rcx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
test   %al,%al
js     1141 <ascii_is_valid+0x31>
movzbl (%rcx),%eax
add    $0x1,%rcx
test   %al,%al
jne    1130 <ascii_is_valid+0x20>
jmp    1143 <ascii_is_valid+0x33>
xor    %ebx,%ebx
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @ascii_is_valid(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i8, i8* %12
%7 = icmp eq i8 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %1, %5
%9 = phi i8 [ %6, %5 ], [ %3, %1 ]
%10 = phi i8* [ %12, %5 ], [ %0, %1 ]
%11 = icmp slt i8 %9, 0
%12 = getelementptr inbounds i8, i8* %10, i64 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %1
%14 = phi i8* [ %0, %1 ], [ %0, %5 ], [ null, %8 ]
ret i8* %14
}
ATOBUF(p, cp) register char *p;
char *cp;
{
  register int i;
  register long l = (long)cp;
  p += 4;
  for (i = 4; i > 0; i--) {
    *--p = l;
    l >>= 8;
  }
}


x86 assembly (clang, -O0):
<ATOBUF>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
movl   $0x4,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jle    1163 <ATOBUF+0x63>
mov    -0x28(%rbp),%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x28(%rbp),%rax
sar    $0x8,%rax
mov    %rax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
jmp    1127 <ATOBUF+0x27>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ATOBUF>:
bswap  %esi
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @ATOBUF(i8* nocapture writeonly %0, i8* %1) {
%3 = ptrtoint i8* %1 to i64
%4 = trunc i64 %3 to i8
%5 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %4, i8* %5
%6 = lshr i64 %3, 8
%7 = trunc i64 %6 to i8
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %7, i8* %8
%9 = lshr i64 %3, 16
%10 = trunc i64 %9 to i8
%11 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %10, i8* %11
%12 = lshr i64 %3, 24
%13 = trunc i64 %12 to i8
store i8 %13, i8* %0
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ SendInterrupt(int, int, int, int);
void ScuSendExternalInterrupt01(void) {
  SendInterrupt(0x51, 0x7, 0x8000, 0x00020000);
}


x86 assembly (clang, -O0):
<ScuSendExternalInterrupt01>:
push   %rbp
mov    %rsp,%rbp
mov    $0x51,%edi
mov    $0x7,%esi
mov    $0x8000,%edx
mov    $0x20000,%ecx
call   1030 <SendInterrupt@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ScuSendExternalInterrupt01>:
mov    $0x51,%edi
mov    $0x7,%esi
mov    $0x8000,%edx
mov    $0x20000,%ecx
jmp    1030 <SendInterrupt@plt>

LLVM IR (-O0):
define void @ScuSendExternalInterrupt01() {
%1 = call i32 @SendInterrupt(i32 81, i32 7, i32 32768, i32 131072)
ret void
}

LLVM IR (-O2):
define void @ScuSendExternalInterrupt01() {
%1 = tail call i32 @SendInterrupt(i32 81, i32 7, i32 32768, i32 131072)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
uint32_t _EPIIntNumberGet(uint32_t ui32Base) {
  uint32_t ui32Int;
  ASSERT(ui32Base == 0x400D0000);
  ui32Int = 0;
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x000A0000))) {
    ui32Int = 66;
  }
  return (ui32Int);
}


x86 assembly (clang, -O0):
<_EPIIntNumberGet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x400d0000,-0x4(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
movl   $0x0,-0x8(%rbp)
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    1154 <_EPIIntNumberGet+0x44>
movl   $0x42,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_EPIIntNumberGet>:
push   %rax
xor    %eax,%eax
cmp    $0x400d0000,%edi
sete   %al
mov    %eax,%edi
call   1030 <ASSERT@plt>
mov    $0x70ff0000,%eax
and    0x400fe000,%eax
xor    %ecx,%ecx
cmp    $0x100a0000,%eax
mov    $0x42,%eax
cmovne %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @_EPIIntNumberGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 1074593792
%6 = zext i1 %5 to i32
%7 = call i32 @ASSERT(i32 %6)
store i32 0, i32* %3
%8 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%9 = and i32 %8, 1895759872
%10 = icmp eq i32 %9, 269090816
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 66, i32* %3
br label %12
12: ; preds = %11, %1
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @_EPIIntNumberGet(i32 %0) {
%2 = icmp eq i32 %0, 1074593792
%3 = zext i1 %2 to i32
%4 = tail call i32 @ASSERT(i32 %3)
%5 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%6 = and i32 %5, 1895759872
%7 = icmp eq i32 %6, 269090816
%8 = select i1 %7, i32 66, i32 0
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
long sys_fcntl64(va_list ap) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @sys_fcntl64(i32 %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x8b() {
  Assert_real((isupper(139) == 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_isupper.c",
              700, ("isupper should be 0 for 0x8b"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x8b>:
push   %rax
mov    $0x8b,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2bc,%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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x8b\00"
define void @t_isupper_0x8b() {
%1 = call i64 @isupper(i32 139)
%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 700, 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_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x8b\00"
define void @t_isupper_0x8b() {
%1 = tail call i64 @isupper(i32 139)
%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 700, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ isspace(char const);
char *skip_command_beginning(const char cmd[]) {
  while (isspace(*cmd) || *cmd == ':') {
    cmd++;
  }
  return (char *)cmd;
}


x86 assembly (clang, -O0):
<skip_command_beginning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x9(%rbp)
jne    114a <skip_command_beginning+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x3a,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115a <skip_command_beginning+0x4a>
jmp    116b <skip_command_beginning+0x5b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <skip_command_beginning+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_command_beginning>:
push   %rbx
mov    %rdi,%rbx
jmp    1124 <skip_command_beginning+0x14>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rbx
movsbl (%rbx),%edi
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <skip_command_beginning+0x10>
cmpb   $0x3a,(%rbx)
je     1120 <skip_command_beginning+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @skip_command_beginning(i8* %0) {
br label %2
2: ; preds = %10, %1
%3 = phi i8* [ %0, %1 ], [ %11, %10 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i8, i8* %3
%9 = icmp eq i8 %8, 58
br i1 %9, label %10, label %12
10: ; preds = %2, %7
%11 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
12: ; preds = %7
ret i8* %3
}
int is_ascii(const int byte) { return (byte < 0x80); }


x86 assembly (clang, -O0):
<is_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ascii>:
xor    %eax,%eax
cmp    $0x80,%edi
setl   %al
ret

LLVM IR (-O0):
define i32 @is_ascii(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 128
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @is_ascii(i32 %0) {
%2 = icmp slt i32 %0, 128
%3 = zext i1 %2 to i32
ret i32 %3
}