// File: /workspace/github_c_makefile_star2_O3/mishun[P]plantri/plantri.c
// Function: write_dual_edgecode
static void
write_dual_edgecode(FILE *f, int doflip)   

/* Write in edge_code format.  Always write in next direction,
   and if doflip != 0 also write in prev direction. */
{
    int length, headerlength;
    unsigned char code[MAXF+MAXE+4], mirrorcode[MAXF+MAXE+4];


      if ((ne/2)>UCHAR_MAX) 
	{ fprintf(stderr,
         ">E %s: Output routine write_dual_edgecode not prepared for ",cmdname);
	  fprintf(stderr,"that many edges\n");
	  exit(1);
	}

    compute_dual_edgecode(code,&length,&headerlength);
    if (fwrite(code,sizeof(unsigned char),length,f) != length)
    {
        fprintf(stderr,">E %s: fwrite() failed\n",cmdname);
        perror(">E ");
        exit(1);
    }
    if (doflip)
      { mirror_of_edgecode(mirrorcode, code, 0,length,headerlength);
        if (fwrite(mirrorcode,sizeof(unsigned char),length,f) != length)
	  {
	    fprintf(stderr,">E %s: fwrite() failed\n",cmdname);
	    perror(">E ");
	    exit(1);
	  }
      }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3f8, %rsp            # imm = 0x3F8
movl 0x239887(%rip), %edx    # 0x244614
cmpl $0x200, %edx            # imm = 0x200
jge 0xafca
movl %esi, %ebp
movq %rdi, %r13
movl 0x1b2e8(%rip), %ecx     # 0x2608c
leal 0x2(%rcx), %eax
movl %eax, 0x1b2df(%rip)     # 0x2608c
cmpl $0x752f, %ecx           # imm = 0x752F
jl 0xade3
movl $0x2, 0x1b2cd(%rip)     # 0x2608c
movl $0x30, %eax
leaq 0x239855(%rip), %rcx    # 0x244620
movl $0x0, (%rax,%rcx)
addq $0x40, %rax
cmpq $0x46630, %rax          # imm = 0x46630
jne 0xadcb
movl $0x2, %eax
movl 0x1b29f(%rip), %esi     # 0x26088
movl 0x239821(%rip), %edi    # 0x244610
notl %esi
movl %edx, %r8d
shrl $0x1f, %r8d
addl %edx, %r8d
sarl %r8d
subl %edi, %edx
movl %edx, %ecx
addl %r8d, %ecx
leal (%rdx,%r8), %ebx
incl %ebx
cmpl $0xfe, %ecx
jg 0xae26
leaq 0x1(%rsp), %rdx
movl $0x1, %r14d
movl $0x2, %r9d
jmp 0xae44
leaq 0x4(%rsp), %rdx
movb $0x21, -0x3(%rdx)
movb %bh, 0x2(%rsp)
movb %bl, -0x1(%rdx)
movl $0x4, %r14d
movl $0x5, %r9d
xorl %ebx, %ebx
shrl $0x1f, %esi
movb %bl, (%rsp)
movq 0x2397c7(%rip), %r8     # 0x244618
testq %r8, %r8
jne 0xae5d
movq 0x1cb93(%rip), %r8      # 0x279f0
addl %esi, %edi
addl %r9d, %ecx
leal 0x1(%rax), %r9d
incq %rdx
xorl %esi, %esi
movq %r8, %r10
cmpl %eax, 0x30(%r10)
jge 0xae8c
movq 0x20(%r10), %r11
movl %eax, 0x30(%r11)
movb %sil, -0x1(%rdx)
movzbl %sil, %ebx
movl %ebx, 0x34(%r11)
incl %esi
jmp 0xae94
movb 0x34(%r10), %r11b
movb %r11b, -0x1(%rdx)
movl %r9d, 0x30(%r10)
movq 0x10(%r10), %r10
movq 0x20(%r10), %r10
incq %rdx
cmpq %r8, %r10
jne 0xae6e
movb $-0x1, -0x1(%rdx)
testl %edi, %edi
jle 0xaf66
movl %edi, %edi
xorl %r8d, %r8d
leaq 0x1cd30(%rip), %r9      # 0x27bf0
leaq 0x1cb29(%rip), %r10     # 0x279f0
movl 0x1b1ba(%rip), %r11d    # 0x26088
cmpq %r11, %r8
je 0xaf5a
movl (%r9,%r8,4), %r12d
testl %r12d, %r12d
jle 0xaf5a
leaq (%r10,%r8,8), %r11
xorl %r15d, %r15d
movq (%r11), %r11
cmpl %eax, 0x30(%r11)
jg 0xaf4e
incq %rdx
movq %r11, %r12
cmpl %eax, 0x30(%r12)
jge 0xaf19
movq 0x20(%r12), %rbx
movl %eax, 0x30(%rbx)
movb %sil, -0x1(%rdx)
movzbl %sil, %eax
movq 0x20(%r12), %rbx
movl %eax, 0x34(%rbx)
incl %esi
jmp 0xaf21
movb 0x34(%r12), %al
movb %al, -0x1(%rdx)
movl 0x1b165(%rip), %eax     # 0x2608c
leal 0x1(%rax), %ebx
movl %ebx, 0x30(%r12)
movq 0x10(%r12), %rbx
movq 0x20(%rbx), %r12
incq %rdx
cmpq %r11, %r12
jne 0xaef6
movb $-0x1, -0x1(%rdx)
movl 0x1b142(%rip), %eax     # 0x2608c
movl (%r9,%r8,4), %r12d
incl %r15d
addq $0x18, %r11
cmpl %r12d, %r15d
jl 0xaee7
incq %r8
cmpq %rdi, %r8
jne 0xaec7
movslq %ecx, %r15
movq %rsp, %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r13, %rcx
callq 0x10e0
cmpq %r15, %rax
jne 0xafcf
testl %ebp, %ebp
je 0xafb8
leaq 0x200(%rsp), %r12
movq %rsp, %rsi
movq %r12, %rdi
xorl %edx, %edx
movl %r15d, %ecx
movl %r14d, %r8d
callq 0xba31
movl $0x1, %esi
movq %r12, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x10e0
cmpq %r15, %rax
jne 0xafd4
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2641
callq 0x25d9
callq 0x260d