// File: /workspace/github_c_makefile_star2_O1/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 0x19b5b
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 0x1989d
movq 0x78(%r15), %rax
incq %rax
cmpq 0x80(%r15), %rax
jb 0x19877
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), %rax
movq 0x88(%r15), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x78(%r15)
movb $0x9, (%rcx,%rax)
movq 0x78(%r15), %rax
movq 0x88(%r15), %rcx
movb $0x0, (%rcx,%rax)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x19262
movq 0x50(%r15), %rsi
movq %rbp, %rdi
movq %r12, %rdx
callq 0x196bb
movq %rbp, %rdi
leaq 0x28(%rsp), %rsi
leaq 0x20(%rsp), %rdx
leaq 0x18(%rsp), %rcx
leaq 0x4(%rsp), %r8
callq 0x1cb0d
testl %eax, %eax
je 0x19964
movq 0x78(%r15), %rax
incq %rax
cmpq 0x80(%r15), %rax
jb 0x19939
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), %rax
movq 0x88(%r15), %rcx
leaq 0x1(%rax), %rdx
movq %rdx, 0x78(%r15)
movb $0x2a, (%rcx,%rax)
movq 0x78(%r15), %rax
movq 0x88(%r15), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x19b3d
movl 0x4(%rsp), %eax
cmpl $0x1, %eax
je 0x19b24
cmpl $0x3, %eax
je 0x19a81
cmpl $0x2, %eax
jne 0x19b3d
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 0x19995
testq %rsi, %rsi
jns 0x199ce
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 0x19a3b
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 0x19b1d
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 0x19a49
movq 0x78(%r15), %rax
movq 0x88(%r15), %rcx
movb $0x0, (%rcx,%rax)
jmp 0x19b1d
movq 0x18(%rsp), %rbp
movq %rbp, %rdi
callq 0x2170
movq 0x78(%r15), %rcx
movslq %eax, %r12
leaq (%rcx,%r12), %rax
incq %rax
cmpq 0x80(%r15), %rax
jb 0x19af3
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 0x88(%r15), %rdi
addq 0x78(%r15), %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
jmp 0x19b3d
movsd 0x20(%rsp), %xmm0
movq 0x10(%rsp), %rdi
leaq 0x6140(%rip), %rsi      # 0x1fc76
movb $0x1, %al
callq 0x190a5
incq %r13
movslq 0x68(%r15), %rax
cmpq %rax, %r13
jl 0x19808
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
xorl %eax, %eax
retq