// File: /workspace/github_c_makefile_star2_O3/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
cmpl %esi, 0x20(%rdi)
jle 0xa635
movq %rdi, 0x20(%rsp)
movq 0x28(%rdi), %rbx
movslq %esi, %rax
leaq (%rax,%rax,2), %r13
movq (%rbx,%r13,8), %r14
movq %r14, %rdi
callq 0x2170
movslq %eax, %r15
leaq 0x1(%r15), %rax
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, %rdi
shrq $0x10, %rdi
orq %rax, %rdi
incq %rdi
movq %rdi, 0x8(%rsp)
callq 0x22e0
movq %rax, %r12
movq %rax, 0x10(%rsp)
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x2280
movq %r15, (%rsp)
movb $0x0, (%r12,%r15)
cmpl $0x0, 0x8(%rbx,%r13,8)
jle 0xa638
leaq (%rbx,%r13,8), %rcx
xorl %r12d, %r12d
movq %rcx, 0x30(%rsp)
movq 0x10(%rcx), %r15
movq (%rsp), %rbx
movq 0x8(%rsp), %r14
leaq 0x1(%rbx), %rbp
cmpq %r14, %rbp
jae 0xa2d9
movq 0x10(%rsp), %r13
jmp 0xa327
movq %rbp, %rax
shrq %rax
orq %rbp, %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, %r14
shrq $0x10, %r14
orq %rcx, %r14
incq %r14
movq %r14, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x2330
movq %rax, %r13
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movw $0x9, (%r13,%rbx)
movq 0x8(%rax), %rax
movq %r12, 0x28(%rsp)
movq %r15, 0x18(%rsp)
movl (%r15,%r12,8), %ecx
movl $0xfffffff, %edx        # imm = 0xFFFFFFF
andl %edx, %ecx
movq (%rax,%rcx,8), %r12
movq %r12, %rdi
callq 0x2170
movslq %eax, %r15
leaq (%r15,%rbp), %rbx
incq %rbx
cmpq %r14, %rbx
jb 0xa3b4
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, %r14
shrq $0x10, %r14
orq %rcx, %r14
incq %r14
movq %r14, 0x8(%rsp)
movq %r13, %rdi
movq %r14, %rsi
callq 0x2330
movq %rax, %r13
movq %rax, 0x10(%rsp)
leaq (%r15,%rbp), %rax
addq %r13, %rbp
movq %rbp, %rdi
movq %rax, %rbp
movq %r12, %rsi
movq %r15, %rdx
callq 0x2280
movq %rbp, (%rsp)
movb $0x0, (%r13,%rbp)
movq 0x28(%rsp), %r12
movq 0x18(%rsp), %r15
cmpl $0x10000000, (%r15,%r12,8) # imm = 0x10000000
jb 0xa619
cmpq %r14, %rbx
jb 0xa43c
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 %r13, %rdi
callq 0x2330
movq %rax, %r13
movq %rax, 0x10(%rsp)
movb $0x3a, (%r13,%rbp)
movq 0x10(%rsp), %rax
movb $0x0, 0x1(%rax,%rbp)
movl (%r15,%r12,8), %ecx
shrl $0x1c, %ecx
leaq 0x14d44(%rip), %rdx     # 0x1f19e
movb (%rcx,%rdx), %bl
leaq 0x2(%rbp), %r12
movq 0x8(%rsp), %r14
cmpq %r14, %r12
jb 0xa4b4
movq %r12, %rcx
shrq %rcx
orq %r12, %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x4, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x8, %rdx
orq %rcx, %rdx
movq %rdx, %r14
shrq $0x10, %r14
orq %rdx, %r14
incq %r14
movq %r14, 0x8(%rsp)
movq %rax, %rdi
movq %r14, %rsi
callq 0x2330
movq %rax, 0x10(%rsp)
movb %bl, 0x1(%rax,%rbp)
movb $0x0, 0x2(%rax,%rbp)
leaq 0x3(%rbp), %r15
cmpq %r14, %r15
jb 0xa50c
movq %r15, %rcx
shrq %rcx
orq %r15, %rcx
movq %rcx, %rdx
shrq $0x2, %rdx
orq %rcx, %rdx
movq %rdx, %rcx
shrq $0x4, %rcx
orq %rdx, %rcx
movq %rcx, %rdx
shrq $0x8, %rdx
orq %rcx, %rdx
movq %rdx, %rsi
shrq $0x10, %rsi
orq %rdx, %rsi
incq %rsi
movq %rsi, 0x8(%rsp)
movq %rax, %rdi
callq 0x2330
movq %rax, 0x10(%rsp)
movq %r15, (%rsp)
movb $0x3a, (%rax,%r12)
movq 0x10(%rsp), %r14
movb $0x0, (%r14,%r15)
movq 0x28(%rsp), %r12
movq 0x18(%rsp), %rax
movl (%rax,%r12,8), %eax
shrl $0x1c, %eax
cmpl $0x2, %eax
je 0xa55a
cmpl $0x1, %eax
jne 0xa57c
movq 0x18(%rsp), %rax
movslq 0x4(%rax,%r12,8), %rdx
movq %rsp, %rdi
leaq 0x14bc1(%rip), %rsi     # 0x1f10f
xorl %eax, %eax
callq 0xa64a
jmp 0xa619
movq 0x18(%rsp), %rax
cvtss2sd 0x4(%rax,%r12,8), %xmm0
movq %rsp, %rdi
leaq 0x14ba4(%rip), %rsi     # 0x1f114
movb $0x1, %al
callq 0xa64a
jmp 0xa619
movq 0x20(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movl 0x4(%rcx,%r12,8), %ecx
movq (%rax,%rcx,8), %r12
movq %r12, %rdi
callq 0x2170
movslq %eax, %r13
leaq 0x4(,%r13), %rax
addq %rbp, %rax
cmpq 0x8(%rsp), %rax
jb 0xa5f9
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, %r14
movq %rax, 0x10(%rsp)
leaq (%r14,%r15), %rdi
movq %r12, %rsi
movq %r13, %rdx
callq 0x2280
addq %r15, %r13
movq %r13, (%rsp)
movb $0x0, (%r14,%r13)
movq 0x28(%rsp), %r12
incq %r12
movq 0x30(%rsp), %rcx
movslq 0x8(%rcx), %rax
cmpq %rax, %r12
jl 0xa2bc
movq 0x10(%rsp), %r12
jmp 0xa638
xorl %r12d, %r12d
movq %r12, %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq