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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeb2(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1050 <scanf@plt>
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1188 <main+0x48>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    125c <main+0x11c>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
call   1040 <getDelta@plt>
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    11c2 <main+0x82>
lea    0xe5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1257 <main+0x117>
movsd  -0x28(%rbp),%xmm0
call   1060 <sqrt@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x30(%rbp),%xmm0
movsd  0xe06(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
subsd  -0x30(%rbp),%xmm0
movsd  0xdcf(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
lea    0xdd9(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    125c <main+0x11c>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xebd(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
lea    0x10(%rsp),%rcx
call   1060 <scanf@plt>
movsd  0x8(%rsp),%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jae    1197 <main+0x47>
movsd  (%rsp),%xmm1
movsd  0x10(%rsp),%xmm2
call   1050 <getDelta@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    11a5 <main+0x55>
lea    0xe9b(%rip),%rdi
call   1030 <puts@plt>
jmp    11f3 <main+0xa3>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     11b5 <main+0x65>
sqrtsd %xmm0,%xmm0
jmp    11ba <main+0x6a>
call   1070 <sqrt@plt>
movsd  (%rsp),%xmm2
movapd 0xe39(%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    0xe38(%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 = [21 x i8] c"R1 = %.5f\0AR2 = %.5f\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
%8 = alloca double
store i32 0, i32* %1
%9 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), double* %2, double* %3, double* %4)
%10 = load double, double* %2
%11 = fcmp ole double %10, 0.000000e+00
br i1 %11, label %12, label %14
12: ; preds = %0
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %44
14: ; preds = %0
%15 = load double, double* %2
%16 = load double, double* %3
%17 = load double, double* %4
%18 = call double @getDelta(double %15, double %16, double %17)
store double %18, double* %5
%19 = load double, double* %5
%20 = fcmp olt double %19, 0.000000e+00
br i1 %20, label %21, label %23
21: ; preds = %14
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %43
23: ; preds = %14
%24 = load double, double* %5
%25 = call double @sqrt(double %24)
store double %25, double* %6
%26 = load double, double* %3
%27 = fneg double %26
%28 = load double, double* %6
%29 = fadd double %27, %28
%30 = load double, double* %2
%31 = fmul double 2.000000e+00, %30
%32 = fdiv double %29, %31
store double %32, double* %7
%33 = load double, double* %3
%34 = fneg double %33
%35 = load double, double* %6
%36 = fsub double %34, %35
%37 = load double, double* %2
%38 = fmul double 2.000000e+00, %37
%39 = fdiv double %36, %38
store double %39, double* %8
%40 = load double, double* %7
%41 = load double, double* %8
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), double %40, double %41)
br label %43
43: ; preds = %23, %21
br label %44
44: ; preds = %43, %12
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"%lf %lf %lf\00"
@.str.2 = [21 x i8] c"R1 = %.5f\0AR2 = %.5f\0A\00"
@str.3 = [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 ugt double %8, 0.000000e+00
br i1 %9, label %12, label %10
10: ; preds = %0
%11 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.3, i64 0, i64 0))
br label %30
12: ; preds = %0
%13 = load double, double* %2
%14 = load double, double* %3
%15 = call double @getDelta(double %8, double %13, double %14)
%16 = fcmp olt double %15, 0.000000e+00
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.3, i64 0, i64 0))
br label %30
19: ; preds = %12
%20 = call double @sqrt(double %15)
%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 ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), double %26, double %28)
br label %30
30: ; preds = %17, %19, %10
ret i32 0
}