xunge/DecIR huggingface dataset:
float myrandom(above, below)
float above, below;
{
  double drand48();
  return ((float)(above + drand48() * (below - above)));
}


x86 assembly (clang, -O0):
<myrandom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm1,-0x18(%rbp)
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
cvtsd2ss %xmm1,%xmm1
cvtsd2ss %xmm0,%xmm0
movss  %xmm1,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <drand48@plt>
movsd  -0x10(%rbp),%xmm1
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<myrandom>:
sub    $0x18,%rsp
cvtsd2ss %xmm0,%xmm2
movss  %xmm2,0x8(%rsp)
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0xc(%rsp)
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
movsd  %xmm0,0x10(%rsp)
xor    %eax,%eax
call   1030 <drand48@plt>
movss  0xc(%rsp),%xmm1
subss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
addsd  0x10(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define float @myrandom(double %0, double %1) {
%3 = alloca float
%4 = alloca float
%5 = fptrunc double %0 to float
%6 = fptrunc double %1 to float
store float %5, float* %3
store float %6, float* %4
%7 = load float, float* %3
%8 = fpext float %7 to double
%9 = call double (...) @drand48()
%10 = load float, float* %4
%11 = load float, float* %3
%12 = fsub float %10, %11
%13 = fpext float %12 to double
%14 = call double @llvm.fmuladd.f64(double %9, double %13, double %8)
%15 = fptrunc double %14 to float
ret float %15
}

LLVM IR (-O2):
define float @myrandom(double %0, double %1) {
%3 = fptrunc double %0 to float
%4 = fptrunc double %1 to float
%5 = fpext float %3 to double
%6 = tail call double (...) @drand48()
%7 = fsub float %4, %3
%8 = fpext float %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %6, double %8, double %5)
%10 = fptrunc double %9 to float
ret float %10
}
double heaviside(double x) { return (x > 0.0 ? 1.0 : 0.0); }


x86 assembly (clang, -O0):
<heaviside>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  0xeea(%rip),%xmm3
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm0
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<heaviside>:
xorpd  %xmm1,%xmm1
cmpltsd %xmm0,%xmm1
movsd  0xeef(%rip),%xmm0
andpd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @heaviside(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp ogt double %3, 0.000000e+00
%5 = zext i1 %4 to i64
%6 = select i1 %4, double 1.000000e+00, double 0.000000e+00
ret double %6
}

LLVM IR (-O2):
define double @heaviside(double %0) {
%2 = fcmp ogt double %0, 0.000000e+00
%3 = select i1 %2, double 1.000000e+00, double 0.000000e+00
ret double %3
}
unsigned short inw_local(unsigned long port) {
  unsigned short value;
  __asm__ __volatile__("in"
                       "w"
                       " %w1, %"
                       "w"
                       "0"
                       : "=a"(value)
                       : "Nd"(port));
  return value;
}


x86 assembly (clang, -O0):
<inw_local>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
in     (%dx),%ax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inw_local>:
mov    %rdi,%rdx
in     (%dx),%ax
ret

LLVM IR (-O0):
define zeroext i16 @inw_local(i64 %0) {
%2 = alloca i64
%3 = alloca i16
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i16 asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i64 %4)
store i16 %5, i16* %3
%6 = load i16, i16* %3
ret i16 %6
}

LLVM IR (-O2):
define zeroext i16 @inw_local(i64 %0) {
%2 = tail call i16 asm sideeffect "inw ${1:w}, ${0:w}", "={ax},N{dx},~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i16 %2
}
/* Variables and functions */
int raise(int);
__attribute__((__weak__, __always___)) int softboundcets_raise(int sig) {
  return raise(sig);
}


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

x86 assembly (clang, -O2):
<softboundcets_raise>:
jmp    1030 <raise@plt>

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

LLVM IR (-O2):
define weak i32 @softboundcets_raise(i32 %0) {
%2 = tail call i32 @raise(i32 %0)
ret i32 %2
}
void X509V3_add_value_int(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_add_value_int() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ ecc_generatekey(int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                                   int /*<<< orphan*/ *, int /*<<< orphan*/ *);
uint8_t ECC_generateKey(uint32_t *randString, uint32_t *privateKey,
                        uint32_t *publicKey_x, uint32_t *publicKey_y) {
  return (uint8_t)ecc_generatekey(
      (uint32_t *)randString, (uint32_t *)privateKey, (uint32_t *)publicKey_x,
      (uint32_t *)publicKey_y);
}


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

x86 assembly (clang, -O2):
<ECC_generateKey>:
jmp    1030 <ecc_generatekey@plt>

LLVM IR (-O0):
define i32 @ECC_generateKey(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
store i32* %3, i32** %8
%9 = load i32*, i32** %5
%10 = load i32*, i32** %6
%11 = load i32*, i32** %7
%12 = load i32*, i32** %8
%13 = call i32 @ecc_generatekey(i32* %9, i32* %10, i32* %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @ECC_generateKey(i32* %0, i32* %1, i32* %2, i32* %3) {
%5 = tail call i32 @ecc_generatekey(i32* %0, i32* %1, i32* %2, i32* %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ document_close_body_stream(int /*<<< orphan*/ *);
int /*<<< orphan*/ document_close_html_stream(int /*<<< orphan*/ *);
void document_close_stream(FILE *output_stream) {
  document_close_body_stream(output_stream);
  document_close_html_stream(output_stream);
}


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

x86 assembly (clang, -O2):
<document_close_stream>:
push   %rbx
mov    %rdi,%rbx
call   1040 <document_close_body_stream@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <document_close_html_stream@plt>

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

LLVM IR (-O2):
define void @document_close_stream(i32* %0) {
%2 = tail call i32 @document_close_body_stream(i32* %0)
%3 = tail call i32 @document_close_html_stream(i32* %0)
ret void
}
void teletype_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @teletype_exit() {
ret void
}
void resetbitfield(unsigned char *pageaddr, int mask, int shift, int val) {
  *pageaddr = (*pageaddr & ~(mask << shift)) | (((!val) & mask) << shift);
}


x86 assembly (clang, -O0):
<resetbitfield>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
cmpl   $0x0,-0x14(%rbp)
setne  %cl
xor    $0xff,%cl
and    $0x1,%cl
movzbl %cl,%edx
and    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetbitfield>:
mov    %ecx,%r8d
mov    %edx,%ecx
movzbl (%rdi),%edx
mov    %esi,%eax
shl    %cl,%eax
not    %eax
and    %edx,%eax
xor    %edx,%edx
test   %r8d,%r8d
sete   %dl
and    %esi,%edx
shl    %cl,%edx
or     %eax,%edx
mov    %dl,(%rdi)
ret

LLVM IR (-O0):
define void @resetbitfield(i8* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = shl i32 %12, %13
%15 = xor i32 %14, -1
%16 = and i32 %11, %15
%17 = load i32, i32* %8
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
%20 = zext i1 %19 to i32
%21 = load i32, i32* %6
%22 = and i32 %20, %21
%23 = load i32, i32* %7
%24 = shl i32 %22, %23
%25 = or i32 %16, %24
%26 = trunc i32 %25 to i8
%27 = load i8*, i8** %5
store i8 %26, i8* %27
ret void
}

LLVM IR (-O2):
define void @resetbitfield(i8* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = load i8, i8* %0
%6 = zext i8 %5 to i32
%7 = shl i32 %1, %2
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
%10 = icmp eq i32 %3, 0
%11 = zext i1 %10 to i32
%12 = and i32 %11, %1
%13 = shl nuw i32 %12, %2
%14 = or i32 %9, %13
%15 = trunc i32 %14 to i8
store i8 %15, i8* %0
ret void
}
/* Variables and functions */
int max_list(int, int, int, int, int, int, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  printf("%d", max_list(1, 2, 5, 4, 3, 7, 9, -1));
  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)
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x5,%edx
mov    $0x4,%ecx
mov    $0x3,%r8d
mov    $0x7,%r9d
movl   $0x9,(%rsp)
movl   $0xffffffff,0x8(%rsp)
ff
call   1040 <max_list@plt>
mov    %eax,%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
mov    $0x5,%edx
mov    $0x4,%ecx
mov    $0x3,%r8d
mov    $0x7,%r9d
push   $0xffffffffffffffff
push   $0x9
call   1040 <max_list@plt>
add    $0x10,%rsp
lea    0xeab(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @max_list(i32 1, i32 2, i32 5, i32 4, i32 3, i32 7, i32 9, i32 -1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Type definitions */
struct typeT {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ snprintf(char *, int, char *, double);
void numeric_to_string(struct typeT *self, double *x, char *str) {
  snprintf(str, 256, "%.6f", *x);
}


x86 assembly (clang, -O0):
<numeric_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x100,%esi
lea    0xec4(%rip),%rdx
call   1030 <snprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<numeric_to_string>:
mov    %rdx,%rdi
movsd  (%rsi),%xmm0
lea    0xee2(%rip),%rdx
mov    $0x100,%esi
jmp    1030 <snprintf@plt>

LLVM IR (-O0):
%struct.typeT = type { i32 }
@.str = [5 x i8] c"%.6f\00"
define void @numeric_to_string(%struct.typeT* %0, double* %1, i8* %2) {
%4 = alloca %struct.typeT*
%5 = alloca double*
%6 = alloca i8*
store %struct.typeT* %0, %struct.typeT** %4
store double* %1, double** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %6
%8 = load double*, double** %5
%9 = load double, double* %8
%10 = call i32 @snprintf(i8* %7, i32 256, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %9)
ret void
}

LLVM IR (-O2):
%struct.typeT = type { i32 }
@.str = [5 x i8] c"%.6f\00"
define void @numeric_to_string(%struct.typeT* nocapture readnone %0, double* nocapture %1, i8* %2) {
%4 = load double, double* %1
%5 = tail call i32 @snprintf(i8* %2, i32 256, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double %4)
ret void
}
int test_imm_CCuint16_reg(unsigned short val) {
  return ((val) & (-0xCC << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_CCuint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, -204
%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_CCuint16_reg(i16 zeroext %0) {
%2 = and i16 %0, -204
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned avcodec_version(void) { return 0x000406; }


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

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

LLVM IR (-O0):
define i32 @avcodec_version() {
ret i32 1030
}

LLVM IR (-O2):
define i32 @avcodec_version() {
ret i32 1030
}
/* Type definitions */
typedef int ssize_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int write(int, void *, size_t);
ssize_t x_write(int fd, void *buf, size_t count) {
  const ssize_t result = write(fd, buf, count);
  if (result == -1) {
    perror("write() error");
    exit(EXIT_FAILURE);
  }
  return result;
}


x86 assembly (clang, -O0):
<x_write>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <write@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    117a <x_write+0x4a>
lea    0xe99(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e6d(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_write>:
push   %rax
call   1030 <write@plt>
cmp    $0xffffffff,%eax
je     113d <x_write+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"write() error\00"
@EXIT_FAILURE = global i32 0
define i32 @x_write(i32 %0, i8* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i64, i64* %6
%11 = call i32 @write(i32 %8, i8* %9, i64 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@.str = [14 x i8] c"write() error\00"
@EXIT_FAILURE = global i32 0
define i32 @x_write(i32 %0, i8* nocapture %1, i64 %2) {
%4 = tail call i32 @write(i32 %0, i8* %1, i64 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
ret i32 %4
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
int stat(char *, struct stat *);
int lstat(char *name, struct stat *ans) { return stat(name, ans); }


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

x86 assembly (clang, -O2):
<lstat>:
jmp    1030 <stat@plt>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @lstat(i8* nocapture %0, %struct.stat* nocapture %1) {
%3 = tail call i32 @stat(i8* %0, %struct.stat* %1)
ret i32 %3
}
off_map(a, b) char a, b;
{
  char row, col;
  to_xy(a, b, &row, &col);
  if (col < 0 || col > 38 || row < 0 || row > 14)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<off_map>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%cl
mov    %sil,%al
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
movsbl -0x5(%rbp),%edi
movsbl -0x6(%rbp),%esi
lea    -0x7(%rbp),%rdx
lea    -0x8(%rbp),%rcx
mov    $0x0,%al
call   1030 <to_xy@plt>
movsbl -0x8(%rbp),%eax
cmp    $0x0,%eax
jl     116f <off_map+0x5f>
movsbl -0x8(%rbp),%eax
cmp    $0x26,%eax
jg     116f <off_map+0x5f>
movsbl -0x7(%rbp),%eax
cmp    $0x0,%eax
jl     116f <off_map+0x5f>
movsbl -0x7(%rbp),%eax
cmp    $0xe,%eax
jle    117b <off_map+0x6b>
movl   $0x1,-0x4(%rbp)
jmp    1182 <off_map+0x72>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<off_map>:
push   %rax
movsbl %dil,%edi
movsbl %sil,%esi
lea    0x7(%rsp),%rdx
lea    0x6(%rsp),%rcx
xor    %eax,%eax
call   1030 <to_xy@plt>
cmpb   $0x27,0x6(%rsp)
setae  %al
mov    0x7(%rsp),%cl
test   %cl,%cl
sets   %dl
or     %al,%dl
cmp    $0xf,%cl
setge  %al
or     %dl,%al
movzbl %al,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @off_map(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = trunc i32 %0 to i8
%9 = trunc i32 %1 to i8
store i8 %8, i8* %4
store i8 %9, i8* %5
%10 = load i8, i8* %4
%11 = sext i8 %10 to i32
%12 = load i8, i8* %5
%13 = sext i8 %12 to i32
%14 = call i32 (i32, i32, i8*, i8*, ...) bitcast (i32 (...)* @to_xy to i32 (i32, i32, i8*, i8*, ...)*)(i32 %11, i32 %13, i8* %6, i8* %7)
%15 = load i8, i8* %7
%16 = sext i8 %15 to i32
%17 = icmp slt i32 %16, 0
br i1 %17, label %30, label %18
18: ; preds = %2
%19 = load i8, i8* %7
%20 = sext i8 %19 to i32
%21 = icmp sgt i32 %20, 38
br i1 %21, label %30, label %22
22: ; preds = %18
%23 = load i8, i8* %6
%24 = sext i8 %23 to i32
%25 = icmp slt i32 %24, 0
br i1 %25, label %30, label %26
26: ; preds = %22
%27 = load i8, i8* %6
%28 = sext i8 %27 to i32
%29 = icmp sgt i32 %28, 14
br i1 %29, label %30, label %31
30: ; preds = %26, %22, %18, %2
store i32 1, i32* %3
br label %32
31: ; preds = %26
store i32 0, i32* %3
br label %32
32: ; preds = %31, %30
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @off_map(i32 %0, i32 %1) {
%3 = alloca i8
%4 = alloca i8
%5 = shl i32 %0, 24
%6 = ashr exact i32 %5, 24
%7 = shl i32 %1, 24
%8 = ashr exact i32 %7, 24
%9 = call i32 (i32, i32, i8*, i8*, ...) bitcast (i32 (...)* @to_xy to i32 (i32, i32, i8*, i8*, ...)*)(i32 %6, i32 %8, i8* %3, i8* %4)
%10 = load i8, i8* %4
%11 = icmp ugt i8 %10, 38
%12 = load i8, i8* %3
%13 = icmp slt i8 %12, 0
%14 = select i1 %11, i1 true, i1 %13
%15 = icmp sgt i8 %12, 14
%16 = select i1 %14, i1 true, i1 %15
%17 = zext i1 %16 to i32
ret i32 %17
}
void UARTIntClear(unsigned long ulBase, unsigned long ulIntFlags) {
  ;
  (*((volatile unsigned long *)(ulBase + 0x00000000))) = ~(ulIntFlags >> 16);
}


x86 assembly (clang, -O0):
<UARTIntClear>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rcx
shr    $0x10,%rcx
xor    $0xffffffffffffffff,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<UARTIntClear>:
shr    $0x10,%rsi
not    %rsi
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
define void @UARTIntClear(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = lshr i64 %5, 16
%7 = xor i64 %6, -1
%8 = load i64, i64* %3
%9 = add i64 %8, 0
%10 = inttoptr i64 %9 to i64*
store volatile i64 %7, i64* %10
ret void
}

LLVM IR (-O2):
define void @UARTIntClear(i64 %0, i64 %1) {
%3 = lshr i64 %1, 16
%4 = xor i64 %3, -1
%5 = inttoptr i64 %0 to i64*
store volatile i64 %4, i64* %5
ret void
}
void XFreeFontNames() {}


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

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

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

LLVM IR (-O2):
define void @XFreeFontNames() {
ret void
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
scalar_t__ get_time();
bool timed_out(time_t timestamp, time_t timeout) {
  return timestamp + timeout <= get_time();
}


x86 assembly (clang, -O0):
<timed_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1030 <get_time@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
cmp    %rcx,%rax
setle  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timed_out>:
push   %rbx
mov    %rdi,%rbx
add    %rsi,%rbx
xor    %eax,%eax
call   1030 <get_time@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
setle  %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @timed_out(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = add nsw i64 %5, %6
%8 = call i64 (...) @get_time()
%9 = icmp sle i64 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @timed_out(i64 %0, i64 %1) {
%3 = add nsw i64 %1, %0
%4 = tail call i64 (...) @get_time()
%5 = icmp sle i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fib_division(int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x = -1;
  while (x <= 0 || x >= 10)
    scanf("%d", &x);
  fib_division(x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
jle    114f <main+0x2f>
cmpl   $0xa,-0x8(%rbp)
setge  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    115f <main+0x3f>
jmp    1174 <main+0x54>
lea    0xe9a(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <scanf@plt>
jmp    1136 <main+0x16>
mov    -0x8(%rbp),%edi
call   1040 <fib_division@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
lea    0xecd(%rip),%r14
lea    0x4(%rsp),%rbx
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
mov    0x4(%rsp),%edi
lea    -0xa(%rdi),%eax
cmp    $0xfffffff7,%eax
jb     1140 <main+0x20>
call   1040 <fib_division@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 -1, i32* %2
br label %3
3: ; preds = %11, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = load i32, i32* %2
%8 = icmp sge i32 %7, 10
br label %9
9: ; preds = %6, %3
%10 = phi i1 [ true, %3 ], [ %8, %6 ]
br i1 %10, label %11, label %13
11: ; preds = %9
%12 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
br label %3
13: ; preds = %9
%14 = load i32, i32* %2
%15 = call i32 @fib_division(i32 %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 -1, i32* %1
br label %3
3: ; preds = %0, %3
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = add i32 %5, -10
%7 = icmp ult i32 %6, -9
br i1 %7, label %3, label %8
8: ; preds = %3
%9 = call i32 @fib_division(i32 %5)
ret i32 0
}
void rv2rv_or() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ siglongjmp(int /*<<< orphan*/, int);
void raise_siglongjmp(sigjmp_buf jbuf, int i, int n) {
  while (i < n)
    raise_siglongjmp(jbuf, i + 1, n);
  siglongjmp(jbuf, n);
}


x86 assembly (clang, -O0):
<raise_siglongjmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1153 <raise_siglongjmp+0x33>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
add    $0x1,%esi
mov    -0xc(%rbp),%edx
call   1030 <raise_siglongjmp@plt>
jmp    1131 <raise_siglongjmp+0x11>
mov    -0x4(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <siglongjmp@plt>

x86 assembly (clang, -O2):
<raise_siglongjmp>:
push   %rax
cmp    %edx,%esi
jge    112d <raise_siglongjmp+0xd>
add    $0x1,%esi
call   1030 <raise_siglongjmp@plt>
mov    %edx,%esi
call   1040 <siglongjmp@plt>

LLVM IR (-O0):
define void @raise_siglongjmp(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
br label %7
7: ; preds = %11, %3
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %16
11: ; preds = %7
%12 = load i32, i32* %4
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = load i32, i32* %6
br label %7
16: ; preds = %7
%17 = load i32, i32* %4
%18 = load i32, i32* %6
%19 = call i32 @siglongjmp(i32 %17, i32 %18)
unreachable
}

LLVM IR (-O2):
define void @raise_siglongjmp(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = add nsw i32 %1, 1
tail call void @raise_siglongjmp(i32 %0, i32 %6, i32 %2)
unreachable
7: ; preds = %3
%8 = tail call i32 @siglongjmp(i32 %0, i32 %2)
unreachable
}
/* Variables and functions */
void foo(int n) {
  extern void bar(int i[n][n]);
  extern int bar1(int a[new_i()][new_i()]);
}


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

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

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

LLVM IR (-O2):
define void @foo(i32 %0) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int write_quaddobl_start_system(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(244, a, b, c);
  return fail;
}


x86 assembly (clang, -O0):
<write_quaddobl_start_system>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0xf4,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_quaddobl_start_system>:
mov    $0xf4,%edi
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @write_quaddobl_start_system() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 244, i32* %5, i32* %6, double* %7)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @write_quaddobl_start_system() {
%1 = tail call i32 @_ada_use_c2phc(i32 244, i32* undef, i32* undef, double* undef)
ret i32 %1
}
void test_Global1(void) {}


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

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

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

LLVM IR (-O2):
define void @test_Global1() {
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
size_t strlen(char const *);
int git__suffixcmp(const char *str, const char *suffix) {
  size_t a = strlen(str);
  size_t b = strlen(suffix);
  if (a < b)
    return -1;
  return strcmp(str + (a - b), suffix);
}


x86 assembly (clang, -O0):
<git__suffixcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jae    1164 <git__suffixcmp+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    117f <git__suffixcmp+0x5f>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rax
sub    -0x28(%rbp),%rax
add    %rax,%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<git__suffixcmp>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
sub    %rax,%rbx
jae    114b <git__suffixcmp+0x2b>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %r15
ret
add    %rbx,%r15
mov    %r15,%rdi
mov    %r14,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <strcmp@plt>

LLVM IR (-O0):
define i32 @git__suffixcmp(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
%8 = load i8*, i8** %4
%9 = call i64 @strlen(i8* %8)
store i64 %9, i64* %6
%10 = load i8*, i8** %5
%11 = call i64 @strlen(i8* %10)
store i64 %11, i64* %7
%12 = load i64, i64* %6
%13 = load i64, i64* %7
%14 = icmp ult i64 %12, %13
br i1 %14, label %15, label %16
15: ; preds = %2
store i32 -1, i32* %3
br label %24
16: ; preds = %2
%17 = load i8*, i8** %4
%18 = load i64, i64* %6
%19 = load i64, i64* %7
%20 = sub i64 %18, %19
%21 = getelementptr inbounds i8, i8* %17, i64 %20
%22 = load i8*, i8** %5
%23 = call i32 @strcmp(i8* %21, i8* %22)
store i32 %23, i32* %3
br label %24
24: ; preds = %16, %15
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @git__suffixcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = icmp ult i64 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = sub i64 %3, %4
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %8, i8* dereferenceable(1) %1)
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ %9, %6 ], [ -1, %2 ]
ret i32 %11
}
void BN_BLINDING_new(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_BLINDING_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void utils_clrscr() { printf("\033[H\033[2J"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @utils_clrscr() {
%1 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[H\1B[2J\00"
define void @utils_clrscr() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
int Cyc_do_binding(int ignore, struct Cyc_List_List *tds) {
  ({ Cyc_Binding_resolve_all(tds); });
  return 1;
}


x86 assembly (clang, -O0):
<Cyc_do_binding>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x0,%al
call   1030 <Cyc_Binding_resolve_all@plt>
mov    %eax,-0x14(%rbp)
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_do_binding>:
push   %rax
mov    %rsi,%rdi
xor    %eax,%eax
call   1030 <Cyc_Binding_resolve_all@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.Cyc_List_List = type opaque
define i32 @Cyc_do_binding(i32 %0, %struct.Cyc_List_List* %1) {
%3 = alloca i32
%4 = alloca %struct.Cyc_List_List*
%5 = alloca i32
store i32 %0, i32* %3
store %struct.Cyc_List_List* %1, %struct.Cyc_List_List** %4
%6 = load %struct.Cyc_List_List*, %struct.Cyc_List_List** %4
%7 = call i32 (%struct.Cyc_List_List*, ...) bitcast (i32 (...)* @Cyc_Binding_resolve_all to i32 (%struct.Cyc_List_List*, ...)*)(%struct.Cyc_List_List* %6)
store i32 %7, i32* %5
%8 = load i32, i32* %5
ret i32 1
}

LLVM IR (-O2):
%struct.Cyc_List_List = type opaque
define i32 @Cyc_do_binding(i32 %0, %struct.Cyc_List_List* %1) {
%3 = tail call i32 (%struct.Cyc_List_List*, ...) bitcast (i32 (...)* @Cyc_Binding_resolve_all to i32 (%struct.Cyc_List_List*, ...)*)(%struct.Cyc_List_List* %1)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ flushinp();
void jerk_flushinp(void) { flushinp(); }


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

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

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

LLVM IR (-O2):
define void @jerk_flushinp() {
%1 = tail call i32 (...) @flushinp()
ret void
}
/* Variables and functions */
int nsl_sort_compare_size_t(const void *a, const void *b) {
  size_t _a = *((size_t *)a);
  size_t _b = *((size_t *)b);
  return (_a > _b) - (_a < _b);
}


x86 assembly (clang, -O0):
<nsl_sort_compare_size_t>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
cmp    -0x20(%rbp),%rcx
setb   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nsl_sort_compare_size_t>:
mov    (%rdi),%rcx
xor    %eax,%eax
cmp    (%rsi),%rcx
seta   %al
sbb    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @nsl_sort_compare_size_t(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i64*
%9 = load i64, i64* %8
store i64 %9, i64* %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i64*
%12 = load i64, i64* %11
store i64 %12, i64* %6
%13 = load i64, i64* %5
%14 = load i64, i64* %6
%15 = icmp ugt i64 %13, %14
%16 = zext i1 %15 to i32
%17 = load i64, i64* %5
%18 = load i64, i64* %6
%19 = icmp ult i64 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @nsl_sort_compare_size_t(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp ugt i64 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp ult i64 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main() {
  int die_flip;
  srand(time(NULL));
  die_flip = rand() % 6 + 1;
  printf("congratulations, you rolled a %d !", die_flip);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
add    $0x1,%edx
mov    %edx,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe82(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1,%esi
lea    0xe80(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [35 x i8] c"congratulations, you rolled a %d !\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @time(i32* null)
%4 = call i32 @srand(i32 %3)
%5 = call i32 (...) @rand()
%6 = srem i32 %5, 6
%7 = add nsw i32 %6, 1
store i32 %7, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [35 x i8] c"congratulations, you rolled a %d !\00"
define i32 @main() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @srand(i32 %1)
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 6
%5 = add nsw i32 %4, 1
%6 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
int __iscntrl_ascii(int ch) { return (unsigned int)ch < 32u || ch == 127; }


x86 assembly (clang, -O0):
<__iscntrl_ascii>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x20,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jb     1120 <__iscntrl_ascii+0x20>
cmpl   $0x7f,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__iscntrl_ascii>:
cmp    $0x20,%edi
setb   %al
cmp    $0x7f,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @__iscntrl_ascii(i32 %0) {
%2 = icmp ult i32 %0, 32
%3 = icmp eq i32 %0, 127
%4 = or i1 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void printErrorAndQuit(char *msg) {
  perror(msg);
  exit(1);
}


x86 assembly (clang, -O0):
<printErrorAndQuit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printErrorAndQuit>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @printErrorAndQuit(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @printErrorAndQuit(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SN_close_env(struct SN_env *);
extern void finnish_UTF_8_close_env(struct SN_env *z) { SN_close_env(z); }


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

x86 assembly (clang, -O2):
<finnish_UTF_8_close_env>:
jmp    1030 <SN_close_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define void @finnish_UTF_8_close_env(%struct.SN_env* %0) {
%2 = alloca %struct.SN_env*
store %struct.SN_env* %0, %struct.SN_env** %2
%3 = load %struct.SN_env*, %struct.SN_env** %2
%4 = call i32 @SN_close_env(%struct.SN_env* %3)
ret void
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define void @finnish_UTF_8_close_env(%struct.SN_env* %0) {
%2 = tail call i32 @SN_close_env(%struct.SN_env* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ example();
int /*<<< orphan*/ sequential_destroy();
int /*<<< orphan*/ sequential_init();
int main() {
  sequential_init();
  example();
  sequential_destroy();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <sequential_init@plt>
mov    $0x0,%al
call   1040 <example@plt>
mov    $0x0,%al
call   1030 <sequential_destroy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <sequential_init@plt>
xor    %eax,%eax
call   1040 <example@plt>
xor    %eax,%eax
call   1030 <sequential_destroy@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @sequential_init()
%3 = call i32 (...) @example()
%4 = call i32 (...) @sequential_destroy()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @sequential_init()
%2 = tail call i32 (...) @example()
%3 = tail call i32 (...) @sequential_destroy()
ret i32 0
}
/* Variables and functions */
scalar_t__ isfinite(double const);
bool accept_nonnegfin_double(void *val) {
  const double *dval = (const double *)val;
  return (val && isfinite(*dval) && *dval >= 0.00);
}


x86 assembly (clang, -O0):
<accept_nonnegfin_double>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     1168 <accept_nonnegfin_double+0x58>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
call   1030 <isfinite@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     1168 <accept_nonnegfin_double+0x58>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept_nonnegfin_double>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
test   %rdi,%rdi
je     113d <accept_nonnegfin_double+0x2d>
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
call   1030 <isfinite@plt>
test   %rax,%rax
je     113d <accept_nonnegfin_double+0x2d>
movsd  (%rbx),%xmm0
xorpd  %xmm1,%xmm1
xor    %ebp,%ebp
ucomisd %xmm1,%xmm0
setae  %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @accept_nonnegfin_double(i8* %0) {
%2 = alloca i8*
%3 = alloca double*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to double*
store double* %5, double** %3
%6 = load i8*, i8** %2
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %17
8: ; preds = %1
%9 = load double*, double** %3
%10 = load double, double* %9
%11 = call i64 @isfinite(double %10)
%12 = icmp ne i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %8
%14 = load double*, double** %3
%15 = load double, double* %14
%16 = fcmp oge double %15, 0.000000e+00
br label %17
17: ; preds = %13, %8, %1
%18 = phi i1 [ false, %8 ], [ false, %1 ], [ %16, %13 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @accept_nonnegfin_double(i8* %0) {
%2 = bitcast i8* %0 to double*
%3 = icmp eq i8* %0, null
br i1 %3, label %12, label %4
4: ; preds = %1
%5 = load double, double* %2
%6 = tail call i64 @isfinite(double %5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = load double, double* %2
%10 = fcmp oge double %9, 0.000000e+00
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %4, %1
%13 = phi i32 [ 0, %4 ], [ 0, %1 ], [ %11, %8 ]
ret i32 %13
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int detail;
};
typedef TYPE_1__ XFocusOutEvent;

/* Variables and functions */
void set_XFocusOutEvent_detail(void *_p, int _v) {
  ((XFocusOutEvent *)_p)->detail = (int)_v;
}


x86 assembly (clang, -O0):
<set_XFocusOutEvent_detail>:
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_XFocusOutEvent_detail>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XFocusOutEvent_detail(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_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XFocusOutEvent_detail(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}