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

	if (!b)
		return;
	if (b->lbl) {
		if (b->iscomdat)
			emitonce(fd, b);
		if (b->isglobl)
			fprintf(fd, ".globl %s%s\n", Symprefix, b->lbl);
		fprintf(fd, "%s%s:\n", Symprefix, b->lbl);
	}
	switch (b->type) {
	case Btimin:	encodemin(fd, b->ival);	break;
	case Bti8:	fprintf(fd, "\t.byte %llu\n", b->ival);	break;
	case Bti16:	fprintf(fd, "\t.short %llu\n", b->ival);	break;
	case Bti32:	fprintf(fd, "\t.long %llu\n", b->ival);	break;
	case Bti64:	fprintf(fd, "\t.quad %llu\n", b->ival);	break;
	case Btbytes:	writebytes(fd, b->bytes.buf, b->bytes.len);	break;
	case Btpad:	fprintf(fd, "\t.fill %llu,1,0\n", b->npad);	break;
	case Btref:	fprintf(fd, "\t.quad %s + %zd\n", b->ref.str, b->ref.off);	break;
	case Btseq:
		for (i = 0; i < b->seq.nsub; i++)
			writeblob(fd, b->seq.sub[i]);
		break;
	}
	if (b->lbl && b->iscomdat)
		fprintf(fd, ".text\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
testq %rsi, %rsi
je 0x5b9c
movq %rsi, %r14
movq %rdi, %rbx
movq 0x10(%rsi), %rcx
testq %rcx, %rcx
je 0x5a99
cmpb $0x0, 0x19(%r14)
je 0x5a5a
leaq 0x587bc(%rip), %rax     # 0x5e1c8
movl (%rax), %eax
cmpl $0x1, %eax
je 0x5a3b
testl %eax, %eax
jne 0x5c21
leaq 0x26395(%rip), %rsi     # 0x2bdb7
leaq 0x28421(%rip), %rdx     # 0x2de4a
movq %rbx, %rdi
movq %rdx, %r8
movq %rcx, %r9
xorl %eax, %eax
callq 0x4240
jmp 0x5a5a
cmpb $0x0, 0x18(%r14)
je 0x5a5a
leaq 0x26394(%rip), %rsi     # 0x2bddd
leaq 0x283fa(%rip), %rdx     # 0x2de4a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4240
cmpb $0x0, 0x18(%r14)
movq 0x10(%r14), %rcx
je 0x5a81
leaq 0x262e0(%rip), %rsi     # 0x2bd4c
leaq 0x283d7(%rip), %rdx     # 0x2de4a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4240
movq 0x10(%r14), %rcx
leaq 0x262d1(%rip), %rsi     # 0x2bd59
leaq 0x283bb(%rip), %rdx     # 0x2de4a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4240
movl (%r14), %eax
cmpq $0x8, %rax
ja 0x5b70
leaq 0x25847(%rip), %rcx     # 0x2b2f4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%r14), %rdx
leaq 0x2629f(%rip), %rsi     # 0x2bd60
jmp 0x5b66
movq 0x20(%r14), %r15
cmpq $0x80, %r15
jae 0x5ba6
leaq 0x26282(%rip), %rsi     # 0x2bd60
movq %rbx, %rdi
movq %r15, %rdx
jmp 0x5b69
movq 0x20(%r14), %rdx
leaq 0x26287(%rip), %rsi     # 0x2bd7b
jmp 0x5b66
movq 0x20(%r14), %rdx
leaq 0x26287(%rip), %rsi     # 0x2bd88
jmp 0x5b66
xorl %r15d, %r15d
cmpq 0x20(%r14), %r15
jae 0x5b70
movq 0x28(%r14), %rax
movq (%rax,%r15,8), %rsi
movq %rbx, %rdi
callq 0x59d9
incq %r15
jmp 0x5b06
movq 0x20(%r14), %rdx
leaq 0x26241(%rip), %rsi     # 0x2bd6d
jmp 0x5b66
movq 0x20(%r14), %rdx
movq 0x30(%r14), %rcx
leaq 0x26269(%rip), %rsi     # 0x2bda6
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4240
jmp 0x5b70
movq 0x20(%r14), %rdx
movq 0x28(%r14), %rsi
movq %rbx, %rdi
callq 0x57d5
jmp 0x5b70
movq 0x20(%r14), %rdx
leaq 0x2622f(%rip), %rsi     # 0x2bd95
movq %rbx, %rdi
xorl %eax, %eax
callq 0x4240
cmpq $0x0, 0x10(%r14)
je 0x5b9c
cmpb $0x0, 0x19(%r14)
je 0x5b9c
leaq 0x25b9d(%rip), %rdi     # 0x2b722
pushq $0x6
popq %rsi
pushq $0x1
popq %rdx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4330
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
pushq $0x7
popq %rcx
movq %rcx, %r12
movq %rcx, %rax
subq $0x1, %rax
jb 0x5bc9
movq %r15, %rdx
shrq %cl, %rdx
testq %rdx, %rdx
je 0x5bc9
addq $0x7, %rcx
movq %rax, %r12
jmp 0x5baf
leal 0x1(%r12), %ecx
pushq $-0x1
popq %rax
movq %rax, %rdx
shlq %cl, %rdx
movl %r12d, %ecx
shlq %cl, %rax
notl %eax
andl %r15d, %eax
orl %eax, %edx
movzbl %dl, %edx
leaq 0x26220(%rip), %r13     # 0x2be0e
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4240
movl %r12d, %ecx
shrq %cl, %r15
testq %r15, %r15
je 0x5b70
movzbl %r15b, %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x4240
shrq $0x8, %r15
jmp 0x5c01
leaq 0x261d3(%rip), %rdi     # 0x2bdfb
xorl %eax, %eax
callq 0x1205c