#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 */
typedef double uint32_t;

/* Variables and functions */
int arc4random();
double arc4random_uniform(int);
double talk_delay(void) {
  double after;
  uint32_t delay = 100000000 + arc4random_uniform(100000000) +
                   arc4random_uniform(100000000) +
                   arc4random_uniform(100000000);
  after = delay / (double)1000000000U;
  if (arc4random() > 3865470565)
    after *= 3;
  return after;
}


x86 assembly (clang, -O0):
<talk_delay>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x5f5e100,%edi
call   1030 <arc4random_uniform@plt>
movaps %xmm0,%xmm1
movsd  0xecb(%rip),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    $0x5f5e100,%edi
call   1030 <arc4random_uniform@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    $0x5f5e100,%edi
call   1030 <arc4random_uniform@plt>
movaps %xmm0,%xmm1
movsd  -0x18(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xe77(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
mov    $0x0,%al
call   1040 <arc4random@plt>
cltq
mov    $0xe6666665,%ecx
cmp    %rcx,%rax
jle    11bb <talk_delay+0x9b>
movsd  0xe5f(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<talk_delay>:
sub    $0x18,%rsp
mov    $0x5f5e100,%edi
call   1030 <arc4random_uniform@plt>
movsd  %xmm0,0x10(%rsp)
mov    $0x5f5e100,%edi
call   1030 <arc4random_uniform@plt>
movsd  %xmm0,0x8(%rsp)
mov    $0x5f5e100,%edi
call   1030 <arc4random_uniform@plt>
movsd  %xmm0,(%rsp)
xor    %eax,%eax
call   1040 <arc4random@plt>
movsd  0x10(%rsp),%xmm0
addsd  0xe98(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
addsd  (%rsp),%xmm0
divsd  0xe8d(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @talk_delay() {
%1 = alloca double
%2 = alloca double
%3 = call double @arc4random_uniform(i32 100000000)
%4 = fadd double 1.000000e+08, %3
%5 = call double @arc4random_uniform(i32 100000000)
%6 = fadd double %4, %5
%7 = call double @arc4random_uniform(i32 100000000)
%8 = fadd double %6, %7
store double %8, double* %2
%9 = load double, double* %2
%10 = fdiv double %9, 1.000000e+09
store double %10, double* %1
%11 = call i32 (...) @arc4random()
%12 = sext i32 %11 to i64
%13 = icmp sgt i64 %12, 3865470565
br i1 %13, label %14, label %17
14: ; preds = %0
%15 = load double, double* %1
%16 = fmul double %15, 3.000000e+00
store double %16, double* %1
br label %17
17: ; preds = %14, %0
%18 = load double, double* %1
ret double %18
}

LLVM IR (-O2):
define double @talk_delay() {
%1 = tail call double @arc4random_uniform(i32 100000000)
%2 = tail call double @arc4random_uniform(i32 100000000)
%3 = tail call double @arc4random_uniform(i32 100000000)
%4 = tail call i32 (...) @arc4random()
%5 = fadd double %1, 1.000000e+08
%6 = fadd double %5, %2
%7 = fadd double %6, %3
%8 = fdiv double %7, 1.000000e+09
ret double %8
}