// File: /workspace/github_cpp_makefile_star2_O1/4n6ist[P]usn_analytics/lib/usnrecord.cpp
// Function: UsnRecord::WriteRecord(_IO_FILE*)
int UsnRecord::WriteRecord(FILE *fp) {
  string reasons_s, attrs_s, timestamp_s;
  fprintf(fp, "\"%llu\"\t", offset);
  fprintf(fp, "\"%u\"\t", usn_record.RecordLength);
  fprintf(fp, "\"%hu\"\t", usn_record.MajorVersion);
  fprintf(fp, "\"%hu\"\t", usn_record.MinorVersion);
  fprintf(fp, "\"%u\"\t", cid);
  fprintf(fp, "\"%hu\"\t", cid_seq);
  fprintf(fp, "\"%u\"\t", pid);
  fprintf(fp, "\"%hu\"\t", pid_seq);
  fprintf(fp, "\"%llu\"\t", usn_record.Usn);
  timestamp_s = parse_datetimemicro(usn_record.TimeStamp, lt);
  fprintf(fp, "\"%s\"\t", timestamp_s.c_str());
  parse_reason(usn_record.Reason, &(reasons_s));
  fprintf(fp, "\"%s(%08x)\"\t", reasons_s.c_str(), usn_record.Reason);
  fprintf(fp, "\"%u\"\t", usn_record.SourceInfo);
  fprintf(fp, "\"%u\"\t", usn_record.SecurityId);
  parse_file_attr(usn_record.FileAttributes, &(attrs_s));
  fprintf(fp, "\"%s(%04x)\"\t", attrs_s.c_str(), usn_record.FileAttributes);
  fprintf(fp, "\"%hu\"\t", usn_record.FileNameLength);
  fprintf(fp, "\"%hu\"\t", usn_record.FileNameOffset);  
  fprintf(fp, "\"%s\"", file_name.c_str());
  fprintf(fp, "\n");
  return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x38(%rsp), %rcx
movq %rcx, -0x10(%rcx)
xorl %eax, %eax
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x18(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq %rax, -0x8(%rcx)
movb %al, (%rcx)
leaq 0x58(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq %rax, -0x8(%rbp)
movb %al, (%rbp)
movq 0x4c(%rdi), %rdx
leaq 0x3937(%rip), %r15      # 0xf717
movq %rsi, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3360
movl 0x10(%r14), %edx
leaq 0x3927(%rip), %r12      # 0xf71f
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3360
movzwl 0x14(%r14), %edx
leaq 0x3914(%rip), %r13      # 0xf725
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3360
movzwl 0x16(%r14), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3360
movl 0x54(%r14), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3360
movzwl 0x58(%r14), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3360
movl 0x5a(%r14), %edx
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3360
movzwl 0x5e(%r14), %edx
movq %rbx, %rdi
movq %r13, %rsi
xorl %eax, %eax
callq 0x3360
movq 0x28(%r14), %rdx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3360
movq 0x30(%r14), %rsi
leaq 0x83ee(%rip), %rax      # 0x14280
movzbl (%rax), %edx
leaq 0x68(%rsp), %rdi
callq 0xca07
leaq 0x48(%rsp), %rdi
leaq 0x68(%rsp), %r15
movq %r15, %rsi
callq 0x3300
movq (%r15), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0xbecb
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x48(%rsp), %rdx
leaq 0x3855(%rip), %rsi      # 0xf72c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3360
movl 0x38(%r14), %edi
leaq 0x28(%rsp), %rsi
callq 0xd3bf
movq 0x28(%rsp), %rdx
movl 0x38(%r14), %ecx
leaq 0x3833(%rip), %rsi      # 0xf732
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3360
movl 0x3c(%r14), %edx
leaq 0x380b(%rip), %r15      # 0xf71f
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3360
movl 0x40(%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3360
movl 0x44(%r14), %edi
leaq 0x8(%rsp), %rsi
callq 0xcdc3
movq 0x8(%rsp), %rdx
movl 0x44(%r14), %ecx
leaq 0x37ee(%rip), %rsi      # 0xf73e
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3360
movzwl 0x48(%r14), %edx
leaq 0x37bf(%rip), %r15      # 0xf725
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3360
movzwl 0x4a(%r14), %edx
movq %rbx, %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x3360
movq 0x60(%r14), %rdx
leaq 0x37ba(%rip), %rsi      # 0xf74a
movq %rbx, %rdi
xorl %eax, %eax
callq 0x3360
movl $0xa, %edi
movq %rbx, %rsi
callq 0x3310
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0xbfbe
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xbfda
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xbff6
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
xorl %eax, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xc00c
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %rbp, %rdi
je 0xc026
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x8(%rsp), %rdi
leaq 0x18(%rsp), %rax
cmpq %rax, %rdi
je 0xc042
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x3230
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0xc05e
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x3230
movq %rbx, %rdi
callq 0x3470