#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 */
float RAND_MAX;
scalar_t__ rand();
float modify_ectopic(float rr2, float rr1) {
  float new_rr;
  float delta;
  float rrint;
  delta = ((float)rand() / RAND_MAX);
  delta = 0.2 * (delta - 0.5);
  rrint = rr2 - rr1;
  rrint = (0.7 - delta) * rrint;
  new_rr = rr1 + rrint;
  return (new_rr);
}


x86 assembly (clang, -O0):
<modify_ectopic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cvtsi2ss %rax,%xmm0
mov    0x2eb3(%rip),%rax
divss  (%rax),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xec1(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xead(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe78(%rip),%xmm0
subsd  %xmm1,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<modify_ectopic>:
push   %rax
movss  %xmm1,0x4(%rsp)
movss  %xmm0,(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mov    0x2eb6(%rip),%rax
divss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
addsd  0xebe(%rip),%xmm0
mulsd  0xebe(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movss  0x4(%rsp),%xmm2
movss  (%rsp),%xmm1
subss  %xmm2,%xmm1
cvtss2sd %xmm0,%xmm0
addsd  0xea7(%rip),%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
addss  %xmm2,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@RAND_MAX = global float 0.000000e+00
define float @modify_ectopic(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %3
store float %1, float* %4
%8 = call i64 (...) @rand()
%9 = sitofp i64 %8 to float
%10 = load float, float* @RAND_MAX
%11 = fdiv float %9, %10
store float %11, float* %6
%12 = load float, float* %6
%13 = fpext float %12 to double
%14 = fsub double %13, 5.000000e-01
%15 = fmul double 2.000000e-01, %14
%16 = fptrunc double %15 to float
store float %16, float* %6
%17 = load float, float* %3
%18 = load float, float* %4
%19 = fsub float %17, %18
store float %19, float* %7
%20 = load float, float* %6
%21 = fpext float %20 to double
%22 = fsub double 0x3FE6666666666666, %21
%23 = load float, float* %7
%24 = fpext float %23 to double
%25 = fmul double %22, %24
%26 = fptrunc double %25 to float
store float %26, float* %7
%27 = load float, float* %4
%28 = load float, float* %7
%29 = fadd float %27, %28
store float %29, float* %5
%30 = load float, float* %5
ret float %30
}

LLVM IR (-O2):
@RAND_MAX = global float 0.000000e+00
define float @modify_ectopic(float %0, float %1) {
%3 = tail call i64 (...) @rand()
%4 = sitofp i64 %3 to float
%5 = load float, float* @RAND_MAX
%6 = fdiv float %4, %5
%7 = fpext float %6 to double
%8 = fadd double %7, -5.000000e-01
%9 = fmul double %8, 2.000000e-01
%10 = fptrunc double %9 to float
%11 = fsub float %0, %1
%12 = fpext float %10 to double
%13 = fsub double 0x3FE6666666666666, %12
%14 = fpext float %11 to double
%15 = fmul double %13, %14
%16 = fptrunc double %15 to float
%17 = fadd float %16, %1
ret float %17
}