// File: /workspace/github_c_makefile_star2_O2/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 0x2389ab(%rip), %edx    # 0x242604
cmpl $0x200, %edx            # imm = 0x200
jge 0x9e7b
movl %esi, %ebp
movq %rdi, %r13
movl 0x1a40c(%rip), %eax     # 0x2407c
leal 0x2(%rax), %r9d
movl %r9d, 0x1a401(%rip)     # 0x2407c
cmpl $0x752f, %eax           # imm = 0x752F
jl 0x9cac
movl $0x2, 0x1a3f0(%rip)     # 0x2407c
pushq $0x30
popq %rax
pushq $0x2
popq %r9
leaq 0x238976(%rip), %rcx    # 0x242610
cmpq $0x46630, %rax          # imm = 0x46630
je 0x9cac
andl $0x0, (%rax,%rcx)
addq $0x40, %rax
jmp 0x9c9a
movl 0x1a3c6(%rip), %esi     # 0x24078
movl 0x238948(%rip), %eax    # 0x242600
notl %esi
leal (%rax,%rdx), %ecx
leal (%rax,%rdx), %ebx
decl %ebx
cmpl $0x100, %ecx            # imm = 0x100
jg 0x9cd5
pushq $0x1
popq %r14
leaq 0x1(%rsp), %rdx
jmp 0x9cee
leaq 0x4(%rsp), %rdx
movb $0x21, -0x3(%rdx)
movb %bh, 0x2(%rsp)
movb %bl, -0x1(%rdx)
addl $0x3, %ecx
pushq $0x4
popq %r14
xorl %ebx, %ebx
shrl $0x1f, %esi
movb %bl, (%rsp)
movq 0x23890d(%rip), %r10    # 0x242608
testq %r10, %r10
jne 0x9d07
movq 0x1bcd9(%rip), %r10     # 0x259e0
addl %esi, %eax
pushq $0x1
popq %r11
movslq (%r10), %r15
movq 0x20(%r10), %rsi
movl %r9d, 0x30(%rsi)
movb $0x0, (%rdx)
andl $0x0, 0x34(%rsi)
movl %r15d, %esi
addq $0x2, %rdx
leaq 0x1beb3(%rip), %rdi     # 0x25be0
movl %r11d, %r8d
cmpl (%rdi,%r15,4), %r11d
jge 0x9d68
movq 0x18(%r10), %r10
cmpl %r9d, 0x30(%r10)
jge 0x9d59
movq 0x20(%r10), %rbx
movl %r9d, 0x30(%rbx)
movb %r8b, -0x1(%rdx)
movzbl %r8b, %r12d
movl %r12d, 0x34(%rbx)
incl %r8d
jmp 0x9d60
movb 0x34(%r10), %bl
movb %bl, -0x1(%rdx)
incl %r11d
incq %rdx
jmp 0x9d30
movb $-0x1, -0x1(%rdx)
xorl %r9d, %r9d
testl %eax, %eax
cmovlel %r9d, %eax
leaq 0x1bc64(%rip), %r10     # 0x259e0
cmpq %rax, %r9
je 0x9de3
cmpq %rsi, %r9
je 0x9dde
movl 0x1a2eb(%rip), %r11d    # 0x24078
cmpq %r11, %r9
je 0x9dde
leaq (%r10,%r9,8), %r11
incq %rdx
xorl %r15d, %r15d
cmpl (%rdi,%r9,4), %r15d
jge 0x9dda
movq (%r11), %r11
movl 0x1a2d1(%rip), %ebx     # 0x2407c
cmpl %ebx, 0x30(%r11)
jge 0x9dc7
movq 0x20(%r11), %r12
movl %ebx, 0x30(%r12)
movl %r8d, 0x34(%r12)
movl %r8d, %ebx
incl %r8d
jmp 0x9dcb
movl 0x34(%r11), %ebx
movb %bl, -0x1(%rdx)
incl %r15d
addq $0x18, %r11
incq %rdx
jmp 0x9d9c
movb $-0x1, -0x1(%rdx)
incq %r9
jmp 0x9d7c
movslq %ecx, %r15
movq %rsp, %rdi
pushq $0x1
popq %rsi
movq %r15, %rdx
movq %r13, %rcx
callq 0x10c0
cmpq %r15, %rax
jne 0x9e4e
testl %ebp, %ebp
je 0x9e3c
xorl %edx, %edx
cmpq $0x0, 0x2387fe(%rip)    # 0x242608
setne %dl
leaq 0x1c0(%rsp), %r12
movq %rsp, %rsi
movq %r12, %rdi
movl %r15d, %ecx
movl %r14d, %r8d
callq 0xab77
pushq $0x1
popq %rsi
movq %r12, %rdi
movq %r15, %rdx
movq %r13, %rcx
callq 0x10c0
cmpq %r15, %rax
jne 0x9e4e
addq $0x378, %rsp            # imm = 0x378
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1a1a3(%rip), %rax     # 0x23ff8
movq (%rax), %rdi
movq 0x1a251(%rip), %rdx     # 0x240b0
leaq 0x1467b(%rip), %rsi     # 0x1e4e1
xorl %eax, %eax
callq 0x1050
leaq 0x14601(%rip), %rdi     # 0x1e475
callq 0x1090
jmp 0x9eaf
movq 0x1a176(%rip), %rbx     # 0x23ff8
movq (%rbx), %rdi
movq 0x1a224(%rip), %rdx     # 0x240b0
leaq 0x14666(%rip), %rsi     # 0x1e4f9
xorl %eax, %eax
callq 0x1050
movq (%rbx), %rcx
leaq 0x1468c(%rip), %rdi     # 0x1e530
pushq $0x10
popq %rsi
pushq $0x1
popq %rdx
callq 0x10c0
pushq $0x1
popq %rdi
callq 0x10b0