#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 *, double, double);
int sqrt(double);
int main(int argc, char const *argv[]) {
  int a = 2;
  int b = 3;
  int c = 1;
  double delta = b * b - 4 * a * c;
  double x1 = (-b - sqrt(delta)) / 2 * a;
  double x2 = (-b + sqrt(delta)) / 2 * a;
  printf("pierwiastki : %f %f\n", x1, x2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x14(%rbp)
movl   $0x3,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x18(%rbp),%eax
imul   -0x18(%rbp),%eax
mov    -0x14(%rbp),%ecx
shl    $0x2,%ecx
imul   -0x1c(%rbp),%ecx
sub    %ecx,%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
xor    %eax,%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x40(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    -0x40(%rbp),%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
imul   -0x14(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x30(%rbp)
xor    %eax,%eax
sub    -0x18(%rbp),%eax
mov    %eax,-0x3c(%rbp)
movsd  -0x28(%rbp),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
add    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
imul   -0x14(%rbp),%eax
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x30(%rbp),%xmm0
movsd  -0x38(%rbp),%xmm1
lea    0xe33(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xed7(%rip),%xmm0
call   1040 <sqrt@plt>
mov    $0xfffffffd,%ecx
sub    %eax,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
and    $0xfffffffe,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  %xmm0,(%rsp)
movsd  0xead(%rip),%xmm0
call   1040 <sqrt@plt>
mov    %eax,%ecx
add    $0xfffffffd,%ecx
shr    $0x1f,%ecx
add    %ecx,%eax
add    $0xfffffffd,%eax
and    $0xfffffffe,%eax
cvtsi2sd %eax,%xmm1
lea    0xe95(%rip),%rdi
movsd  (%rsp),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"pierwiastki : %f %f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca double
%9 = alloca double
%10 = alloca double
store i32 %0, i32* %3
store i8** %1, i8*** %4
store i32 2, i32* %5
store i32 3, i32* %6
store i32 1, i32* %7
%11 = load i32, i32* %6
%12 = load i32, i32* %6
%13 = mul nsw i32 %11, %12
%14 = load i32, i32* %5
%15 = mul nsw i32 4, %14
%16 = load i32, i32* %7
%17 = mul nsw i32 %15, %16
%18 = sub nsw i32 %13, %17
%19 = sitofp i32 %18 to double
store double %19, double* %8
%20 = load i32, i32* %6
%21 = sub nsw i32 0, %20
%22 = load double, double* %8
%23 = call i32 @sqrt(double %22)
%24 = sub nsw i32 %21, %23
%25 = sdiv i32 %24, 2
%26 = load i32, i32* %5
%27 = mul nsw i32 %25, %26
%28 = sitofp i32 %27 to double
store double %28, double* %9
%29 = load i32, i32* %6
%30 = sub nsw i32 0, %29
%31 = load double, double* %8
%32 = call i32 @sqrt(double %31)
%33 = add nsw i32 %30, %32
%34 = sdiv i32 %33, 2
%35 = load i32, i32* %5
%36 = mul nsw i32 %34, %35
%37 = sitofp i32 %36 to double
store double %37, double* %10
%38 = load double, double* %9
%39 = load double, double* %10
%40 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %38, double %39)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"pierwiastki : %f %f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @sqrt(double 1.000000e+00)
%4 = sub nsw i32 -3, %3
%5 = sdiv i32 %4, 2
%6 = shl nsw i32 %5, 1
%7 = sitofp i32 %6 to double
%8 = tail call i32 @sqrt(double 1.000000e+00)
%9 = add nsw i32 %8, -3
%10 = sdiv i32 %9, 2
%11 = shl nsw i32 %10, 1
%12 = sitofp i32 %11 to double
%13 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), double %7, double %12)
ret i32 0
}