void jitter_disc2f(unsigned int *pval, float *dir) {
  float dx;
  float dy;
  do {
    unsigned int return_value_rt_rand$1;
    return_value_rt_rand$1 = rt_rand(pval);
    dx = (float)((double)return_value_rt_rand$1 / 4.294967e+9 -
                 (double)5.000000e-1f);
    unsigned int return_value_rt_rand$2;
    return_value_rt_rand$2 = rt_rand(pval);
    dy = (float)((double)return_value_rt_rand$2 / 4.294967e+9 -
                 (double)5.000000e-1f);
  } while (dx * dx + dy * dy > 2.500000e-1f);
  dir[(signed long int)0] = dx;
  dir[(signed long int)1] = dy;
}


x86 assembly (clang, -O0):
<jitter_disc2f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %eax,%eax
mov    %al,-0x21(%rbp)
call   1030 <rt_rand@plt>
mov    %eax,%ecx
mov    -0x21(%rbp),%al
mov    %ecx,-0x1c(%rbp)
mov    -0x1c(%rbp),%ecx
cvtsi2sd %rcx,%xmm0
movsd  0xec2(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xebe(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rt_rand@plt>
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xe8d(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xe79(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
movss  -0x18(%rbp),%xmm1
mulss  -0x18(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe60(%rip),%xmm1
ucomiss %xmm1,%xmm0
ja     1120 <jitter_disc2f+0x10>
movss  -0x14(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x18(%rbp),%xmm0
mov    -0x10(%rbp),%rax
movss  %xmm0,0x4(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jitter_disc2f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <rt_rand@plt>
mov    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xec0(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rbx,%rdi
xor    %eax,%eax
call   1030 <rt_rand@plt>
movss  0x4(%rsp),%xmm3
mov    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
divsd  0xe88(%rip),%xmm0
addsd  0xe88(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
movaps %xmm0,%xmm1
mulss  %xmm0,%xmm1
movaps %xmm3,%xmm2
mulss  %xmm3,%xmm2
addss  %xmm1,%xmm2
ucomiss 0xe73(%rip),%xmm2
ja     1120 <jitter_disc2f+0x10>
movss  %xmm3,(%r14)
movss  %xmm0,0x4(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @jitter_disc2f(i32* %0, float* %1) {
%3 = alloca i32*
%4 = alloca float*
%5 = alloca float
%6 = alloca float
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %3
store float* %1, float** %4
br label %9
9: ; preds = %24, %2
%10 = load i32*, i32** %3
%11 = call i32 (i32*, ...) bitcast (i32 (...)* @rt_rand to i32 (i32*, ...)*)(i32* %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = uitofp i32 %12 to double
%14 = fdiv double %13, 0x41EFFFFFDB000000
%15 = fsub double %14, 5.000000e-01
%16 = fptrunc double %15 to float
store float %16, float* %5
%17 = load i32*, i32** %3
%18 = call i32 (i32*, ...) bitcast (i32 (...)* @rt_rand to i32 (i32*, ...)*)(i32* %17)
store i32 %18, i32* %8
%19 = load i32, i32* %8
%20 = uitofp i32 %19 to double
%21 = fdiv double %20, 0x41EFFFFFDB000000
%22 = fsub double %21, 5.000000e-01
%23 = fptrunc double %22 to float
store float %23, float* %6
br label %24
24: ; preds = %9
%25 = load float, float* %5
%26 = load float, float* %5
%27 = load float, float* %6
%28 = load float, float* %6
%29 = fmul float %27, %28
%30 = call float @llvm.fmuladd.f32(float %25, float %26, float %29)
%31 = fcmp ogt float %30, 2.500000e-01
br i1 %31, label %9, label %32
32: ; preds = %24
%33 = load float, float* %5
%34 = load float*, float** %4
%35 = getelementptr inbounds float, float* %34, i64 0
store float %33, float* %35
%36 = load float, float* %6
%37 = load float*, float** %4
%38 = getelementptr inbounds float, float* %37, i64 1
store float %36, float* %38
ret void
}

LLVM IR (-O2):
define void @jitter_disc2f(i32* %0, float* nocapture writeonly %1) {
br label %3
3: ; preds = %3, %2
%4 = tail call i32 (i32*, ...) bitcast (i32 (...)* @rt_rand to i32 (i32*, ...)*)(i32* %0)
%5 = uitofp i32 %4 to double
%6 = fdiv double %5, 0x41EFFFFFDB000000
%7 = fadd double %6, -5.000000e-01
%8 = fptrunc double %7 to float
%9 = tail call i32 (i32*, ...) bitcast (i32 (...)* @rt_rand to i32 (i32*, ...)*)(i32* %0)
%10 = uitofp i32 %9 to double
%11 = fdiv double %10, 0x41EFFFFFDB000000
%12 = fadd double %11, -5.000000e-01
%13 = fptrunc double %12 to float
%14 = fmul float %13, %13
%15 = tail call float @llvm.fmuladd.f32(float %8, float %8, float %14)
%16 = fcmp ogt float %15, 2.500000e-01
br i1 %16, label %3, label %17
17: ; preds = %3
store float %8, float* %1
%18 = getelementptr inbounds float, float* %1, i64 1
store float %13, float* %18
ret void
}