xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Getc();
int /*<<< orphan*/ comp_algs(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
extern void preferred_compression_algorithms(int len) {
  int i;
  for (i = 0; i < len; i++) {
    printf("\t");
    comp_algs(Getc());
  }
}


x86 assembly (clang, -O0):
<preferred_compression_algorithms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1176 <preferred_compression_algorithms+0x46>
lea    0xeab(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <Getc@plt>
mov    %eax,%edi
call   1030 <comp_algs@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <preferred_compression_algorithms+0x12>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<preferred_compression_algorithms>:
push   %rbx
test   %edi,%edi
jle    115d <preferred_compression_algorithms+0x2d>
mov    %edi,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0x9,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1050 <Getc@plt>
mov    %eax,%edi
call   1040 <comp_algs@plt>
add    $0xffffffff,%ebx
jne    1140 <preferred_compression_algorithms+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @preferred_compression_algorithms(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %10
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ 0, %1 ]
%5 = tail call i32 @putchar(i32 9)
%6 = tail call i32 (...) @Getc()
%7 = tail call i32 @comp_algs(i32 %6)
%8 = add nuw nsw i32 %4, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mcal_cpu_nop();
void __sys_tick_handler() {
  for (;;) {
    mcal_cpu_nop();
  }
}


x86 assembly (clang, -O0):
<__sys_tick_handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <__sys_tick_handler+0x9>
mov    $0x0,%al
call   1030 <mcal_cpu_nop@plt>
jmp    1119 <__sys_tick_handler+0x9>

x86 assembly (clang, -O2):
<__sys_tick_handler>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <mcal_cpu_nop@plt>
jmp    1120 <__sys_tick_handler+0x10>

LLVM IR (-O0):
define void @__sys_tick_handler() {
br label %1
1: ; preds = %1, %0
%2 = call i32 (...) @mcal_cpu_nop()
br label %1
}

LLVM IR (-O2):
define void @__sys_tick_handler() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 (...) @mcal_cpu_nop()
br label %1
}
/* Variables and functions */
scalar_t__ i2c_read(unsigned int *, int);
scalar_t__ i2c_write(unsigned char *, int);
int register32_read(unsigned char reg, unsigned int *data) {
  int rc = -1;
  unsigned char bite[4];
  bite[0] = reg;
  if (i2c_write(bite, 1) == 0) {
    if (i2c_read(data, 4) == 0) {
      rc = 0;
    }
  }
  return rc;
}


x86 assembly (clang, -O0):
<register32_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xffffffff,-0x14(%rbp)
mov    -0x1(%rbp),%al
mov    %al,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x1,%esi
call   1040 <i2c_write@plt>
cmp    $0x0,%rax
jne    117b <register32_read+0x5b>
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1030 <i2c_read@plt>
cmp    $0x0,%rax
jne    1176 <register32_read+0x56>
movl   $0x0,-0x14(%rbp)
jmp    117b <register32_read+0x5b>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<register32_read>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %dil,0xc(%rsp)
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
call   1040 <i2c_write@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
jne    115b <register32_read+0x3b>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <i2c_read@plt>
neg    %rax
sbb    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @register32_read(i8 zeroext %0, i32* %1) {
%3 = alloca i8
%4 = alloca i32*
%5 = alloca i32
%6 = alloca [4 x i8]
store i8 %0, i8* %3
store i32* %1, i32** %4
store i32 -1, i32* %5
%7 = load i8, i8* %3
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
store i8 %7, i8* %8
%9 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%10 = call i64 @i2c_write(i8* %9, i32 1)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i32*, i32** %4
%14 = call i64 @i2c_read(i32* %13, i32 4)
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 0, i32* %5
br label %17
17: ; preds = %16, %12
br label %18
18: ; preds = %17, %2
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
define i32 @register32_read(i8 zeroext %0, i32* %1) {
%3 = alloca [4 x i8]
%4 = getelementptr inbounds [4 x i8], [4 x i8]* %3, i64 0, i64 0
store i8 %0, i8* %4
%5 = call i64 @i2c_write(i8* %4, i32 1)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = call i64 @i2c_read(i32* %1, i32 4)
%9 = icmp ne i64 %8, 0
%10 = sext i1 %9 to i32
br label %11
11: ; preds = %7, %2
%12 = phi i32 [ -1, %2 ], [ %10, %7 ]
ret i32 %12
}
unsigned int cmp_case_uint(unsigned int check, unsigned int baseline,
                           unsigned int when_lt, unsigned int when_eq,
                           unsigned int when_gt) {
  return (((check) <= (baseline))
              ? (((check) < (baseline)) ? (when_lt) : (when_eq))
              : (when_gt));
}


x86 assembly (clang, -O0):
<cmp_case_uint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
ja     1148 <cmp_case_uint+0x48>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jae    1137 <cmp_case_uint+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    113d <cmp_case_uint+0x3d>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    114e <cmp_case_uint+0x4e>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_case_uint>:
mov    %edx,%eax
cmp    %esi,%edi
cmovae %ecx,%eax
cmova  %r8d,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_case_uint(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp ugt i32 %0, %1
%7 = icmp ult i32 %0, %1
%8 = select i1 %7, i32 %2, i32 %3
%9 = select i1 %6, i32 %4, i32 %8
ret i32 %9
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ snprintb(char *, int, int, char *);
const char *c_flagsstr(int t) {
  static char buf[64];
  snprintb(buf, sizeof(buf), t, "\020\01TRUE\02PARSED\03CF_DATEFAB\04TRIMMED");
  return buf;
}


x86 assembly (clang, -O0):
<c_flagsstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0x2f1b(%rip),%rdi
mov    $0x40,%esi
lea    0xecf(%rip),%rcx
call   1030 <snprintb@plt>
lea    0x2f03(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<c_flagsstr>:
push   %rbx
mov    %edi,%edx
lea    0x2f26(%rip),%rbx
lea    0xedf(%rip),%rcx
mov    %rbx,%rdi
mov    $0x40,%esi
call   1030 <snprintb@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@c_flagsstr.buf = internal global [64 x i8] zeroinitializer
@.str = [33 x i8] c"\10\01TRUE\02PARSED\03CF_DATEFAB\04TRIMMED\00"
define i8* @c_flagsstr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @snprintb(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @c_flagsstr.buf, i64 0, i64 0), i32 64, i32 %3, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @c_flagsstr.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@c_flagsstr.buf = internal global [64 x i8] zeroinitializer
@.str = [33 x i8] c"\10\01TRUE\02PARSED\03CF_DATEFAB\04TRIMMED\00"
define i8* @c_flagsstr(i32 %0) {
%2 = tail call i32 @snprintb(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @c_flagsstr.buf, i64 0, i64 0), i32 64, i32 %0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
ret i8* getelementptr inbounds ([64 x i8], [64 x i8]* @c_flagsstr.buf, i64 0, i64 0)
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void clear_bit(uint32_t *map, unsigned int nr) {
  map[(nr >> 5)] &= ~(1 << (nr & 31));
}


x86 assembly (clang, -O0):
<clear_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
and    $0x1f,%ecx
mov    $0x1,%edx
shl    %cl,%edx
xor    $0xffffffff,%edx
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
shr    $0x5,%ecx
mov    %ecx,%ecx
and    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_bit>:
mov    %esi,%ecx
mov    $0xfffffffe,%eax
rol    %cl,%eax
shr    $0x5,%ecx
and    %eax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @clear_bit(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 31
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = load i32*, i32** %3
%10 = load i32, i32* %4
%11 = lshr i32 %10, 5
%12 = zext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %9, i64 %12
%14 = load i32, i32* %13
%15 = and i32 %14, %8
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @clear_bit(i32* nocapture %0, i32 %1) {
%3 = and i32 %1, 31
%4 = shl nuw i32 1, %3
%5 = xor i32 %4, -1
%6 = lshr i32 %1, 5
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = and i32 %9, %5
store i32 %10, i32* %8
ret void
}
/* Variables and functions */
int rand();
int netsim_random(int min, int max) { return rand() % (max - min + 1) + min; }


x86 assembly (clang, -O0):
<netsim_random>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<netsim_random>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @netsim_random(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (...) @rand()
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = srem i32 %5, %9
%11 = load i32, i32* %3
%12 = add nsw i32 %10, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @netsim_random(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = sub i32 1, %0
%5 = add i32 %4, %1
%6 = srem i32 %3, %5
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
char *readline_check(int, int);
char *ftp_readline(int fd) { return readline_check(fd, 1); }


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

x86 assembly (clang, -O2):
<ftp_readline>:
mov    $0x1,%esi
jmp    1030 <readline_check@plt>

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

LLVM IR (-O2):
define i8* @ftp_readline(i32 %0) {
%2 = tail call i8* @readline_check(i32 %0, i32 1)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ QS(int *, int /*<<< orphan*/, int);
int rand();
int main(int argc, char *argv[]) {
  int o;
  int a[16384];
  for (o = 0; o < 16384; o++)
    a[o] = rand() % 16384;
  QS(a, 0, 16384 - 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10020,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x4000,-0x14(%rbp)
jge    1175 <main+0x55>
mov    $0x0,%al
call   1040 <rand@plt>
mov    $0x4000,%ecx
cltd
idiv   %ecx
movslq -0x14(%rbp),%rax
mov    %edx,-0x10020(%rbp,%rax,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1140 <main+0x20>
lea    -0x10020(%rbp),%rdi
xor    %esi,%esi
mov    $0x3fff,%edx
call   1030 <QS@plt>
xor    %eax,%eax
add    $0x10020,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10000,%rsp
xor    %ebx,%ebx
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <rand@plt>
lea    0x3fff(%rax),%ecx
test   %eax,%eax
cmovns %eax,%ecx
and    $0xffffc000,%ecx
sub    %ecx,%eax
mov    %eax,(%rsp,%rbx,4)
add    $0x1,%rbx
cmp    $0x4000,%rbx
jne    1130 <main+0x10>
mov    %rsp,%rdi
xor    %esi,%esi
mov    $0x3fff,%edx
call   1030 <QS@plt>
xor    %eax,%eax
add    $0x10000,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [16384 x i32]
%4 = bitcast [16384 x i32]* %3 to i8*
br label %5
5: ; preds = %2, %5
%6 = phi i64 [ 0, %2 ], [ %10, %5 ]
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 16384
%9 = getelementptr inbounds [16384 x i32], [16384 x i32]* %3, i64 0, i64 %6
store i32 %8, i32* %9
%10 = add nuw nsw i64 %6, 1
%11 = icmp eq i64 %10, 16384
br i1 %11, label %12, label %5
12: ; preds = %5
%13 = getelementptr inbounds [16384 x i32], [16384 x i32]* %3, i64 0, i64 0
%14 = call i32 @QS(i32* %13, i32 0, i32 16383)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_menu_item(char *, int /*<<< orphan*/,
                                   int /*<<< orphan*/);
void print_menu_choice() {
  print_menu_item("Please input your choices (1-5):", 0, 0);
}


x86 assembly (clang, -O0):
<print_menu_choice>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <print_menu_item@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_menu_choice>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
xor    %edx,%edx
jmp    1030 <print_menu_item@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"Please input your choices (1-5):\00"
define void @print_menu_choice() {
%1 = call i32 @print_menu_item(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Please input your choices (1-5):\00"
define void @print_menu_choice() {
%1 = tail call i32 @print_menu_item(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 0, i32 0)
ret void
}
int ModTwoBase(int n) {
  long poweredTwo = 1;
  for (int i = 1; i <= n; i++)
    poweredTwo *= 2;
  return poweredTwo % 10;
}


x86 assembly (clang, -O0):
<ModTwoBase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movq   $0x1,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     113c <ModTwoBase+0x3c>
mov    -0x10(%rbp),%rax
shl    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1116 <ModTwoBase+0x16>
mov    -0x10(%rbp),%rax
mov    $0xa,%ecx
cqto
idiv   %rcx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ModTwoBase>:
test   %edi,%edi
jle    1118 <ModTwoBase+0x18>
lea    -0x1(%rdi),%ecx
mov    %edi,%eax
and    $0x7,%eax
cmp    $0x7,%ecx
jae    1120 <ModTwoBase+0x20>
mov    $0x1,%ecx
jmp    1139 <ModTwoBase+0x39>
mov    $0x1,%ecx
mov    %ecx,%eax
ret
and    $0xfffffff8,%edi
mov    $0x1,%ecx
nopl   0x0(%rax,%rax,1)
shl    $0x8,%rcx
add    $0xfffffff8,%edi
jne    1130 <ModTwoBase+0x30>
test   %eax,%eax
je     1148 <ModTwoBase+0x48>
nopl   (%rax)
add    %rcx,%rcx
add    $0xffffffff,%eax
jne    1140 <ModTwoBase+0x40>
movabs $0xcccccccccccccccd,%rdx
cc cc cc
mov    %rcx,%rax
mul    %rdx
shr    $0x3,%rdx
add    %edx,%edx
lea    (%rdx,%rdx,4),%eax
sub    %eax,%ecx
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @ModTwoBase(i32 %0) {
%2 = icmp slt i32 %0, 1
br i1 %2, label %23, label %3
3: ; preds = %1
%4 = add i32 %0, -1
%5 = and i32 %0, 7
%6 = icmp ult i32 %4, 7
br i1 %6, label %9, label %7
7: ; preds = %3
%8 = and i32 %0, -8
br label %25
9: ; preds = %25, %3
%10 = phi i64 [ undef, %3 ], [ %28, %25 ]
%11 = phi i64 [ 1, %3 ], [ %28, %25 ]
%12 = icmp eq i32 %5, 0
br i1 %12, label %19, label %13
13: ; preds = %9, %13
%14 = phi i64 [ %16, %13 ], [ %11, %9 ]
%15 = phi i32 [ %17, %13 ], [ 0, %9 ]
%16 = shl nsw i64 %14, 1
%17 = add i32 %15, 1
%18 = icmp eq i32 %17, %5
br i1 %18, label %19, label %13
19: ; preds = %13, %9
%20 = phi i64 [ %10, %9 ], [ %16, %13 ]
%21 = urem i64 %20, 10
%22 = trunc i64 %21 to i32
br label %23
23: ; preds = %19, %1
%24 = phi i32 [ 1, %1 ], [ %22, %19 ]
ret i32 %24
25: ; preds = %25, %7
%26 = phi i64 [ 1, %7 ], [ %28, %25 ]
%27 = phi i32 [ 0, %7 ], [ %29, %25 ]
%28 = shl i64 %26, 8
%29 = add i32 %27, 8
%30 = icmp eq i32 %29, %8
br i1 %30, label %9, label %25
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int getc(int /*<<< orphan*/ *);
void SkipLine(FILE *fp) {
  int c;
  while ((c = getc(fp)) != EOF)
    if (c == '\n')
      break;
}


x86 assembly (clang, -O0):
<SkipLine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <getc@plt>
mov    %eax,-0xc(%rbp)
mov    0x2eb9(%rip),%rcx
cmp    (%rcx),%eax
je     114b <SkipLine+0x3b>
cmpl   $0xa,-0xc(%rbp)
jne    1146 <SkipLine+0x36>
jmp    114b <SkipLine+0x3b>
jmp    111c <SkipLine+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipLine>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eca(%rip),%r14
xchg   %ax,%ax
mov    %rbx,%rdi
call   1030 <getc@plt>
cmp    $0xa,%eax
je     1132 <SkipLine+0x22>
cmp    (%r14),%eax
jne    1120 <SkipLine+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define void @SkipLine(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @getc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
%6 = icmp eq i32 %3, 10
%7 = or i1 %6, %5
br i1 %7, label %8, label %2
8: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
void StaticFunc(void) {
  static unsigned int FuncScopeStatic = 0xDEADFACE;
  printf("I'm a static Func %8X", FuncScopeStatic);
}


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

x86 assembly (clang, -O2):
<StaticFunc>:
lea    0xee9(%rip),%rdi
mov    $0xdeadface,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@StaticFunc.FuncScopeStatic = internal global i32 -559023410
@.str = [22 x i8] c"I'm a static Func %8X\00"
define void @StaticFunc() {
%1 = load i32, i32* @StaticFunc.FuncScopeStatic
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"I'm a static Func %8X\00"
define void @StaticFunc() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i32 -559023410)
ret void
}
void GPIOPinWrite(unsigned long ulPort, unsigned char ucPins,
                  unsigned char ucVal) {
  ;
  (*((volatile unsigned long *)(ulPort + (0x00000000 + (ucPins << 2))))) =
      ucVal;
}


x86 assembly (clang, -O0):
<GPIOPinWrite>:
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
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
movzbl -0x9(%rbp),%edx
shl    $0x2,%edx
add    $0x0,%edx
movslq %edx,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPIOPinWrite>:
mov    %edx,%eax
mov    %esi,%ecx
mov    %rax,(%rdi,%rcx,4)
ret

LLVM IR (-O0):
define void @GPIOPinWrite(i64 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i64
%5 = alloca i8
%6 = alloca i8
store i64 %0, i64* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = zext i8 %7 to i64
%9 = load i64, i64* %4
%10 = load i8, i8* %5
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 2
%13 = add nsw i32 0, %12
%14 = sext i32 %13 to i64
%15 = add i64 %9, %14
%16 = inttoptr i64 %15 to i64*
store volatile i64 %8, i64* %16
ret void
}

LLVM IR (-O2):
define void @GPIOPinWrite(i64 %0, i8 zeroext %1, i8 zeroext %2) {
%4 = zext i8 %2 to i64
%5 = zext i8 %1 to i64
%6 = shl nuw nsw i64 %5, 2
%7 = add i64 %6, %0
%8 = inttoptr i64 %7 to i64*
store volatile i64 %4, i64* %8
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;

/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ strtoull(char *, int /*<<< orphan*/ *, int);
uint64_t get_cas_value_from_gets(char *a) {
  char *b = a + strlen(a);
  while (*b-- != ' ')
    ;
  return strtoull(b + 1, NULL, 10);
}


x86 assembly (clang, -O0):
<get_cas_value_from_gets>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x20,%eax
je     116d <get_cas_value_from_gets+0x4d>
jmp    114d <get_cas_value_from_gets+0x2d>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1040 <strtoull@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_cas_value_from_gets>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
lea    (%rax,%rbx,1),%rdi
add    $0x1,%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x20,-0x1(%rdi)
lea    -0x1(%rdi),%rdi
jne    1140 <get_cas_value_from_gets+0x20>
xor    %esi,%esi
mov    $0xa,%edx
pop    %rbx
jmp    1040 <strtoull@plt>

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

LLVM IR (-O2):
define i32 @get_cas_value_from_gets(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
br label %5
5: ; preds = %5, %1
%6 = phi i8* [ %4, %1 ], [ %7, %5 ]
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = load i8, i8* %6
%9 = icmp eq i8 %8, 32
br i1 %9, label %10, label %5
10: ; preds = %5
%11 = tail call i32 @strtoull(i8* nocapture %6, i32* null, i32 10)
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
scalar_t__ strchr(char *, char);
int strlen(char *);
void verify_opponent(char *name) {
  if (strlen(name) >= 50 || strchr(name, '\"')) {
    printf("The maximum name length is 50 characters\n                Also you "
           "can't use quotes ( \" ) in your submission\n                Please "
           "try again.\n");
    exit(0);
  }
}


x86 assembly (clang, -O0):
<verify_opponent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x32,%eax
jge    1176 <verify_opponent+0x36>
mov    -0x8(%rbp),%rdi
mov    $0x22,%esi
call   1040 <strchr@plt>
cmp    $0x0,%rax
je     1189 <verify_opponent+0x49>
lea    0xe83(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<verify_opponent>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
cmp    $0x31,%eax
jg     1162 <verify_opponent+0x22>
mov    %rbx,%rdi
mov    $0x22,%esi
call   1050 <strchr@plt>
test   %rax,%rax
jne    1162 <verify_opponent+0x22>
pop    %rbx
ret
lea    0xe97(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [143 x i8] c"The maximum name length is 50 characters\0A Also you can't use quotes ( \22 ) in your submission\0A Please try again.\0A\00"
define void @verify_opponent(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strlen(i8* %3)
%5 = icmp sge i32 %4, 50
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i64 @strchr(i8* %7, i8 signext 34)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %6, %1
%11 = call i32 @printf(i8* getelementptr inbounds ([143 x i8], [143 x i8]* @.str, i64 0, i64 0))
%12 = call i32 @exit(i32 0)
unreachable
13: ; preds = %6
ret void
}

LLVM IR (-O2):
@str = [142 x i8] c"The maximum name length is 50 characters\0A Also you can't use quotes ( \22 ) in your submission\0A Please try again.\00"
define void @verify_opponent(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 49
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i64 @strchr(i8* %0, i8 signext 34)
%6 = icmp eq i64 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4, %1
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([142 x i8], [142 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 0)
unreachable
10: ; preds = %4
ret void
}
void printAllPmc() {}


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

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

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

LLVM IR (-O2):
define void @printAllPmc() {
ret void
}
void a(int arg) { (void)arg; }


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

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

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

LLVM IR (-O2):
define void @a(i32 %0) {
ret void
}
int sockopt_v6only(int family, int sock) {
  int ret, on = 1;
  return 0;
}


x86 assembly (clang, -O0):
<sockopt_v6only>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @sockopt_v6only(i32 %0, i32 %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
void symbolic_region(int *p) {
  int a;
  clang_analyzer_eval(&a != p);
  clang_analyzer_eval(&a > p);
  clang_analyzer_eval(&a >= p);
}


x86 assembly (clang, -O0):
<symbolic_region>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rax
cmp    -0x8(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
lea    -0xc(%rbp),%rax
cmp    -0x8(%rbp),%rax
seta   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
lea    -0xc(%rbp),%rax
cmp    -0x8(%rbp),%rax
setae  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<symbolic_region>:
push   %rbp
push   %rbx
push   %rax
lea    0x4(%rsp),%rcx
xor    %eax,%eax
xor    %ebx,%ebx
xor    %ebp,%ebp
cmp    %rdi,%rcx
setne  %al
seta   %bl
setae  %bpl
mov    %eax,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebx,%edi
call   1030 <clang_analyzer_eval@plt>
mov    %ebp,%edi
call   1030 <clang_analyzer_eval@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @symbolic_region(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = icmp ne i32* %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @clang_analyzer_eval(i32 %6)
%8 = load i32*, i32** %2
%9 = icmp ugt i32* %3, %8
%10 = zext i1 %9 to i32
%11 = call i32 @clang_analyzer_eval(i32 %10)
%12 = load i32*, i32** %2
%13 = icmp uge i32* %3, %12
%14 = zext i1 %13 to i32
%15 = call i32 @clang_analyzer_eval(i32 %14)
ret void
}

LLVM IR (-O2):
define void @symbolic_region(i32* readnone %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = icmp ne i32* %2, %0
%5 = zext i1 %4 to i32
%6 = call i32 @clang_analyzer_eval(i32 %5)
%7 = icmp ugt i32* %2, %0
%8 = zext i1 %7 to i32
%9 = call i32 @clang_analyzer_eval(i32 %8)
%10 = icmp uge i32* %2, %0
%11 = zext i1 %10 to i32
%12 = call i32 @clang_analyzer_eval(i32 %11)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ socklen_t;
typedef int /*<<< orphan*/ __ptr_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __setsockopt(int fd, int level, int optname, const __ptr_t optval,
                 socklen_t optlen) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__setsockopt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__setsockopt>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__setsockopt(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = load i32, i32* @ENOSYS
%12 = call i32 @__set_errno(i32 %11)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__setsockopt(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = load i32, i32* @ENOSYS
%7 = tail call i32 @__set_errno(i32 %6)
ret i32 -1
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint16_t UInt16GetLE(const void *b2) {
  return (((uint16_t)((const uint8_t *)b2)[1] << 8) |
          ((uint16_t)((const uint8_t *)b2)[0]));
}


x86 assembly (clang, -O0):
<UInt16GetLE>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%rcx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<UInt16GetLE>:
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @UInt16GetLE(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i64*
%5 = getelementptr inbounds i64, i64* %4, i64 1
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = load i8*, i8** %2
%10 = bitcast i8* %9 to i64*
%11 = getelementptr inbounds i64, i64* %10, i64 0
%12 = load i64, i64* %11
%13 = trunc i64 %12 to i32
%14 = or i32 %8, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @UInt16GetLE(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = getelementptr inbounds i8, i8* %0, i64 8
%4 = bitcast i8* %3 to i64*
%5 = load i64, i64* %4
%6 = trunc i64 %5 to i32
%7 = shl i32 %6, 8
%8 = load i64, i64* %2
%9 = trunc i64 %8 to i32
%10 = or i32 %7, %9
ret i32 %10
}
/* Variables and functions */
int strlen(char *);
void add_delimiter(char *string) {
  char *s = string + strlen(string);
  if (s[-1] != '/') {
    s[0] = '/';
    s[1] = '\0';
  }
}


x86 assembly (clang, -O0):
<add_delimiter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x2f,%eax
je     115d <add_delimiter+0x4d>
mov    -0x10(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x10(%rbp),%rax
movb   $0x0,0x1(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_delimiter>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
cltq
cmpb   $0x2f,-0x1(%rbx,%rax,1)
je     1128 <add_delimiter+0x18>
movw   $0x2f,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @add_delimiter(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = sext i32 %2 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 47
br i1 %7, label %10, label %8
8: ; preds = %1
store i8 47, i8* %4
%9 = getelementptr inbounds i8, i8* %4, i64 1
store i8 0, i8* %9
br label %10
10: ; preds = %8, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0xda() {
  Assert_real((isbdigit(218) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              1095, ("isbdigit should be 0 for 0xda"));
}


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

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

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xda\00"
define void @t_isbdigit_0xda() {
%1 = call i64 @isbdigit(i32 218)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1095, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0xda\00"
define void @t_isbdigit_0xda() {
%1 = tail call i64 @isbdigit(i32 218)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1095, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void nmpa___pba_free(void *v __attribute__((unused)),
                     void *ptr __attribute__((unused))) {}


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

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

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

LLVM IR (-O2):
define void @nmpa___pba_free(i8* nocapture %0, i8* nocapture %1) {
ret void
}
int f_lt_rc2(float a1) { return !(((a1) < (100))); }


x86 assembly (clang, -O0):
<f_lt_rc2>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
ucomiss -0x4(%rbp),%xmm0
seta   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_lt_rc2>:
movss  0xef8(%rip),%xmm1
xor    %eax,%eax
ucomiss %xmm0,%xmm1
setbe  %al
ret

LLVM IR (-O0):
define i32 @f_lt_rc2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 1.000000e+02
%5 = xor i1 %4, true
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @f_lt_rc2(float %0) {
%2 = fcmp uge float %0, 1.000000e+02
%3 = zext i1 %2 to i32
ret i32 %3
}
double floor(double d) {
  int i = (int)d;
  return ((double)i);
}


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor>:
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @floor(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @floor(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGALRM;
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_BLOCK;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int /*<<< orphan*/, int /*<<< orphan*/ *,
                               int /*<<< orphan*/ *);
void sig_block() {
  sigset_t set;
  sigemptyset(&set);
  sigaddset(&set, SIGALRM);
  sigaddset(&set, SIGINT);
  sigprocmask(SIG_BLOCK, &set, NULL);
}


x86 assembly (clang, -O0):
<sig_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2ea0(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
lea    -0x4(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
lea    -0x4(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_block>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e86(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@SIGALRM = global i32 0
@SIGINT = global i32 0
@SIG_BLOCK = global i32 0
define void @sig_block() {
%1 = alloca i32
%2 = call i32 @sigemptyset(i32* %1)
%3 = load i32, i32* @SIGALRM
%4 = call i32 @sigaddset(i32* %1, i32 %3)
%5 = load i32, i32* @SIGINT
%6 = call i32 @sigaddset(i32* %1, i32 %5)
%7 = load i32, i32* @SIG_BLOCK
%8 = call i32 @sigprocmask(i32 %7, i32* %1, i32* null)
ret void
}

LLVM IR (-O2):
@SIGALRM = global i32 0
@SIGINT = global i32 0
@SIG_BLOCK = global i32 0
define void @sig_block() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @sigemptyset(i32* %1)
%4 = load i32, i32* @SIGALRM
%5 = call i32 @sigaddset(i32* %1, i32 %4)
%6 = load i32, i32* @SIGINT
%7 = call i32 @sigaddset(i32* %1, i32 %6)
%8 = load i32, i32* @SIG_BLOCK
%9 = call i32 @sigprocmask(i32 %8, i32* %1, i32* null)
ret void
}
int HelpItem129(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem129() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo();
void do_sibcall(void) { (void)foo(); }


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

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

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

LLVM IR (-O2):
define void @do_sibcall() {
%1 = tail call i32 (...) @foo()
ret void
}
/* Variables and functions */
int rand();
void vetor_rand(int v[], int n) {
  int i;
  for (i = 0; i < n; i++) {
    v[i] = rand();
  }
}


x86 assembly (clang, -O0):
<vetor_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1154 <vetor_rand+0x44>
mov    $0x0,%al
call   1030 <rand@plt>
mov    %eax,%edx
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <vetor_rand+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vetor_rand>:
push   %r15
push   %r14
push   %rbx
test   %esi,%esi
jle    1144 <vetor_rand+0x34>
mov    %rdi,%r14
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <rand@plt>
mov    %eax,(%r14,%rbx,4)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <vetor_rand+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @vetor_rand(i32* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %10, %6 ]
%8 = tail call i32 (...) @rand()
%9 = getelementptr inbounds i32, i32* %0, i64 %7
store i32 %8, i32* %9
%10 = add nuw nsw i64 %7, 1
%11 = icmp eq i64 %10, %5
br i1 %11, label %12, label %6
12: ; preds = %6, %2
ret void
}
void finish_sym(void) { return; }


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

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

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

LLVM IR (-O2):
define void @finish_sym() {
ret void
}
void clock_init_uart(void) {
  (*((volatile unsigned long *)((0x01c20000 + 0x06C))) |=
   (unsigned long)(1 << ((16) + 1 - 1)));
  (*((volatile unsigned long *)((0x01c20000 + 0x2D8))) |=
   (unsigned long)(1 << ((16) + 1 - 1)));
}


x86 assembly (clang, -O0):
<clock_init_uart>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1c2006c,%eax
mov    (%rax),%rcx
or     $0x10000,%rcx
mov    $0x1c2006c,%eax
mov    %rcx,(%rax)
mov    $0x1c202d8,%eax
mov    (%rax),%rcx
or     $0x10000,%rcx
mov    $0x1c202d8,%eax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<clock_init_uart>:
orq    $0x10000,0x1c2006c
orq    $0x10000,0x1c202d8
ret

LLVM IR (-O0):
define void @clock_init_uart() {
%1 = load volatile i64, i64* inttoptr (i64 29491308 to i64*)
%2 = or i64 %1, 65536
store volatile i64 %2, i64* inttoptr (i64 29491308 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 29491928 to i64*)
%4 = or i64 %3, 65536
store volatile i64 %4, i64* inttoptr (i64 29491928 to i64*)
ret void
}

LLVM IR (-O2):
define void @clock_init_uart() {
%1 = load volatile i64, i64* inttoptr (i64 29491308 to i64*)
%2 = or i64 %1, 65536
store volatile i64 %2, i64* inttoptr (i64 29491308 to i64*)
%3 = load volatile i64, i64* inttoptr (i64 29491928 to i64*)
%4 = or i64 %3, 65536
store volatile i64 %4, i64* inttoptr (i64 29491928 to i64*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void kz_sysdown(void) {
  puts("system error!\n");
  while (1)
    ;
}


x86 assembly (clang, -O0):
<kz_sysdown>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
jmp    1120 <kz_sysdown+0x10>

x86 assembly (clang, -O2):
<kz_sysdown>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
nopl   (%rax)
jmp    1120 <kz_sysdown+0x10>

LLVM IR (-O0):
@.str = [15 x i8] c"system error!\0A\00"
define void @kz_sysdown() {
%1 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [15 x i8] c"system error!\0A\00"
define void @kz_sysdown() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}