#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 */
double DBL_DIG;
int /*<<< orphan*/ lobatto_quad(double *, double *, int);
int /*<<< orphan*/ printf(char *, double, double, double, double);
int main() {
  int i, n = 13;
  double z[50], w[50];
  lobatto_quad(z, w, n);
  for (i = 0; i < n; ++i)
    printf("%+20.*g\t%+20.*g\n", DBL_DIG + 1, z[i], DBL_DIG + 1, w[i]);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0xd,-0xc(%rbp)
lea    -0x1a0(%rbp),%rdi
lea    -0x330(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <lobatto_quad@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    11bc <main+0x9c>
movsd  0xe96(%rip),%xmm0
mov    0x2e77(%rip),%rax
addsd  (%rax),%xmm0
movslq -0x8(%rbp),%rax
movsd  -0x1a0(%rbp,%rax,8),%xmm1
ff ff
movsd  0xe76(%rip),%xmm2
mov    0x2e57(%rip),%rax
addsd  (%rax),%xmm2
movslq -0x8(%rbp),%rax
movsd  -0x330(%rbp,%rax,8),%xmm3
ff ff
lea    0xe5f(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1156 <main+0x36>
xor    %eax,%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x328,%rsp
lea    0x190(%rsp),%rdi
mov    %rsp,%rsi
mov    $0xd,%edx
call   1040 <lobatto_quad@plt>
mov    0x2ea2(%rip),%r14
movsd  (%r14),%xmm0
addsd  0xead(%rip),%xmm0
movsd  0x190(%rsp),%xmm1
movsd  (%rsp),%xmm3
lea    0xea0(%rip),%rbx
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xe7f(%rip),%xmm0
movsd  0x198(%rsp),%xmm1
movsd  0x8(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xe57(%rip),%xmm0
movsd  0x1a0(%rsp),%xmm1
movsd  0x10(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xe2f(%rip),%xmm0
movsd  0x1a8(%rsp),%xmm1
movsd  0x18(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xe07(%rip),%xmm0
movsd  0x1b0(%rsp),%xmm1
movsd  0x20(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xddf(%rip),%xmm0
movsd  0x1b8(%rsp),%xmm1
movsd  0x28(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xdb7(%rip),%xmm0
movsd  0x1c0(%rsp),%xmm1
movsd  0x30(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xd8f(%rip),%xmm0
movsd  0x1c8(%rsp),%xmm1
movsd  0x38(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xd67(%rip),%xmm0
movsd  0x1d0(%rsp),%xmm1
movsd  0x40(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xd3f(%rip),%xmm0
movsd  0x1d8(%rsp),%xmm1
movsd  0x48(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xd17(%rip),%xmm0
movsd  0x1e0(%rsp),%xmm1
movsd  0x50(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  (%r14),%xmm0
addsd  0xcef(%rip),%xmm0
movsd  0x1e8(%rsp),%xmm1
movsd  0x58(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
movsd  0xccc(%rip),%xmm0
addsd  (%r14),%xmm0
movsd  0x1f0(%rsp),%xmm1
movsd  0x60(%rsp),%xmm3
mov    %rbx,%rdi
movapd %xmm0,%xmm2
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x328,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [17 x i8] c"%+20.*g\09%+20.*g\0A\00"
@DBL_DIG = global double 0.000000e+00
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca [50 x double]
%5 = alloca [50 x double]
store i32 0, i32* %1
store i32 13, i32* %3
%6 = getelementptr inbounds [50 x double], [50 x double]* %4, i64 0, i64 0
%7 = getelementptr inbounds [50 x double], [50 x double]* %5, i64 0, i64 0
%8 = load i32, i32* %3
%9 = call i32 @lobatto_quad(double* %6, double* %7, i32 %8)
store i32 0, i32* %2
br label %10
10: ; preds = %28, %0
%11 = load i32, i32* %2
%12 = load i32, i32* %3
%13 = icmp slt i32 %11, %12
br i1 %13, label %14, label %31
14: ; preds = %10
%15 = load double, double* @DBL_DIG
%16 = fadd double %15, 1.000000e+00
%17 = load i32, i32* %2
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [50 x double], [50 x double]* %4, i64 0, i64 %18
%20 = load double, double* %19
%21 = load double, double* @DBL_DIG
%22 = fadd double %21, 1.000000e+00
%23 = load i32, i32* %2
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [50 x double], [50 x double]* %5, i64 0, i64 %24
%26 = load double, double* %25
%27 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %16, double %20, double %22, double %26)
br label %28
28: ; preds = %14
%29 = load i32, i32* %2
%30 = add nsw i32 %29, 1
store i32 %30, i32* %2
br label %10
31: ; preds = %10
ret i32 0
}

LLVM IR (-O2):
@.str = [17 x i8] c"%+20.*g\09%+20.*g\0A\00"
@DBL_DIG = global double 0.000000e+00
define i32 @main() {
%1 = alloca [50 x double]
%2 = alloca [50 x double]
%3 = bitcast [50 x double]* %1 to i8*
%4 = bitcast [50 x double]* %2 to i8*
%5 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 0
%6 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 0
%7 = call i32 @lobatto_quad(double* %5, double* %6, i32 13)
%8 = load double, double* @DBL_DIG
%9 = fadd double %8, 1.000000e+00
%10 = load double, double* %5
%11 = load double, double* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %9, double %10, double %9, double %11)
%13 = load double, double* @DBL_DIG
%14 = fadd double %13, 1.000000e+00
%15 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 1
%16 = load double, double* %15
%17 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 1
%18 = load double, double* %17
%19 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %14, double %16, double %14, double %18)
%20 = load double, double* @DBL_DIG
%21 = fadd double %20, 1.000000e+00
%22 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 2
%23 = load double, double* %22
%24 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 2
%25 = load double, double* %24
%26 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %21, double %23, double %21, double %25)
%27 = load double, double* @DBL_DIG
%28 = fadd double %27, 1.000000e+00
%29 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 3
%30 = load double, double* %29
%31 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 3
%32 = load double, double* %31
%33 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %28, double %30, double %28, double %32)
%34 = load double, double* @DBL_DIG
%35 = fadd double %34, 1.000000e+00
%36 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 4
%37 = load double, double* %36
%38 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 4
%39 = load double, double* %38
%40 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %35, double %37, double %35, double %39)
%41 = load double, double* @DBL_DIG
%42 = fadd double %41, 1.000000e+00
%43 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 5
%44 = load double, double* %43
%45 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 5
%46 = load double, double* %45
%47 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %42, double %44, double %42, double %46)
%48 = load double, double* @DBL_DIG
%49 = fadd double %48, 1.000000e+00
%50 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 6
%51 = load double, double* %50
%52 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 6
%53 = load double, double* %52
%54 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %49, double %51, double %49, double %53)
%55 = load double, double* @DBL_DIG
%56 = fadd double %55, 1.000000e+00
%57 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 7
%58 = load double, double* %57
%59 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 7
%60 = load double, double* %59
%61 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %56, double %58, double %56, double %60)
%62 = load double, double* @DBL_DIG
%63 = fadd double %62, 1.000000e+00
%64 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 8
%65 = load double, double* %64
%66 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 8
%67 = load double, double* %66
%68 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %63, double %65, double %63, double %67)
%69 = load double, double* @DBL_DIG
%70 = fadd double %69, 1.000000e+00
%71 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 9
%72 = load double, double* %71
%73 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 9
%74 = load double, double* %73
%75 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %70, double %72, double %70, double %74)
%76 = load double, double* @DBL_DIG
%77 = fadd double %76, 1.000000e+00
%78 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 10
%79 = load double, double* %78
%80 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 10
%81 = load double, double* %80
%82 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %77, double %79, double %77, double %81)
%83 = load double, double* @DBL_DIG
%84 = fadd double %83, 1.000000e+00
%85 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 11
%86 = load double, double* %85
%87 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 11
%88 = load double, double* %87
%89 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %84, double %86, double %84, double %88)
%90 = load double, double* @DBL_DIG
%91 = fadd double %90, 1.000000e+00
%92 = getelementptr inbounds [50 x double], [50 x double]* %1, i64 0, i64 12
%93 = load double, double* %92
%94 = getelementptr inbounds [50 x double], [50 x double]* %2, i64 0, i64 12
%95 = load double, double* %94
%96 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), double %91, double %93, double %91, double %95)
ret i32 0
}