#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*/ printf(char *, int);
int main() {
  double a = 80000, b = 200000;
  int anos = 0;
  while (a <= b) {
    a = a + a * (0.03);
    b = b + b * (0.015);
    anos++;
  }
  printf("%d", anos);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     11a0 <main+0x90>
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  0xeb2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  0xe8b(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1140 <main+0x30>
mov    -0x1c(%rbp),%esi
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movapd 0xee7(%rip),%xmm0
xor    %esi,%esi
movapd 0xeed(%rip),%xmm1
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movapd %xmm0,%xmm2
mulpd  %xmm1,%xmm2
addpd  %xmm2,%xmm0
add    $0x1,%esi
movapd %xmm0,%xmm2
unpckhpd %xmm0,%xmm2
ucomisd %xmm2,%xmm0
jae    1130 <main+0x20>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca i32
store i32 0, i32* %1
store double 8.000000e+04, double* %2
store double 2.000000e+05, double* %3
store i32 0, i32* %4
br label %5
5: ; preds = %9, %0
%6 = load double, double* %2
%7 = load double, double* %3
%8 = fcmp ole double %6, %7
br i1 %8, label %9, label %18
9: ; preds = %5
%10 = load double, double* %2
%11 = load double, double* %2
%12 = call double @llvm.fmuladd.f64(double %11, double 3.000000e-02, double %10)
store double %12, double* %2
%13 = load double, double* %3
%14 = load double, double* %3
%15 = call double @llvm.fmuladd.f64(double %14, double 1.500000e-02, double %13)
store double %15, double* %3
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %4
br label %5
18: ; preds = %5
%19 = load i32, i32* %4
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %19)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %5, %1 ]
%3 = phi <2 x double> [ <double 2.000000e+05, double 8.000000e+04>, %0 ], [ %4, %1 ]
%4 = call <2 x double> @llvm.fmuladd.v2f64(<2 x double> %3, <2 x double> <double 1.500000e-02, double 3.000000e-02>, <2 x double> %3)
%5 = add nuw nsw i32 %2, 1
%6 = extractelement <2 x double> %4, i64 0
%7 = extractelement <2 x double> %4, i64 1
%8 = fcmp ugt double %7, %6
br i1 %8, label %9, label %1
9: ; preds = %1
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}