xunge/DecIR huggingface dataset:
unsigned xrop3_143_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D & S;
  stk2 = ~stk2;
  stk1 = T & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_143_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @xrop3_143_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef scalar_t__ uint64_t;
typedef scalar_t__ int64_t;

/* Variables and functions */
uint8_t Count1s(int64_t LongWord) { return Count1s((uint64_t)LongWord); }


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

x86 assembly (clang, -O2):
<Count1s>:
jmp    1100 <Count1s>

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

LLVM IR (-O2):
define i32 @Count1s(i64 %0) {
br label %2
2: ; preds = %2, %1
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
__attribute__((__noreturn__)) void exit_child(int code) {
  fflush(stderr);
  fflush(stdout);
  _exit(code);
}


x86 assembly (clang, -O0):
<exit_child>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    -0x4(%rbp),%edi
call   1030 <_exit@plt>

x86 assembly (clang, -O2):
<exit_child>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
mov    %ebx,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@stdout = global i32 0
define void @exit_child(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fflush(i32 %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @_exit(i32 %7)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@stdout = global i32 0
define void @exit_child(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fflush(i32 %2)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
%6 = tail call i32 @_exit(i32 %0)
unreachable
}
void us_interaction_destroy(void) {}


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

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

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

LLVM IR (-O2):
define void @us_interaction_destroy() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ FIONREAD;
int ioctl(int, int /*<<< orphan*/, int *);
int genieDataAvail(int fd) {
  int result;
  if (ioctl(fd, FIONREAD, &result) == -1)
    return -1;
  return result;
}


x86 assembly (clang, -O0):
<genieDataAvail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2ec3(%rip),%rax
mov    (%rax),%esi
lea    -0xc(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
jne    1145 <genieDataAvail+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    114b <genieDataAvail+0x3b>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genieDataAvail>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
cmp    $0xffffffff,%eax
je     112d <genieDataAvail+0x1d>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@FIONREAD = global i32 0
define i32 @genieDataAvail(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @FIONREAD
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = icmp eq i32 %5, -1
%7 = load i32, i32* %2
%8 = select i1 %6, i32 -1, i32 %7
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fputc(int /*<<< orphan*/, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/ *);
int strlen(char const *);
unsigned long push_string(const char *name, unsigned long offset,
                          FILE *output) {
  size_t name_len = strlen(name) + 1;
  fputs(name, output);
  fputc(0, output);
  offset += name_len;
  return offset;
}


x86 assembly (clang, -O0):
<push_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
add    $0x1,%eax
cltq
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rsi
xor    %edi,%edi
call   1050 <fputc@plt>
mov    -0x20(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<push_string>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r15
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%r12
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <fputs@plt>
xor    %edi,%edi
mov    %r15,%rsi
call   1050 <fputc@plt>
lea    (%r12,%r14,1),%rax
add    $0x1,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64 @push_string(i8* %0, i64 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32*
%7 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = call i32 @strlen(i8* %8)
%10 = add nsw i32 %9, 1
%11 = sext i32 %10 to i64
store i64 %11, i64* %7
%12 = load i8*, i8** %4
%13 = load i32*, i32** %6
%14 = call i32 @fputs(i8* %12, i32* %13)
%15 = load i32*, i32** %6
%16 = call i32 @fputc(i32 0, i32* %15)
%17 = load i64, i64* %7
%18 = load i64, i64* %5
%19 = add i64 %18, %17
store i64 %19, i64* %5
%20 = load i64, i64* %5
ret i64 %20
}

LLVM IR (-O2):
define i64 @push_string(i8* %0, i64 %1, i32* nocapture %2) {
%4 = tail call i32 @strlen(i8* %0)
%5 = add nsw i32 %4, 1
%6 = sext i32 %5 to i64
%7 = tail call i32 @fputs(i8* %0, i32* %2)
%8 = tail call i32 @fputc(i32 0, i32* %2)
%9 = add i64 %6, %1
ret i64 %9
}
Free(s) char *s;
{ free(s); }


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

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

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

LLVM IR (-O2):
define i32 @Free(i8* nocapture %0) {
tail call void @free(i8* %0)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
void hl_bytes_blit(char *dst, int dpos, char *src, int spos, int len) {
  memcpy(dst + dpos, src + spos, len);
}


x86 assembly (clang, -O0):
<hl_bytes_blit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
movslq -0xc(%rbp),%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
movslq -0x1c(%rbp),%rax
add    %rax,%rsi
mov    -0x20(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hl_bytes_blit>:
movslq %esi,%rax
add    %rax,%rdi
movslq %ecx,%rsi
add    %rdx,%rsi
mov    %r8d,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @hl_bytes_blit(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = load i32, i32* %7
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8*, i8** %8
%16 = load i32, i32* %9
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i8, i8* %15, i64 %17
%19 = load i32, i32* %10
%20 = call i32 @memcpy(i8* %14, i8* %18, i32 %19)
ret void
}

LLVM IR (-O2):
define void @hl_bytes_blit(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = sext i32 %1 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i8, i8* %2, i64 %8
%10 = tail call i32 @memcpy(i8* %7, i8* %9, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ write(int, char *, int /*<<< orphan*/);
void rpc_reply(int res) {
  char buf[8192];
  sprintf(buf, "<result xmlns='http://example.com/math'>%d</result>\n", res);
  write(1, buf, strlen(buf));
}


x86 assembly (clang, -O0):
<rpc_reply>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2020,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x2010(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xeb1(%rip),%rsi
call   1050 <sprintf@plt>
lea    -0x2010(%rbp),%rax
mov    %rax,-0x2018(%rbp)
lea    -0x2010(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x2018(%rbp),%rsi
mov    %eax,%edx
mov    $0x1,%edi
call   1030 <write@plt>
add    $0x2020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rpc_reply>:
push   %rbx
sub    $0x2000,%rsp
mov    %edi,%edx
lea    0xebf(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1050 <sprintf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x2000,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [53 x i8] c"<result xmlns='http://example.com/math'>%d</result>\0A\00"
define void @rpc_reply(i32 %0) {
%2 = alloca i32
%3 = alloca [8192 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%9 = call i32 @strlen(i8* %8)
%10 = call i32 @write(i32 1, i8* %7, i32 %9)
ret void
}

LLVM IR (-O2):
@.str = [53 x i8] c"<result xmlns='http://example.com/math'>%d</result>\0A\00"
define void @rpc_reply(i32 %0) {
%2 = alloca [8192 x i8]
%3 = getelementptr inbounds [8192 x i8], [8192 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @strlen(i8* %3)
%6 = call i32 @write(i32 1, i8* %3, i32 %5)
ret void
}
__attribute__((always_)) void insb(int port, void *addr, unsigned long count) {
  asm volatile("rep; ins"
               "b"
               : "+D"(addr), "+c"(count)
               : "d"(port));
}


x86 assembly (clang, -O0):
<insb>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    -0x4(%rbp),%edx
rep insb (%dx),%es:(%rdi)
mov    %rdi,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<insb>:
mov    %rdx,%rcx
mov    %edi,%edx
mov    %rsi,%rdi
rep insb (%dx),%es:(%rdi)
ret

LLVM IR (-O0):
define void @insb(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %5
%8 = load i64, i64* %6
%9 = load i32, i32* %4
%10 = call { i8*, i64 } asm sideeffect "rep; insb", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %9, i8* %7, i64 %8)
%11 = extractvalue { i8*, i64 } %10, 0
%12 = extractvalue { i8*, i64 } %10, 1
store i8* %11, i8** %5
store i64 %12, i64* %6
ret void
}

LLVM IR (-O2):
define void @insb(i32 %0, i8* %1, i64 %2) {
%4 = tail call { i8*, i64 } asm sideeffect "rep; insb", "={di},={cx},{dx},0,1,~{dirflag},~{fpsr},~{flags}"(i32 %0, i8* %1, i64 %2)
ret void
}
/* Variables and functions */
char *string_commas_double(double);
int strlen(char *);
char *string_commas_dollar(double d) {
  char *results;
  results = string_commas_double(d);
  *(results + strlen(results) - 1) = '\0';
  return results;
}


x86 assembly (clang, -O0):
<string_commas_dollar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <string_commas_double@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
movb   $0x0,-0x1(%rax,%rcx,1)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_commas_dollar>:
push   %rbx
call   1040 <string_commas_double@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rbx,%rax,1)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @string_commas_dollar(double %0) {
%2 = alloca double
%3 = alloca i8*
store double %0, double* %2
%4 = load double, double* %2
%5 = call i8* @string_commas_double(double %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %6, i64 %9
%11 = getelementptr inbounds i8, i8* %10, i64 -1
store i8 0, i8* %11
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @string_commas_dollar(double %0) {
%2 = tail call i8* @string_commas_double(double %0)
%3 = tail call i32 @strlen(i8* %2)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %2, i64 %4
%6 = getelementptr inbounds i8, i8* %5, i64 -1
store i8 0, i8* %6
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int r, s;
  scanf("%d %d", &r, &s);
  printf("%d\n", (s << 1) - r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0xc(%rbp),%esi
shl    $0x1,%esi
sub    -0x8(%rbp),%esi
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%esi
add    %esi,%esi
sub    0x4(%rsp),%esi
lea    0xec1(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %2
%7 = shl i32 %6, 1
%8 = load i32, i32* %1
%9 = sub nsw i32 %7, %8
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %9)
ret i32 0
}
void g_hook_list_invoke_check() {}


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

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

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

LLVM IR (-O2):
define void @g_hook_list_invoke_check() {
ret void
}
int kafka_ping(struct ioengine_data *td) { return 0; }


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

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

LLVM IR (-O0):
%struct.ioengine_data = type opaque
define i32 @kafka_ping(%struct.ioengine_data* %0) {
%2 = alloca %struct.ioengine_data*
store %struct.ioengine_data* %0, %struct.ioengine_data** %2
ret i32 0
}

LLVM IR (-O2):
%struct.ioengine_data = type opaque
define i32 @kafka_ping(%struct.ioengine_data* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _Error(long, char *);
void Error_VariableSyntaxArgumentMustBindToConsistentMode(long p_position) {
  _Error(p_position,
         "Syntax mark argument bound to parameters of different mode");
}


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

x86 assembly (clang, -O2):
<Error_VariableSyntaxArgumentMustBindToConsistentMode>:
lea    0xee9(%rip),%rsi
jmp    1030 <_Error@plt>

LLVM IR (-O0):
@.str = [59 x i8] c"Syntax mark argument bound to parameters of different mode\00"
define void @Error_VariableSyntaxArgumentMustBindToConsistentMode(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @_Error(i64 %3, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [59 x i8] c"Syntax mark argument bound to parameters of different mode\00"
define void @Error_VariableSyntaxArgumentMustBindToConsistentMode(i64 %0) {
%2 = tail call i32 @_Error(i64 %0, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0))
ret void
}
int nxny2() {
  int x, y;
  x = 1;
  y = 4;
  if (x)
    return x;
  return y;
}


x86 assembly (clang, -O0):
<nxny2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x8(%rbp)
movl   $0x4,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     1127 <nxny2+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112d <nxny2+0x2d>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @nxny2() {
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ SelectionSort(int *, int);
int __VERIFIER_nondet_int();
scalar_t__ alloca(int);
int main() {
  int array_size = __VERIFIER_nondet_int();
  if (array_size < 1) {
    array_size = 1;
  }
  int *numbers = (int *)alloca(array_size * sizeof(int));
  SelectionSort(numbers, array_size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <__VERIFIER_nondet_int@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    115a <main+0x2a>
movl   $0x1,-0x8(%rbp)
movslq -0x8(%rbp),%rax
shl    $0x2,%rax
mov    %eax,%edi
call   1040 <alloca@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <SelectionSort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1050 <__VERIFIER_nondet_int@plt>
test   %eax,%eax
mov    $0x1,%ebx
cmovg  %eax,%ebx
lea    0x0(,%rbx,4),%edi
call   1040 <alloca@plt>
mov    %rax,%rdi
mov    %ebx,%esi
call   1030 <SelectionSort@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
store i32 0, i32* %1
%4 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %0
store i32 1, i32* %2
br label %8
8: ; preds = %7, %0
%9 = load i32, i32* %2
%10 = sext i32 %9 to i64
%11 = mul i64 %10, 4
%12 = trunc i64 %11 to i32
%13 = call i64 @alloca(i32 %12)
%14 = inttoptr i64 %13 to i32*
store i32* %14, i32** %3
%15 = load i32*, i32** %3
%16 = load i32, i32* %2
%17 = call i32 @SelectionSort(i32* %15, i32 %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = icmp sgt i32 %1, 1
%3 = select i1 %2, i32 %1, i32 1
%4 = shl i32 %3, 2
%5 = tail call i64 @alloca(i32 %4)
%6 = inttoptr i64 %5 to i32*
%7 = tail call i32 @SelectionSort(i32* %6, i32 %3)
ret i32 0
}
/* Variables and functions */
int __infer_nondet_int();
int rename(const char *old, const char *new_) {
  int n;
  n = __infer_nondet_int();
  if (n)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1140 <rename+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1147 <rename+0x37>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @rename(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
%4 = icmp eq i32 %3, 0
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int foo(int *);
int *malloc(int);
int main() {
  int *k = malloc(6);
  return foo(k);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x6,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <foo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x6,%edi
call   1030 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <foo@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i32* @malloc(i32 6)
store i32* %3, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @foo(i32* %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32* @malloc(i32 6)
%2 = tail call i32 @foo(i32* %1)
ret i32 %2
}
/* Type definitions */
typedef unsigned int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, unsigned int const *, int);
void oswp2(void *p, const unsigned i) {
  const uint16_t tmp = i;
  memcpy(p, &tmp, 2);
}


x86 assembly (clang, -O0):
<oswp2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x2,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oswp2>:
push   %rax
mov    %esi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x2,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @oswp2(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
store i32 %6, i32* %5
%7 = load i8*, i8** %3
%8 = call i32 @memcpy(i8* %7, i32* %5, i32 2)
ret void
}

LLVM IR (-O2):
define void @oswp2(i8* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 %1, i32* %3
%5 = call i32 @memcpy(i8* %0, i32* %3, i32 2)
ret void
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int oct_ge(const char *pat, const char *text) {
  return (strcmp(text, pat) >= 0);
}


x86 assembly (clang, -O0):
<oct_ge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
setge  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oct_ge>:
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strcmp@plt>
shr    $0x3f,%rax
xor    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @oct_ge(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp sge i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @oct_ge(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %1, i8* %0)
%4 = lshr i64 %3, 63
%5 = trunc i64 %4 to i32
%6 = xor i32 %5, 1
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void test50_TestProg_targetInit__I() { printf("%s\n", "TestProg"); }


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

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

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [9 x i8] c"TestProg\00"
define void @test50_TestProg_targetInit__I() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int StringComparisonOrEqualCommon(char *, int, char *, int, int,
                                  int /*<<< orphan*/);
int StringIsSmallerOrEqual(char *first, int length1, char *second, int length2,
                           int isNumOrAlpha) {
  return StringComparisonOrEqualCommon(first, length1, second, length2,
                                       isNumOrAlpha, 0);
}


x86 assembly (clang, -O0):
<StringIsSmallerOrEqual>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
xor    %r9d,%r9d
call   1030 <StringComparisonOrEqualCommon@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringIsSmallerOrEqual>:
xor    %r9d,%r9d
jmp    1030 <StringComparisonOrEqualCommon@plt>

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

LLVM IR (-O2):
define i32 @StringIsSmallerOrEqual(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32 @StringComparisonOrEqualCommon(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4, i32 0)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, size_t);
void *realloc(void *, size_t);
void *xrealloc(void *p, size_t size) {
  p = realloc(p, size);
  if (!p)
    die("Out of memory (unable to allocate %z bytes)", size);
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
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 <realloc@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    115c <xrealloc+0x3c>
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdi
call   1040 <die@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
call   1030 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <xrealloc+0x23>
lea    0xec5(%rip),%rdi
mov    %r14,%rsi
call   1040 <die@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [44 x i8] c"Out of memory (unable to allocate %z bytes)\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @realloc(i8* %5, i64 %6)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = icmp ne i8* %8, null
br i1 %9, label %13, label %10
10: ; preds = %2
%11 = load i64, i64* %4
%12 = call i32 @die(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %11)
br label %13
13: ; preds = %10, %2
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@.str = [44 x i8] c"Out of memory (unable to allocate %z bytes)\00"
define noalias i8* @xrealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @die(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0), i64 %1)
br label %7
7: ; preds = %5, %2
ret i8* %3
}
int main() {
  extern unsigned foo __asm__("__mf_lc_mask");
  unsigned *volatile bar = &foo;
  *bar = 4;
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
mov    0x2ee1(%rip),%rax
mov    %rax,-0x8(%rsp)
mov    -0x8(%rsp),%rax
movl   $0x4,(%rax)
xor    %eax,%eax
ret

LLVM IR (-O0):
@__mf_lc_mask = external global i32
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
store volatile i32* @__mf_lc_mask, i32** %2
%3 = load volatile i32*, i32** %2
store i32 4, i32* %3
ret i32 0
}

LLVM IR (-O2):
@__mf_lc_mask = external global i32
define i32 @main() {
%1 = alloca i32*
%2 = bitcast i32** %1 to i8*
store volatile i32* @__mf_lc_mask, i32** %1
%3 = load volatile i32*, i32** %1
store i32 4, i32* %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ NoPinC__0__GeneralIO__clr();
void LedsP__Led1__clr(void) { NoPinC__0__GeneralIO__clr(); }


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

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

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

LLVM IR (-O2):
define void @LedsP__Led1__clr() {
%1 = tail call i32 (...) @NoPinC__0__GeneralIO__clr()
ret void
}
int isBigEndian(void) {
  int i = 1;
  char c = *(char *)&i;
  return (int)c != i;
}


x86 assembly (clang, -O0):
<isBigEndian>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    -0x4(%rbp),%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isBigEndian() {
%1 = alloca i32
%2 = alloca i8
store i32 1, i32* %1
%3 = bitcast i32* %1 to i8*
%4 = load i8, i8* %3
store i8 %4, i8* %2
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = load i32, i32* %1
%8 = icmp ne i32 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @isBigEndian() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int /*<<< orphan*/, char *, int, char *);
int /*<<< orphan*/ islower(int);
void t_islower_0x66() {
  Assert_real((islower(102)),
              "/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_islower.c",
              515, ("islower should be 1 for f"));
}


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

x86 assembly (clang, -O2):
<t_islower_0x66>:
push   %rax
mov    $0x66,%edi
call   1030 <islower@plt>
lea    0xece(%rip),%rsi
lea    0xf6f(%rip),%rcx
mov    %eax,%edi
mov    $0x203,%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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for f\00"
define void @t_islower_0x66() {
%1 = call i32 @islower(i32 102)
%2 = call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 515, i8* getelementptr inbounds ([26 x i8], [26 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_islower.c\00"
@.str.1 = [26 x i8] c"islower should be 1 for f\00"
define void @t_islower_0x66() {
%1 = tail call i32 @islower(i32 102)
%2 = tail call i32 @Assert_real(i32 %1, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 515, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
unsigned long __raw_local_irq_save();
unsigned long native_read_cr4();
int /*<<< orphan*/ native_write_cr4(unsigned long);
int /*<<< orphan*/ raw_local_irq_restore(unsigned long);
__attribute__((always_)) void __native_flush_tlb_global(void) {
  unsigned long flags;
  unsigned long cr4;
  do {
    (flags) = __raw_local_irq_save();
  } while (0);
  cr4 = native_read_cr4();
  native_write_cr4(cr4 & ~0x00000080);
  native_write_cr4(cr4);
  raw_local_irq_restore(flags);
}


x86 assembly (clang, -O0):
<__native_flush_tlb_global>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <__raw_local_irq_save@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <native_read_cr4@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
and    $0xffffffffffffff7f,%rdi
call   1030 <native_write_cr4@plt>
mov    -0x10(%rbp),%rdi
call   1030 <native_write_cr4@plt>
mov    -0x8(%rbp),%rdi
call   1050 <raw_local_irq_restore@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__native_flush_tlb_global>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <__raw_local_irq_save@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1040 <native_read_cr4@plt>
mov    %rax,%rbx
mov    %rax,%rdi
and    $0xffffffffffffff7f,%rdi
call   1030 <native_write_cr4@plt>
mov    %rbx,%rdi
call   1030 <native_write_cr4@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <raw_local_irq_restore@plt>

LLVM IR (-O0):
define void @__native_flush_tlb_global() {
%1 = alloca i64
%2 = alloca i64
br label %3
3: ; preds = %0
%4 = call i64 (...) @__raw_local_irq_save()
store i64 %4, i64* %1
br label %5
5: ; preds = %3
%6 = call i64 (...) @native_read_cr4()
store i64 %6, i64* %2
%7 = load i64, i64* %2
%8 = and i64 %7, -129
%9 = call i32 @native_write_cr4(i64 %8)
%10 = load i64, i64* %2
%11 = call i32 @native_write_cr4(i64 %10)
%12 = load i64, i64* %1
%13 = call i32 @raw_local_irq_restore(i64 %12)
ret void
}

LLVM IR (-O2):
define void @__native_flush_tlb_global() {
%1 = tail call i64 (...) @__raw_local_irq_save()
%2 = tail call i64 (...) @native_read_cr4()
%3 = and i64 %2, -129
%4 = tail call i32 @native_write_cr4(i64 %3)
%5 = tail call i32 @native_write_cr4(i64 %2)
%6 = tail call i32 @raw_local_irq_restore(i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cat(char *, char *);
int set_name_option(char *to, char *from) {
  int ansr = (*from == '*') ? 2 : 0;
  if (to != from)
    cat(to, from);
  if (*to == '*')
    *to = '_';
  return ansr;
}


x86 assembly (clang, -O0):
<set_name_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
xor    %eax,%eax
mov    $0x2,%ecx
cmp    $0x2a,%edx
cmove  %ecx,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1152 <set_name_option+0x42>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cat@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    1169 <set_name_option+0x59>
mov    -0x8(%rbp),%rax
movb   $0x5f,(%rax)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_name_option>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    (%rsi),%bpl
cmp    %rsi,%rdi
je     1126 <set_name_option+0x16>
mov    %rbx,%rdi
call   1030 <cat@plt>
cmpb   $0x2a,(%rbx)
jne    112e <set_name_option+0x1e>
movb   $0x5f,(%rbx)
xor    %eax,%eax
cmp    $0x2a,%bpl
sete   %al
add    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @set_name_option(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 42
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 2, i32 0
store i32 %11, i32* %5
%12 = load i8*, i8** %3
%13 = load i8*, i8** %4
%14 = icmp ne i8* %12, %13
br i1 %14, label %15, label %19
15: ; preds = %2
%16 = load i8*, i8** %3
%17 = load i8*, i8** %4
%18 = call i32 @cat(i8* %16, i8* %17)
br label %19
19: ; preds = %15, %2
%20 = load i8*, i8** %3
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp eq i32 %22, 42
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = load i8*, i8** %3
store i8 95, i8* %25
br label %26
26: ; preds = %24, %19
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @set_name_option(i8* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8* %0, %1
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @cat(i8* %0, i8* %1)
br label %7
7: ; preds = %5, %2
%8 = load i8, i8* %0
%9 = icmp eq i8 %8, 42
br i1 %9, label %10, label %11
10: ; preds = %7
store i8 95, i8* %0
br label %11
11: ; preds = %10, %7
%12 = icmp eq i8 %3, 42
%13 = select i1 %12, i32 2, i32 0
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ TimerDisable(int, int);
void wave_interrupt_stop(void) { TimerDisable(0x40031000, 0x000000ff); }


x86 assembly (clang, -O0):
<wave_interrupt_stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x40031000,%edi
mov    $0xff,%esi
call   1030 <TimerDisable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wave_interrupt_stop>:
mov    $0x40031000,%edi
mov    $0xff,%esi
jmp    1030 <TimerDisable@plt>

LLVM IR (-O0):
define void @wave_interrupt_stop() {
%1 = call i32 @TimerDisable(i32 1073942528, i32 255)
ret void
}

LLVM IR (-O2):
define void @wave_interrupt_stop() {
%1 = tail call i32 @TimerDisable(i32 1073942528, i32 255)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x29() {
  Assert_real((isupper(41) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              210, ("isupper should be 0 for )"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x29>:
push   %rax
mov    $0x29,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0xd2,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for )\00"
define void @t_isupper_0x29() {
%1 = call i64 @isupper(i32 41)
%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 210, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [26 x i8] c"isupper should be 0 for )\00"
define void @t_isupper_0x29() {
%1 = tail call i64 @isupper(i32 41)
%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 210, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_REALTIME;
int /*<<< orphan*/ clock_nanosleep(int /*<<< orphan*/, int /*<<< orphan*/,
                                   struct timespec *, int /*<<< orphan*/ *);
void sys_sleep(int milli) {
  struct timespec tp;
  tp.tv_sec = milli / 1000;
  tp.tv_nsec = (milli % 1000) * 1000000;
  clock_nanosleep(CLOCK_REALTIME, 0, &tp, NULL);
}


x86 assembly (clang, -O0):
<sys_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0xf4240,%edx,%eax
mov    %eax,-0xc(%rbp)
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
lea    -0x10(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <clock_nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_sleep>:
push   %rax
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,(%rsp)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0x4(%rsp)
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rdx
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <clock_nanosleep@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define void @sys_sleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = srem i32 %7, 1000
%9 = mul nsw i32 %8, 1000000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %9, i32* %10
%11 = load i32, i32* @CLOCK_REALTIME
%12 = call i32 @clock_nanosleep(i32 %11, i32 0, %struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_REALTIME = global i32 0
define void @sys_sleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = sdiv i32 %0, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = srem i32 %0, 1000
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
%9 = load i32, i32* @CLOCK_REALTIME
%10 = call i32 @clock_nanosleep(i32 %9, i32 0, %struct.timespec* %2, i32* null)
ret void
}