#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 /*<<< orphan*/ scanf(char *, float *);
int main(void) {
  int parc;
  float valor, ent;
  printf("Informe o valor do produto: ");
  scanf("%f", &valor);
  (int)valor;
  parc = valor / 3;
  ent = valor - (2 * parc);
  printf("Entrada: %.2f\n1ª Parcela: %d / 2ª Parcela: %d\n", ent, parc, parc);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
movss  0xea6(%rip),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x8(%rbp)
movss  -0xc(%rbp),%xmm0
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xe91(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xeeb(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movss  0x4(%rsp),%xmm0
movaps %xmm0,%xmm1
divss  0xeaf(%rip),%xmm1
cvttss2si %xmm1,%edx
lea    (%rdx,%rdx,1),%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xeb6(%rip),%rdi
mov    %edx,%esi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Informe o valor do produto: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [49 x i8] c"Entrada: %.2f\0A1\C2\AA Parcela: %d / 2\C2\AA Parcela: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca float
%4 = alloca float
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %3)
%7 = load float, float* %3
%8 = fptosi float %7 to i32
%9 = load float, float* %3
%10 = fdiv float %9, 3.000000e+00
%11 = fptosi float %10 to i32
store i32 %11, i32* %2
%12 = load float, float* %3
%13 = load i32, i32* %2
%14 = mul nsw i32 2, %13
%15 = sitofp i32 %14 to float
%16 = fsub float %12, %15
store float %16, float* %4
%17 = load float, float* %4
%18 = fpext float %17 to double
%19 = load i32, i32* %2
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), double %18, i32 %19, i32 %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [29 x i8] c"Informe o valor do produto: \00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [49 x i8] c"Entrada: %.2f\0A1\C2\AA Parcela: %d / 2\C2\AA Parcela: %d\0A\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%5 = load float, float* %1
%6 = fdiv float %5, 3.000000e+00
%7 = fptosi float %6 to i32
%8 = shl nsw i32 %7, 1
%9 = sitofp i32 %8 to float
%10 = fsub float %5, %9
%11 = fpext float %10 to double
%12 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.2, i64 0, i64 0), double %11, i32 %7, i32 %7)
ret i32 0
}