// File: /workspace/github_c_makefile_star2_O2/mishun[P]plantri/plantri.c
// Function: write_code_as_graph6
static void
write_code_as_graph6(FILE *f, unsigned char code[])

/* Write a graph represented in planar_code to a file in graph6 format.
   The imbedding is lost, loops are lost, and multiple edges are changed
   to one edge.  The vertex numbering is the same.  This does not use any
   global variables and works to 255 vertices. */

{
    unsigned char g6[20+MAXF*(MAXF-1)/12];
    register unsigned char *pin,*pout;
    int n,nlen,bodylen,i,j,org;
    static unsigned char g6bit[] = {32,16,8,4,2,1};

    pin = code;
    n = *pin++;

    if (n <= 62)
    {
        g6[0] = 63 + n;
        nlen = 1;
    }
    else
    {
        g6[0] = 63 + 63;
        g6[1] = 63 + 0;
        g6[2] = 63 + (n >> 6);
        g6[3] = 63 + (n & 0x3F);
        nlen = 4;
    }

    pout = g6 + nlen;
    bodylen = ((n * (n-1)) / 2 + 5) / 6;
    for (i = 0; i < bodylen; ++i) pout[i] = 0;
    pout[bodylen] = '\n';

    for (i = 0, org = -1; i < n; org += i, ++i)
    {
        while ((j = *pin++) != 0)
        {
            if (j <= i)
            {
                j += org;
                pout[j/6] |= g6bit[j%6];
            }
        }
    }

    for (i = 0; i < bodylen; ++i) pout[i] += 63;

    j = nlen + bodylen + 1;
    if (fwrite(g6,sizeof(unsigned char),(size_t)j,f) != j)
    {
        fprintf(stderr,">E %s: fwrite() failed\n",cmdname);
        perror(">E ");
        exit(1);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x518, %rsp            # imm = 0x518
movq %rdi, %rcx
movzbl (%rsi), %r8d
cmpl $0x3e, %r8d
ja 0xa870
pushq $0x1
popq %rdi
leal 0x3f(%r8), %eax
jmp 0xa891
movb $0x3f, 0x1(%rsp)
movl %r8d, %eax
shrb $0x6, %al
addb $0x3f, %al
movb %al, 0x2(%rsp)
movl %r8d, %eax
andb $0x3f, %al
addb $0x3f, %al
movb %al, 0x3(%rsp)
pushq $0x4
popq %rdi
movb $0x7e, %al
incq %rsi
movb %al, (%rsp)
movl %edi, %eax
leaq (%rsp,%rax), %r9
leal -0x1(%r8), %eax
imull %r8d, %eax
pushq $0x2
popq %r10
cltd
idivl %r10d
addl $0x5, %eax
movw $0x6, %r10w
cwtd
idivw %r10w
movswl %ax, %r10d
xorl %eax, %eax
testl %r10d, %r10d
movl $0x0, %r11d
cmovgl %r10d, %r11d
cmpq %rax, %r11
je 0xa8dd
movb $0x0, (%r9,%rax)
incq %rax
jmp 0xa8ce
movslq %r10d, %rax
movb $0xa, (%r9,%rax)
pushq $-0x1
popq %rbx
xorl %ebp, %ebp
pushq $0x6
popq %r14
leaq 0x137df(%rip), %r15     # 0x1e0d4
cmpl %r8d, %ebp
je 0xa924
incq %rsi
movzbl -0x1(%rsi), %eax
testl %eax, %eax
je 0xa91e
cmpl %eax, %ebp
jb 0xa8fa
addl %ebx, %eax
cltd
idivl %r14d
movslq %edx, %rdx
movb (%rdx,%r15), %dl
cltq
orb %dl, (%r9,%rax)
jmp 0xa8fa
addl %ebp, %ebx
incl %ebp
jmp 0xa8f5
xorl %eax, %eax
cmpq %rax, %r11
je 0xa935
addb $0x3f, (%r9,%rax)
incq %rax
jmp 0xa926
leal (%r10,%rdi), %eax
incl %eax
movslq %eax, %rbx
movq %rsp, %rdi
pushq $0x1
popq %rsi
movq %rbx, %rdx
callq 0x10c0
cmpq %rbx, %rax
jne 0xa95f
addq $0x518, %rsp            # imm = 0x518
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x19692(%rip), %rax     # 0x23ff8
movq (%rax), %rdi
movq 0x19740(%rip), %rdx     # 0x240b0
leaq 0x13b6a(%rip), %rsi     # 0x1e4e1
xorl %eax, %eax
callq 0x1050
leaq 0x13af0(%rip), %rdi     # 0x1e475
callq 0x1090
pushq $0x1
popq %rdi
callq 0x10b0