// File: /workspace/github_c_makefile_star2_O3/lh3[P]bgt/bgt.c
// Function: bgtm_gen_tbl_line
int bgtm_gen_tbl_line(bgtm_t *bm, const bgt_info_t *ss, const bcf1_t *b)
{
	int i, type, err;
	kstring_t *s = &bm->tbl_line;
	bm->tbl_line.l = 0;
	for (i = 0; i < bm->n_fields; ++i) {
		int64_t vi;
		double vr;
		const char *vs;
		kexpr_t *e = bm->fields[i];
		if (i) kputc('\t', s);
		bgtm_assign_expr(e, ss);
		bgtm_assign_by_bcf(e, bm->h_out, b);
		err = ke_eval(e, &vi, &vr, &vs, &type);
		if (err) kputc('*', s);
		else if (type == KEV_INT) kputl(vi, s);
		else if (type == KEV_REAL) ksprintf(s, "%lg", vr);
		else if (type == KEV_STR) kputs(vs, s);
	}
	return 0;
}

// Assembly:
movq $0x0, 0x78(%rdi)
cmpl $0x0, 0x68(%rdi)
jle 0x1a277
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdx, %r12
movq %rsi, %r14
movq %rdi, %r15
leaq 0x78(%rdi), %rax
movq %rax, 0x10(%rsp)
xorl %r13d, %r13d
movabsq $-0x3333333333333333, %rbx # imm = 0xCCCCCCCCCCCCCCCD
movq %rdx, 0x8(%rsp)
movq 0x70(%r15), %rax
movq (%rax,%r13,8), %rbp
testq %r13, %r13
je 0x19fae
movq 0x78(%r15), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x80(%r15), %rcx
jae 0x19f41
movq 0x88(%r15), %rax
jmp 0x19f97
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x80(%r15)
movq 0x88(%r15), %rdi
callq 0x2330
movq %rax, 0x88(%r15)
movq 0x78(%r15), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x78(%r15)
movb $0x9, (%rax,%rdx)
movq 0x78(%r15), %rax
movq 0x88(%r15), %rcx
movb $0x0, (%rcx,%rax)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x199ee
movq 0x50(%r15), %rsi
movq %rbp, %rdi
movq %r12, %rdx
callq 0x19dc9
movq %rbp, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x1cd21
testl %eax, %eax
je 0x1a009
movq 0x78(%r15), %rdx
leaq 0x1(%rdx), %rcx
cmpq 0x80(%r15), %rcx
jae 0x1a126
movq 0x88(%r15), %rax
jmp 0x1a17c
movl 0x4(%rsp), %eax
cmpl $0x1, %eax
je 0x1a1c5
cmpl $0x3, %eax
je 0x1a198
cmpl $0x2, %eax
jne 0x1a259
movq 0x28(%rsp), %rsi
movq %rsi, %rcx
negq %rcx
cmovsq %rsi, %rcx
xorl %r12d, %r12d
movq %rcx, %rax
mulq %rbx
shrq $0x3, %rdx
leal (%rdx,%rdx), %eax
leal (%rax,%rax,4), %eax
movl %ecx, %edi
subl %eax, %edi
orb $0x30, %dil
movb %dil, 0x30(%rsp,%r12)
incq %r12
cmpq $0x9, %rcx
movq %rdx, %rcx
ja 0x1a03a
testq %rsi, %rsi
jns 0x1a073
movl %r12d, %eax
incl %r12d
movb $0x2d, 0x30(%rsp,%rax)
movq 0x78(%r15), %rax
movslq %r12d, %rcx
addq %rcx, %rax
incq %rax
cmpq 0x80(%r15), %rax
jb 0x1a0e0
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x80(%r15)
movq 0x88(%r15), %rdi
callq 0x2330
testq %rax, %rax
je 0x1a254
movq %rax, 0x88(%r15)
movl %r12d, %eax
leaq 0x2f(%rsp), %rcx
addq %rcx, %rax
incl %r12d
movb (%rax), %cl
movq 0x78(%r15), %rdx
movq 0x88(%r15), %rsi
leaq 0x1(%rdx), %rdi
movq %rdi, 0x78(%r15)
movb %cl, (%rsi,%rdx)
decl %r12d
decq %rax
cmpl $0x1, %r12d
jg 0x1a0ee
movq 0x78(%r15), %rax
movq 0x88(%r15), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x1a254
movq %rcx, %rax
shrq %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x2, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x4, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x8, %rcx
orq %rax, %rcx
movq %rcx, %rsi
shrq $0x10, %rsi
orq %rcx, %rsi
incq %rsi
movq %rsi, 0x80(%r15)
movq 0x88(%r15), %rdi
callq 0x2330
movq %rax, 0x88(%r15)
movq 0x78(%r15), %rdx
leaq 0x1(%rdx), %rcx
movq %rcx, 0x78(%r15)
movb $0x2a, (%rax,%rdx)
movq 0x78(%r15), %rax
movq 0x88(%r15), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x1a259
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x2170
movq 0x78(%r15), %rdi
movslq %eax, %r12
leaq (%rdi,%r12), %rax
incq %rax
cmpq 0x80(%r15), %rax
jae 0x1a1e0
movq 0x88(%r15), %rax
jmp 0x1a232
movsd 0x20(%rsp), %xmm0
movq 0x10(%rsp), %rdi
leaq 0x5abf(%rip), %rsi      # 0x1fc96
movb $0x1, %al
callq 0x19831
jmp 0x1a259
movq %rax, %rcx
shrq %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x2, %rax
orq %rcx, %rax
movq %rax, %rcx
shrq $0x4, %rcx
orq %rax, %rcx
movq %rcx, %rax
shrq $0x8, %rax
orq %rcx, %rax
movq %rax, %rsi
shrq $0x10, %rsi
orq %rax, %rsi
incq %rsi
movq %rsi, 0x80(%r15)
movq 0x88(%r15), %rdi
callq 0x2330
movq %rax, 0x88(%r15)
movq 0x78(%r15), %rdi
addq %rax, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0x2280
addq 0x78(%r15), %r12
movq %r12, 0x78(%r15)
movq 0x88(%r15), %rax
movb $0x0, (%rax,%r12)
movq 0x8(%rsp), %r12
incq %r13
movslq 0x68(%r15), %rax
cmpq %rax, %r13
jl 0x19f16
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq