xunge/DecIR huggingface dataset:
/* Variables and functions */
int fib1();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(int argc, char *argv[], char *envp[]) {
  int g3;
  int local0;
  printf("Input number: ");
  scanf("%d", &local0);
  g3 = fib1();
  printf("fibonacci(%d) = %d\n", local0, g3);
  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    %rdx,-0x18(%rbp)
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    -0x20(%rbp),%rsi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <fib1@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%esi
mov    -0x1c(%rbp),%edx
lea    0xe93(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xec8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1040 <fib1@plt>
mov    0x4(%rsp),%esi
lea    0xeb0(%rip),%rdi
mov    %eax,%edx
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Input number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"fibonacci(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %9)
%12 = call i32 (...) @fib1()
store i32 %12, i32* %8
%13 = load i32, i32* %9
%14 = load i32, i32* %8
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %13, i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Input number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [20 x i8] c"fibonacci(%d) = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%8 = call i32 (...) @fib1()
%9 = load i32, i32* %4
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %9, i32 %8)
ret i32 0
}
/* Variables and functions */
int getCurrentTemperature(char const *);
int /*<<< orphan*/ output(char *, int);
void printThermalZoneTemperature(const char *cmd) {
  int temperature = getCurrentTemperature(cmd);
  output("%d\n", temperature);
}


x86 assembly (clang, -O0):
<printThermalZoneTemperature>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getCurrentTemperature@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xebe(%rip),%rdi
call   1030 <output@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printThermalZoneTemperature>:
push   %rax
call   1040 <getCurrentTemperature@plt>
lea    0xed3(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1030 <output@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @printThermalZoneTemperature(i8* %0) {
%2 = tail call i32 @getCurrentTemperature(i8* %0)
%3 = tail call i32 @output(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %2)
ret void
}
/* Variables and functions */
int sscanf(char *, char *, long *, long *);
int scan_dev(char *attr_str, long *majorp, long *minorp) {
  return sscanf(attr_str, "%ld:%ld", majorp, minorp);
}


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

x86 assembly (clang, -O2):
<scan_dev>:
mov    %rdx,%rcx
mov    %rsi,%rdx
lea    0xee3(%rip),%rsi
jmp    1030 <sscanf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"%ld:%ld\00"
define i32 @scan_dev(i8* %0, i64* %1, i64* %2) {
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i64*
store i8* %0, i8** %4
store i64* %1, i64** %5
store i64* %2, i64** %6
%7 = load i8*, i8** %4
%8 = load i64*, i64** %5
%9 = load i64*, i64** %6
%10 = call i32 @sscanf(i8* %7, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64* %8, i64* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [8 x i8] c"%ld:%ld\00"
define i32 @scan_dev(i8* nocapture %0, i64* %1, i64* %2) {
%4 = tail call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
ret i32 %4
}
struct A *current(struct A *p) {
  return p ?: 0;
}


x86 assembly (clang, -O0):
<current>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1127 <current+0x27>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1132 <current+0x32>
xor    %eax,%eax
mov    %rax,-0x18(%rbp)
jmp    1132 <current+0x32>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.A = type opaque
define %struct.A* @current(%struct.A* %0) {
%2 = alloca %struct.A*
store %struct.A* %0, %struct.A** %2
%3 = load %struct.A*, %struct.A** %2
%4 = icmp ne %struct.A* %3, null
br i1 %4, label %5, label %6
5: ; preds = %1
br label %7
6: ; preds = %1
br label %7
7: ; preds = %6, %5
%8 = phi %struct.A* [ %3, %5 ], [ null, %6 ]
ret %struct.A* %8
}

LLVM IR (-O2):
%struct.A = type opaque
define %struct.A* @current(%struct.A* readnone returned %0) {
ret %struct.A* %0
}
g(int a) { return a + 1; }


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

x86 assembly (clang, -O2):
<g>:
lea    0x1(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @g(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @g(i32 %0) {
%2 = add nsw i32 %0, 1
ret i32 %2
}
int isgraph(int c) {
  return ((unsigned char)c >= 33) && ((unsigned char)c <= 126);
}


x86 assembly (clang, -O0):
<isgraph>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
movzbl %al,%ecx
xor    %eax,%eax
cmp    $0x21,%ecx
mov    %al,-0x5(%rbp)
jl     112a <isgraph+0x2a>
mov    -0x4(%rbp),%eax
movzbl %al,%eax
cmp    $0x7e,%eax
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isgraph>:
movzbl %dil,%ecx
add    $0xffffffdf,%ecx
xor    %eax,%eax
cmp    $0x5e,%ecx
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isgraph(i32 %0) {
%2 = and i32 %0, 255
%3 = add nsw i32 %2, -33
%4 = icmp ult i32 %3, 94
%5 = zext i1 %4 to i32
ret i32 %5
}
int foo2(int i) { return (i == 0); }


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

x86 assembly (clang, -O2):
<foo2>:
xor    %eax,%eax
test   %edi,%edi
sete   %al
ret

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

LLVM IR (-O2):
define i32 @foo2(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
int sign(double a) {
  if (a < 0)
    return -1;
  return 1;
}


x86 assembly (clang, -O0):
<sign>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    1123 <sign+0x23>
movl   $0xffffffff,-0x4(%rbp)
jmp    112a <sign+0x2a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sign>:
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setbe  %al
add    %eax,%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @sign(double %0) {
%2 = alloca i32
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 -1, i32* %2
br label %8
7: ; preds = %1
store i32 1, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @sign(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = select i1 %2, i32 -1, i32 1
ret i32 %3
}
/* Variables and functions */
scalar_t__ safe_malloc(size_t);
int *int_array_new(size_t n) { return (int *)safe_malloc(n * sizeof(int)); }


x86 assembly (clang, -O0):
<int_array_new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
shl    $0x2,%rdi
call   1030 <safe_malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_array_new>:
shl    $0x2,%rdi
jmp    1030 <safe_malloc@plt>

LLVM IR (-O0):
define i32* @int_array_new(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 4
%5 = call i64 @safe_malloc(i64 %4)
%6 = inttoptr i64 %5 to i32*
ret i32* %6
}

LLVM IR (-O2):
define i32* @int_array_new(i64 %0) {
%2 = shl i64 %0, 2
%3 = tail call i64 @safe_malloc(i64 %2)
%4 = inttoptr i64 %3 to i32*
ret i32* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t strspn(char *, char *);
size_t wcsspn(const wchar_t *s1, const wchar_t *s2) {
  return strspn((char *)s1, (char *)s2);
}


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

x86 assembly (clang, -O2):
<wcsspn>:
jmp    1030 <strspn@plt>

LLVM IR (-O0):
define i64 @wcsspn(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = bitcast i32* %5 to i8*
%7 = load i32*, i32** %4
%8 = bitcast i32* %7 to i8*
%9 = call i64 @strspn(i8* %6, i8* %8)
ret i64 %9
}

LLVM IR (-O2):
define i64 @wcsspn(i32* nocapture %0, i32* nocapture %1) {
%3 = bitcast i32* %0 to i8*
%4 = bitcast i32* %1 to i8*
%5 = tail call i64 @strspn(i8* %3, i8* %4)
ret i64 %5
}
/* Type definitions */
struct ListNode {
  int dummy;
};

/* Variables and functions */
struct ListNode *createList(int *, int);
int /*<<< orphan*/ deleteDuplicates(struct ListNode *);
int /*<<< orphan*/ printList(struct ListNode *);
int main(void) {
  int arr[5] = {1, 1, 2, 3, 3};
  struct ListNode *head = NULL;
  head = createList(arr, 5);
  printList(head);
  deleteDuplicates(head);
  printList(head);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb5(%rip),%eax
mov    %eax,-0x10(%rbp)
movq   $0x0,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <createList@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
call   1050 <printList@plt>
mov    -0x28(%rbp),%rdi
call   1030 <deleteDuplicates@plt>
mov    -0x28(%rbp),%rdi
call   1050 <printList@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    0xed5(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xeba(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <createList@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <printList@plt>
mov    %rbx,%rdi
call   1030 <deleteDuplicates@plt>
mov    %rbx,%rdi
call   1050 <printList@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.ListNode = type { i32 }
@__const.main.arr = [5 x i32] [i32 1, i32 1, i32 2, i32 3, i32 3]
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca %struct.ListNode*
store i32 0, i32* %1
%4 = bitcast [5 x i32]* %2 to i8*
store %struct.ListNode* null, %struct.ListNode** %3
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%6 = call %struct.ListNode* @createList(i32* %5, i32 5)
store %struct.ListNode* %6, %struct.ListNode** %3
%7 = load %struct.ListNode*, %struct.ListNode** %3
%8 = call i32 @printList(%struct.ListNode* %7)
%9 = load %struct.ListNode*, %struct.ListNode** %3
%10 = call i32 @deleteDuplicates(%struct.ListNode* %9)
%11 = load %struct.ListNode*, %struct.ListNode** %3
%12 = call i32 @printList(%struct.ListNode* %11)
ret i32 0
}

LLVM IR (-O2):
%struct.ListNode = type { i32 }
@__const.main.arr = [5 x i32] [i32 1, i32 1, i32 2, i32 3, i32 3]
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call %struct.ListNode* @createList(i32* %3, i32 5)
%5 = call i32 @printList(%struct.ListNode* %4)
%6 = call i32 @deleteDuplicates(%struct.ListNode* %4)
%7 = call i32 @printList(%struct.ListNode* %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void openHTMLHeader() { printf("%s\n", "<html><head><title>", stdout); }


x86 assembly (clang, -O0):
<openHTMLHeader>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edx
lea    0xedc(%rip),%rdi
lea    0xed9(%rip),%rsi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<openHTMLHeader>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
lea    0xee0(%rip),%rdi
lea    0xedd(%rip),%rsi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [20 x i8] c"<html><head><title>\00"
@stdout = global i32 0
define void @openHTMLHeader() {
%1 = load i32, i32* @stdout
%2 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [20 x i8] c"<html><head><title>\00"
@stdout = global i32 0
define void @openHTMLHeader() {
%1 = load i32, i32* @stdout
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret void
}
/* Variables and functions */
unsigned char *base16_encode(unsigned char *, size_t *, unsigned char const *,
                             size_t);
unsigned char *encode_buffer_base16(unsigned char *out, size_t *out_len,
                                    const unsigned char *in, size_t in_len) {
  return base16_encode(out, out_len, in, in_len);
}


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

x86 assembly (clang, -O2):
<encode_buffer_base16>:
jmp    1030 <base16_encode@plt>

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

LLVM IR (-O2):
define i8* @encode_buffer_base16(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = tail call i8* @base16_encode(i8* %0, i64* %1, i8* %2, i64 %3)
ret i8* %5
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int solve_dobldobl_system(int *root_count, int nbtasks) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(700, root_count, &nbtasks, c);
  return fail;
}


x86 assembly (clang, -O0):
<solve_dobldobl_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    $0x2bc,%edi
lea    -0xc(%rbp),%rdx
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<solve_dobldobl_system>:
push   %rax
mov    %rdi,%rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rdx
mov    $0x2bc,%edi
mov    %rax,%rsi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @solve_dobldobl_system(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
%6 = alloca double*
store i32* %0, i32** %3
store i32 %1, i32* %4
%7 = load i32*, i32** %3
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 700, i32* %7, i32* %4, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @solve_dobldobl_system(i32* %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 700, i32* %0, i32* %3, double* undef)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ do_n_times(int);
void do_2K_times_Bad() { do_n_times(2000); }


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

x86 assembly (clang, -O2):
<do_2K_times_Bad>:
mov    $0x7d0,%edi
jmp    1030 <do_n_times@plt>

LLVM IR (-O0):
define void @do_2K_times_Bad() {
%1 = call i32 @do_n_times(i32 2000)
ret void
}

LLVM IR (-O2):
define void @do_2K_times_Bad() {
%1 = tail call i32 @do_n_times(i32 2000)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_rwlock_t;

/* Variables and functions */
int ENOSYS;
int pthread_rwlock_wrlock(pthread_rwlock_t *rwlock) { return -ENOSYS; }


x86 assembly (clang, -O0):
<pthread_rwlock_wrlock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
mov    0x2ed7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_rwlock_wrlock>:
mov    0x2ee1(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @pthread_rwlock_wrlock(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32, i32* @ENOSYS
%4 = sub nsw i32 0, %3
ret i32 %4
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @pthread_rwlock_wrlock(i32* nocapture readnone %0) {
%2 = load i32, i32* @ENOSYS
%3 = sub nsw i32 0, %2
ret i32 %3
}
START_TEST(test_get_id) {
  char *newid = get_id();
  int newid_length = strlen(newid);
  free(newid);
  ck_assert_int_eq(newid_length, 36);
}


x86 assembly (clang, -O0):
<START_TEST>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1060 <get_id@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x14(%rbp),%edi
mov    $0x24,%esi
mov    $0x0,%al
call   1050 <ck_assert_int_eq@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<START_TEST>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <get_id@plt>
movslq %eax,%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14d,%edi
mov    $0x24,%esi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <ck_assert_int_eq@plt>

LLVM IR (-O0):
define i32 @START_TEST(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
%6 = call i32 (...) @get_id()
%7 = sext i32 %6 to i64
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %4
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
%11 = trunc i64 %10 to i32
store i32 %11, i32* %5
%12 = load i8*, i8** %4
%13 = load i32, i32* %5
%14 = call i32 (i32, i32, ...) bitcast (i32 (...)* @ck_assert_int_eq to i32 (i32, i32, ...)*)(i32 %13, i32 36)
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @START_TEST(i32 %0) {
%2 = tail call i32 (...) @get_id()
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i8*
%5 = tail call i64 @strlen(i8* dereferenceable(1) %4)
%6 = trunc i64 %5 to i32
tail call void @free(i8* %4)
%7 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @ck_assert_int_eq to i32 (i32, i32, ...)*)(i32 %6, i32 36)
ret i32 undef
}
void fp_regs_set(unsigned val) {}


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

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

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

LLVM IR (-O2):
define void @fp_regs_set(i32 %0) {
ret void
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMRD6_set(void) { return U_WMRCORENONE_set("U_WMRD6"); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRD6\00"
define i8* @U_WMRD6_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
void wolf3do_decoder(void) {}


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

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

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

LLVM IR (-O2):
define void @wolf3do_decoder() {
ret void
}
void *Sys_InitializeCriticalSection() { return (void *)-1; }


x86 assembly (clang, -O0):
<Sys_InitializeCriticalSection>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_InitializeCriticalSection>:
mov    $0xffffffffffffffff,%rax
ret

LLVM IR (-O0):
define i8* @Sys_InitializeCriticalSection() {
ret i8* inttoptr (i64 -1 to i8*)
}

LLVM IR (-O2):
define i8* @Sys_InitializeCriticalSection() {
ret i8* inttoptr (i64 -1 to i8*)
}
/* Variables and functions */
int read(int, void *, size_t);
int sock_recv(int fd, void *dest, size_t maxlen) {
  int err;
  if (!dest)
    return -1;
  if (maxlen <= 0)
    return 0;
  err = read(fd, dest, maxlen);
  if (err < 0) {
    return err;
  }
  return err;
}


x86 assembly (clang, -O0):
<sock_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    113a <sock_recv+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    117f <sock_recv+0x6f>
cmpq   $0x0,-0x18(%rbp)
ja     1151 <sock_recv+0x41>
movl   $0x0,-0x4(%rbp)
jmp    117f <sock_recv+0x6f>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <read@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    1179 <sock_recv+0x69>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    117f <sock_recv+0x6f>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sock_recv>:
test   %rsi,%rsi
je     111f <sock_recv+0xf>
test   %rdx,%rdx
je     1125 <sock_recv+0x15>
jmp    1030 <read@plt>
mov    $0xffffffff,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sock_recv(i32 %0, i8* %1, i64 %2) {
%4 = icmp eq i8* %1, null
br i1 %4, label %9, label %5
5: ; preds = %3
%6 = icmp eq i64 %2, 0
br i1 %6, label %9, label %7
7: ; preds = %5
%8 = tail call i32 @read(i32 %0, i8* %1, i64 %2)
br label %9
9: ; preds = %7, %5, %3
%10 = phi i32 [ -1, %3 ], [ 0, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ CLOCK_SYS_GetBusClockFreq();
uint32_t CLOCK_SYS_GetVrefFreq(uint32_t instance) {
  (void)instance;
  return CLOCK_SYS_GetBusClockFreq();
}


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

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

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

LLVM IR (-O2):
define i32 @CLOCK_SYS_GetVrefFreq(i32 %0) {
%2 = tail call i32 (...) @CLOCK_SYS_GetBusClockFreq()
ret i32 %2
}
/* Type definitions */
struct symbol_list {
  int dummy;
};

/* Variables and functions */
struct symbol_list *__sparse(char *);
int /*<<< orphan*/ evaluate_symbol_list(struct symbol_list *);
struct symbol_list *sparse(char *filename) {
  struct symbol_list *res = __sparse(filename);
  evaluate_symbol_list(res);
  return res;
}


x86 assembly (clang, -O0):
<sparse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__sparse@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <evaluate_symbol_list@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sparse>:
push   %rbx
call   1030 <__sparse@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <evaluate_symbol_list@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.symbol_list = type { i32 }
define %struct.symbol_list* @sparse(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.symbol_list*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.symbol_list* @__sparse(i8* %4)
store %struct.symbol_list* %5, %struct.symbol_list** %3
%6 = load %struct.symbol_list*, %struct.symbol_list** %3
%7 = call i32 @evaluate_symbol_list(%struct.symbol_list* %6)
%8 = load %struct.symbol_list*, %struct.symbol_list** %3
ret %struct.symbol_list* %8
}

LLVM IR (-O2):
%struct.symbol_list = type { i32 }
define %struct.symbol_list* @sparse(i8* %0) {
%2 = tail call %struct.symbol_list* @__sparse(i8* %0)
%3 = tail call i32 @evaluate_symbol_list(%struct.symbol_list* %2)
ret %struct.symbol_list* %2
}
/* Type definitions */
struct gpio {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gpio_mode(struct gpio *, int, int);
void gpio_a_input(int bit) { gpio_mode((struct gpio *)0x40010800, bit, 0x4); }


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

x86 assembly (clang, -O2):
<gpio_a_input>:
mov    %edi,%esi
mov    $0x40010800,%edi
mov    $0x4,%edx
jmp    1030 <gpio_mode@plt>

LLVM IR (-O0):
%struct.gpio = type { i32 }
define void @gpio_a_input(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073809408 to %struct.gpio*), i32 %3, i32 4)
ret void
}

LLVM IR (-O2):
%struct.gpio = type { i32 }
define void @gpio_a_input(i32 %0) {
%2 = tail call i32 @gpio_mode(%struct.gpio* inttoptr (i64 1073809408 to %struct.gpio*), i32 %0, i32 4)
ret void
}
/* Variables and functions */
int exp(double const);
double boltzmann(const double x, const double x_0, const double k) {
  return 1. / (1. + exp(k * (x_0 - x)));
}


x86 assembly (clang, -O0):
<boltzmann>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
cvtsi2sd %eax,%xmm0
movsd  0xeb5(%rip),%xmm1
addsd  %xmm0,%xmm1
movsd  0xea9(%rip),%xmm0
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<boltzmann>:
push   %rax
subsd  %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movapd %xmm1,%xmm0
call   1030 <exp@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %eax,%xmm1
movsd  0xecf(%rip),%xmm0
addsd  %xmm0,%xmm1
divsd  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @boltzmann(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %6
%8 = load double, double* %5
%9 = load double, double* %4
%10 = fsub double %8, %9
%11 = fmul double %7, %10
%12 = call i32 @exp(double %11)
%13 = sitofp i32 %12 to double
%14 = fadd double 1.000000e+00, %13
%15 = fdiv double 1.000000e+00, %14
ret double %15
}

LLVM IR (-O2):
define double @boltzmann(double %0, double %1, double %2) {
%4 = fsub double %1, %0
%5 = fmul double %4, %2
%6 = tail call i32 @exp(double %5)
%7 = sitofp i32 %6 to double
%8 = fadd double %7, 1.000000e+00
%9 = fdiv double 1.000000e+00, %8
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ start_process();
int main() { start_process(); }


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @start_process()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @start_process()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void goodbye(void) { printf("Goodbye Johnny!\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"Goodbye Johnny!\0A\00"
define void @goodbye() {
%1 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"Goodbye Johnny!\00"
define void @goodbye() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_05int64_highword_reg(long long val) {
  return ((val >> 32) & (0x05 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_05int64_highword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
sar    $0x20,%rdx
and    $0x5,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_05int64_highword_reg>:
movabs $0x500000000,%rax
test   %rax,%rdi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_05int64_highword_reg(i64 %0) {
%2 = and i64 %0, 21474836480
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ stderr;
void error(char *msg) {
  if (errno) {
    perror(msg);
    exit(errno);
  } else
    fprintf(stderr, "args: <original.jpg> <polyglot.jpg> <js file>\n\n%s\n",
            msg);
  exit(-1);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e95(%rip),%rax
cmpl   $0x0,(%rax)
je     1163 <error+0x33>
mov    -0x8(%rbp),%rdi
call   1040 <perror@plt>
mov    0x2e7c(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    0x2e76(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe89(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error>:
push   %rbx
mov    %rdi,%rdx
mov    0x2e9d(%rip),%rbx
cmpl   $0x0,(%rbx)
jne    115f <error+0x2f>
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
mov    %rdx,%rdi
call   1040 <perror@plt>
mov    (%rbx),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
@stderr = global i32 0
@.str = [51 x i8] c"args: <original.jpg> <polyglot.jpg> <js file>\0A\0A%s\0A\00"
define void @error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @errno
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @perror(i8* %6)
%8 = load i32, i32* @errno
%9 = call i32 @exit(i32 %8)
unreachable
10: ; preds = %1
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %2
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %12)
br label %14
14: ; preds = %10
%15 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@errno = global i32 0
@stderr = global i32 0
@.str = [51 x i8] c"args: <original.jpg> <polyglot.jpg> <js file>\0A\0A%s\0A\00"
define void @error(i8* %0) {
%2 = load i32, i32* @errno
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* %0)
%6 = load i32, i32* @errno
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %0)
%11 = tail call i32 @exit(i32 -1)
unreachable
}
void prepare_fields_elastic_adj_dev_(long *Mesh_pointer, int *size_f,
                                     int *APPROXIMATE_HESS_KL) {}


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

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

LLVM IR (-O0):
define void @prepare_fields_elastic_adj_dev_(i64* %0, i32* %1, i32* %2) {
%4 = alloca i64*
%5 = alloca i32*
%6 = alloca i32*
store i64* %0, i64** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
define void @prepare_fields_elastic_adj_dev_(i64* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ state;

/* Variables and functions */
long ksx1001_to_unicode(unsigned long, int /*<<< orphan*/);
long int euc_kr_to_ucs(unsigned long state) {
  switch (state >> 28) {
  case 1:
    return ksx1001_to_unicode(((state >> 8) & 0xFF) - 0xA1,
                              ((state)&0xFF) - 0xA1);
  default:
    return 0xFFFFL;
  }
}


x86 assembly (clang, -O0):
<euc_kr_to_ucs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x1c,%rax
sub    $0x1,%rax
jne    1169 <euc_kr_to_ucs+0x59>
jmp    1133 <euc_kr_to_ucs+0x23>
mov    -0x10(%rbp),%rdi
shr    $0x8,%rdi
and    $0xff,%rdi
sub    $0xa1,%rdi
mov    -0x10(%rbp),%rax
and    $0xff,%rax
sub    $0xa1,%rax
mov    %eax,%esi
call   1030 <ksx1001_to_unicode@plt>
mov    %rax,-0x8(%rbp)
jmp    1171 <euc_kr_to_ucs+0x61>
movq   $0xffff,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<euc_kr_to_ucs>:
mov    %rdi,%rcx
and    $0xfffffffff0000000,%rcx
cmp    $0x10000000,%rcx
jne    113e <euc_kr_to_ucs+0x2e>
mov    %rdi,%rax
movzbl %ah,%edi
add    $0xffffffffffffff5f,%rdi
movzbl %al,%esi
add    $0xffffff5f,%esi
jmp    1030 <ksx1001_to_unicode@plt>
mov    $0xffff,%eax
ret

LLVM IR (-O0):
define i64 @euc_kr_to_ucs(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = lshr i64 %4, 28
switch i64 %5, label %16 [
i64 1, label %6
]
6: ; preds = %1
%7 = load i64, i64* %3
%8 = lshr i64 %7, 8
%9 = and i64 %8, 255
%10 = sub i64 %9, 161
%11 = load i64, i64* %3
%12 = and i64 %11, 255
%13 = sub i64 %12, 161
%14 = trunc i64 %13 to i32
%15 = call i64 @ksx1001_to_unicode(i64 %10, i32 %14)
store i64 %15, i64* %2
br label %17
16: ; preds = %1
store i64 65535, i64* %2
br label %17
17: ; preds = %16, %6
%18 = load i64, i64* %2
ret i64 %18
}

LLVM IR (-O2):
define i64 @euc_kr_to_ucs(i64 %0) {
%2 = and i64 %0, -268435456
%3 = icmp eq i64 %2, 268435456
br i1 %3, label %4, label %12
4: ; preds = %1
%5 = lshr i64 %0, 8
%6 = and i64 %5, 255
%7 = add nsw i64 %6, -161
%8 = trunc i64 %0 to i32
%9 = and i32 %8, 255
%10 = add nsw i32 %9, -161
%11 = tail call i64 @ksx1001_to_unicode(i64 %7, i32 %10)
br label %12
12: ; preds = %1, %4
%13 = phi i64 [ %11, %4 ], [ 65535, %1 ]
ret i64 %13
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xbd() {
  Assert_real((isbdigit(189) == 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_isbdigit.c",
              950, ("isbdigit should be 0 for 0xbd"));
}


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

x86 assembly (clang, -O2):
<t_isbdigit_0xbd>:
push   %rax
mov    $0xbd,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3b6,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xbd\00"
define void @t_isbdigit_0xbd() {
%1 = call i64 @isbdigit(i32 189)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 950, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 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_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xbd\00"
define void @t_isbdigit_0xbd() {
%1 = tail call i64 @isbdigit(i32 189)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 950, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void REMR3A20Set(void) {}


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

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

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

LLVM IR (-O2):
define void @REMR3A20Set() {
ret void
}
unsigned xrop3_70_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = T & D;
  stk2 = S | stk3;
  stk1 = D ^ stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


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

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

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

LLVM IR (-O2):
define i32 @xrop3_70_0_1(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 = mul nuw nsw i32 %5, 257
%7 = or i32 %4, %5
%8 = xor i32 %7, 255
%9 = xor i32 %4, %3
%10 = xor i32 %6, -1
%11 = and i32 %8, %10
%12 = xor i32 %4, -1
%13 = and i32 %12, %5
%14 = or i32 %13, %9
%15 = or i32 %14, %11
ret i32 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int ffs64(int /*<<< orphan*/);
int ffz64(uint64_t bitmask) { return ffs64(~bitmask); }


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

x86 assembly (clang, -O2):
<ffz64>:
not    %edi
jmp    1030 <ffs64@plt>

LLVM IR (-O0):
define i32 @ffz64(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = call i32 @ffs64(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @ffz64(i32 %0) {
%2 = xor i32 %0, -1
%3 = tail call i32 @ffs64(i32 %2)
ret i32 %3
}
void gdk_cap_style_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_cap_style_get_type() {
ret void
}
__attribute__((no)) void fun() {
  char *buf = alloca(0x100);
  asm volatile("" ::"m"(buf));
}


x86 assembly (clang, -O0):
<fun>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
lea    -0x110(%rbp),%rax
mov    %rax,-0x8(%rbp)
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun>:
sub    $0x98,%rsp
lea    -0x70(%rsp),%rax
mov    %rax,-0x78(%rsp)
add    $0x98,%rsp
ret

LLVM IR (-O0):
define void @fun() {
%1 = alloca i8*
%2 = alloca i8, i64 256
store i8* %2, i8** %1
ret void
}

LLVM IR (-O2):
define void @fun() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
store i8* %4, i8** %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x88() {
  Assert_real((isupper(136) == 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",
              685, ("isupper should be 0 for 0x88"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x88>:
push   %rax
mov    $0x88,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x2ad,%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 0x88\00"
define void @t_isupper_0x88() {
%1 = call i64 @isupper(i32 136)
%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 685, 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 0x88\00"
define void @t_isupper_0x88() {
%1 = tail call i64 @isupper(i32 136)
%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 685, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}