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


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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  0xe97(%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,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     125a <main+0x12a>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    11c6 <main+0x96>
jp     11c6 <main+0x96>
jmp    125a <main+0x12a>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  -0x38(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  0xe1d(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xe21(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  -0x30(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
subsd  %xmm1,%xmm0
movsd  0xdca(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
lea    0xdda(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1268 <main+0x138>
lea    0xdd3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
lea    0xed5(%rip),%rdi
mov    %rsp,%rsi
lea    0x8(%rsp),%rdx
lea    0x30(%rsp),%rcx
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm3
movsd  (%rsp),%xmm0
movsd  0xe90(%rip),%xmm1
mulsd  %xmm0,%xmm1
mulsd  0x30(%rsp),%xmm1
movapd %xmm3,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm2
jb     1251 <main+0x111>
ucomisd %xmm1,%xmm0
jne    11a0 <main+0x60>
jnp    1251 <main+0x111>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm2
movsd  %xmm0,0x28(%rsp)
movsd  %xmm2,0x10(%rsp)
jae    11d4 <main+0x94>
movsd  0x10(%rsp),%xmm0
movsd  %xmm3,0x20(%rsp)
call   1060 <sqrt@plt>
movsd  0x20(%rsp),%xmm3
subsd  %xmm3,%xmm0
movsd  (%rsp),%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
lea    0xe40(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm2
movsd  0x10(%rsp),%xmm0
ucomisd 0xe01(%rip),%xmm0
movsd  0x28(%rsp),%xmm1
jae    1224 <main+0xe4>
movapd %xmm2,0x10(%rsp)
call   1060 <sqrt@plt>
movapd 0x10(%rsp),%xmm2
movapd %xmm0,%xmm1
xorpd  0xde4(%rip),%xmm2
subsd  %xmm1,%xmm2
movsd  (%rsp),%xmm0
addsd  %xmm0,%xmm0
divsd  %xmm0,%xmm2
lea    0xdf4(%rip),%rdi
movapd %xmm2,%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
jmp    125d <main+0x11d>
lea    0xdec(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

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

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