#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(void) {
  double a, b, c, delta, x, x2;
  scanf("%lf %lf %lf", &a, &b, &c);
  delta = sqrt((b * b) - (4 * a * c));
  x = ((-b) + delta) / (2 * a);
  x2 = ((-b) - delta) / (2 * a);
  if (a == 0 || delta < 0)
    printf("Impossivel calcular\n");
  else
    printf("R1 = %.5f\nR2 = %.5f\n", x, x2);
  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  0xe9f(%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  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
addsd  -0x28(%rbp),%xmm0
movsd  0xe3b(%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  0xe04(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x10(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1227 <main+0xf7>
jp     1227 <main+0xf7>
jmp    1235 <main+0x105>
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1248 <main+0x118>
lea    0xde0(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1260 <main+0x130>
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
lea    0xdd8(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed5(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
lea    0x10(%rsp),%rcx
call   1050 <scanf@plt>
movsd  0x8(%rsp),%xmm1
mulsd  0xe95(%rip),%xmm1
movsd  (%rsp),%xmm0
mulsd  0x10(%rsp),%xmm1
mulsd  %xmm0,%xmm0
addsd  %xmm1,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     118e <main+0x4e>
sqrtsd %xmm0,%xmm0
jmp    1197 <main+0x57>
call   1060 <sqrt@plt>
xorpd  %xmm1,%xmm1
movsd  0x8(%rsp),%xmm2
ucomisd %xmm1,%xmm2
jne    11a5 <main+0x65>
jnp    11e4 <main+0xa4>
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
ja     11e4 <main+0xa4>
movsd  (%rsp),%xmm3
addsd  %xmm2,%xmm2
movapd 0xe50(%rip),%xmm1
xorpd  %xmm3,%xmm1
subsd  %xmm0,%xmm1
divsd  %xmm2,%xmm1
subsd  %xmm3,%xmm0
divsd  %xmm2,%xmm0
lea    0xe51(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
jmp    11f0 <main+0xb0>
lea    0xe56(%rip),%rdi
call   1030 <puts@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
store i32 0, i32* %1
%8 = call i32 @scanf(i8* getelementptr inbounds ([12 x i8], [12 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 = fmul double 4.000000e+00, %11
%13 = load double, double* %4
%14 = fmul double %12, %13
%15 = fneg double %14
%16 = call double @llvm.fmuladd.f64(double %9, double %10, double %15)
%17 = call double @sqrt(double %16)
store double %17, double* %5
%18 = load double, double* %3
%19 = fneg double %18
%20 = load double, double* %5
%21 = fadd double %19, %20
%22 = load double, double* %2
%23 = fmul double 2.000000e+00, %22
%24 = fdiv double %21, %23
store double %24, double* %6
%25 = load double, double* %3
%26 = fneg double %25
%27 = load double, double* %5
%28 = fsub double %26, %27
%29 = load double, double* %2
%30 = fmul double 2.000000e+00, %29
%31 = fdiv double %28, %30
store double %31, double* %7
%32 = load double, double* %2
%33 = fcmp oeq double %32, 0.000000e+00
br i1 %33, label %37, label %34
34: ; preds = %0
%35 = load double, double* %5
%36 = fcmp olt double %35, 0.000000e+00
br i1 %36, label %37, label %39
37: ; preds = %34, %0
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %43
39: ; preds = %34
%40 = load double, double* %6
%41 = load double, double* %7
%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 = %39, %37
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 = [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 = call double @sqrt(double %13)
%15 = load double, double* %2
%16 = load double, double* %1
%17 = fmul double %16, 2.000000e+00
%18 = fcmp oeq double %16, 0.000000e+00
%19 = fcmp olt double %14, 0.000000e+00
%20 = select i1 %18, i1 true, i1 %19
br i1 %20, label %21, label %23
21: ; preds = %0
%22 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
br label %30
23: ; preds = %0
%24 = fneg double %15
%25 = fsub double %24, %14
%26 = fdiv double %25, %17
%27 = fsub double %14, %15
%28 = fdiv double %27, %17
%29 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.2, i64 0, i64 0), double %28, double %26)
br label %30
30: ; preds = %23, %21
ret i32 0
}