// File: /workspace/github_c_makefile_star2_O2/oridb[P]mc/6/genp9.c
// Function: writeblob
static size_t
writeblob(FILE *fd, Blob *b, size_t off, char *lbl)
{
	size_t i, n;

	n = 0;
	if (!b)
		return 0;
	switch (b->type) {
	case Bti8:
		fprintf(fd, "\tDATA %s+%llu(SB)/1,$%lld\n", lbl, (uvlong)off+n, b->ival);
		n += 1;
		break;
	case Bti16:
		fprintf(fd, "\tDATA %s+%llu(SB)/2,$%lld\n", lbl, (uvlong)off+n, b->ival);
		n += 2;
		break;
	case Bti32:
		fprintf(fd, "\tDATA %s+%llu(SB)/4,$%lld\n", lbl, (uvlong)off+n, b->ival);
		n += 4;
		break;
	case Bti64:
		fprintf(fd, "\tDATA %s+%llu(SB)/8,$%lld\n", lbl, (uvlong)off+n, (vlong)b->ival);
		n += 8;
		break;
	case Btimin:
		n += encodemin(fd, b->ival, off+n, lbl);
		break;
	case Btref:
		if (b->ref.isextern || b->ref.str[0] == '.')
			fprintf(fd, "\tDATA %s+%llu(SB)/8,$%s+%llu(SB)\n",
					lbl, (uvlong)off+n, b->ref.str, (uvlong)b->ref.off);
		else
			fprintf(fd, "\tDATA %s+%llu(SB)/8,$%s<>+%llu(SB)\n",
					lbl, (uvlong)off+n, b->ref.str, (uvlong)b->ref.off);
		n += 8;
		break;
	case Btbytes:
		n += writebytes(fd, lbl, off+n, b->bytes.buf, b->bytes.len);
		break;
	case Btseq:
		for (i = 0; i < b->seq.nsub; i++)
			n += writeblob(fd, b->seq.sub[i], off+n, lbl);
		break;
	case Btpad:
		n += b->npad;
		break;
	}
	return n;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rsi, %rsi
je 0x65ff
movq %rsi, %r13
movl (%rsi), %eax
cmpq $0x8, %rax
ja 0x65ff
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x2588b(%rip), %rcx     # 0x2be64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%r13), %r8
leaq 0x25b7d(%rip), %rsi     # 0x2c16a
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
jmp 0x6632
xorl %r12d, %r12d
jmp 0x66f5
movq 0x20(%r13), %r13
cmpq $0x80, %r13
jae 0x6728
leaq 0x25bfd(%rip), %rsi     # 0x2c21c
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movl %r13d, %r8d
xorl %eax, %eax
callq 0x4240
pushq $0x1
jmp 0x66f3
movq 0x20(%r13), %r8
leaq 0x25b5c(%rip), %rsi     # 0x2c1a0
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
pushq $0x4
jmp 0x66f3
movq 0x20(%r13), %r8
leaq 0x25b55(%rip), %rsi     # 0x2c1bb
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
jmp 0x66f1
xorl %ebp, %ebp
xorl %r12d, %r12d
cmpq 0x20(%r13), %rbp
jae 0x66f5
movq 0x28(%r13), %rax
movq (%rax,%rbp,8), %rsi
leaq (%r12,%rbx), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x65ae
addq %rax, %r12
incq %rbp
jmp 0x667d
movq 0x20(%r13), %r8
leaq 0x25ad8(%rip), %rsi     # 0x2c185
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
pushq $0x2
jmp 0x66f3
cmpb $0x0, 0x28(%r13)
movq 0x20(%r13), %r8
jne 0x66d6
cmpb $0x2e, (%r8)
jne 0x67bd
movq 0x30(%r13), %r9
leaq 0x25af5(%rip), %rsi     # 0x2c1d6
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
pushq $0x8
popq %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%r13), %r12
movq 0x28(%r13), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %r8
callq 0x67cd
jmp 0x66f5
movq 0x20(%r13), %r12
jmp 0x66f5
pushq $0x1
popq %r12
pushq $0x7
popq %rcx
movq %rcx, %rbp
movq %rcx, %rax
subq $0x1, %rax
jb 0x6752
movq %r13, %rdx
shrq %cl, %rdx
testq %rdx, %rdx
je 0x6752
incq %r12
addq $0x7, %rcx
movq %rax, %rbp
jmp 0x6735
leal 0x1(%rbp), %ecx
pushq $-0x1
popq %rax
movq %rax, %rdx
shlq %cl, %rdx
movl %ebp, %ecx
shlq %cl, %rax
notl %eax
andl %r13d, %eax
orl %eax, %edx
movzbl %dl, %r8d
leaq 0x25aca(%rip), %rsi     # 0x2c23f
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
movl %ebp, %ecx
shrq %cl, %r13
incq %rbx
leaq 0x25acc(%rip), %rbp     # 0x2c260
testq %r13, %r13
je 0x66f5
movzbl %r13b, %r8d
movq %r15, %rdi
movq %rbp, %rsi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
shrq $0x8, %r13
incq %rbx
jmp 0x6794
movq 0x30(%r13), %r9
leaq 0x25a30(%rip), %rsi     # 0x2c1f8
jmp 0x66e1