// File: /workspace/github_c_makefile_star2_O0/oridb[P]mc/6/blob.c
// Function: blobrec
static size_t
blobrec(Blob *b, Htab *globls, Htab *strtab, Node *n)
{
	size_t i, sz, end;
	vlong nelt, idx, last;
	Type *ty;

	switch(exprop(n)) {
	case Oucon:	sz = blobucon(b, globls, strtab, n);	break;
	case Oslice:	sz = blobslice(b, globls, strtab, n);	break;
	case Ostruct:	sz = blobstruct(b, globls, strtab, n);	break;
	case Ovar:	sz = blobvar(b, strtab, n, exprtype(n));	break;
	case Olit:	sz = bloblit(b, strtab, n->expr.args[0], exprtype(n));	break;
	case Otup:
		/* Assumption: We sorted this while folding */
		sz = 0;
		if (!n->expr.args)
			break;
		for (i = 0; i < n->expr.nargs; i++) {
			end = alignto(sz, exprtype(n->expr.args[i]));
			sz += blobpad(b, end - sz);
			sz += blobrec(b, globls, strtab, n->expr.args[i]);
		}
		/* if we need padding at the end.. */
		end = alignto(sz, exprtype(n));
		sz += blobpad(b, end - sz);
		break;
	case Oarr:
		sz = 0;
		idx = 0;
		last = 0;
		ty = exprtype(n);
		if (!n->expr.args)
			break;
		if (!getintlit(ty->asize, &nelt))
			die("array missing size");
		/* We sorted this while folding, so elements are in order */
		for (i = 0; i < n->expr.nargs; i++) {
			if (!getintlit(n->expr.args[i]->expr.idx, &idx))
				die("non-numeric array size");
			if (idx != last + 1)
				sz += blobpad(b, (idx - last)*size(n->expr.args[i]));
			sz += blobrec(b, globls, strtab, n->expr.args[i]);
			last = idx + 1;
		}
		/* if we need padding at the end.. */
		end = alignto(sz, exprtype(n));
		sz += blobpad(b, end - sz);
		break;
	default:
		dumpn(n, stdout);
		die("Nonliteral initializer for global");
		break;
	}
	return sz;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdi
callq 0x2f210
addl $-0x29, %eax
movl %eax, %ecx
movq %rcx, -0x60(%rbp)
subl $0x10, %eax
ja 0x6aed
movq -0x60(%rbp), %rax
leaq 0x44893(%rip), %rcx     # 0x4b004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x6b20
movq %rax, -0x30(%rbp)
jmp 0x6b0e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x6c40
movq %rax, -0x30(%rbp)
jmp 0x6b0e
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
callq 0x6de0
movq %rax, -0x30(%rbp)
jmp 0x6b0e
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
callq 0x30340
movq -0x78(%rbp), %rdi
movq -0x70(%rbp), %rsi
movq -0x68(%rbp), %rdx
movq %rax, %rcx
callq 0x6f80
movq %rax, -0x30(%rbp)
jmp 0x6b0e
movq -0x8(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x20(%rbp), %rdi
callq 0x30340
movq -0x90(%rbp), %rdi
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
movq %rax, %rcx
callq 0x7060
movq %rax, -0x30(%rbp)
jmp 0x6b0e
movq $0x0, -0x30(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x687b
jmp 0x6b0e
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x691b
movq -0x30(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x30340
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x16770
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
subq -0x30(%rbp), %rsi
callq 0x7410
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
callq 0x6730
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x6883
movq -0x30(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x20(%rbp), %rdi
callq 0x30340
movq -0xa0(%rbp), %rdi
movq %rax, %rsi
callq 0x16770
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
subq -0x30(%rbp), %rsi
callq 0x7410
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6b0e
movq $0x0, -0x30(%rbp)
movq $0x0, -0x48(%rbp)
movq $0x0, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x30340
movq %rax, -0x58(%rbp)
movq -0x20(%rbp), %rax
cmpq $0x0, 0x50(%rax)
jne 0x6995
jmp 0x6b0e
movq -0x58(%rbp), %rax
movq 0x88(%rax), %rdi
leaq -0x40(%rbp), %rsi
callq 0x1f230
cmpl $0x0, %eax
jne 0x69bc
leaq 0x446b3(%rip), %rdi     # 0x4b068
movb $0x0, %al
callq 0x1df20
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x40(%rcx), %rax
jae 0x6aab
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq 0x48(%rax), %rdi
leaq -0x48(%rbp), %rsi
callq 0x1f230
cmpl $0x0, %eax
jne 0x6a06
leaq 0x4467c(%rip), %rdi     # 0x4b07b
movb $0x0, %al
callq 0x1df20
movq -0x48(%rbp), %rax
movq -0x50(%rbp), %rcx
addq $0x1, %rcx
cmpq %rcx, %rax
je 0x6a65
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x48(%rbp), %rax
subq -0x50(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x1c480
movq -0xb0(%rbp), %rsi
movq -0xa8(%rbp), %rdi
imulq %rax, %rsi
callq 0x7410
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x28(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
callq 0x6730
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x48(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x50(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x69c4
movq -0x30(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0x20(%rbp), %rdi
callq 0x30340
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x16770
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
movq -0x38(%rbp), %rsi
subq -0x30(%rbp), %rsi
callq 0x7410
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x6b0e
movq -0x20(%rbp), %rdi
movq 0x584d8(%rip), %rax     # 0x5efd0
movq (%rax), %rsi
callq 0x1de90
leaq 0x4458b(%rip), %rdi     # 0x4b092
movb $0x0, %al
callq 0x1df20
movq -0x30(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)