#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, double);
double przeciwprostokatna(double, double);
int main() {
  double a[] = {3.0, 5.0, 1.0};
  double b[] = {4.0, 5.0, 6.0};
  for (int i = 0; i < 3; i++) {
    printf("a = %.2f, b = %.2f\n, przeciwprostokatna = %.2f\n", a[0], b[0],
           przeciwprostokatna(a[0], b[0]));
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec9(%rip),%rax
mov    %rax,-0x40(%rbp)
mov    0xec6(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
cmpl   $0x3,-0x44(%rbp)
jge    11cc <main+0xac>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x40(%rbp),%xmm1
call   1040 <przeciwprostokatna@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    1178 <main+0x58>
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
call   1040 <przeciwprostokatna@plt>
movaps %xmm0,%xmm2
lea    0xed0(%rip),%rbx
mov    %rbx,%rdi
movsd  0xeb5(%rip),%xmm0
movsd  0xeb5(%rip),%xmm1
call   1030 <printf@plt>
movsd  0xea0(%rip),%xmm0
movsd  0xea0(%rip),%xmm1
call   1040 <przeciwprostokatna@plt>
movaps %xmm0,%xmm2
mov    %rbx,%rdi
movsd  0xe85(%rip),%xmm0
movsd  0xe85(%rip),%xmm1
call   1030 <printf@plt>
movsd  0xe70(%rip),%xmm0
movsd  0xe70(%rip),%xmm1
call   1040 <przeciwprostokatna@plt>
movaps %xmm0,%xmm2
mov    %rbx,%rdi
movsd  0xe55(%rip),%xmm0
movsd  0xe55(%rip),%xmm1
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.a = [3 x double] [double 3.000000e+00, double 5.000000e+00, double 1.000000e+00]
@__const.main.b = [3 x double] [double 4.000000e+00, double 5.000000e+00, double 6.000000e+00]
@.str = [48 x i8] c"a = %.2f, b = %.2f\0A, przeciwprostokatna = %.2f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x double]
%3 = alloca [3 x double]
%4 = alloca i32
store i32 0, i32* %1
%5 = bitcast [3 x double]* %2 to i8*
%6 = bitcast [3 x double]* %3 to i8*
store i32 0, i32* %4
br label %7
7: ; preds = %21, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %24
10: ; preds = %7
%11 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%12 = load double, double* %11
%13 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%14 = load double, double* %13
%15 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 0
%16 = load double, double* %15
%17 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%18 = load double, double* %17
%19 = call double @przeciwprostokatna(double %16, double %18)
%20 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double %12, double %14, double %19)
br label %21
21: ; preds = %10
%22 = load i32, i32* %4
%23 = add nsw i32 %22, 1
store i32 %23, i32* %4
br label %7
24: ; preds = %7
%25 = load i32, i32* %1
ret i32 %25
}

LLVM IR (-O2):
@.str = [48 x i8] c"a = %.2f, b = %.2f\0A, przeciwprostokatna = %.2f\0A\00"
define i32 @main() {
%1 = tail call double @przeciwprostokatna(double 3.000000e+00, double 4.000000e+00)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, double 4.000000e+00, double %1)
%3 = tail call double @przeciwprostokatna(double 3.000000e+00, double 4.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, double 4.000000e+00, double %3)
%5 = tail call double @przeciwprostokatna(double 3.000000e+00, double 4.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, double 4.000000e+00, double %5)
ret i32 0
}