#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 */
float oblicz_d(int, int, int);
int /*<<< orphan*/ printf(char *, ...);
void wyswietl_wynik(int a, int b, int c, float x1r, float x1n, float x2r,
                    float x2n) {
  float d = oblicz_d(a, b, c);
  printf("Pierwiastki równania to:\n");
  if (d > 0) {
    printf("x1 = %f\nx2 = %f\n", x1r, x2r);
  } else if (d == 0) {
    printf("x1 = %f\n", x1r);
  } else {
    printf("x1r = %f, x1n = %f\nx2r = %f, x2n = %f\n", x1r, x1n, x2r, x2n);
  }
}


x86 assembly (clang, -O0):
<wyswietl_wynik>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
movss  %xmm1,-0x14(%rbp)
movss  %xmm2,-0x18(%rbp)
movss  %xmm3,-0x1c(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <oblicz_d@plt>
movss  %xmm0,-0x20(%rbp)
lea    0xea1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movss  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jbe    119c <wyswietl_wynik+0x7c>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe8b(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
jmp    1206 <wyswietl_wynik+0xe6>
movss  -0x20(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jne    11cf <wyswietl_wynik+0xaf>
jp     11cf <wyswietl_wynik+0xaf>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe69(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
jmp    1201 <wyswietl_wynik+0xe1>
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x14(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x18(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x1c(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xe3b(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
jmp    1206 <wyswietl_wynik+0xe6>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wyswietl_wynik>:
sub    $0x18,%rsp
movss  %xmm3,0x10(%rsp)
movss  %xmm2,0x8(%rsp)
movss  %xmm1,0xc(%rsp)
movss  %xmm0,0x4(%rsp)
call   1050 <oblicz_d@plt>
movss  %xmm0,0x14(%rsp)
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
xorps  %xmm0,%xmm0
movss  0x14(%rsp),%xmm1
ucomiss %xmm0,%xmm1
jbe    1197 <wyswietl_wynik+0x67>
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  0x8(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe74(%rip),%rdi
mov    $0x2,%al
add    $0x18,%rsp
jmp    1040 <printf@plt>
movss  0x8(%rsp),%xmm2
movss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
jne    11bd <wyswietl_wynik+0x8d>
jp     11bd <wyswietl_wynik+0x8d>
lea    0xe5f(%rip),%rdi
mov    $0x1,%al
add    $0x18,%rsp
jmp    1040 <printf@plt>
movss  0xc(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
cvtss2sd %xmm2,%xmm2
movss  0x10(%rsp),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xe3e(%rip),%rdi
mov    $0x4,%al
add    $0x18,%rsp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"Pierwiastki r\C3\B3wnania to:\0A\00"
@.str.1 = [17 x i8] c"x1 = %f\0Ax2 = %f\0A\00"
@.str.2 = [9 x i8] c"x1 = %f\0A\00"
@.str.3 = [39 x i8] c"x1r = %f, x1n = %f\0Ax2r = %f, x2n = %f\0A\00"
define void @wyswietl_wynik(i32 %0, i32 %1, i32 %2, float %3, float %4, float %5, float %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca float
%12 = alloca float
%13 = alloca float
%14 = alloca float
%15 = alloca float
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store float %3, float* %11
store float %4, float* %12
store float %5, float* %13
store float %6, float* %14
%16 = load i32, i32* %8
%17 = load i32, i32* %9
%18 = load i32, i32* %10
%19 = call float @oblicz_d(i32 %16, i32 %17, i32 %18)
store float %19, float* %15
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%21 = load float, float* %15
%22 = fcmp ogt float %21, 0.000000e+00
br i1 %22, label %23, label %29
23: ; preds = %7
%24 = load float, float* %11
%25 = fpext float %24 to double
%26 = load float, float* %13
%27 = fpext float %26 to double
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double %25, double %27)
br label %47
29: ; preds = %7
%30 = load float, float* %15
%31 = fcmp oeq float %30, 0.000000e+00
br i1 %31, label %32, label %36
32: ; preds = %29
%33 = load float, float* %11
%34 = fpext float %33 to double
%35 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double %34)
br label %46
36: ; preds = %29
%37 = load float, float* %11
%38 = fpext float %37 to double
%39 = load float, float* %12
%40 = fpext float %39 to double
%41 = load float, float* %13
%42 = fpext float %41 to double
%43 = load float, float* %14
%44 = fpext float %43 to double
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), double %38, double %40, double %42, double %44)
br label %46
46: ; preds = %36, %32
br label %47
47: ; preds = %46, %23
ret void
}

LLVM IR (-O2):
@.str.1 = [17 x i8] c"x1 = %f\0Ax2 = %f\0A\00"
@.str.2 = [9 x i8] c"x1 = %f\0A\00"
@.str.3 = [39 x i8] c"x1r = %f, x1n = %f\0Ax2r = %f, x2n = %f\0A\00"
@str = [26 x i8] c"Pierwiastki r\C3\B3wnania to:\00"
define void @wyswietl_wynik(i32 %0, i32 %1, i32 %2, float %3, float %4, float %5, float %6) {
%8 = tail call float @oblicz_d(i32 %0, i32 %1, i32 %2)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%10 = fcmp ogt float %8, 0.000000e+00
br i1 %10, label %11, label %15
11: ; preds = %7
%12 = fpext float %3 to double
%13 = fpext float %5 to double
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), double %12, double %13)
br label %25
15: ; preds = %7
%16 = fcmp oeq float %8, 0.000000e+00
%17 = fpext float %3 to double
br i1 %16, label %18, label %20
18: ; preds = %15
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), double %17)
br label %25
20: ; preds = %15
%21 = fpext float %4 to double
%22 = fpext float %5 to double
%23 = fpext float %6 to double
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), double %17, double %21, double %22, double %23)
br label %25
25: ; preds = %18, %20, %11
ret void
}