// File: /workspace/github_c_makefile_star2_O3/mishun[P]plantri/plantri.c
// Function: write_edgecode
static void
write_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[MAXN+MAXE+4]; 
    unsigned char mirrorcode[MAXN+MAXE+4];


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

    compute_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, (code_edge!=NULL), 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 $0x378, %rsp            # imm = 0x378
movl %esi, %ebp
movl 0x239acf(%rip), %esi    # 0x244614
cmpl $0x200, %esi            # imm = 0x200
jge 0xad67
movq %rdi, %r13
movl 0x1b532(%rip), %eax     # 0x2608c
leal 0x2(%rax), %r9d
movl %r9d, 0x1b527(%rip)     # 0x2608c
cmpl $0x752f, %eax           # imm = 0x752F
jl 0xab9b
movl $0x2, 0x1b516(%rip)     # 0x2608c
movl $0x30, %eax
leaq 0x239a9e(%rip), %rcx    # 0x244620
movl $0x0, (%rax,%rcx)
addq $0x40, %rax
cmpq $0x46630, %rax          # imm = 0x46630
jne 0xab82
movl $0x2, %r9d
movl 0x1b4e7(%rip), %edx     # 0x26088
movl 0x239a68(%rip), %r8d    # 0x244610
movl %edx, %ecx
notl %ecx
leal (%r8,%rsi), %eax
leal (%r8,%rsi), %ebx
decl %ebx
cmpl $0x100, %eax            # imm = 0x100
jg 0xabca
movl $0x1, %r14d
leaq 0x1(%rsp), %rdi
jmp 0xabe5
leaq 0x4(%rsp), %rdi
movb $0x21, -0x3(%rdi)
movb %bh, 0x2(%rsp)
movb %bl, -0x1(%rdi)
addl $0x3, %eax
movl $0x4, %r14d
xorl %ebx, %ebx
shrl $0x1f, %ecx
movb %bl, (%rsp)
movq 0x239a26(%rip), %r11    # 0x244618
testq %r11, %r11
jne 0xabfe
movq 0x1cdf2(%rip), %r11     # 0x279f0
addl %ecx, %r8d
movslq (%r11), %r10
movq 0x20(%r11), %rcx
movl %r9d, 0x30(%rcx)
movb $0x0, (%rdi)
movl $0x0, 0x34(%rcx)
leaq 0x1cfd3(%rip), %rcx     # 0x27bf0
leaq 0x1(%rdi), %r15
movl (%rcx,%r10,4), %r12d
movl $0x1, %esi
cmpl $0x2, %r12d
jl 0xac74
movl $0x1, %esi
movl $0x1, %edi
movq 0x18(%r11), %r11
cmpl %r9d, 0x30(%r11)
jge 0xac5f
movq 0x20(%r11), %rbx
movl %r9d, 0x30(%rbx)
movb %sil, (%r15)
movzbl %sil, %r12d
movl %r12d, 0x34(%rbx)
incl %esi
movl (%rcx,%r10,4), %r12d
jmp 0xac66
movb 0x34(%r11), %bl
movb %bl, (%r15)
incl %edi
incq %r15
cmpl %r12d, %edi
jl 0xac3a
leaq -0x1(%r15), %rdi
movb $-0x1, (%r15)
testl %r8d, %r8d
jle 0xacf8
movl %r10d, %r9d
addq $0x2, %rdi
movl %r8d, %r8d
xorl %r10d, %r10d
leaq 0x1cd5f(%rip), %r11     # 0x279f0
cmpq %r9, %r10
je 0xacf0
movl %edx, %ebx
cmpq %rbx, %r10
je 0xacf0
cmpl $0x0, (%rcx,%r10,4)
jle 0xace4
leaq (%r11,%r10,8), %r15
xorl %edx, %edx
movq (%r15), %r15
movl 0x1b3d9(%rip), %ebx     # 0x2608c
cmpl %ebx, 0x30(%r15)
jge 0xaccd
movq 0x20(%r15), %r12
movl %ebx, 0x30(%r12)
movl %esi, 0x34(%r12)
movl %esi, %ebx
incl %esi
jmp 0xacd1
movl 0x34(%r15), %ebx
movb %bl, (%rdi,%rdx)
addq $0x18, %r15
incq %rdx
cmpl (%rcx,%r10,4), %edx
jl 0xacaa
addq %rdx, %rdi
movb $-0x1, (%rdi)
incq %rdi
movl 0x1b398(%rip), %edx     # 0x26088
incq %r10
cmpq %r8, %r10
jne 0xac91
movslq %eax, %r15
movq %rsp, %rdi
movl $0x1, %esi
movq %r15, %rdx
movq %r13, %rcx
callq 0x10e0
cmpq %r15, %rax
jne 0xad6c
testl %ebp, %ebp
je 0xad55
xorl %edx, %edx
cmpq $0x0, 0x2398f7(%rip)    # 0x244618
setne %dl
leaq 0x1c0(%rsp), %r12
movq %rsp, %rsi
movq %r12, %rdi
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 0xad71
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x259c
callq 0x2534
callq 0x2568