#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 M_PI;
int fRand(int, int);
double log(int);
int /*<<< orphan*/ printf(char *, double);
double sin(int);
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int main() {
  srand((unsigned int)time(NULL));
  printf("%f\n", -log(fRand(1, 208)) * sin(2 * M_PI * fRand(1, 208)));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x1,%edi
mov    $0xd0,%esi
call   1050 <fRand@plt>
mov    %eax,%edi
call   1080 <log@plt>
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    0x2e30(%rip),%rax
mov    (%rax),%eax
shl    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    $0x1,%edi
mov    $0xd0,%esi
call   1050 <fRand@plt>
mov    -0x14(%rbp),%edi
imul   %eax,%edi
call   1060 <sin@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
mulsd  %xmm1,%xmm0
lea    0xe13(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x1,%edi
mov    $0xd0,%esi
call   1050 <fRand@plt>
mov    %eax,%edi
call   1080 <log@plt>
xorpd  0xe6f(%rip),%xmm0
movapd %xmm0,(%rsp)
mov    0x2e4b(%rip),%rax
mov    (%rax),%ebx
mov    $0x1,%edi
mov    $0xd0,%esi
call   1050 <fRand@plt>
imul   %eax,%ebx
add    %ebx,%ebx
mov    %ebx,%edi
call   1060 <sin@plt>
mulsd  (%rsp),%xmm0
lea    0xe4a(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@M_PI = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @time(i32* null)
%3 = trunc i64 %2 to i32
%4 = call i32 @srand(i32 %3)
%5 = call i32 @fRand(i32 1, i32 208)
%6 = call double @log(i32 %5)
%7 = fneg double %6
%8 = load i32, i32* @M_PI
%9 = mul nsw i32 2, %8
%10 = call i32 @fRand(i32 1, i32 208)
%11 = mul nsw i32 %9, %10
%12 = call double @sin(i32 %11)
%13 = fmul double %7, %12
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@M_PI = global i32 0
define i32 @main() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 @fRand(i32 1, i32 208)
%5 = tail call double @log(i32 %4)
%6 = fneg double %5
%7 = load i32, i32* @M_PI
%8 = shl nsw i32 %7, 1
%9 = tail call i32 @fRand(i32 1, i32 208)
%10 = mul nsw i32 %8, %9
%11 = tail call double @sin(i32 %10)
%12 = fmul double %11, %6
%13 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %12)
ret i32 0
}