xunge/DecIR huggingface dataset:
int test_imm_73int8_reg(signed char val) {
  return ((val) & (-0x73 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_73int8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffff8d,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_73int8_reg>:
test   $0x8d,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_73int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -115
%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_73int8_reg(i8 signext %0) {
%2 = and i8 %0, -115
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int HelpItem96(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem96() {
ret i32 0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ASSERT(int);
void SysTickPeriodSet(uint32_t ui32Period) {
  ASSERT((ui32Period > 0) && (ui32Period <= 16777216));
  (*((volatile uint32_t *)(0xE000E014))) = ui32Period - 1;
}


x86 assembly (clang, -O0):
<SysTickPeriodSet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jle    1137 <SysTickPeriodSet+0x27>
cmpl   $0x1000000,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <ASSERT@plt>
mov    -0x4(%rbp),%ecx
sub    $0x1,%ecx
mov    $0xe000e014,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysTickPeriodSet>:
push   %rbx
mov    %edi,%ebx
add    $0xffffffff,%ebx
xor    %edi,%edi
cmp    $0x1000000,%ebx
setb   %dil
call   1030 <ASSERT@plt>
mov    $0xe000e014,%eax
mov    %ebx,(%rax)
pop    %rbx
ret

LLVM IR (-O0):
define void @SysTickPeriodSet(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 16777216
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i32
%11 = call i32 @ASSERT(i32 %10)
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, 1
store volatile i32 %13, i32* inttoptr (i64 3758153748 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysTickPeriodSet(i32 %0) {
%2 = add i32 %0, -1
%3 = icmp ult i32 %2, 16777216
%4 = zext i1 %3 to i32
%5 = tail call i32 @ASSERT(i32 %4)
store volatile i32 %2, i32* inttoptr (i64 3758153748 to i32*)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uid_t;
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ errno;
int open(char const *, int /*<<< orphan*/);
int chown(const char *path, uid_t owner, gid_t group) {
  int i;
  i = open(path, O_RDONLY);
  if (i < 0) {
    errno = ENOENT;
    return -1;
  }
  close(i);
  return 0;
}


x86 assembly (clang, -O0):
<chown>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    116f <chown+0x4f>
mov    0x2e70(%rip),%rax
mov    (%rax),%ecx
mov    0x2e77(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    117e <chown+0x5e>
mov    -0x1c(%rbp),%edi
call   1030 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chown>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1040 <open@plt>
test   %eax,%eax
js     113e <chown+0x1e>
mov    %eax,%edi
call   1030 <close@plt>
xor    %eax,%eax
pop    %rcx
ret
mov    0x2e83(%rip),%rax
mov    (%rax),%eax
mov    0x2e8a(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@O_RDONLY = global i32 0
@ENOENT = global i32 0
@errno = global i32 0
define i32 @chown(i8* nocapture %0, i32 %1, i32 %2) {
%4 = load i32, i32* @O_RDONLY
%5 = tail call i32 @open(i8* %0, i32 %4)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = load i32, i32* @ENOENT
store i32 %8, i32* @errno
br label %11
9: ; preds = %3
%10 = tail call i32 @close(i32 %5)
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ -1, %7 ], [ 0, %9 ]
ret i32 %12
}
int common_sockfd_family(int sockfd) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @common_sockfd_family(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int inb(int);
int SO(void) { return ((inb(0x379) >> 7) & 0x1) ^ 0x1; }


x86 assembly (clang, -O0):
<SO>:
push   %rbp
mov    %rsp,%rbp
mov    $0x379,%edi
call   1030 <inb@plt>
sar    $0x7,%eax
and    $0x1,%eax
xor    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SO>:
push   %rax
mov    $0x379,%edi
call   1030 <inb@plt>
xor    %ecx,%ecx
test   $0x80,%al
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @SO() {
%1 = call i32 @inb(i32 889)
%2 = ashr i32 %1, 7
%3 = and i32 %2, 1
%4 = xor i32 %3, 1
ret i32 %4
}

LLVM IR (-O2):
define i32 @SO() {
%1 = tail call i32 @inb(i32 889)
%2 = lshr i32 %1, 7
%3 = and i32 %2, 1
%4 = xor i32 %3, 1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;
typedef int /*<<< orphan*/ int32_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/ *);
unsigned int zipIntSize(unsigned char encoding) {
  switch (encoding) {
  case (0xc0 | 0 << 4):
    return sizeof(int16_t);
  case (0xc0 | 1 << 4):
    return sizeof(int32_t);
  case (0xc0 | 2 << 4):
    return sizeof(int64_t);
  }
  assert(NULL);
  return 0;
}


x86 assembly (clang, -O0):
<zipIntSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movzbl -0x5(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0xc0,%eax
je     115b <zipIntSize+0x4b>
jmp    1135 <zipIntSize+0x25>
mov    -0xc(%rbp),%eax
sub    $0xd0,%eax
je     1167 <zipIntSize+0x57>
jmp    1148 <zipIntSize+0x38>
mov    -0xc(%rbp),%eax
sub    $0xe0,%eax
je     1173 <zipIntSize+0x63>
jmp    117f <zipIntSize+0x6f>
movl   $0x4,-0x4(%rbp)
jmp    118f <zipIntSize+0x7f>
movl   $0x4,-0x4(%rbp)
jmp    118f <zipIntSize+0x7f>
movl   $0x4,-0x4(%rbp)
jmp    118f <zipIntSize+0x7f>
xor    %eax,%eax
mov    %eax,%edi
call   1030 <assert@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zipIntSize>:
push   %rbx
add    $0x40,%dil
cmp    $0x20,%dil
ja     1134 <zipIntSize+0x24>
mov    $0x4,%ebx
movzbl %dil,%eax
movabs $0x100010001,%rcx
bt     %rax,%rcx
jb     113d <zipIntSize+0x2d>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <assert@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @zipIntSize(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
switch i32 %5, label %9 [
i32 192, label %6
i32 208, label %7
i32 224, label %8
]
6: ; preds = %1
store i32 4, i32* %2
br label %11
7: ; preds = %1
store i32 4, i32* %2
br label %11
8: ; preds = %1
store i32 4, i32* %2
br label %11
9: ; preds = %1
%10 = call i32 @assert(i32* null)
store i32 0, i32* %2
br label %11
11: ; preds = %9, %8, %7, %6
%12 = load i32, i32* %2
ret i32 %12
}

LLVM IR (-O2):
define i32 @zipIntSize(i8 zeroext %0) {
switch i8 %0, label %2 [
i8 -64, label %4
i8 -48, label %4
i8 -32, label %4
]
2: ; preds = %1
%3 = tail call i32 @assert(i32* null)
br label %4
4: ; preds = %1, %1, %1, %2
%5 = phi i32 [ 0, %2 ], [ 4, %1 ], [ 4, %1 ], [ 4, %1 ]
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ empty_log(char *);
void d_time_free() { empty_log("time_free\n"); }


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

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

LLVM IR (-O0):
@.str = [11 x i8] c"time_free\0A\00"
define void @d_time_free() {
%1 = call i32 @empty_log(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"time_free\0A\00"
define void @d_time_free() {
%1 = tail call i32 @empty_log(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
size_t fwrite(void const *, int, size_t, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
void xwrite(const void *buf, size_t n) {
  do {
    if (fwrite(buf, 1, n, stdout) != n)
      exit(1);
  } while (0);
}


x86 assembly (clang, -O0):
<xwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    0x2ea1(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
call   1040 <fwrite@plt>
cmp    -0x10(%rbp),%rax
je     115f <xwrite+0x3f>
mov    $0x1,%edi
call   1030 <exit@plt>
jmp    1164 <xwrite+0x44>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xwrite>:
push   %rbx
mov    %rsi,%rbx
mov    0x2eb5(%rip),%rax
mov    (%rax),%ecx
mov    $0x1,%esi
mov    %rbx,%rdx
call   1040 <fwrite@plt>
cmp    %rbx,%rax
jne    1141 <xwrite+0x21>
pop    %rbx
ret
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
@stdout = global i32 0
define void @xwrite(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
br label %5
5: ; preds = %2
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = load i32, i32* @stdout
%9 = call i64 @fwrite(i8* %6, i32 1, i64 %7, i32 %8)
%10 = load i64, i64* %4
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %5
%13 = call i32 @exit(i32 1)
unreachable
14: ; preds = %5
br label %15
15: ; preds = %14
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
define void @xwrite(i8* %0, i64 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i64 @fwrite(i8* %0, i32 1, i64 %1, i32 %3)
%5 = icmp eq i64 %4, %1
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
void multiplicacao(void *num1, void *num2) {
  int *pnum1 = (int *)num1;
  int *pnum2 = (int *)num2;
  *pnum2 = *pnum1 * *pnum2;
}


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

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

LLVM IR (-O0):
define void @multiplicacao(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i32*
store i32* %8, i32** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i32*
store i32* %10, i32** %6
%11 = load i32*, i32** %5
%12 = load i32, i32* %11
%13 = load i32*, i32** %6
%14 = load i32, i32* %13
%15 = mul nsw i32 %12, %14
%16 = load i32*, i32** %6
store i32 %15, i32* %16
ret void
}

LLVM IR (-O2):
define void @multiplicacao(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, %5
store i32 %7, i32* %4
ret void
}
void glNormal3f(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glNormal3f() {
ret void
}
unsigned int pointer_hash(void *location) {
  return (unsigned int)(unsigned long)location;
}


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

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

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

LLVM IR (-O2):
define i32 @pointer_hash(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
int fun352() { return 352; }


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

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

LLVM IR (-O0):
define i32 @fun352() {
ret i32 352
}

LLVM IR (-O2):
define i32 @fun352() {
ret i32 352
}
int angel_sysctl_create(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @angel_sysctl_create() {
ret i32 0
}
char *stpcpy(dest, src)
char *dest;
const char *src;
{
  while ((*dest++ = *src++) != '\0')
    ;
  return dest - 1;
}


x86 assembly (clang, -O0):
<stpcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     113f <stpcpy+0x3f>
jmp    110c <stpcpy+0xc>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stpcpy>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl (%rsi),%ecx
add    $0x1,%rsi
mov    %cl,0x1(%rax)
add    $0x1,%rax
test   %cl,%cl
jne    1110 <stpcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @stpcpy(i8* writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %8, %3 ]
%5 = phi i8* [ %1, %2 ], [ %6, %3 ]
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = load i8, i8* %5
%8 = getelementptr inbounds i8, i8* %4, i64 1
store i8 %7, i8* %4
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %4
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t numLength(uint32_t i) {
  uint32_t rem;
  uint32_t base = 10;
  uint32_t n = 1;
  while (i % base != i) {
    base *= 10;
    n++;
  }
  return n;
}


x86 assembly (clang, -O0):
<numLength>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    -0x4(%rbp),%edx
je     113a <numLength+0x3a>
imul   $0xa,-0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1115 <numLength+0x15>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<numLength>:
movslq %edi,%rax
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
mov    $0x1,%ecx
test   %eax,%eax
je     1141 <numLength+0x41>
mov    $0xa,%esi
mov    $0x1,%ecx
nop
add    %esi,%esi
lea    (%rsi,%rsi,4),%esi
add    $0x1,%ecx
mov    %edi,%eax
cltd
idiv   %esi
cmp    %edi,%edx
jne    1130 <numLength+0x30>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @numLength(i32 %0) {
%2 = srem i32 %0, 10
%3 = icmp eq i32 %2, %0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 1, %1 ]
%6 = phi i32 [ %7, %4 ], [ 10, %1 ]
%7 = mul nuw nsw i32 %6, 10
%8 = add nuw nsw i32 %5, 1
%9 = srem i32 %0, %7
%10 = icmp eq i32 %9, %0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %12
}
/* Variables and functions */
unsigned int fib(int);
int main() {
  unsigned f = fib(20);
  return !(f == 6765);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x14,%edi
call   1030 <fib@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x1a6d,-0x8(%rbp)
sete   %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x14,%edi
call   1030 <fib@plt>
xor    %ecx,%ecx
cmp    $0x1a6d,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @fib(i32 20)
store i32 %3, i32* %2
%4 = load i32, i32* %2
%5 = icmp eq i32 %4, 6765
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @fib(i32 20)
%2 = icmp ne i32 %1, 6765
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  int *p = NULL;
  *p = 10;
  printf("%d", *p);
  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)
movq   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0xa,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [3 x i8] c"%d\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* null, i32** %6
%7 = load i32*, i32** %6
store i32 10, i32* %7
%8 = load i32*, i32** %6
%9 = load i32, i32* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, void *, int);
void convertFloatToByteArray(float value, char *byteArray) {
  memcpy(byteArray, (void *)&value, sizeof(int));
}


x86 assembly (clang, -O0):
<convertFloatToByteArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x4(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @convertFloatToByteArray(float %0, i8* %1) {
%3 = alloca float
store float %0, float* %3
%4 = bitcast float* %3 to i8*
%5 = call i32 @memcpy(i8* %1, i8* %4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ sleep(int);
void think(int i) {
  printf("Philosopher %d thinking\n", i);
  sleep(2);
  printf("Philosopher %d done thinking\n", i);
}


x86 assembly (clang, -O0):
<think>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
mov    -0x4(%rbp),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<think>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <sleep@plt>
lea    0xed7(%rip),%rdi
mov    %ebx,%esi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [25 x i8] c"Philosopher %d thinking\0A\00"
@.str.1 = [30 x i8] c"Philosopher %d done thinking\0A\00"
define void @think(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @sleep(i32 2)
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [25 x i8] c"Philosopher %d thinking\0A\00"
@.str.1 = [30 x i8] c"Philosopher %d done thinking\0A\00"
define void @think(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @sleep(i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ edrc(int /*<<< orphan*/ *, int, int, int *, int *, int);
void edr(uint16_t *in, int w, int h, int *pemin, int *pemax) {
  edrc(in, w, h, pemin, pemax, 16);
}


x86 assembly (clang, -O0):
<edr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
mov    $0x10,%r9d
call   1030 <edrc@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<edr>:
mov    $0x10,%r9d
jmp    1030 <edrc@plt>

LLVM IR (-O0):
define void @edr(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 = load i32, i32* %8
%14 = load i32*, i32** %9
%15 = load i32*, i32** %10
%16 = call i32 @edrc(i32* %11, i32 %12, i32 %13, i32* %14, i32* %15, i32 16)
ret void
}

LLVM IR (-O2):
define void @edr(i32* %0, i32 %1, i32 %2, i32* %3, i32* %4) {
%6 = tail call i32 @edrc(i32* %0, i32 %1, i32 %2, i32* %3, i32* %4, i32 16)
ret void
}
/* Type definitions */
typedef int dev_t;

/* Variables and functions */
dev_t dev_from_mount_options(char const *mount_options) {
  (void)mount_options;
  return -1;
}


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

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

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

LLVM IR (-O2):
define i32 @dev_from_mount_options(i8* nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
struct index_packet {
  int dummy;
};

/* Variables and functions */
int pgread_big_endian(unsigned char *, struct index_packet *);
int pgread_little_endian(unsigned char *, struct index_packet *);
int blockpack__pgread(unsigned char *page, struct index_packet *target,
                      int little_endian) {
  if (little_endian)
    return pgread_little_endian(page, target);
  else
    return pgread_big_endian(page, target);
}


x86 assembly (clang, -O0):
<blockpack__pgread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1152 <blockpack__pgread+0x32>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <pgread_little_endian@plt>
mov    %eax,-0x4(%rbp)
jmp    1162 <blockpack__pgread+0x42>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <pgread_big_endian@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<blockpack__pgread>:
test   %edx,%edx
je     1129 <blockpack__pgread+0x9>
jmp    1040 <pgread_little_endian@plt>
jmp    1030 <pgread_big_endian@plt>

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

LLVM IR (-O2):
%struct.index_packet = type { i32 }
define i32 @blockpack__pgread(i8* %0, %struct.index_packet* %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @pgread_little_endian(i8* %0, %struct.index_packet* %1)
br label %9
7: ; preds = %3
%8 = tail call i32 @pgread_big_endian(i8* %0, %struct.index_packet* %1)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t ipower(int64_t base, int64_t exp) {
  int64_t result = 1;
  while (exp) {
    if (exp & 1) {
      result *= base;
    }
    exp >>= 1;
    base *= base;
  }
  return result;
}


x86 assembly (clang, -O0):
<ipower>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114c <ipower+0x4c>
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
je     1134 <ipower+0x34>
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1111 <ipower+0x11>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ipower>:
test   %esi,%esi
je     113a <ipower+0x3a>
mov    $0x1,%r8d
mov    $0x1,%eax
mov    %esi,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
test   $0x1,%sil
mov    %edi,%ecx
cmove  %r8d,%ecx
imul   %ecx,%eax
sar    %edx
imul   %edi,%edi
cmp    $0x1,%esi
mov    %edx,%esi
ja     1120 <ipower+0x20>
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @ipower(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 1, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 0
br i1 %8, label %9, label %23
9: ; preds = %6
%10 = load i32, i32* %4
%11 = and i32 %10, 1
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %9
%14 = load i32, i32* %3
%15 = load i32, i32* %5
%16 = mul nsw i32 %15, %14
store i32 %16, i32* %5
br label %17
17: ; preds = %13, %9
%18 = load i32, i32* %4
%19 = ashr i32 %18, 1
store i32 %19, i32* %4
%20 = load i32, i32* %3
%21 = load i32, i32* %3
%22 = mul nsw i32 %21, %20
store i32 %22, i32* %3
br label %6
23: ; preds = %6
%24 = load i32, i32* %5
ret i32 %24
}

LLVM IR (-O2):
define i32 @ipower(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %15, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ 1, %2 ]
%6 = phi i32 [ %12, %4 ], [ %1, %2 ]
%7 = phi i32 [ %13, %4 ], [ %0, %2 ]
%8 = and i32 %6, 1
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 1, i32 %7
%11 = mul nsw i32 %10, %5
%12 = ashr i32 %6, 1
%13 = mul nsw i32 %7, %7
%14 = icmp ult i32 %6, 2
br i1 %14, label %15, label %4
15: ; preds = %4, %2
%16 = phi i32 [ 1, %2 ], [ %11, %4 ]
ret i32 %16
}
void dummy_select_window(int id) { id = id; }


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

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

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

LLVM IR (-O2):
define void @dummy_select_window(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void free_convert_matrix(double **b, long nrl, long nrh, long ncl, long nch) {
  free((char *)(b + nrl - 1));
}


x86 assembly (clang, -O0):
<free_convert_matrix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
add    $0xfffffffffffffff8,%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_convert_matrix>:
lea    (%rdi,%rsi,8),%rdi
add    $0xfffffffffffffff8,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_convert_matrix(double** %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = alloca double**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
store double** %0, double*** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64 %4, i64* %10
%11 = load double**, double*** %6
%12 = load i64, i64* %7
%13 = getelementptr inbounds double*, double** %11, i64 %12
%14 = getelementptr inbounds double*, double** %13, i64 -1
%15 = bitcast double** %14 to i8*
%16 = call i32 @free(i8* %15)
ret void
}

LLVM IR (-O2):
define void @free_convert_matrix(double** nocapture %0, i64 %1, i64 %2, i64 %3, i64 %4) {
%6 = getelementptr inbounds double*, double** %0, i64 %1
%7 = getelementptr inbounds double*, double** %6, i64 -1
%8 = bitcast double** %7 to i8*
%9 = tail call i32 @free(i8* %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ bishop_attacks(int, int);
void bishop_attacks_test(void **state) {
  assert_int_equal(0x0000442800284400ul,
                   bishop_attacks(0x0000000010000000ul, 0x0000441111114400ul));
}


x86 assembly (clang, -O0):
<bishop_attacks_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x10000000,%edi
mov    $0x11114400,%esi
call   1030 <bishop_attacks@plt>
mov    %eax,%esi
mov    $0x284400,%edi
call   1040 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bishop_attacks_test>:
push   %rax
mov    $0x10000000,%edi
mov    $0x11114400,%esi
call   1030 <bishop_attacks@plt>
mov    $0x284400,%edi
mov    %eax,%esi
pop    %rax
jmp    1040 <assert_int_equal@plt>

LLVM IR (-O0):
define void @bishop_attacks_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @bishop_attacks(i32 268435456, i32 286344192)
%4 = call i32 @assert_int_equal(i32 2638848, i32 %3)
ret void
}

LLVM IR (-O2):
define void @bishop_attacks_test(i8** nocapture readnone %0) {
%2 = tail call i32 @bishop_attacks(i32 268435456, i32 286344192)
%3 = tail call i32 @assert_int_equal(i32 2638848, i32 %2)
ret void
}
/* Variables and functions */
int egetc();
short to16bit(int, int);
short int read16bit() {
  int c1, c2;
  c1 = egetc();
  c2 = egetc();
  return to16bit(c1, c2);
}


x86 assembly (clang, -O0):
<read16bit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <egetc@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <egetc@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <to16bit@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read16bit>:
push   %rbx
xor    %eax,%eax
call   1030 <egetc@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <egetc@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <to16bit@plt>

LLVM IR (-O0):
define signext i16 @read16bit() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @egetc()
store i32 %3, i32* %1
%4 = call i32 (...) @egetc()
store i32 %4, i32* %2
%5 = load i32, i32* %1
%6 = load i32, i32* %2
%7 = call signext i16 @to16bit(i32 %5, i32 %6)
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @read16bit() {
%1 = tail call i32 (...) @egetc()
%2 = tail call i32 (...) @egetc()
%3 = tail call signext i16 @to16bit(i32 %1, i32 %2)
ret i16 %3
}
void __asan_report_load8() {}


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

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

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

LLVM IR (-O2):
define void @__asan_report_load8() {
ret void
}
/* Variables and functions */
scalar_t__ COND_VC();
int /*<<< orphan*/ EA_AL_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_svc_8_al(void) { m68ki_write_8(EA_AL_8(), COND_VC() ? 0xff : 0); }


x86 assembly (clang, -O0):
<m68k_op_svc_8_al>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <EA_AL_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1040 <COND_VC@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_svc_8_al>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <EA_AL_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <COND_VC@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_svc_8_al() {
%1 = call i32 (...) @EA_AL_8()
%2 = call i64 (...) @COND_VC()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_svc_8_al() {
%1 = tail call i32 (...) @EA_AL_8()
%2 = tail call i64 (...) @COND_VC()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
scalar_t__ isupper(int);
tolower(int c) {
  if (isupper(c)) {
    return (c - 'A' + 'a');
  }
  return (c);
}


x86 assembly (clang, -O0):
<tolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
je     113e <tolower+0x2e>
mov    -0x8(%rbp),%eax
sub    $0x41,%eax
add    $0x61,%eax
mov    %eax,-0x4(%rbp)
jmp    1144 <tolower+0x34>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tolower>:
push   %rbx
mov    %edi,%ebx
call   1030 <isupper@plt>
lea    0x20(%rbx),%ecx
test   %rax,%rax
cmove  %ebx,%ecx
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @tolower(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @isupper(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load i32, i32* %3
%9 = sub nsw i32 %8, 65
%10 = add nsw i32 %9, 97
store i32 %10, i32* %2
br label %13
11: ; preds = %1
%12 = load i32, i32* %3
store i32 %12, i32* %2
br label %13
13: ; preds = %11, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @tolower(i32 %0) {
%2 = tail call i64 @isupper(i32 %0)
%3 = icmp eq i64 %2, 0
%4 = add nsw i32 %0, 32
%5 = select i1 %3, i32 %0, i32 %4
ret i32 %5
}
void ff_hevc_put_hevc_bi_qpel_h24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_qpel_h24_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/
_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo();
int /*<<< orphan*/ _test_pone_y_saca_deben_permitir_poner_y_sacar_elementos();
int /*<<< orphan*/ _test_vacia_debe_indicar_si_la_pila_esta_vacia();
void colae_tests() {
  _test_vacia_debe_indicar_si_la_pila_esta_vacia();
  _test_pone_y_saca_deben_permitir_poner_y_sacar_elementos();
  _test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo();
}


x86 assembly (clang, -O0):
<colae_tests>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <_test_vacia_debe_indicar_si_la_pila_esta_vacia@plt>
mov    $0x0,%al
call   1030 <_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos@plt>
mov    $0x0,%al
call   1050 <_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<colae_tests>:
push   %rax
xor    %eax,%eax
call   1040 <_test_vacia_debe_indicar_si_la_pila_esta_vacia@plt>
xor    %eax,%eax
call   1030 <_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo@plt>

LLVM IR (-O0):
define void @colae_tests() {
%1 = call i32 (...) @_test_vacia_debe_indicar_si_la_pila_esta_vacia()
%2 = call i32 (...) @_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos()
%3 = call i32 (...) @_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo()
ret void
}

LLVM IR (-O2):
define void @colae_tests() {
%1 = tail call i32 (...) @_test_vacia_debe_indicar_si_la_pila_esta_vacia()
%2 = tail call i32 (...) @_test_pone_y_saca_deben_permitir_poner_y_sacar_elementos()
%3 = tail call i32 (...) @_test_consulta_debe_permitir_consultar_un_elemento_sin_sacarlo()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SV_ReloadFilters(char const *, void *);
void SV_LoadFilters(const char *filename) {
  SV_ReloadFilters(filename, ((void *)0));
}


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

x86 assembly (clang, -O2):
<SV_LoadFilters>:
xor    %esi,%esi
jmp    1030 <SV_ReloadFilters@plt>

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

LLVM IR (-O2):
define void @SV_LoadFilters(i8* %0) {
%2 = tail call i32 @SV_ReloadFilters(i8* %0, i8* null)
ret void
}
/* Type definitions */
struct man {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ man_node(struct man const *);
int /*<<< orphan*/ print_man(int /*<<< orphan*/, int /*<<< orphan*/);
void tree_man(void *arg, const struct man *man) { print_man(man_node(man), 0); }


x86 assembly (clang, -O0):
<tree_man>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <man_node@plt>
mov    %eax,%edi
xor    %esi,%esi
call   1040 <print_man@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tree_man>:
push   %rax
mov    %rsi,%rdi
call   1030 <man_node@plt>
mov    %eax,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <print_man@plt>

LLVM IR (-O0):
%struct.man = type { i32 }
define void @tree_man(i8* %0, %struct.man* %1) {
%3 = alloca i8*
%4 = alloca %struct.man*
store i8* %0, i8** %3
store %struct.man* %1, %struct.man** %4
%5 = load %struct.man*, %struct.man** %4
%6 = call i32 @man_node(%struct.man* %5)
%7 = call i32 @print_man(i32 %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.man = type { i32 }
define void @tree_man(i8* nocapture readnone %0, %struct.man* %1) {
%3 = tail call i32 @man_node(%struct.man* %1)
%4 = tail call i32 @print_man(i32 %3, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void use(int argc) {
  if (argc == 1) {
    printf("Modo de uso:\n");
    printf("$ ./input <nome_do_arquivo>\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<use>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1157 <use+0x37>
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use>:
cmp    $0x1,%edi
je     1126 <use+0x6>
ret
push   %rax
lea    0xed2(%rip),%rdi
call   1030 <puts@plt>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"Modo de uso:\0A\00"
@.str.1 = [29 x i8] c"$ ./input <nome_do_arquivo>\0A\00"
define void @use(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 1)
unreachable
9: ; preds = %1
ret void
}

LLVM IR (-O2):
@str = [13 x i8] c"Modo de uso:\00"
@str.2 = [28 x i8] c"$ ./input <nome_do_arquivo>\00"
define void @use(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.2, i64 0, i64 0))
%6 = tail call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ default_isr();
__attribute__((weak)) void TRNG_Handler() { default_isr(); }


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

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

LLVM IR (-O0):
define weak void @TRNG_Handler() {
%1 = call i32 (...) @default_isr()
ret void
}

LLVM IR (-O2):
define weak void @TRNG_Handler() {
%1 = tail call i32 (...) @default_isr()
ret void
}
int nn_sub_ispeer(int socktype) { return socktype == (2 * 16 + 0) ? 1 : 0; }


x86 assembly (clang, -O0):
<nn_sub_ispeer>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x20,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nn_sub_ispeer>:
xor    %eax,%eax
cmp    $0x20,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @nn_sub_ispeer(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 32
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @nn_sub_ispeer(i32 %0) {
%2 = icmp eq i32 %0, 32
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ i;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int);
int main() {
  int i = 2147483644;
  while (1) {
    printf("i:0x%x,d%d,ud%u,size %d\n", i, i, i, sizeof(i));
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7ffffffc,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xeca(%rip),%rdi
mov    $0x4,%r8d
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x7ffffffc,%ebx
lea    0xee0(%rip),%r14
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
mov    %ebx,%ecx
mov    $0x4,%r8d
call   1030 <printf@plt>
add    $0x1,%ebx
jmp    1120 <main+0x10>

LLVM IR (-O0):
@.str = [25 x i8] c"i:0x%x,d%d,ud%u,size %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 2147483644, i32* %2
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* %2
%5 = load i32, i32* %2
%6 = load i32, i32* %2
%7 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6, i32 4)
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
br label %3
}

LLVM IR (-O2):
@.str = [25 x i8] c"i:0x%x,d%d,ud%u,size %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i32 [ 2147483644, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2, i32 %2, i32 4)
%4 = add nuw nsw i32 %2, 1
br label %1
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ passConstPtr(char *);
void testPassConstPointer() {
  char *string = malloc(sizeof(char) * 10);
  passConstPtr(string);
  return;
}


x86 assembly (clang, -O0):
<testPassConstPointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0xa,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <passConstPtr@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @testPassConstPointer() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 10)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @passConstPtr(i8* %3)
ret void
}

LLVM IR (-O2):
define void @testPassConstPointer() {
%1 = tail call dereferenceable_or_null(10) i8* @malloc(i32 10)
%2 = tail call i32 @passConstPtr(i8* %1)
ret void
}
void terminate_graphics(void) {}


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

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

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

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


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

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

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

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