// File: /workspace/github_c_makefile_star2_O1/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 0x23993f(%rip), %ecx    # 0x244614
cmpl $0x200, %ecx            # imm = 0x200
jge 0xaf06
movl %esi, %ebp
movq %rdi, %r13
movl 0x1b3a8(%rip), %eax     # 0x26094
leal 0x2(%rax), %edx
movl %edx, 0x1b39f(%rip)     # 0x26094
cmpl $0x752f, %eax           # imm = 0x752F
jl 0xad25
movl $0x2, 0x1b38e(%rip)     # 0x26094
movl $0x30, %eax
leaq 0x23990e(%rip), %rdx    # 0x244620
movl $0x0, (%rax,%rdx)
addq $0x40, %rax
cmpq $0x46630, %rax          # imm = 0x46630
jne 0xad12
movl 0x1b365(%rip), %edx     # 0x26090
movl 0x2398df(%rip), %esi    # 0x244610
notl %edx
movl %ecx, %edi
shrl $0x1f, %edi
addl %ecx, %edi
sarl %edi
subl %esi, %ecx
movl %ecx, %eax
addl %edi, %eax
leal (%rcx,%rdi), %ebx
incl %ebx
cmpl $0xfe, %eax
jg 0xad64
leaq 0x1(%rsp), %rcx
movb %bl, -0x1(%rcx)
movl $0x1, %r14d
movl $0x2, %r8d
jmp 0xad82
leaq 0x4(%rsp), %rcx
movw $0x2100, -0x4(%rcx)     # imm = 0x2100
movb %bh, 0x2(%rsp)
movb %bl, -0x1(%rcx)
movl $0x4, %r14d
movl $0x5, %r8d
shrl $0x1f, %edx
movq 0x23988c(%rip), %rdi    # 0x244618
testq %rdi, %rdi
jne 0xad98
movq 0x1cc58(%rip), %rdi     # 0x279f0
addl %edx, %esi
addl %r8d, %eax
movl 0x1b2f0(%rip), %r8d     # 0x26094
leal 0x1(%r8), %r9d
incq %rcx
xorl %edx, %edx
movq %rdi, %r10
cmpl %r8d, 0x30(%r10)
jge 0xadd1
movq 0x20(%r10), %r11
movl %r8d, 0x30(%r11)
movb %dl, -0x1(%rcx)
movzbl %dl, %r11d
movq 0x20(%r10), %rbx
movl %r11d, 0x34(%rbx)
incl %edx
jmp 0xadd9
movb 0x34(%r10), %r11b
movb %r11b, -0x1(%rcx)
movl %r9d, 0x30(%r10)
movq 0x10(%r10), %r10
movq 0x20(%r10), %r10
incq %rcx
cmpq %rdi, %r10
jne 0xadb0
movb $-0x1, -0x1(%rcx)
testl %esi, %esi
jle 0xaea2
movl %esi, %esi
xorl %edi, %edi
leaq 0x1cdec(%rip), %r8      # 0x27bf0
leaq 0x1cbe5(%rip), %r9      # 0x279f0
movl 0x1b27e(%rip), %r10d    # 0x26090
cmpq %r10, %rdi
je 0xae96
cmpl $0x0, (%r8,%rdi,4)
jle 0xae96
leaq (%r9,%rdi,8), %r10
xorl %r11d, %r11d
movq (%r10), %r10
movl 0x30(%r10), %ebx
cmpl 0x1b262(%rip), %ebx     # 0x26094
jg 0xae89
incq %rcx
movq %r10, %r15
movl 0x1b254(%rip), %ebx     # 0x26094
cmpl %ebx, 0x30(%r15)
jge 0xae62
movq 0x20(%r15), %r12
movl %ebx, 0x30(%r12)
movb %dl, -0x1(%rcx)
movzbl %dl, %ebx
movq 0x20(%r15), %r12
movl %ebx, 0x34(%r12)
incl %edx
jmp 0xae69
movb 0x34(%r15), %bl
movb %bl, -0x1(%rcx)
movl 0x1b225(%rip), %ebx     # 0x26094
incl %ebx
movl %ebx, 0x30(%r15)
movq 0x10(%r15), %rbx
movq 0x20(%rbx), %r15
incq %rcx
cmpq %r10, %r15
jne 0xae3a
movb $-0x1, -0x1(%rcx)
incl %r11d
addq $0x18, %r10
cmpl (%r8,%rdi,4), %r11d
jl 0xae25
incq %rdi
cmpq %rsi, %rdi
jne 0xae0b
movslq %eax, %r15
movq %rsp, %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r13, %rcx
callq 0x10f0
cmpq %r15, %rax
jne 0xaf0b
testl %ebp, %ebp
je 0xaef4
leaq 0x200(%rsp), %r12
movq %rsp, %rsi
movq %r12, %rdi
xorl %edx, %edx
movl %r15d, %ecx
movl %r14d, %r8d
callq 0xb98c
movl $0x1, %esi
movq %r12, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x10f0
cmpq %r15, %rax
jne 0xaf10
addq $0x3f8, %rsp            # imm = 0x3F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x26bd
callq 0x2655
callq 0x2689