#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, x1, x2;
  scanf(" %lf %lf %lf", &A, &B, &C);
  if (A != 0.0) {
    delta = sqrt(((B * B) - 4 * A * C));
    if (delta >= 0.0) {
      x1 = (-B + delta) / (2 * A);
      x2 = (-B - delta) / (2 * A);
      printf("R1 = %0.5lf\n", x1);
      printf("R2 = %0.5lf\n", x2);
    } else
      printf("Impossivel calcular\n");
  } 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  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1174 <main+0x44>
jp     1174 <main+0x44>
jmp    1277 <main+0x147>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xe7a(%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  -0x28(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1264 <main+0x134>
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  0xe14(%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
subsd  -0x28(%rbp),%xmm0
movsd  0xddd(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
lea    0xdd8(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  -0x38(%rbp),%xmm0
lea    0xdd2(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1272 <main+0x142>
lea    0xdcc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1285 <main+0x155>
lea    0xdb9(%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
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
lea    0x18(%rsp),%rcx
call   1050 <scanf@plt>
movsd  0x10(%rsp),%xmm2
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm2
jne    1171 <main+0x31>
jnp    11a8 <main+0x68>
movsd  0x8(%rsp),%xmm0
mulsd  0xe81(%rip),%xmm2
mulsd  0x18(%rsp),%xmm2
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
jb     1199 <main+0x59>
sqrtsd %xmm0,%xmm0
jmp    119e <main+0x5e>
call   1060 <sqrt@plt>
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jae    11b6 <main+0x76>
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
jmp    120a <main+0xca>
movsd  0x8(%rsp),%xmm1
movapd 0xe4c(%rip),%xmm2
xorpd  %xmm1,%xmm2
subsd  %xmm0,%xmm2
subsd  %xmm1,%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
divsd  %xmm1,%xmm2
movapd %xmm2,0x20(%rsp)
lea    0xe3e(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
lea    0xe3d(%rip),%rdi
movapd 0x20(%rsp),%xmm0
mov    $0x1,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

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

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