xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *, char const *, char const *,
                          int);
void XMLVM_ERROR(const char *msg, const char *file, const char *function,
                 int line) {
  printf("XMLVM Error: %s: (%s):%s:%d\n", msg, function, file, line);
  exit(-1);
}


x86 assembly (clang, -O0):
<XMLVM_ERROR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<XMLVM_ERROR>:
push   %rax
mov    %ecx,%r8d
mov    %rsi,%rcx
mov    %rdi,%rsi
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [29 x i8] c"XMLVM Error: %s: (%s):%s:%d\0A\00"
define void @XMLVM_ERROR(i8* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %2, i8* %1, i32 %3)
%6 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void __softboundcets_safe_free(void *ptr) { free(ptr); }


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

x86 assembly (clang, -O2):
<__softboundcets_safe_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @__softboundcets_safe_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int listen(int, int);
int socket_listen(int s, unsigned int backlog) {
  return listen(s, (int)backlog);
}


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

x86 assembly (clang, -O2):
<socket_listen>:
jmp    1030 <listen@plt>

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

LLVM IR (-O2):
define i32 @socket_listen(i32 %0, i32 %1) {
%3 = tail call i32 @listen(i32 %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void ill_format() {
  printf("illegal file-format\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [21 x i8] c"illegal file-format\0A\00"
define void @ill_format() {
%1 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [20 x i8] c"illegal file-format\00"
define void @ill_format() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
void tick(void) {}


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

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

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

LLVM IR (-O2):
define void @tick() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, int);
int main(int argc, char *argv[]) {
  printf("Running command: %s with %d arguments\n", argv[0], argc);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    %edi,%edx
mov    (%rsi),%rsi
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [39 x i8] c"Running command: %s with %d arguments\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 0
%8 = load i8*, i8** %7
%9 = load i32, i32* %4
%10 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [39 x i8] c"Running command: %s with %d arguments\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %0)
ret i32 0
}
int min(int integer1, int integer2) {
  int min = 0;
  if (integer1 != integer2) {
    if (integer1 > integer2) {
      min = integer2;
    } else
      min = integer1;
  } else {
    min = integer1;
  }
  return min;
}


x86 assembly (clang, -O0):
<min>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     113f <min+0x3f>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1134 <min+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    113a <min+0x3a>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <min+0x45>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<min>:
mov    %esi,%eax
cmp    %esi,%edi
cmovle %edi,%eax
cmove  %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @min(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = icmp sgt i32 %0, %1
%5 = select i1 %4, i32 %1, i32 %0
%6 = select i1 %3, i32 %0, i32 %5
ret i32 %6
}
/* Type definitions */
struct circlist_item {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ circlist_queue_item(struct circlist_item **,
                                       struct circlist_item *);
void circlist_push_item(struct circlist_item **list,
                        struct circlist_item *item) {
  circlist_queue_item(list, item);
  *list = item;
}


x86 assembly (clang, -O0):
<circlist_push_item>:
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 <circlist_queue_item@plt>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<circlist_push_item>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <circlist_queue_item@plt>
mov    %r14,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.circlist_item = type { i32 }
define void @circlist_push_item(%struct.circlist_item** %0, %struct.circlist_item* %1) {
%3 = alloca %struct.circlist_item**
%4 = alloca %struct.circlist_item*
store %struct.circlist_item** %0, %struct.circlist_item*** %3
store %struct.circlist_item* %1, %struct.circlist_item** %4
%5 = load %struct.circlist_item**, %struct.circlist_item*** %3
%6 = load %struct.circlist_item*, %struct.circlist_item** %4
%7 = call i32 @circlist_queue_item(%struct.circlist_item** %5, %struct.circlist_item* %6)
%8 = load %struct.circlist_item*, %struct.circlist_item** %4
%9 = load %struct.circlist_item**, %struct.circlist_item*** %3
store %struct.circlist_item* %8, %struct.circlist_item** %9
ret void
}

LLVM IR (-O2):
%struct.circlist_item = type { i32 }
define void @circlist_push_item(%struct.circlist_item** %0, %struct.circlist_item* %1) {
%3 = tail call i32 @circlist_queue_item(%struct.circlist_item** %0, %struct.circlist_item* %1)
store %struct.circlist_item* %1, %struct.circlist_item** %0
ret void
}
/* Variables and functions */
void *malloc(unsigned int size __attribute__((unused))) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @malloc(i32 %0) {
ret i8* null
}
int f9(int x, int y) { return x % -y; }


x86 assembly (clang, -O0):
<f9>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x8(%rbp),%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f9>:
mov    %edi,%eax
neg    %esi
cltd
idiv   %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @f9(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
%4 = srem i32 %0, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fig10_18();
int main(void) {
  fig10_18();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @fig10_18()
ret i32 0
}
/* Variables and functions */
scalar_t__ isws(char);
void eatwhite(char **s) {
  while (isws(**s))
    (*s)++;
}


x86 assembly (clang, -O0):
<eatwhite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%edi
call   1030 <isws@plt>
cmp    $0x0,%rax
je     1148 <eatwhite+0x38>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    111c <eatwhite+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eatwhite>:
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rax
movsbl (%rax),%edi
nopw   0x0(%rax,%rax,1)
call   1030 <isws@plt>
test   %rax,%rax
je     113a <eatwhite+0x2a>
mov    (%rbx),%rax
lea    0x1(%rax),%rcx
mov    %rcx,(%rbx)
movsbl 0x1(%rax),%edi
jmp    1120 <eatwhite+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @eatwhite(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = tail call i64 @isws(i8 signext %3)
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %1, %6
%7 = load i8*, i8** %0
%8 = getelementptr inbounds i8, i8* %7, i64 1
store i8* %8, i8** %0
%9 = load i8, i8* %8
%10 = tail call i64 @isws(i8 signext %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %6
12: ; preds = %6, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char const *const, int);
int /*<<< orphan*/ stdout;
void Q_onAssert(char const *const file, int line) {
  printf("Assertion failed in %s, line %d", file, line);
  fflush(stdout);
  _exit(-1);
}


x86 assembly (clang, -O0):
<Q_onAssert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<Q_onAssert>:
push   %rax
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <fflush@plt>
mov    $0xffffffff,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"Assertion failed in %s, line %d\00"
@stdout = global i32 0
define void @Q_onAssert(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
%8 = load i32, i32* @stdout
%9 = call i32 @fflush(i32 %8)
%10 = call i32 @_exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [32 x i8] c"Assertion failed in %s, line %d\00"
@stdout = global i32 0
define void @Q_onAssert(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 @_exit(i32 -1)
unreachable
}
void i2d_BASIC_CONSTRAINTS(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_BASIC_CONSTRAINTS() {
ret void
}
int ld_le_mr1(long double *a1, long double a2) { return (((*a1) <= (a2))); }


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

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

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

LLVM IR (-O2):
define i32 @ld_le_mr1(x86_fp80* nocapture %0, x86_fp80 %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = fcmp ole x86_fp80 %3, %1
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
size_t coder_cap(size_t vals, size_t rows) {
  size_t bytes = 1;
  while (vals >= 1UL << (bytes * 7))
    bytes++;
  return (bytes + 1) * (rows + 1);
}


x86 assembly (clang, -O0):
<coder_cap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x1,-0x18(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x7,-0x18(%rbp),%rcx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
cmp    %rcx,%rax
jb     1142 <coder_cap+0x42>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1114 <coder_cap+0x14>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    -0x10(%rbp),%rcx
add    $0x1,%rcx
imul   %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<coder_cap>:
add    $0x1,%rsi
mov    $0x7,%ecx
mov    %rsi,%rax
nopl   0x0(%rax)
mov    %rdi,%rdx
shr    %cl,%rdx
add    %rsi,%rax
add    $0x7,%rcx
test   %rdx,%rdx
jne    1110 <coder_cap+0x10>
ret

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

LLVM IR (-O2):
define i64 @coder_cap(i64 %0, i64 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ 1, %2 ], [ %8, %3 ]
%5 = mul i64 %4, 7
%6 = lshr i64 %0, %5
%7 = icmp eq i64 %6, 0
%8 = add i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = add i64 %1, 1
%11 = mul i64 %8, %10
ret i64 %11
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR98_set(void) { return U_WMRCORENONE_set("U_WMR98"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR98\00"
define i8* @U_WMR98_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_WMR98\00"
define i8* @U_WMR98_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 *thread(void *argc) {
  int i;
  printf("%s\n", argc);
  for (i = 0; i < 3; i++) {
    printf("This is a pthread.\n");
    sleep(3);
  }
  return ((void *)0);
}


x86 assembly (clang, -O0):
<thread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    1177 <thread+0x57>
lea    0xeae(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
mov    $0x0,%al
call   1040 <sleep@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1145 <thread+0x25>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread>:
push   %rbx
call   1030 <puts@plt>
lea    0xed3(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
xor    %eax,%eax
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
xor    %eax,%eax
call   1040 <sleep@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    $0x3,%edi
xor    %eax,%eax
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [20 x i8] c"This is a pthread.\0A\00"
define i8* @thread(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
store i32 0, i32* %3
br label %6
6: ; preds = %12, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 3
br i1 %8, label %9, label %15
9: ; preds = %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 3)
br label %12
12: ; preds = %9
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 1
store i32 %14, i32* %3
br label %6
15: ; preds = %6
ret i8* null
}

LLVM IR (-O2):
@str = [19 x i8] c"This is a pthread.\00"
define i8* @thread(i8* nocapture %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 3)
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 3)
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @sleep to i32 (i32, ...)*)(i32 3)
ret i8* null
}
/* Variables and functions */
void *malloc(size_t);
int /*<<< orphan*/ panic(char *);
void *alloc(size_t n) {
  void *mem = malloc(n);
  if (mem == NULL)
    panic("out of memory");
  return mem;
}


x86 assembly (clang, -O0):
<alloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1150 <alloc+0x30>
lea    0xeb5(%rip),%rdi
call   1030 <panic@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<alloc>:
push   %rbx
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <alloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <panic@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"out of memory\00"
define i8* @alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @panic(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %8, %1
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"out of memory\00"
define noalias i8* @alloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @panic(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
char *c_strndup(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *c_strdup(const char *str) { return c_strndup(str, strlen(str)); }


x86 assembly (clang, -O0):
<c_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <c_strndup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_strdup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <c_strndup@plt>

LLVM IR (-O0):
define i8* @c_strdup(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @c_strndup(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @c_strdup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @c_strndup(i8* %0, i32 %2)
ret i8* %3
}
void _M2_rpc_init(__attribute__((unused)) int argc,
                  __attribute__((unused)) char *argv[]) {}


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

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

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

LLVM IR (-O2):
define void @_M2_rpc_init(i32 %0, i8** nocapture %1) {
ret void
}
int SMB_Term() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @SMB_Term() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ oldland_serial_putc(char);
int _write(int fd, char *buf, int len) {
  int i = 0;
  while (i < len)
    oldland_serial_putc(buf[i++]);
  return len;
}


x86 assembly (clang, -O0):
<_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1155 <_write+0x45>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <oldland_serial_putc@plt>
jmp    1129 <_write+0x19>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_write>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
test   %edx,%edx
jle    1143 <_write+0x33>
mov    %rsi,%r15
mov    %r14d,%ebp
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%edi
add    $0x1,%rbx
call   1030 <oldland_serial_putc@plt>
cmp    %rbx,%rbp
jne    1130 <_write+0x20>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @_write(i32 %0, i8* nocapture %1, i32 returned %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %14
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %9, %7 ]
%9 = add nuw nsw i64 %8, 1
%10 = getelementptr inbounds i8, i8* %1, i64 %8
%11 = load i8, i8* %10
%12 = tail call i32 @oldland_serial_putc(i8 signext %11)
%13 = icmp eq i64 %9, %6
br i1 %13, label %14, label %7
14: ; preds = %7, %3
ret i32 %2
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int countlib(int);
int offset(int, int, int, int);
int autohelperowl_attackpat120(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(-2, -1, move, transformation);
  return countlib(A) > 1;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat120>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    $0xfffffffe,%edi
mov    $0xffffffff,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <countlib@plt>
cmp    $0x1,%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat120>:
push   %rax
mov    %esi,%ecx
mov    $0xfffffffe,%edi
mov    $0xffffffff,%esi
call   1030 <offset@plt>
mov    %eax,%edi
call   1040 <countlib@plt>
xor    %ecx,%ecx
cmp    $0x2,%eax
setge  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat120(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 -2, i32 -1, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i32 @countlib(i32 %18)
%20 = icmp sgt i32 %19, 1
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat120(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 -2, i32 -1, i32 %2, i32 %1)
%7 = tail call i32 @countlib(i32 %6)
%8 = icmp sgt i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int __syscall(char const *, void *, int /*<<< orphan*/, int /*<<< orphan*/,
              int);
int utime(const char *filename, void *packet) {
  return __syscall(filename, packet, 0, 0, 201);
}


x86 assembly (clang, -O0):
<utime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
xor    %ecx,%ecx
mov    $0xc9,%r8d
mov    %ecx,%edx
call   1030 <__syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<utime>:
xor    %edx,%edx
xor    %ecx,%ecx
mov    $0xc9,%r8d
jmp    1030 <__syscall@plt>

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

LLVM IR (-O2):
define i32 @utime(i8* %0, i8* %1) {
%3 = tail call i32 @__syscall(i8* %0, i8* %1, i32 0, i32 0, i32 201)
ret i32 %3
}
/* Type definitions */
struct ivals_context {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assemble_write_mmio(struct ivals_context *, int, int,
                                       unsigned int);
void assemble_write_phy(struct ivals_context *ctx, unsigned int offset,
                        unsigned int value) {
  assemble_write_mmio(ctx, 0x3FC, 2, offset);
  assemble_write_mmio(ctx, 0x3FE, 2, value);
}


x86 assembly (clang, -O0):
<assemble_write_phy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%ecx
mov    $0x3fc,%esi
mov    $0x2,%edx
call   1030 <assemble_write_mmio@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%ecx
mov    $0x3fe,%esi
mov    $0x2,%edx
call   1030 <assemble_write_mmio@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assemble_write_phy>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %esi,%ecx
mov    %rdi,%rbx
mov    $0x3fc,%esi
mov    $0x2,%edx
call   1030 <assemble_write_mmio@plt>
mov    %rbx,%rdi
mov    $0x3fe,%esi
mov    $0x2,%edx
mov    %ebp,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <assemble_write_mmio@plt>

LLVM IR (-O0):
%struct.ivals_context = type { i32 }
define void @assemble_write_phy(%struct.ivals_context* %0, i32 %1, i32 %2) {
%4 = alloca %struct.ivals_context*
%5 = alloca i32
%6 = alloca i32
store %struct.ivals_context* %0, %struct.ivals_context** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load %struct.ivals_context*, %struct.ivals_context** %4
%8 = load i32, i32* %5
%9 = call i32 @assemble_write_mmio(%struct.ivals_context* %7, i32 1020, i32 2, i32 %8)
%10 = load %struct.ivals_context*, %struct.ivals_context** %4
%11 = load i32, i32* %6
%12 = call i32 @assemble_write_mmio(%struct.ivals_context* %10, i32 1022, i32 2, i32 %11)
ret void
}

LLVM IR (-O2):
%struct.ivals_context = type { i32 }
define void @assemble_write_phy(%struct.ivals_context* %0, i32 %1, i32 %2) {
%4 = tail call i32 @assemble_write_mmio(%struct.ivals_context* %0, i32 1020, i32 2, i32 %1)
%5 = tail call i32 @assemble_write_mmio(%struct.ivals_context* %0, i32 1022, i32 2, i32 %2)
ret void
}
double rad2deg(double angle) {
  return 180.0 * angle / 3.1415926535897932384626433832795029L;
}


x86 assembly (clang, -O0):
<rad2deg>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeea(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
fldl   -0x10(%rbp)
fldt   0xee8(%rip)
fdivrp %st,%st(1)
fstpl  -0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<rad2deg>:
mulsd  0xef8(%rip),%xmm0
movsd  %xmm0,-0x8(%rsp)
fldt   0xefc(%rip)
fdivrl -0x8(%rsp)
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @rad2deg(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double 1.800000e+02, %3
%5 = fpext double %4 to x86_fp80
%6 = fdiv x86_fp80 %5, 0xK4000C90FDAA22168C235
%7 = fptrunc x86_fp80 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @rad2deg(double %0) {
%2 = fmul double %0, 1.800000e+02
%3 = fpext double %2 to x86_fp80
%4 = fdiv x86_fp80 %3, 0xK4000C90FDAA22168C235
%5 = fptrunc x86_fp80 %4 to double
ret double %5
}
void ARGBSepiaRow_NEON() {}


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

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

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

LLVM IR (-O2):
define void @ARGBSepiaRow_NEON() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ isascii(int);
void t_isascii_0x0f() {
  Assert_real((isascii(15)),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isascii.c",
              80, ("isascii should be 1 for 0x0f"));
}


x86 assembly (clang, -O0):
<t_isascii_0x0f>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
call   1030 <isascii@plt>
mov    %eax,%edi
lea    0xec9(%rip),%rsi
mov    $0x50,%edx
lea    0xf65(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isascii_0x0f>:
lea    0xee9(%rip),%rsi
lea    0xf8a(%rip),%rcx
mov    $0x1,%edi
mov    $0x50,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x0f\00"
define void @t_isascii_0x0f() {
%1 = call i32 @isascii(i32 15)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isascii.c\00"
@.str.1 = [29 x i8] c"isascii should be 1 for 0x0f\00"
define void @t_isascii_0x0f() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ scanf(char *, int *);
int main(int argc, const char *argv[]) {
  int m, a, b, sum;
  while (scanf("%d", &m) != EOF) {
    sum = 0;
    a = b = 1;
  }
  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)
lea    0xed3(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <scanf@plt>
mov    0x2eab(%rip),%rcx
cmp    (%rcx),%rax
je     1160 <main+0x50>
movl   $0x0,-0x20(%rbp)
movl   $0x1,-0x1c(%rbp)
movl   $0x1,-0x18(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
lea    0xee0(%rip),%r14
lea    0xc(%rsp),%r15
mov    0x2ebc(%rip),%rbx
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <scanf@plt>
cmp    (%rbx),%rax
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@EOF = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
br label %5
5: ; preds = %5, %2
%6 = call i64 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%7 = load i64, i64* @EOF
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %5
9: ; preds = %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int process(char *cmdlist[50]) {
  printf("i am child\n");
  execvp(cmdlist[0], cmdlist);
  exit(0);
}


x86 assembly (clang, -O0):
<process>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <execvp@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<process>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%rdi
mov    %rbx,%rsi
call   1040 <execvp@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"i am child\0A\00"
define i32 @process(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = load i8**, i8*** %2
%5 = getelementptr inbounds i8*, i8** %4, i64 0
%6 = load i8*, i8** %5
%7 = load i8**, i8*** %2
%8 = call i32 @execvp(i8* %6, i8** %7)
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [11 x i8] c"i am child\00"
define i32 @process(i8** %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
%3 = load i8*, i8** %0
%4 = tail call i32 @execvp(i8* %3, i8** %0)
%5 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
scalar_t__ write(int, char *, int);
void show_cursor() {
  if (write(1, "\033[?25h\033[?0c", 11))
    do {
    } while (0);
}


x86 assembly (clang, -O0):
<show_cursor>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
lea    0xee0(%rip),%rsi
mov    $0xb,%edx
call   1030 <write@plt>
cmp    $0x0,%rax
je     1143 <show_cursor+0x33>
jmp    1139 <show_cursor+0x29>
jmp    113e <show_cursor+0x2e>
jmp    1143 <show_cursor+0x33>
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_cursor>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edi
mov    $0xb,%edx
jmp    1030 <write@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\1B[?25h\1B[?0c\00"
define void @show_cursor() {
%1 = call i64 @write(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
%2 = icmp ne i64 %1, 0
br i1 %2, label %3, label %6
3: ; preds = %0
br label %4
4: ; preds = %3
br label %5
5: ; preds = %4
br label %6
6: ; preds = %5, %0
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\1B[?25h\1B[?0c\00"
define void @show_cursor() {
%1 = tail call i64 @write(i32 1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
ret void
}
/* Variables and functions */
float logit(float);
float logit_clamped(float p, float min, float max) {
  if (p <= min) {
    p = min;
  } else if (p >= max) {
    p = max;
  } else {
    p = (p - min) / (max - min);
  }
  return logit(p);
}


x86 assembly (clang, -O0):
<logit_clamped>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1149 <logit_clamped+0x39>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1189 <logit_clamped+0x79>
movss  -0x4(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     1167 <logit_clamped+0x57>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1184 <logit_clamped+0x74>
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
subss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1189 <logit_clamped+0x79>
movss  -0x4(%rbp),%xmm0
call   1030 <logit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logit_clamped>:
ucomiss %xmm0,%xmm1
jae    1129 <logit_clamped+0x19>
ucomiss %xmm2,%xmm0
jae    1131 <logit_clamped+0x21>
subss  %xmm1,%xmm0
subss  %xmm1,%xmm2
divss  %xmm2,%xmm0
movaps %xmm0,%xmm1
movaps %xmm1,%xmm0
jmp    1030 <logit@plt>
movaps %xmm2,%xmm0
jmp    1030 <logit@plt>

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

LLVM IR (-O2):
define float @logit_clamped(float %0, float %1, float %2) {
%4 = fcmp ugt float %0, %1
br i1 %4, label %5, label %11
5: ; preds = %3
%6 = fcmp ult float %0, %2
br i1 %6, label %7, label %11
7: ; preds = %5
%8 = fsub float %0, %1
%9 = fsub float %2, %1
%10 = fdiv float %8, %9
br label %11
11: ; preds = %5, %3, %7
%12 = phi float [ %10, %7 ], [ %1, %3 ], [ %2, %5 ]
%13 = tail call float @logit(float %12)
ret float %13
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void PrintE(char *Message) { fprintf(stderr, "%s\n", Message); }


x86 assembly (clang, -O0):
<PrintE>:
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):
<PrintE>:
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 = [4 x i8] c"%s\0A\00"
define void @PrintE(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 ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @PrintE(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
void *cgc_memcpy(void *dest, const void *src, size_t n) {
  unsigned char *d = (unsigned char *)dest, *s = (unsigned char *)src;
  size_t i;
  while (i < n) {
    d[i] = s[i];
    i++;
  }
  return dest;
}


x86 assembly (clang, -O0):
<cgc_memcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
jae    1155 <cgc_memcpy+0x55>
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,1),%dl
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1120 <cgc_memcpy+0x20>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i8* @cgc_memcpy(i8* returned writeonly %0, i8* nocapture %1, i64 %2) {
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ volatile *mem_get_reg32(int);
volatile uint32_t *exti_get_FTSR() { return mem_get_reg32(0x40010400 + 0xC); }


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

x86 assembly (clang, -O2):
<exti_get_FTSR>:
mov    $0x4001040c,%edi
jmp    1030 <mem_get_reg32@plt>

LLVM IR (-O0):
define i32* @exti_get_FTSR() {
%1 = call i32* @mem_get_reg32(i32 1073808396)
ret i32* %1
}

LLVM IR (-O2):
define i32* @exti_get_FTSR() {
%1 = tail call i32* @mem_get_reg32(i32 1073808396)
ret i32* %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main(void) {
  fprintf(stderr, "failed: program is started\n");
  return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
lea    0xed1(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"failed: program is started\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @stderr
%3 = call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"failed: program is started\0A\00"
define i32 @main() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 1
}