#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);
int main() {
  float pedro = 1.50, lucas = 1.10;
  int ano = 1;
  while (lucas <= pedro) {
    pedro = pedro + 0.2;
    lucas = lucas + 0.3;
    ano++;
  }
  printf(
      "\nDurará %d anos para Lucas alcaçar Pedro e passará daqui há %d anos.\n",
      ano, ano + 1);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xedd(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xecc(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     119d <main+0x8d>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeac(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe86(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1140 <main+0x30>
mov    -0x10(%rbp),%esi
mov    -0x10(%rbp),%edx
add    $0x1,%edx
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movaps 0xee8(%rip),%xmm1
mov    $0x2,%edx
movapd 0xeeb(%rip),%xmm0
cs nopw 0x0(%rax,%rax,1)
nop
cvtps2pd %xmm1,%xmm1
addpd  %xmm0,%xmm1
cvtpd2ps %xmm1,%xmm1
movapd %xmm1,%xmm2
shufps $0x55,%xmm1,%xmm2
add    $0x1,%edx
ucomiss %xmm1,%xmm2
jae    1130 <main+0x20>
lea    -0x1(%rdx),%esi
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [74 x i8] c"\0ADurar\C3\A1 %d anos para Lucas alca\C3\A7ar Pedro e passar\C3\A1 daqui h\C3\A1 %d anos.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store i32 0, i32* %1
store float 1.500000e+00, float* %2
store float 0x3FF19999A0000000, float* %3
store i32 1, i32* %4
br label %5
5: ; preds = %9, %0
%6 = load float, float* %3
%7 = load float, float* %2
%8 = fcmp ole float %6, %7
br i1 %8, label %9, label %20
9: ; preds = %5
%10 = load float, float* %2
%11 = fpext float %10 to double
%12 = fadd double %11, 2.000000e-01
%13 = fptrunc double %12 to float
store float %13, float* %2
%14 = load float, float* %3
%15 = fpext float %14 to double
%16 = fadd double %15, 3.000000e-01
%17 = fptrunc double %16 to float
store float %17, float* %3
%18 = load i32, i32* %4
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %5
20: ; preds = %5
%21 = load i32, i32* %4
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
%24 = call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %21, i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [74 x i8] c"\0ADurar\C3\A1 %d anos para Lucas alca\C3\A7ar Pedro e passar\C3\A1 daqui h\C3\A1 %d anos.\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 1, %0 ], [ %7, %1 ]
%3 = phi <2 x float> [ <float 0x3FF19999A0000000, float 1.500000e+00>, %0 ], [ %6, %1 ]
%4 = fpext <2 x float> %3 to <2 x double>
%5 = fadd <2 x double> %4, <double 3.000000e-01, double 2.000000e-01>
%6 = fptrunc <2 x double> %5 to <2 x float>
%7 = add nuw nsw i32 %2, 1
%8 = extractelement <2 x float> %6, i64 0
%9 = extractelement <2 x float> %6, i64 1
%10 = fcmp ugt float %8, %9
br i1 %10, label %11, label %1
11: ; preds = %1
%12 = add nuw nsw i32 %2, 2
%13 = tail call i32 @printf(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %12)
ret i32 0
}