#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 sbout1(FILE *io, int n, char *s1, double z, double *z1, int job,
            int level) {
  int j;
  if (job != 2) {
    if (level == 1)
      fprintf(io, " %s\t %22.14e\n", s1, z);
    if (level == 2)
      fprintf(io, "\t\t\t %s\t %22.14e\n", s1, z);
    return;
  }
  if (n == 0)
    return;
  if (level == 1)
    fprintf(io, " %s\t %22.14e\n", s1, z1[1]);
  if (level == 2)
    fprintf(io, "\t\t\t %s\t %22.14e\n", s1, z1[1]);
  for (j = 2; j <= n; j++) {
    if (level == 1)
      fprintf(io, " \t\t\t %22.14e\n", z1[j]);
    if (level == 2)
      fprintf(io, " \t\t\t\t\t\t %22.14e\n", z1[j]);
  }
  return;
}


x86 assembly (clang, -O0):
<sbout1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    %r9d,-0x30(%rbp)
cmpl   $0x2,-0x2c(%rbp)
je     118d <sbout1+0x7d>
cmpl   $0x1,-0x30(%rbp)
jne    1163 <sbout1+0x53>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
movsd  -0x20(%rbp),%xmm0
lea    0xea7(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
cmpl   $0x2,-0x30(%rbp)
jne    1188 <sbout1+0x78>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
movsd  -0x20(%rbp),%xmm0
lea    0xe7f(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
jmp    126b <sbout1+0x15b>
cmpl   $0x0,-0xc(%rbp)
jne    119c <sbout1+0x8c>
jmp    126b <sbout1+0x15b>
cmpl   $0x1,-0x30(%rbp)
jne    11c5 <sbout1+0xb5>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
lea    0xe45(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
cmpl   $0x2,-0x30(%rbp)
jne    11ee <sbout1+0xde>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x28(%rbp),%rax
movsd  0x8(%rax),%xmm0
lea    0xe19(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
movl   $0x2,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     1266 <sbout1+0x156>
cmpl   $0x1,-0x30(%rbp)
jne    122a <sbout1+0x11a>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xdee(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
cmpl   $0x2,-0x30(%rbp)
jne    1253 <sbout1+0x143>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xdd3(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
jmp    1258 <sbout1+0x148>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    11f5 <sbout1+0xe5>
jmp    126b <sbout1+0x15b>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sbout1>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%ebp
mov    %rdi,%r14
cmp    $0x2,%r8d
jne    113e <sbout1+0x2e>
mov    %esi,%ebx
test   %esi,%esi
je     11a2 <sbout1+0x92>
mov    %rcx,%r15
cmp    $0x1,%ebp
jne    1170 <sbout1+0x60>
lea    0xec7(%rip),%rsi
jmp    117c <sbout1+0x6c>
cmp    $0x1,%ebp
je     1151 <sbout1+0x41>
cmp    $0x2,%ebp
jne    11a2 <sbout1+0x92>
lea    0xeb1(%rip),%rsi
jmp    1158 <sbout1+0x48>
lea    0xeab(%rip),%rsi
mov    %r14,%rdi
mov    $0x1,%al
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <fprintf@plt>
cmp    $0x2,%ebp
jne    119a <sbout1+0x8a>
lea    0xe84(%rip),%rsi
cmp    $0x1,%ebp
setne  %r12b
movsd  0x8(%r15),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1030 <fprintf@plt>
cmp    $0x2,%ebx
jl     11a2 <sbout1+0x92>
jmp    11b1 <sbout1+0xa1>
xor    %r12d,%r12d
cmp    $0x2,%ebx
jge    11b1 <sbout1+0xa1>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
add    $0x1,%ebx
mov    $0x2,%r13d
jmp    11c9 <sbout1+0xb9>
nopl   0x0(%rax)
add    $0x1,%r13
cmp    %r13,%rbx
je     11a2 <sbout1+0x92>
cmp    $0x1,%ebp
jne    11e5 <sbout1+0xd5>
movsd  (%r15,%r13,8),%xmm0
mov    %r14,%rdi
lea    0xe33(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
test   %r12b,%r12b
je     11c0 <sbout1+0xb0>
movsd  (%r15,%r13,8),%xmm0
mov    %r14,%rdi
lea    0xe25(%rip),%rsi
mov    $0x1,%al
call   1030 <fprintf@plt>
jmp    11c0 <sbout1+0xb0>

LLVM IR (-O0):
@.str = [14 x i8] c" %s\09 %22.14e\0A\00"
@.str.1 = [17 x i8] c"\09\09\09 %s\09 %22.14e\0A\00"
@.str.2 = [14 x i8] c" \09\09\09 %22.14e\0A\00"
@.str.3 = [17 x i8] c" \09\09\09\09\09\09 %22.14e\0A\00"
define void @sbout1(i32* %0, i32 %1, i8* %2, double %3, double* %4, i32 %5, i32 %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i8*
%11 = alloca double
%12 = alloca double*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32* %0, i32** %8
store i32 %1, i32* %9
store i8* %2, i8** %10
store double %3, double* %11
store double* %4, double** %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%16 = load i32, i32* %13
%17 = icmp ne i32 %16, 2
br i1 %17, label %18, label %35
18: ; preds = %7
%19 = load i32, i32* %14
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %26
21: ; preds = %18
%22 = load i32*, i32** %8
%23 = load i8*, i8** %10
%24 = load double, double* %11
%25 = call i32 (i32*, i8*, ...) @fprintf(i32* %22, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %23, double %24)
br label %26
26: ; preds = %21, %18
%27 = load i32, i32* %14
%28 = icmp eq i32 %27, 2
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load i32*, i32** %8
%31 = load i8*, i8** %10
%32 = load double, double* %11
%33 = call i32 (i32*, i8*, ...) @fprintf(i32* %30, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %31, double %32)
br label %34
34: ; preds = %29, %26
br label %91
35: ; preds = %7
%36 = load i32, i32* %9
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %39
38: ; preds = %35
br label %91
39: ; preds = %35
%40 = load i32, i32* %14
%41 = icmp eq i32 %40, 1
br i1 %41, label %42, label %49
42: ; preds = %39
%43 = load i32*, i32** %8
%44 = load i8*, i8** %10
%45 = load double*, double** %12
%46 = getelementptr inbounds double, double* %45, i64 1
%47 = load double, double* %46
%48 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %44, double %47)
br label %49
49: ; preds = %42, %39
%50 = load i32, i32* %14
%51 = icmp eq i32 %50, 2
br i1 %51, label %52, label %59
52: ; preds = %49
%53 = load i32*, i32** %8
%54 = load i8*, i8** %10
%55 = load double*, double** %12
%56 = getelementptr inbounds double, double* %55, i64 1
%57 = load double, double* %56
%58 = call i32 (i32*, i8*, ...) @fprintf(i32* %53, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i8* %54, double %57)
br label %59
59: ; preds = %52, %49
store i32 2, i32* %15
br label %60
60: ; preds = %87, %59
%61 = load i32, i32* %15
%62 = load i32, i32* %9
%63 = icmp sle i32 %61, %62
br i1 %63, label %64, label %90
64: ; preds = %60
%65 = load i32, i32* %14
%66 = icmp eq i32 %65, 1
br i1 %66, label %67, label %75
67: ; preds = %64
%68 = load i32*, i32** %8
%69 = load double*, double** %12
%70 = load i32, i32* %15
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds double, double* %69, i64 %71
%73 = load double, double* %72
%74 = call i32 (i32*, i8*, ...) @fprintf(i32* %68, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %73)
br label %75
75: ; preds = %67, %64
%76 = load i32, i32* %14
%77 = icmp eq i32 %76, 2
br i1 %77, label %78, label %86
78: ; preds = %75
%79 = load i32*, i32** %8
%80 = load double*, double** %12
%81 = load i32, i32* %15
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds double, double* %80, i64 %82
%84 = load double, double* %83
%85 = call i32 (i32*, i8*, ...) @fprintf(i32* %79, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %84)
br label %86
86: ; preds = %78, %75
br label %87
87: ; preds = %86
%88 = load i32, i32* %15
%89 = add nsw i32 %88, 1
store i32 %89, i32* %15
br label %60
90: ; preds = %60
br label %91
91: ; preds = %90, %38, %34
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c" %s\09 %22.14e\0A\00"
@.str.1 = [17 x i8] c"\09\09\09 %s\09 %22.14e\0A\00"
@.str.2 = [14 x i8] c" \09\09\09 %22.14e\0A\00"
@.str.3 = [17 x i8] c" \09\09\09\09\09\09 %22.14e\0A\00"
define void @sbout1(i32* nocapture %0, i32 %1, i8* %2, double %3, double* nocapture %4, i32 %5, i32 %6) {
%8 = icmp eq i32 %5, 2
br i1 %8, label %11, label %9
9: ; preds = %7
switch i32 %6, label %46 [
i32 1, label %43
i32 2, label %10
]
10: ; preds = %9
br label %43
11: ; preds = %7
%12 = icmp eq i32 %1, 0
br i1 %12, label %46, label %13
13: ; preds = %11
%14 = icmp eq i32 %6, 1
br i1 %14, label %17, label %15
15: ; preds = %13
%16 = icmp eq i32 %6, 2
br i1 %16, label %17, label %23
17: ; preds = %15, %13
%18 = phi i8* [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %13 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), %15 ]
%19 = xor i1 %14, true
%20 = getelementptr inbounds double, double* %4, i64 1
%21 = load double, double* %20
%22 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* %18, i8* %2, double %21)
br label %23
23: ; preds = %17, %15
%24 = phi i1 [ false, %15 ], [ %19, %17 ]
%25 = icmp slt i32 %1, 2
br i1 %25, label %46, label %26
26: ; preds = %23
%27 = add nuw i32 %1, 1
%28 = zext i32 %27 to i64
br label %29
29: ; preds = %26, %40
%30 = phi i64 [ 2, %26 ], [ %41, %40 ]
br i1 %14, label %31, label %35
31: ; preds = %29
%32 = getelementptr inbounds double, double* %4, i64 %30
%33 = load double, double* %32
%34 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), double %33)
br label %35
35: ; preds = %31, %29
br i1 %24, label %36, label %40
36: ; preds = %35
%37 = getelementptr inbounds double, double* %4, i64 %30
%38 = load double, double* %37
%39 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0), double %38)
br label %40
40: ; preds = %35, %36
%41 = add nuw nsw i64 %30, 1
%42 = icmp eq i64 %41, %28
br i1 %42, label %46, label %29
43: ; preds = %9, %10
%44 = phi i8* [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), %10 ], [ getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), %9 ]
%45 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* %44, i8* %2, double %3)
br label %46
46: ; preds = %40, %43, %23, %11, %9
ret void
}