xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ dos_print(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ set_video_mode(int);
void error_out(char *text) {
  set_video_mode(3);
  dos_print(text);
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<error_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x3,%edi
call   1040 <set_video_mode@plt>
mov    -0x8(%rbp),%rdi
call   1030 <dos_print@plt>
mov    0x2e8a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<error_out>:
push   %rbx
mov    %rdi,%rbx
mov    $0x3,%edi
call   1040 <set_video_mode@plt>
mov    %rbx,%rdi
call   1030 <dos_print@plt>
mov    0x2e93(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @error_out(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @set_video_mode(i32 3)
%4 = load i8*, i8** %2
%5 = call i32 @dos_print(i8* %4)
%6 = load i32, i32* @EXIT_SUCCESS
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @error_out(i8* %0) {
%2 = tail call i32 @set_video_mode(i32 3)
%3 = tail call i32 @dos_print(i8* %0)
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ poll(int /*<<< orphan*/ *, int /*<<< orphan*/, int);
void do_msleep(int milli) { poll(NULL, 0, milli); }


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

x86 assembly (clang, -O2):
<do_msleep>:
mov    %edi,%edx
xor    %edi,%edi
xor    %esi,%esi
jmp    1030 <poll@plt>

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

LLVM IR (-O2):
define void @do_msleep(i32 %0) {
%2 = tail call i32 @poll(i32* null, i32 0, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void cleanup_fd(int *fd) {
  if (fd == NULL || *fd < 0)
    return;
  close(*fd);
}


x86 assembly (clang, -O0):
<cleanup_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <cleanup_fd+0x24>
mov    -0x8(%rbp),%rax
cmpl   $0x0,(%rax)
jge    1139 <cleanup_fd+0x29>
jmp    1144 <cleanup_fd+0x34>
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup_fd>:
test   %rdi,%rdi
je     1120 <cleanup_fd+0x10>
mov    (%rdi),%edi
test   %edi,%edi
js     1120 <cleanup_fd+0x10>
jmp    1030 <close@plt>
ret

LLVM IR (-O0):
define void @cleanup_fd(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = icmp eq i32* %3, null
br i1 %4, label %9, label %5
5: ; preds = %1
%6 = load i32*, i32** %2
%7 = load i32, i32* %6
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5, %1
br label %14
10: ; preds = %5
%11 = load i32*, i32** %2
%12 = load i32, i32* %11
%13 = call i32 @close(i32 %12)
br label %14
14: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
define void @cleanup_fd(i32* %0) {
%2 = icmp eq i32* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = load i32, i32* %0
%5 = icmp slt i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @close(i32 %4)
br label %8
8: ; preds = %1, %3, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned char);
void hexpairs_dump(unsigned int address, char value) {
  printf("%02x ", (unsigned char)value);
}


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

x86 assembly (clang, -O2):
<hexpairs_dump>:
movzbl %sil,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"%02x \00"
define void @hexpairs_dump(i32 %0, i8 signext %1) {
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
store i8 %1, i8* %4
%5 = load i8, i8* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 zeroext %5)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%02x \00"
define void @hexpairs_dump(i32 %0, i8 signext %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8 zeroext %1)
ret void
}
/* Variables and functions */
unsigned long fls_long(unsigned long);
__attribute__((always_)) __attribute__((const)) unsigned long
__roundup_pow_of_two(unsigned long n) {
  return 1UL << fls_long(n - 1);
}


x86 assembly (clang, -O0):
<__roundup_pow_of_two>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
sub    $0x1,%rdi
call   1030 <fls_long@plt>
mov    %rax,%rcx
mov    $0x1,%eax
shl    %cl,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__roundup_pow_of_two>:
push   %rax
add    $0xffffffffffffffff,%rdi
call   1030 <fls_long@plt>
mov    $0x1,%edx
mov    %eax,%ecx
shl    %cl,%rdx
mov    %rdx,%rax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @__roundup_pow_of_two(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = sub i64 %3, 1
%5 = call i64 @fls_long(i64 %4)
%6 = shl i64 1, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @__roundup_pow_of_two(i64 %0) {
%2 = add i64 %0, -1
%3 = tail call i64 @fls_long(i64 %2)
%4 = shl nuw i64 1, %3
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ labelset_univ_setdescription(int /*<<< orphan*/,
                                                int /*<<< orphan*/,
                                                int /*<<< orphan*/ const *,
                                                int);
int /*<<< orphan*/ strlen(char const *);
uint8_t labelset_mr_setdescription(uint8_t labelid,
                                   const uint8_t *description) {
  return labelset_univ_setdescription(
      labelid, strlen((const char *)description), description, 1);
}


x86 assembly (clang, -O0):
<labelset_mr_setdescription>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
mov    $0x1,%ecx
call   1040 <labelset_univ_setdescription@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<labelset_mr_setdescription>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %ebp,%edi
mov    %eax,%esi
mov    %rbx,%rdx
mov    $0x1,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <labelset_univ_setdescription@plt>

LLVM IR (-O0):
define i32 @labelset_mr_setdescription(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 = bitcast i32* %6 to i8*
%8 = call i32 @strlen(i8* %7)
%9 = load i32*, i32** %4
%10 = call i32 @labelset_univ_setdescription(i32 %5, i32 %8, i32* %9, i32 1)
ret i32 %10
}

LLVM IR (-O2):
define i32 @labelset_mr_setdescription(i32 %0, i32* %1) {
%3 = bitcast i32* %1 to i8*
%4 = tail call i32 @strlen(i8* %3)
%5 = tail call i32 @labelset_univ_setdescription(i32 %0, i32 %4, i32* %1, i32 1)
ret i32 %5
}
/* Variables and functions */
int u8islowerasciii(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointcc(char const *);
int u8islowerasciicc(const char *c) { return u8islowerasciii(u8tointcc(c)); }


x86 assembly (clang, -O0):
<u8islowerasciicc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <u8tointcc@plt>
mov    %eax,%edi
call   1030 <u8islowerasciii@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8islowerasciicc>:
push   %rax
call   1040 <u8tointcc@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <u8islowerasciii@plt>

LLVM IR (-O0):
define i32 @u8islowerasciicc(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @u8tointcc(i8* %3)
%5 = call i32 @u8islowerasciii(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @u8islowerasciicc(i8* %0) {
%2 = tail call i32 @u8tointcc(i8* %0)
%3 = tail call i32 @u8islowerasciii(i32 %2)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ shutdown(int, char *, int);
int get(FILE *stream) {
  int value;
  rewind(stream);
  if (fscanf(stream, "%d", &value) != 1)
    shutdown(4, "Error reading /proc entry", 118 - 1);
  return value;
}


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rewind@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb0(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <fscanf@plt>
cmp    $0x1,%eax
je     1178 <get+0x48>
mov    $0x4,%edi
lea    0xe95(%rip),%rsi
mov    $0x75,%edx
call   1030 <shutdown@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <rewind@plt>
lea    0xebc(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1050 <fscanf@plt>
cmp    $0x1,%eax
je     116c <get+0x3c>
lea    0xea6(%rip),%rsi
mov    $0x4,%edi
mov    $0x75,%edx
call   1030 <shutdown@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"Error reading /proc entry\00"
define i32 @get(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @rewind(i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @fscanf(i32* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @shutdown(i32 4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 117)
br label %11
11: ; preds = %9, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"Error reading /proc entry\00"
define i32 @get(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @rewind(i32* %0)
%5 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = icmp eq i32 %5, 1
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @shutdown(i32 4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 117)
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %2
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ japi_fillroundrect(int, int, int, int, int, int, int);
void j_fillroundrect(int arg0, int arg1, int arg2, int arg3, int arg4, int arg5,
                     int arg6) {
  japi_fillroundrect(arg0, arg1, arg2, arg3, arg4, arg5, arg6);
}


x86 assembly (clang, -O0):
<j_fillroundrect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x14(%rbp),%r8d
mov    -0x18(%rbp),%r9d
mov    0x10(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <japi_fillroundrect@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<j_fillroundrect>:
jmp    1030 <japi_fillroundrect@plt>

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

LLVM IR (-O2):
define void @j_fillroundrect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @japi_fillroundrect(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret void
}
void rop3_108_1_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = *D & T;
  stk1 = S ^ stk2;
  *D = (stk1 & (~S) & (~T)) | (*D & S) | (*D & T);
}


x86 assembly (clang, -O0):
<rop3_108_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xa(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
movzbl -0xa(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0x9(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
movzbl -0xa(%rbp),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_108_1_1>:
or     %edx,%esi
and    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_108_1_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = or i8 %2, %1
%6 = and i8 %4, %5
store i8 %6, i8* %0
ret void
}
void rop3_38_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = T & S;
  stk2 = *D | stk3;
  stk1 = S ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_38_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xd(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_38_0_1>:
mov    %edx,%eax
and    %sil,%al
mov    (%rdi),%r8b
or     %r8b,%al
xor    %sil,%al
mov    %edx,%ecx
not    %cl
or     %sil,%cl
and    %al,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_38_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = and i8 %2, %1
%5 = load i8, i8* %0
%6 = or i8 %5, %4
%7 = xor i8 %6, %1
%8 = xor i8 %2, -1
%9 = or i8 %8, %1
%10 = and i8 %7, %9
%11 = xor i8 %1, -1
%12 = and i8 %11, %2
%13 = and i8 %12, %5
%14 = or i8 %10, %13
store i8 %14, i8* %0
ret void
}
int iswhitespace(char ch) {
  if (ch == ' ' || ch == '\t' || ch == '\n')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<iswhitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x20,%eax
je     1131 <iswhitespace+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     1131 <iswhitespace+0x31>
movsbl -0x5(%rbp),%eax
cmp    $0xa,%eax
jne    113d <iswhitespace+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <iswhitespace+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswhitespace>:
cmp    $0x20,%dil
ja     1120 <iswhitespace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <iswhitespace+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @iswhitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %3
i8 10, label %3
i8 9, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i32 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void dummy_sub_against_crash(volatile uint32_t *x, volatile int *a) {
  *a = (int)*x;
}


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

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

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

LLVM IR (-O2):
define void @dummy_sub_against_crash(i64* %0, i32* %1) {
%3 = load volatile i64, i64* %0
%4 = trunc i64 %3 to i32
store volatile i32 %4, i32* %1
ret void
}
int pthread_nr_cpu() { return 2; }


x86 assembly (clang, -O0):
<pthread_nr_cpu>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @pthread_nr_cpu() {
ret i32 2
}

LLVM IR (-O2):
define i32 @pthread_nr_cpu() {
ret i32 2
}
int mystrlen(const char *s) {
  int count = 0;
  while (*s++)
    ++count;
  return count;
}


x86 assembly (clang, -O0):
<mystrlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
je     1135 <mystrlen+0x35>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <mystrlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mystrlen>:
cmpb   $0x0,(%rdi)
je     111c <mystrlen+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <mystrlen+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @mystrlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ svr;

/* Variables and functions */
#define IAC 131
#define TELOPT_ECHO 130
#define TELOPT_SGA 129
#define WILL 128
int /*<<< orphan*/ write_stdout(unsigned char *, int);
void telnet_init(void) {
  static unsigned char svr[] = {IAC, WILL, TELOPT_ECHO, IAC, WILL, TELOPT_SGA};
  write_stdout(svr, sizeof(svr));
}


x86 assembly (clang, -O0):
<telnet_init>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f0d(%rip),%rdi
mov    $0x6,%esi
call   1030 <write_stdout@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<telnet_init>:
lea    0x2f11(%rip),%rdi
mov    $0x6,%esi
jmp    1030 <write_stdout@plt>

LLVM IR (-O0):
@telnet_init.svr = internal global [6 x i8] c"\83\80\82\83\80\81"
define void @telnet_init() {
%1 = call i32 @write_stdout(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @telnet_init.svr, i64 0, i64 0), i32 6)
ret void
}

LLVM IR (-O2):
@telnet_init.svr = internal global [6 x i8] c"\83\80\82\83\80\81"
define void @telnet_init() {
%1 = tail call i32 @write_stdout(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @telnet_init.svr, i64 0, i64 0), i32 6)
ret void
}
/* Variables and functions */
int O_NOCTTY;
int O_RDWR;
int O_SYNC;
int open(char *, int);
int /*<<< orphan*/ set_serial_options(int);
int get_rowind_fd(char *portname) {
  int fd = open(portname, O_RDWR | O_NOCTTY | O_SYNC);
  if (fd < 0) {
    return -1;
  }
  set_serial_options(fd);
  return fd;
}


x86 assembly (clang, -O0):
<get_rowind_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
mov    0x2e90(%rip),%rax
or     (%rax),%esi
mov    0x2e97(%rip),%rax
or     (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1169 <get_rowind_fd+0x49>
movl   $0xffffffff,-0x4(%rbp)
jmp    1177 <get_rowind_fd+0x57>
mov    -0x14(%rbp),%edi
call   1030 <set_serial_options@plt>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_rowind_fd>:
push   %rbx
mov    0x2ec0(%rip),%rax
mov    0x2ea1(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2ea6(%rip),%rax
or     (%rax),%esi
call   1040 <open@plt>
test   %eax,%eax
js     1150 <get_rowind_fd+0x30>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <set_serial_options@plt>
jmp    1155 <get_rowind_fd+0x35>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
@O_SYNC = global i32 0
define i32 @get_rowind_fd(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* @O_RDWR
%7 = load i32, i32* @O_NOCTTY
%8 = or i32 %6, %7
%9 = load i32, i32* @O_SYNC
%10 = or i32 %8, %9
%11 = call i32 @open(i8* %5, i32 %10)
store i32 %11, i32* %4
%12 = load i32, i32* %4
%13 = icmp slt i32 %12, 0
br i1 %13, label %14, label %15
14: ; preds = %1
store i32 -1, i32* %2
br label %19
15: ; preds = %1
%16 = load i32, i32* %4
%17 = call i32 @set_serial_options(i32 %16)
%18 = load i32, i32* %4
store i32 %18, i32* %2
br label %19
19: ; preds = %15, %14
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_NOCTTY = global i32 0
@O_SYNC = global i32 0
define i32 @get_rowind_fd(i8* nocapture %0) {
%2 = load i32, i32* @O_RDWR
%3 = load i32, i32* @O_NOCTTY
%4 = or i32 %3, %2
%5 = load i32, i32* @O_SYNC
%6 = or i32 %4, %5
%7 = tail call i32 @open(i8* %0, i32 %6)
%8 = icmp slt i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %1
%10 = tail call i32 @set_serial_options(i32 %7)
br label %11
11: ; preds = %1, %9
%12 = phi i32 [ %7, %9 ], [ -1, %1 ]
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ m5_exit(int /*<<< orphan*/);
int /*<<< orphan*/ parse_int_args(int, char **, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ usage();
void do_exit(int argc, char *argv[]) {
  if (argc > 1)
    usage();
  uint64_t ints[1];
  parse_int_args(argc, argv, ints, 1);
  m5_exit(ints[0]);
}


x86 assembly (clang, -O0):
<do_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x4(%rbp)
jle    1150 <do_exit+0x20>
mov    $0x0,%al
call   1030 <usage@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x1,%ecx
call   1040 <parse_int_args@plt>
mov    -0x14(%rbp),%edi
call   1050 <m5_exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_exit>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
cmp    $0x2,%edi
jl     1144 <do_exit+0x14>
xor    %eax,%eax
call   1030 <usage@plt>
lea    0x4(%rsp),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x1,%ecx
call   1040 <parse_int_args@plt>
mov    0x4(%rsp),%edi
call   1050 <m5_exit@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @do_exit(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [1 x i32]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (...) @usage()
br label %10
10: ; preds = %8, %2
%11 = load i32, i32* %3
%12 = load i8**, i8*** %4
%13 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%14 = call i32 @parse_int_args(i32 %11, i8** %12, i32* %13, i32 1)
%15 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 0
%16 = load i32, i32* %15
%17 = call i32 @m5_exit(i32 %16)
ret void
}

LLVM IR (-O2):
define void @do_exit(i32 %0, i8** %1) {
%3 = alloca [1 x i32]
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (...) @usage()
br label %7
7: ; preds = %5, %2
%8 = bitcast [1 x i32]* %3 to i8*
%9 = getelementptr inbounds [1 x i32], [1 x i32]* %3, i64 0, i64 0
%10 = call i32 @parse_int_args(i32 %0, i8** %1, i32* %9, i32 1)
%11 = load i32, i32* %9
%12 = call i32 @m5_exit(i32 %11)
ret void
}
int array_eq(int *x, int *y, int n) {
  int i;
  for (i = 0; i < n; i++)
    if (x[i] - y[i] != 0)
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<array_eq>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1160 <array_eq+0x60>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x18(%rbp),%rcx
movslq -0x20(%rbp),%rdx
sub    (%rcx,%rdx,4),%eax
cmp    $0x0,%eax
je     114d <array_eq+0x4d>
movl   $0x0,-0x4(%rbp)
jmp    1167 <array_eq+0x67>
jmp    1152 <array_eq+0x52>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <array_eq+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<array_eq>:
mov    $0x1,%eax
test   %edx,%edx
jle    1121 <array_eq+0x21>
mov    %edx,%r8d
xor    %edx,%edx
xchg   %ax,%ax
mov    (%rdi,%rdx,4),%ecx
cmp    (%rsi,%rdx,4),%ecx
jne    1122 <array_eq+0x22>
add    $0x1,%rdx
cmp    %rdx,%r8
jne    1110 <array_eq+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @array_eq(i32* %0, i32* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32 %2, i32* %7
store i32 0, i32* %8
br label %9
9: ; preds = %28, %3
%10 = load i32, i32* %8
%11 = load i32, i32* %7
%12 = icmp slt i32 %10, %11
br i1 %12, label %13, label %31
13: ; preds = %9
%14 = load i32*, i32** %5
%15 = load i32, i32* %8
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* %14, i64 %16
%18 = load i32, i32* %17
%19 = load i32*, i32** %6
%20 = load i32, i32* %8
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i32, i32* %19, i64 %21
%23 = load i32, i32* %22
%24 = sub nsw i32 %18, %23
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %27
26: ; preds = %13
store i32 0, i32* %4
br label %32
27: ; preds = %13
br label %28
28: ; preds = %27
%29 = load i32, i32* %8
%30 = add nsw i32 %29, 1
store i32 %30, i32* %8
br label %9
31: ; preds = %9
store i32 1, i32* %4
br label %32
32: ; preds = %31, %26
%33 = load i32, i32* %4
ret i32 %33
}

LLVM IR (-O2):
define i32 @array_eq(i32* nocapture %0, i32* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = getelementptr inbounds i32, i32* %1, i64 %10
%14 = load i32, i32* %13
%15 = icmp eq i32 %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %7, label %17
17: ; preds = %9, %7, %3
%18 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %18
}
void makeEmptyArray(char *array, int length) {
  for (int i = 0; i < length; i++) {
    array[i] = '\0';
  }
}


x86 assembly (clang, -O0):
<makeEmptyArray>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1138 <makeEmptyArray+0x38>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <makeEmptyArray+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<makeEmptyArray>:
test   %esi,%esi
jle    1122 <makeEmptyArray+0x12>
push   %rax
mov    %esi,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @makeEmptyArray(i8* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %2
ret void
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ isalpha(char);
int /*<<< orphan*/ printf(char *);
int playagain() {
  char input;
  printf("\nThat was fun. Would you like to play again? (y\\n) ");
  do
    input = getchar();
  while (!isalpha(input));
  if (input == 'y' || input == 'Y')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<playagain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1050 <isalpha@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    1144 <playagain+0x14>
movsbl -0x5(%rbp),%eax
cmp    $0x79,%eax
je     1181 <playagain+0x51>
movsbl -0x5(%rbp),%eax
cmp    $0x59,%eax
jne    118d <playagain+0x5d>
movl   $0x1,-0x4(%rbp)
jmp    1194 <playagain+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<playagain>:
push   %rbx
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
nopl   (%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %eax,%ebx
movsbl %al,%edi
call   1050 <isalpha@plt>
test   %eax,%eax
je     1140 <playagain+0x10>
and    $0xdf,%bl
xor    %eax,%eax
cmp    $0x59,%bl
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"\0AThat was fun. Would you like to play again? (y\\n) \00"
define i32 @playagain() {
%1 = alloca i32
%2 = alloca i8
%3 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %6, %0
%5 = call signext i8 (...) @getchar()
store i8 %5, i8* %2
br label %6
6: ; preds = %4
%7 = load i8, i8* %2
%8 = call i32 @isalpha(i8 signext %7)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br i1 %10, label %4, label %11
11: ; preds = %6
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 121
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 89
br i1 %18, label %19, label %20
19: ; preds = %15, %11
store i32 1, i32* %1
br label %21
20: ; preds = %15
store i32 0, i32* %1
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %1
ret i32 %22
}

LLVM IR (-O2):
@.str = [52 x i8] c"\0AThat was fun. Would you like to play again? (y\\n) \00"
define i32 @playagain() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %2, %0
%3 = tail call signext i8 (...) @getchar()
%4 = tail call i32 @isalpha(i8 signext %3)
%5 = icmp eq i32 %4, 0
br i1 %5, label %2, label %6
6: ; preds = %2
%7 = and i8 %3, -33
%8 = icmp eq i8 %7, 89
%9 = zext i1 %8 to i32
ret i32 %9
}
void test1() {
  printf("\t*** %s ***\n", __func__);
  small_string_test("1\n \n1,2,3\n123\n");
  printf("\t*** %s: done ***\n ", __func__);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <small_string_test@plt>
lea    0xed4(%rip),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xede(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <small_string_test@plt>
lea    0xed4(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"\09*** %s ***\0A\00"
@__func__.test1 = [6 x i8] c"test1\00"
@.str.1 = [15 x i8] c"1\0A \0A1,2,3\0A123\0A\00"
@.str.2 = [20 x i8] c"\09*** %s: done ***\0A \00"
define void @test1() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.test1, i64 0, i64 0))
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @small_string_test to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.test1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"\09*** %s ***\0A\00"
@__func__.test1 = [6 x i8] c"test1\00"
@.str.1 = [15 x i8] c"1\0A \0A1,2,3\0A123\0A\00"
@.str.2 = [20 x i8] c"\09*** %s: done ***\0A \00"
define void @test1() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.test1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @small_string_test to i32 (i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__func__.test1, i64 0, i64 0))
ret void
}
void XGetWMClientMachine() {}


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

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

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

LLVM IR (-O2):
define void @XGetWMClientMachine() {
ret void
}
/* Variables and functions */
char *strcat(char *__restrict s, const char *__restrict append) {
  char *save = s;
  for (; *s; ++s)
    ;
  while ((*s++ = *append++))
    ;
  return (save);
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1137 <strcat+0x37>
jmp    1126 <strcat+0x26>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <strcat+0x14>
jmp    113c <strcat+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     116b <strcat+0x6b>
jmp    113c <strcat+0x3c>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* noalias returned %0, i8* noalias nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %7, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %6, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
void Out_Open(void) {}


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

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

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

LLVM IR (-O2):
define void @Out_Open() {
ret void
}
/* Variables and functions */
double func_int_double_1(int /*<<< orphan*/, int, double);
double func_int_double_2(int /*<<< orphan*/, int /*<<< orphan*/, int, double);
int /*<<< orphan*/ printf(char *, double);
int main() {
  double ret = func_int_double_1(0, 5, 10.0);
  printf("%f\n", ret);
  ret = func_int_double_2(0, 0, 5, 10.0);
  printf("%f\n", ret);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
mov    $0x5,%esi
movsd  0xeb9(%rip),%xmm0
call   1030 <func_int_double_1@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
xor    %esi,%esi
mov    $0x5,%edx
movsd  0xe8f(%rip),%xmm0
mov    %esi,%edi
call   1050 <func_int_double_2@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xe7f(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xec7(%rip),%xmm0
xor    %edi,%edi
mov    $0x5,%esi
call   1030 <func_int_double_1@plt>
lea    0xebc(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    $0x5,%edx
movsd  0xe9b(%rip),%xmm0
call   1050 <func_int_double_2@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = call double @func_int_double_1(i32 0, i32 5, double 1.000000e+01)
store double %2, double* %1
%3 = load double, double* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
%5 = call double @func_int_double_2(i32 0, i32 0, i32 5, double 1.000000e+01)
store double %5, double* %1
%6 = load double, double* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
define i32 @main() {
%1 = tail call double @func_int_double_1(i32 0, i32 5, double 1.000000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @func_int_double_2(i32 0, i32 0, i32 5, double 1.000000e+01)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
void VP8LDspInitMSA(void) {}


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

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

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

LLVM IR (-O2):
define void @VP8LDspInitMSA() {
ret void
}
void speedProfile() {}


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

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

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

LLVM IR (-O2):
define void @speedProfile() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ createitem(int, int);
void dropgold(int amount) {
  if (amount > 250)
    createitem(70, amount / 100);
  else
    createitem(18, amount);
}


x86 assembly (clang, -O0):
<dropgold>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xfa,-0x4(%rbp)
jle    1144 <dropgold+0x34>
mov    -0x4(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    $0x46,%edi
call   1030 <createitem@plt>
jmp    1151 <dropgold+0x41>
mov    -0x4(%rbp),%esi
mov    $0x12,%edi
call   1030 <createitem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dropgold>:
mov    %edi,%esi
cmp    $0xfb,%edi
jl     1131 <dropgold+0x21>
mov    %esi,%eax
imul   $0x51eb851f,%rax,%rsi
shr    $0x25,%rsi
mov    $0x46,%edi
jmp    1030 <createitem@plt>
mov    $0x12,%edi
jmp    1030 <createitem@plt>

LLVM IR (-O0):
define void @dropgold(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 250
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* %2
%7 = sdiv i32 %6, 100
%8 = call i32 @createitem(i32 70, i32 %7)
br label %12
9: ; preds = %1
%10 = load i32, i32* %2
%11 = call i32 @createitem(i32 18, i32 %10)
br label %12
12: ; preds = %9, %5
ret void
}

LLVM IR (-O2):
define void @dropgold(i32 %0) {
%2 = icmp sgt i32 %0, 250
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = udiv i32 %0, 100
%5 = tail call i32 @createitem(i32 70, i32 %4)
br label %8
6: ; preds = %1
%7 = tail call i32 @createitem(i32 18, i32 %0)
br label %8
8: ; preds = %6, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isdigit(int);
void t_isdigit_0xfd() {
  Assert_real((isdigit(253) == 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_isdigit.c",
              1270, ("isdigit should be 0 for 0xfd"));
}


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

x86 assembly (clang, -O2):
<t_isdigit_0xfd>:
push   %rax
mov    $0xfd,%edi
call   1030 <isdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x4f6,%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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xfd\00"
define void @t_isdigit_0xfd() {
%1 = call i64 @isdigit(i32 253)
%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 1270, 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_isdigit.c\00"
@.str.1 = [29 x i8] c"isdigit should be 0 for 0xfd\00"
define void @t_isdigit_0xfd() {
%1 = tail call i64 @isdigit(i32 253)
%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 1270, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ff_hevc_put_hevc_uni_qpel_hv24_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_hv24_10_sse4() {
ret void
}