#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*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, double);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printSBAMotionData(int /*<<< orphan*/ *, double *, int, int,
                                      void (*)(double *, int, double *, int),
                                      int);
void printSBAData(FILE *fp, double *motstruct, int cnp, int pnp, int mnp,
                  void (*outfilter)(double *pin, int nin, double *pout,
                                    int nout),
                  int outcnp, int ncams, int n3Dpts, double *imgpts,
                  int n2Dprojs, char *vmask) {
  register int i, j, k, l;
  int nframes;
  printSBAMotionData(fp, motstruct, ncams, cnp, outfilter, outcnp);
  motstruct += ncams * cnp;
  fputs("\n\nStructure parameters and image projections:\n", fp);
  for (i = k = 0; i < n3Dpts; ++i) {
    for (j = 0; j < pnp; ++j)
      fprintf(fp, "%.10e ", motstruct[i * pnp + j]);
    for (j = nframes = 0; j < ncams; ++j)
      if (vmask[i * ncams + j])
        ++nframes;
    fprintf(fp, "%d", nframes);
    for (j = 0; j < ncams; ++j)
      if (vmask[i * ncams + j]) {
        fprintf(fp, " %d", j);
        for (l = 0; l < mnp; ++l, ++k)
          fprintf(fp, " %.6e", imgpts[k]);
      }
    fputc('\n', fp);
  }
  fflush(fp);
}


x86 assembly (clang, -O0):
<printSBAData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    0x38(%rbp),%rax
mov    0x30(%rbp),%eax
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    0x18(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x28(%rbp),%r8
mov    0x10(%rbp),%r9d
call   1050 <printSBAMotionData@plt>
mov    0x18(%rbp),%ecx
imul   -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
movslq %ecx,%rcx
shl    $0x3,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xe3f(%rip),%rdi
call   1030 <fputs@plt>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    0x20(%rbp),%eax
jge    134b <printSBAData+0x1fb>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1227 <printSBAData+0xd7>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   -0x18(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xe1b(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    11e7 <printSBAData+0x97>
movl   $0x0,-0x3c(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    1278 <printSBAData+0x128>
mov    0x38(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   0x18(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1265 <printSBAData+0x115>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    126a <printSBAData+0x11a>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1235 <printSBAData+0xe5>
mov    -0x8(%rbp),%rdi
cvtsi2sdl -0x3c(%rbp),%xmm0
lea    0xdaf(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x30(%rbp),%eax
cmp    0x18(%rbp),%eax
jge    132f <printSBAData+0x1df>
mov    0x38(%rbp),%rax
mov    -0x2c(%rbp),%ecx
imul   0x18(%rbp),%ecx
add    -0x30(%rbp),%ecx
movslq %ecx,%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     131c <printSBAData+0x1cc>
mov    -0x8(%rbp),%rdi
cvtsi2sdl -0x30(%rbp),%xmm0
lea    0xd6b(%rip),%rsi
call   1060 <fprintf@plt>
movl   $0x0,-0x38(%rbp)
mov    -0x38(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1317 <printSBAData+0x1c7>
mov    -0x8(%rbp),%rdi
mov    0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xd3f(%rip),%rsi
call   1060 <fprintf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    12d7 <printSBAData+0x187>
jmp    131c <printSBAData+0x1cc>
jmp    1321 <printSBAData+0x1d1>
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
jmp    1294 <printSBAData+0x144>
mov    -0x8(%rbp),%rsi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11d4 <printSBAData+0x84>
mov    -0x8(%rbp),%rdi
call   1070 <fflush@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printSBAData>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x98,%rsp
mov    %r9,%rax
mov    %r8d,0x18(%rsp)
mov    %ecx,0x14(%rsp)
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%rbp
mov    0xf8(%rsp),%rcx
mov    %rcx,0x8(%rsp)
mov    0xe8(%rsp),%rcx
mov    %rcx,0x80(%rsp)
mov    0xe0(%rsp),%r15d
mov    0xd8(%rsp),%r13d
mov    0xd0(%rsp),%r9d
mov    %r13d,%edx
mov    %ebx,%ecx
mov    %rax,%r8
call   1040 <printSBAMotionData@plt>
lea    0xe52(%rip),%rdi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   1070 <fwrite@plt>
test   %r15d,%r15d
jle    1571 <printSBAData+0x421>
imul   %r13d,%ebx
movslq %ebx,%rax
lea    (%r14,%rax,8),%rax
movslq 0x14(%rsp),%rcx
movslq %r13d,%rdx
mov    %rdx,0x38(%rsp)
mov    %r15d,%edx
mov    %rdx,0x70(%rsp)
mov    %rax,%r15
mov    %ecx,%eax
mov    %rax,0x90(%rsp)
mov    %r13d,%eax
mov    %rax,(%rsp)
and    $0xfffffff8,%eax
mov    %rax,0x68(%rsp)
add    $0xfffffffffffffff8,%rax
mov    %rax,0x60(%rsp)
mov    %rax,%rdx
shr    $0x3,%rdx
add    $0x1,%rdx
mov    %rdx,%rax
mov    %rdx,0x58(%rsp)
and    $0xfffffffffffffffe,%rdx
mov    %rdx,0x50(%rsp)
shl    $0x3,%rcx
mov    %rcx,0x78(%rsp)
mov    0x8(%rsp),%rax
lea    0xc(%rax),%rcx
mov    0x18(%rsp),%r12d
xor    %edx,%edx
mov    %rdx,0x28(%rsp)
lea    0xdeb(%rip),%r14
mov    %rax,%rsi
movl   $0x0,0x1c(%rsp)
mov    %r13d,0x34(%rsp)
jmp    12db <printSBAData+0x18b>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
pxor   %xmm0,%xmm0
mov    %rbp,%rdi
lea    0xdb9(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0xa,%edi
mov    %rbp,%rsi
call   1030 <fputc@plt>
mov    0x28(%rsp),%rdx
add    $0x1,%rdx
add    0x78(%rsp),%r15
mov    0x38(%rsp),%rax
mov    0x40(%rsp),%rcx
add    %rax,%rcx
mov    0x20(%rsp),%rsi
add    %rax,%rsi
mov    %rdx,%rax
mov    %rdx,0x28(%rsp)
cmp    0x70(%rsp),%rdx
mov    0x34(%rsp),%r13d
je     1571 <printSBAData+0x421>
mov    %rsi,0x20(%rsp)
mov    %rcx,0x40(%rsp)
cmpl   $0x0,0x14(%rsp)
jle    1313 <printSBAData+0x1c3>
xor    %ebx,%ebx
xchg   %ax,%ax
movq   (%r15,%rbx,8),%xmm0
mov    %rbp,%rdi
lea    0xd3f(%rip),%rsi
call   1050 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,0x90(%rsp)
jne    12f0 <printSBAData+0x1a0>
test   %r13d,%r13d
jle    1280 <printSBAData+0x130>
mov    0x28(%rsp),%rax
imul   0x38(%rsp),%rax
mov    %rax,0x48(%rsp)
cmp    $0x8,%r13d
jae    1350 <printSBAData+0x200>
xor    %ecx,%ecx
xor    %eax,%eax
mov    0x8(%rsp),%rbx
mov    (%rsp),%rdx
mov    0x20(%rsp),%rdi
jmp    1490 <printSBAData+0x340>
nopl   0x0(%rax)
cmpq   $0x0,0x60(%rsp)
pxor   %xmm4,%xmm4
pcmpeqd %xmm5,%xmm5
movdqa 0xc9a(%rip),%xmm6
pxor   %xmm0,%xmm0
je     154d <printSBAData+0x3fd>
mov    0x50(%rsp),%rcx
xor    %eax,%eax
pxor   %xmm1,%xmm1
mov    0x8(%rsp),%rbx
mov    (%rsp),%rdx
mov    0x40(%rsp),%rsi
mov    0x20(%rsp),%rdi
xchg   %ax,%ax
movd   -0xc(%rsi,%rax,1),%xmm3
movd   -0x8(%rsi,%rax,1),%xmm2
pcmpeqb %xmm4,%xmm3
pxor   %xmm5,%xmm3
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
pand   %xmm6,%xmm3
paddd  %xmm0,%xmm3
pcmpeqb %xmm4,%xmm2
pxor   %xmm5,%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
pand   %xmm6,%xmm2
paddd  %xmm1,%xmm2
movd   -0x4(%rsi,%rax,1),%xmm0
movd   (%rsi,%rax,1),%xmm1
pcmpeqb %xmm4,%xmm0
pxor   %xmm5,%xmm0
punpcklbw %xmm0,%xmm0
punpcklwd %xmm0,%xmm0
pand   %xmm6,%xmm0
paddd  %xmm3,%xmm0
pcmpeqb %xmm4,%xmm1
pxor   %xmm5,%xmm1
punpcklbw %xmm1,%xmm1
punpcklwd %xmm1,%xmm1
pand   %xmm6,%xmm1
paddd  %xmm2,%xmm1
add    $0x10,%rax
add    $0xfffffffffffffffe,%rcx
jne    1390 <printSBAData+0x240>
testb  $0x1,0x58(%rsp)
je     145c <printSBAData+0x30c>
add    0x48(%rsp),%rax
movd   (%rbx,%rax,1),%xmm2
movd   0x4(%rbx,%rax,1),%xmm3
pcmpeqb %xmm4,%xmm2
pxor   %xmm5,%xmm2
punpcklbw %xmm2,%xmm2
punpcklwd %xmm2,%xmm2
pand   %xmm6,%xmm2
paddd  %xmm2,%xmm0
pcmpeqb %xmm4,%xmm3
pxor   %xmm5,%xmm3
punpcklbw %xmm3,%xmm3
punpcklwd %xmm3,%xmm3
pand   %xmm6,%xmm3
paddd  %xmm3,%xmm1
paddd  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddd  %xmm0,%xmm1
pshufd $0x55,%xmm1,%xmm0
paddd  %xmm1,%xmm0
movd   %xmm0,%eax
mov    0x68(%rsp),%rsi
mov    %rsi,%rcx
cmp    %rdx,%rsi
je     14a0 <printSBAData+0x350>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmpb   $0x1,(%rdi,%rcx,1)
sbb    $0xffffffff,%eax
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1490 <printSBAData+0x340>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %rbp,%rdi
lea    0xb96(%rip),%rsi
call   1050 <fprintf@plt>
test   %r13d,%r13d
jle    1293 <printSBAData+0x143>
xor    %r13d,%r13d
mov    (%rsp),%rcx
mov    %r15,0x88(%rsp)
jmp    14e1 <printSBAData+0x391>
mov    (%rsp),%rcx
add    $0x1,%r13
cmp    %rcx,%r13
je     1293 <printSBAData+0x143>
mov    0x48(%rsp),%rax
add    %r13,%rax
cmpb   $0x0,(%rbx,%rax,1)
je     14d4 <printSBAData+0x384>
xorps  %xmm0,%xmm0
cvtsi2sd %r13d,%xmm0
mov    %rbp,%rdi
lea    0xb45(%rip),%rsi
call   1050 <fprintf@plt>
cmpl   $0x0,0x18(%rsp)
jle    14d0 <printSBAData+0x380>
movslq 0x1c(%rsp),%rax
mov    0x80(%rsp),%rcx
lea    (%rcx,%rax,8),%r15
xor    %ebx,%ebx
movsd  (%r15,%rbx,8),%xmm0
mov    %rbp,%rdi
mov    %r14,%rsi
call   1050 <fprintf@plt>
add    $0x1,%rbx
cmp    %ebx,%r12d
jne    1520 <printSBAData+0x3d0>
add    %ebx,0x1c(%rsp)
mov    0x8(%rsp),%rbx
mov    0x88(%rsp),%r15
jmp    14d0 <printSBAData+0x380>
xor    %eax,%eax
pxor   %xmm1,%xmm1
mov    0x8(%rsp),%rbx
mov    (%rsp),%rdx
mov    0x20(%rsp),%rdi
testb  $0x1,0x58(%rsp)
jne    141c <printSBAData+0x2cc>
jmp    145c <printSBAData+0x30c>
mov    %rbp,%rdi
add    $0x98,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <fflush@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"\0A\0AStructure parameters and image projections:\0A\00"
@.str.1 = [7 x i8] c"%.10e \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c" %d\00"
@.str.4 = [6 x i8] c" %.6e\00"
define void @printSBAData(i32* %0, double* %1, i32 %2, i32 %3, i32 %4, void (double*, i32, double*, i32)* %5, i32 %6, i32 %7, i32 %8, double* %9, i32 %10, i8* %11) {
%13 = alloca i32*
%14 = alloca double*
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca void (double*, i32, double*, i32)*
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca double*
%23 = alloca i32
%24 = alloca i8*
%25 = alloca i32
%26 = alloca i32
%27 = alloca i32
%28 = alloca i32
%29 = alloca i32
store i32* %0, i32** %13
store double* %1, double** %14
store i32 %2, i32* %15
store i32 %3, i32* %16
store i32 %4, i32* %17
store void (double*, i32, double*, i32)* %5, void (double*, i32, double*, i32)** %18
store i32 %6, i32* %19
store i32 %7, i32* %20
store i32 %8, i32* %21
store double* %9, double** %22
store i32 %10, i32* %23
store i8* %11, i8** %24
%30 = load i32*, i32** %13
%31 = load double*, double** %14
%32 = load i32, i32* %20
%33 = load i32, i32* %15
%34 = load void (double*, i32, double*, i32)*, void (double*, i32, double*, i32)** %18
%35 = load i32, i32* %19
%36 = call i32 @printSBAMotionData(i32* %30, double* %31, i32 %32, i32 %33, void (double*, i32, double*, i32)* %34, i32 %35)
%37 = load i32, i32* %20
%38 = load i32, i32* %15
%39 = mul nsw i32 %37, %38
%40 = load double*, double** %14
%41 = sext i32 %39 to i64
%42 = getelementptr inbounds double, double* %40, i64 %41
store double* %42, double** %14
%43 = load i32*, i32** %13
%44 = call i32 @fputs(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32* %43)
store i32 0, i32* %27
store i32 0, i32* %25
br label %45
45: ; preds = %142, %12
%46 = load i32, i32* %25
%47 = load i32, i32* %21
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %145
49: ; preds = %45
store i32 0, i32* %26
br label %50
50: ; preds = %66, %49
%51 = load i32, i32* %26
%52 = load i32, i32* %16
%53 = icmp slt i32 %51, %52
br i1 %53, label %54, label %69
54: ; preds = %50
%55 = load i32*, i32** %13
%56 = load double*, double** %14
%57 = load i32, i32* %25
%58 = load i32, i32* %16
%59 = mul nsw i32 %57, %58
%60 = load i32, i32* %26
%61 = add nsw i32 %59, %60
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds double, double* %56, i64 %62
%64 = load double, double* %63
%65 = call i32 @fprintf(i32* %55, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %64)
br label %66
66: ; preds = %54
%67 = load i32, i32* %26
%68 = add nsw i32 %67, 1
store i32 %68, i32* %26
br label %50
69: ; preds = %50
store i32 0, i32* %29
store i32 0, i32* %26
br label %70
70: ; preds = %89, %69
%71 = load i32, i32* %26
%72 = load i32, i32* %20
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %92
74: ; preds = %70
%75 = load i8*, i8** %24
%76 = load i32, i32* %25
%77 = load i32, i32* %20
%78 = mul nsw i32 %76, %77
%79 = load i32, i32* %26
%80 = add nsw i32 %78, %79
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds i8, i8* %75, i64 %81
%83 = load i8, i8* %82
%84 = icmp ne i8 %83, 0
br i1 %84, label %85, label %88
85: ; preds = %74
%86 = load i32, i32* %29
%87 = add nsw i32 %86, 1
store i32 %87, i32* %29
br label %88
88: ; preds = %85, %74
br label %89
89: ; preds = %88
%90 = load i32, i32* %26
%91 = add nsw i32 %90, 1
store i32 %91, i32* %26
br label %70
92: ; preds = %70
%93 = load i32*, i32** %13
%94 = load i32, i32* %29
%95 = sitofp i32 %94 to double
%96 = call i32 @fprintf(i32* %93, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), double %95)
store i32 0, i32* %26
br label %97
97: ; preds = %136, %92
%98 = load i32, i32* %26
%99 = load i32, i32* %20
%100 = icmp slt i32 %98, %99
br i1 %100, label %101, label %139
101: ; preds = %97
%102 = load i8*, i8** %24
%103 = load i32, i32* %25
%104 = load i32, i32* %20
%105 = mul nsw i32 %103, %104
%106 = load i32, i32* %26
%107 = add nsw i32 %105, %106
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i8, i8* %102, i64 %108
%110 = load i8, i8* %109
%111 = icmp ne i8 %110, 0
br i1 %111, label %112, label %135
112: ; preds = %101
%113 = load i32*, i32** %13
%114 = load i32, i32* %26
%115 = sitofp i32 %114 to double
%116 = call i32 @fprintf(i32* %113, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %115)
store i32 0, i32* %28
br label %117
117: ; preds = %129, %112
%118 = load i32, i32* %28
%119 = load i32, i32* %17
%120 = icmp slt i32 %118, %119
br i1 %120, label %121, label %134
121: ; preds = %117
%122 = load i32*, i32** %13
%123 = load double*, double** %22
%124 = load i32, i32* %27
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds double, double* %123, i64 %125
%127 = load double, double* %126
%128 = call i32 @fprintf(i32* %122, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %127)
br label %129
129: ; preds = %121
%130 = load i32, i32* %28
%131 = add nsw i32 %130, 1
store i32 %131, i32* %28
%132 = load i32, i32* %27
%133 = add nsw i32 %132, 1
store i32 %133, i32* %27
br label %117
134: ; preds = %117
br label %135
135: ; preds = %134, %101
br label %136
136: ; preds = %135
%137 = load i32, i32* %26
%138 = add nsw i32 %137, 1
store i32 %138, i32* %26
br label %97
139: ; preds = %97
%140 = load i32*, i32** %13
%141 = call i32 @fputc(i8 signext 10, i32* %140)
br label %142
142: ; preds = %139
%143 = load i32, i32* %25
%144 = add nsw i32 %143, 1
store i32 %144, i32* %25
br label %45
145: ; preds = %45
%146 = load i32*, i32** %13
%147 = call i32 @fflush(i32* %146)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"\0A\0AStructure parameters and image projections:\0A\00"
@.str.1 = [7 x i8] c"%.10e \00"
@.str.2 = [3 x i8] c"%d\00"
@.str.3 = [4 x i8] c" %d\00"
@.str.4 = [6 x i8] c" %.6e\00"
define void @printSBAData(i32* %0, double* %1, i32 %2, i32 %3, i32 %4, void (double*, i32, double*, i32)* %5, i32 %6, i32 %7, i32 %8, double* nocapture %9, i32 %10, i8* nocapture %11) {
%13 = tail call i32 @printSBAMotionData(i32* %0, double* %1, i32 %7, i32 %2, void (double*, i32, double*, i32)* %5, i32 %6)
%14 = mul nsw i32 %7, %2
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds double, double* %1, i64 %15
%17 = tail call i64 @fwrite(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i64 46, i64 1, i32* %0)
%18 = icmp sgt i32 %8, 0
br i1 %18, label %19, label %172
19: ; preds = %12
%20 = icmp sgt i32 %3, 0
%21 = icmp sgt i32 %7, 0
%22 = icmp sgt i32 %4, 0
%23 = sext i32 %3 to i64
%24 = sext i32 %7 to i64
%25 = zext i32 %8 to i64
%26 = zext i32 %3 to i64
%27 = zext i32 %7 to i64
%28 = zext i32 %7 to i64
%29 = and i64 %27, 4294967288
%30 = add nsw i64 %29, -8
%31 = lshr exact i64 %30, 3
%32 = add nuw nsw i64 %31, 1
%33 = icmp ult i32 %7, 8
%34 = and i64 %27, 4294967288
%35 = and i64 %32, 1
%36 = icmp eq i64 %30, 0
%37 = and i64 %32, 4611686018427387902
%38 = icmp eq i64 %35, 0
%39 = icmp eq i64 %34, %27
br label %40
40: ; preds = %19, %167
%41 = phi i64 [ 0, %19 ], [ %170, %167 ]
%42 = phi i32 [ 0, %19 ], [ %168, %167 ]
br i1 %20, label %43, label %45
43: ; preds = %40
%44 = mul nsw i64 %41, %23
br label %114
45: ; preds = %114, %40
br i1 %21, label %48, label %46
46: ; preds = %45
%47 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), double 0.000000e+00)
br label %167
48: ; preds = %45
%49 = mul nsw i64 %41, %24
br i1 %33, label %111, label %50
50: ; preds = %48
br i1 %36, label %86, label %51
51: ; preds = %50, %51
%52 = phi i64 [ %83, %51 ], [ 0, %50 ]
%53 = phi <4 x i32> [ %81, %51 ], [ zeroinitializer, %50 ]
%54 = phi <4 x i32> [ %82, %51 ], [ zeroinitializer, %50 ]
%55 = phi i64 [ %84, %51 ], [ 0, %50 ]
%56 = add nsw i64 %52, %49
%57 = getelementptr inbounds i8, i8* %11, i64 %56
%58 = bitcast i8* %57 to <4 x i8>*
%59 = load <4 x i8>, <4 x i8>* %58
%60 = getelementptr inbounds i8, i8* %57, i64 4
%61 = bitcast i8* %60 to <4 x i8>*
%62 = load <4 x i8>, <4 x i8>* %61
%63 = icmp ne <4 x i8> %59, zeroinitializer
%64 = icmp ne <4 x i8> %62, zeroinitializer
%65 = zext <4 x i1> %63 to <4 x i32>
%66 = zext <4 x i1> %64 to <4 x i32>
%67 = add <4 x i32> %53, %65
%68 = add <4 x i32> %54, %66
%69 = or i64 %52, 8
%70 = add nsw i64 %69, %49
%71 = getelementptr inbounds i8, i8* %11, i64 %70
%72 = bitcast i8* %71 to <4 x i8>*
%73 = load <4 x i8>, <4 x i8>* %72
%74 = getelementptr inbounds i8, i8* %71, i64 4
%75 = bitcast i8* %74 to <4 x i8>*
%76 = load <4 x i8>, <4 x i8>* %75
%77 = icmp ne <4 x i8> %73, zeroinitializer
%78 = icmp ne <4 x i8> %76, zeroinitializer
%79 = zext <4 x i1> %77 to <4 x i32>
%80 = zext <4 x i1> %78 to <4 x i32>
%81 = add <4 x i32> %67, %79
%82 = add <4 x i32> %68, %80
%83 = add nuw i64 %52, 16
%84 = add i64 %55, 2
%85 = icmp eq i64 %84, %37
br i1 %85, label %86, label %51
86: ; preds = %51, %50
%87 = phi <4 x i32> [ undef, %50 ], [ %81, %51 ]
%88 = phi <4 x i32> [ undef, %50 ], [ %82, %51 ]
%89 = phi i64 [ 0, %50 ], [ %83, %51 ]
%90 = phi <4 x i32> [ zeroinitializer, %50 ], [ %81, %51 ]
%91 = phi <4 x i32> [ zeroinitializer, %50 ], [ %82, %51 ]
br i1 %38, label %106, label %92
92: ; preds = %86
%93 = add nsw i64 %89, %49
%94 = getelementptr inbounds i8, i8* %11, i64 %93
%95 = bitcast i8* %94 to <4 x i8>*
%96 = load <4 x i8>, <4 x i8>* %95
%97 = getelementptr inbounds i8, i8* %94, i64 4
%98 = bitcast i8* %97 to <4 x i8>*
%99 = load <4 x i8>, <4 x i8>* %98
%100 = icmp ne <4 x i8> %96, zeroinitializer
%101 = icmp ne <4 x i8> %99, zeroinitializer
%102 = zext <4 x i1> %100 to <4 x i32>
%103 = zext <4 x i1> %101 to <4 x i32>
%104 = add <4 x i32> %90, %102
%105 = add <4 x i32> %91, %103
br label %106
106: ; preds = %86, %92
%107 = phi <4 x i32> [ %87, %86 ], [ %104, %92 ]
%108 = phi <4 x i32> [ %88, %86 ], [ %105, %92 ]
%109 = add <4 x i32> %108, %107
%110 = call i32 @llvm.vector.reduce.add.v4i32(<4 x i32> %109)
br i1 %39, label %133, label %111
111: ; preds = %48, %106
%112 = phi i64 [ 0, %48 ], [ %34, %106 ]
%113 = phi i32 [ 0, %48 ], [ %110, %106 ]
br label %122
114: ; preds = %43, %114
%115 = phi i64 [ 0, %43 ], [ %120, %114 ]
%116 = add nsw i64 %115, %44
%117 = getelementptr inbounds double, double* %16, i64 %116
%118 = load double, double* %117
%119 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), double %118)
%120 = add nuw nsw i64 %115, 1
%121 = icmp eq i64 %120, %26
br i1 %121, label %45, label %114
122: ; preds = %111, %122
%123 = phi i64 [ %131, %122 ], [ %112, %111 ]
%124 = phi i32 [ %130, %122 ], [ %113, %111 ]
%125 = add nsw i64 %123, %49
%126 = getelementptr inbounds i8, i8* %11, i64 %125
%127 = load i8, i8* %126
%128 = icmp ne i8 %127, 0
%129 = zext i1 %128 to i32
%130 = add nuw nsw i32 %124, %129
%131 = add nuw nsw i64 %123, 1
%132 = icmp eq i64 %131, %27
br i1 %132, label %133, label %122
133: ; preds = %122, %106
%134 = phi i32 [ %110, %106 ], [ %130, %122 ]
%135 = sitofp i32 %134 to double
%136 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), double %135)
br i1 %21, label %137, label %167
137: ; preds = %133
%138 = mul nsw i64 %41, %24
br label %139
139: ; preds = %137, %163
%140 = phi i64 [ 0, %137 ], [ %165, %163 ]
%141 = phi i32 [ %42, %137 ], [ %164, %163 ]
%142 = add nsw i64 %140, %138
%143 = getelementptr inbounds i8, i8* %11, i64 %142
%144 = load i8, i8* %143
%145 = icmp eq i8 %144, 0
br i1 %145, label %163, label %146
146: ; preds = %139
%147 = trunc i64 %140 to i32
%148 = sitofp i32 %147 to double
%149 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), double %148)
br i1 %22, label %150, label %163
150: ; preds = %146
%151 = sext i32 %141 to i64
br label %152
152: ; preds = %150, %152
%153 = phi i64 [ %151, %150 ], [ %159, %152 ]
%154 = phi i32 [ 0, %150 ], [ %158, %152 ]
%155 = getelementptr inbounds double, double* %9, i64 %153
%156 = load double, double* %155
%157 = tail call i32 @fprintf(i32* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0), double %156)
%158 = add nuw nsw i32 %154, 1
%159 = add nsw i64 %153, 1
%160 = icmp eq i32 %158, %4
br i1 %160, label %161, label %152
161: ; preds = %152
%162 = trunc i64 %159 to i32
br label %163
163: ; preds = %161, %146, %139
%164 = phi i32 [ %141, %139 ], [ %141, %146 ], [ %162, %161 ]
%165 = add nuw nsw i64 %140, 1
%166 = icmp eq i64 %165, %28
br i1 %166, label %167, label %139
167: ; preds = %163, %46, %133
%168 = phi i32 [ %42, %133 ], [ %42, %46 ], [ %164, %163 ]
%169 = tail call i32 @fputc(i8 signext 10, i32* %0)
%170 = add nuw nsw i64 %41, 1
%171 = icmp eq i64 %170, %25
br i1 %171, label %172, label %40
172: ; preds = %167, %12
%173 = tail call i32 @fflush(i32* %0)
ret void
}