#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 scanf(char *, double *, double *, double *);
int main(void) {
  double quantidadeDePaginasLidas, quantidadeDeDias, quantidadeDePaginas;
  int total;
  while (scanf("%lf %lf %lf\n", &quantidadeDePaginasLidas, &quantidadeDeDias,
               &quantidadeDePaginas) == 3) {
    total = (quantidadeDePaginasLidas * quantidadeDeDias) /
            (quantidadeDePaginasLidas - quantidadeDePaginas) *
            quantidadeDePaginas * -1.0;
    if (total == 1) {
      printf("1 pagina\n");
    } else {
      printf("%d paginas\n", total);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
cmp    $0x3,%eax
jne    11b3 <main+0x93>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x20(%rbp),%xmm1
divsd  %xmm1,%xmm0
mulsd  -0x20(%rbp),%xmm0
movsd  0xe8b(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    119d <main+0x7d>
lea    0xe84(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    11ae <main+0x8e>
mov    -0x24(%rbp),%esi
lea    0xe78(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xecb(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rsp,%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
jne    11ec <main+0xbc>
lea    0xec2(%rip),%r14
lea    0xea2(%rip),%r15
lea    0x10(%rsp),%r12
lea    0x8(%rsp),%r13
mov    %rsp,%rbx
lea    0xe9b(%rip),%rbp
jmp    11b0 <main+0x80>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %rbp,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r15,%rdi
mov    %r12,%rsi
mov    %r13,%rdx
mov    %rbx,%rcx
call   1050 <scanf@plt>
cmp    $0x3,%eax
jne    11ec <main+0xbc>
movsd  0x10(%rsp),%xmm0
movsd  (%rsp),%xmm1
movapd %xmm0,%xmm2
subsd  %xmm1,%xmm2
xorpd  0xe35(%rip),%xmm0
mulsd  0x8(%rsp),%xmm0
divsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%esi
cmp    $0x1,%esi
jne    1190 <main+0x60>
mov    %r14,%rdi
call   1030 <puts@plt>
jmp    119a <main+0x6a>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [13 x i8] c"%lf %lf %lf\0A\00"
@.str.1 = [10 x i8] c"1 pagina\0A\00"
@.str.2 = [12 x i8] c"%d paginas\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca i32
store i32 0, i32* %1
br label %6
6: ; preds = %28, %0
%7 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%8 = icmp eq i32 %7, 3
br i1 %8, label %9, label %29
9: ; preds = %6
%10 = load double, double* %2
%11 = load double, double* %3
%12 = fmul double %10, %11
%13 = load double, double* %2
%14 = load double, double* %4
%15 = fsub double %13, %14
%16 = fdiv double %12, %15
%17 = load double, double* %4
%18 = fmul double %16, %17
%19 = fmul double %18, -1.000000e+00
%20 = fptosi double %19 to i32
store i32 %20, i32* %5
%21 = load i32, i32* %5
%22 = icmp eq i32 %21, 1
br i1 %22, label %23, label %25
23: ; preds = %9
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %28
25: ; preds = %9
%26 = load i32, i32* %5
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %25, %23
br label %6
29: ; preds = %6
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"%lf %lf %lf\0A\00"
@.str.2 = [12 x i8] c"%d paginas\0A\00"
@str = [9 x i8] c"1 pagina\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast double* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = icmp eq i32 %7, 3
br i1 %8, label %9, label %27
9: ; preds = %0, %24
%10 = load double, double* %1
%11 = load double, double* %2
%12 = load double, double* %3
%13 = fsub double %10, %12
%14 = fneg double %10
%15 = fmul double %11, %14
%16 = fdiv double %15, %13
%17 = fmul double %12, %16
%18 = fptosi double %17 to i32
%19 = icmp eq i32 %18, 1
br i1 %19, label %20, label %22
20: ; preds = %9
%21 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
br label %24
22: ; preds = %9
%23 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i32 %18)
br label %24
24: ; preds = %22, %20
%25 = call i32 @scanf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%26 = icmp eq i32 %25, 3
br i1 %26, label %9, label %27
27: ; preds = %24, %0
ret i32 0
}