// File: /workspace/github_c_makefile_star2_O1/lh3[P]minigraph/gfa-io.c
// Function: gfa_aux_format
int gfa_aux_format(int l_aux, const uint8_t *aux, char **t, int *max)
{
	kstring_t str;
	const uint8_t *s = aux;
	str.l = 0, str.s = *t, str.m = *max;
	while (s < aux + l_aux) {
		uint8_t type, key[2];
		key[0] = s[0]; key[1] = s[1];
		s += 2; type = *s++;
		kputc('\t', &str); kputsn((char*)key, 2, &str); kputc(':', &str);
		if (type == 'A') { kputsn("A:", 2, &str); kputc(*s, &str); ++s; }
		else if (type == 'i') { kputsn("i:", 2, &str); kputw(*(int32_t*)s, &str); s += 4; }
		else if (type == 'f') { ksprintf(&str, "f:%g", *(float*)s); s += 4; }
		else if (type == 'Z') { kputc(type, &str); kputc(':', &str); while (*s) kputc(*s++, &str); ++s; }
		else if (type == 'B') {
			uint8_t sub_type = *(s++);
			int32_t i, n;
			memcpy(&n, s, 4);
			s += 4; // no point to the start of the array
			kputsn("B:", 2, &str); kputc(sub_type, &str); // write the typing
			for (i = 0; i < n; ++i) { // FIXME: for better performance, put the loop after "if"
				kputc(',', &str);
				if ('c' == sub_type)      { kputw(*(int8_t*)s, &str); ++s; }
				else if ('C' == sub_type) { kputw(*(uint8_t*)s, &str); ++s; }
				else if ('s' == sub_type) { kputw(*(int16_t*)s, &str); s += 2; }
				else if ('S' == sub_type) { kputw(*(uint16_t*)s, &str); s += 2; }
				else if ('i' == sub_type) { kputw(*(int32_t*)s, &str); s += 4; }
				else if ('I' == sub_type) { kputuw(*(uint32_t*)s, &str); s += 4; }
				else if ('f' == sub_type) { ksprintf(&str, "%g", *(float*)s); s += 4; }
			}
		}
	}
	*t = str.s, *max = str.m;
	return str.l;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq $0x0, (%rsp)
movq %rdx, 0x18(%rsp)
movq (%rdx), %rax
movq %rax, 0x10(%rsp)
movq %rcx, 0x20(%rsp)
movslq (%rcx), %rax
movq %rax, 0x8(%rsp)
testl %edi, %edi
jle 0x795f
movq %rsi, %r14
movslq %edi, %rax
addq %rsi, %rax
movq %rax, 0x28(%rsp)
movl $0xcccccccd, %ebx       # imm = 0xCCCCCCCD
movb (%r14), %bpl
movb 0x1(%r14), %r12b
movzbl 0x2(%r14), %r15d
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x7163
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb $0x9, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq (%rsp), %rax
addq $0x3, %rax
cmpq 0x8(%rsp), %rax
jb 0x71dc
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb %bpl, (%rcx,%rax)
movb %r12b, 0x1(%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, (%rsp)
movb $0x0, 0x2(%rcx,%rax)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x725a
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
leaq 0x3(%r14), %rbp
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb $0x3a, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
cmpl $0x59, %r15d
jle 0x7335
cmpl $0x5a, %r15d
je 0x76bb
cmpl $0x66, %r15d
je 0x782f
cmpl $0x69, %r15d
jne 0x7951
movq (%rsp), %rax
addq $0x3, %rax
cmpq 0x8(%rsp), %rax
jb 0x72ff
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movw $0x3a69, (%rcx,%rax)    # imm = 0x3A69
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, (%rsp)
movb $0x0, 0x2(%rcx,%rax)
movl 0x3(%r14), %edi
movq %rsp, %rsi
callq 0x7989
jmp 0x7849
cmpl $0x41, %r15d
je 0x7852
cmpl $0x42, %r15d
jne 0x7951
movb 0x3(%r14), %bpl
movl 0x4(%r14), %r12d
movq (%rsp), %rax
addq $0x3, %rax
cmpq 0x8(%rsp), %rax
jb 0x73a8
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movw $0x3a42, (%rcx,%rax)    # imm = 0x3A42
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, (%rsp)
movb $0x0, 0x2(%rcx,%rax)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x7423
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
addq $0x8, %r14
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb %bpl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
testl %r12d, %r12d
jle 0x794e
movzbl %bpl, %r13d
xorl %r15d, %r15d
movq %r14, %rbp
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x74b2
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb $0x2c, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
cmpl $0x62, %r13d
jle 0x750e
cmpl $0x68, %r13d
jg 0x752a
cmpl $0x63, %r13d
je 0x7555
cmpl $0x66, %r13d
jne 0x76aa
xorps %xmm0, %xmm0
cvtss2sd (%rbp), %xmm0
movq %rsp, %rdi
leaq 0x20f3c(%rip), %rsi     # 0x2843e
movb $0x1, %al
callq 0x7add
jmp 0x76a6
cmpl $0x43, %r13d
je 0x754f
cmpl $0x49, %r13d
je 0x7579
cmpl $0x53, %r13d
jne 0x76aa
movzwl (%rbp), %edi
jmp 0x753e
cmpl $0x69, %r13d
je 0x7569
cmpl $0x73, %r13d
jne 0x76aa
movswl (%rbp), %edi
movq %rsp, %rsi
callq 0x7989
addq $0x2, %rbp
jmp 0x76aa
movzbl (%rbp), %edi
jmp 0x7559
movsbl (%rbp), %edi
movq %rsp, %rsi
callq 0x7989
incq %rbp
jmp 0x76aa
movl (%rbp), %edi
movq %rsp, %rsi
callq 0x7989
jmp 0x76a6
movl (%rbp), %eax
testl %eax, %eax
je 0x762f
xorl %ecx, %ecx
movq %rcx, %r14
movl %eax, %edx
imulq %rbx, %rdx
shrq $0x23, %rdx
leal (%rdx,%rdx), %ecx
leal (%rcx,%rcx,4), %ecx
movl %eax, %esi
subl %ecx, %esi
orb $0x30, %sil
leaq 0x1(%r14), %rcx
movb %sil, 0x30(%rsp,%r14)
cmpl $0x9, %eax
movl %edx, %eax
ja 0x7586
incl %ecx
addq (%rsp), %rcx
cmpq 0x8(%rsp), %rcx
jb 0x7606
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movl %r14d, %eax
movb 0x30(%rsp,%rax), %al
movq (%rsp), %rcx
movq 0x10(%rsp), %rdx
leaq 0x1(%rcx), %rsi
movq %rsi, (%rsp)
movb %al, (%rdx,%rcx)
decq %r14
leal 0x2(%r14), %eax
cmpl $0x1, %eax
jg 0x7606
jmp 0x769a
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x7685
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb $0x30, (%rcx,%rax)
movq 0x10(%rsp), %rax
addq (%rsp), %rax
movb $0x0, (%rax)
addq $0x4, %rbp
incl %r15d
cmpl %r12d, %r15d
jne 0x745c
jmp 0x7951
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x7711
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb $0x5a, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x7789
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb $0x3a, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
movb (%rbp), %r14b
testb %r14b, %r14b
je 0x7827
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x780a
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
incq %rbp
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb %r14b, (%rcx,%rax)
jmp 0x779e
incq %rbp
jmp 0x7951
xorps %xmm0, %xmm0
cvtss2sd 0x3(%r14), %xmm0
movq %rsp, %rdi
leaq 0x20bfa(%rip), %rsi     # 0x2843c
movb $0x1, %al
callq 0x7add
addq $0x7, %r14
jmp 0x794e
movq (%rsp), %rax
addq $0x3, %rax
cmpq 0x8(%rsp), %rax
jb 0x78a9
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movw $0x3a41, (%rcx,%rax)    # imm = 0x3A41
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x2(%rax), %rdx
movq %rdx, (%rsp)
movb $0x0, 0x2(%rcx,%rax)
movb (%rbp), %bpl
movq (%rsp), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0x7928
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x22b0
movq %rax, 0x10(%rsp)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, (%rsp)
movb %bpl, (%rcx,%rax)
movq (%rsp), %rax
movq 0x10(%rsp), %rcx
movb $0x0, (%rcx,%rax)
addq $0x4, %r14
movq %r14, %rbp
movq %rbp, %r14
cmpq 0x28(%rsp), %rbp
jb 0x7101
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq %rax, (%rcx)
movl 0x8(%rsp), %eax
movq 0x20(%rsp), %rcx
movl %eax, (%rcx)
movl (%rsp), %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq