xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint64_t;
typedef scalar_t__ B;

/* Variables and functions */
int /*<<< orphan*/ le64dec(int /*<<< orphan*/ *);
uint64_t integerify(void *B, size_t r) {
  uint8_t *X = (void *)((uintptr_t)(B) + (2 * r - 1) * 64);
  return (le64dec(X));
}


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

x86 assembly (clang, -O2):
<integerify>:
shl    $0x7,%rsi
add    %rsi,%rdi
add    $0xffffffffffffffc0,%rdi
jmp    1030 <le64dec@plt>

LLVM IR (-O0):
define i32 @integerify(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = ptrtoint i8* %6 to i64
%8 = load i64, i64* %4
%9 = mul i64 2, %8
%10 = sub i64 %9, 1
%11 = mul i64 %10, 64
%12 = add i64 %7, %11
%13 = inttoptr i64 %12 to i8*
%14 = bitcast i8* %13 to i32*
store i32* %14, i32** %5
%15 = load i32*, i32** %5
%16 = call i32 @le64dec(i32* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @integerify(i8* %0, i64 %1) {
%3 = ptrtoint i8* %0 to i64
%4 = shl i64 %1, 7
%5 = add i64 %3, -64
%6 = add i64 %5, %4
%7 = inttoptr i64 %6 to i32*
%8 = tail call i32 @le64dec(i32* %7)
ret i32 %8
}
int gcd(int a, int b) {
  if (a % b == 0)
    return b;
  return gcd(b, a % b);
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%edx
jne    1139 <gcd+0x29>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <gcd+0x3d>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,%esi
call   1030 <gcd@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %esi,%edx
mov    %edi,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %5, %3 ]
%5 = phi i32 [ %1, %2 ], [ %6, %3 ]
%6 = srem i32 %4, %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, ...);
void error(char *file, unsigned int line, char *error, char *type_error) {
  printf("error: %s:%d\n", file, line);
  printf(" -> %s:%s\n", error, type_error);
}


x86 assembly (clang, -O0):
<error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
lea    0xecb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xec3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xeda(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"error: %s:%d\0A\00"
@.str.1 = [11 x i8] c" -> %s:%s\0A\00"
define void @error(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %10)
%12 = load i8*, i8** %7
%13 = load i8*, i8** %8
%14 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"error: %s:%d\0A\00"
@.str.1 = [11 x i8] c" -> %s:%s\0A\00"
define void @error(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
%6 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %3)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int strftime(char *, int, char const *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int get_strtime(char *buf, int buflen, const char *format) {
  time_t rawtime;
  struct tm *timeinfo;
  time(&rawtime);
  timeinfo = localtime(&rawtime);
  return strftime(buf, buflen, format, timeinfo);
}


x86 assembly (clang, -O0):
<get_strtime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
call   1040 <time@plt>
lea    -0x1c(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1050 <strftime@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_strtime>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
lea    0x4(%rsp),%r15
mov    %r15,%rdi
call   1040 <time@plt>
mov    %r15,%rdi
call   1030 <localtime@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @get_strtime(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.tm*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%9 = call i32 @time(i32* %7)
%10 = call %struct.tm* @localtime(i32* %7)
store %struct.tm* %10, %struct.tm** %8
%11 = load i8*, i8** %4
%12 = load i32, i32* %5
%13 = load i8*, i8** %6
%14 = load %struct.tm*, %struct.tm** %8
%15 = call i32 @strftime(i8* %11, i32 %12, i8* %13, %struct.tm* %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define i32 @get_strtime(i8* %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = call i32 @time(i32* %4)
%7 = call %struct.tm* @localtime(i32* %4)
%8 = call i32 @strftime(i8* %0, i32 %1, i8* %2, %struct.tm* %7)
ret i32 %8
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;
typedef int /*<<< orphan*/ pthread_cond_t;

/* Variables and functions */
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex) {
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @pthread_cond_wait(i32* nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 1
}
int test_imm_21uint32_mem(unsigned int *val) {
  return ((*val) & (0x21 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_21uint32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x21,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_21uint32_mem>:
testb  $0x21,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_21uint32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 33
%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_21uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 33
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
OP(ed, d6) { illegal_2(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_2()
ret i32 undef
}
int gcd(int m, int n) {
  while (n != 0) {
    int r = m % n;
    m = n;
    n = r;
  }
  return m;
}


x86 assembly (clang, -O0):
<gcd>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <gcd+0x2f>
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    110a <gcd+0xa>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcd>:
mov    %edi,%eax
test   %esi,%esi
je     111d <gcd+0x1d>
mov    %esi,%edx
nopl   0x0(%rax,%rax,1)
mov    %edx,%ecx
cltd
idiv   %ecx
mov    %ecx,%eax
test   %edx,%edx
jne    1110 <gcd+0x10>
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @gcd(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %9, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %6, %4 ], [ %0, %2 ]
%6 = phi i32 [ %7, %4 ], [ %1, %2 ]
%7 = srem i32 %5, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %2
%10 = phi i32 [ %0, %2 ], [ %6, %4 ]
ret i32 %10
}
int mlt_version_get_major() { return 6; }


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

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

LLVM IR (-O0):
define i32 @mlt_version_get_major() {
ret i32 6
}

LLVM IR (-O2):
define i32 @mlt_version_get_major() {
ret i32 6
}
void chaz_ConfWriter_init() { return; }


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

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

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

LLVM IR (-O2):
define void @chaz_ConfWriter_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_start();
int /*<<< orphan*/ I2C_stop();
int /*<<< orphan*/ I2C_write(unsigned char);
void DS1307_settime(unsigned char hh, unsigned char mm, unsigned char ss) {
  I2C_start();
  I2C_write(0xD0);
  I2C_write(0x00);
  I2C_write(ss);
  I2C_write(mm);
  I2C_write(hh);
  I2C_stop();
}


x86 assembly (clang, -O0):
<DS1307_settime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
mov    $0x0,%al
call   1040 <I2C_start@plt>
mov    $0xd0,%edi
call   1050 <I2C_write@plt>
xor    %edi,%edi
call   1050 <I2C_write@plt>
movzbl -0x3(%rbp),%edi
call   1050 <I2C_write@plt>
movzbl -0x2(%rbp),%edi
call   1050 <I2C_write@plt>
movzbl -0x1(%rbp),%edi
call   1050 <I2C_write@plt>
mov    $0x0,%al
call   1030 <I2C_stop@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DS1307_settime>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %esi,%ebp
mov    %edi,%r14d
xor    %eax,%eax
call   1040 <I2C_start@plt>
mov    $0xd0,%edi
call   1050 <I2C_write@plt>
xor    %edi,%edi
call   1050 <I2C_write@plt>
mov    %ebx,%edi
call   1050 <I2C_write@plt>
mov    %ebp,%edi
call   1050 <I2C_write@plt>
mov    %r14d,%edi
call   1050 <I2C_write@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <I2C_stop@plt>

LLVM IR (-O0):
define void @DS1307_settime(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%7 = call i32 (...) @I2C_start()
%8 = call i32 @I2C_write(i8 zeroext -48)
%9 = call i32 @I2C_write(i8 zeroext 0)
%10 = load i8, i8* %6
%11 = call i32 @I2C_write(i8 zeroext %10)
%12 = load i8, i8* %5
%13 = call i32 @I2C_write(i8 zeroext %12)
%14 = load i8, i8* %4
%15 = call i32 @I2C_write(i8 zeroext %14)
%16 = call i32 (...) @I2C_stop()
ret void
}

LLVM IR (-O2):
define void @DS1307_settime(i8 zeroext %0, i8 zeroext %1, i8 zeroext %2) {
%4 = tail call i32 (...) @I2C_start()
%5 = tail call i32 @I2C_write(i8 zeroext -48)
%6 = tail call i32 @I2C_write(i8 zeroext 0)
%7 = tail call i32 @I2C_write(i8 zeroext %2)
%8 = tail call i32 @I2C_write(i8 zeroext %1)
%9 = tail call i32 @I2C_write(i8 zeroext %0)
%10 = tail call i32 (...) @I2C_stop()
ret void
}
void psp_video_deinit(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @kvmppc_enable_set_mode_hcall() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEif_icmple(int, int /*<<< orphan*/ *);
void code_if_icmple(int label) { appendCODE(makeCODEif_icmple(label, NULL)); }


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

x86 assembly (clang, -O2):
<code_if_icmple>:
push   %rax
xor    %esi,%esi
call   1030 <makeCODEif_icmple@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <appendCODE@plt>

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

LLVM IR (-O2):
define void @code_if_icmple(i32 %0) {
%2 = tail call i32 @makeCODEif_icmple(i32 %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  for (int i = 0; i < argc; i++) {
    printf("chickens");
  }
  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   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1153 <main+0x43>
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
jle    113d <main+0x2d>
mov    %edi,%ebx
lea    0xedf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [9 x i8] c"chickens\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 0, i32* %6
br label %7
7: ; preds = %13, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11
%14 = load i32, i32* %6
%15 = add nsw i32 %14, 1
store i32 %15, i32* %6
br label %7
16: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"chickens\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %5, label %4
4: ; preds = %5, %2
ret i32 0
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %4, label %5
}
/* Variables and functions */
scalar_t__ mem_append(unsigned char *, scalar_t__, unsigned char const *,
                      scalar_t__);
scalar_t__ strlen(char const *);
char *str_append(char *src, const char *append) {
  return (char *)mem_append((unsigned char *)src, strlen(src),
                            (const unsigned char *)append, strlen(append) + 1);
}


x86 assembly (clang, -O0):
<str_append>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    %rax,%rcx
add    $0x1,%rcx
call   1040 <mem_append@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_append>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <strlen@plt>
lea    0x1(%rax),%rcx
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <mem_append@plt>

LLVM IR (-O0):
define i8* @str_append(i8* %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 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
%8 = load i8*, i8** %4
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
%11 = add nsw i64 %10, 1
%12 = call i64 @mem_append(i8* %5, i64 %7, i8* %8, i64 %11)
%13 = inttoptr i64 %12 to i8*
ret i8* %13
}

LLVM IR (-O2):
define i8* @str_append(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = add nsw i64 %4, 1
%6 = tail call i64 @mem_append(i8* %0, i64 %3, i8* %1, i64 %5)
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ CLOCK_MONOTONIC;
int /*<<< orphan*/ clock_gettime(int /*<<< orphan*/, struct timespec *);
int _ticks(void) {
  struct timespec ts;
  clock_gettime(CLOCK_MONOTONIC, &ts);
  return (int)(ts.tv_sec * 1000 + ts.tv_nsec / 1000000);
}


x86 assembly (clang, -O0):
<_ticks>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,-0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_ticks>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    %rsp,%rsi
call   1030 <clock_gettime@plt>
imul   $0x3e8,(%rsp),%ecx
movslq 0x4(%rsp),%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rdx
shr    $0x3f,%rdx
sar    $0x32,%rax
add    %edx,%eax
add    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @_ticks() {
%1 = alloca %struct.timespec
%2 = load i32, i32* @CLOCK_MONOTONIC
%3 = call i32 @clock_gettime(i32 %2, %struct.timespec* %1)
%4 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = mul nsw i32 %5, 1000
%7 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i32 0, i32 1
%8 = load i32, i32* %7
%9 = sdiv i32 %8, 1000000
%10 = add nsw i32 %6, %9
ret i32 %10
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
@CLOCK_MONOTONIC = global i32 0
define i32 @_ticks() {
%1 = alloca %struct.timespec
%2 = bitcast %struct.timespec* %1 to i8*
%3 = load i32, i32* @CLOCK_MONOTONIC
%4 = call i32 @clock_gettime(i32 %3, %struct.timespec* %1)
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = mul nsw i32 %6, 1000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %1, i64 0, i32 1
%9 = load i32, i32* %8
%10 = sdiv i32 %9, 1000000
%11 = add nsw i32 %10, %7
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ hash_char(char *);
int /*<<< orphan*/ hash_int(int);
int /*<<< orphan*/ printf(char *, ...);
void test_hash() {
  printf("---- test_hash -----\n");
  printf("hash abc: %ld\n", hash_char("abc"));
  printf("hash 123: %ld\n", hash_int(123));
  printf("\n");
}


x86 assembly (clang, -O0):
<test_hash>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedc(%rip),%rdi
call   1050 <hash_char@plt>
mov    %eax,%esi
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x7b,%edi
call   1040 <hash_int@plt>
mov    %eax,%esi
lea    0xeb8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe95(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_hash>:
push   %rax
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
lea    0xeab(%rip),%rdi
call   1070 <hash_char@plt>
lea    0xe90(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x7b,%edi
call   1060 <hash_int@plt>
lea    0xe89(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"---- test_hash -----\0A\00"
@.str.1 = [15 x i8] c"hash abc: %ld\0A\00"
@.str.2 = [4 x i8] c"abc\00"
@.str.3 = [15 x i8] c"hash 123: %ld\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
define void @test_hash() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @hash_char(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = call i32 @hash_int(i32 123)
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c"hash abc: %ld\0A\00"
@.str.2 = [4 x i8] c"abc\00"
@.str.3 = [15 x i8] c"hash 123: %ld\0A\00"
@str = [21 x i8] c"---- test_hash -----\00"
define void @test_hash() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @hash_char(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 @hash_int(i32 123)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %4)
%6 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void call_sub(int v) { printf("%d", v); }


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

x86 assembly (clang, -O2):
<call_sub>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define void @call_sub(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @call_sub(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ xcb_window_t;
typedef int /*<<< orphan*/ xcb_timestamp_t;
typedef int /*<<< orphan*/ xcb_connection_t;

/* Variables and functions */
int /*<<< orphan*/ xembed_message_send(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                       int /*<<< orphan*/, int,
                                       int /*<<< orphan*/, int /*<<< orphan*/,
                                       int /*<<< orphan*/);
void xembed_window_deactivate(xcb_connection_t *c, xcb_window_t client,
                              xcb_timestamp_t timestamp) {
  xembed_message_send(c, client, timestamp, 2, 0, 0, 0);
}


x86 assembly (clang, -O0):
<xembed_window_deactivate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    $0x2,%ecx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <xembed_message_send@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xembed_window_deactivate>:
push   %rax
movl   $0x0,(%rsp)
mov    $0x2,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <xembed_message_send@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @xembed_window_deactivate(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @xembed_message_send(i32* %0, i32 %1, i32 %2, i32 2, i32 0, i32 0, i32 0)
ret void
}
int test_imm_24int16_mem(short *val) {
  return ((*val) & (-0x24 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_24int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffffdc,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_24int16_mem>:
movzwl (%rdi),%eax
test   $0xffdc,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_24int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -36
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int LOC2(int iy, int ix, int nx) { return (iy * nx + ix); }


x86 assembly (clang, -O0):
<LOC2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
imul   -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LOC2>:
imul   %edx,%edi
lea    (%rdi,%rsi,1),%eax
ret

LLVM IR (-O0):
define i32 @LOC2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %6
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %5
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @LOC2(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %0
%5 = add nsw i32 %4, %1
ret i32 %5
}
int rt_close_handler(void *io_ctx) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @rt_close_handler(i8* nocapture readnone %0) {
ret i32 0
}
void gdk_window_stick() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_stick() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ x;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, int);
uint16_t get_uint16(const void *p) {
  uint16_t x;
  memcpy((void *)&x, p, sizeof(x));
  return x;
}


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

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

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

LLVM IR (-O2):
define i32 @get_uint16(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @memcpy(i8* %3, i8* %0, i32 4)
%5 = load i32, i32* %2
ret i32 %5
}
int dir_find_space(unsigned char *buffer) {
  return (buffer[0] == 0xff || buffer[3] == 0);
}


x86 assembly (clang, -O0):
<dir_find_space>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%ecx
mov    $0x1,%al
cmp    $0xff,%ecx
mov    %al,-0x9(%rbp)
je     1131 <dir_find_space+0x31>
mov    -0x8(%rbp),%rax
movzbl 0x3(%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dir_find_space>:
cmpb   $0xff,(%rdi)
je     110f <dir_find_space+0xf>
xor    %eax,%eax
cmpb   $0x0,0x3(%rdi)
sete   %al
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @dir_find_space(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, -1
br i1 %3, label %9, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %0, i64 3
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = zext i1 %7 to i32
br label %9
9: ; preds = %4, %1
%10 = phi i32 [ 1, %1 ], [ %8, %4 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(int retval) {
  fprintf(stderr, "usage: eyja [-v] | [-h]\n");
  exit(retval);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
lea    0xec5(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"usage: eyja [-v] | [-h]\0A\00"
define void @usage(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"usage: eyja [-v] | [-h]\0A\00"
define void @usage(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @exit(i32 %0)
unreachable
}
void SynthOS_nullUnlock(int oldState) {}


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

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

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

LLVM IR (-O2):
define void @SynthOS_nullUnlock(i32 %0) {
ret void
}
int simuDisplay(int *intensity) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @simuDisplay(i32* nocapture readnone %0) {
ret i32 0
}
void BLEDisconnected() {}


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

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

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

LLVM IR (-O2):
define void @BLEDisconnected() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ hello(int);
int main(void) { hello(100); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x64,%edi
call   1030 <hello@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x64,%edi
call   1030 <hello@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @hello(i32 100)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @hello(i32 100)
ret i32 0
}
/* Variables and functions */
scalar_t__ isalpha(char);
scalar_t__ isdigit(char);
int isalnum(char c) { return isalpha(c) || isdigit(c); }


x86 assembly (clang, -O0):
<isalnum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <isalnum+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isalnum>:
push   %rbx
mov    %edi,%ebx
call   1040 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <isalnum+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <isdigit@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @isalnum(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @isdigit(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isalnum(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @isdigit(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
void d2i_X509_CERT_AUX(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_X509_CERT_AUX() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ quicksort_r(char *, char **, int /*<<< orphan*/, int);
int quicksort(char *path, char *fileList[], int len) {
  quicksort_r(path, fileList, 0, len - 1);
  return 0;
}


x86 assembly (clang, -O0):
<quicksort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <quicksort_r@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort>:
push   %rax
lea    -0x1(%rdx),%ecx
xor    %edx,%edx
call   1030 <quicksort_r@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @quicksort(i8* %0, i8** %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32, i32* %6
%10 = sub nsw i32 %9, 1
%11 = call i32 @quicksort_r(i8* %7, i8** %8, i32 0, i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @quicksort(i8* %0, i8** %1, i32 %2) {
%4 = add nsw i32 %2, -1
%5 = tail call i32 @quicksort_r(i8* %0, i8** %1, i32 0, i32 %4)
ret i32 0
}
void arm_mcr() {}


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

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

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

LLVM IR (-O2):
define void @arm_mcr() {
ret void
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  int send_event;
};
struct TYPE_4__ {
  TYPE_1__ xnoexpose;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
void set_XEvent_xnoexpose_send_event(void *_p, int _v) {
  ((XEvent *)_p)->xnoexpose.send_event = (int)_v;
}


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

x86 assembly (clang, -O2):
<set_XEvent_xnoexpose_send_event>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i32 }
define void @set_XEvent_xnoexpose_send_event(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_4__*
%8 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %7, i32 0, i32 0
%9 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %8, i32 0, i32 0
store i32 %5, i32* %9
ret void
}

LLVM IR (-O2):
define void @set_XEvent_xnoexpose_send_event(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
double f13(double X) { return -X; }


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<f13>:
xorps  0xef9(%rip),%xmm0
ret

LLVM IR (-O0):
define double @f13(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fneg double %3
ret double %4
}

LLVM IR (-O2):
define double @f13(double %0) {
%2 = fneg double %0
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ get_exts();
void find_extensionsGL(void) { get_exts(); }


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

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

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

LLVM IR (-O2):
define void @find_extensionsGL() {
%1 = tail call i32 (...) @get_exts()
ret void
}
int if_get_interfaces(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @if_get_interfaces() {
ret i32 0
}
/* Variables and functions */
int bar();
int foo(void) { return 24 + bar(); }


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

x86 assembly (clang, -O2):
<foo>:
push   %rax
xor    %eax,%eax
call   1030 <bar@plt>
add    $0x18,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @foo() {
%1 = call i32 (...) @bar()
%2 = add nsw i32 24, %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @foo() {
%1 = tail call i32 (...) @bar()
%2 = add nsw i32 %1, 24
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Com_DPrintf(char *, size_t, size_t);
void *calloc(size_t, size_t);
void *Memory_calloc(size_t num, size_t size) {
  void *ptr;
  ptr = calloc(num, size);
  if (ptr != ((void *)0)) {
    return ptr;
  }
  Com_DPrintf("[Memory_calloc]: Could not allocate %d objects of size %d\n",
              num, size);
  return ((void *)0);
}


x86 assembly (clang, -O0):
<Memory_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1159 <Memory_calloc+0x39>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1175 <Memory_calloc+0x55>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xe98(%rip),%rdi
call   1040 <Com_DPrintf@plt>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Memory_calloc>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    114a <Memory_calloc+0x2a>
lea    0xec1(%rip),%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <Com_DPrintf@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [59 x i8] c"[Memory_calloc]: Could not allocate %d objects of size %d\0A\00"
define i8* @Memory_calloc(i64 %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %4
store i64 %1, i64* %5
%7 = load i64, i64* %4
%8 = load i64, i64* %5
%9 = call i8* @calloc(i64 %7, i64 %8)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = icmp ne i8* %10, null
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = load i8*, i8** %6
store i8* %13, i8** %3
br label %18
14: ; preds = %2
%15 = load i64, i64* %4
%16 = load i64, i64* %5
%17 = call i32 @Com_DPrintf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i64 %15, i64 %16)
store i8* null, i8** %3
br label %18
18: ; preds = %14, %12
%19 = load i8*, i8** %3
ret i8* %19
}

LLVM IR (-O2):
@.str = [59 x i8] c"[Memory_calloc]: Could not allocate %d objects of size %d\0A\00"
define noalias i8* @Memory_calloc(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @Com_DPrintf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str, i64 0, i64 0), i64 %0, i64 %1)
br label %7
7: ; preds = %2, %5
ret i8* %3
}
/* Variables and functions */
int bitdepth(unsigned int);
unsigned int is_ambiguous(unsigned int value, unsigned int base) {
  unsigned int max = base - 1;
  unsigned int high_bit = bitdepth(max) - 1;
  unsigned int mask = ~(1 << high_bit);
  unsigned int max_ambiguous = max & mask;
  return ((value & mask) <= max_ambiguous);
}


x86 assembly (clang, -O0):
<is_ambiguous>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <bitdepth@plt>
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0xc(%rbp),%eax
and    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
and    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setbe  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_ambiguous>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
add    $0xffffffff,%ebx
mov    %ebx,%edi
call   1030 <bitdepth@plt>
add    $0xff,%al
btr    %eax,%ebx
btr    %eax,%ebp
xor    %eax,%eax
cmp    %ebx,%ebp
setbe  %al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @is_ambiguous(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%9 = load i32, i32* %4
%10 = sub i32 %9, 1
store i32 %10, i32* %5
%11 = load i32, i32* %5
%12 = call i32 @bitdepth(i32 %11)
%13 = sub nsw i32 %12, 1
store i32 %13, i32* %6
%14 = load i32, i32* %6
%15 = shl i32 1, %14
%16 = xor i32 %15, -1
store i32 %16, i32* %7
%17 = load i32, i32* %5
%18 = load i32, i32* %7
%19 = and i32 %17, %18
store i32 %19, i32* %8
%20 = load i32, i32* %3
%21 = load i32, i32* %7
%22 = and i32 %20, %21
%23 = load i32, i32* %8
%24 = icmp ule i32 %22, %23
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @is_ambiguous(i32 %0, i32 %1) {
%3 = add i32 %1, -1
%4 = tail call i32 @bitdepth(i32 %3)
%5 = add nsw i32 %4, -1
%6 = shl nuw i32 1, %5
%7 = xor i32 %6, -1
%8 = and i32 %3, %7
%9 = and i32 %7, %0
%10 = icmp ule i32 %9, %8
%11 = zext i1 %10 to i32
ret i32 %11
}
void XtCvtStringToFontSet() {}


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

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

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

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