#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char const *, int, int,
                           double);
void d_l_print(int Q, double *par, const char s[], int *Lq, int nL, FILE *f) {
  for (int L = 0; L <= Lq[Q]; L++) {
    fprintf(f, "%s %3d %3d % 12.7lf\n", s, Q, L, par[Q * nL + L]);
  }
  return;
}


x86 assembly (clang, -O0):
<d_l_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
mov    -0x20(%rbp),%rcx
movslq -0x4(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
jg     1189 <d_l_print+0x79>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x4(%rbp),%ecx
mov    -0x34(%rbp),%r8d
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%esi
imul   -0x24(%rbp),%esi
add    -0x34(%rbp),%esi
movslq %esi,%rsi
movsd  (%rax,%rsi,8),%xmm0
lea    0xe8a(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1136 <d_l_print+0x26>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_l_print>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
movslq %edi,%r13
cmpl   $0x0,(%rcx,%r13,4)
js     116e <d_l_print+0x5e>
mov    %r9,%r14
mov    %rcx,%r12
mov    %rdx,%r15
imul   %edi,%r8d
movslq %r8d,%rax
lea    (%rsi,%rax,8),%rbp
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
movsd  0x0(%rbp,%rbx,8),%xmm0
mov    %r14,%rdi
lea    0xeb0(%rip),%rsi
mov    %r15,%rdx
mov    %r13d,%ecx
mov    %ebx,%r8d
call   1030 <fprintf@plt>
lea    0x1(%rbx),%rax
movslq (%r12,%r13,4),%rcx
cmp    %rcx,%rbx
mov    %rax,%rbx
jl     1140 <d_l_print+0x30>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [21 x i8] c"%s %3d %3d % 12.7lf\0A\00"
define void @d_l_print(i32 %0, double* %1, i8* %2, i32* %3, i32 %4, i32* %5) {
%7 = alloca i32
%8 = alloca double*
%9 = alloca i8*
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32
store i32 %0, i32* %7
store double* %1, double** %8
store i8* %2, i8** %9
store i32* %3, i32** %10
store i32 %4, i32* %11
store i32* %5, i32** %12
store i32 0, i32* %13
br label %14
14: ; preds = %37, %6
%15 = load i32, i32* %13
%16 = load i32*, i32** %10
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
%20 = load i32, i32* %19
%21 = icmp sle i32 %15, %20
br i1 %21, label %22, label %40
22: ; preds = %14
%23 = load i32*, i32** %12
%24 = load i8*, i8** %9
%25 = load i32, i32* %7
%26 = load i32, i32* %13
%27 = load double*, double** %8
%28 = load i32, i32* %7
%29 = load i32, i32* %11
%30 = mul nsw i32 %28, %29
%31 = load i32, i32* %13
%32 = add nsw i32 %30, %31
%33 = sext i32 %32 to i64
%34 = getelementptr inbounds double, double* %27, i64 %33
%35 = load double, double* %34
%36 = call i32 @fprintf(i32* %23, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %24, i32 %25, i32 %26, double %35)
br label %37
37: ; preds = %22
%38 = load i32, i32* %13
%39 = add nsw i32 %38, 1
store i32 %39, i32* %13
br label %14
40: ; preds = %14
ret void
}

LLVM IR (-O2):
@.str = [21 x i8] c"%s %3d %3d % 12.7lf\0A\00"
define void @d_l_print(i32 %0, double* nocapture %1, i8* %2, i32* nocapture %3, i32 %4, i32* nocapture %5) {
%7 = sext i32 %0 to i64
%8 = getelementptr inbounds i32, i32* %3, i64 %7
%9 = load i32, i32* %8
%10 = icmp slt i32 %9, 0
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = mul nsw i32 %4, %0
%13 = sext i32 %12 to i64
br label %15
14: ; preds = %15, %6
ret void
15: ; preds = %11, %15
%16 = phi i64 [ 0, %11 ], [ %22, %15 ]
%17 = add nsw i64 %16, %13
%18 = getelementptr inbounds double, double* %1, i64 %17
%19 = load double, double* %18
%20 = trunc i64 %16 to i32
%21 = tail call i32 @fprintf(i32* %5, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %0, i32 %20, double %19)
%22 = add nuw nsw i64 %16, 1
%23 = load i32, i32* %8
%24 = sext i32 %23 to i64
%25 = icmp slt i64 %16, %24
br i1 %25, label %15, label %14
}