#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 */
typedef int b;

/* Variables and functions */
int fabs(double);
scalar_t__ sqrt(double);
int oblRozwKwad(double a, double b, double c, double *t1, double *t2) {
  double delta = b * b - 4 * a * c;
  if (fabs(delta) < 1e-5) {
    *t1 = (-1) * (b) / (2 * a);
    return 1;
  } else if (delta < 0) {
    return 0;
  } else {
    *t1 = ((-1) * (b) + sqrt(delta)) / (2 * a);
    *t2 = ((-1) * (b)-sqrt(delta)) / (2 * a);
    return 2;
  }
}


x86 assembly (clang, -O0):
<oblRozwKwad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
mov    %rdi,-0x28(%rbp)
mov    %rsi,-0x30(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  0xeb7(%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,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1030 <fabs@plt>
cvtsi2sd %eax,%xmm1
movsd  0xe6b(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    11d1 <oblRozwKwad+0xb1>
movsd  0xe71(%rip),%xmm0
mulsd  -0x18(%rbp),%xmm0
movsd  0xe5c(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x1,-0x4(%rbp)
jmp    127f <oblRozwKwad+0x15f>
xorps  %xmm0,%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    11eb <oblRozwKwad+0xcb>
movl   $0x0,-0x4(%rbp)
jmp    127f <oblRozwKwad+0x15f>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  -0x48(%rbp),%xmm1
cvtsi2sd %rax,%xmm0
subsd  %xmm1,%xmm0
movsd  0xdfb(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x38(%rbp),%xmm0
call   1040 <sqrt@plt>
movsd  -0x40(%rbp),%xmm1
cvtsi2sd %rax,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
subsd  %xmm1,%xmm0
movsd  0xda9(%rip),%xmm1
mulsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
mov    -0x30(%rbp),%rax
movsd  %xmm0,(%rax)
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<oblRozwKwad>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  0xecb(%rip),%xmm3
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm0,%xmm3
mulsd  %xmm2,%xmm3
movapd %xmm1,0x10(%rsp)
movapd %xmm1,%xmm0
mulsd  %xmm1,%xmm0
addsd  %xmm3,%xmm0
movapd %xmm0,0x20(%rsp)
call   1030 <fabs@plt>
test   %eax,%eax
jle    11ea <oblRozwKwad+0xca>
xor    %eax,%eax
xorpd  %xmm0,%xmm0
ucomisd 0x20(%rsp),%xmm0
ja     120f <oblRozwKwad+0xef>
movaps 0x20(%rsp),%xmm0
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movapd 0x10(%rsp),%xmm1
subsd  %xmm1,%xmm0
xorpd  0xe72(%rip),%xmm1
movapd %xmm1,0x10(%rsp)
movsd  0x8(%rsp),%xmm1
addsd  %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx)
movaps 0x20(%rsp),%xmm0
call   1040 <sqrt@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
divsd  0x8(%rsp),%xmm1
movsd  %xmm1,(%r14)
mov    $0x2,%eax
jmp    120f <oblRozwKwad+0xef>
movapd 0x10(%rsp),%xmm0
xorpd  0xe18(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
addsd  %xmm1,%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,(%rbx)
mov    $0x1,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @oblRozwKwad(double %0, double %1, double %2, double* %3, double* %4) {
%6 = alloca i32
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double*
%11 = alloca double*
%12 = alloca double
store double %0, double* %7
store double %1, double* %8
store double %2, double* %9
store double* %3, double** %10
store double* %4, double** %11
%13 = load double, double* %8
%14 = load double, double* %8
%15 = load double, double* %7
%16 = fmul double 4.000000e+00, %15
%17 = load double, double* %9
%18 = fmul double %16, %17
%19 = fneg double %18
%20 = call double @llvm.fmuladd.f64(double %13, double %14, double %19)
store double %20, double* %12
%21 = load double, double* %12
%22 = call i32 @fabs(double %21)
%23 = sitofp i32 %22 to double
%24 = fcmp olt double %23, 1.000000e-05
br i1 %24, label %25, label %32
25: ; preds = %5
%26 = load double, double* %8
%27 = fmul double -1.000000e+00, %26
%28 = load double, double* %7
%29 = fmul double 2.000000e+00, %28
%30 = fdiv double %27, %29
%31 = load double*, double** %10
store double %30, double* %31
store i32 1, i32* %6
br label %56
32: ; preds = %5
%33 = load double, double* %12
%34 = fcmp olt double %33, 0.000000e+00
br i1 %34, label %35, label %36
35: ; preds = %32
store i32 0, i32* %6
br label %56
36: ; preds = %32
%37 = load double, double* %8
%38 = load double, double* %12
%39 = call i64 @sqrt(double %38)
%40 = sitofp i64 %39 to double
%41 = call double @llvm.fmuladd.f64(double -1.000000e+00, double %37, double %40)
%42 = load double, double* %7
%43 = fmul double 2.000000e+00, %42
%44 = fdiv double %41, %43
%45 = load double*, double** %10
store double %44, double* %45
%46 = load double, double* %8
%47 = load double, double* %12
%48 = call i64 @sqrt(double %47)
%49 = sitofp i64 %48 to double
%50 = fneg double %49
%51 = call double @llvm.fmuladd.f64(double -1.000000e+00, double %46, double %50)
%52 = load double, double* %7
%53 = fmul double 2.000000e+00, %52
%54 = fdiv double %51, %53
%55 = load double*, double** %11
store double %54, double* %55
store i32 2, i32* %6
br label %56
56: ; preds = %36, %35, %25
%57 = load i32, i32* %6
ret i32 %57
}

LLVM IR (-O2):
define i32 @oblRozwKwad(double %0, double %1, double %2, double* nocapture writeonly %3, double* nocapture writeonly %4) {
%6 = fmul double %0, -4.000000e+00
%7 = fmul double %6, %2
%8 = tail call double @llvm.fmuladd.f64(double %1, double %1, double %7)
%9 = tail call i32 @fabs(double %8)
%10 = icmp slt i32 %9, 1
br i1 %10, label %11, label %15
11: ; preds = %5
%12 = fneg double %1
%13 = fmul double %0, 2.000000e+00
%14 = fdiv double %12, %13
store double %14, double* %3
br label %28
15: ; preds = %5
%16 = fcmp olt double %8, 0.000000e+00
br i1 %16, label %28, label %17
17: ; preds = %15
%18 = tail call i64 @sqrt(double %8)
%19 = sitofp i64 %18 to double
%20 = tail call double @llvm.fmuladd.f64(double %1, double -1.000000e+00, double %19)
%21 = fmul double %0, 2.000000e+00
%22 = fdiv double %20, %21
store double %22, double* %3
%23 = tail call i64 @sqrt(double %8)
%24 = sitofp i64 %23 to double
%25 = fneg double %24
%26 = tail call double @llvm.fmuladd.f64(double %1, double -1.000000e+00, double %25)
%27 = fdiv double %26, %21
store double %27, double* %4
br label %28
28: ; preds = %15, %17, %11
%29 = phi i32 [ 1, %11 ], [ 2, %17 ], [ 0, %15 ]
ret i32 %29
}