#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 */
scalar_t__ EOF;
int /*<<< orphan*/ print_adv_score(int /*<<< orphan*/, double);
int /*<<< orphan*/ print_basic_score(int /*<<< orphan*/, double);
int /*<<< orphan*/ print_logp(int /*<<< orphan*/, double, double);
scalar_t__ read_data(int /*<<< orphan*/, int *, double *, double *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  int id;
  double prob_obs_unmut, prob_obs_mut;
  double score, phi, logp;
  score = phi = logp = 0;
  while (EOF != read_data(stdin, &id, &prob_obs_unmut, &prob_obs_mut)) {
    print_basic_score(stdout, score);
    print_adv_score(stdout, score);
    print_logp(stdout, phi, logp);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x38(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x2e6b(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x48(%rbp)
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
lea    -0x14(%rbp),%rsi
lea    -0x20(%rbp),%rdx
lea    -0x28(%rbp),%rcx
call   1030 <read_data@plt>
mov    %rax,%rcx
mov    -0x48(%rbp),%rax
cmp    %rcx,%rax
je     11e9 <main+0xa9>
mov    0x2e23(%rip),%rax
mov    (%rax),%edi
movsd  -0x30(%rbp),%xmm0
call   1060 <print_basic_score@plt>
mov    0x2e10(%rip),%rax
mov    (%rax),%edi
movsd  -0x30(%rbp),%xmm0
call   1050 <print_adv_score@plt>
mov    0x2dfd(%rip),%rax
mov    (%rax),%edi
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1040 <print_logp@plt>
jmp    116e <main+0x2e>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2e8b(%rip),%rbx
mov    (%rbx),%rbp
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0x4(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0x8(%rsp),%rcx
call   1030 <read_data@plt>
cmp    %rax,%rbp
je     11d3 <main+0x93>
mov    0x2e4f(%rip),%rbp
lea    0x4(%rsp),%r14
lea    0x10(%rsp),%r15
lea    0x8(%rsp),%r13
mov    0x0(%rbp),%edi
xorps  %xmm0,%xmm0
call   1060 <print_basic_score@plt>
mov    0x0(%rbp),%edi
xorps  %xmm0,%xmm0
call   1050 <print_adv_score@plt>
mov    0x0(%rbp),%edi
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1040 <print_logp@plt>
mov    (%rbx),%r12
mov    0x2e2a(%rip),%rax
mov    (%rax),%edi
mov    %r14,%rsi
mov    %r15,%rdx
mov    %r13,%rcx
call   1030 <read_data@plt>
cmp    %rax,%r12
jne    1190 <main+0x50>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i64 0
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store double 0.000000e+00, double* %11
store double 0.000000e+00, double* %10
store double 0.000000e+00, double* %9
br label %12
12: ; preds = %17, %2
%13 = load i64, i64* @EOF
%14 = load i32, i32* @stdin
%15 = call i64 @read_data(i32 %14, i32* %6, double* %7, double* %8)
%16 = icmp ne i64 %13, %15
br i1 %16, label %17, label %28
17: ; preds = %12
%18 = load i32, i32* @stdout
%19 = load double, double* %9
%20 = call i32 @print_basic_score(i32 %18, double %19)
%21 = load i32, i32* @stdout
%22 = load double, double* %9
%23 = call i32 @print_adv_score(i32 %21, double %22)
%24 = load i32, i32* @stdout
%25 = load double, double* %10
%26 = load double, double* %11
%27 = call i32 @print_logp(i32 %24, double %25, double %26)
br label %12
28: ; preds = %12
%29 = load i32, i32* %3
ret i32 %29
}

LLVM IR (-O2):
@EOF = global i64 0
@stdin = global i32 0
@stdout = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = alloca double
%5 = alloca double
%6 = bitcast i32* %3 to i8*
%7 = bitcast double* %4 to i8*
%8 = bitcast double* %5 to i8*
%9 = load i64, i64* @EOF
%10 = load i32, i32* @stdin
%11 = call i64 @read_data(i32 %10, i32* %3, double* %4, double* %5)
%12 = icmp eq i64 %9, %11
br i1 %12, label %24, label %13
13: ; preds = %2, %13
%14 = load i32, i32* @stdout
%15 = call i32 @print_basic_score(i32 %14, double 0.000000e+00)
%16 = load i32, i32* @stdout
%17 = call i32 @print_adv_score(i32 %16, double 0.000000e+00)
%18 = load i32, i32* @stdout
%19 = call i32 @print_logp(i32 %18, double 0.000000e+00, double 0.000000e+00)
%20 = load i64, i64* @EOF
%21 = load i32, i32* @stdin
%22 = call i64 @read_data(i32 %21, i32* %3, double* %4, double* %5)
%23 = icmp eq i64 %20, %22
br i1 %23, label %24, label %13
24: ; preds = %13, %2
ret i32 0
}