#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int A(int, double);
int /*<<< orphan*/ B(int /*<<< orphan*/, double, scalar_t__, double);
int C(double, double, double);
int /*<<< orphan*/ D(double, double, double);
int /*<<< orphan*/ E(double, double);
scalar_t__ INT_MIN;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ init_seed();
int /*<<< orphan*/ printf(char *, int, int, int);
int random_int();
int main(int argc, char *argv[]) {
  init_seed();
  int x = random_int();
  int y = random_int();
  int z = random_int();
  double dx = (double)x;
  double dy = (double)y;
  double dz = (double)z;
  printf("%x %x %x\n", x, y, z);
  assert(A(x, dx));
  assert(!B(0, (double)(int)0, INT_MIN, (double)(int)INT_MIN));
  assert(C(dx, dy, dz));
  assert(!D((double)(int)0x64e73387, (double)(int)0xd31cb264,
            (double)(int)0xd22f1fcd));
  assert(!E(dx, (double)(int)0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <init_seed@plt>
mov    $0x0,%al
call   10b0 <random_int@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   10b0 <random_int@plt>
mov    %eax,-0x18(%rbp)
mov    $0x0,%al
call   10b0 <random_int@plt>
mov    %eax,-0x1c(%rbp)
cvtsi2sdl -0x14(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
cvtsi2sdl -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
cvtsi2sdl -0x1c(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
lea    0xe1f(%rip),%rdi
call   1060 <printf@plt>
mov    -0x14(%rbp),%edi
movsd  -0x28(%rbp),%xmm0
call   10a0 <A@plt>
mov    %eax,%edi
call   1070 <assert@plt>
mov    0x2dcf(%rip),%rax
mov    (%rax),%rsi
mov    0x2dc5(%rip),%rax
mov    (%rax),%rax
cvtsi2sd %eax,%xmm1
xor    %edi,%edi
xorps  %xmm0,%xmm0
call   1050 <B@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
movsd  -0x28(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x38(%rbp),%xmm2
call   1090 <C@plt>
mov    %eax,%edi
call   1070 <assert@plt>
movsd  0xd97(%rip),%xmm0
movsd  0xd97(%rip),%xmm1
movsd  0xd97(%rip),%xmm2
call   1040 <D@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
call   1080 <E@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
xor    %eax,%eax
call   1030 <init_seed@plt>
xor    %eax,%eax
call   10b0 <random_int@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   10b0 <random_int@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   10b0 <random_int@plt>
cvtsi2sd %ebx,%xmm0
movsd  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0x10(%rsp)
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,0x8(%rsp)
lea    0xe38(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %eax,%ecx
call   1060 <printf@plt>
mov    %ebx,%edi
movsd  (%rsp),%xmm0
call   10a0 <A@plt>
mov    %eax,%edi
call   1070 <assert@plt>
mov    0x2de3(%rip),%rax
mov    (%rax),%rsi
cvtsi2sd %esi,%xmm1
xorps  %xmm0,%xmm0
xor    %edi,%edi
call   1050 <B@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1070 <assert@plt>
movsd  (%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
movsd  0x8(%rsp),%xmm2
call   1090 <C@plt>
mov    %eax,%edi
call   1070 <assert@plt>
movsd  0xdb8(%rip),%xmm0
movsd  0xdb8(%rip),%xmm1
movsd  0xdb8(%rip),%xmm2
call   1040 <D@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1070 <assert@plt>
xorps  %xmm1,%xmm1
movsd  (%rsp),%xmm0
call   1080 <E@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1070 <assert@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%x %x %x\0A\00"
@INT_MIN = global i64 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca double
%10 = alloca double
%11 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = call i32 (...) @init_seed()
%13 = call i32 (...) @random_int()
store i32 %13, i32* %6
%14 = call i32 (...) @random_int()
store i32 %14, i32* %7
%15 = call i32 (...) @random_int()
store i32 %15, i32* %8
%16 = load i32, i32* %6
%17 = sitofp i32 %16 to double
store double %17, double* %9
%18 = load i32, i32* %7
%19 = sitofp i32 %18 to double
store double %19, double* %10
%20 = load i32, i32* %8
%21 = sitofp i32 %20 to double
store double %21, double* %11
%22 = load i32, i32* %6
%23 = load i32, i32* %7
%24 = load i32, i32* %8
%25 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %22, i32 %23, i32 %24)
%26 = load i32, i32* %6
%27 = load double, double* %9
%28 = call i32 @A(i32 %26, double %27)
%29 = call i32 @assert(i32 %28)
%30 = load i64, i64* @INT_MIN
%31 = load i64, i64* @INT_MIN
%32 = trunc i64 %31 to i32
%33 = sitofp i32 %32 to double
%34 = call i32 @B(i32 0, double 0.000000e+00, i64 %30, double %33)
%35 = icmp ne i32 %34, 0
%36 = xor i1 %35, true
%37 = zext i1 %36 to i32
%38 = call i32 @assert(i32 %37)
%39 = load double, double* %9
%40 = load double, double* %10
%41 = load double, double* %11
%42 = call i32 @C(double %39, double %40, double %41)
%43 = call i32 @assert(i32 %42)
%44 = call i32 @D(double 0x41D939CCE1C00000, double 0xC1C671A6CE000000, double 0xC1C6E87019800000)
%45 = icmp ne i32 %44, 0
%46 = xor i1 %45, true
%47 = zext i1 %46 to i32
%48 = call i32 @assert(i32 %47)
%49 = load double, double* %9
%50 = call i32 @E(double %49, double 0.000000e+00)
%51 = icmp ne i32 %50, 0
%52 = xor i1 %51, true
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%x %x %x\0A\00"
@INT_MIN = global i64 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init_seed()
%4 = tail call i32 (...) @random_int()
%5 = tail call i32 (...) @random_int()
%6 = tail call i32 (...) @random_int()
%7 = sitofp i32 %4 to double
%8 = sitofp i32 %5 to double
%9 = sitofp i32 %6 to double
%10 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5, i32 %6)
%11 = tail call i32 @A(i32 %4, double %7)
%12 = tail call i32 @assert(i32 %11)
%13 = load i64, i64* @INT_MIN
%14 = trunc i64 %13 to i32
%15 = sitofp i32 %14 to double
%16 = tail call i32 @B(i32 0, double 0.000000e+00, i64 %13, double %15)
%17 = icmp eq i32 %16, 0
%18 = zext i1 %17 to i32
%19 = tail call i32 @assert(i32 %18)
%20 = tail call i32 @C(double %7, double %8, double %9)
%21 = tail call i32 @assert(i32 %20)
%22 = tail call i32 @D(double 0x41D939CCE1C00000, double 0xC1C671A6CE000000, double 0xC1C6E87019800000)
%23 = icmp eq i32 %22, 0
%24 = zext i1 %23 to i32
%25 = tail call i32 @assert(i32 %24)
%26 = tail call i32 @E(double %7, double 0.000000e+00)
%27 = icmp eq i32 %26, 0
%28 = zext i1 %27 to i32
%29 = tail call i32 @assert(i32 %28)
ret i32 0
}