#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 */
float fabs(float);
int /*<<< orphan*/ printf(char *, float, ...);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
float sqrt(float);
int main() {
  float a, b, c;
  float r1, r2, delta;
  scanf("%f %f %f", &a, &b, &c);
  delta = (b * b) - (4 * a * c);
  if (delta < 0) {
    delta = fabs(delta);
    r1 = (-b + sqrt(delta)) / 2 * a;
    r2 = (-b - sqrt(delta)) / 2 * a;
    printf("COMPLEXAS\nR %f\nI %f", r1, r2);
  } else {
    r1 = (-b + sqrt(delta)) / 2 * a;
    r2 = (-b - sqrt(delta)) / 2 * a;
    if (r1 == r2 || r1 == r2 * (-1)) {
      printf("DUPLA\nRD %f", r1);
    } else {
      printf("REAIS\nR1 %f\nR2 %f", r1, r2);
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb6(%rip),%rdi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
lea    -0x10(%rbp),%rcx
call   1050 <scanf@plt>
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movss  0xe87(%rip),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  -0x10(%rbp),%xmm1
movd   %xmm1,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x1c(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x1c(%rbp),%xmm0
jbe    1260 <main+0x120>
movss  -0x1c(%rbp),%xmm0
call   1040 <fabs@plt>
movss  %xmm0,-0x1c(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x24(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  0xe16(%rip),%xmm1
divss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x20(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  0xdd3(%rip),%xmm1
divss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xdc1(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    135a <main+0x21a>
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x2c(%rbp),%xmm0
addss  %xmm1,%xmm0
movss  0xd6f(%rip),%xmm1
divss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x1c(%rbp),%xmm0
call   1060 <sqrt@plt>
movaps %xmm0,%xmm1
movss  -0x28(%rbp),%xmm0
subss  %xmm1,%xmm0
movss  0xd2c(%rip),%xmm1
divss  %xmm1,%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x14(%rbp),%xmm0
ucomiss -0x18(%rbp),%xmm0
jne    1300 <main+0x1c0>
jp     1300 <main+0x1c0>
jmp    1321 <main+0x1e1>
movss  -0x14(%rbp),%xmm0
movss  0xcfb(%rip),%xmm1
mulss  -0x18(%rbp),%xmm1
ucomiss %xmm1,%xmm0
jne    1339 <main+0x1f9>
jp     1339 <main+0x1f9>
movss  -0x14(%rbp),%xmm0
lea    0xcfc(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1355 <main+0x215>
movss  -0x14(%rbp),%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xce7(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    135a <main+0x21a>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
lea    0xf05(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0xc(%rsp),%rdx
lea    0x2c(%rsp),%rcx
call   1040 <scanf@plt>
movss  0x8(%rsp),%xmm0
mulss  0xea3(%rip),%xmm0
movss  0xc(%rsp),%xmm1
mulss  0x2c(%rsp),%xmm0
movaps %xmm1,%xmm2
mulss  %xmm1,%xmm2
addss  %xmm0,%xmm2
xorps  %xmm0,%xmm0
ucomiss %xmm2,%xmm0
jbe    1195 <main+0x65>
andps  0xead(%rip),%xmm2
ucomiss %xmm0,%xmm2
jb     1261 <main+0x131>
sqrtss %xmm2,%xmm3
jmp    1280 <main+0x150>
sqrtss %xmm2,%xmm5
ucomiss %xmm0,%xmm2
movaps %xmm5,%xmm4
movaps %xmm1,0x30(%rsp)
jae    11ca <main+0x9a>
movaps %xmm2,%xmm0
movaps %xmm2,0x10(%rsp)
movaps %xmm5,0x40(%rsp)
call   1050 <sqrt@plt>
movaps 0x40(%rsp),%xmm5
movaps 0x10(%rsp),%xmm2
movaps 0x30(%rsp),%xmm1
movaps %xmm0,%xmm4
movss  0xc(%rsp),%xmm6
xorps  0xe39(%rip),%xmm6
movss  0x8(%rsp),%xmm3
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm2
jae    1213 <main+0xe3>
movaps %xmm2,%xmm0
movaps %xmm3,0x10(%rsp)
movaps %xmm4,0x40(%rsp)
movaps %xmm6,0x50(%rsp)
call   1050 <sqrt@plt>
movaps 0x50(%rsp),%xmm6
movaps 0x40(%rsp),%xmm4
movaps 0x10(%rsp),%xmm3
movaps 0x30(%rsp),%xmm1
movaps %xmm0,%xmm5
unpcklps %xmm6,%xmm4
unpcklps %xmm5,%xmm1
subps  %xmm1,%xmm4
mulps  0xdfd(%rip),%xmm4
movss  0x8(%rsp),%xmm0
unpcklps %xmm0,%xmm3
mulps  %xmm4,%xmm3
movaps %xmm3,%xmm0
shufps $0x55,%xmm3,%xmm0
ucomiss %xmm0,%xmm3
jne    123d <main+0x10d>
jnp    12b0 <main+0x180>
movaps 0xdcc(%rip),%xmm1
xorps  %xmm0,%xmm1
ucomiss %xmm1,%xmm3
jne    124e <main+0x11e>
jnp    12b0 <main+0x180>
xorps  %xmm1,%xmm1
cvtss2sd %xmm0,%xmm1
lea    0xe0d(%rip),%rdi
jmp    12fe <main+0x1ce>
movaps %xmm2,%xmm0
movaps %xmm1,0x30(%rsp)
movaps %xmm2,0x10(%rsp)
call   1050 <sqrt@plt>
movaps 0x10(%rsp),%xmm2
movaps 0x30(%rsp),%xmm1
movaps %xmm0,%xmm3
subss  %xmm1,%xmm3
mulss  0xd78(%rip),%xmm3
mulss  0x8(%rsp),%xmm3
movss  0xc(%rsp),%xmm1
xorps  0xd71(%rip),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm0,%xmm2
jb     12c3 <main+0x193>
xorps  %xmm0,%xmm0
sqrtss %xmm2,%xmm0
jmp    12e1 <main+0x1b1>
lea    0xda6(%rip),%rdi
movaps %xmm3,%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1308 <main+0x1d8>
movaps %xmm2,%xmm0
movss  %xmm3,0x30(%rsp)
movaps %xmm1,0x10(%rsp)
call   1050 <sqrt@plt>
movaps 0x10(%rsp),%xmm1
movss  0x30(%rsp),%xmm3
subss  %xmm0,%xmm1
mulss  0xd17(%rip),%xmm1
mulss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xd4b(%rip),%rdi
movaps %xmm3,%xmm0
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [20 x i8] c"COMPLEXAS\0AR %f\0AI %f\00"
@.str.2 = [12 x i8] c"DUPLA\0ARD %f\00"
@.str.3 = [18 x i8] c"REAIS\0AR1 %f\0AR2 %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %2, float* %3, float* %4)
%9 = load float, float* %3
%10 = load float, float* %3
%11 = load float, float* %2
%12 = fmul float 4.000000e+00, %11
%13 = load float, float* %4
%14 = fmul float %12, %13
%15 = fneg float %14
%16 = call float @llvm.fmuladd.f32(float %9, float %10, float %15)
store float %16, float* %7
%17 = load float, float* %7
%18 = fcmp olt float %17, 0.000000e+00
br i1 %18, label %19, label %42
19: ; preds = %0
%20 = load float, float* %7
%21 = call float @fabs(float %20)
store float %21, float* %7
%22 = load float, float* %3
%23 = fneg float %22
%24 = load float, float* %7
%25 = call float @sqrt(float %24)
%26 = fadd float %23, %25
%27 = fdiv float %26, 2.000000e+00
%28 = load float, float* %2
%29 = fmul float %27, %28
store float %29, float* %5
%30 = load float, float* %3
%31 = fneg float %30
%32 = load float, float* %7
%33 = call float @sqrt(float %32)
%34 = fsub float %31, %33
%35 = fdiv float %34, 2.000000e+00
%36 = load float, float* %2
%37 = fmul float %35, %36
store float %37, float* %6
%38 = load float, float* %5
%39 = load float, float* %6
%40 = fpext float %39 to double
%41 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), float %38, double %40)
br label %76
42: ; preds = %0
%43 = load float, float* %3
%44 = fneg float %43
%45 = load float, float* %7
%46 = call float @sqrt(float %45)
%47 = fadd float %44, %46
%48 = fdiv float %47, 2.000000e+00
%49 = load float, float* %2
%50 = fmul float %48, %49
store float %50, float* %5
%51 = load float, float* %3
%52 = fneg float %51
%53 = load float, float* %7
%54 = call float @sqrt(float %53)
%55 = fsub float %52, %54
%56 = fdiv float %55, 2.000000e+00
%57 = load float, float* %2
%58 = fmul float %56, %57
store float %58, float* %6
%59 = load float, float* %5
%60 = load float, float* %6
%61 = fcmp oeq float %59, %60
br i1 %61, label %67, label %62
62: ; preds = %42
%63 = load float, float* %5
%64 = load float, float* %6
%65 = fmul float %64, -1.000000e+00
%66 = fcmp oeq float %63, %65
br i1 %66, label %67, label %70
67: ; preds = %62, %42
%68 = load float, float* %5
%69 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), float %68)
br label %75
70: ; preds = %62
%71 = load float, float* %5
%72 = load float, float* %6
%73 = fpext float %72 to double
%74 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), float %71, double %73)
br label %75
75: ; preds = %70, %67
br label %76
76: ; preds = %75, %19
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%f %f %f\00"
@.str.1 = [20 x i8] c"COMPLEXAS\0AR %f\0AI %f\00"
@.str.2 = [12 x i8] c"DUPLA\0ARD %f\00"
@.str.3 = [18 x i8] c"REAIS\0AR1 %f\0AR2 %f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%8 = load float, float* %2
%9 = load float, float* %1
%10 = load float, float* %3
%11 = fmul float %9, -4.000000e+00
%12 = fmul float %11, %10
%13 = call float @llvm.fmuladd.f32(float %8, float %8, float %12)
%14 = fcmp olt float %13, 0.000000e+00
br i1 %14, label %15, label %31
15: ; preds = %0
%16 = call float @llvm.fabs.f32(float %13)
%17 = call float @sqrt(float %16)
%18 = fsub float %17, %8
%19 = fmul float %18, 5.000000e-01
%20 = load float, float* %1
%21 = fmul float %20, %19
%22 = load float, float* %2
%23 = fneg float %22
%24 = call float @sqrt(float %16)
%25 = fsub float %23, %24
%26 = fmul float %25, 5.000000e-01
%27 = load float, float* %1
%28 = fmul float %27, %26
%29 = fpext float %28 to double
%30 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), float %21, double %29)
br label %58
31: ; preds = %0
%32 = call float @sqrt(float %13)
%33 = load float, float* %1
%34 = load float, float* %2
%35 = fneg float %34
%36 = call float @sqrt(float %13)
%37 = insertelement <2 x float> poison, float %32, i64 0
%38 = insertelement <2 x float> %37, float %35, i64 1
%39 = insertelement <2 x float> poison, float %8, i64 0
%40 = insertelement <2 x float> %39, float %36, i64 1
%41 = fsub <2 x float> %38, %40
%42 = fmul <2 x float> %41, <float 5.000000e-01, float 5.000000e-01>
%43 = load float, float* %1
%44 = insertelement <2 x float> poison, float %33, i64 0
%45 = insertelement <2 x float> %44, float %43, i64 1
%46 = fmul <2 x float> %45, %42
%47 = extractelement <2 x float> %46, i64 0
%48 = extractelement <2 x float> %46, i64 1
%49 = fcmp oeq float %47, %48
%50 = fneg float %48
%51 = fcmp oeq float %47, %50
%52 = or i1 %49, %51
br i1 %52, label %53, label %55
53: ; preds = %31
%54 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), float %47)
br label %58
55: ; preds = %31
%56 = fpext float %48 to double
%57 = call i32 (i8*, float, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.3, i64 0, i64 0), float %47, double %56)
br label %58
58: ; preds = %53, %55, %15
ret i32 0
}