#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 *);
main() {
  float a, P, S, k;
  P = 1;
  S = 0;
  while (k != 6) {
    printf("Ââåäèòå ÷èñëî\n");
    scanf("%f", &a);
    P *= a;
    S += a;
    k++;
  }
  printf("%f\n", P);
  printf("%f\n", S);
  if (P > S)
    printf("Proiz > Sum\n");
  else {
    printf("Sum > Proiz\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xec9(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xeb3(%rip),%xmm1
ucomiss %xmm1,%xmm0
jne    1165 <main+0x45>
jp     1165 <main+0x45>
jmp    11b8 <main+0x98>
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea9(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
movss  -0x8(%rbp),%xmm0
mulss  -0xc(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  0xe57(%rip),%xmm0
addss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    1144 <main+0x24>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe5e(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe47(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movss  -0xc(%rbp),%xmm0
ucomiss -0x10(%rbp),%xmm0
jbe    1208 <main+0xe8>
lea    0xe2e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1216 <main+0xf6>
lea    0xe28(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movss  0xebf(%rip),%xmm2
xorps  %xmm0,%xmm0
movss  %xmm0,(%rsp)
lea    0xed7(%rip),%r14
lea    0xeb1(%rip),%r15
lea    0xc(%rsp),%rbx
nopl   0x0(%rax)
movss  %xmm2,0x4(%rsp)
mov    %r14,%rdi
call   1030 <puts@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
call   1050 <scanf@plt>
movss  0x4(%rsp),%xmm2
movss  0xc(%rsp),%xmm0
mulss  %xmm0,%xmm2
movss  (%rsp),%xmm1
addss  %xmm0,%xmm1
movss  %xmm1,(%rsp)
movss  0x8(%rsp),%xmm0
addss  0xe5b(%rip),%xmm0
movss  %xmm0,0x8(%rsp)
ucomiss 0xe52(%rip),%xmm0
jne    1160 <main+0x30>
jp     1160 <main+0x30>
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
lea    0xe47(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%al
movss  %xmm2,0x4(%rsp)
call   1040 <printf@plt>
movss  (%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movss  0x4(%rsp),%xmm0
ucomiss (%rsp),%xmm0
lea    0xe23(%rip),%rax
lea    0xe10(%rip),%rdi
cmova  %rax,%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c"\C3\82\C3\A2\C3\A5\C3\A4\C3\A8\C3\B2\C3\A5 \C3\B7\C3\A8\C3\B1\C3\AB\C3\AE\0A\00"
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [4 x i8] c"%f\0A\00"
@.str.3 = [13 x i8] c"Proiz > Sum\0A\00"
@.str.4 = [13 x i8] c"Sum > Proiz\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
store i32 0, i32* %1
store float 1.000000e+00, float* %3
store float 0.000000e+00, float* %4
br label %6
6: ; preds = %9, %0
%7 = load float, float* %5
%8 = fcmp une float %7, 6.000000e+00
br i1 %8, label %9, label %20
9: ; preds = %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %2)
%12 = load float, float* %2
%13 = load float, float* %3
%14 = fmul float %13, %12
store float %14, float* %3
%15 = load float, float* %2
%16 = load float, float* %4
%17 = fadd float %16, %15
store float %17, float* %4
%18 = load float, float* %5
%19 = fadd float %18, 1.000000e+00
store float %19, float* %5
br label %6
20: ; preds = %6
%21 = load float, float* %3
%22 = fpext float %21 to double
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %22)
%24 = load float, float* %4
%25 = fpext float %24 to double
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %25)
%27 = load float, float* %3
%28 = load float, float* %4
%29 = fcmp ogt float %27, %28
br i1 %29, label %30, label %32
30: ; preds = %20
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
br label %34
32: ; preds = %20
%33 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0))
br label %34
34: ; preds = %32, %30
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%f\00"
@.str.2 = [4 x i8] c"%f\0A\00"
@str = [12 x i8] c"Sum > Proiz\00"
@str.5 = [12 x i8] c"Proiz > Sum\00"
@str.6 = [26 x i8] c"\C3\82\C3\A2\C3\A5\C3\A4\C3\A8\C3\B2\C3\A5 \C3\B7\C3\A8\C3\B1\C3\AB\C3\AE\00"
define i32 @main() {
%1 = alloca float
%2 = bitcast float* %1 to i8*
br label %3
3: ; preds = %0, %3
%4 = phi float [ undef, %0 ], [ %12, %3 ]
%5 = phi float [ 0.000000e+00, %0 ], [ %11, %3 ]
%6 = phi float [ 1.000000e+00, %0 ], [ %10, %3 ]
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str.6, i64 0, i64 0))
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), float* %1)
%9 = load float, float* %1
%10 = fmul float %6, %9
%11 = fadd float %5, %9
%12 = fadd float %4, 1.000000e+00
%13 = fcmp une float %12, 6.000000e+00
br i1 %13, label %3, label %14
14: ; preds = %3
%15 = fpext float %10 to double
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %15)
%17 = fpext float %11 to double
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), double %17)
%19 = fcmp ogt float %10, %11
%20 = select i1 %19, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str.5, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0)
%21 = call i32 @puts(i8* dereferenceable(1) %20)
ret i32 0
}