// File: /workspace/github_c_makefile_star2_O0/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: print_dir_entry
static void print_dir_entry(const struct dir_entry *de) {
  char size[64], mod[64], href[MAX_PATH_SIZE * 3];
  int64_t fsize = de->st.st_size;
  int is_dir = S_ISDIR(de->st.st_mode);
  const char *slash = is_dir ? "/" : "";
  time_t t;

  if (is_dir) {
    mg_snprintf(size, sizeof(size), "%s", "[DIRECTORY]");
  } else {
     // We use (signed) cast below because MSVC 6 compiler cannot
     // convert unsigned __int64 to double.
    if (fsize < 1024) {
      mg_snprintf(size, sizeof(size), "%d", (int) fsize);
    } else if (fsize < 0x100000) {
      mg_snprintf(size, sizeof(size), "%.1fk", (double) fsize / 1024.0);
    } else if (fsize < 0x40000000) {
      mg_snprintf(size, sizeof(size), "%.1fM", (double) fsize / 1048576);
    } else {
      mg_snprintf(size, sizeof(size), "%.1fG", (double) fsize / 1073741824);
    }
  }
  t = de->st.st_mtime;  // store in local variable for NDK compile
  strftime(mod, sizeof(mod), "%d-%b-%Y %H:%M", localtime(&t));
  mg_url_encode(de->file_name, strlen(de->file_name), href, sizeof(href));
  mg_printf_data(&de->conn->mg_conn,
                  "<tr><td><a href=\"%s%s\">%s%s</a></td>"
                  "<td>&nbsp;%s</td><td>&nbsp;&nbsp;%s</td></tr>\n",
                  href, slash, de->file_name, slash, mod, size);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60d0, %rsp           # imm = 0x60D0
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0x6098(%rbp)
movq -0x8(%rbp), %rax
movl 0x28(%rax), %eax
andl $0xf000, %eax           # imm = 0xF000
cmpl $0x4000, %eax           # imm = 0x4000
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x609c(%rbp)
movl -0x609c(%rbp), %edx
leaq 0xe381(%rip), %rax      # 0xc5b4b
leaq 0x106db(%rip), %rcx     # 0xc7eac
cmpl $0x0, %edx
cmovneq %rcx, %rax
movq %rax, -0x60a8(%rbp)
cmpl $0x0, -0x609c(%rbp)
je 0xb780b
leaq -0x50(%rbp), %rdi
movl $0x40, %esi
leaq 0xd038(%rip), %rdx      # 0xc4830
leaq 0xfec7(%rip), %rcx      # 0xc76c6
movb $0x0, %al
callq 0xb3c50
jmp 0xb78e5
cmpq $0x400, -0x6098(%rbp) # imm = 0x400
jge 0xb783d
leaq -0x50(%rbp), %rdi
movq -0x6098(%rbp), %rax
movl %eax, %ecx
movl $0x40, %esi
leaq 0x8794(%rip), %rdx      # 0xbffc5
movb $0x0, %al
callq 0xb3c50
jmp 0xb78e3
cmpq $0x100000, -0x6098(%rbp) # imm = 0x100000
jge 0xb7878
leaq -0x50(%rbp), %rdi
cvtsi2sdq -0x6098(%rbp), %xmm0
movsd 0xf2e9(%rip), %xmm1     # 0xc6b48
divsd %xmm1, %xmm0
movl $0x40, %esi
leaq 0xfe63(%rip), %rdx      # 0xc76d2
movb $0x1, %al
callq 0xb3c50
jmp 0xb78e1
cmpq $0x40000000, -0x6098(%rbp) # imm = 0x40000000
jge 0xb78b3
leaq -0x50(%rbp), %rdi
cvtsi2sdq -0x6098(%rbp), %xmm0
movsd 0xf2a6(%rip), %xmm1     # 0xc6b40
divsd %xmm1, %xmm0
movl $0x40, %esi
leaq 0xfe2e(%rip), %rdx      # 0xc76d8
movb $0x1, %al
callq 0xb3c50
jmp 0xb78df
leaq -0x50(%rbp), %rdi
cvtsi2sdq -0x6098(%rbp), %xmm0
movsd 0xf270(%rip), %xmm1     # 0xc6b38
divsd %xmm1, %xmm0
movl $0x40, %esi
leaq 0xfe06(%rip), %rdx      # 0xc76de
movb $0x1, %al
callq 0xb3c50
jmp 0xb78e1
jmp 0xb78e3
jmp 0xb78e5
movq -0x8(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x60b0(%rbp)
leaq -0x90(%rbp), %rax
movq %rax, -0x60c0(%rbp)
leaq -0x60b0(%rbp), %rdi
callq 0xd8b0
movq -0x60c0(%rbp), %rdi
movq %rax, %rcx
movl $0x40, %esi
leaq 0xfdc0(%rip), %rdx      # 0xc76e4
callq 0xdb40
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x60b8(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xd550
movq -0x60b8(%rbp), %rdi
movq %rax, %rsi
leaq -0x6090(%rbp), %rdx
movl $0x6000, %ecx           # imm = 0x6000
callq 0xb21e0
movq -0x8(%rbp), %rax
movq (%rax), %rdi
addq $0x8, %rdi
leaq -0x6090(%rbp), %rdx
movq -0x60a8(%rbp), %rcx
movq -0x8(%rbp), %rax
movq 0x8(%rax), %r8
movq -0x60a8(%rbp), %r9
leaq -0x90(%rbp), %r10
leaq -0x50(%rbp), %rax
leaq 0xfd59(%rip), %rsi      # 0xc76f3
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x0, %al
callq 0xb1bf0
addq $0x60d0, %rsp           # imm = 0x60D0
popq %rbp
retq
nopw %cs:(%rax,%rax)