#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 genrand_int32(unsigned long *, unsigned long *);
double genrand_res53(unsigned long mt[], unsigned long *mtiPtr) {
  unsigned long a = genrand_int32(mt, mtiPtr) >> 5,
                b = genrand_int32(mt, mtiPtr) >> 6;
  return (a * 67108864.0 + b) * (1.0 / 9007199254740992.0);
}


x86 assembly (clang, -O0):
<genrand_res53>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <genrand_int32@plt>
sar    $0x5,%eax
cltq
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <genrand_int32@plt>
sar    $0x6,%eax
cltq
mov    %rax,-0x20(%rbp)
movaps 0xebd(%rip),%xmm3
movq   -0x18(%rbp),%xmm0
punpckldq %xmm3,%xmm0
movapd 0xebc(%rip),%xmm2
subpd  %xmm2,%xmm0
movaps %xmm0,%xmm1
unpckhpd %xmm0,%xmm0
addsd  %xmm1,%xmm0
movq   -0x20(%rbp),%xmm1
punpckldq %xmm3,%xmm1
subpd  %xmm2,%xmm1
movaps %xmm1,%xmm2
unpckhpd %xmm1,%xmm1
addsd  %xmm2,%xmm1
movsd  0xe75(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe5d(%rip),%xmm1
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<genrand_res53>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <genrand_int32@plt>
sar    $0x5,%eax
movslq %eax,%r15
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <genrand_int32@plt>
sar    $0x6,%eax
cltq
movq   %r15,%xmm1
movdqa 0xebd(%rip),%xmm2
punpckldq %xmm2,%xmm1
movapd 0xec1(%rip),%xmm3
subpd  %xmm3,%xmm1
movapd %xmm1,%xmm0
unpckhpd %xmm1,%xmm0
addsd  %xmm1,%xmm0
movq   %rax,%xmm1
punpckldq %xmm2,%xmm1
subpd  %xmm3,%xmm1
movapd %xmm1,%xmm2
unpckhpd %xmm1,%xmm2
mulsd  0xea4(%rip),%xmm0
addsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
mulsd  0xe9c(%rip),%xmm0
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define double @genrand_res53(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = load i64*, i64** %4
%9 = call i32 @genrand_int32(i64* %7, i64* %8)
%10 = ashr i32 %9, 5
%11 = sext i32 %10 to i64
store i64 %11, i64* %5
%12 = load i64*, i64** %3
%13 = load i64*, i64** %4
%14 = call i32 @genrand_int32(i64* %12, i64* %13)
%15 = ashr i32 %14, 6
%16 = sext i32 %15 to i64
store i64 %16, i64* %6
%17 = load i64, i64* %5
%18 = uitofp i64 %17 to double
%19 = load i64, i64* %6
%20 = uitofp i64 %19 to double
%21 = call double @llvm.fmuladd.f64(double %18, double 0x4190000000000000, double %20)
%22 = fmul double %21, 0x3CA0000000000000
ret double %22
}

LLVM IR (-O2):
define double @genrand_res53(i64* %0, i64* %1) {
%3 = tail call i32 @genrand_int32(i64* %0, i64* %1)
%4 = ashr i32 %3, 5
%5 = sext i32 %4 to i64
%6 = tail call i32 @genrand_int32(i64* %0, i64* %1)
%7 = ashr i32 %6, 6
%8 = sext i32 %7 to i64
%9 = uitofp i64 %5 to double
%10 = uitofp i64 %8 to double
%11 = tail call double @llvm.fmuladd.f64(double %9, double 0x4190000000000000, double %10)
%12 = fmul double %11, 0x3CA0000000000000
ret double %12
}