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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%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),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm3
mulsd  -0x20(%rbp),%xmm3
movsd  0xe8d(%rip),%xmm1
mulsd  %xmm3,%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
ja     11c9 <main+0x99>
movsd  0xe57(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11dc <main+0xac>
jp     11dc <main+0xac>
lea    0xe4a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    129c <main+0x16c>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
addsd  %xmm1,%xmm0
movsd  0xded(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x40(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xda0(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xdad(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x38(%rbp),%xmm0
lea    0xda6(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
lea    0xed5(%rip),%rdi
lea    0x8(%rsp),%rsi
lea    0x20(%rsp),%rdx
lea    0x30(%rsp),%rcx
call   1050 <scanf@plt>
movsd  0x20(%rsp),%xmm3
movsd  0x8(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0xe83(%rip),%xmm1
movapd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm2,%xmm1
ja     1275 <main+0x135>
addsd  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jne    11a7 <main+0x67>
jnp    1275 <main+0x135>
sqrtsd %xmm2,%xmm4
xorpd  %xmm5,%xmm5
ucomisd %xmm5,%xmm2
movapd %xmm4,%xmm1
jae    11ec <main+0xac>
movapd %xmm2,%xmm0
movsd  %xmm2,0x10(%rsp)
movsd  %xmm3,(%rsp)
movsd  %xmm4,0x28(%rsp)
call   1060 <sqrt@plt>
xorpd  %xmm5,%xmm5
movsd  0x28(%rsp),%xmm4
movsd  (%rsp),%xmm3
movsd  0x10(%rsp),%xmm2
movapd %xmm0,%xmm1
subsd  %xmm3,%xmm1
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm1
movsd  0x20(%rsp),%xmm0
xorpd  0xe04(%rip),%xmm0
movapd %xmm0,0x10(%rsp)
ucomisd %xmm5,%xmm2
jae    122f <main+0xef>
movapd %xmm2,%xmm0
movsd  %xmm1,(%rsp)
call   1060 <sqrt@plt>
movsd  (%rsp),%xmm1
movapd %xmm0,%xmm4
movapd 0x10(%rsp),%xmm2
subsd  %xmm4,%xmm2
movsd  0x8(%rsp),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm2
movapd %xmm2,0x10(%rsp)
lea    0xdd6(%rip),%rdi
movapd %xmm1,%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xdd0(%rip),%rdi
movapd 0x10(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1281 <main+0x141>
lea    0xdc6(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x38,%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 = load double, double* %4
%13 = fmul double %11, %12
%14 = fmul double 4.000000e+00, %13
%15 = fneg double %14
%16 = call double @llvm.fmuladd.f64(double %9, double %10, double %15)
store double %16, double* %5
%17 = load double, double* %5
%18 = fcmp olt double %17, 0.000000e+00
br i1 %18, label %23, label %19
19: ; preds = %0
%20 = load double, double* %2
%21 = fmul double 2.000000e+00, %20
%22 = fcmp oeq double %21, 0.000000e+00
br i1 %22, label %23, label %25
23: ; preds = %19, %0
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %46
25: ; preds = %19
%26 = load double, double* %3
%27 = fneg double %26
%28 = load double, double* %5
%29 = call double @sqrt(double %28)
%30 = fadd double %27, %29
%31 = load double, double* %2
%32 = fmul double 2.000000e+00, %31
%33 = fdiv double %30, %32
store double %33, double* %6
%34 = load double, double* %3
%35 = fneg double %34
%36 = load double, double* %5
%37 = call double @sqrt(double %36)
%38 = fsub double %35, %37
%39 = load double, double* %2
%40 = fmul double 2.000000e+00, %39
%41 = fdiv double %38, %40
store double %41, double* %7
%42 = load double, double* %6
%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* %7
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %44)
br label %46
46: ; preds = %25, %23
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, %10
%12 = fmul double %11, -4.000000e+00
%13 = call double @llvm.fmuladd.f64(double %8, double %8, double %12)
%14 = fcmp olt double %13, 0.000000e+00
%15 = fmul double %9, 2.000000e+00
%16 = fcmp oeq double %15, 0.000000e+00
%17 = select i1 %14, i1 true, i1 %16
br i1 %17, label %18, label %20
18: ; preds = %0
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %35
20: ; preds = %0
%21 = call double @sqrt(double %13)
%22 = fsub double %21, %8
%23 = load double, double* %1
%24 = fmul double %23, 2.000000e+00
%25 = fdiv double %22, %24
%26 = load double, double* %2
%27 = fneg double %26
%28 = call double @sqrt(double %13)
%29 = fsub double %27, %28
%30 = load double, double* %1
%31 = fmul double %30, 2.000000e+00
%32 = fdiv double %29, %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), double %25)
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), double %32)
br label %35
35: ; preds = %20, %18
ret i32 0
}