xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
uint32_t netbytes2uint32_m(uint8_t *s) {
  uint32_t a0 = (uint8_t)s[0] << 24;
  uint32_t a1 = (uint8_t)s[1] << 16;
  uint32_t a2 = (uint8_t)s[2] << 8;
  uint32_t a3 = (uint8_t)s[3];
  uint32_t ret = (uint32_t)(a0 | a1 | a2 | a3);
  return ret;
}


x86 assembly (clang, -O0):
<netbytes2uint32_m>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
shl    $0x10,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
shl    $0x8,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
or     -0x10(%rbp),%eax
or     -0x14(%rbp),%eax
or     -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<netbytes2uint32_m>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @netbytes2uint32_m(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32* %0, i32** %2
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 0
%10 = load i32, i32* %9
%11 = shl i32 %10, 24
store i32 %11, i32* %3
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 1
%14 = load i32, i32* %13
%15 = shl i32 %14, 16
store i32 %15, i32* %4
%16 = load i32*, i32** %2
%17 = getelementptr inbounds i32, i32* %16, i64 2
%18 = load i32, i32* %17
%19 = shl i32 %18, 8
store i32 %19, i32* %5
%20 = load i32*, i32** %2
%21 = getelementptr inbounds i32, i32* %20, i64 3
%22 = load i32, i32* %21
store i32 %22, i32* %6
%23 = load i32, i32* %3
%24 = load i32, i32* %4
%25 = or i32 %23, %24
%26 = load i32, i32* %5
%27 = or i32 %25, %26
%28 = load i32, i32* %6
%29 = or i32 %27, %28
store i32 %29, i32* %7
%30 = load i32, i32* %7
ret i32 %30
}

LLVM IR (-O2):
define i32 @netbytes2uint32_m(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = shl i32 %8, 8
%10 = getelementptr inbounds i32, i32* %0, i64 3
%11 = load i32, i32* %10
%12 = or i32 %6, %3
%13 = or i32 %12, %9
%14 = or i32 %13, %11
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ TIOCGPGRP;
int ioctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int isatty(int fd) {
  pid_t tmp;
  if (ioctl(fd, TIOCGPGRP, &tmp) == -1)
    return 0;
  return 1;
}


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

x86 assembly (clang, -O2):
<isatty>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
lea    0x4(%rsp),%rdx
call   1030 <ioctl@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@TIOCGPGRP = global i32 0
define i32 @isatty(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = load i32, i32* @TIOCGPGRP
%5 = call i32 @ioctl(i32 %0, i32 %4, i32* %2)
%6 = icmp ne i32 %5, -1
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ _dictFree(void *);
void _dictStringKeyValCopyHTValDestructor(void *privdata, void *val) {
  ((void)privdata);
  _dictFree((void *)val);
}


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

x86 assembly (clang, -O2):
<_dictStringKeyValCopyHTValDestructor>:
mov    %rsi,%rdi
jmp    1030 <_dictFree@plt>

LLVM IR (-O0):
define void @_dictStringKeyValCopyHTValDestructor(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** %4
%7 = call i32 @_dictFree(i8* %6)
ret void
}

LLVM IR (-O2):
define void @_dictStringKeyValCopyHTValDestructor(i8* nocapture readnone %0, i8* %1) {
%3 = tail call i32 @_dictFree(i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
int main(int argc, char **argv) {
  int i;
  for (i = 0; i < 10; i++) {
    malloc(1024);
  }
  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)
cmpl   $0xa,-0x14(%rbp)
jge    114f <main+0x3f>
mov    $0x400,%edi
call   1030 <malloc@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   %rax
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
mov    $0x400,%edi
call   1030 <malloc@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
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 = %12, %2
%8 = load i32, i32* %6
%9 = icmp slt i32 %8, 10
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = call i32 @malloc(i32 1024)
br label %12
12: ; preds = %10
%13 = load i32, i32* %6
%14 = add nsw i32 %13, 1
store i32 %14, i32* %6
br label %7
15: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @malloc(i32 1024)
%4 = tail call i32 @malloc(i32 1024)
%5 = tail call i32 @malloc(i32 1024)
%6 = tail call i32 @malloc(i32 1024)
%7 = tail call i32 @malloc(i32 1024)
%8 = tail call i32 @malloc(i32 1024)
%9 = tail call i32 @malloc(i32 1024)
%10 = tail call i32 @malloc(i32 1024)
%11 = tail call i32 @malloc(i32 1024)
%12 = tail call i32 @malloc(i32 1024)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ gid_t;

/* Variables and functions */
int setgid(int /*<<< orphan*/);
__attribute__((__weak__, __always___)) int softboundcets_setgid(gid_t gid) {
  return setgid(gid);
}


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

x86 assembly (clang, -O2):
<softboundcets_setgid>:
jmp    1030 <setgid@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_setgid(i32 %0) {
%2 = tail call i32 @setgid(i32 %0)
ret i32 %2
}
/* Type definitions */
struct sock {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ sock_close(struct sock *);
void sock_hup(void *arg) {
  struct sock *f = arg;
  sock_close(f);
}


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

x86 assembly (clang, -O2):
<sock_hup>:
jmp    1030 <sock_close@plt>

LLVM IR (-O0):
%struct.sock = type { i32 }
define void @sock_hup(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.sock*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.sock*
store %struct.sock* %5, %struct.sock** %3
%6 = load %struct.sock*, %struct.sock** %3
%7 = call i32 @sock_close(%struct.sock* %6)
ret void
}

LLVM IR (-O2):
%struct.sock = type { i32 }
define void @sock_hup(i8* %0) {
%2 = bitcast i8* %0 to %struct.sock*
%3 = tail call i32 @sock_close(%struct.sock* %2)
ret void
}
int uolfone_auth_get_cnonce(const char *input_buffer, char *cnonce,
                            int *cnonce_len) {
  if (!input_buffer || !cnonce || !cnonce_len) {
    return -1;
  }
  if (0 == *cnonce_len) {
    return -1;
  }
  return -1;
}


x86 assembly (clang, -O0):
<uolfone_auth_get_cnonce>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1131 <uolfone_auth_get_cnonce+0x31>
cmpq   $0x0,-0x18(%rbp)
je     1131 <uolfone_auth_get_cnonce+0x31>
cmpq   $0x0,-0x20(%rbp)
jne    113d <uolfone_auth_get_cnonce+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <uolfone_auth_get_cnonce+0x5e>
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
cmp    (%rcx),%eax
jne    1157 <uolfone_auth_get_cnonce+0x57>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <uolfone_auth_get_cnonce+0x5e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @uolfone_auth_get_cnonce(i8* readnone %0, i8* readnone %1, i32* readnone %2) {
ret i32 -1
}
double f8(double x, double y) { return __builtin_fmod(x, y); }


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

x86 assembly (clang, -O2):
<f8>:
jmp    1030 <fmod@plt>

LLVM IR (-O0):
define double @f8(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @fmod(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @f8(double %0, double %1) {
%3 = tail call double @fmod(double %0, double %1)
ret double %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
void *calloc(size_t, size_t);
void *acalloc(size_t n, size_t s) {
  void *ret;
  ret = calloc(n, s);
  if (!ret)
    abort();
  return ret;
}


x86 assembly (clang, -O0):
<acalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1153 <acalloc+0x33>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<acalloc>:
push   %rax
call   1040 <calloc@plt>
test   %rax,%rax
je     112d <acalloc+0xd>
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define noalias i8* @acalloc(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 (...) @abort()
unreachable
7: ; preds = %2
ret i8* %3
}
RCU_DEF_DESTROY_FUNC(user_f0_destroy, param) {}


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

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

LLVM IR (-O0):
define i32 @RCU_DEF_DESTROY_FUNC(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* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @RCU_DEF_DESTROY_FUNC(i32 %0, i32 %1) {
ret i32 undef
}
void color(double c[3], double p[3]) {
  c[0] = 1;
  c[1] = 1;
  c[2] = 1;
}


x86 assembly (clang, -O0):
<color>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xee8(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0xec7(%rip),%xmm0
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<color>:
movaps 0xef9(%rip),%xmm0
movups %xmm0,(%rdi)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x10(%rdi)
ret

LLVM IR (-O0):
define void @color(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = getelementptr inbounds double, double* %5, i64 0
store double 1.000000e+00, double* %6
%7 = load double*, double** %3
%8 = getelementptr inbounds double, double* %7, i64 1
store double 1.000000e+00, double* %8
%9 = load double*, double** %3
%10 = getelementptr inbounds double, double* %9, i64 2
store double 1.000000e+00, double* %10
ret void
}

LLVM IR (-O2):
define void @color(double* nocapture writeonly %0, double* nocapture readnone %1) {
%3 = bitcast double* %0 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 1.000000e+00>, <2 x double>* %3
%4 = getelementptr inbounds double, double* %0, i64 2
store double 1.000000e+00, double* %4
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ LOG_INFO;
int /*<<< orphan*/ vsyslog(int /*<<< orphan*/, char *, int /*<<< orphan*/);
void syslogLogger(char *format, va_list ap) { vsyslog(LOG_INFO, format, ap); }


x86 assembly (clang, -O0):
<syslogLogger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vsyslog@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syslogLogger>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vsyslog@plt>

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

LLVM IR (-O2):
@LOG_INFO = global i32 0
define void @syslogLogger(i8* %0, i32 %1) {
%3 = load i32, i32* @LOG_INFO
%4 = tail call i32 @vsyslog(i32 %3, i8* %0, i32 %1)
ret void
}
double ighmm_rand_get_xfaktphi() { return 1000; }


x86 assembly (clang, -O0):
<ighmm_rand_get_xfaktphi>:
push   %rbp
mov    %rsp,%rbp
movsd  0xef4(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ighmm_rand_get_xfaktphi>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @ighmm_rand_get_xfaktphi() {
ret double 1.000000e+03
}

LLVM IR (-O2):
define double @ighmm_rand_get_xfaktphi() {
ret double 1.000000e+03
}
/* Variables and functions */
long const INT_MAX;
long const INT_MIN;
int limit_long_to_int(const long l) {
  if (l < INT_MIN)
    return INT_MIN;
  else if (l > INT_MAX)
    return INT_MAX;
  else
    return l;
}


x86 assembly (clang, -O0):
<limit_long_to_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ecd(%rip),%rcx
cmp    (%rcx),%rax
jge    112e <limit_long_to_int+0x2e>
mov    0x2ebd(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x4(%rbp)
jmp    115b <limit_long_to_int+0x5b>
mov    -0x10(%rbp),%rax
mov    0x2eaf(%rip),%rcx
cmp    (%rcx),%rax
jle    1154 <limit_long_to_int+0x54>
mov    0x2e9f(%rip),%rax
mov    (%rax),%rax
mov    %eax,-0x4(%rbp)
jmp    115b <limit_long_to_int+0x5b>
mov    -0x10(%rbp),%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@INT_MIN = constant i64 0
@INT_MAX = constant i64 0
define i32 @limit_long_to_int(i64 %0) {
%2 = alloca i32
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = load i64, i64* @INT_MIN
%6 = icmp slt i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i64, i64* @INT_MIN
%9 = trunc i64 %8 to i32
store i32 %9, i32* %2
br label %20
10: ; preds = %1
%11 = load i64, i64* %3
%12 = load i64, i64* @INT_MAX
%13 = icmp sgt i64 %11, %12
br i1 %13, label %14, label %17
14: ; preds = %10
%15 = load i64, i64* @INT_MAX
%16 = trunc i64 %15 to i32
store i32 %16, i32* %2
br label %20
17: ; preds = %10
%18 = load i64, i64* %3
%19 = trunc i64 %18 to i32
store i32 %19, i32* %2
br label %20
20: ; preds = %17, %14, %7
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
@INT_MIN = constant i64 0
@INT_MAX = constant i64 0
define i32 @limit_long_to_int(i64 %0) {
ret i32 0
}
/* Variables and functions */
int exact_min_minus_min_linear_CAF(int);
int underapprox_min_minus_min_linear_CAF(int);
void exact_min_plus_min_plus_min_UNDERRUN(int x, int b) {
  int size1[1];
  int y = exact_min_minus_min_linear_CAF(x);
  if (b)
    y = underapprox_min_minus_min_linear_CAF(x);
  y -= 29;
  size1[y] = 0;
}


x86 assembly (clang, -O0):
<exact_min_plus_min_plus_min_UNDERRUN>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exact_min_minus_min_linear_CAF@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     114e <exact_min_plus_min_plus_min_UNDERRUN+0x2e>
mov    -0x4(%rbp),%edi
call   1040 <underapprox_min_minus_min_linear_CAF@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    $0x1d,%eax
mov    %eax,-0x10(%rbp)
movslq -0x10(%rbp),%rax
movl   $0x0,-0xc(%rbp,%rax,4)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exact_min_plus_min_plus_min_UNDERRUN>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
call   1030 <exact_min_minus_min_linear_CAF@plt>
test   %ebp,%ebp
je     113d <exact_min_plus_min_plus_min_UNDERRUN+0x1d>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <underapprox_min_minus_min_linear_CAF@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @exact_min_plus_min_plus_min_UNDERRUN(i32 %0, i32 %1) {
%3 = tail call i32 @exact_min_minus_min_linear_CAF(i32 %0)
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @underapprox_min_minus_min_linear_CAF(i32 %0)
br label %7
7: ; preds = %5, %2
ret void
}
/* Variables and functions */
int INT_MAX;
int main(void) {
  -3 | INT_MAX;
  return 0;
}


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

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

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

LLVM IR (-O2):
@INT_MAX = global i32 0
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int bbm_read(void *, unsigned short, unsigned short, unsigned char *);
int bbm_com_read(void *handle, unsigned short devid, unsigned short addr,
                 unsigned char *data) {
  int res;
  res = bbm_read(handle, devid, addr, data);
  return res;
}


x86 assembly (clang, -O0):
<bbm_com_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %si,%dx
mov    %rdi,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xa(%rbp),%dx
mov    -0xc(%rbp),%ax
mov    -0x18(%rbp),%rcx
movzwl %dx,%esi
movzwl %ax,%edx
call   1030 <bbm_read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bbm_com_read>:
jmp    1030 <bbm_read@plt>

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

LLVM IR (-O2):
define i32 @bbm_com_read(i8* %0, i16 zeroext %1, i16 zeroext %2, i8* %3) {
%5 = tail call i32 @bbm_read(i8* %0, i16 zeroext %1, i16 zeroext %2, i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ getPlayer();
int /*<<< orphan*/ initialize_helper(int /*<<< orphan*/, char *);
void initialize_player() { initialize_helper(getPlayer(), "Player"); }


x86 assembly (clang, -O0):
<initialize_player>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <getPlayer@plt>
mov    %eax,%edi
lea    0xecc(%rip),%rsi
call   1030 <initialize_helper@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize_player>:
push   %rax
xor    %eax,%eax
call   1040 <getPlayer@plt>
lea    0xed1(%rip),%rsi
mov    %eax,%edi
pop    %rax
jmp    1030 <initialize_helper@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"Player\00"
define void @initialize_player() {
%1 = tail call i32 (...) @getPlayer()
%2 = tail call i32 @initialize_helper(i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
int is_whitespace(char c) {
  return c == ' ' || c == '\t' || c == '\n' || c == '\r';
}


x86 assembly (clang, -O0):
<is_whitespace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     114d <is_whitespace+0x4d>
movsbl -0x1(%rbp),%eax
cmp    $0xd,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_whitespace>:
cmp    $0x20,%dil
ja     1120 <is_whitespace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100000600,%rdx
bt     %rcx,%rdx
jae    1120 <is_whitespace+0x20>
ret
xor    %eax,%eax
cmp    $0xd,%dil
sete   %al
ret

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

LLVM IR (-O2):
define i32 @is_whitespace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 13
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
extern void shift_char_p(char **charp_ref) {
  char *charp;
  charp = *charp_ref;
  charp++;
  while (*charp != ' ' && *charp != '\0')
    charp++;
  *charp_ref = charp;
}


x86 assembly (clang, -O0):
<shift_char_p>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x11(%rbp)
je     1144 <shift_char_p+0x44>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1154 <shift_char_p+0x54>
jmp    1165 <shift_char_p+0x65>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111f <shift_char_p+0x1f>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<shift_char_p>:
mov    (%rdi),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
testb  $0xdf,0x1(%rax)
lea    0x1(%rax),%rax
jne    1110 <shift_char_p+0x10>
mov    %rax,(%rdi)
ret

LLVM IR (-O0):
define void @shift_char_p(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
br label %8
8: ; preds = %20, %1
%9 = load i8*, i8** %3
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 32
br i1 %12, label %13, label %18
13: ; preds = %8
%14 = load i8*, i8** %3
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br label %18
18: ; preds = %13, %8
%19 = phi i1 [ false, %8 ], [ %17, %13 ]
br i1 %19, label %20, label %23
20: ; preds = %18
%21 = load i8*, i8** %3
%22 = getelementptr inbounds i8, i8* %21, i32 1
store i8* %22, i8** %3
br label %8
23: ; preds = %18
%24 = load i8*, i8** %3
%25 = load i8**, i8*** %2
store i8* %24, i8** %25
ret void
}

LLVM IR (-O2):
define void @shift_char_p(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %3, %1
%4 = phi i8* [ %2, %1 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
switch i8 %6, label %3 [
i8 32, label %7
i8 0, label %7
]
7: ; preds = %3, %3
store i8* %5, i8** %0
ret void
}
void SkipSpaces(char **s) {
  while (**s == ' ' || **s == '\t')
    (*s)++;
}


x86 assembly (clang, -O0):
<SkipSpaces>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x9(%rbp)
je     1133 <SkipSpaces+0x33>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    1143 <SkipSpaces+0x43>
jmp    1156 <SkipSpaces+0x56>
mov    -0x8(%rbp),%rax
mov    (%rax),%rcx
add    $0x1,%rcx
mov    %rcx,(%rax)
jmp    1108 <SkipSpaces+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<SkipSpaces>:
mov    (%rdi),%rax
jmp    1113 <SkipSpaces+0x13>
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rax,(%rdi)
add    $0x1,%rax
movzbl -0x1(%rax),%ecx
cmp    $0x20,%cl
je     1110 <SkipSpaces+0x10>
cmp    $0x9,%cl
je     1110 <SkipSpaces+0x10>
ret

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

LLVM IR (-O2):
define void @SkipSpaces(i8** nocapture %0) {
%2 = load i8*, i8** %0
br label %3
3: ; preds = %6, %1
%4 = phi i8* [ %7, %6 ], [ %2, %1 ]
%5 = load i8, i8* %4
switch i8 %5, label %8 [
i8 32, label %6
i8 9, label %6
]
6: ; preds = %3, %3
%7 = getelementptr inbounds i8, i8* %4, i64 1
store i8* %7, i8** %0
br label %3
8: ; preds = %3
ret void
}
void f150(void) {
  ({
    ({ 0; });
    ({ 0; });
    0;
  });
  ({
    ({ 0; });
    ({
      goto a;
    a:
      0;
    });
    0;
  });
  0;
}


x86 assembly (clang, -O0):
<f150>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @f150() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void def_free(void *ptr) {
  if (ptr) {
    free(ptr);
    ptr = NULL;
  }
}


x86 assembly (clang, -O0):
<def_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1138 <def_free+0x28>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<def_free>:
test   %rdi,%rdi
je     111a <def_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @def_free(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
store i8* null, i8** %2
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @def_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
int XSetWMColormapWindows() {}


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

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

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

LLVM IR (-O2):
define i32 @XSetWMColormapWindows() {
ret i32 undef
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ y;
};
typedef TYPE_1__ XPoint;

/* Variables and functions */
short get_XPoint_y(void *_p) { return (short)((XPoint *)_p)->y; }


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

x86 assembly (clang, -O2):
<get_XPoint_y>:
movzwl (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define signext i16 @get_XPoint_y(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_2__*
%5 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = trunc i64 %6 to i16
ret i16 %7
}

LLVM IR (-O2):
define signext i16 @get_XPoint_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int output(int i) {
  int j;
  (void)j;
  putchar(i);
  return 0;
}


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

x86 assembly (clang, -O2):
<output>:
push   %rax
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @output(i32 %0) {
%2 = tail call i32 @putchar(i32 %0)
ret i32 0
}
void Tcl_ExitThread(status) int status;
{ Tcl_FinalizeThread(); }


x86 assembly (clang, -O0):
<Tcl_ExitThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <Tcl_FinalizeThread@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Tcl_ExitThread(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @Tcl_FinalizeThread()
ret void
}

LLVM IR (-O2):
define void @Tcl_ExitThread(i32 %0) {
%2 = tail call i32 (...) @Tcl_FinalizeThread()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void quant_trace(FILE *f, ...) {}


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

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

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

LLVM IR (-O2):
define void @quant_trace(i32* nocapture %0, ...) {
ret void
}
void Swap(int *x_p, int *y_p) {
  int temp = *x_p;
  *x_p = *y_p;
  *y_p = temp;
}


x86 assembly (clang, -O0):
<Swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @Swap(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32*, i32** %4
%9 = load i32, i32* %8
%10 = load i32*, i32** %3
store i32 %9, i32* %10
%11 = load i32, i32* %5
%12 = load i32*, i32** %4
store i32 %11, i32* %12
ret void
}

LLVM IR (-O2):
define void @Swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _ce_init_files_ranks_boards();
int /*<<< orphan*/ _ce_init_hash_keys();
int /*<<< orphan*/ _ce_init_tbl_bit_masks();
int /*<<< orphan*/ _ce_init_tbl_sq120_to_sq64();
int /*<<< orphan*/ ce_init_mvv_lva();
void ce_init() {
  _ce_init_tbl_sq120_to_sq64();
  _ce_init_tbl_bit_masks();
  _ce_init_hash_keys();
  _ce_init_files_ranks_boards();
  ce_init_mvv_lva();
}


x86 assembly (clang, -O0):
<ce_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <_ce_init_tbl_sq120_to_sq64@plt>
mov    $0x0,%al
call   1060 <_ce_init_tbl_bit_masks@plt>
mov    $0x0,%al
call   1040 <_ce_init_hash_keys@plt>
mov    $0x0,%al
call   1030 <_ce_init_files_ranks_boards@plt>
mov    $0x0,%al
call   1070 <ce_init_mvv_lva@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ce_init>:
push   %rax
xor    %eax,%eax
call   1050 <_ce_init_tbl_sq120_to_sq64@plt>
xor    %eax,%eax
call   1060 <_ce_init_tbl_bit_masks@plt>
xor    %eax,%eax
call   1040 <_ce_init_hash_keys@plt>
xor    %eax,%eax
call   1030 <_ce_init_files_ranks_boards@plt>
xor    %eax,%eax
pop    %rcx
jmp    1070 <ce_init_mvv_lva@plt>

LLVM IR (-O0):
define void @ce_init() {
%1 = call i32 (...) @_ce_init_tbl_sq120_to_sq64()
%2 = call i32 (...) @_ce_init_tbl_bit_masks()
%3 = call i32 (...) @_ce_init_hash_keys()
%4 = call i32 (...) @_ce_init_files_ranks_boards()
%5 = call i32 (...) @ce_init_mvv_lva()
ret void
}

LLVM IR (-O2):
define void @ce_init() {
%1 = tail call i32 (...) @_ce_init_tbl_sq120_to_sq64()
%2 = tail call i32 (...) @_ce_init_tbl_bit_masks()
%3 = tail call i32 (...) @_ce_init_hash_keys()
%4 = tail call i32 (...) @_ce_init_files_ranks_boards()
%5 = tail call i32 (...) @ce_init_mvv_lva()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int puts(const char *s) {
  printf("%s\n", s);
  return 0;
}


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

x86 assembly (clang, -O2):
<puts>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @puts(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Variables and functions */
bool op_leq(double x, double y) { return x <= y; }


x86 assembly (clang, -O0):
<op_leq>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_leq>:
xor    %eax,%eax
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define i32 @op_leq(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ole double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @op_leq(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void POMP2_Finalize() {}


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

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

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

LLVM IR (-O2):
define void @POMP2_Finalize() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(int /*<<< orphan*/, int, int);
main() {
  f(0, 1, 1);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x1,%esi
mov    $0x1,%edx
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 0, i32 1, i32 1)
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 0, i32 1, i32 1)
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf2(char *);
void GenWordAlignment(void) { printf2("\t.align 2\n"); }


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

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"\09.align 2\0A\00"
define void @GenWordAlignment() {
%1 = tail call i32 @printf2(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
ret void
}
__attribute__((always_)) void pci_disable_msi(struct pci_dev *dev) {}


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

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

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

LLVM IR (-O2):
%struct.pci_dev = type opaque
define void @pci_disable_msi(%struct.pci_dev* nocapture %0) {
ret void
}
/* Variables and functions */
int __libc_fsync(int);
int /*<<< orphan*/ pthread_testcancel();
int fsync(int fd) {
  pthread_testcancel();
  return __libc_fsync(fd);
}


x86 assembly (clang, -O0):
<fsync>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <pthread_testcancel@plt>
mov    -0x4(%rbp),%edi
call   1040 <__libc_fsync@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsync>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <pthread_testcancel@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <__libc_fsync@plt>

LLVM IR (-O0):
define i32 @fsync(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @pthread_testcancel()
%4 = load i32, i32* %2
%5 = call i32 @__libc_fsync(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @fsync(i32 %0) {
%2 = tail call i32 (...) @pthread_testcancel()
%3 = tail call i32 @__libc_fsync(i32 %0)
ret i32 %3
}
int linkFound(int old, int new) { return old == 4 && new == 5; }


x86 assembly (clang, -O0):
<linkFound>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xor    %eax,%eax
cmpl   $0x4,-0x4(%rbp)
mov    %al,-0x9(%rbp)
jne    1123 <linkFound+0x23>
cmpl   $0x5,-0x8(%rbp)
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<linkFound>:
xor    $0x4,%edi
xor    $0x5,%esi
xor    %eax,%eax
or     %edi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @linkFound(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = icmp eq i32 %5, 4
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* %4
%9 = icmp eq i32 %8, 5
br label %10
10: ; preds = %7, %2
%11 = phi i1 [ false, %2 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @linkFound(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 4
%4 = icmp eq i32 %1, 5
%5 = and i1 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
void swap(char *c1, char *c2) {
  char temp = *c1;
  *c1 = *c2;
  *c2 = temp;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x11(%rbp),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
mov    (%rdi),%al
mov    (%rsi),%cl
mov    %cl,(%rdi)
mov    %al,(%rsi)
ret

LLVM IR (-O0):
define void @swap(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
store i8 %7, i8* %5
%8 = load i8*, i8** %4
%9 = load i8, i8* %8
%10 = load i8*, i8** %3
store i8 %9, i8* %10
%11 = load i8, i8* %5
%12 = load i8*, i8** %4
store i8 %11, i8* %12
ret void
}

LLVM IR (-O2):
define void @swap(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
store i8 %4, i8* %0
store i8 %3, i8* %1
ret void
}
void ARGBToAR30Row_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToAR30Row_Any_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ die(char *, int);
int read(int, long long *, int);
int readll(int fd, long long *dest) {
  int r = read(fd, dest, sizeof(long long));
  if (r != sizeof(long long) && r)
    die("Couldn't read long long (Got %d)\n", r);
  return r;
}


x86 assembly (clang, -O0):
<readll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x8,%edx
call   1030 <read@plt>
mov    %eax,-0x14(%rbp)
movslq -0x14(%rbp),%rax
cmp    $0x8,%rax
je     116a <readll+0x4a>
cmpl   $0x0,-0x14(%rbp)
je     116a <readll+0x4a>
mov    -0x14(%rbp),%esi
lea    0xe9b(%rip),%rdi
call   1040 <die@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<readll>:
push   %rbx
mov    $0x8,%edx
call   1030 <read@plt>
mov    %eax,%ebx
test   $0xfffffff7,%eax
je     1142 <readll+0x22>
lea    0xec5(%rip),%rdi
mov    %ebx,%esi
call   1040 <die@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Couldn't read long long (Got %d)\0A\00"
define i32 @readll(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
%5 = alloca i32
store i32 %0, i32* %3
store i64* %1, i64** %4
%6 = load i32, i32* %3
%7 = load i64*, i64** %4
%8 = call i32 @read(i32 %6, i64* %7, i32 8)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = sext i32 %9 to i64
%11 = icmp ne i64 %10, 8
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i32, i32* %5
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* %5
%17 = call i32 @die(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %16)
br label %18
18: ; preds = %15, %12, %2
%19 = load i32, i32* %5
ret i32 %19
}

LLVM IR (-O2):
@.str = [34 x i8] c"Couldn't read long long (Got %d)\0A\00"
define i32 @readll(i32 %0, i64* nocapture %1) {
%3 = tail call i32 @read(i32 %0, i64* %1, i32 8)
%4 = and i32 %3, -9
%5 = icmp eq i32 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @die(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %3)
br label %8
8: ; preds = %6, %2
ret i32 %3
}
void pm_freerow(itrow) char *itrow;
{ free(itrow); }


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

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

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

LLVM IR (-O2):
define void @pm_freerow(i8* nocapture %0) {
tail call void @free(i8* %0)
ret void
}
int nondet_int() {
  int i;
  return i;
}


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

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

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

LLVM IR (-O2):
define i32 @nondet_int() {
ret i32 undef
}