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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
void lm_print_pars(int64_t nout, const long double *par, FILE *fout) {
  int64_t i;
  for (i = 0; i < nout; ++i)
    fprintf(fout, " %16.9g", (double)par[i]);
  fprintf(fout, "\n");
}


x86 assembly (clang, -O0):
<lm_print_pars>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x8(%rbp),%rax
jae    1174 <lm_print_pars+0x64>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
shl    $0x4,%rcx
fldt   (%rax,%rcx,1)
fstpl  -0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xea4(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    112c <lm_print_pars+0x1c>
mov    -0x18(%rbp),%rdi
lea    0xe89(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lm_print_pars>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdx,%r14
test   %rdi,%rdi
je     1161 <lm_print_pars+0x41>
mov    %rsi,%rbx
mov    %rdi,%r15
lea    0xec3(%rip),%r12
nopl   (%rax)
fldt   (%rbx)
fstpl  (%rsp)
movsd  (%rsp),%xmm0
mov    %r14,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1040 <fprintf@plt>
add    $0x10,%rbx
add    $0xffffffffffffffff,%r15
jne    1140 <lm_print_pars+0x20>
mov    $0xa,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <fputc@plt>

LLVM IR (-O0):
@.str = [8 x i8] c" %16.9g\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @lm_print_pars(i64 %0, x86_fp80* %1, i32* %2) {
%4 = alloca i64
%5 = alloca x86_fp80*
%6 = alloca i32*
%7 = alloca i64
store i64 %0, i64* %4
store x86_fp80* %1, x86_fp80** %5
store i32* %2, i32** %6
store i64 0, i64* %7
br label %8
8: ; preds = %20, %3
%9 = load i64, i64* %7
%10 = load i64, i64* %4
%11 = icmp ult i64 %9, %10
br i1 %11, label %12, label %23
12: ; preds = %8
%13 = load i32*, i32** %6
%14 = load x86_fp80*, x86_fp80** %5
%15 = load i64, i64* %7
%16 = getelementptr inbounds x86_fp80, x86_fp80* %14, i64 %15
%17 = load x86_fp80, x86_fp80* %16
%18 = fptrunc x86_fp80 %17 to double
%19 = call i32 (i32*, i8*, ...) @fprintf(i32* %13, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %18)
br label %20
20: ; preds = %12
%21 = load i64, i64* %7
%22 = add i64 %21, 1
store i64 %22, i64* %7
br label %8
23: ; preds = %8
%24 = load i32*, i32** %6
%25 = call i32 (i32*, i8*, ...) @fprintf(i32* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c" %16.9g\00"
define void @lm_print_pars(i64 %0, x86_fp80* nocapture %1, i32* nocapture %2) {
%4 = icmp eq i64 %0, 0
br i1 %4, label %13, label %5
5: ; preds = %3, %5
%6 = phi i64 [ %11, %5 ], [ 0, %3 ]
%7 = getelementptr inbounds x86_fp80, x86_fp80* %1, i64 %6
%8 = load x86_fp80, x86_fp80* %7
%9 = fptrunc x86_fp80 %8 to double
%10 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %2, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %9)
%11 = add nuw i64 %6, 1
%12 = icmp eq i64 %11, %0
br i1 %12, label %13, label %5
13: ; preds = %5, %3
%14 = tail call i32 @fputc(i32 10, i32* %2)
ret void
}