#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 /*<<< orphan*/ countup(long *, int);
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, double *);
void initratio(double *ttratio) {
  long loopcount;
  loopcount = 0;
  do {
    printf("Transition/transversion ratio?\n");
    scanf("%lf%*[^\n]", ttratio);
    getchar();
    countup(&loopcount, 10);
  } while (*ttratio < 0.0);
}


x86 assembly (clang, -O0):
<initratio>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rsi
lea    0xeb5(%rip),%rdi
call   1050 <scanf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
lea    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1060 <countup@plt>
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
ucomisd (%rax),%xmm0
ja     1154 <initratio+0x14>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initratio>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
movq   $0x0,(%rsp)
lea    0xeb8(%rip),%r14
lea    0xea7(%rip),%r15
mov    %rsp,%r12
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
mov    %r12,%rdi
mov    $0xa,%esi
call   1060 <countup@plt>
xorpd  %xmm0,%xmm0
ucomisd (%rbx),%xmm0
ja     1170 <initratio+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Transition/transversion ratio?\0A\00"
@.str.1 = [10 x i8] c"%lf%*[^\0A]\00"
define void @initratio(double* %0) {
%2 = alloca double*
%3 = alloca i64
store double* %0, double** %2
store i64 0, i64* %3
br label %4
4: ; preds = %10, %1
%5 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
%6 = load double*, double** %2
%7 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double* %6)
%8 = call i32 (...) @getchar()
%9 = call i32 @countup(i64* %3, i32 10)
br label %10
10: ; preds = %4
%11 = load double*, double** %2
%12 = load double, double* %11
%13 = fcmp olt double %12, 0.000000e+00
br i1 %13, label %4, label %14
14: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"%lf%*[^\0A]\00"
@str = [31 x i8] c"Transition/transversion ratio?\00"
define void @initratio(double* %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
br label %4
4: ; preds = %4, %1
%5 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double* %0)
%7 = call i32 (...) @getchar()
%8 = call i32 @countup(i64* %2, i32 10)
%9 = load double, double* %0
%10 = fcmp olt double %9, 0.000000e+00
br i1 %10, label %4, label %11
11: ; preds = %4
ret void
}