#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, przeciwprostokatna = %.2f\n", a[i], b[i],
           przeciwprostokatna(a[i], b[i]));
  }
}


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    11e0 <main+0xc0>
movslq -0x44(%rbp),%rax
movsd  -0x20(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
movslq -0x44(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
movslq -0x44(%rbp),%rax
movsd  -0x20(%rbp,%rax,8),%xmm0
movslq -0x44(%rbp),%rax
movsd  -0x40(%rbp,%rax,8),%xmm1
call   1040 <przeciwprostokatna@plt>
movsd  -0x58(%rbp),%xmm1
movaps %xmm0,%xmm2
movsd  -0x50(%rbp),%xmm0
lea    0xe6b(%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    0xee8(%rip),%rbx
mov    %rbx,%rdi
movsd  0xeb5(%rip),%xmm0
movsd  0xeb5(%rip),%xmm1
call   1030 <printf@plt>
movsd  0xeb0(%rip),%xmm0
movaps %xmm0,%xmm1
call   1040 <przeciwprostokatna@plt>
movaps %xmm0,%xmm2
mov    %rbx,%rdi
movsd  0xe9a(%rip),%xmm0
movaps %xmm0,%xmm1
call   1030 <printf@plt>
movsd  0xe92(%rip),%xmm0
movsd  0xe92(%rip),%xmm1
call   1040 <przeciwprostokatna@plt>
movaps %xmm0,%xmm2
mov    %rbx,%rdi
movsd  0xe77(%rip),%xmm0
movsd  0xe77(%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 = [47 x i8] c"a = %.2f, b = %.2f, 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 = %29, %0
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %32
10: ; preds = %7
%11 = load i32, i32* %4
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 %12
%14 = load double, double* %13
%15 = load i32, i32* %4
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 %16
%18 = load double, double* %17
%19 = load i32, i32* %4
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [3 x double], [3 x double]* %2, i64 0, i64 %20
%22 = load double, double* %21
%23 = load i32, i32* %4
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 %24
%26 = load double, double* %25
%27 = call double @przeciwprostokatna(double %22, double %26)
%28 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double %14, double %18, double %27)
br label %29
29: ; preds = %10
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %7
32: ; preds = %7
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
@.str = [47 x i8] c"a = %.2f, b = %.2f, 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 ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double 3.000000e+00, double 4.000000e+00, double %1)
%3 = tail call double @przeciwprostokatna(double 5.000000e+00, double 5.000000e+00)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double 5.000000e+00, double 5.000000e+00, double %3)
%5 = tail call double @przeciwprostokatna(double 1.000000e+00, double 6.000000e+00)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), double 1.000000e+00, double 6.000000e+00, double %5)
ret i32 0
}