xunge/DecIR huggingface dataset:
double form_volume(double length_a, double b2a_ratio, double c2a_ratio,
                   double thickness) {
  const double length_b = length_a * b2a_ratio;
  const double length_c = length_a * c2a_ratio;
  const double form_volume = length_a * length_b * length_c;
  return form_volume;
}


x86 assembly (clang, -O0):
<form_volume>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x28(%rbp),%xmm0
mulsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<form_volume>:
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm2
mulsd  %xmm1,%xmm0
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @form_volume(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%12 = load double, double* %5
%13 = load double, double* %6
%14 = fmul double %12, %13
store double %14, double* %9
%15 = load double, double* %5
%16 = load double, double* %7
%17 = fmul double %15, %16
store double %17, double* %10
%18 = load double, double* %5
%19 = load double, double* %9
%20 = fmul double %18, %19
%21 = load double, double* %10
%22 = fmul double %20, %21
store double %22, double* %11
%23 = load double, double* %11
ret double %23
}

LLVM IR (-O2):
define double @form_volume(double %0, double %1, double %2, double %3) {
%5 = fmul double %0, %1
%6 = fmul double %0, %2
%7 = fmul double %5, %0
%8 = fmul double %7, %6
ret double %8
}
/* Variables and functions */
void *retro_get_memory_data(unsigned id) {
  (void)id;
  return NULL;
}


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

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

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

LLVM IR (-O2):
define noalias i8* @retro_get_memory_data(i32 %0) {
ret i8* null
}
long vpx_usec_timer_elapsed(struct vpx_usec_timer *t) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.vpx_usec_timer = type opaque
define i64 @vpx_usec_timer_elapsed(%struct.vpx_usec_timer* nocapture readnone %0) {
ret i64 0
}
/* Type definitions */
typedef int /*<<< orphan*/ iconv_t;

/* Variables and functions */
int __bsd_iconv_close(int /*<<< orphan*/);
int iconv_close_compat(iconv_t a) { return __bsd_iconv_close(a); }


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

x86 assembly (clang, -O2):
<iconv_close_compat>:
jmp    1030 <__bsd_iconv_close@plt>

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

LLVM IR (-O2):
define i32 @iconv_close_compat(i32 %0) {
%2 = tail call i32 @__bsd_iconv_close(i32 %0)
ret i32 %2
}
/* Type definitions */
struct obstack {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _obstack_newchunk(struct obstack *, int);
__attribute__((__weak__, __always___)) void
softboundmpx__obstack_newchunk(struct obstack *obj, int b) {
  _obstack_newchunk(obj, b);
}


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

x86 assembly (clang, -O2):
<softboundmpx__obstack_newchunk>:
jmp    1030 <_obstack_newchunk@plt>

LLVM IR (-O0):
%struct.obstack = type { i32 }
define weak void @softboundmpx__obstack_newchunk(%struct.obstack* %0, i32 %1) {
%3 = alloca %struct.obstack*
%4 = alloca i32
store %struct.obstack* %0, %struct.obstack** %3
store i32 %1, i32* %4
%5 = load %struct.obstack*, %struct.obstack** %3
%6 = load i32, i32* %4
%7 = call i32 @_obstack_newchunk(%struct.obstack* %5, i32 %6)
ret void
}

LLVM IR (-O2):
%struct.obstack = type { i32 }
define weak void @softboundmpx__obstack_newchunk(%struct.obstack* %0, i32 %1) {
%3 = tail call i32 @_obstack_newchunk(%struct.obstack* %0, i32 %1)
ret void
}
void func2() { int v2 = 2; }


x86 assembly (clang, -O0):
<func2>:
push   %rbp
mov    %rsp,%rbp
movl   $0x2,-0x4(%rbp)
pop    %rbp
ret

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

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

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

/* Variables and functions */
int mpz_size(int /*<<< orphan*/);
unsigned int getMpzSize(mpz_t n) { return (mpz_size(n) * 2); }


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

x86 assembly (clang, -O2):
<getMpzSize>:
push   %rax
call   1030 <mpz_size@plt>
add    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getMpzSize(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @mpz_size(i32 %3)
%5 = mul nsw i32 %4, 2
ret i32 %5
}

LLVM IR (-O2):
define i32 @getMpzSize(i32 %0) {
%2 = tail call i32 @mpz_size(i32 %0)
%3 = shl nsw i32 %2, 1
ret i32 %3
}
int search(int a[], int size, int x) {
  if (a) {
    int i;
    for (i = 0; i < size; i++) {
      if (a[i] == x) {
        return i;
      }
    }
  }
  return -1;
}


x86 assembly (clang, -O0):
<search>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1163 <search+0x63>
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115e <search+0x5e>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x18(%rbp),%eax
jne    114b <search+0x4b>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116a <search+0x6a>
jmp    1150 <search+0x50>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1120 <search+0x20>
jmp    1163 <search+0x63>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<search>:
mov    $0xffffffff,%eax
test   %rdi,%rdi
je     112e <search+0x2e>
test   %esi,%esi
jle    112e <search+0x2e>
mov    %esi,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmp    %edx,(%rdi,%rcx,4)
je     112f <search+0x2f>
add    $0x1,%rcx
cmp    %rcx,%rsi
jne    1120 <search+0x20>
ret
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @search(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32
%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
%9 = load i32*, i32** %5
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %31
11: ; preds = %3
store i32 0, i32* %8
br label %12
12: ; preds = %27, %11
%13 = load i32, i32* %8
%14 = load i32, i32* %6
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %30
16: ; preds = %12
%17 = load i32*, i32** %5
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i32, i32* %17, i64 %19
%21 = load i32, i32* %20
%22 = load i32, i32* %7
%23 = icmp eq i32 %21, %22
br i1 %23, label %24, label %26
24: ; preds = %16
%25 = load i32, i32* %8
store i32 %25, i32* %4
br label %32
26: ; preds = %16
br label %27
27: ; preds = %26
%28 = load i32, i32* %8
%29 = add nsw i32 %28, 1
store i32 %29, i32* %8
br label %12
30: ; preds = %12
br label %31
31: ; preds = %30, %3
store i32 -1, i32* %4
br label %32
32: ; preds = %31, %24
%33 = load i32, i32* %4
ret i32 %33
}

LLVM IR (-O2):
define i32 @search(i32* %0, i32 %1, i32 %2) {
%4 = icmp ne i32* %0, null
%5 = icmp sgt i32 %1, 0
%6 = and i1 %4, %5
br i1 %6, label %7, label %19
7: ; preds = %3
%8 = zext i32 %1 to i64
br label %9
9: ; preds = %7, %14
%10 = phi i64 [ 0, %7 ], [ %15, %14 ]
%11 = getelementptr inbounds i32, i32* %0, i64 %10
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, %2
br i1 %13, label %17, label %14
14: ; preds = %9
%15 = add nuw nsw i64 %10, 1
%16 = icmp eq i64 %15, %8
br i1 %16, label %19, label %9
17: ; preds = %9
%18 = trunc i64 %10 to i32
br label %19
19: ; preds = %14, %17, %3
%20 = phi i32 [ -1, %3 ], [ %18, %17 ], [ -1, %14 ]
ret i32 %20
}
int pad_len(int len) { return (len + 3) & ~3; }


x86 assembly (clang, -O0):
<pad_len>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x3,%eax
and    $0xfffffffc,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pad_len>:
lea    0x3(%rdi),%eax
and    $0xfffffffc,%eax
ret

LLVM IR (-O0):
define i32 @pad_len(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 3
%5 = and i32 %4, -4
ret i32 %5
}

LLVM IR (-O2):
define i32 @pad_len(i32 %0) {
%2 = add nsw i32 %0, 3
%3 = and i32 %2, -4
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ le32_to_cpu(int /*<<< orphan*/);
int32_t cpu_to_le32(int32_t x) { return (le32_to_cpu(x)); }


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

x86 assembly (clang, -O2):
<cpu_to_le32>:
jmp    1030 <le32_to_cpu@plt>

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

LLVM IR (-O2):
define i32 @cpu_to_le32(i32 %0) {
%2 = tail call i32 @le32_to_cpu(i32 %0)
ret i32 %2
}
void gtk_cell_renderer_text_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_cell_renderer_text_get_type() {
ret void
}
/* Variables and functions */
scalar_t__ waitforack(int);
int write(int, char *, int);
int sendConnect(int sock) {
  int bsent;
  bsent = write(sock, "CON", sizeof("CON"));
  if (bsent < sizeof("CON"))
    return (-1);
  if (waitforack(sock) == 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<sendConnect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    0xecb(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
cmp    $0x4,%rax
jae    115c <sendConnect+0x3c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1181 <sendConnect+0x61>
mov    -0x8(%rbp),%edi
call   1040 <waitforack@plt>
cmp    $0x0,%rax
jne    117a <sendConnect+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1181 <sendConnect+0x61>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sendConnect>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rsi
mov    $0x4,%edx
call   1030 <write@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x4,%ecx
jb     1152 <sendConnect+0x32>
mov    %ebx,%edi
call   1040 <waitforack@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"CON\00"
define i32 @sendConnect(i32 %0) {
%2 = tail call i32 @write(i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 4)
%3 = icmp ult i32 %2, 4
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @waitforack(i32 %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ -1, %1 ], [ %7, %4 ]
ret i32 %9
}
int test_imm_3Duint64_midword_reg(unsigned long long val) {
  return ((val >> 16) & (0x3D << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_3Duint64_midword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
shr    $0x10,%rdx
and    $0x3d,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_3Duint64_midword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 16
%5 = and i64 %4, 61
%6 = icmp ne i64 %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_3Duint64_midword_reg(i64 %0) {
%2 = and i64 %0, 3997696
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int err_syntax11_parse();
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  printf("yyparse() = %d\n", err_syntax11_parse());
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <err_syntax11_parse@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [16 x i8] c"yyparse() = %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @err_syntax11_parse()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
char *getcwd(char *, size_t);
char *fs_getcwd(char *buf, size_t size) { return getcwd(buf, size); }


x86 assembly (clang, -O0):
<fs_getcwd>:
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 <getcwd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fs_getcwd>:
jmp    1030 <getcwd@plt>

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

LLVM IR (-O2):
define i8* @fs_getcwd(i8* %0, i64 %1) {
%3 = tail call i8* @getcwd(i8* %0, i64 %1)
ret i8* %3
}
int valid_Date(char *egn) {
  int month;
  month = (egn[2] - '0') * 10 + (egn[3] - '0');
  if ((month > 0 && month < 13) || (month > 20 || month < 33) ||
      (month > 40 || month < 53))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<valid_Date>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsbl 0x2(%rax),%eax
sub    $0x30,%eax
imul   $0xa,%eax,%eax
mov    -0x10(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jle    113a <valid_Date+0x3a>
cmpl   $0xd,-0x14(%rbp)
jl     1162 <valid_Date+0x62>
cmpl   $0x14,-0x14(%rbp)
jg     1162 <valid_Date+0x62>
cmpl   $0x21,-0x14(%rbp)
jl     1162 <valid_Date+0x62>
cmpl   $0x28,-0x14(%rbp)
jg     1162 <valid_Date+0x62>
cmpl   $0x35,-0x14(%rbp)
jge    116e <valid_Date+0x6e>
movl   $0x1,-0x4(%rbp)
jmp    1175 <valid_Date+0x75>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @valid_Date(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = getelementptr inbounds i8, i8* %5, i64 2
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 48
%10 = mul nsw i32 %9, 10
%11 = load i8*, i8** %3
%12 = getelementptr inbounds i8, i8* %11, i64 3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = sub nsw i32 %14, 48
%16 = add nsw i32 %10, %15
store i32 %16, i32* %4
%17 = load i32, i32* %4
%18 = icmp sgt i32 %17, 0
br i1 %18, label %19, label %22
19: ; preds = %1
%20 = load i32, i32* %4
%21 = icmp slt i32 %20, 13
br i1 %21, label %34, label %22
22: ; preds = %19, %1
%23 = load i32, i32* %4
%24 = icmp sgt i32 %23, 20
br i1 %24, label %34, label %25
25: ; preds = %22
%26 = load i32, i32* %4
%27 = icmp slt i32 %26, 33
br i1 %27, label %34, label %28
28: ; preds = %25
%29 = load i32, i32* %4
%30 = icmp sgt i32 %29, 40
br i1 %30, label %34, label %31
31: ; preds = %28
%32 = load i32, i32* %4
%33 = icmp slt i32 %32, 53
br i1 %33, label %34, label %35
34: ; preds = %31, %28, %25, %22, %19
store i32 1, i32* %2
br label %36
35: ; preds = %31
store i32 0, i32* %2
br label %36
36: ; preds = %35, %34
%37 = load i32, i32* %2
ret i32 %37
}

LLVM IR (-O2):
define i32 @valid_Date(i8* nocapture readnone %0) {
ret i32 1
}
double aint(double x) {
  int ix = (int)(x);
  return ((double)(ix));
}


x86 assembly (clang, -O0):
<aint>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
cvtsi2sdl -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<aint>:
cvttpd2dq %xmm0,%xmm0
cvtdq2pd %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @aint(double %0) {
%2 = alloca double
%3 = alloca i32
store double %0, double* %2
%4 = load double, double* %2
%5 = fptosi double %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = sitofp i32 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @aint(double %0) {
%2 = fptosi double %0 to i32
%3 = sitofp i32 %2 to double
ret double %3
}
void lis3l02dq_unconfigure_ring(struct iio_dev *indio_dev) {}


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

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

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

LLVM IR (-O2):
%struct.iio_dev = type opaque
define void @lis3l02dq_unconfigure_ring(%struct.iio_dev* nocapture %0) {
ret void
}
/* Type definitions */
struct wl_shm_pool {
  int dummy;
};
struct wl_resource {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ shm_pool_unref(struct wl_shm_pool *, int);
struct wl_shm_pool *wl_resource_get_user_data(struct wl_resource *);
void destroy_pool(struct wl_resource *resource) {
  struct wl_shm_pool *pool = wl_resource_get_user_data(resource);
  shm_pool_unref(pool, false);
}


x86 assembly (clang, -O0):
<destroy_pool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <wl_resource_get_user_data@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1040 <shm_pool_unref@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_pool>:
push   %rax
call   1030 <wl_resource_get_user_data@plt>
mov    %rax,%rdi
xor    %esi,%esi
pop    %rax
jmp    1040 <shm_pool_unref@plt>

LLVM IR (-O0):
%struct.wl_resource = type { i32 }
%struct.wl_shm_pool = type { i32 }
define void @destroy_pool(%struct.wl_resource* %0) {
%2 = alloca %struct.wl_resource*
%3 = alloca %struct.wl_shm_pool*
store %struct.wl_resource* %0, %struct.wl_resource** %2
%4 = load %struct.wl_resource*, %struct.wl_resource** %2
%5 = call %struct.wl_shm_pool* @wl_resource_get_user_data(%struct.wl_resource* %4)
store %struct.wl_shm_pool* %5, %struct.wl_shm_pool** %3
%6 = load %struct.wl_shm_pool*, %struct.wl_shm_pool** %3
%7 = call i32 @shm_pool_unref(%struct.wl_shm_pool* %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.wl_resource = type { i32 }
%struct.wl_shm_pool = type { i32 }
define void @destroy_pool(%struct.wl_resource* %0) {
%2 = tail call %struct.wl_shm_pool* @wl_resource_get_user_data(%struct.wl_resource* %0)
%3 = tail call i32 @shm_pool_unref(%struct.wl_shm_pool* %2, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ printf(char *, int, char *);
void GP_add_vertex_s(void *arg, int v, char *label) {
  printf("v %d %s\n", v, label);
  free(label);
}


x86 assembly (clang, -O0):
<GP_add_vertex_s>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GP_add_vertex_s>:
push   %rbx
mov    %rdx,%rbx
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"v %d %s\0A\00"
define void @GP_add_vertex_s(i8* nocapture readnone %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
%5 = tail call i32 @free(i8* %2)
ret void
}
XRemoveHost() {}


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

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

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

LLVM IR (-O2):
define i32 @XRemoveHost() {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("usage: sudoku [OPTIONS] PUZZLE_FILE\n"
         "\n"
         "Options:\n"
         "  -n    print only the number of solutions found\n"
         "  -h    show this message and exit\n");
}


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

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

LLVM IR (-O0):
@.str = [131 x i8] c"usage: sudoku [OPTIONS] PUZZLE_FILE\0A\0AOptions:\0A -n print only the number of solutions found\0A -h show this message and exit\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([131 x i8], [131 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [130 x i8] c"usage: sudoku [OPTIONS] PUZZLE_FILE\0A\0AOptions:\0A -n print only the number of solutions found\0A -h show this message and exit\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([130 x i8], [130 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int pthread_mutex_trylock(int /*<<< orphan*/ *);
int fthread_mutex_trylock_(pthread_mutex_t **theMutex) {
  return (pthread_mutex_trylock(*theMutex));
}


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

x86 assembly (clang, -O2):
<fthread_mutex_trylock_>:
mov    (%rdi),%rdi
jmp    1030 <pthread_mutex_trylock@plt>

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

LLVM IR (-O2):
define i32 @fthread_mutex_trylock_(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = tail call i32 @pthread_mutex_trylock(i32* %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ delay_ms(int);
void tempocurto() { delay_ms(1); }


x86 assembly (clang, -O0):
<tempocurto>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <delay_ms@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<tempocurto>:
mov    $0x1,%edi
jmp    1030 <delay_ms@plt>

LLVM IR (-O0):
define void @tempocurto() {
%1 = call i32 @delay_ms(i32 1)
ret void
}

LLVM IR (-O2):
define void @tempocurto() {
%1 = tail call i32 @delay_ms(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void print_help() {
  fprintf(
      stderr, "%s",
      "\n"
      "./captest -i <interface ip> -w <output file> [-f <filter expression>]\n"
      "\n"
      "Captures packets with libpcap, and dumps them into output file.\n"
      "This program tests the functioning of libpcap.\n"
      "\n"
      "\n"
      "Options:\n"
      "	-i <interface ip>	ip address of interface\n"
      "	-w <output file>	output file (pcap format)\n"
      "	-f <filter expression>	(for syntax see man pcap-filter(7))\n");
  exit(1);
}


x86 assembly (clang, -O0):
<print_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
lea    0xec8(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_help>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
lea    0xecb(%rip),%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [342 x i8] c"\0A./captest -i <interface ip> -w <output file> [-f <filter expression>]\0A\0ACaptures packets with libpcap, and dumps them into output file.\0AThis program tests the functioning of libpcap.\0A\0A\0AOptions:\0A\09-i <interface ip>\09ip address of interface\0A\09-w <output file>\09output file (pcap format)\0A\09-f <filter expression>\09(for syntax see man pcap-filter(7))\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([342 x i8], [342 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c"%s\00"
@.str.1 = [342 x i8] c"\0A./captest -i <interface ip> -w <output file> [-f <filter expression>]\0A\0ACaptures packets with libpcap, and dumps them into output file.\0AThis program tests the functioning of libpcap.\0A\0A\0AOptions:\0A\09-i <interface ip>\09ip address of interface\0A\09-w <output file>\09output file (pcap format)\0A\09-f <filter expression>\09(for syntax see man pcap-filter(7))\0A\00"
define void @print_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([342 x i8], [342 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
int main(void) {
  system("ls");
  return (0);
}


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"ls\00"
define i32 @main() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
unsigned xrop3_57_0_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~D;
  stk2 = T | stk3;
  stk1 = S ^ stk2;
  return (stk1 & S) | (stk1 & (~T)) | (T & (~S) & D);
}


x86 assembly (clang, -O0):
<xrop3_57_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
and    -0xc(%rbp),%eax
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
mov    -0x10(%rbp),%ecx
mov    -0xc(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
and    -0x8(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_57_0_1>:
mov    %edi,%eax
shl    $0x8,%eax
or     %edi,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
lea    -0x100(%rsi),%edx
xor    %eax,%edx
not    %ecx
or     %eax,%ecx
and    %edx,%ecx
not    %eax
and    %esi,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_57_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %5
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %6
%29 = load i32, i32* %9
%30 = xor i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = load i32, i32* %6
%33 = and i32 %31, %32
%34 = load i32, i32* %8
%35 = load i32, i32* %7
%36 = xor i32 %35, -1
%37 = and i32 %34, %36
%38 = or i32 %33, %37
%39 = load i32, i32* %7
%40 = load i32, i32* %6
%41 = xor i32 %40, -1
%42 = and i32 %39, %41
%43 = load i32, i32* %5
%44 = and i32 %42, %43
%45 = or i32 %38, %44
ret i32 %45
}

LLVM IR (-O2):
define i32 @xrop3_57_0_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %5, -256
%8 = xor i32 %4, %7
%9 = xor i32 %6, -1
%10 = or i32 %4, %9
%11 = and i32 %10, %8
%12 = xor i32 %4, -1
%13 = and i32 %12, %5
%14 = or i32 %11, %13
ret i32 %14
}
int super_written(struct bio *bio, unsigned int bytes_done, int error) {
  int a;
  return a;
}


x86 assembly (clang, -O0):
<super_written>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.bio = type opaque
define i32 @super_written(%struct.bio* %0, i32 %1, i32 %2) {
%4 = alloca %struct.bio*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store %struct.bio* %0, %struct.bio** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
%struct.bio = type opaque
define i32 @super_written(%struct.bio* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 undef
}
int xenoprof_backtrace_supported(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @xenoprof_backtrace_supported() {
ret i32 1
}

LLVM IR (-O2):
define i32 @xenoprof_backtrace_supported() {
ret i32 1
}
void gui_print(const char *fmt, ...) { return; }


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

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

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

LLVM IR (-O2):
define void @gui_print(i8* nocapture %0, ...) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ serial;
};
typedef TYPE_1__ XColormapEvent;

/* Variables and functions */
unsigned long get_XColormapEvent_serial(void *_p) {
  return (unsigned long)((XColormapEvent *)_p)->serial;
}


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define i64 @get_XColormapEvent_serial(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
ret i64 %6
}

LLVM IR (-O2):
define i64 @get_XColormapEvent_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void nice(int n) {}


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

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

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

LLVM IR (-O2):
define void @nice(i32 %0) {
ret void
}
int sim_isupper(int c) { return (c >= 'A') && (c <= 'Z'); }


x86 assembly (clang, -O0):
<sim_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x41,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <sim_isupper+0x20>
cmpl   $0x5a,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sim_isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @sim_isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int sem_destroy(sem_t *sem) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @sem_destroy(i32* nocapture readnone %0) {
ret i32 1
}
/* Variables and functions */
void *mf__mem_alloc(size_t);
void *mem_alloc(size_t size) {
  void *r_ptr = NULL;
  ;
  r_ptr = mf__mem_alloc(size);
  ;
  return (r_ptr);
}


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

x86 assembly (clang, -O2):
<mem_alloc>:
jmp    1030 <mf__mem_alloc@plt>

LLVM IR (-O0):
define i8* @mem_alloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
store i8* null, i8** %3
%4 = load i64, i64* %2
%5 = call i8* @mf__mem_alloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @mem_alloc(i64 %0) {
%2 = tail call i8* @mf__mem_alloc(i64 %0)
ret i8* %2
}
long double GSL_MIN_LDBL(long double a, long double b) {
  return ((a) < (b) ? (a) : (b));
}


x86 assembly (clang, -O0):
<GSL_MIN_LDBL>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fucomip %st(1),%st
fstp   %st(0)
jbe    1130 <GSL_MIN_LDBL+0x30>
jmp    1125 <GSL_MIN_LDBL+0x25>
fldt   -0x10(%rbp)
fstpt  -0x2c(%rbp)
jmp    1136 <GSL_MIN_LDBL+0x36>
fldt   -0x20(%rbp)
fstpt  -0x2c(%rbp)
fldt   -0x2c(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GSL_MIN_LDBL>:
fldt   0x8(%rsp)
fldt   0x18(%rsp)
fucomi %st(1),%st
fcmovnbe %st(1),%st
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @GSL_MIN_LDBL(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp olt x86_fp80 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load x86_fp80, x86_fp80* %3
br label %12
10: ; preds = %2
%11 = load x86_fp80, x86_fp80* %4
br label %12
12: ; preds = %10, %8
%13 = phi x86_fp80 [ %9, %8 ], [ %11, %10 ]
ret x86_fp80 %13
}

LLVM IR (-O2):
define x86_fp80 @GSL_MIN_LDBL(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp olt x86_fp80 %0, %1
%4 = select i1 %3, x86_fp80 %0, x86_fp80 %1
ret x86_fp80 %4
}
/* Type definitions */
struct _int_list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ int_list_add(struct _int_list *, int);
struct _int_list *int_list_initial();
struct _int_list *int_list_initial_fill(int length, int value) {
  struct _int_list *s = int_list_initial();
  int i;
  for (i = 0; i < length; i++)
    int_list_add(s, value);
  return s;
}


x86 assembly (clang, -O0):
<int_list_initial_fill>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <int_list_initial@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1166 <int_list_initial_fill+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1040 <int_list_add@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1140 <int_list_initial_fill+0x20>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_list_initial_fill>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <int_list_initial@plt>
mov    %rax,%rbx
test   %ebp,%ebp
jle    1150 <int_list_initial_fill+0x30>
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    %r14d,%esi
call   1040 <int_list_add@plt>
add    $0xffffffff,%ebp
jne    1140 <int_list_initial_fill+0x20>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
%struct._int_list = type { i32 }
define %struct._int_list* @int_list_initial_fill(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct._int_list*
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = call %struct._int_list* (...) @int_list_initial()
store %struct._int_list* %7, %struct._int_list** %5
store i32 0, i32* %6
br label %8
8: ; preds = %16, %2
%9 = load i32, i32* %6
%10 = load i32, i32* %3
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %19
12: ; preds = %8
%13 = load %struct._int_list*, %struct._int_list** %5
%14 = load i32, i32* %4
%15 = call i32 @int_list_add(%struct._int_list* %13, i32 %14)
br label %16
16: ; preds = %12
%17 = load i32, i32* %6
%18 = add nsw i32 %17, 1
store i32 %18, i32* %6
br label %8
19: ; preds = %8
%20 = load %struct._int_list*, %struct._int_list** %5
ret %struct._int_list* %20
}

LLVM IR (-O2):
%struct._int_list = type { i32 }
define %struct._int_list* @int_list_initial_fill(i32 %0, i32 %1) {
%3 = tail call %struct._int_list* (...) @int_list_initial()
%4 = icmp sgt i32 %0, 0
br i1 %4, label %5, label %10
5: ; preds = %2, %5
%6 = phi i32 [ %8, %5 ], [ 0, %2 ]
%7 = tail call i32 @int_list_add(%struct._int_list* %3, i32 %1)
%8 = add nuw nsw i32 %6, 1
%9 = icmp eq i32 %8, %0
br i1 %9, label %10, label %5
10: ; preds = %5, %2
ret %struct._int_list* %3
}
int valid_bo_pre_v2(long value) {
  if ((value & 0x14) == 0)
    return 1;
  else if ((value & 0x14) == 0x4)
    return (value & 0x2) == 0;
  else if ((value & 0x14) == 0x10)
    return (value & 0x8) == 0;
  else
    return value == 0x14;
}


x86 assembly (clang, -O0):
<valid_bo_pre_v2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x14,%rax
cmp    $0x0,%rax
jne    1126 <valid_bo_pre_v2+0x26>
movl   $0x1,-0x4(%rbp)
jmp    1192 <valid_bo_pre_v2+0x92>
mov    -0x10(%rbp),%rax
and    $0x14,%rax
cmp    $0x4,%rax
jne    1154 <valid_bo_pre_v2+0x54>
mov    -0x10(%rbp),%rax
and    $0x2,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1192 <valid_bo_pre_v2+0x92>
mov    -0x10(%rbp),%rax
and    $0x14,%rax
cmp    $0x10,%rax
jne    1182 <valid_bo_pre_v2+0x82>
mov    -0x10(%rbp),%rax
and    $0x8,%rax
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    1192 <valid_bo_pre_v2+0x92>
cmpq   $0x14,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<valid_bo_pre_v2>:
mov    %rdi,%rax
and    $0x14,%rax
je     111b <valid_bo_pre_v2+0x1b>
cmp    $0x10,%rax
je     1121 <valid_bo_pre_v2+0x21>
cmp    $0x4,%rax
jne    1127 <valid_bo_pre_v2+0x27>
test   $0x2,%dil
jmp    112b <valid_bo_pre_v2+0x2b>
mov    $0x1,%al
movzbl %al,%eax
ret
test   $0x8,%dil
jmp    112b <valid_bo_pre_v2+0x2b>
cmp    $0x14,%rdi
sete   %al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @valid_bo_pre_v2(i64 %0) {
%2 = and i64 %0, 20
switch i64 %2, label %9 [
i64 0, label %11
i64 4, label %3
i64 16, label %6
]
3: ; preds = %1
%4 = and i64 %0, 2
%5 = icmp eq i64 %4, 0
br label %11
6: ; preds = %1
%7 = and i64 %0, 8
%8 = icmp eq i64 %7, 0
br label %11
9: ; preds = %1
%10 = icmp eq i64 %0, 20
br label %11
11: ; preds = %1, %9, %6, %3
%12 = phi i1 [ %5, %3 ], [ %8, %6 ], [ %10, %9 ], [ true, %1 ]
%13 = zext i1 %12 to i32
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
int read(int, char *, int);
void get_full_file(int file, char *return_string, int file_size) {
  int bytes_read;
  bytes_read = read(file, return_string, sizeof(char) * file_size);
  if (bytes_read < 0) {
    printf("ERROR READING FILE\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<get_full_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edx
call   1040 <read@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    117b <get_full_file+0x4b>
lea    0xe94(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_full_file>:
push   %rax
call   1040 <read@plt>
test   %eax,%eax
js     113c <get_full_file+0xc>
pop    %rax
ret
lea    0xebd(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"ERROR READING FILE\0A\00"
define void @get_full_file(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = sext i32 %10 to i64
%12 = mul i64 1, %11
%13 = trunc i64 %12 to i32
%14 = call i32 @read(i32 %8, i8* %9, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %3
%18 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%19 = call i32 @exit(i32 1)
unreachable
20: ; preds = %3
ret void
}

LLVM IR (-O2):
@str = [19 x i8] c"ERROR READING FILE\00"
define void @get_full_file(i32 %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %3
ret void
}
/* Type definitions */
struct timeval {
  int /*<<< orphan*/ tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/, int /*<<< orphan*/);
void pr_tv(struct timeval *ptv) {
  printf("tv_sec = %ld, tv_usec = %ld\n", ptv->tv_sec, ptv->tv_usec);
}


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

x86 assembly (clang, -O2):
<pr_tv>:
mov    (%rdi),%edx
mov    0x4(%rdi),%esi
lea    0xee4(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@.str = [29 x i8] c"tv_sec = %ld, tv_usec = %ld\0A\00"
define void @pr_tv(%struct.timeval* %0) {
%2 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %2
%3 = load %struct.timeval*, %struct.timeval** %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i32 0, i32 1
%5 = load i32, i32* %4
%6 = load %struct.timeval*, %struct.timeval** %2
%7 = getelementptr inbounds %struct.timeval, %struct.timeval* %6, i32 0, i32 0
%8 = load i32, i32* %7
%9 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %8)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@.str = [29 x i8] c"tv_sec = %ld, tv_usec = %ld\0A\00"
define void @pr_tv(%struct.timeval* nocapture %0) {
%2 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 1
%3 = load i32, i32* %2
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %0, i64 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %5)
ret void
}