// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x550, %rsp            # imm = 0x550
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x528(%rbp)
movq -0x528(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x528(%rbp)
movzbl (%rax), %eax
movl %eax, -0x534(%rbp)
cmpl $0x3e, -0x534(%rbp)
jg 0xb820
movl -0x534(%rbp), %eax
addl $0x3f, %eax
movb %al, -0x520(%rbp)
movl $0x1, -0x538(%rbp)
jmp 0xb85c
movb $0x7e, -0x520(%rbp)
movb $0x3f, -0x51f(%rbp)
movl -0x534(%rbp), %eax
sarl $0x6, %eax
addl $0x3f, %eax
movb %al, -0x51e(%rbp)
movl -0x534(%rbp), %eax
andl $0x3f, %eax
addl $0x3f, %eax
movb %al, -0x51d(%rbp)
movl $0x4, -0x538(%rbp)
leaq -0x520(%rbp), %rax
movslq -0x538(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x530(%rbp)
movl -0x534(%rbp), %eax
movl -0x534(%rbp), %ecx
subl $0x1, %ecx
imull %ecx, %eax
movl $0x2, %ecx
cltd
idivl %ecx
addl $0x5, %eax
movl $0x6, %ecx
cltd
idivl %ecx
movl %eax, -0x53c(%rbp)
movl $0x0, -0x540(%rbp)
movl -0x540(%rbp), %eax
cmpl -0x53c(%rbp), %eax
jge 0xb8da
movq -0x530(%rbp), %rax
movslq -0x540(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x540(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x540(%rbp)
jmp 0xb8a9
movq -0x530(%rbp), %rax
movslq -0x53c(%rbp), %rcx
movb $0xa, (%rax,%rcx)
movl $0x0, -0x540(%rbp)
movl $0xffffffff, -0x548(%rbp) # imm = 0xFFFFFFFF
movl -0x540(%rbp), %eax
cmpl -0x534(%rbp), %eax
jge 0xb9d1
jmp 0xb914
movq -0x528(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x528(%rbp)
movzbl (%rax), %eax
movl %eax, -0x544(%rbp)
cmpl $0x0, %eax
je 0xb9a9
movl -0x544(%rbp), %eax
cmpl -0x540(%rbp), %eax
jg 0xb9a4
movl -0x548(%rbp), %eax
addl -0x544(%rbp), %eax
movl %eax, -0x544(%rbp)
movl -0x544(%rbp), %eax
movl $0x6, %ecx
cltd
idivl %ecx
movslq %edx, %rcx
leaq 0x30719(%rip), %rax     # 0x3c088
movzbl (%rax,%rcx), %esi
movq -0x530(%rbp), %rax
movq %rax, -0x550(%rbp)
movl -0x544(%rbp), %eax
movl $0x6, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x550(%rbp), %rax
movslq %ecx, %rcx
movzbl (%rax,%rcx), %edx
orl %esi, %edx
movb %dl, (%rax,%rcx)
jmp 0xb914
jmp 0xb9ab
movl -0x540(%rbp), %eax
addl -0x548(%rbp), %eax
movl %eax, -0x548(%rbp)
movl -0x540(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x540(%rbp)
jmp 0xb900
movl $0x0, -0x540(%rbp)
movl -0x540(%rbp), %eax
cmpl -0x53c(%rbp), %eax
jge 0xba12
movq -0x530(%rbp), %rax
movslq -0x540(%rbp), %rcx
movzbl (%rax,%rcx), %edx
addl $0x3f, %edx
movb %dl, (%rax,%rcx)
movl -0x540(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x540(%rbp)
jmp 0xb9db
movl -0x538(%rbp), %eax
addl -0x53c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x544(%rbp)
leaq -0x520(%rbp), %rdi
movslq -0x544(%rbp), %rdx
movq -0x8(%rbp), %rcx
movl $0x1, %esi
callq 0x10d0
movslq -0x544(%rbp), %rcx
cmpq %rcx, %rax
je 0xba84
movq 0x305a2(%rip), %rax     # 0x3bff8
movq (%rax), %rdi
movq 0x30660(%rip), %rdx     # 0x3c0c0
leaq 0x2c9a9(%rip), %rsi     # 0x38410
movb $0x0, %al
callq 0x1060
leaq 0x2c92f(%rip), %rdi     # 0x383a4
callq 0x10a0
movl $0x1, %edi
callq 0x10c0
addq $0x550, %rsp            # imm = 0x550
popq %rbp
retq
nopl (%rax)