xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xc1() {
  Assert_real((isodigit(193) == 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_isodigit.c",
              970, ("isodigit should be 0 for 0xc1"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xc1>:
push   %rax
mov    $0xc1,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x3ca,%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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xc1\00"
define void @t_isodigit_0xc1() {
%1 = call i64 @isodigit(i32 193)
%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 970, 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_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xc1\00"
define void @t_isodigit_0xc1() {
%1 = tail call i64 @isodigit(i32 193)
%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 970, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t VbExIsShutdownRequested(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @VbExIsShutdownRequested() {
ret i32 0
}
/* Type definitions */
struct in_addr {
  int dummy;
};

/* Variables and functions */
char *inet_ntoa(struct in_addr);
int /*<<< orphan*/ memcpy(struct in_addr *, unsigned long *, int);
char *inet_toa(unsigned long addr) {
  struct in_addr in;
  memcpy(&in, &addr, sizeof(unsigned long));
  return inet_ntoa(in);
}


x86 assembly (clang, -O0):
<inet_toa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%edi
call   1030 <inet_ntoa@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet_toa>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x8,%edx
call   1040 <memcpy@plt>
mov    0x8(%rsp),%edi
call   1030 <inet_ntoa@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.in_addr = type { i32 }
define i8* @inet_toa(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.in_addr
store i64 %0, i64* %2
%4 = call i32 @memcpy(%struct.in_addr* %3, i64* %2, i32 8)
%5 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i32 0, i32 0
%6 = load i32, i32* %5
%7 = call i8* @inet_ntoa(i32 %6)
ret i8* %7
}

LLVM IR (-O2):
%struct.in_addr = type { i32 }
define i8* @inet_toa(i64 %0) {
%2 = alloca i64
%3 = alloca %struct.in_addr
store i64 %0, i64* %2
%4 = bitcast %struct.in_addr* %3 to i8*
%5 = call i32 @memcpy(%struct.in_addr* %3, i64* %2, i32 8)
%6 = getelementptr inbounds %struct.in_addr, %struct.in_addr* %3, i64 0, i32 0
%7 = load i32, i32* %6
%8 = call i8* @inet_ntoa(i32 %7)
ret i8* %8
}
void mc_byte2hex(unsigned char n, char hex[2]) {
  static const char g_hextab[16] = {
      '0', '1', '2', '3', '4', '5', '6', '7',
      '8', '9', 'a', 'b', 'c', 'd', 'e', 'f',
  };
  hex[0] = g_hextab[n >> 4];
  hex[1] = g_hextab[n & 0x0f];
}


x86 assembly (clang, -O0):
<mc_byte2hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
movzbl -0x1(%rbp),%eax
sar    $0x4,%eax
movslq %eax,%rcx
lea    0xee1(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movzbl -0x1(%rbp),%eax
and    $0xf,%eax
movslq %eax,%rcx
lea    0xec7(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mc_byte2hex>:
mov    %edi,%eax
mov    %rax,%rcx
shr    $0x4,%rcx
lea    0xef0(%rip),%rdx
mov    (%rcx,%rdx,1),%cl
mov    %cl,(%rsi)
and    $0xf,%eax
mov    (%rax,%rdx,1),%al
mov    %al,0x1(%rsi)
ret

LLVM IR (-O0):
@mc_byte2hex.g_hextab = internal constant [16 x i8] c"0123456789abcdef"
define void @mc_byte2hex(i8 zeroext %0, i8* %1) {
%3 = alloca i8
%4 = alloca i8*
store i8 %0, i8* %3
store i8* %1, i8** %4
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = ashr i32 %6, 4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds [16 x i8], [16 x i8]* @mc_byte2hex.g_hextab, i64 0, i64 %8
%10 = load i8, i8* %9
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 0
store i8 %10, i8* %12
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = and i32 %14, 15
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [16 x i8], [16 x i8]* @mc_byte2hex.g_hextab, i64 0, i64 %16
%18 = load i8, i8* %17
%19 = load i8*, i8** %4
%20 = getelementptr inbounds i8, i8* %19, i64 1
store i8 %18, i8* %20
ret void
}

LLVM IR (-O2):
@mc_byte2hex.g_hextab = internal unnamed_addr constant [16 x i8] c"0123456789abcdef"
define void @mc_byte2hex(i8 zeroext %0, i8* nocapture writeonly %1) {
%3 = zext i8 %0 to i32
%4 = lshr i32 %3, 4
%5 = zext i32 %4 to i64
%6 = getelementptr inbounds [16 x i8], [16 x i8]* @mc_byte2hex.g_hextab, i64 0, i64 %5
%7 = load i8, i8* %6
store i8 %7, i8* %1
%8 = and i32 %3, 15
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds [16 x i8], [16 x i8]* @mc_byte2hex.g_hextab, i64 0, i64 %9
%11 = load i8, i8* %10
%12 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %11, i8* %12
ret void
}
unsigned char is_ltp_ot(unsigned char object_type) {
  if ((object_type == 4) || (object_type == 19) || (object_type == 23)) {
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<is_ltp_ot>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x4,%eax
je     1131 <is_ltp_ot+0x31>
movzbl -0x2(%rbp),%eax
cmp    $0x13,%eax
je     1131 <is_ltp_ot+0x31>
movzbl -0x2(%rbp),%eax
cmp    $0x17,%eax
jne    113a <is_ltp_ot+0x3a>
movb   $0x1,-0x1(%rbp)
jmp    113e <is_ltp_ot+0x3e>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ltp_ot>:
cmp    $0x17,%dil
ja     1116 <is_ltp_ot+0x16>
mov    $0x1,%al
mov    %edi,%ecx
mov    $0x880010,%edx
bt     %rcx,%rdx
jae    1116 <is_ltp_ot+0x16>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @is_ltp_ot(i8 zeroext %0) {
switch i8 %0, label %2 [
i8 23, label %3
i8 19, label %3
i8 4, label %3
]
2: ; preds = %1
br label %3
3: ; preds = %1, %1, %1, %2
%4 = phi i8 [ 0, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i8 %4
}
__attribute__((always_)) unsigned int __readl(const volatile void *addr) {
  unsigned int ret;
  asm volatile("mov"
               "l"
               " %1,%0"
               : "=r"(ret)
               : "m"(*(volatile unsigned int *)addr));
  return ret;
}


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

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

LLVM IR (-O0):
define i32 @__readl(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = call i32 asm sideeffect "movl $1,$0", "=r,*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @__readl(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 asm sideeffect "movl $1,$0", "=r,*m,~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %2)
ret i32 %3
}
unsigned sub3wc(z, x, y, carry)
unsigned *z, x, y, carry;
{
  if (carry == 0) {
    *z = x - y;
    return (*z > x);
  } else {
    *z = x - y - 1;
    return (*z >= x);
  }
}


x86 assembly (clang, -O0):
<sub3wc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jne    1140 <sub3wc+0x40>
mov    -0x14(%rbp),%ecx
sub    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1163 <sub3wc+0x63>
mov    -0x14(%rbp),%ecx
sub    -0x18(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
cmp    -0x14(%rbp),%eax
setae  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sub3wc>:
test   %ecx,%ecx
je     1113 <sub3wc+0x13>
not    %edx
add    %esi,%edx
mov    %edx,(%rdi)
cmp    %esi,%edx
setae  %al
movzbl %al,%eax
ret
sub    %edx,%esi
setb   %al
mov    %esi,(%rdi)
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @sub3wc(i32* nocapture writeonly %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp eq i32 %3, 0
br i1 %5, label %6, label %9
6: ; preds = %4
%7 = sub i32 %1, %2
store i32 %7, i32* %0
%8 = icmp ult i32 %1, %2
br label %13
9: ; preds = %4
%10 = xor i32 %2, -1
%11 = add i32 %10, %1
store i32 %11, i32* %0
%12 = icmp uge i32 %11, %1
br label %13
13: ; preds = %9, %6
%14 = phi i1 [ %8, %6 ], [ %12, %9 ]
%15 = zext i1 %14 to i32
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ glutPostRedisplay();
void keyboard(unsigned char ch, int x, int y) {
  (void)ch;
  (void)x;
  (void)y;
  glutPostRedisplay();
}


x86 assembly (clang, -O0):
<keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x0,%al
call   1030 <glutPostRedisplay@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = tail call i32 (...) @glutPostRedisplay()
ret void
}
void sig_alrm(int signo) {
  (void)signo;
  return;
}


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

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

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

LLVM IR (-O2):
define void @sig_alrm(i32 %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
uint16_t get2(const void *b) {
  assert(b != NULL);
  return (((uint16_t)((const uint8_t *)b)[0] << 8) |
          (uint16_t)((const uint8_t *)b)[1]);
}


x86 assembly (clang, -O0):
<get2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%rcx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get2>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    (%rbx),%eax
shl    $0x8,%eax
or     0x8(%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @get2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
%5 = zext i1 %4 to i32
%6 = call i32 @assert(i32 %5)
%7 = load i8*, i8** %2
%8 = bitcast i8* %7 to i64*
%9 = getelementptr inbounds i64, i64* %8, i64 0
%10 = load i64, i64* %9
%11 = trunc i64 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8*, i8** %2
%14 = bitcast i8* %13 to i64*
%15 = getelementptr inbounds i64, i64* %14, i64 1
%16 = load i64, i64* %15
%17 = trunc i64 %16 to i32
%18 = or i32 %12, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @get2(i8* %0) {
%2 = icmp ne i8* %0, null
%3 = zext i1 %2 to i32
%4 = tail call i32 @assert(i32 %3)
%5 = bitcast i8* %0 to i64*
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i32
%8 = shl i32 %7, 8
%9 = getelementptr inbounds i8, i8* %0, i64 8
%10 = bitcast i8* %9 to i64*
%11 = load i64, i64* %10
%12 = trunc i64 %11 to i32
%13 = or i32 %8, %12
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ _bbc(char *, int);
void mon_bbc(char *filename, int lineno) { _bbc(filename, lineno); }


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

x86 assembly (clang, -O2):
<mon_bbc>:
jmp    1030 <_bbc@plt>

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

LLVM IR (-O2):
define void @mon_bbc(i8* %0, i32 %1) {
%3 = tail call i32 @_bbc(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _sys_exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void BSP_exit(void) {
  printf("Bye, Bye!");
  _sys_exit(0);
}


x86 assembly (clang, -O0):
<BSP_exit>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1030 <_sys_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<BSP_exit>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <_sys_exit@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Bye, Bye!\00"
define void @BSP_exit() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @_sys_exit(i32 0)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Bye, Bye!\00"
define void @BSP_exit() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @_sys_exit(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void display_version(void) {
  printf("nandwrite"
         " "
         "$Revision: 1.1.1.1 $"
         "\n"
         "\n"
         "Copyright (C) 2003 Thomas Gleixner \n"
         "\n"
         "nandwrite"
         " comes with NO WARRANTY\n"
         "to the extent permitted by law.\n"
         "\n"
         "You may redistribute copies of "
         "nandwrite"
         "\n"
         "under the terms of the GNU General Public Licence.\n"
         "See the file `COPYING' for more information.\n");
  exit(0);
}


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

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

LLVM IR (-O0):
@.str = [273 x i8] c"nandwrite $Revision: 1.1.1.1 $\0A\0ACopyright (C) 2003 Thomas Gleixner \0A\0Anandwrite comes with NO WARRANTY\0Ato the extent permitted by law.\0A\0AYou may redistribute copies of nandwrite\0Aunder the terms of the GNU General Public Licence.\0ASee the file `COPYING' for more information.\0A\00"
define void @display_version() {
%1 = call i32 @printf(i8* getelementptr inbounds ([273 x i8], [273 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [272 x i8] c"nandwrite $Revision: 1.1.1.1 $\0A\0ACopyright (C) 2003 Thomas Gleixner \0A\0Anandwrite comes with NO WARRANTY\0Ato the extent permitted by law.\0A\0AYou may redistribute copies of nandwrite\0Aunder the terms of the GNU General Public Licence.\0ASee the file `COPYING' for more information.\00"
define void @display_version() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([272 x i8], [272 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
int test_imm_6Euint16_reg(unsigned short val) {
  return ((val) & (-0x6E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_6Euint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0xffffff92,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_6Euint16_reg>:
test   $0xff92,%edi
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_6Euint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -110
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void keyboard(unsigned char key, int x, int y) {
  if (key == 27) {
    exit(EXIT_SUCCESS);
  }
}


x86 assembly (clang, -O0):
<keyboard>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x1b,%eax
jne    113f <keyboard+0x2f>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<keyboard>:
cmp    $0x1b,%dil
je     1117 <keyboard+0x7>
ret
push   %rax
mov    0x2ec1(%rip),%rax
mov    (%rax),%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
store i8 %0, i8* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp eq i32 %8, 27
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i32, i32* @EXIT_SUCCESS
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %3
ret void
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define void @keyboard(i8 zeroext %0, i32 %1, i32 %2) {
%4 = icmp eq i8 %0, 27
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = load i32, i32* @EXIT_SUCCESS
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int /*<<< orphan*/ test2(int);
int main(int argc, char *argv[]) {
  int size = 64;
  if (argc == 2)
    sscanf(argv[1], "%d", &size);
  while (1) {
    test2(size);
    printf("done!\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x40,-0x14(%rbp)
cmpl   $0x2,-0x8(%rbp)
jne    116f <main+0x3f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe9a(%rip),%rsi
lea    -0x14(%rbp),%rdx
call   1040 <sscanf@plt>
jmp    1174 <main+0x44>
mov    -0x14(%rbp),%edi
call   1050 <test2@plt>
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
jmp    1174 <main+0x44>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x40,0xc(%rsp)
cmp    $0x2,%edi
jne    1157 <main+0x27>
mov    0x8(%rsi),%rdi
lea    0xeb3(%rip),%rsi
lea    0xc(%rsp),%rdx
call   1040 <sscanf@plt>
lea    0xea5(%rip),%rbx
xchg   %ax,%ax
mov    0xc(%rsp),%edi
call   1050 <test2@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1160 <main+0x30>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [7 x i8] c"done!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 64, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 2
br i1 %8, label %9, label %14
9: ; preds = %2
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = call i32 @sscanf(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %6)
br label %14
14: ; preds = %9, %2
br label %15
15: ; preds = %14, %15
%16 = load i32, i32* %6
%17 = call i32 @test2(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %15
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [6 x i8] c"done!\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 64, i32* %3
%5 = icmp eq i32 %0, 2
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @sscanf(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
br label %10
10: ; preds = %6, %2
br label %11
11: ; preds = %10, %11
%12 = load i32, i32* %3
%13 = call i32 @test2(i32 %12)
%14 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
br label %11
}
void nseel_asm_stack_pop_fast(void) {
  __asm__("movl $0xfefefefe, %edi\n"
          "movl (%edi), %ecx\n"
          "movl %ecx, %eax\n"
          "subl $8, %ecx\n"
          "andl $0xfefefefe, %ecx\n"
          "orl $0xfefefefe, %ecx\n"
          "movl %ecx, (%edi)\n");
}


x86 assembly (clang, -O0):
<nseel_asm_stack_pop_fast>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfefefefe,%edi
mov    (%edi),%ecx
mov    %ecx,%eax
sub    $0x8,%ecx
and    $0xfefefefe,%ecx
or     $0xfefefefe,%ecx
mov    %ecx,(%edi)
pop    %rbp
ret

x86 assembly (clang, -O2):
<nseel_asm_stack_pop_fast>:
mov    $0xfefefefe,%edi
mov    (%edi),%ecx
mov    %ecx,%eax
sub    $0x8,%ecx
and    $0xfefefefe,%ecx
or     $0xfefefefe,%ecx
mov    %ecx,(%edi)
ret

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

LLVM IR (-O2):
define void @nseel_asm_stack_pop_fast() {
tail call void asm sideeffect "movl $$0xfefefefe, %edi\0Amovl (%edi), %ecx\0Amovl %ecx, %eax\0Asubl $$8, %ecx\0Aandl $$0xfefefefe, %ecx\0Aorl $$0xfefefefe, %ecx\0Amovl %ecx, (%edi)\0A", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Puts(char *);
void term_beep(void) { Puts("\007"); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"\07\00"
define void @term_beep() {
%1 = call i32 @Puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\07\00"
define void @term_beep() {
%1 = tail call i32 @Puts(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
unsigned int shift_rotate(unsigned int val, unsigned int n) {
  n = n % (sizeof(unsigned int) * 8);
  return (val << n) | (val >> (sizeof(unsigned int) * 8 - n));
}


x86 assembly (clang, -O0):
<shift_rotate>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1f,%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    %ecx,%esi
mov    $0x20,%ecx
sub    %rsi,%rcx
shr    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_rotate>:
mov    %esi,%ecx
mov    %edi,%eax
rol    %cl,%eax
ret

LLVM IR (-O0):
define i32 @shift_rotate(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 = zext i32 %5 to i64
%7 = urem i64 %6, 32
%8 = trunc i64 %7 to i32
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = shl i32 %9, %10
%12 = load i32, i32* %3
%13 = load i32, i32* %4
%14 = zext i32 %13 to i64
%15 = sub i64 32, %14
%16 = trunc i64 %15 to i32
%17 = lshr i32 %12, %16
%18 = or i32 %11, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @shift_rotate(i32 %0, i32 %1) {
%3 = tail call i32 @llvm.fshl.i32(i32 %0, i32 %0, i32 %1)
ret i32 %3
}
void BSP_InitBoard(void) {}


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

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

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

LLVM IR (-O2):
define void @BSP_InitBoard() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ simulador();
int main() {
  printf("MAIN\n\n");
  simulador();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1040 <simulador@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"MAIN\0A\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @simulador()
ret i32 0
}

LLVM IR (-O2):
@str = [6 x i8] c"MAIN\0A\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @simulador()
ret i32 0
}
void ff_hevc_put_hevc_uni_w_epel_h6_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_epel_h6_8_sse4() {
ret void
}
unsigned int easyencrypt(char c) { return c + 1; }


x86 assembly (clang, -O0):
<easyencrypt>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @easyencrypt(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = add nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @easyencrypt(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add nsw i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ put_request_item();
int /*<<< orphan*/ put_request_mnstr();
void put_request_all_obj(void) {
  put_request_item();
  put_request_mnstr();
}


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

x86 assembly (clang, -O2):
<put_request_all_obj>:
push   %rax
xor    %eax,%eax
call   1040 <put_request_item@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <put_request_mnstr@plt>

LLVM IR (-O0):
define void @put_request_all_obj() {
%1 = call i32 (...) @put_request_item()
%2 = call i32 (...) @put_request_mnstr()
ret void
}

LLVM IR (-O2):
define void @put_request_all_obj() {
%1 = tail call i32 (...) @put_request_item()
%2 = tail call i32 (...) @put_request_mnstr()
ret void
}
/* Type definitions */
struct notifier_block {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sc1200wdt_stop();
int sc1200wdt_notify_sys(struct notifier_block *this, unsigned long code,
                         void *unused) {
  {
    if (code == 1UL) {
      sc1200wdt_stop();
    } else if (code == 2UL) {
      sc1200wdt_stop();
    }
    return (0);
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x1,-0x10(%rbp)
jne    113b <sc1200wdt_notify_sys+0x2b>
mov    $0x0,%al
call   1030 <sc1200wdt_stop@plt>
jmp    1152 <sc1200wdt_notify_sys+0x42>
cmpq   $0x2,-0x10(%rbp)
jne    114d <sc1200wdt_notify_sys+0x3d>
mov    $0x0,%al
call   1030 <sc1200wdt_stop@plt>
jmp    1152 <sc1200wdt_notify_sys+0x42>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
add    $0xffffffffffffffff,%rsi
cmp    $0x1,%rsi
ja     1126 <sc1200wdt_notify_sys+0x16>
push   %rax
xor    %eax,%eax
call   1030 <sc1200wdt_stop@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.notifier_block = type { i32 }
define i32 @sc1200wdt_notify_sys(%struct.notifier_block* %0, i64 %1, i8* %2) {
%4 = alloca %struct.notifier_block*
%5 = alloca i64
%6 = alloca i8*
store %struct.notifier_block* %0, %struct.notifier_block** %4
store i64 %1, i64* %5
store i8* %2, i8** %6
%7 = load i64, i64* %5
%8 = icmp eq i64 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = call i32 (...) @sc1200wdt_stop()
br label %17
11: ; preds = %3
%12 = load i64, i64* %5
%13 = icmp eq i64 %12, 2
br i1 %13, label %14, label %16
14: ; preds = %11
%15 = call i32 (...) @sc1200wdt_stop()
br label %16
16: ; preds = %14, %11
br label %17
17: ; preds = %16, %9
ret i32 0
}

LLVM IR (-O2):
%struct.notifier_block = type { i32 }
define i32 @sc1200wdt_notify_sys(%struct.notifier_block* nocapture readnone %0, i64 %1, i8* nocapture readnone %2) {
%4 = add i64 %1, -1
%5 = icmp ult i64 %4, 2
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @sc1200wdt_stop()
br label %8
8: ; preds = %3, %6
ret i32 0
}
void os_arg_fixup(argcp, argvp) int *argcp;
char ***argvp;
{ return; }


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

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

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

LLVM IR (-O2):
define void @os_arg_fixup(i32* nocapture %0, i8*** nocapture %1) {
ret void
}
/* Type definitions */
struct timespec {
  int /*<<< orphan*/ tv_nsec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void timespec_print(struct timespec tp) {
  printf("Timespec[%lu,%lu]\n", tp.tv_sec, tp.tv_nsec);
}


x86 assembly (clang, -O0):
<timespec_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed7(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timespec_print>:
mov    %rdi,%rsi
shr    $0x20,%rsi
lea    0xee2(%rip),%rax
mov    %edi,%edx
mov    %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@.str = [19 x i8] c"Timespec[%lu,%lu]\0A\00"
define void @timespec_print(i64 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i64*
store i64 %0, i64* %3
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 1
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"Timespec[%lu,%lu]\0A\00"
define void @timespec_print(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = lshr i64 %0, 32
%4 = trunc i64 %3 to i32
%5 = tail call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %2)
ret void
}
char *StripSpace(str)
char *str;
{
  static char strBuf[1024];
  str_stripspc_copy(strBuf, str);
  return strBuf;
}


x86 assembly (clang, -O0):
<StripSpace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0x2f19(%rip),%rdi
mov    $0x0,%al
call   1030 <str_stripspc_copy@plt>
lea    0x2f0b(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StripSpace>:
push   %rbx
mov    %rdi,%rsi
lea    0x2f25(%rip),%rbx
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <str_stripspc_copy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@StripSpace.strBuf = internal global [1024 x i8] zeroinitializer
define i8* @StripSpace(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @str_stripspc_copy to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @StripSpace.strBuf, i64 0, i64 0), i8* %3)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @StripSpace.strBuf, i64 0, i64 0)
}

LLVM IR (-O2):
@StripSpace.strBuf = internal global [1024 x i8] zeroinitializer
define i8* @StripSpace(i8* %0) {
%2 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @str_stripspc_copy to i32 (i8*, i8*, ...)*)(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @StripSpace.strBuf, i64 0, i64 0), i8* %0)
ret i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @StripSpace.strBuf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test_add_heap();
int /*<<< orphan*/ test_create_del();
int /*<<< orphan*/ test_heap_sort();
int /*<<< orphan*/ test_insert_many();
int /*<<< orphan*/ test_insert_one();
int /*<<< orphan*/ test_peek_poll();
int main(void) {
  test_create_del();
  test_insert_one();
  test_insert_many();
  test_peek_poll();
  test_heap_sort();
  test_add_heap();
  printf("----------------\nall tests passed\n----------------\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <test_create_del@plt>
mov    $0x0,%al
call   1060 <test_insert_one@plt>
mov    $0x0,%al
call   1090 <test_insert_many@plt>
mov    $0x0,%al
call   1030 <test_peek_poll@plt>
mov    $0x0,%al
call   1080 <test_heap_sort@plt>
mov    $0x0,%al
call   1070 <test_add_heap@plt>
lea    0xe50(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <test_create_del@plt>
xor    %eax,%eax
call   1060 <test_insert_one@plt>
xor    %eax,%eax
call   1090 <test_insert_many@plt>
xor    %eax,%eax
call   1040 <test_peek_poll@plt>
xor    %eax,%eax
call   1080 <test_heap_sort@plt>
xor    %eax,%eax
call   1070 <test_add_heap@plt>
lea    0xe5e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [52 x i8] c"----------------\0Aall tests passed\0A----------------\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @test_create_del()
%3 = call i32 (...) @test_insert_one()
%4 = call i32 (...) @test_insert_many()
%5 = call i32 (...) @test_peek_poll()
%6 = call i32 (...) @test_heap_sort()
%7 = call i32 (...) @test_add_heap()
%8 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [51 x i8] c"----------------\0Aall tests passed\0A----------------\00"
define i32 @main() {
%1 = tail call i32 (...) @test_create_del()
%2 = tail call i32 (...) @test_insert_one()
%3 = tail call i32 (...) @test_insert_many()
%4 = tail call i32 (...) @test_peek_poll()
%5 = tail call i32 (...) @test_heap_sort()
%6 = tail call i32 (...) @test_add_heap()
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int camera_is_locked();
int level_is_camera_locked() { return camera_is_locked(); }


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

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

LLVM IR (-O0):
define i32 @level_is_camera_locked() {
%1 = call i32 (...) @camera_is_locked()
ret i32 %1
}

LLVM IR (-O2):
define i32 @level_is_camera_locked() {
%1 = tail call i32 (...) @camera_is_locked()
ret i32 %1
}
void XAllocStandardColormap() {}


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

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

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

LLVM IR (-O2):
define void @XAllocStandardColormap() {
ret void
}
/* Variables and functions */
int getopenobj();
int getope_() { return (getopenobj()); }


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

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

LLVM IR (-O0):
define i32 @getope_() {
%1 = call i32 (...) @getopenobj()
ret i32 %1
}

LLVM IR (-O2):
define i32 @getope_() {
%1 = tail call i32 (...) @getopenobj()
ret i32 %1
}
/* Type definitions */
struct trackDb {
  int dummy;
};

/* Variables and functions */
int trackDbSettingClosestToHomeOn(struct trackDb *, char *);
int isCustomComposite(struct trackDb *tdb) {
  return trackDbSettingClosestToHomeOn(tdb, "customComposite");
}


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

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

LLVM IR (-O0):
%struct.trackDb = type { i32 }
@.str = [16 x i8] c"customComposite\00"
define i32 @isCustomComposite(%struct.trackDb* %0) {
%2 = alloca %struct.trackDb*
store %struct.trackDb* %0, %struct.trackDb** %2
%3 = load %struct.trackDb*, %struct.trackDb** %2
%4 = call i32 @trackDbSettingClosestToHomeOn(%struct.trackDb* %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}

LLVM IR (-O2):
%struct.trackDb = type { i32 }
@.str = [16 x i8] c"customComposite\00"
define i32 @isCustomComposite(%struct.trackDb* %0) {
%2 = tail call i32 @trackDbSettingClosestToHomeOn(%struct.trackDb* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, long);
void uncompress(unsigned char *output, long *old_size, unsigned char *input,
                long input_size) {
  *old_size = input_size;
  memcpy(output, input, input_size * sizeof(unsigned char));
}


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

x86 assembly (clang, -O2):
<uncompress>:
mov    %rcx,(%rsi)
mov    %rdx,%rsi
mov    %rcx,%rdx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @uncompress(i8* %0, i64* %1, i8* %2, i64 %3) {
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i8*
%8 = alloca i64
store i8* %0, i8** %5
store i64* %1, i64** %6
store i8* %2, i8** %7
store i64 %3, i64* %8
%9 = load i64, i64* %8
%10 = load i64*, i64** %6
store i64 %9, i64* %10
%11 = load i8*, i8** %5
%12 = load i8*, i8** %7
%13 = load i64, i64* %8
%14 = mul i64 %13, 1
%15 = call i32 @memcpy(i8* %11, i8* %12, i64 %14)
ret void
}

LLVM IR (-O2):
define void @uncompress(i8* %0, i64* nocapture writeonly %1, i8* %2, i64 %3) {
store i64 %3, i64* %1
%5 = tail call i32 @memcpy(i8* %0, i8* %2, i64 %3)
ret void
}
/* Variables and functions */
int strtoul(char *, int /*<<< orphan*/ *, int);
int test(void) {
  int ret;
  ret = strtoul("42", NULL, 10);
  return ret;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   1030 <strtoul@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
lea    0xee9(%rip),%rdi
xor    %esi,%esi
mov    $0xa,%edx
jmp    1030 <strtoul@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"42\00"
define i32 @test() {
%1 = alloca i32
%2 = call i32 @strtoul(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* null, i32 10)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [3 x i8] c"42\00"
define i32 @test() {
%1 = tail call i32 @strtoul(i8* nocapture getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* null, i32 10)
ret i32 %1
}
void Destroy2DCharArray(char **array, const int rows) {
  for (int row = 0; row < rows; row++) {
    char *current = array[row];
    free(current);
  }
  free(array);
}


x86 assembly (clang, -O0):
<Destroy2DCharArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <Destroy2DCharArray+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <Destroy2DCharArray+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Destroy2DCharArray>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <Destroy2DCharArray+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <Destroy2DCharArray+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @Destroy2DCharArray(i8** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = bitcast i8** %0 to i8*
tail call void @free(i8* %7)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %12, %8 ]
%10 = getelementptr inbounds i8*, i8** %0, i64 %9
%11 = load i8*, i8** %10
tail call void @free(i8* %11)
%12 = add nuw nsw i64 %9, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %8
}
void wait_RnB() {
  while (!((*(volatile unsigned char *)0x70200028) & (0x1)))
    ;
}


x86 assembly (clang, -O0):
<wait_RnB>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <wait_RnB+0x9>
mov    $0x70200028,%eax
mov    (%rax),%al
movzbl %al,%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112b <wait_RnB+0x2b>
jmp    1130 <wait_RnB+0x30>
jmp    1109 <wait_RnB+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait_RnB>:
testb  $0x1,0x70200028
01
je     1100 <wait_RnB>
ret

LLVM IR (-O0):
define void @wait_RnB() {
br label %1
1: ; preds = %7, %0
%2 = load volatile i8, i8* inttoptr (i64 1881145384 to i8*)
%3 = zext i8 %2 to i32
%4 = and i32 %3, 1
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
br i1 %6, label %7, label %8
7: ; preds = %1
br label %1
8: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @wait_RnB() {
br label %1
1: ; preds = %1, %0
%2 = load volatile i8, i8* inttoptr (i64 1881145384 to i8*)
%3 = and i8 %2, 1
%4 = icmp eq i8 %3, 0
br i1 %4, label %1, label %5
5: ; preds = %1
ret void
}
int tocol(int idx) { return idx % (3 * 3); }


x86 assembly (clang, -O0):
<tocol>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x9,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tocol>:
movslq %edi,%rax
imul   $0x38e38e39,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x21,%rcx
add    %edx,%ecx
lea    (%rcx,%rcx,8),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @tocol(i32 %0) {
%2 = srem i32 %0, 9
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exitTrain(int /*<<< orphan*/);
int /*<<< orphan*/ initTrain(char const *);
void processTrain(const char *file) {
  initTrain(file);
  exitTrain(0);
}


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

x86 assembly (clang, -O2):
<processTrain>:
push   %rax
call   1030 <initTrain@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <exitTrain@plt>

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

LLVM IR (-O2):
define void @processTrain(i8* %0) {
%2 = tail call i32 @initTrain(i8* %0)
%3 = tail call i32 @exitTrain(i32 0)
ret void
}
int get_offset_row(int offset) { return offset / (2 * 80); }


x86 assembly (clang, -O0):
<get_offset_row>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xa0,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_offset_row>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x26,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @get_offset_row(i32 %0) {
%2 = sdiv i32 %0, 160
ret i32 %2
}