// File: DoubleString[P]RtConverter/src/Rtklib/stream.cpp
// Function: bamboo::statexfile(bamboo::file_t*, char*)
static int statexfile(file_t *file, char *msg)
	{
		char *p = msg, tstr1[32], tstr2[32];
		int state = file ? 2 : 0;

		p += sprintf(p, "file:\n");
		p += sprintf(p, "  state   = %d\n", state);
		if (!state) return 0;
		time2str(file->time, tstr1, 3);
		time2str(file->wtime, tstr2, 3);
		p += sprintf(p, "  path    = %s\n", file->path);
		p += sprintf(p, "  openpath= %s\n", file->openpath);
		p += sprintf(p, "  mode    = %d\n", file->mode);
		p += sprintf(p, "  timetag = %d\n", file->timetag);
		p += sprintf(p, "  repmode = %d\n", file->repmode);
		p += sprintf(p, "  offsete = %d\n", file->offset);
		p += sprintf(p, "  time    = %s\n", tstr1);
		p += sprintf(p, "  wtime   = %s\n", tstr2);
		p += sprintf(p, "  tick    = %u\n", file->tick);
		p += sprintf(p, "  tick_f  = %u\n", file->tick_f);
		p += sprintf(p, "  start   = %.3f\n", file->start);
		p += sprintf(p, "  speed   = %.3f\n", file->speed);
		p += sprintf(p, "  swapintv= %.3f\n", file->swapintv);
		return state;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rdx
xorl %eax, %eax
movl $0x2, %ecx
cmpq $0x0, %rdx
cmovnel %ecx, %eax
movl %eax, -0x64(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x27f40(%rip), %rsi     # 0xca17b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movl -0x64(%rbp), %edx
leaq 0x27eeb(%rip), %rsi     # 0xca14b
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, -0x64(%rbp)
jne 0xa2289
movl $0x0, -0x4(%rbp)
jmp 0xa252c
movq -0x10(%rbp), %rax
movq 0x838(%rax), %rcx
movq %rcx, -0x78(%rbp)
movq 0x840(%rax), %rax
movq %rax, -0x70(%rbp)
leaq -0x40(%rbp), %rsi
movq -0x78(%rbp), %rdi
movsd -0x70(%rbp), %xmm0
movl $0x3, %edx
callq 0x8f550
movq -0x10(%rbp), %rax
movq 0x848(%rax), %rcx
movq %rcx, -0x88(%rbp)
movq 0x850(%rax), %rax
movq %rax, -0x80(%rbp)
leaq -0x60(%rbp), %rsi
movq -0x88(%rbp), %rdi
movsd -0x80(%rbp), %xmm0
movl $0x3, %edx
callq 0x8f550
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x20, %rdx
leaq 0x27e7e(%rip), %rsi     # 0xca182
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rdx
addq $0x420, %rdx            # imm = 0x420
leaq 0x27e61(%rip), %rsi     # 0xca192
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x820(%rax), %edx
leaq 0x27e45(%rip), %rsi     # 0xca1a2
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x824(%rax), %edx
leaq 0x27e29(%rip), %rsi     # 0xca1b2
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x828(%rax), %edx
leaq 0x27e0d(%rip), %rsi     # 0xca1c2
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x82c(%rax), %edx
leaq 0x27df1(%rip), %rsi     # 0xca1d2
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rdx
leaq 0x27ddb(%rip), %rsi     # 0xca1e2
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rdx
leaq 0x27dc5(%rip), %rsi     # 0xca1f2
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x858(%rax), %edx
leaq 0x27da9(%rip), %rsi     # 0xca202
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x85c(%rax), %edx
leaq 0x27d8d(%rip), %rsi     # 0xca212
movb $0x0, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd 0x870(%rax), %xmm0
leaq 0x27d6f(%rip), %rsi     # 0xca222
movb $0x1, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd 0x878(%rax), %xmm0
leaq 0x27d53(%rip), %rsi     # 0xca234
movb $0x1, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
movq -0x10(%rbp), %rax
movsd 0x880(%rax), %xmm0
leaq 0x27d37(%rip), %rsi     # 0xca246
movb $0x1, %al
callq 0x9150
movl %eax, %ecx
movq -0x20(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)