#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__ ceil(short const);
int /*<<< orphan*/ coin_flush_ascii85(int /*<<< orphan*/ *, unsigned char *,
                                      unsigned char *, int *, int *, int const);
int /*<<< orphan*/ coin_output_ascii85(int /*<<< orphan*/ *, unsigned char,
                                       unsigned char *, unsigned char *, int *,
                                       int *, int const, int /*<<< orphan*/);
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int writeToPostScript(FILE *fp, const float *printsize, const int nc,
                      const float dpi, unsigned char *src, const short *size) {
  const float defaultdpi = 72.0f;
  const short pixelsize[] = {(short)(printsize[0] * defaultdpi),
                             (short)(printsize[1] * defaultdpi)};
  const int chan = nc <= 2 ? 1 : 3;
  const short scaledsize[] = {(short)ceil(size[0] * defaultdpi / dpi),
                              (short)ceil(size[1] * defaultdpi / dpi)};
  fprintf(fp, "%%!PS-Adobe-2.0 EPSF-1.2\n");
  fprintf(fp, "%%%%BoundingBox: 0 %d %d %d\n", pixelsize[1] - scaledsize[1],
          scaledsize[0], pixelsize[1]);
  fprintf(fp, "%%%%Creator: Coin <http://www.coin3d.org>\n");
  fprintf(fp, "%%%%EndComments\n");
  fprintf(fp, "\n");
  fprintf(fp, "/origstate save def\n");
  fprintf(fp, "\n");
  fprintf(fp, "%% workaround for bug in some PS interpreters\n");
  fprintf(fp, "%% which doesn't skip the ASCII85 EOD marker.\n");
  fprintf(fp, "/~ {currentfile read pop pop} def\n\n");
  fprintf(fp, "/image_wd %d def\n", size[0]);
  fprintf(fp, "/image_ht %d def\n", size[1]);
  fprintf(fp, "/pos_wd %d def\n", size[0]);
  fprintf(fp, "/pos_ht %d def\n", size[1]);
  fprintf(fp, "/image_dpi %g def\n", dpi);
  fprintf(fp, "/image_scale %g image_dpi div def\n", defaultdpi);
  fprintf(fp, "/image_chan %d def\n", chan);
  fprintf(fp, "/xpos_offset 0 image_scale mul def\n");
  fprintf(fp, "/ypos_offset 0 image_scale mul def\n");
  fprintf(fp, "/pix_buf_size %d def\n\n", size[0] * chan);
  fprintf(fp, "/page_ht %g %g mul def\n", printsize[1], defaultdpi);
  fprintf(fp, "/page_wd %g %g mul def\n", printsize[0], defaultdpi);
  fprintf(fp, "/image_xpos 0 def\n");
  fprintf(fp, "/image_ypos page_ht pos_ht image_scale mul sub def\n");
  fprintf(fp,
          "image_xpos xpos_offset add image_ypos ypos_offset add translate\n");
  fprintf(fp, "\n");
  fprintf(fp, "/pix pix_buf_size string def\n");
  fprintf(fp, "image_wd image_scale mul image_ht image_scale mul scale\n");
  fprintf(fp, "\n");
  fprintf(fp, "image_wd image_ht 8\n");
  fprintf(fp, "[image_wd 0 0 image_ht 0 0]\n");
  fprintf(fp, "currentfile\n");
  fprintf(fp, "/ASCII85Decode filter\n");
  if (chan == 3)
    fprintf(fp, "false 3\ncolorimage\n");
  else
    fprintf(fp, "image\n");
  const int rowlen = 72;
  int num = size[0] * size[1];
  unsigned char tuple[4];
  unsigned char linebuf[rowlen + 5];
  int tuplecnt = 0;
  int linecnt = 0;
  int cnt = 0;
  while (cnt < num) {
    switch (nc) {
    default:
    case 1:
      coin_output_ascii85(fp, src[cnt], tuple, linebuf, &tuplecnt, &linecnt,
                          rowlen, 0);
      break;
    case 2:
      coin_output_ascii85(fp, src[cnt * 2], tuple, linebuf, &tuplecnt, &linecnt,
                          rowlen, 0);
      break;
    case 3:
      coin_output_ascii85(fp, src[cnt * 3], tuple, linebuf, &tuplecnt, &linecnt,
                          rowlen, 0);
      coin_output_ascii85(fp, src[cnt * 3 + 1], tuple, linebuf, &tuplecnt,
                          &linecnt, rowlen, 0);
      coin_output_ascii85(fp, src[cnt * 3 + 2], tuple, linebuf, &tuplecnt,
                          &linecnt, rowlen, 0);
      break;
    case 4:
      coin_output_ascii85(fp, src[cnt * 4], tuple, linebuf, &tuplecnt, &linecnt,
                          rowlen, 0);
      coin_output_ascii85(fp, src[cnt * 4 + 1], tuple, linebuf, &tuplecnt,
                          &linecnt, rowlen, 0);
      coin_output_ascii85(fp, src[cnt * 4 + 2], tuple, linebuf, &tuplecnt,
                          &linecnt, rowlen, 0);
      break;
    }
    cnt++;
  }
  coin_flush_ascii85(fp, tuple, linebuf, &tuplecnt, &linecnt, rowlen);
  fprintf(fp, "~>\n\n");
  fprintf(fp, "origstate restore\n");
  fprintf(fp, "\n");
  fprintf(fp, "%%%%Trailer\n");
  fprintf(fp, "\n");
  fprintf(fp, "%%%%EOF\n");
  return (ferror(fp) == 0);
}


x86 assembly (clang, -O0):
<writeToPostScript>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movss  %xmm0,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
movl   $0x42900000,-0x2c(%rbp)
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  0xe81(%rip),%xmm1
movss  %xmm1,-0x60(%rbp)
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %ax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %ax,-0x2e(%rbp)
mov    -0x14(%rbp),%eax
sub    $0x3,%eax
setge  %al
movzbl %al,%ecx
mov    %ecx,%eax
lea    0x1(%rax,%rax,1),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%rax
movswl (%rax),%eax
cvtsi2ss %eax,%xmm0
mulss  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
movswl %ax,%edi
call   1040 <ceil@plt>
movss  -0x60(%rbp),%xmm1
mov    %ax,-0x38(%rbp)
mov    -0x28(%rbp),%rax
movswl 0x2(%rax),%eax
cvtsi2ss %eax,%xmm0
mulss  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
divss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
movswl %ax,%edi
call   1040 <ceil@plt>
mov    %ax,-0x36(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xdf9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
movswl -0x2e(%rbp),%edx
movswl -0x36(%rbp),%eax
sub    %eax,%edx
movswl -0x38(%rbp),%ecx
movswl -0x2e(%rbp),%r8d
lea    0xdee(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xdf9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe12(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x1111(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xdff(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x10ed(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xdf0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe0d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe2a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movswl (%rax),%edx
lea    0xe35(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movswl 0x2(%rax),%edx
lea    0xe2d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movswl (%rax),%edx
lea    0xe26(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movswl 0x2(%rax),%edx
lea    0xe1c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe11(%rip),%rsi
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe12(%rip),%rsi
movsd  0xc8d(%rip),%xmm0
mov    $0x1,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x34(%rbp),%edx
lea    0xe18(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe1a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe2c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rax
movswl (%rax),%edx
imul   -0x34(%rbp),%edx
lea    0xe33(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe2b(%rip),%rsi
movsd  0xc10(%rip),%xmm1
mov    $0x2,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe1d(%rip),%rsi
movsd  0xbea(%rip),%xmm1
mov    $0x2,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe1b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe1c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe3e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xf31(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe5b(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xefb(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe7c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe7f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xe85(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
cmpl   $0x3,-0x34(%rbp)
jne    1504 <writeToPostScript+0x3b4>
mov    -0x8(%rbp),%rdi
lea    0xe80(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1516 <writeToPostScript+0x3c6>
mov    -0x8(%rbp),%rdi
lea    0xe76(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x48,-0x3c(%rbp)
mov    -0x28(%rbp),%rcx
movswl (%rcx),%eax
movswl 0x2(%rcx),%ecx
imul   %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    %rsp,%rax
mov    %rax,-0x50(%rbp)
mov    %rsp,%rax
add    $0xffffffffffffffb0,%rax
mov    %rax,-0x68(%rbp)
mov    %rax,%rsp
movl   $0x0,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
mov    -0x5c(%rbp),%eax
cmp    -0x40(%rbp),%eax
jge    17d8 <writeToPostScript+0x688>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x70(%rbp)
sub    $0x3,%eax
ja     158d <writeToPostScript+0x43d>
mov    -0x70(%rbp),%rax
lea    0xa88(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
jmp    1592 <writeToPostScript+0x442>
mov    -0x68(%rbp),%rcx
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0x5c(%rbp),%rdx
mov    (%rax,%rdx,1),%al
lea    -0x44(%rbp),%rdx
lea    -0x54(%rbp),%r8
lea    -0x58(%rbp),%r9
xor    %esi,%esi
sub    $0x10,%rsp
movzbl %al,%esi
movl   $0x48,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <coin_output_ascii85@plt>
add    $0x10,%rsp
jmp    17ca <writeToPostScript+0x67a>
mov    -0x68(%rbp),%rcx
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    -0x5c(%rbp),%edx
shl    $0x1,%edx
movslq %edx,%rdx
mov    (%rax,%rdx,1),%al
lea    -0x44(%rbp),%rdx
lea    -0x54(%rbp),%r8
lea    -0x58(%rbp),%r9
xor    %esi,%esi
sub    $0x10,%rsp
movzbl %al,%esi
movl   $0x48,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <coin_output_ascii85@plt>
add    $0x10,%rsp
jmp    17ca <writeToPostScript+0x67a>
mov    -0x68(%rbp),%rcx
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%edx
movslq %edx,%rdx
mov    (%rax,%rdx,1),%al
lea    -0x44(%rbp),%rdx
lea    -0x54(%rbp),%r8
lea    -0x58(%rbp),%r9
xor    %esi,%esi
sub    $0x10,%rsp
movzbl %al,%esi
movl   $0x48,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <coin_output_ascii85@plt>
mov    -0x68(%rbp),%rcx
add    $0x10,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rax,%rdx,1),%al
lea    -0x44(%rbp),%rdx
lea    -0x54(%rbp),%r8
lea    -0x58(%rbp),%r9
xor    %esi,%esi
sub    $0x10,%rsp
movzbl %al,%esi
movl   $0x48,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <coin_output_ascii85@plt>
mov    -0x68(%rbp),%rcx
add    $0x10,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
imul   $0x3,-0x5c(%rbp),%edx
add    $0x2,%edx
movslq %edx,%rdx
mov    (%rax,%rdx,1),%al
lea    -0x44(%rbp),%rdx
lea    -0x54(%rbp),%r8
lea    -0x58(%rbp),%r9
xor    %esi,%esi
sub    $0x10,%rsp
movzbl %al,%esi
movl   $0x48,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <coin_output_ascii85@plt>
add    $0x10,%rsp
jmp    17ca <writeToPostScript+0x67a>
mov    -0x68(%rbp),%rcx
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    -0x5c(%rbp),%edx
shl    $0x2,%edx
movslq %edx,%rdx
mov    (%rax,%rdx,1),%al
lea    -0x44(%rbp),%rdx
lea    -0x54(%rbp),%r8
lea    -0x58(%rbp),%r9
xor    %esi,%esi
sub    $0x10,%rsp
movzbl %al,%esi
movl   $0x48,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <coin_output_ascii85@plt>
mov    -0x68(%rbp),%rcx
add    $0x10,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    -0x5c(%rbp),%edx
shl    $0x2,%edx
add    $0x1,%edx
movslq %edx,%rdx
mov    (%rax,%rdx,1),%al
lea    -0x44(%rbp),%rdx
lea    -0x54(%rbp),%r8
lea    -0x58(%rbp),%r9
xor    %esi,%esi
sub    $0x10,%rsp
movzbl %al,%esi
movl   $0x48,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <coin_output_ascii85@plt>
mov    -0x68(%rbp),%rcx
add    $0x10,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rax
mov    -0x5c(%rbp),%edx
shl    $0x2,%edx
add    $0x2,%edx
movslq %edx,%rdx
mov    (%rax,%rdx,1),%al
lea    -0x44(%rbp),%rdx
lea    -0x54(%rbp),%r8
lea    -0x58(%rbp),%r9
xor    %esi,%esi
sub    $0x10,%rsp
movzbl %al,%esi
movl   $0x48,(%rsp)
movl   $0x0,0x8(%rsp)
call   1060 <coin_output_ascii85@plt>
add    $0x10,%rsp
mov    -0x5c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x5c(%rbp)
jmp    1558 <writeToPostScript+0x408>
mov    -0x68(%rbp),%rdx
mov    -0x8(%rbp),%rdi
lea    -0x44(%rbp),%rsi
lea    -0x54(%rbp),%rcx
lea    -0x58(%rbp),%r8
mov    $0x48,%r9d
call   1070 <coin_flush_ascii85@plt>
mov    -0x8(%rbp),%rdi
lea    0xb8a(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xb7d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xb69(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xb6c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xb45(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xb55(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x50(%rbp),%rcx
mov    %rcx,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<writeToPostScript>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %r8,%r13
mov    %rcx,-0x58(%rbp)
movss  %xmm0,-0x38(%rbp)
mov    %edx,%r12d
mov    %rsi,-0x50(%rbp)
mov    %rdi,%r14
movss  0xe61(%rip),%xmm2
movss  0x4(%rsi),%xmm1
mulss  %xmm2,%xmm1
cvttss2si %xmm1,%eax
mov    %eax,-0x48(%rbp)
xor    %eax,%eax
cmp    $0x3,%edx
setge  %al
lea    0x1(%rax,%rax,1),%eax
mov    %eax,-0x3c(%rbp)
movswl (%r8),%eax
xorps  %xmm1,%xmm1
cvtsi2ss %eax,%xmm1
mulss  %xmm2,%xmm1
divss  %xmm0,%xmm1
cvttss2si %xmm1,%eax
movswl %ax,%edi
call   1040 <ceil@plt>
mov    %rax,%r15
movswl 0x2(%r13),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
mulss  0xe0c(%rip),%xmm0
divss  -0x38(%rbp),%xmm0
cvttss2si %xmm0,%eax
movswl %ax,%edi
call   1040 <ceil@plt>
mov    %rax,%rbx
lea    0xe01(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
movswl -0x48(%rbp),%r8d
movswl %bx,%eax
mov    %r14,%rbx
mov    %r12d,%r14d
mov    %r8d,%edx
sub    %eax,%edx
movswl %r15w,%ecx
lea    0xdf3(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xdff(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe19(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xe0c(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xdfb(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe19(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe37(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
movswl 0x0(%r13),%edx
lea    0xe3d(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
movswl 0x2(%r13),%edx
lea    0xe39(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
movswl 0x0(%r13),%edx
lea    0xe35(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
movswl 0x2(%r13),%edx
lea    0xe2f(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
movss  -0x38(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe25(%rip),%rsi
mov    %rbx,%rdi
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    0xe27(%rip),%rsi
movsd  0xcb6(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1060 <fprintf@plt>
lea    0xe31(%rip),%rsi
mov    %rbx,%rdi
mov    -0x3c(%rbp),%r15d
mov    %r15d,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
lea    0xe2d(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe38(%rip),%rdi
mov    $0x23,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
movswl 0x0(%r13),%edx
imul   %r15d,%edx
lea    0xe3a(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    -0x50(%rbp),%r15
movss  0x4(%r15),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe32(%rip),%rsi
mov    %rbx,%rdi
movsd  0xc28(%rip),%xmm1
mov    $0x2,%al
call   1060 <fprintf@plt>
movss  (%r15),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe28(%rip),%rsi
mov    %rbx,%rdi
movsd  0xc06(%rip),%xmm1
mov    $0x2,%al
call   1060 <fprintf@plt>
lea    0xe27(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe21(%rip),%rdi
mov    $0x33,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe3c(%rip),%rdi
mov    $0x40,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xe57(%rip),%rdi
mov    $0x1d,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe5c(%rip),%rdi
mov    $0x38,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1050 <fputc@plt>
lea    0xe6f(%rip),%rdi
mov    $0x14,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe6b(%rip),%rdi
mov    $0x1c,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe6f(%rip),%rdi
mov    $0xc,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
lea    0xe63(%rip),%rdi
mov    $0x16,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
cmp    $0x3,%r12d
mov    %rbx,-0x38(%rbp)
jge    151c <writeToPostScript+0x3ac>
lea    0xe64(%rip),%rdi
mov    $0x6,%esi
jmp    1528 <writeToPostScript+0x3b8>
lea    0xe49(%rip),%rdi
mov    $0x13,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1090 <fwrite@plt>
mov    %rsp,-0x60(%rbp)
movswl 0x0(%r13),%ecx
movswl 0x2(%r13),%eax
imul   %ecx,%eax
mov    %rsp,%r15
add    $0xffffffffffffffb0,%r15
mov    %r15,%rsp
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
test   %eax,%eax
jle    16d7 <writeToPostScript+0x567>
mov    %eax,%eax
mov    %rax,-0x50(%rbp)
mov    -0x58(%rbp),%rax
lea    0x1(%rax),%r12
xor    %r13d,%r13d
lea    -0x40(%rbp),%rbx
mov    %r12,-0x48(%rbp)
mov    %r14d,-0x3c(%rbp)
jmp    1622 <writeToPostScript+0x4b2>
nopl   0x0(%rax,%rax,1)
movzbl -0x1(%r12),%esi
mov    -0x38(%rbp),%r14
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %r15,%rcx
lea    -0x30(%rbp),%r8
lea    -0x2c(%rbp),%r9
push   $0x0
push   $0x48
call   1070 <coin_output_ascii85@plt>
add    $0x10,%rsp
movzbl (%r12),%esi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %r15,%rcx
lea    -0x30(%rbp),%r8
lea    -0x2c(%rbp),%r9
push   $0x0
push   $0x48
call   1070 <coin_output_ascii85@plt>
lea    -0x2c(%rbp),%r9
lea    -0x30(%rbp),%r8
add    $0x10,%rsp
lea    0x2(,%r13,2),%rax
add    %r13,%rax
mov    -0x58(%rbp),%rcx
movzbl (%rcx,%rax,1),%esi
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %r15,%rcx
push   $0x0
push   $0x48
call   1070 <coin_output_ascii85@plt>
add    $0x10,%rsp
add    $0x1,%r13
add    $0x3,%r12
cmp    %r13,-0x50(%rbp)
mov    -0x3c(%rbp),%r14d
je     16d7 <writeToPostScript+0x567>
cmp    $0x2,%r14d
je     16c0 <writeToPostScript+0x550>
cmp    $0x3,%r14d
je     1590 <writeToPostScript+0x420>
mov    %r13,%rax
cmp    $0x4,%r14d
mov    -0x38(%rbp),%r14
lea    -0x30(%rbp),%r8
lea    -0x2c(%rbp),%r9
jne    15ee <writeToPostScript+0x47e>
mov    %r15,%rbx
mov    -0x48(%rbp),%r15
movzbl -0x1(%r15,%r13,4),%esi
mov    %r14,%rdi
lea    -0x40(%rbp),%rdx
mov    %rbx,%rcx
lea    -0x30(%rbp),%r8
lea    -0x2c(%rbp),%r9
push   $0x0
push   $0x48
call   1070 <coin_output_ascii85@plt>
add    $0x10,%rsp
movzbl (%r15,%r13,4),%esi
mov    %rbx,%r15
lea    -0x40(%rbp),%rbx
mov    %r14,%rdi
mov    %rbx,%rdx
mov    %r15,%rcx
lea    -0x30(%rbp),%r8
lea    -0x2c(%rbp),%r9
push   $0x0
push   $0x48
call   1070 <coin_output_ascii85@plt>
lea    -0x2c(%rbp),%r9
lea    -0x30(%rbp),%r8
add    $0x10,%rsp
lea    0x2(,%r13,4),%rax
jmp    15ee <writeToPostScript+0x47e>
cs nopw 0x0(%rax,%rax,1)
mov    %r13,%rax
add    %r13,%rax
mov    -0x38(%rbp),%r14
lea    -0x30(%rbp),%r8
lea    -0x2c(%rbp),%r9
jmp    15ee <writeToPostScript+0x47e>
lea    -0x40(%rbp),%rsi
lea    -0x30(%rbp),%rcx
lea    -0x2c(%rbp),%r8
mov    -0x38(%rbp),%r14
mov    %r14,%rdi
mov    %r15,%rdx
mov    $0x48,%r9d
call   1080 <coin_flush_ascii85@plt>
lea    0xc81(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
lea    0xc6d(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1090 <fwrite@plt>
mov    $0xa,%edi
mov    %r14,%rsi
call   1050 <fputc@plt>
lea    0xc5a(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0xa,%edi
mov    %r14,%rsi
call   1050 <fputc@plt>
lea    0xc49(%rip),%rsi
mov    %r14,%rdi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %r14,%rdi
call   1030 <ferror@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    -0x60(%rbp),%rsp
mov    %ecx,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"%%!PS-Adobe-2.0 EPSF-1.2\0A\00"
@.str.1 = [29 x i8] c"%%%%BoundingBox: 0 %d %d %d\0A\00"
@.str.2 = [43 x i8] c"%%%%Creator: Coin <http://www.coin3d.org>\0A\00"
@.str.3 = [17 x i8] c"%%%%EndComments\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [21 x i8] c"/origstate save def\0A\00"
@.str.6 = [47 x i8] c"%% workaround for bug in some PS interpreters\0A\00"
@.str.7 = [47 x i8] c"%% which doesn't skip the ASCII85 EOD marker.\0A\00"
@.str.8 = [36 x i8] c"/~ {currentfile read pop pop} def\0A\0A\00"
@.str.9 = [18 x i8] c"/image_wd %d def\0A\00"
@.str.10 = [18 x i8] c"/image_ht %d def\0A\00"
@.str.11 = [16 x i8] c"/pos_wd %d def\0A\00"
@.str.12 = [16 x i8] c"/pos_ht %d def\0A\00"
@.str.13 = [19 x i8] c"/image_dpi %g def\0A\00"
@.str.14 = [35 x i8] c"/image_scale %g image_dpi div def\0A\00"
@.str.15 = [20 x i8] c"/image_chan %d def\0A\00"
@.str.16 = [36 x i8] c"/xpos_offset 0 image_scale mul def\0A\00"
@.str.17 = [36 x i8] c"/ypos_offset 0 image_scale mul def\0A\00"
@.str.18 = [23 x i8] c"/pix_buf_size %d def\0A\0A\00"
@.str.19 = [24 x i8] c"/page_ht %g %g mul def\0A\00"
@.str.20 = [24 x i8] c"/page_wd %g %g mul def\0A\00"
@.str.21 = [19 x i8] c"/image_xpos 0 def\0A\00"
@.str.22 = [52 x i8] c"/image_ypos page_ht pos_ht image_scale mul sub def\0A\00"
@.str.23 = [65 x i8] c"image_xpos xpos_offset add image_ypos ypos_offset add translate\0A\00"
@.str.24 = [30 x i8] c"/pix pix_buf_size string def\0A\00"
@.str.25 = [57 x i8] c"image_wd image_scale mul image_ht image_scale mul scale\0A\00"
@.str.26 = [21 x i8] c"image_wd image_ht 8\0A\00"
@.str.27 = [29 x i8] c"[image_wd 0 0 image_ht 0 0]\0A\00"
@.str.28 = [13 x i8] c"currentfile\0A\00"
@.str.29 = [23 x i8] c"/ASCII85Decode filter\0A\00"
@.str.30 = [20 x i8] c"false 3\0Acolorimage\0A\00"
@.str.31 = [7 x i8] c"image\0A\00"
@.str.32 = [5 x i8] c"~>\0A\0A\00"
@.str.33 = [19 x i8] c"origstate restore\0A\00"
@.str.34 = [13 x i8] c"%%%%Trailer\0A\00"
@.str.35 = [9 x i8] c"%%%%EOF\0A\00"
define i32 @writeToPostScript(i32* %0, float* %1, i32 %2, float %3, i8* %4, i16* %5) {
%7 = alloca i32*
%8 = alloca float*
%9 = alloca i32
%10 = alloca float
%11 = alloca i8*
%12 = alloca i16*
%13 = alloca float
%14 = alloca [2 x i16]
%15 = alloca i32
%16 = alloca [2 x i16]
%17 = alloca i32
%18 = alloca i32
%19 = alloca [4 x i8]
%20 = alloca i8*
%21 = alloca i32
%22 = alloca i32
%23 = alloca i32
store i32* %0, i32** %7
store float* %1, float** %8
store i32 %2, i32* %9
store float %3, float* %10
store i8* %4, i8** %11
store i16* %5, i16** %12
store float 7.200000e+01, float* %13
%24 = getelementptr inbounds [2 x i16], [2 x i16]* %14, i64 0, i64 0
%25 = load float*, float** %8
%26 = getelementptr inbounds float, float* %25, i64 0
%27 = load float, float* %26
%28 = fmul float %27, 7.200000e+01
%29 = fptosi float %28 to i16
store i16 %29, i16* %24
%30 = getelementptr inbounds i16, i16* %24, i64 1
%31 = load float*, float** %8
%32 = getelementptr inbounds float, float* %31, i64 1
%33 = load float, float* %32
%34 = fmul float %33, 7.200000e+01
%35 = fptosi float %34 to i16
store i16 %35, i16* %30
%36 = load i32, i32* %9
%37 = icmp sle i32 %36, 2
%38 = zext i1 %37 to i64
%39 = select i1 %37, i32 1, i32 3
store i32 %39, i32* %15
%40 = getelementptr inbounds [2 x i16], [2 x i16]* %16, i64 0, i64 0
%41 = load i16*, i16** %12
%42 = getelementptr inbounds i16, i16* %41, i64 0
%43 = load i16, i16* %42
%44 = sext i16 %43 to i32
%45 = sitofp i32 %44 to float
%46 = fmul float %45, 7.200000e+01
%47 = load float, float* %10
%48 = fdiv float %46, %47
%49 = fptosi float %48 to i16
%50 = call i64 @ceil(i16 signext %49)
%51 = trunc i64 %50 to i16
store i16 %51, i16* %40
%52 = getelementptr inbounds i16, i16* %40, i64 1
%53 = load i16*, i16** %12
%54 = getelementptr inbounds i16, i16* %53, i64 1
%55 = load i16, i16* %54
%56 = sext i16 %55 to i32
%57 = sitofp i32 %56 to float
%58 = fmul float %57, 7.200000e+01
%59 = load float, float* %10
%60 = fdiv float %58, %59
%61 = fptosi float %60 to i16
%62 = call i64 @ceil(i16 signext %61)
%63 = trunc i64 %62 to i16
store i16 %63, i16* %52
%64 = load i32*, i32** %7
%65 = call i32 (i32*, i8*, ...) @fprintf(i32* %64, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%66 = load i32*, i32** %7
%67 = getelementptr inbounds [2 x i16], [2 x i16]* %14, i64 0, i64 1
%68 = load i16, i16* %67
%69 = sext i16 %68 to i32
%70 = getelementptr inbounds [2 x i16], [2 x i16]* %16, i64 0, i64 1
%71 = load i16, i16* %70
%72 = sext i16 %71 to i32
%73 = sub nsw i32 %69, %72
%74 = getelementptr inbounds [2 x i16], [2 x i16]* %16, i64 0, i64 0
%75 = load i16, i16* %74
%76 = sext i16 %75 to i32
%77 = getelementptr inbounds [2 x i16], [2 x i16]* %14, i64 0, i64 1
%78 = load i16, i16* %77
%79 = sext i16 %78 to i32
%80 = call i32 (i32*, i8*, ...) @fprintf(i32* %66, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %73, i32 %76, i32 %79)
%81 = load i32*, i32** %7
%82 = call i32 (i32*, i8*, ...) @fprintf(i32* %81, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%83 = load i32*, i32** %7
%84 = call i32 (i32*, i8*, ...) @fprintf(i32* %83, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%85 = load i32*, i32** %7
%86 = call i32 (i32*, i8*, ...) @fprintf(i32* %85, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%87 = load i32*, i32** %7
%88 = call i32 (i32*, i8*, ...) @fprintf(i32* %87, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0))
%89 = load i32*, i32** %7
%90 = call i32 (i32*, i8*, ...) @fprintf(i32* %89, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%91 = load i32*, i32** %7
%92 = call i32 (i32*, i8*, ...) @fprintf(i32* %91, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
%93 = load i32*, i32** %7
%94 = call i32 (i32*, i8*, ...) @fprintf(i32* %93, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%95 = load i32*, i32** %7
%96 = call i32 (i32*, i8*, ...) @fprintf(i32* %95, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0))
%97 = load i32*, i32** %7
%98 = load i16*, i16** %12
%99 = getelementptr inbounds i16, i16* %98, i64 0
%100 = load i16, i16* %99
%101 = sext i16 %100 to i32
%102 = call i32 (i32*, i8*, ...) @fprintf(i32* %97, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %101)
%103 = load i32*, i32** %7
%104 = load i16*, i16** %12
%105 = getelementptr inbounds i16, i16* %104, i64 1
%106 = load i16, i16* %105
%107 = sext i16 %106 to i32
%108 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %107)
%109 = load i32*, i32** %7
%110 = load i16*, i16** %12
%111 = getelementptr inbounds i16, i16* %110, i64 0
%112 = load i16, i16* %111
%113 = sext i16 %112 to i32
%114 = call i32 (i32*, i8*, ...) @fprintf(i32* %109, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32 %113)
%115 = load i32*, i32** %7
%116 = load i16*, i16** %12
%117 = getelementptr inbounds i16, i16* %116, i64 1
%118 = load i16, i16* %117
%119 = sext i16 %118 to i32
%120 = call i32 (i32*, i8*, ...) @fprintf(i32* %115, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i32 %119)
%121 = load i32*, i32** %7
%122 = load float, float* %10
%123 = fpext float %122 to double
%124 = call i32 (i32*, i8*, ...) @fprintf(i32* %121, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), double %123)
%125 = load i32*, i32** %7
%126 = call i32 (i32*, i8*, ...) @fprintf(i32* %125, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), double 7.200000e+01)
%127 = load i32*, i32** %7
%128 = load i32, i32* %15
%129 = call i32 (i32*, i8*, ...) @fprintf(i32* %127, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %128)
%130 = load i32*, i32** %7
%131 = call i32 (i32*, i8*, ...) @fprintf(i32* %130, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.16, i64 0, i64 0))
%132 = load i32*, i32** %7
%133 = call i32 (i32*, i8*, ...) @fprintf(i32* %132, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0))
%134 = load i32*, i32** %7
%135 = load i16*, i16** %12
%136 = getelementptr inbounds i16, i16* %135, i64 0
%137 = load i16, i16* %136
%138 = sext i16 %137 to i32
%139 = load i32, i32* %15
%140 = mul nsw i32 %138, %139
%141 = call i32 (i32*, i8*, ...) @fprintf(i32* %134, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i32 %140)
%142 = load i32*, i32** %7
%143 = load float*, float** %8
%144 = getelementptr inbounds float, float* %143, i64 1
%145 = load float, float* %144
%146 = fpext float %145 to double
%147 = call i32 (i32*, i8*, ...) @fprintf(i32* %142, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0), double %146, double 7.200000e+01)
%148 = load i32*, i32** %7
%149 = load float*, float** %8
%150 = getelementptr inbounds float, float* %149, i64 0
%151 = load float, float* %150
%152 = fpext float %151 to double
%153 = call i32 (i32*, i8*, ...) @fprintf(i32* %148, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i64 0, i64 0), double %152, double 7.200000e+01)
%154 = load i32*, i32** %7
%155 = call i32 (i32*, i8*, ...) @fprintf(i32* %154, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0))
%156 = load i32*, i32** %7
%157 = call i32 (i32*, i8*, ...) @fprintf(i32* %156, i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.22, i64 0, i64 0))
%158 = load i32*, i32** %7
%159 = call i32 (i32*, i8*, ...) @fprintf(i32* %158, i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.23, i64 0, i64 0))
%160 = load i32*, i32** %7
%161 = call i32 (i32*, i8*, ...) @fprintf(i32* %160, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%162 = load i32*, i32** %7
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %162, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.24, i64 0, i64 0))
%164 = load i32*, i32** %7
%165 = call i32 (i32*, i8*, ...) @fprintf(i32* %164, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.25, i64 0, i64 0))
%166 = load i32*, i32** %7
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %166, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%168 = load i32*, i32** %7
%169 = call i32 (i32*, i8*, ...) @fprintf(i32* %168, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.26, i64 0, i64 0))
%170 = load i32*, i32** %7
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %170, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.27, i64 0, i64 0))
%172 = load i32*, i32** %7
%173 = call i32 (i32*, i8*, ...) @fprintf(i32* %172, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.28, i64 0, i64 0))
%174 = load i32*, i32** %7
%175 = call i32 (i32*, i8*, ...) @fprintf(i32* %174, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.29, i64 0, i64 0))
%176 = load i32, i32* %15
%177 = icmp eq i32 %176, 3
br i1 %177, label %178, label %181
178: ; preds = %6
%179 = load i32*, i32** %7
%180 = call i32 (i32*, i8*, ...) @fprintf(i32* %179, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.30, i64 0, i64 0))
br label %184
181: ; preds = %6
%182 = load i32*, i32** %7
%183 = call i32 (i32*, i8*, ...) @fprintf(i32* %182, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i64 0, i64 0))
br label %184
184: ; preds = %181, %178
store i32 72, i32* %17
%185 = load i16*, i16** %12
%186 = getelementptr inbounds i16, i16* %185, i64 0
%187 = load i16, i16* %186
%188 = sext i16 %187 to i32
%189 = load i16*, i16** %12
%190 = getelementptr inbounds i16, i16* %189, i64 1
%191 = load i16, i16* %190
%192 = sext i16 %191 to i32
%193 = mul nsw i32 %188, %192
store i32 %193, i32* %18
%194 = call i8* @llvm.stacksave()
store i8* %194, i8** %20
%195 = alloca i8, i64 77
store i32 0, i32* %21
store i32 0, i32* %22
store i32 0, i32* %23
br label %196
196: ; preds = %282, %184
%197 = load i32, i32* %23
%198 = load i32, i32* %18
%199 = icmp slt i32 %197, %198
br i1 %199, label %200, label %285
200: ; preds = %196
%201 = load i32, i32* %9
switch i32 %201, label %202 [
i32 1, label %203
i32 2, label %212
i32 3, label %222
i32 4, label %252
]
202: ; preds = %200
br label %203
203: ; preds = %200, %202
%204 = load i32*, i32** %7
%205 = load i8*, i8** %11
%206 = load i32, i32* %23
%207 = sext i32 %206 to i64
%208 = getelementptr inbounds i8, i8* %205, i64 %207
%209 = load i8, i8* %208
%210 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%211 = call i32 @coin_output_ascii85(i32* %204, i8 zeroext %209, i8* %210, i8* %195, i32* %21, i32* %22, i32 72, i32 0)
br label %282
212: ; preds = %200
%213 = load i32*, i32** %7
%214 = load i8*, i8** %11
%215 = load i32, i32* %23
%216 = mul nsw i32 %215, 2
%217 = sext i32 %216 to i64
%218 = getelementptr inbounds i8, i8* %214, i64 %217
%219 = load i8, i8* %218
%220 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%221 = call i32 @coin_output_ascii85(i32* %213, i8 zeroext %219, i8* %220, i8* %195, i32* %21, i32* %22, i32 72, i32 0)
br label %282
222: ; preds = %200
%223 = load i32*, i32** %7
%224 = load i8*, i8** %11
%225 = load i32, i32* %23
%226 = mul nsw i32 %225, 3
%227 = sext i32 %226 to i64
%228 = getelementptr inbounds i8, i8* %224, i64 %227
%229 = load i8, i8* %228
%230 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%231 = call i32 @coin_output_ascii85(i32* %223, i8 zeroext %229, i8* %230, i8* %195, i32* %21, i32* %22, i32 72, i32 0)
%232 = load i32*, i32** %7
%233 = load i8*, i8** %11
%234 = load i32, i32* %23
%235 = mul nsw i32 %234, 3
%236 = add nsw i32 %235, 1
%237 = sext i32 %236 to i64
%238 = getelementptr inbounds i8, i8* %233, i64 %237
%239 = load i8, i8* %238
%240 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%241 = call i32 @coin_output_ascii85(i32* %232, i8 zeroext %239, i8* %240, i8* %195, i32* %21, i32* %22, i32 72, i32 0)
%242 = load i32*, i32** %7
%243 = load i8*, i8** %11
%244 = load i32, i32* %23
%245 = mul nsw i32 %244, 3
%246 = add nsw i32 %245, 2
%247 = sext i32 %246 to i64
%248 = getelementptr inbounds i8, i8* %243, i64 %247
%249 = load i8, i8* %248
%250 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%251 = call i32 @coin_output_ascii85(i32* %242, i8 zeroext %249, i8* %250, i8* %195, i32* %21, i32* %22, i32 72, i32 0)
br label %282
252: ; preds = %200
%253 = load i32*, i32** %7
%254 = load i8*, i8** %11
%255 = load i32, i32* %23
%256 = mul nsw i32 %255, 4
%257 = sext i32 %256 to i64
%258 = getelementptr inbounds i8, i8* %254, i64 %257
%259 = load i8, i8* %258
%260 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%261 = call i32 @coin_output_ascii85(i32* %253, i8 zeroext %259, i8* %260, i8* %195, i32* %21, i32* %22, i32 72, i32 0)
%262 = load i32*, i32** %7
%263 = load i8*, i8** %11
%264 = load i32, i32* %23
%265 = mul nsw i32 %264, 4
%266 = add nsw i32 %265, 1
%267 = sext i32 %266 to i64
%268 = getelementptr inbounds i8, i8* %263, i64 %267
%269 = load i8, i8* %268
%270 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%271 = call i32 @coin_output_ascii85(i32* %262, i8 zeroext %269, i8* %270, i8* %195, i32* %21, i32* %22, i32 72, i32 0)
%272 = load i32*, i32** %7
%273 = load i8*, i8** %11
%274 = load i32, i32* %23
%275 = mul nsw i32 %274, 4
%276 = add nsw i32 %275, 2
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds i8, i8* %273, i64 %277
%279 = load i8, i8* %278
%280 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%281 = call i32 @coin_output_ascii85(i32* %272, i8 zeroext %279, i8* %280, i8* %195, i32* %21, i32* %22, i32 72, i32 0)
br label %282
282: ; preds = %252, %222, %212, %203
%283 = load i32, i32* %23
%284 = add nsw i32 %283, 1
store i32 %284, i32* %23
br label %196
285: ; preds = %196
%286 = load i32*, i32** %7
%287 = getelementptr inbounds [4 x i8], [4 x i8]* %19, i64 0, i64 0
%288 = call i32 @coin_flush_ascii85(i32* %286, i8* %287, i8* %195, i32* %21, i32* %22, i32 72)
%289 = load i32*, i32** %7
%290 = call i32 (i32*, i8*, ...) @fprintf(i32* %289, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.32, i64 0, i64 0))
%291 = load i32*, i32** %7
%292 = call i32 (i32*, i8*, ...) @fprintf(i32* %291, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.33, i64 0, i64 0))
%293 = load i32*, i32** %7
%294 = call i32 (i32*, i8*, ...) @fprintf(i32* %293, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%295 = load i32*, i32** %7
%296 = call i32 (i32*, i8*, ...) @fprintf(i32* %295, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.34, i64 0, i64 0))
%297 = load i32*, i32** %7
%298 = call i32 (i32*, i8*, ...) @fprintf(i32* %297, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%299 = load i32*, i32** %7
%300 = call i32 (i32*, i8*, ...) @fprintf(i32* %299, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.35, i64 0, i64 0))
%301 = load i32*, i32** %7
%302 = call i64 @ferror(i32* %301)
%303 = icmp eq i64 %302, 0
%304 = zext i1 %303 to i32
%305 = load i8*, i8** %20
ret i32 %304
}

LLVM IR (-O2):
@.str = [26 x i8] c"%%!PS-Adobe-2.0 EPSF-1.2\0A\00"
@.str.1 = [29 x i8] c"%%%%BoundingBox: 0 %d %d %d\0A\00"
@.str.2 = [43 x i8] c"%%%%Creator: Coin <http://www.coin3d.org>\0A\00"
@.str.3 = [17 x i8] c"%%%%EndComments\0A\00"
@.str.5 = [21 x i8] c"/origstate save def\0A\00"
@.str.6 = [47 x i8] c"%% workaround for bug in some PS interpreters\0A\00"
@.str.7 = [47 x i8] c"%% which doesn't skip the ASCII85 EOD marker.\0A\00"
@.str.8 = [36 x i8] c"/~ {currentfile read pop pop} def\0A\0A\00"
@.str.9 = [18 x i8] c"/image_wd %d def\0A\00"
@.str.10 = [18 x i8] c"/image_ht %d def\0A\00"
@.str.11 = [16 x i8] c"/pos_wd %d def\0A\00"
@.str.12 = [16 x i8] c"/pos_ht %d def\0A\00"
@.str.13 = [19 x i8] c"/image_dpi %g def\0A\00"
@.str.14 = [35 x i8] c"/image_scale %g image_dpi div def\0A\00"
@.str.15 = [20 x i8] c"/image_chan %d def\0A\00"
@.str.16 = [36 x i8] c"/xpos_offset 0 image_scale mul def\0A\00"
@.str.17 = [36 x i8] c"/ypos_offset 0 image_scale mul def\0A\00"
@.str.18 = [23 x i8] c"/pix_buf_size %d def\0A\0A\00"
@.str.19 = [24 x i8] c"/page_ht %g %g mul def\0A\00"
@.str.20 = [24 x i8] c"/page_wd %g %g mul def\0A\00"
@.str.21 = [19 x i8] c"/image_xpos 0 def\0A\00"
@.str.22 = [52 x i8] c"/image_ypos page_ht pos_ht image_scale mul sub def\0A\00"
@.str.23 = [65 x i8] c"image_xpos xpos_offset add image_ypos ypos_offset add translate\0A\00"
@.str.24 = [30 x i8] c"/pix pix_buf_size string def\0A\00"
@.str.25 = [57 x i8] c"image_wd image_scale mul image_ht image_scale mul scale\0A\00"
@.str.26 = [21 x i8] c"image_wd image_ht 8\0A\00"
@.str.27 = [29 x i8] c"[image_wd 0 0 image_ht 0 0]\0A\00"
@.str.28 = [13 x i8] c"currentfile\0A\00"
@.str.29 = [23 x i8] c"/ASCII85Decode filter\0A\00"
@.str.30 = [20 x i8] c"false 3\0Acolorimage\0A\00"
@.str.31 = [7 x i8] c"image\0A\00"
@.str.32 = [5 x i8] c"~>\0A\0A\00"
@.str.33 = [19 x i8] c"origstate restore\0A\00"
@.str.34 = [13 x i8] c"%%%%Trailer\0A\00"
@.str.35 = [9 x i8] c"%%%%EOF\0A\00"
define i32 @writeToPostScript(i32* %0, float* nocapture %1, i32 %2, float %3, i8* nocapture %4, i16* nocapture %5) {
%7 = alloca [4 x i8]
%8 = alloca i32
%9 = alloca i32
%10 = getelementptr inbounds float, float* %1, i64 1
%11 = load float, float* %10
%12 = fmul float %11, 7.200000e+01
%13 = fptosi float %12 to i16
%14 = icmp slt i32 %2, 3
%15 = select i1 %14, i32 1, i32 3
%16 = load i16, i16* %5
%17 = sitofp i16 %16 to float
%18 = fmul float %17, 7.200000e+01
%19 = fdiv float %18, %3
%20 = fptosi float %19 to i16
%21 = tail call i64 @ceil(i16 signext %20)
%22 = trunc i64 %21 to i32
%23 = getelementptr inbounds i16, i16* %5, i64 1
%24 = load i16, i16* %23
%25 = sitofp i16 %24 to float
%26 = fmul float %25, 7.200000e+01
%27 = fdiv float %26, %3
%28 = fptosi float %27 to i16
%29 = tail call i64 @ceil(i16 signext %28)
%30 = trunc i64 %29 to i32
%31 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%32 = sext i16 %13 to i32
%33 = shl i32 %30, 16
%34 = ashr exact i32 %33, 16
%35 = sub nsw i32 %32, %34
%36 = shl i32 %22, 16
%37 = ashr exact i32 %36, 16
%38 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0), i32 %35, i32 %37, i32 %32)
%39 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.2, i64 0, i64 0))
%40 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
%41 = tail call i32 @fputc(i32 10, i32* %0)
%42 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i64 20, i64 1, i32* %0)
%43 = tail call i32 @fputc(i32 10, i32* %0)
%44 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0))
%45 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.7, i64 0, i64 0))
%46 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.8, i64 0, i64 0), i64 35, i64 1, i32* %0)
%47 = load i16, i16* %5
%48 = sext i16 %47 to i32
%49 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.9, i64 0, i64 0), i32 %48)
%50 = load i16, i16* %23
%51 = sext i16 %50 to i32
%52 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.10, i64 0, i64 0), i32 %51)
%53 = load i16, i16* %5
%54 = sext i16 %53 to i32
%55 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.11, i64 0, i64 0), i32 %54)
%56 = load i16, i16* %23
%57 = sext i16 %56 to i32
%58 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.12, i64 0, i64 0), i32 %57)
%59 = fpext float %3 to double
%60 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), double %59)
%61 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.14, i64 0, i64 0), double 7.200000e+01)
%62 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.15, i64 0, i64 0), i32 %15)
%63 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.16, i64 0, i64 0), i64 35, i64 1, i32* %0)
%64 = tail call i64 @fwrite(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.17, i64 0, i64 0), i64 35, i64 1, i32* %0)
%65 = load i16, i16* %5
%66 = sext i16 %65 to i32
%67 = mul nsw i32 %15, %66
%68 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i32 %67)
%69 = load float, float* %10
%70 = fpext float %69 to double
%71 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.19, i64 0, i64 0), double %70, double 7.200000e+01)
%72 = load float, float* %1
%73 = fpext float %72 to double
%74 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.20, i64 0, i64 0), double %73, double 7.200000e+01)
%75 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.21, i64 0, i64 0), i64 18, i64 1, i32* %0)
%76 = tail call i64 @fwrite(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.22, i64 0, i64 0), i64 51, i64 1, i32* %0)
%77 = tail call i64 @fwrite(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str.23, i64 0, i64 0), i64 64, i64 1, i32* %0)
%78 = tail call i32 @fputc(i32 10, i32* %0)
%79 = tail call i64 @fwrite(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.24, i64 0, i64 0), i64 29, i64 1, i32* %0)
%80 = tail call i64 @fwrite(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.25, i64 0, i64 0), i64 56, i64 1, i32* %0)
%81 = tail call i32 @fputc(i32 10, i32* %0)
%82 = tail call i64 @fwrite(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.26, i64 0, i64 0), i64 20, i64 1, i32* %0)
%83 = tail call i64 @fwrite(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.27, i64 0, i64 0), i64 28, i64 1, i32* %0)
%84 = tail call i64 @fwrite(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.28, i64 0, i64 0), i64 12, i64 1, i32* %0)
%85 = tail call i64 @fwrite(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.29, i64 0, i64 0), i64 22, i64 1, i32* %0)
br i1 %14, label %88, label %86
86: ; preds = %6
%87 = tail call i64 @fwrite(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.30, i64 0, i64 0), i64 19, i64 1, i32* %0)
br label %90
88: ; preds = %6
%89 = tail call i64 @fwrite(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.31, i64 0, i64 0), i64 6, i64 1, i32* %0)
br label %90
90: ; preds = %88, %86
%91 = load i16, i16* %5
%92 = sext i16 %91 to i32
%93 = load i16, i16* %23
%94 = sext i16 %93 to i32
%95 = mul nsw i32 %94, %92
%96 = getelementptr inbounds [4 x i8], [4 x i8]* %7, i64 0, i64 0
%97 = tail call i8* @llvm.stacksave()
%98 = alloca [77 x i8]
%99 = getelementptr inbounds [77 x i8], [77 x i8]* %98, i64 0, i64 0
%100 = bitcast i32* %8 to i8*
store i32 0, i32* %8
%101 = bitcast i32* %9 to i8*
store i32 0, i32* %9
%102 = icmp sgt i32 %95, 0
br i1 %102, label %103, label %136
103: ; preds = %90
%104 = zext i32 %95 to i64
br label %105
105: ; preds = %103, %129
%106 = phi i64 [ 0, %103 ], [ %134, %129 ]
switch i32 %2, label %129 [
i32 4, label %119
i32 2, label %107
i32 3, label %109
]
107: ; preds = %105
%108 = shl nuw nsw i64 %106, 1
br label %129
109: ; preds = %105
%110 = mul nuw nsw i64 %106, 3
%111 = getelementptr inbounds i8, i8* %4, i64 %110
%112 = load i8, i8* %111
%113 = call i32 @coin_output_ascii85(i32* %0, i8 zeroext %112, i8* %96, i8* %99, i32* %8, i32* %9, i32 72, i32 0)
%114 = add nuw nsw i64 %110, 1
%115 = getelementptr inbounds i8, i8* %4, i64 %114
%116 = load i8, i8* %115
%117 = call i32 @coin_output_ascii85(i32* %0, i8 zeroext %116, i8* %96, i8* %99, i32* %8, i32* %9, i32 72, i32 0)
%118 = add nuw nsw i64 %110, 2
br label %129
119: ; preds = %105
%120 = shl nsw i64 %106, 2
%121 = getelementptr inbounds i8, i8* %4, i64 %120
%122 = load i8, i8* %121
%123 = call i32 @coin_output_ascii85(i32* %0, i8 zeroext %122, i8* %96, i8* %99, i32* %8, i32* %9, i32 72, i32 0)
%124 = or i64 %120, 1
%125 = getelementptr inbounds i8, i8* %4, i64 %124
%126 = load i8, i8* %125
%127 = call i32 @coin_output_ascii85(i32* %0, i8 zeroext %126, i8* %96, i8* %99, i32* %8, i32* %9, i32 72, i32 0)
%128 = or i64 %120, 2
br label %129
129: ; preds = %105, %119, %109, %107
%130 = phi i64 [ %128, %119 ], [ %118, %109 ], [ %108, %107 ], [ %106, %105 ]
%131 = getelementptr inbounds i8, i8* %4, i64 %130
%132 = load i8, i8* %131
%133 = call i32 @coin_output_ascii85(i32* %0, i8 zeroext %132, i8* %96, i8* %99, i32* %8, i32* %9, i32 72, i32 0)
%134 = add nuw nsw i64 %106, 1
%135 = icmp eq i64 %134, %104
br i1 %135, label %136, label %105
136: ; preds = %129, %90
%137 = call i32 @coin_flush_ascii85(i32* %0, i8* %96, i8* %99, i32* %8, i32* %9, i32 72)
%138 = call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.32, i64 0, i64 0), i64 4, i64 1, i32* %0)
%139 = call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.33, i64 0, i64 0), i64 18, i64 1, i32* %0)
%140 = call i32 @fputc(i32 10, i32* %0)
%141 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.34, i64 0, i64 0))
%142 = call i32 @fputc(i32 10, i32* %0)
%143 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.35, i64 0, i64 0))
%144 = call i64 @ferror(i32* %0)
%145 = icmp eq i64 %144, 0
%146 = zext i1 %145 to i32
ret i32 %146
}