// File: /workspace/github_c_makefile_star2_O1/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 0x6ee5
movq %rsi, %r13
movl (%rsi), %eax
cmpq $0x8, %rax
ja 0x6ee5
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x29055(%rip), %rcx     # 0x2fe64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%r13), %r8
leaq 0x29347(%rip), %rsi     # 0x3016a
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
jmp 0x6e60
movq 0x20(%r13), %rbp
cmpq $0x80, %rbp
jae 0x6f79
leaq 0x293cf(%rip), %rsi     # 0x3021c
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x4240
movl $0x1, %r12d
jmp 0x7024
movq 0x20(%r13), %r8
leaq 0x2932a(%rip), %rsi     # 0x301a0
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
movl $0x4, %r12d
jmp 0x7024
movq 0x20(%r13), %r8
leaq 0x2931f(%rip), %rsi     # 0x301bb
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
jmp 0x6f47
cmpq $0x0, 0x20(%r13)
je 0x6ee5
xorl %r12d, %r12d
xorl %ebp, %ebp
movq 0x28(%r13), %rax
movq (%rax,%rbp,8), %rsi
leaq (%r12,%rbx), %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x6ddc
addq %rax, %r12
incq %rbp
cmpq 0x20(%r13), %rbp
jb 0x6ebd
jmp 0x7024
xorl %r12d, %r12d
jmp 0x7024
movq 0x20(%r13), %r8
leaq 0x2928d(%rip), %rsi     # 0x30185
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
movl $0x2, %r12d
jmp 0x7024
cmpb $0x0, 0x28(%r13)
jne 0x6f28
movq 0x20(%r13), %r8
cmpb $0x2e, (%r8)
jne 0x7036
movq 0x20(%r13), %r8
movq 0x30(%r13), %r9
leaq 0x2929f(%rip), %rsi     # 0x301d6
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
movl $0x8, %r12d
jmp 0x7024
movq 0x20(%r13), %r12
movq 0x28(%r13), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %r8
callq 0x7046
jmp 0x7024
movq 0x20(%r13), %r12
jmp 0x7024
movl $0x1, %r12d
movl $0x7, %ecx
movq %rbp, %rax
shrq %cl, %rax
testq %rax, %rax
je 0x6fa2
incq %r12
addq $0x7, %rcx
cmpq $0x8, %r12
jne 0x6f84
movl $0x8, %r12d
movb $0x9, %cl
subb %r12b, %cl
movq $-0x1, %rax
shlq %cl, %rax
movq $-0x1, %rdx
movb $0x8, %r13b
subb %r12b, %r13b
movl %r13d, %ecx
shlq %cl, %rdx
notl %edx
andl %ebp, %edx
orl %edx, %eax
movzbl %al, %r8d
leaq 0x2926a(%rip), %rsi     # 0x3023f
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
movl %r13d, %ecx
shrq %cl, %rbp
testq %rbp, %rbp
je 0x7024
incq %rbx
movq %rbp, %r13
movzbl %bpl, %r8d
movq %r15, %rdi
leaq 0x2925c(%rip), %rsi     # 0x30260
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
shrq $0x8, %r13
incq %rbx
cmpq $0x100, %rbp            # imm = 0x100
movq %r13, %rbp
jae 0x6ff6
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%r13), %r9
leaq 0x291b7(%rip), %rsi     # 0x301f8
jmp 0x6f37