#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;
  scanf("%lf %lf %lf", &a, &b, &c);
  if (a == 0)
    printf("Impossivel calcular\n");
  else if (b * b - 4 * a * c < 0)
    printf("Impossivel calcular\n");
  else {
    printf("R1 = %.5lf\n", (-b + sqrt(b * b - 4 * a * c)) / 2 / a);
    printf("R2 = %.5lf\n", (-b - sqrt(b * b - 4 * a * c)) / 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  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1182 <main+0x52>
jp     1182 <main+0x52>
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12fa <main+0x1ca>
movsd  -0x18(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  0xe6c(%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
jbe    11dd <main+0xad>
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    12f5 <main+0x1c5>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xdf0(%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>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xdb6(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x10(%rbp),%xmm0
lea    0xdcf(%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
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xd64(%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>
movaps %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xd2a(%rip),%xmm1
divsd  %xmm1,%xmm0
divsd  -0x10(%rbp),%xmm0
lea    0xd4f(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    12fa <main+0x1ca>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
lea    0xee5(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x18(%rsp),%rdx
lea    0x10(%rsp),%rcx
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm2
jne    1171 <main+0x31>
jnp    1197 <main+0x57>
movsd  0x18(%rsp),%xmm3
mulsd  0xe81(%rip),%xmm2
mulsd  0x10(%rsp),%xmm2
movapd %xmm3,%xmm0
mulsd  %xmm3,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm0,%xmm1
jbe    11aa <main+0x6a>
lea    0xeb6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11ba <main+0x7a>
sqrtsd %xmm0,%xmm0
jmp    11cb <main+0x8b>
movsd  %xmm3,0x20(%rsp)
call   1060 <sqrt@plt>
movsd  0x20(%rsp),%xmm3
subsd  %xmm3,%xmm0
mulsd  0xe31(%rip),%xmm0
divsd  0x8(%rsp),%xmm0
lea    0xe58(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
movapd 0xe27(%rip),%xmm2
xorpd  %xmm0,%xmm2
movsd  0x8(%rsp),%xmm1
mulsd  0xdf5(%rip),%xmm1
mulsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
ucomisd 0xdef(%rip),%xmm0
jb     1229 <main+0xe9>
sqrtsd %xmm0,%xmm0
jmp    123a <main+0xfa>
movapd %xmm2,0x20(%rsp)
call   1060 <sqrt@plt>
movapd 0x20(%rsp),%xmm2
subsd  %xmm0,%xmm2
mulsd  0xdc2(%rip),%xmm2
divsd  0x8(%rsp),%xmm2
lea    0xdf5(%rip),%rdi
movapd %xmm2,%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
jmp    11a3 <main+0x63>

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

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