#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 */
scalar_t__ EOF;
int /*<<< orphan*/ error(char *);
scalar_t__ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ *stdout;
scalar_t__ strcmp(char *, char *);
void write_eps(double *segs, int n, int dim, char *filename, int xsize,
               int ysize, double width) {
  FILE *eps;
  int i;
  if (segs == NULL || n < 0 || dim <= 0)
    error("Error: invalid line segment list in write_eps.");
  if (xsize <= 0 || ysize <= 0)
    error("Error: invalid image size in write_eps.");
  if (strcmp(filename, "-") == 0)
    eps = stdout;
  else
    eps = fopen(filename, "w");
  if (eps == NULL)
    error("Error: unable to open EPS output file.");
  fprintf(eps, "%%!PS-Adobe-3.0 EPSF-3.0\n");
  fprintf(eps, "%%%%BoundingBox: 0 0 %d %d\n", xsize, ysize);
  fprintf(eps, "%%%%Creator: LSD, Line Segment Detector\n");
  fprintf(eps, "%%%%Title: (%s)\n", filename);
  fprintf(eps, "%%%%EndComments\n");
  for (i = 0; i < n; i++) {
    fprintf(eps, "newpath %f %f moveto %f %f lineto %f setlinewidth stroke\n",
            segs[i * dim + 0], (double)ysize - segs[i * dim + 1],
            segs[i * dim + 2], (double)ysize - segs[i * dim + 3],
            width <= 0.0 ? segs[i * dim + 4] : width);
  }
  fprintf(eps, "showpage\n");
  fprintf(eps, "%%%%EOF\n");
  if (eps != stdout && fclose(eps) == EOF)
    error("Error: unable to close file while writing EPS file.");
}


x86 assembly (clang, -O0):
<write_eps>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movsd  %xmm0,-0x28(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1192 <write_eps+0x42>
cmpl   $0x0,-0xc(%rbp)
jl     1192 <write_eps+0x42>
cmpl   $0x0,-0x10(%rbp)
jg     119e <write_eps+0x4e>
lea    0xe67(%rip),%rdi
call   1060 <error@plt>
cmpl   $0x0,-0x1c(%rbp)
jle    11b2 <write_eps+0x62>
cmpl   $0x0,-0x20(%rbp)
jg     11be <write_eps+0x6e>
lea    0xe76(%rip),%rdi
call   1060 <error@plt>
mov    -0x18(%rbp),%rdi
lea    0xe8e(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
jne    11eb <write_eps+0x9b>
mov    0x2df9(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
jmp    11ff <write_eps+0xaf>
mov    -0x18(%rbp),%rdi
lea    0xe63(%rip),%rsi
call   1070 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1216 <write_eps+0xc6>
lea    0xe4a(%rip),%rdi
call   1060 <error@plt>
mov    -0x30(%rbp),%rdi
lea    0xe61(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%ecx
lea    0xe63(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xe6d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x18(%rbp),%rdx
lea    0xe80(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xe7f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    137c <write_eps+0x22c>
mov    -0x30(%rbp),%rax
mov    %rax,-0x60(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    $0x0,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x58(%rbp)
cvtsi2sdl -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x50(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    $0x2,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x48(%rbp)
cvtsi2sdl -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    $0x3,%ecx
movslq %ecx,%rcx
subsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x40(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x28(%rbp),%xmm0
jb     1339 <write_eps+0x1e9>
mov    -0x8(%rbp),%rax
mov    -0x34(%rbp),%ecx
imul   -0x10(%rbp),%ecx
add    $0x4,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x68(%rbp)
jmp    1343 <write_eps+0x1f3>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm3
movsd  -0x48(%rbp),%xmm2
movsd  -0x50(%rbp),%xmm1
movsd  -0x58(%rbp),%xmm0
mov    -0x60(%rbp),%rdi
movsd  -0x68(%rbp),%xmm4
lea    0xd9c(%rip),%rsi
mov    $0x5,%al
call   1050 <fprintf@plt>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    1281 <write_eps+0x131>
mov    -0x30(%rbp),%rdi
lea    0xdb6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rdi
lea    0xdae(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rax
mov    0x2c2d(%rip),%rcx
cmp    (%rcx),%rax
je     13d9 <write_eps+0x289>
mov    -0x30(%rbp),%rdi
call   1030 <fclose@plt>
mov    0x2c24(%rip),%rcx
cmp    (%rcx),%rax
jne    13d9 <write_eps+0x289>
lea    0xd7c(%rip),%rdi
call   1060 <error@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_eps>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
mov    %r9d,0x8(%rsp)
mov    %r8d,%r12d
mov    %rcx,%r15
mov    %edx,%ebp
mov    %esi,%r13d
mov    %rdi,%rbx
test   %rdi,%rdi
je     1195 <write_eps+0x35>
test   %r13d,%r13d
js     1195 <write_eps+0x35>
test   %ebp,%ebp
jg     11a1 <write_eps+0x41>
lea    0xe6c(%rip),%rdi
call   1060 <error@plt>
test   %r12d,%r12d
jle    11ad <write_eps+0x4d>
cmpl   $0x0,0x8(%rsp)
jg     11b9 <write_eps+0x59>
lea    0xe83(%rip),%rdi
call   1060 <error@plt>
lea    0xe9f(%rip),%rsi
mov    %r15,%rdi
call   1040 <strcmp@plt>
test   %rax,%rax
je     133d <write_eps+0x1dd>
lea    0xe89(%rip),%rsi
mov    %r15,%rdi
call   1070 <fopen@plt>
mov    %rax,%r14
test   %r14,%r14
jne    11f4 <write_eps+0x94>
lea    0xe74(%rip),%rdi
call   1060 <error@plt>
lea    0xe8f(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe98(%rip),%rsi
mov    %r14,%rdi
mov    %r12d,%edx
mov    0x8(%rsp),%r12d
mov    %r12d,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xe98(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xeb0(%rip),%rsi
mov    %r14,%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0xead(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
test   %r13d,%r13d
jle    12ca <write_eps+0x16a>
cvtsi2sd %r12d,%xmm0
movsd  %xmm0,0x8(%rsp)
movslq %ebp,%r12
mov    %r13d,%ebp
add    $0x20,%rbx
shl    $0x3,%r12
lea    0xe8f(%rip),%r15
jmp    12b4 <write_eps+0x154>
xchg   %ax,%ax
movsd  -0x20(%rbx),%xmm0
movsd  -0x10(%rbx),%xmm2
movsd  0x8(%rsp),%xmm3
movapd %xmm3,%xmm1
subsd  -0x18(%rbx),%xmm1
subsd  -0x8(%rbx),%xmm3
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x5,%al
call   1050 <fprintf@plt>
add    %r12,%rbx
add    $0xffffffffffffffff,%rbp
je     12ca <write_eps+0x16a>
movsd  0x10(%rsp),%xmm4
xorpd  %xmm0,%xmm0
ucomisd %xmm4,%xmm0
jb     1280 <write_eps+0x120>
movsd  (%rbx),%xmm4
jmp    1280 <write_eps+0x120>
lea    0xe74(%rip),%rdi
mov    $0x9,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1080 <fwrite@plt>
lea    0xe65(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x2cdd(%rip),%rax
cmp    (%rax),%r14
je     132e <write_eps+0x1ce>
mov    %r14,%rdi
call   1030 <fclose@plt>
mov    0x2cd9(%rip),%rcx
cmp    (%rcx),%rax
jne    132e <write_eps+0x1ce>
lea    0xe3d(%rip),%rdi
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <error@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c94(%rip),%rax
mov    (%rax),%r14
test   %r14,%r14
jne    11f4 <write_eps+0x94>
jmp    11e8 <write_eps+0x88>

LLVM IR (-O0):
@.str = [47 x i8] c"Error: invalid line segment list in write_eps.\00"
@.str.1 = [40 x i8] c"Error: invalid image size in write_eps.\00"
@.str.2 = [2 x i8] c"-\00"
@stdout = global i32* null
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [39 x i8] c"Error: unable to open EPS output file.\00"
@.str.5 = [26 x i8] c"%%!PS-Adobe-3.0 EPSF-3.0\0A\00"
@.str.6 = [28 x i8] c"%%%%BoundingBox: 0 0 %d %d\0A\00"
@.str.7 = [41 x i8] c"%%%%Creator: LSD, Line Segment Detector\0A\00"
@.str.8 = [17 x i8] c"%%%%Title: (%s)\0A\00"
@.str.9 = [17 x i8] c"%%%%EndComments\0A\00"
@.str.10 = [58 x i8] c"newpath %f %f moveto %f %f lineto %f setlinewidth stroke\0A\00"
@.str.11 = [10 x i8] c"showpage\0A\00"
@.str.12 = [9 x i8] c"%%%%EOF\0A\00"
@EOF = global i64 0
@.str.13 = [52 x i8] c"Error: unable to close file while writing EPS file.\00"
define void @write_eps(double* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5, double %6) {
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i8*
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
%15 = alloca i32*
%16 = alloca i32
store double* %0, double** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i8* %3, i8** %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store double %6, double* %14
%17 = load double*, double** %8
%18 = icmp eq double* %17, null
br i1 %18, label %25, label %19
19: ; preds = %7
%20 = load i32, i32* %9
%21 = icmp slt i32 %20, 0
br i1 %21, label %25, label %22
22: ; preds = %19
%23 = load i32, i32* %10
%24 = icmp sle i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22, %19, %7
%26 = call i32 @error(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %27
27: ; preds = %25, %22
%28 = load i32, i32* %12
%29 = icmp sle i32 %28, 0
br i1 %29, label %33, label %30
30: ; preds = %27
%31 = load i32, i32* %13
%32 = icmp sle i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %30, %27
%34 = call i32 @error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %35
35: ; preds = %33, %30
%36 = load i8*, i8** %11
%37 = call i64 @strcmp(i8* %36, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %35
%40 = load i32*, i32** @stdout
store i32* %40, i32** %15
br label %44
41: ; preds = %35
%42 = load i8*, i8** %11
%43 = call i32* @fopen(i8* %42, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %43, i32** %15
br label %44
44: ; preds = %41, %39
%45 = load i32*, i32** %15
%46 = icmp eq i32* %45, null
br i1 %46, label %47, label %49
47: ; preds = %44
%48 = call i32 @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
br label %49
49: ; preds = %47, %44
%50 = load i32*, i32** %15
%51 = call i32 (i32*, i8*, ...) @fprintf(i32* %50, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%52 = load i32*, i32** %15
%53 = load i32, i32* %12
%54 = load i32, i32* %13
%55 = call i32 (i32*, i8*, ...) @fprintf(i32* %52, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %53, i32 %54)
%56 = load i32*, i32** %15
%57 = call i32 (i32*, i8*, ...) @fprintf(i32* %56, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%58 = load i32*, i32** %15
%59 = load i8*, i8** %11
%60 = call i32 (i32*, i8*, ...) @fprintf(i32* %58, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %59)
%61 = load i32*, i32** %15
%62 = call i32 (i32*, i8*, ...) @fprintf(i32* %61, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %16
br label %63
63: ; preds = %123, %49
%64 = load i32, i32* %16
%65 = load i32, i32* %9
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %126
67: ; preds = %63
%68 = load i32*, i32** %15
%69 = load double*, double** %8
%70 = load i32, i32* %16
%71 = load i32, i32* %10
%72 = mul nsw i32 %70, %71
%73 = add nsw i32 %72, 0
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %69, i64 %74
%76 = load double, double* %75
%77 = load i32, i32* %13
%78 = sitofp i32 %77 to double
%79 = load double*, double** %8
%80 = load i32, i32* %16
%81 = load i32, i32* %10
%82 = mul nsw i32 %80, %81
%83 = add nsw i32 %82, 1
%84 = sext i32 %83 to i64
%85 = getelementptr inbounds double, double* %79, i64 %84
%86 = load double, double* %85
%87 = fsub double %78, %86
%88 = load double*, double** %8
%89 = load i32, i32* %16
%90 = load i32, i32* %10
%91 = mul nsw i32 %89, %90
%92 = add nsw i32 %91, 2
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds double, double* %88, i64 %93
%95 = load double, double* %94
%96 = load i32, i32* %13
%97 = sitofp i32 %96 to double
%98 = load double*, double** %8
%99 = load i32, i32* %16
%100 = load i32, i32* %10
%101 = mul nsw i32 %99, %100
%102 = add nsw i32 %101, 3
%103 = sext i32 %102 to i64
%104 = getelementptr inbounds double, double* %98, i64 %103
%105 = load double, double* %104
%106 = fsub double %97, %105
%107 = load double, double* %14
%108 = fcmp ole double %107, 0.000000e+00
br i1 %108, label %109, label %118
109: ; preds = %67
%110 = load double*, double** %8
%111 = load i32, i32* %16
%112 = load i32, i32* %10
%113 = mul nsw i32 %111, %112
%114 = add nsw i32 %113, 4
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds double, double* %110, i64 %115
%117 = load double, double* %116
br label %120
118: ; preds = %67
%119 = load double, double* %14
br label %120
120: ; preds = %118, %109
%121 = phi double [ %117, %109 ], [ %119, %118 ]
%122 = call i32 (i32*, i8*, ...) @fprintf(i32* %68, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), double %76, double %87, double %95, double %106, double %121)
br label %123
123: ; preds = %120
%124 = load i32, i32* %16
%125 = add nsw i32 %124, 1
store i32 %125, i32* %16
br label %63
126: ; preds = %63
%127 = load i32*, i32** %15
%128 = call i32 (i32*, i8*, ...) @fprintf(i32* %127, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0))
%129 = load i32*, i32** %15
%130 = call i32 (i32*, i8*, ...) @fprintf(i32* %129, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%131 = load i32*, i32** %15
%132 = load i32*, i32** @stdout
%133 = icmp ne i32* %131, %132
br i1 %133, label %134, label %141
134: ; preds = %126
%135 = load i32*, i32** %15
%136 = call i64 @fclose(i32* %135)
%137 = load i64, i64* @EOF
%138 = icmp eq i64 %136, %137
br i1 %138, label %139, label %141
139: ; preds = %134
%140 = call i32 @error(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
br label %141
141: ; preds = %139, %134, %126
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"Error: invalid line segment list in write_eps.\00"
@.str.1 = [40 x i8] c"Error: invalid image size in write_eps.\00"
@.str.2 = [2 x i8] c"-\00"
@stdout = global i32* null
@.str.3 = [2 x i8] c"w\00"
@.str.4 = [39 x i8] c"Error: unable to open EPS output file.\00"
@.str.5 = [26 x i8] c"%%!PS-Adobe-3.0 EPSF-3.0\0A\00"
@.str.6 = [28 x i8] c"%%%%BoundingBox: 0 0 %d %d\0A\00"
@.str.7 = [41 x i8] c"%%%%Creator: LSD, Line Segment Detector\0A\00"
@.str.8 = [17 x i8] c"%%%%Title: (%s)\0A\00"
@.str.9 = [17 x i8] c"%%%%EndComments\0A\00"
@.str.10 = [58 x i8] c"newpath %f %f moveto %f %f lineto %f setlinewidth stroke\0A\00"
@.str.11 = [10 x i8] c"showpage\0A\00"
@.str.12 = [9 x i8] c"%%%%EOF\0A\00"
@EOF = global i64 0
@.str.13 = [52 x i8] c"Error: unable to close file while writing EPS file.\00"
define void @write_eps(double* %0, i32 %1, i32 %2, i8* %3, i32 %4, i32 %5, double %6) {
%8 = icmp eq double* %0, null
%9 = icmp slt i32 %1, 0
%10 = or i1 %8, %9
%11 = icmp slt i32 %2, 1
%12 = or i1 %10, %11
br i1 %12, label %13, label %15
13: ; preds = %7
%14 = tail call i32 @error(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %7, %13
%16 = icmp slt i32 %4, 1
%17 = icmp slt i32 %5, 1
%18 = or i1 %16, %17
br i1 %18, label %19, label %21
19: ; preds = %15
%20 = tail call i32 @error(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
br label %21
21: ; preds = %15, %19
%22 = tail call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = load i32*, i32** @stdout
br label %28
26: ; preds = %21
%27 = tail call i32* @fopen(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %28
28: ; preds = %26, %24
%29 = phi i32* [ %25, %24 ], [ %27, %26 ]
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = tail call i32 @error(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.4, i64 0, i64 0))
br label %33
33: ; preds = %31, %28
%34 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0))
%35 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.6, i64 0, i64 0), i32 %4, i32 %5)
%36 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0))
%37 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.8, i64 0, i64 0), i8* %3)
%38 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0))
%39 = icmp sgt i32 %1, 0
br i1 %39, label %40, label %70
40: ; preds = %33
%41 = sitofp i32 %5 to double
%42 = fcmp ugt double %6, 0.000000e+00
%43 = sext i32 %2 to i64
%44 = zext i32 %1 to i64
br label %45
45: ; preds = %40, %65
%46 = phi i64 [ 0, %40 ], [ %68, %65 ]
%47 = mul nsw i64 %46, %43
%48 = getelementptr inbounds double, double* %0, i64 %47
%49 = load double, double* %48
%50 = add nsw i64 %47, 1
%51 = getelementptr inbounds double, double* %0, i64 %50
%52 = load double, double* %51
%53 = fsub double %41, %52
%54 = add nsw i64 %47, 2
%55 = getelementptr inbounds double, double* %0, i64 %54
%56 = load double, double* %55
%57 = add nsw i64 %47, 3
%58 = getelementptr inbounds double, double* %0, i64 %57
%59 = load double, double* %58
%60 = fsub double %41, %59
br i1 %42, label %65, label %61
61: ; preds = %45
%62 = add nsw i64 %47, 4
%63 = getelementptr inbounds double, double* %0, i64 %62
%64 = load double, double* %63
br label %65
65: ; preds = %45, %61
%66 = phi double [ %64, %61 ], [ %6, %45 ]
%67 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.10, i64 0, i64 0), double %49, double %53, double %56, double %60, double %66)
%68 = add nuw nsw i64 %46, 1
%69 = icmp eq i64 %68, %44
br i1 %69, label %70, label %45
70: ; preds = %65, %33
%71 = tail call i64 @fwrite(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.11, i64 0, i64 0), i64 9, i64 1, i32* %29)
%72 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %29, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.12, i64 0, i64 0))
%73 = load i32*, i32** @stdout
%74 = icmp eq i32* %29, %73
br i1 %74, label %81, label %75
75: ; preds = %70
%76 = tail call i64 @fclose(i32* %29)
%77 = load i64, i64* @EOF
%78 = icmp eq i64 %76, %77
br i1 %78, label %79, label %81
79: ; preds = %75
%80 = tail call i32 @error(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.13, i64 0, i64 0))
br label %81
81: ; preds = %79, %75, %70
ret void
}