// File: /workspace/github_c_makefile_star2_O3/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 0x6e1f
movq %rsi, %r13
movl (%rsi), %eax
cmpq $0x8, %rax
ja 0x6e1f
movq %rcx, %r14
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x2911b(%rip), %rcx     # 0x2fe64
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%r13), %r8
leaq 0x2940d(%rip), %rsi     # 0x3016a
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
jmp 0x6d9a
movq 0x20(%r13), %rbp
cmpq $0x80, %rbp
jae 0x6eaf
leaq 0x29495(%rip), %rsi     # 0x3021c
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
movl %ebp, %r8d
xorl %eax, %eax
callq 0x4240
movl $0x1, %r12d
jmp 0x6f5a
movq 0x20(%r13), %r8
leaq 0x293f0(%rip), %rsi     # 0x301a0
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
movl $0x4, %r12d
jmp 0x6f5a
movq 0x20(%r13), %r8
leaq 0x293e5(%rip), %rsi     # 0x301bb
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
jmp 0x6e7d
cmpq $0x0, 0x20(%r13)
je 0x6e1f
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 0x6d16
addq %rax, %r12
incq %rbp
cmpq 0x20(%r13), %rbp
jb 0x6df7
jmp 0x6f5a
xorl %r12d, %r12d
jmp 0x6f5a
movq 0x20(%r13), %r8
leaq 0x29353(%rip), %rsi     # 0x30185
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
movl $0x2, %r12d
jmp 0x6f5a
cmpb $0x0, 0x28(%r13)
movq 0x20(%r13), %r8
jne 0x6e62
cmpb $0x2e, (%r8)
jne 0x6f6c
movq 0x30(%r13), %r9
leaq 0x29369(%rip), %rsi     # 0x301d6
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
xorl %eax, %eax
callq 0x4240
movl $0x8, %r12d
jmp 0x6f5a
movq 0x20(%r13), %r12
movq 0x28(%r13), %rcx
movq %r15, %rdi
movq %r14, %rsi
movq %rbx, %rdx
movq %r12, %r8
callq 0x6f7c
jmp 0x6f5a
movq 0x20(%r13), %r12
jmp 0x6f5a
movl $0x1, %r12d
movl $0x7, %ecx
movq %rbp, %rax
shrq %cl, %rax
testq %rax, %rax
je 0x6ed8
incq %r12
addq $0x7, %rcx
cmpq $0x8, %r12
jne 0x6eba
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 0x29334(%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 0x6f5a
incq %rbx
movq %rbp, %r13
movzbl %bpl, %r8d
movq %r15, %rdi
leaq 0x29326(%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 0x6f2c
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x30(%r13), %r9
leaq 0x29281(%rip), %rsi     # 0x301f8
jmp 0x6e6d