#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 */
double pow(double, double);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, double *, double *, double *);
double sqrt(double);
int main() {
  double a, b, c, e;
  scanf("%lf%lf%lf", &a, &b, &c);
  double m = sqrt((b * b) - (4 * a * c));
  double n = (b * b) - (4 * a * c);
  e = pow(n, .5);
  if (a == 0 || n < 0) {
    printf("Impossivel calcular\n");
  } else {
    printf("R1 = %.5lf\n", (-b + m) / (2 * a));
    printf("R2 = %.5lf\n", (-b - m) / (2 * a));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xe8f(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xe4a(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
mulsd  -0x20(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  0xe07(%rip),%xmm1
call   1050 <pow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1220 <main+0xe0>
jp     1220 <main+0xe0>
jmp    122e <main+0xee>
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1241 <main+0x101>
lea    0xded(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12c1 <main+0x181>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  0xda6(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xdbd(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  0xd66(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xd89(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
lea    0x18(%rsp),%rcx
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0xe85(%rip),%xmm1
movsd  (%rsp),%xmm0
mulsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     119e <main+0x4e>
sqrtsd %xmm0,%xmm0
jmp    11a3 <main+0x53>
call   1070 <sqrt@plt>
movsd  %xmm0,0x10(%rsp)
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xe44(%rip),%xmm1
mulsd  0x18(%rsp),%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
movsd  0xe36(%rip),%xmm1
movsd  %xmm0,0x20(%rsp)
call   1060 <pow@plt>
movsd  0x8(%rsp),%xmm1
ucomisd 0xe25(%rip),%xmm1
jne    11ef <main+0x9f>
jnp    124d <main+0xfd>
xorpd  %xmm0,%xmm0
ucomisd 0x20(%rsp),%xmm0
ja     124d <main+0xfd>
movsd  0x10(%rsp),%xmm0
subsd  (%rsp),%xmm0
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
lea    0xe25(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  (%rsp),%xmm0
xorpd  0xdf7(%rip),%xmm0
subsd  0x10(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
lea    0xe02(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1259 <main+0x109>
lea    0xdfe(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.1 = [21 x i8] c"Impossivel calcular\0A\00"
@.str.2 = [12 x i8] c"R1 = %.5lf\0A\00"
@.str.3 = [12 x i8] c"R2 = %.5lf\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%9 = load double, double* %3
%10 = load double, double* %3
%11 = load double, double* %2
%12 = fmul double 4.000000e+00, %11
%13 = load double, double* %4
%14 = fmul double %12, %13
%15 = fneg double %14
%16 = call double @llvm.fmuladd.f64(double %9, double %10, double %15)
%17 = call double @sqrt(double %16)
store double %17, double* %6
%18 = load double, double* %3
%19 = load double, double* %3
%20 = load double, double* %2
%21 = fmul double 4.000000e+00, %20
%22 = load double, double* %4
%23 = fmul double %21, %22
%24 = fneg double %23
%25 = call double @llvm.fmuladd.f64(double %18, double %19, double %24)
store double %25, double* %7
%26 = load double, double* %7
%27 = call double @pow(double %26, double 5.000000e-01)
store double %27, double* %5
%28 = load double, double* %2
%29 = fcmp oeq double %28, 0.000000e+00
br i1 %29, label %33, label %30
30: ; preds = %0
%31 = load double, double* %7
%32 = fcmp olt double %31, 0.000000e+00
br i1 %32, label %33, label %35
33: ; preds = %30, %0
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %52
35: ; preds = %30
%36 = load double, double* %3
%37 = fneg double %36
%38 = load double, double* %6
%39 = fadd double %37, %38
%40 = load double, double* %2
%41 = fmul double 2.000000e+00, %40
%42 = fdiv double %39, %41
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %42)
%44 = load double, double* %3
%45 = fneg double %44
%46 = load double, double* %6
%47 = fsub double %45, %46
%48 = load double, double* %2
%49 = fmul double 2.000000e+00, %48
%50 = fdiv double %47, %49
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %50)
br label %52
52: ; preds = %35, %33
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lf%lf%lf\00"
@.str.2 = [12 x i8] c"R1 = %.5lf\0A\00"
@.str.3 = [12 x i8] c"R2 = %.5lf\0A\00"
@str = [20 x i8] c"Impossivel calcular\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 ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), double* %1, double* %2, double* %3)
%8 = load double, double* %2
%9 = load double, double* %1
%10 = load double, double* %3
%11 = fmul double %9, -4.000000e+00
%12 = fmul double %11, %10
%13 = call double @llvm.fmuladd.f64(double %8, double %8, double %12)
%14 = call double @sqrt(double %13)
%15 = load double, double* %2
%16 = load double, double* %1
%17 = load double, double* %3
%18 = fmul double %16, -4.000000e+00
%19 = fmul double %18, %17
%20 = call double @llvm.fmuladd.f64(double %15, double %15, double %19)
%21 = call double @pow(double %20, double 5.000000e-01)
%22 = load double, double* %1
%23 = fcmp oeq double %22, 0.000000e+00
%24 = fcmp olt double %20, 0.000000e+00
%25 = or i1 %23, %24
br i1 %25, label %26, label %28
26: ; preds = %0
%27 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %41
28: ; preds = %0
%29 = load double, double* %2
%30 = fsub double %14, %29
%31 = fmul double %22, 2.000000e+00
%32 = fdiv double %30, %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %32)
%34 = load double, double* %2
%35 = fneg double %34
%36 = fsub double %35, %14
%37 = load double, double* %1
%38 = fmul double %37, 2.000000e+00
%39 = fdiv double %36, %38
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %39)
br label %41
41: ; preds = %28, %26
ret i32 0
}