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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1040 <scanf@plt>
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  0xe97(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x20(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
ja     11b7 <main+0x87>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11ca <main+0x9a>
jp     11ca <main+0x9a>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1281 <main+0x151>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xe24(%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   1050 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  0xdd0(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  -0x18(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
subsd  -0x28(%rbp),%xmm1
movsd  0xd9e(%rip),%xmm2
mulsd  -0x10(%rbp),%xmm2
divsd  %xmm2,%xmm1
lea    0xdb7(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
lea    0x10(%rsp),%rcx
call   1050 <scanf@plt>
movsd  (%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
movsd  0xe90(%rip),%xmm2
mulsd  %xmm1,%xmm2
mulsd  0x10(%rsp),%xmm2
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm2,%xmm2
ucomisd %xmm0,%xmm2
ja     11a4 <main+0x64>
ucomisd %xmm2,%xmm1
jne    1194 <main+0x54>
jnp    11a4 <main+0x64>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11b2 <main+0x72>
sqrtsd %xmm0,%xmm0
jmp    11b7 <main+0x77>
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
jmp    11f0 <main+0xb0>
call   1060 <sqrt@plt>
movsd  (%rsp),%xmm2
movapd 0xe4c(%rip),%xmm1
xorpd  %xmm2,%xmm1
subsd  %xmm0,%xmm1
subsd  %xmm2,%xmm0
movsd  0x8(%rsp),%xmm2
addsd  %xmm2,%xmm2
divsd  %xmm2,%xmm0
divsd  %xmm2,%xmm1
lea    0xe43(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.2 = [23 x i8] c"R1 = %.5lf\0AR2 = %.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 ([12 x i8], [12 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 = fcmp olt double %13, 0.000000e+00
%15 = fcmp oeq double %9, 0.000000e+00
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %30
19: ; preds = %0
%20 = call double @sqrt(double %13)
%21 = load double, double* %2
%22 = fneg double %21
%23 = fsub double %20, %21
%24 = load double, double* %1
%25 = fmul double %24, 2.000000e+00
%26 = fdiv double %23, %25
%27 = fsub double %22, %20
%28 = fdiv double %27, %25
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0), double %26, double %28)
br label %30
30: ; preds = %19, %17
ret i32 0
}