// File: /workspace/github_c_makefile_star2_O1/lh3[P]bgt/fmf.c
// Function: fmf_write
char *fmf_write(const fmf_t *f, int r)
{
	static const char *type_str = "\0ifZ";
	kstring_t s = {0,0,0};
	fmf1_t *u;
	int i;
	if (r >= f->n_rows) return 0;
	u = &f->rows[r];
	kputs(u->name, &s);
	for (i = 0; i < u->n_meta; ++i) {
		fmf_meta_t *m = &u->meta[i];
		kputc('\t', &s);
		kputs(f->keys[m->key], &s);
		if (m->type != FMF_FLAG) {
			kputc(':', &s); kputc(type_str[m->type], &s);
			kputc(':', &s);
			if (m->type == FMF_INT) ksprintf(&s, "%lld", (long long)m->v.i);
			else if (m->type == FMF_REAL) ksprintf(&s, "%g", m->v.r);
			else kputs(f->vals[m->v.s], &s);
		}
	}
	return s.s;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
cmpl %esi, 0x20(%rdi)
jle 0xa3b5
movq %rdi, %r13
movq 0x28(%rdi), %rax
movslq %esi, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rax,%rcx,8), %rax
movq %rax, 0x28(%rsp)
movq (%rax), %r14
movq %r14, %rdi
callq 0x2170
movq (%rsp), %rbx
movslq %eax, %r15
leaq (%r15,%rbx), %rax
incq %rax
cmpq 0x8(%rsp), %rax
jb 0xa01f
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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2330
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %r12
leaq (%r12,%rbx), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2280
addq %rbx, %r15
movq %r15, (%rsp)
movb $0x0, (%r12,%r15)
movq 0x28(%rsp), %rcx
cmpl $0x0, 0x8(%rcx)
jle 0xa3ae
xorl %r15d, %r15d
movq %r13, 0x30(%rsp)
movq 0x10(%rcx), %rbp
movq (%rsp), %r12
leaq 0x1(%r12), %rbx
cmpq 0x8(%rsp), %rbx
jb 0xa0b2
movq %rbx, %rax
shrq %rax
orq %rbx, %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, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0x2330
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %r14
movq %rbx, (%rsp)
movw $0x9, (%r14,%r12)
movq 0x8(%r13), %rax
movq %rbp, 0x20(%rsp)
movl (%rbp,%r15,8), %ecx
movl $0xfffffff, %edx        # imm = 0xFFFFFFF
andl %edx, %ecx
movq (%rax,%rcx,8), %rbp
movq %rbp, %rdi
callq 0x2170
movslq %eax, %r13
leaq (%r12,%r13), %rax
addq $0x2, %rax
cmpq 0x8(%rsp), %rax
jb 0xa13b
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, 0x8(%rsp)
movq %r14, %rdi
callq 0x2330
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %r14
leaq (%r14,%rbx), %rdi
movq %rbp, %rsi
movq %r13, %rdx
callq 0x2280
addq %rbx, %r13
movq %r13, (%rsp)
movb $0x0, (%r14,%r13)
movq 0x20(%rsp), %r12
cmpl $0x10000000, (%r12,%r15,8) # imm = 0x10000000
jb 0xa394
leaq 0x1(%r13), %rbx
cmpq 0x8(%rsp), %rbx
jb 0xa1bf
movq %rbx, %rax
shrq %rax
orq %rbx, %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, 0x8(%rsp)
movq %r14, %rdi
callq 0x2330
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %rbx, (%rsp)
movw $0x3a, (%rdi,%r13)
movl (%r12,%r15,8), %eax
shrl $0x1c, %eax
leaq 0x14f81(%rip), %rcx     # 0x1f15e
movb (%rax,%rcx), %bl
leaq 0x2(%r13), %r14
cmpq 0x8(%rsp), %r14
jb 0xa22e
movq %r14, %rax
shrq %rax
orq %r14, %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, 0x8(%rsp)
callq 0x2330
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
movq %r14, (%rsp)
movb %bl, 0x1(%rdi,%r13)
movb $0x0, 0x2(%rdi,%r13)
leaq 0x3(%r13), %rbx
cmpq 0x8(%rsp), %rbx
jb 0xa290
movq %rbx, %rax
shrq %rax
orq %rbx, %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, 0x8(%rsp)
callq 0x2330
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rbp
movq %rbx, (%rsp)
movb $0x3a, (%rbp,%r14)
movb $0x0, (%rbp,%rbx)
movq 0x20(%rsp), %rax
movl (%rax,%r15,8), %eax
shrl $0x1c, %eax
cmpl $0x2, %eax
je 0xa2da
cmpl $0x1, %eax
jne 0xa2fc
movq 0x20(%rsp), %rax
movslq 0x4(%rax,%r15,8), %rdx
movq %rsp, %rdi
leaq 0x14e01(%rip), %rsi     # 0x1f0cf
xorl %eax, %eax
callq 0xa3c6
jmp 0xa394
movq 0x20(%rsp), %rax
cvtss2sd 0x4(%rax,%r15,8), %xmm0
movq %rsp, %rdi
leaq 0x14de4(%rip), %rsi     # 0x1f0d4
movb $0x1, %al
callq 0xa3c6
jmp 0xa394
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x20(%rsp), %rcx
movl 0x4(%rcx,%r15,8), %ecx
movq (%rax,%rcx,8), %r14
movq %r14, %rdi
callq 0x2170
movslq %eax, %r12
leaq (%r12,%r13), %rax
addq $0x4, %rax
cmpq 0x8(%rsp), %rax
jb 0xa373
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, 0x8(%rsp)
movq %rbp, %rdi
callq 0x2330
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %r13
leaq (%rbx,%r13), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2280
addq %rbx, %r12
movq %r12, (%rsp)
movb $0x0, (%r13,%r12)
incq %r15
movq 0x28(%rsp), %rcx
movslq 0x8(%rcx), %rax
cmpq %rax, %r15
movq 0x30(%rsp), %r13
jl 0xa056
movq 0x10(%rsp), %rax
jmp 0xa3b7
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq