#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 *, ...);
void sbout2(FILE *io, int n, int i, char *s1, char *s2, double *z) {
  int j;
  fprintf(io, "\t\t\t %8s %5d %1s\t %22.14e\n", s1, i, s2, z[1]);
  for (j = 2; j <= n; j++)
    fprintf(io, "\t\t\t\t\t\t %22.14e\n", z[j]);
  return;
}


x86 assembly (clang, -O0):
<sbout2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%ecx
mov    -0x20(%rbp),%r8
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
lea    0xeb3(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
movl   $0x2,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1194 <sbout2+0x84>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe9b(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    115b <sbout2+0x4b>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbout2>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
mov    %r9,%r14
mov    %edx,%eax
mov    %esi,%r13d
mov    %rdi,%r15
movsd  0x8(%r9),%xmm0
lea    0xecf(%rip),%rsi
mov    %rcx,%rdx
mov    %eax,%ecx
mov    $0x1,%al
call   1030 <fprintf@plt>
cmp    $0x2,%r13d
jl     117c <sbout2+0x6c>
add    $0x1,%r13d
mov    $0x2,%ebx
lea    0xec7(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsd  (%r14,%rbx,8),%xmm0
mov    %r15,%rdi
mov    %r12,%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r13
jne    1160 <sbout2+0x50>
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

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

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