// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %rcx, %r14
movq %rdx, %r12
movq %rsi, 0x8(%rsp)
movq %rdi, %rbp
movq %rcx, %rdi
callq 0x1b5e6
addl $-0x29, %eax
cmpl $0x10, %eax
ja 0x4cde
leaq 0x269c9(%rip), %rcx     # 0x2b004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
movq %rbp, (%rsp)
movq %r12, 0x10(%rsp)
jmpq *%rax
movq 0x50(%r14), %rax
movq (%rax), %r14
movq 0x8(%rax), %r13
movq 0x10(%rax), %r15
leaq 0x60(%rsp), %rsi
movq %r13, %rdi
callq 0x12b14
testl %eax, %eax
je 0x4cf9
leaq 0x20(%rsp), %rsi
movq %r15, %rdi
callq 0x12b14
testl %eax, %eax
je 0x4d43
movq %r14, %rdi
callq 0x1b5e6
cmpl $0x33, %eax
jne 0x4a8b
cmpl $0x0, 0x30(%r14)
je 0x4a8b
movq %r14, %rdi
callq 0x1bf90
movq %rax, %rdi
callq 0x1fcd8
movq 0x68(%rax), %rax
movq (%rax), %rdi
callq 0x10d64
movq %rax, %r15
movq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x2a3e8
imulq 0x60(%rsp), %r15
pushq $0x1
popq %rdx
movq %rax, %rdi
movq %r15, %rsi
callq 0x4521
jmp 0x4acb
cmpq $0x0, 0x50(%r14)
je 0x4a83
xorl %r13d, %r13d
xorl %ebx, %ebx
cmpq 0x40(%r14), %rbx
jae 0x4afc
movq 0x50(%r14), %rax
movq (%rax,%rbx,8), %rdi
callq 0x1bf90
movq %r13, %rdi
movq %rax, %rsi
callq 0xd890
movq %rax, %r15
movq %rax, %rsi
subq %r13, %rsi
movq %rbp, %rdi
callq 0x4d81
movq 0x50(%r14), %rax
movq (%rax,%rbx,8), %rcx
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x4601
movq %rax, %r13
addq %r15, %r13
incq %rbx
jmp 0x46f7
movq %r14, %rdi
callq 0x1bf90
leaq 0x5a20c(%rip), %rcx     # 0x5e968
movq (%rcx), %rcx
movq 0x38(%r14), %rdx
movq (%rcx,%rdx,8), %r15
movq %rax, %rdi
callq 0x1fcd8
movl (%rax), %eax
cmpl $0x1e, %eax
je 0x477f
cmpl $0x13, %eax
jne 0x4cbe
cmpb $0x0, 0x71(%r15)
je 0x4cbe
pushq $0x3
popq %rdi
xorl %esi, %esi
callq 0x449c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x45b4
movq %r15, %rdi
callq 0x4f1a
pushq $0x1
popq %rdx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4521
jmp 0x4ae8
movq %r14, %rdi
callq 0x1bf90
movq %rax, %rdi
callq 0x1fcd8
cmpl $0x17, (%rax)
jne 0x4d05
movq 0x78(%rax), %rcx
movq %rcx, 0x50(%rsp)
movq %rax, 0x48(%rsp)
movq 0x88(%rax), %rax
movq %rax, 0x18(%rsp)
xorl %ebp, %ebp
xorl %r12d, %r12d
cmpq 0x50(%rsp), %r12
je 0x4a68
movq 0x18(%rsp), %rbx
movq (%rbx,%r12,8), %rdi
callq 0x1bf2d
movq %rbp, %rdi
movq %rax, %rsi
callq 0xd890
movq %rax, %r13
movq (%rbx,%r12,8), %rdi
callq 0x1befe
movq %rax, %r15
xorl %ebx, %ebx
cmpq 0x40(%r14), %rbx
jae 0x4851
movq 0x50(%r14), %rax
movq (%rax,%rbx,8), %rax
movq 0x48(%rax), %rdi
callq 0x1c0c8
movq %rax, %rdi
movq %r15, %rsi
callq 0x4230
testl %eax, %eax
je 0x4856
incq %rbx
jmp 0x4826
xorl %r15d, %r15d
jmp 0x485e
movq 0x50(%r14), %rax
movq (%rax,%rbx,8), %r15
movq %r13, %rsi
subq %rbp, %rsi
movq (%rsp), %rbx
movq %rbx, %rdi
callq 0x4d81
testq %r15, %r15
je 0x488f
movq %rbx, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rcx
callq 0x4601
movq %rax, %rbp
jmp 0x48ab
movq 0x18(%rsp), %rax
movq (%rax,%r12,8), %rdi
callq 0x10f54
movq %rax, %rbp
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4d81
addq %r13, %rbp
incq %r12
jmp 0x47f1
movq 0x50(%r14), %rax
movq (%rax), %r12
movq %r14, %rdi
callq 0x1bf90
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x30(%rsp)
movl $0x1, 0x28(%rsp)
movl $0x2, 0x30(%rsp)
movl $0x3, 0x40(%rsp)
cmpl $0x9, 0x8(%r12)
jne 0x4d24
movq %rax, %rdi
callq 0x10d64
movq %rax, %r14
movl 0x18(%r12), %eax
cmpq $0x6, %rax
ja 0x4c9b
leaq 0x26731(%rip), %rcx     # 0x2b048
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x30(%r12), %esi
jmp 0x4bda
movq %r14, %rdi
callq 0x1bf90
movq 0x50(%r14), %rcx
movq (%rcx), %rsi
movq %rax, %rdi
callq 0x203ff
movq 0x8(%rax), %rsi
pushq $0x2
popq %rdi
callq 0x449c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x45b4
cmpq $0x2, 0x40(%r14)
jb 0x4b3c
movq 0x50(%r14), %rax
movq 0x8(%rax), %rdi
callq 0x1bf90
movq %rax, %rdi
callq 0x10f67
cmpq $0x5, %rax
jb 0x4b42
movq %rax, %r15
movq %rax, %rsi
addq $-0x4, %rsi
movq %rbp, %rdi
callq 0x4d81
jmp 0x4b46
andq $0x0, 0x20(%rsp)
movq %r14, %rdi
callq 0x1bf90
cmpq $0x0, 0x50(%r14)
je 0x4a83
movq 0x88(%rax), %rdi
leaq 0x60(%rsp), %rsi
callq 0x12b14
testl %eax, %eax
je 0x4d58
xorl %r13d, %r13d
leaq 0x20(%rsp), %rbp
xorl %r15d, %r15d
xorl %ebx, %ebx
cmpq 0x40(%r14), %rbx
jae 0x4b1a
movq 0x50(%r14), %rax
movq (%rax,%rbx,8), %rax
movq 0x48(%rax), %rdi
movq %rbp, %rsi
callq 0x12b14
testl %eax, %eax
je 0x4cb0
movq 0x20(%rsp), %r12
leaq 0x1(%r15), %rax
cmpq %rax, %r12
jne 0x4a12
movq (%rsp), %r12
jmp 0x4a3b
subq %r15, %r12
movq 0x50(%r14), %rax
movq (%rax,%rbx,8), %rdi
callq 0x10f54
movq %rax, %r15
imulq %r12, %r15
movq (%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x4d81
addq %r15, %r13
movq 0x50(%r14), %rax
movq (%rax,%rbx,8), %rcx
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x4601
addq %rax, %r13
movq 0x20(%rsp), %r15
incq %r15
incq %rbx
jmp 0x49d8
movq %rbp, %rdi
movq 0x48(%rsp), %rsi
callq 0xd890
movq %rax, %r14
movq %rax, %rsi
subq %rbp, %rsi
jmp 0x4b36
xorl %r14d, %r14d
jmp 0x4c9b
movq %r14, %rdi
callq 0x1b5e6
cmpl $0x35, %eax
je 0x4aa9
movq %r14, %rdi
callq 0x1b5e6
cmpl $0x39, %eax
jne 0x4d64
leaq 0x58(%rsp), %rsi
movq %r14, %rdi
callq 0x12b14
testl %eax, %eax
je 0x4d4f
movq 0x58(%rsp), %rsi
pushq $0x3
popq %rdi
callq 0x449c
movq %rax, %rsi
movq %rbp, %rdi
callq 0x45b4
movq 0x20(%rsp), %rsi
subq 0x60(%rsp), %rsi
pushq $0x3
popq %rdi
callq 0x449c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x45b4
pushq $0x10
popq %r14
jmp 0x4c9b
movq %r14, %rdi
callq 0x1bf90
movq %r13, %rdi
movq %rax, %rsi
callq 0xd890
movq %rax, %r14
movq %rax, %rsi
subq %r13, %rsi
jmp 0x4b75
movq %r14, %rdi
callq 0x1bf90
movq %r13, %rdi
movq %rax, %rsi
callq 0xd890
movq %rax, %r14
movq %rax, %rsi
subq %r13, %rsi
movq (%rsp), %rdi
jmp 0x4b78
pushq $0x4
popq %r12
jmp 0x4b64
pushq $0x4
popq %r15
movq 0x50(%r14), %rax
movq 0x8(%rax), %rcx
movq %rbp, %rdi
movq 0x8(%rsp), %rsi
movq %r12, %rdx
callq 0x4601
movq %rax, %r12
addq %r15, %r12
movq %r14, %rdi
callq 0x10f54
movq %rax, %r14
movq %rax, %rsi
subq %r12, %rsi
movq %rbp, %rdi
callq 0x4d81
jmp 0x4c9b
addq $0x30, %r12
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2a517
testl %eax, %eax
je 0x4c31
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2a3e8
movq %rax, %r15
jmp 0x4c59
movl 0x20(%rsp,%r14,4), %edi
movq 0x30(%r12), %rsi
jmp 0x4c8b
movq 0x20(%r12), %rdi
callq 0x1fcd8
cmpl $0xf, (%rax)
jne 0x4c1b
cvtsd2ss 0x30(%r12), %xmm0
movd %xmm0, %esi
pushq $0x2
jmp 0x4c8a
movslq 0x30(%r12), %rsi
xorl %edi, %edi
jmp 0x4c8b
movq %r12, %rdi
callq 0x4f1a
movq %rax, %r15
pushq $0x3
popq %rdi
xorl %esi, %esi
callq 0x449c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x45b4
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x4521
jmp 0x4c90
movq 0x20(%r12), %rdi
callq 0x1fcd8
cmpl $0x10, (%rax)
jne 0x4c9b
movq 0x30(%r12), %rsi
jmp 0x4c88
leaq 0x60(%rsp), %rdi
movl $0x80, %esi
callq 0x50ff
movq %rax, %r15
movq %rax, %rdi
callq 0x4340
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x2a22a
cmpq $0x0, (%r12)
je 0x4c6f
pushq $0x1
popq %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x4521
jmp 0x4c79
pushq $0x3
popq %rdi
xorl %esi, %esi
callq 0x449c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x45b4
movq (%r12), %rsi
pushq $0x3
popq %rdi
callq 0x449c
movq %rbp, %rdi
movq %rax, %rsi
callq 0x45b4
movq %r14, %rax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x263c0(%rip), %rdi     # 0x2b077
xorl %eax, %eax
callq 0x1205c
movq 0x50(%r14), %rax
movq (%rax), %rdi
callq 0x1c0c8
leaq 0x264bb(%rip), %rsi     # 0x2b18c
movq %r14, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x120fd
movq 0x3c2eb(%rip), %rax     # 0x40fd0
movq (%rax), %rsi
movq %r14, %rdi
callq 0x1201b
leaq 0x26397(%rip), %rdi     # 0x2b08e
jmp 0x4cb7
leaq 0x263b0(%rip), %rsi     # 0x2b0b0
movq %r13, %rdi
jmp 0x4d6e
leaq 0x26433(%rip), %rdi     # 0x2b13f
leaq 0x26440(%rip), %rsi     # 0x2b153
leaq 0x26440(%rip), %rcx     # 0x2b15a
movl $0xe8, %edx
callq 0x4180
leaq 0x2647d(%rip), %rdi     # 0x2b1a8
leaq 0x26421(%rip), %rsi     # 0x2b153
leaq 0x2647f(%rip), %rcx     # 0x2b1b8
movl $0x87, %edx
callq 0x4180
leaq 0x26393(%rip), %rsi     # 0x2b0dd
movq %r15, %rdi
jmp 0x4d6e
leaq 0x263b4(%rip), %rsi     # 0x2b10a
jmp 0x4d6b
leaq 0x26305(%rip), %rdi     # 0x2b064
jmp 0x4cb7
leaq 0x263b1(%rip), %rsi     # 0x2b11c
movq %r14, %rdi
xorl %eax, %eax
callq 0x120fd
leaq 0x2646b(%rip), %rdi     # 0x2b1e7
jmp 0x4cb7