// File: /workspace/github_c_makefile_star2_O2/coyove[P]chann/./lib/mongoose/mongoose.c
// Function: mg_send_file_internal
void mg_send_file_internal(struct mg_connection *c, const char *file_name,
                           file_stat_t *st, int exists,
                           const char *extra_headers) {
  struct connection *conn = MG_CONN_2_CONN(c);
  char path[MAX_PATH_SIZE];
  const int is_directory = S_ISDIR(st->st_mode);
#ifndef MONGOOSE_NO_CGI
  const char *cgi_pat = conn->server->config_options[CGI_PATTERN];
#else
  const char *cgi_pat = DEFAULT_CGI_PATTERN;
#endif
#ifndef MONGOOSE_NO_DIRECTORY_LISTING
  const char *dir_lst = conn->server->config_options[ENABLE_DIRECTORY_LISTING];
#else
  const char *dir_lst = "yes";
#endif

  mg_snprintf(path, sizeof(path), "%s", file_name);

  if (!exists || must_hide_file(conn, path)) {
    send_http_error(conn, 404, NULL);
  } else if (is_directory &&
             conn->mg_conn.uri[strlen(conn->mg_conn.uri) - 1] != '/') {
    conn->mg_conn.status_code = 301;
    mg_printf(&conn->mg_conn, "HTTP/1.1 301 Moved Permanently\r\n"
              "Location: %s/\r\n\r\n", conn->mg_conn.uri);
    close_local_endpoint(conn);
  } else if (is_directory && !find_index_file(conn, path, sizeof(path), st)) {
    if (!mg_strcasecmp(dir_lst, "yes")) {
#ifndef MONGOOSE_NO_DIRECTORY_LISTING
      send_directory_listing(conn, path);
#else
      send_http_error(conn, 501, NULL);
#endif
    } else {
      send_http_error(conn, 403, NULL);
    }
  } else if (mg_match_prefix(cgi_pat, strlen(cgi_pat), path) > 0) {
#if !defined(MONGOOSE_NO_CGI)
    open_cgi_endpoint(conn, path);
#else
    send_http_error(conn, 501, NULL);
#endif // !MONGOOSE_NO_CGI
#ifndef MONGOOSE_NO_SSI
  } else if (mg_match_prefix(conn->server->config_options[SSI_PATTERN],
                             strlen(conn->server->config_options[SSI_PATTERN]),
                             path) > 0) {
    handle_ssi_request(conn, path);
#endif
  } else if (is_not_modified(conn, st)) {
    send_http_error(conn, 304, NULL);
  } else if ((conn->endpoint.fd = open(path, O_RDONLY | O_BINARY, 0)) != -1) {
    // O_BINARY is required for Windows, otherwise in default text mode
    // two bytes \r\n will be read as one.
    open_file_endpoint(conn, path, st, extra_headers);
  } else {
    send_http_error(conn, 404, NULL);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa2e8, %rsp           # imm = 0xA2E8
movq %r8, -0x78(%rbp)
movl %ecx, %r14d
movq %rsi, %rcx
movq %rdi, %r13
movl $0xf000, %ebx           # imm = 0xF000
movq %rdx, -0x40(%rbp)
andl 0x18(%rdx), %ebx
leaq -0x8(%rdi), %r12
movq 0x2a0(%rdi), %rax
movq 0x58(%rax), %r15
movq 0x78(%rax), %rax
movq %rax, -0x48(%rbp)
leaq 0xb761(%rip), %rdx      # 0x6632f
leaq -0x2310(%rbp), %rdi
movl $0x2000, %esi           # imm = 0x2000
xorl %eax, %eax
callq 0x5bc9e
testl %r14d, %r14d
je 0x5abf9
leaq -0x2310(%rbp), %rsi
movq %r12, %rdi
callq 0x5bd11
testl %eax, %eax
je 0x5ac1c
movq %r12, %rdi
movl $0x194, %esi            # imm = 0x194
xorl %edx, %edx
xorl %eax, %eax
callq 0x5bd71
addq $0xa2e8, %rsp           # imm = 0xA2E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4000, %ebx           # imm = 0x4000
jne 0x5ad49
movq 0x8(%r13), %r14
movq %r14, %rdi
callq 0xc470
cmpb $0x2f, -0x1(%r14,%rax)
jne 0x5ac81
movq %r12, -0x38(%rbp)
movq %r13, -0x30(%rbp)
movq 0x2a0(%r13), %rax
movq 0xa8(%rax), %r13
leaq -0x2310(%rbp), %rdi
callq 0xc470
movq %rax, %r12
addq $-0x1ffe, %r12          # imm = 0xE002
cmpq $-0x1ffe, %r12          # imm = 0xE002
je 0x5aca5
cmpb $0x2f, -0x313(%rbp,%r12)
jne 0x5aca5
decq %r12
jmp 0x5ac68
movl $0x12d, 0x27c(%r13) # imm = 0x12D
leaq 0xd71c(%rip), %rsi      # 0x683af
movq %r13, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x58c06
jmp 0x5b7dd
leaq (%r12,%rbp), %rax
addq $-0x311, %rax           # imm = 0xFCEF
movq %rax, -0x70(%rbp)
movb $0x2f, -0x1(%rax)
movq %r12, %rbx
negq %rbx
movq %r13, %rdi
leaq -0x4310(%rbp), %rsi
xorl %edx, %edx
callq 0x5c8fa
testq %rax, %rax
je 0x5afeb
movq %rax, %r13
cmpq $-0x2000, %r12          # imm = 0xE000
jb 0x5acbd
movq -0x4308(%rbp), %r14
cmpq %rbx, %r14
ja 0x5acbd
movq -0x4310(%rbp), %rsi
movq -0x70(%rbp), %rdi
movq %r14, %rdx
callq 0xc1e0
leaq (%r14,%rbp), %rax
addq $-0x2310, %rax          # imm = 0xDCF0
movb $0x0, 0x1fff(%r12,%rax)
leaq -0x2310(%rbp), %rdi
leaq -0xa310(%rbp), %rsi
callq 0xcba0
testl %eax, %eax
jne 0x5acbd
leaq -0xa310(%rbp), %rsi
movl $0x90, %edx
movq -0x40(%rbp), %rdi
callq 0xc0f0
movq -0x38(%rbp), %r12
movq -0x30(%rbp), %r13
movq %r13, -0x30(%rbp)
movq %r15, %rdi
callq 0xc470
leaq -0x2310(%rbp), %r13
movq %r15, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x58e6c
testl %eax, %eax
jle 0x5af24
movq %r12, -0x38(%rbp)
movq -0x30(%rbp), %r15
movq 0x2a0(%r15), %r14
leaq -0xa310(%rbp), %rbx
andq $0x0, 0x2208(%rbx)
movq %r15, (%rbx)
leaq 0xe0bc(%rip), %rdi      # 0x68e56
callq 0xc870
leaq 0x50(%r15), %rdx
testq %rax, %rax
cmovneq %rax, %rdx
leaq 0xe0b1(%rip), %rsi      # 0x68e62
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
movq 0x70(%r14), %rdx
leaq 0xe0ab(%rip), %rsi      # 0x68e71
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
movq 0x70(%r14), %rdx
leaq 0xe0a5(%rip), %rsi      # 0x68e80
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
leaq 0xe0a5(%rip), %rsi      # 0x68e91
leaq 0xe0b4(%rip), %rdx      # 0x68ea7
leaq 0xe0b6(%rip), %rcx      # 0x68eb0
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
leaq 0xb524(%rip), %r14      # 0x6632f
leaq 0xe0a2(%rip), %rdx      # 0x68eb4
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x5d5bf
leaq 0xe0a8(%rip), %rdx      # 0x68ece
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x5d5bf
leaq 0xe0ad(%rip), %rdx      # 0x68ee7
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x5d5bf
movq (%r15), %rdx
leaq 0xe0aa(%rip), %rsi      # 0x68efb
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
leaq 0x20(%r15), %rdx
leaq 0xe0a7(%rip), %rsi      # 0x68f0d
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
movzwl 0x80(%r15), %edx
leaq 0xe09d(%rip), %rsi      # 0x68f1c
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
movq 0x8(%r15), %rdx
movq 0x18(%r15), %r8
testq %r8, %r8
leaq 0xc7b7(%rip), %rax      # 0x67652
leaq 0xa814(%rip), %rcx      # 0x656b6
cmoveq %rax, %rcx
movq %rax, -0x40(%rbp)
cmoveq %rax, %r8
leaq 0xe076(%rip), %rsi      # 0x68f2b
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
movq 0x2b8(%r15), %rbx
testq %rbx, %rbx
je 0x5b01c
movq 0x8(%r15), %r14
movq %r14, %rdi
callq 0xc470
movq %rax, %r12
movq %rbx, %rdi
callq 0xc470
subl %eax, %r12d
leaq 0xe04e(%rip), %rsi      # 0x68f3e
leaq -0xa310(%rbp), %rbx
movq %rbx, %rdi
movl %r12d, %edx
movq %r14, %rcx
xorl %eax, %eax
callq 0x5d5bf
movq 0x2b8(%r15), %rdx
leaq 0xe03a(%rip), %rsi      # 0x68f4f
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
jmp 0x5b06c
movq -0x30(%rbp), %r13
movq 0x2a0(%r13), %rax
movq 0xc0(%rax), %rbx
movq %rbx, %rdi
callq 0xc470
leaq -0x2310(%rbp), %rdx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x58e6c
testl %eax, %eax
jle 0x5b3e9
leaq 0x6576(%rip), %rsi      # 0x614d5
leaq -0x2310(%rbp), %rdi
callq 0xcbb0
testq %rax, %rax
je 0x5b572
movq %rax, %rbx
movq %rax, %rdi
callq 0xcce0
movl %eax, %edi
callq 0x579bd
movq 0x2a0(%r13), %rdi
leaq -0x2310(%rbp), %r14
leaq -0xa310(%rbp), %r15
movq %r14, %rsi
movq %r15, %rdx
callq 0x5d707
movl $0xc8, 0x27c(%r13)
movl 0x8(%r15), %ecx
movq (%r15), %r8
leaq 0xe169(%rip), %rsi      # 0x69128
movq %r13, %rdi
movl $0xc8, %edx
xorl %eax, %eax
callq 0x58c06
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x5d7aa
movq %rbx, %rdi
callq 0xc4c0
jmp 0x5b7dd
movw $0x2f, -0x312(%rbp,%r12)
leaq 0x9556(%rip), %rsi      # 0x64553
movq -0x48(%rbp), %rdi
callq 0x58e28
testl %eax, %eax
je 0x5b548
movq -0x38(%rbp), %rdi
movl $0x193, %esi            # imm = 0x193
jmp 0x5ac01
pushq $0x2f
popq %rbx
movq %r13, %rdi
movl %ebx, %esi
callq 0xca80
movq %rax, %r14
movq 0x8(%r15), %r12
movq %r12, %rdi
movl %ebx, %esi
callq 0xca80
movl %eax, %edx
subl %r12d, %edx
testq %rax, %rax
movl $0x0, %eax
cmovel %eax, %edx
testq %r14, %r14
cmoveq %r13, %r14
leaq 0xdf04(%rip), %rsi      # 0x68f5c
leaq -0xa310(%rbp), %rdi
movq %r12, %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x5d5bf
leaq 0xdefc(%rip), %rsi      # 0x68f6f
leaq -0xa310(%rbp), %rbx
leaq -0x2310(%rbp), %r14
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x5d5bf
leaq 0xdeed(%rip), %rsi      # 0x68f82
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x5d5bf
movq -0x8(%r15), %rax
cmpq $0x0, 0x70(%rax)
leaq 0x6b84(%rip), %rax      # 0x61c36
leaq 0xd83b(%rip), %rdx      # 0x688f4
cmoveq %rax, %rdx
leaq 0xded1(%rip), %rsi      # 0x68f95
movq %rbx, %rdi
xorl %eax, %eax
callq 0x5d5bf
leaq 0x6853(%rip), %rsi      # 0x61928
movq %r15, %rdi
callq 0x58dc0
testq %rax, %rax
je 0x5b0fa
leaq 0xdeb5(%rip), %rsi      # 0x68f9e
leaq -0xa310(%rbp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5d5bf
movq 0x18(%r15), %rdx
testq %rdx, %rdx
je 0x5b118
leaq 0xdea4(%rip), %rsi      # 0x68fae
leaq -0xa310(%rbp), %rdi
xorl %eax, %eax
callq 0x5d5bf
leaq 0x9825(%rip), %rsi      # 0x64944
movq %r15, %rdi
callq 0x58dc0
testq %rax, %rax
je 0x5b144
leaq 0xde8b(%rip), %rsi      # 0x68fbe
leaq -0xa310(%rbp), %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x5d5bf
leaq 0xb749(%rip), %rsi      # 0x66894
movq %rbx, %rdi
callq 0x5d6cd
leaq 0xde76(%rip), %rsi      # 0x68fd0
movq %rbx, %rdi
callq 0x5d6cd
leaq 0xde6b(%rip), %rsi      # 0x68fd4
movq %rbx, %rdi
callq 0x5d6cd
leaq 0xc7ed(%rip), %rsi      # 0x67965
movq %rbx, %rdi
callq 0x5d6cd
leaq 0xde52(%rip), %rsi      # 0x68fd9
movq %rbx, %rdi
callq 0x5d6cd
leaq 0xde4b(%rip), %rsi      # 0x68fe1
movq %rbx, %rdi
callq 0x5d6cd
leaq 0xde49(%rip), %rsi      # 0x68fee
movq %rbx, %rdi
callq 0x5d6cd
leaq 0x88(%r15), %r13
leaq 0xde43(%rip), %r12      # 0x68ffe
xorl %r15d, %r15d
movq -0x30(%rbp), %rax
movslq 0x84(%rax), %rax
cmpq %rax, %r15
jge 0x5b228
movq %r15, %rax
shlq $0x4, %rax
movq (%r13,%rax), %rdx
movq 0x8(%r13,%rax), %rcx
leaq -0xa310(%rbp), %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x5d5bf
movq %rax, %r14
movzbl (%r14), %ebx
cmpl $0x2d, %ebx
je 0x5b207
testl %ebx, %ebx
je 0x5b223
cmpl $0x3d, %ebx
jne 0x5b20d
jmp 0x5b223
movb $0x5f, (%r14)
movb $0x5f, %bl
callq 0xc360
movq (%rax), %rax
movzbl %bl, %ecx
movb (%rax,%rcx,4), %al
movb %al, (%r14)
incq %r14
jmp 0x5b1f3
incq %r15
jmp 0x5b1be
movslq -0x8104(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, -0x8104(%rbp)
andq $0x0, -0x8308(%rbp,%rax,8)
movslq -0x8108(%rbp), %rax
leal 0x1(%rax), %ecx
movl %ecx, -0x8108(%rbp)
movb $0x0, -0xa308(%rbp,%rax)
cmpl $0x40, -0x8104(%rbp)
jge 0x5bb60
movl -0x8108(%rbp), %eax
testl %eax, %eax
movq -0x30(%rbp), %r13
jle 0x5bb7f
cmpl $0x2000, %eax           # imm = 0x2000
jae 0x5bb9e
leaq -0x2310(%rbp), %rdi
pushq $0x2f
popq %rsi
callq 0xca80
testq %rax, %rax
je 0x5b2bf
leaq -0x2310(%rbp), %r8
subl %r8d, %eax
leaq 0x6f38(%rip), %rdx      # 0x621e0
leaq -0x4310(%rbp), %rdi
movl $0x2000, %esi           # imm = 0x2000
movl %eax, %ecx
xorl %eax, %eax
callq 0x5bc9e
jmp 0x5b2e0
leaq 0xb069(%rip), %rdx      # 0x6632f
leaq 0xa3cb(%rip), %rcx      # 0x65698
leaq -0x4310(%rbp), %rdi
movl $0x2000, %esi           # imm = 0x2000
xorl %eax, %eax
callq 0x5bc9e
leaq -0x8308(%rbp), %rbx
xorl %r15d, %r15d
leaq -0x110(%rbp), %r12
movq %r12, %rdi
callq 0x57b2a
movl -0x110(%rbp), %r14d
cmpl $-0x1, %r14d
jne 0x5b313
leal 0x1(%r15), %eax
cmpl $0x9, %r15d
movl %eax, %r15d
jb 0x5b2f1
cmpl $-0x1, %r14d
jne 0x5b338
pushq $-0x1
popq %rdi
callq 0xc2b0
leaq 0xdb17(%rip), %rdx      # 0x68e3f
movq -0x38(%rbp), %rdi
movl $0x1f4, %esi            # imm = 0x1F4
xorl %eax, %eax
callq 0x5bd71
movq 0x2a0(%r13), %rax
movq 0x50(%rax), %r12
movq %r13, %r15
movl -0x10c(%rbp), %r13d
callq 0xcb00
testl %eax, %eax
je 0x5bbbd
movl $0x2, 0x2b0(%r15)
movq 0x2a0(%r15), %rdi
leaq -0xcd8(%rip), %rdx      # 0x5a69b
movl %r14d, %esi
movq -0x38(%rbp), %rcx
callq 0x57edd
movq %rax, 0x2a8(%r15)
orb $0x40, 0xa2(%rax)
movq -0x8(%r15), %rdi
leaq 0xcd28(%rip), %rsi      # 0x680c0
pushq $0x11
popq %rdx
callq 0x57905
movl $0xc8, 0x27c(%r15)
movq -0x8(%r15), %rax
orl $0x2, 0xa0(%rax)
movq 0x2a8(%r15), %rcx
movups 0x40(%rax), %xmm0
movups %xmm0, 0x58(%rcx)
movq 0x50(%rax), %rax
movq %rax, 0x68(%rcx)
movq -0x8(%r15), %rdi
addq $0x40, %rdi
xorl %esi, %esi
callq 0x5766d
movl %r13d, %edi
callq 0xc2b0
jmp 0x5ac0a
leaq 0x6067(%rip), %rsi      # 0x61457
movq %r13, %rdi
callq 0x58dc0
movq %rax, %rbx
leaq 0xded2(%rip), %rsi      # 0x692d4
movq %r13, %rdi
callq 0x58dc0
movq %rax, %r14
leaq -0xa310(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x5dccb
testq %r14, %r14
je 0x5b439
leaq -0xa310(%rbp), %rdi
movq %r14, %rsi
callq 0x58e28
testl %eax, %eax
je 0x5b983
testq %rbx, %rbx
je 0x5b878
movq %r12, -0x38(%rbp)
movq -0x40(%rbp), %rax
movq 0x58(%rax), %r15
leaq -0x310(%rbp), %r12
leaq -0x110(%rbp), %r13
leaq 0xde89(%rip), %rsi      # 0x692ec
leaq -0x60(%rbp), %rdx
leaq -0x4310(%rbp), %rcx
leaq -0x50(%rbp), %r8
leaq -0xd0(%rbp), %r9
movq %rbx, %rdi
xorl %eax, %eax
pushq %r12
pushq %r13
callq 0xc110
popq %rcx
popq %rdx
cmpl $0x6, %eax
je 0x5b4f6
leaq 0xde70(%rip), %rsi      # 0x69305
leaq -0x60(%rbp), %rdx
leaq -0x4310(%rbp), %rcx
leaq -0x50(%rbp), %r8
leaq -0xd0(%rbp), %r9
movq %rbx, %rdi
xorl %eax, %eax
pushq %r12
pushq %r13
callq 0xc110
popq %rcx
popq %rdx
cmpl $0x6, %eax
je 0x5b4f6
leaq 0xde38(%rip), %rsi      # 0x692ff
leaq -0x60(%rbp), %rdx
leaq -0x4310(%rbp), %rcx
leaq -0x50(%rbp), %r8
leaq -0xd0(%rbp), %r9
movq %rbx, %rdi
xorl %eax, %eax
pushq %r12
pushq %r13
callq 0xc110
popq %rcx
popq %rdx
cmpl $0x6, %eax
jne 0x5b990
movl -0x50(%rbp), %ebx
cmpl $0x7b3, %ebx            # imm = 0x7B3
jl 0x5b7ee
movq %r15, -0x48(%rbp)
leaq 0xcbe8(%rip), %r15      # 0x680f8
leaq -0x4310(%rbp), %r14
xorl %r12d, %r12d
movq %r15, %r13
cmpq $0x18, %r12
je 0x5b7ea
movslq (%r13), %rsi
addq %r15, %rsi
movq %r14, %rdi
callq 0xc970
testl %eax, %eax
je 0x5b7f2
addq $0x4, %r13
addq $0x2, %r12
jmp 0x5b51d
andq $0x0, -0xd0(%rbp)
movq -0x30(%rbp), %r14
movq 0x18(%r14), %rax
testq %rax, %rax
movq -0x38(%rbp), %r12
je 0x5b5a3
xorl %ecx, %ecx
cmpb $0x64, 0x1(%rax)
setne %cl
leal (%rcx,%rcx,2), %ebx
addl $0x61, %ebx
jmp 0x5b5a6
callq 0xcb50
movl (%rax), %edi
callq 0xc8d0
leaq 0xdd12(%rip), %rdx      # 0x69297
leaq -0x2310(%rbp), %rcx
movq %r12, %rdi
movl $0x1f4, %esi            # imm = 0x1F4
movq %rax, %r8
xorl %eax, %eax
callq 0x5bd71
jmp 0x5ac0a
pushq $0x64
popq %rbx
leaq 0xd2d8(%rip), %rsi      # 0x68885
leaq 0xd2e3(%rip), %rdx      # 0x68897
movq %r14, %rdi
callq 0x59518
leaq 0x6365(%rip), %rsi      # 0x61928
leaq 0xd6ba(%rip), %rdx      # 0x68c84
movq %r14, %rdi
callq 0x59518
movq 0x8(%r14), %rcx
subq $0x8, %rsp
leaq 0xd6bc(%rip), %rsi      # 0x68c9d
xorl %r15d, %r15d
movq %r14, %rdi
movq %rcx, %rdx
movl %ebx, %r8d
movl %ebx, %r9d
xorl %eax, %eax
pushq %rbx
callq 0x59649
popq %rcx
popq %rdx
leaq -0x2310(%rbp), %rsi
leaq -0xd0(%rbp), %rbx
movq %r12, %rdi
movq %rbx, %rdx
callq 0x5d37d
movq (%rbx), %r14
testq %r14, %r14
je 0x5b7d5
movslq %eax, %rbx
leaq 0x1ed5(%rip), %rcx      # 0x5d4fe
movl $0xa0, %edx
movq %r14, %rdi
movq %rbx, %rsi
callq 0xc820
testl %ebx, %ebx
cmovlel %r15d, %ebx
imulq $0xa0, %rbx, %rax
movq %rax, -0x30(%rbp)
xorl %r12d, %r12d
leaq -0x4310(%rbp), %rdi
cmpq %r12, -0x30(%rbp)
je 0x5b7c9
movl 0x28(%r14,%r12), %eax
movl $0xf000, %ecx           # imm = 0xF000
andl %ecx, %eax
cmpl $0x4000, %eax           # imm = 0x4000
jne 0x5b699
pushq $0x40
popq %r13
movq %r13, %rsi
leaq 0xacb0(%rip), %rdx      # 0x6632f
leaq 0xd739(%rip), %rcx      # 0x68dbf
xorl %eax, %eax
callq 0x5bc9e
leaq 0xdef8(%rip), %rbx      # 0x6958c
jmp 0x5b71d
movq 0x40(%r14,%r12), %rcx
cmpq $0x3ff, %rcx            # imm = 0x3FF
pushq $0x40
popq %r13
jg 0x5b6be
movq %r13, %rsi
leaq 0x6940(%rip), %rdx      # 0x61ff5
xorl %eax, %eax
callq 0x5bc9e
jmp 0x5b716
cvtsi2sd %rcx, %xmm0
cmpq $0xfffff, %rcx          # imm = 0xFFFFF
ja 0x5b6e0
mulsd 0xcb5c(%rip), %xmm0     # 0x68230
movq %r13, %rsi
leaq 0xd6ed(%rip), %rdx      # 0x68dcb
jmp 0x5b70f
cmpq $0x3fffffff, %rcx       # imm = 0x3FFFFFFF
ja 0x5b6fd
mulsd 0xcb37(%rip), %xmm0     # 0x68228
movq %r13, %rsi
leaq 0xd6d6(%rip), %rdx      # 0x68dd1
jmp 0x5b70f
mulsd 0xcb1b(%rip), %xmm0     # 0x68220
movq %r13, %rsi
leaq 0xd6c8(%rip), %rdx      # 0x68dd7
movb $0x1, %al
callq 0x5bc9e
leaq 0xbf35(%rip), %rbx      # 0x67652
movq 0x68(%r14,%r12), %rax
movq %rax, -0x110(%rbp)
leaq -0x110(%rbp), %rdi
callq 0xc7a0
leaq -0x310(%rbp), %rdi
movq %r13, %rsi
leaq 0xd697(%rip), %rdx      # 0x68ddd
movq %rax, %rcx
callq 0xca00
movq 0x8(%r14,%r12), %r13
movq %r13, %rdi
callq 0xc470
movl $0x6000, %ecx           # imm = 0x6000
movq %r13, %rdi
movq %rax, %rsi
movq %r14, %r15
leaq -0xa310(%rbp), %r14
movq %r14, %rdx
callq 0x599d1
movq (%r15,%r12), %rdi
addq $0x8, %rdi
leaq 0xd665(%rip), %rsi      # 0x68dec
movq %r14, %rdx
movq %r15, %r14
movq %rbx, %rcx
movq %r13, %r8
movq %rbx, %r9
xorl %eax, %eax
leaq -0x4310(%rbp), %rbx
pushq %rbx
leaq -0x310(%rbp), %r10
pushq %r10
callq 0x59649
popq %rcx
popq %rdx
movq 0x8(%r15,%r12), %rdi
callq 0xc250
addq $0xa0, %r12
movq %rbx, %rdi
jmp 0x5b654
movq %r14, %rdi
callq 0xc250
movq -0x38(%rbp), %r12
movq %r12, %rdi
callq 0x5d5a0
movq %r12, %rdi
callq 0x59b05
jmp 0x5ac0a
movq -0x48(%rbp), %r15
xorl %ecx, %ecx
jmp 0x5b867
pushq $0x4
popq %rcx
movl %ebx, %eax
cltd
idivl %ecx
movl %eax, %ecx
pushq $-0x64
popq %rsi
movl %ebx, %eax
cltd
idivl %esi
movl %eax, %esi
movl $0x190, %edi            # imm = 0x190
movl %ebx, %eax
cltd
idivl %edi
imull $0x16d, %ebx, %edx      # imm = 0x16D
leaq 0xc8c3(%rip), %rdi      # 0x680e0
movzwl (%r12,%rdi), %edi
addl %ecx, %edx
addl %esi, %eax
addl %edx, %eax
addl %edi, %eax
addl -0x60(%rbp), %eax
imull $0x15180, %eax, %eax    # imm = 0x15180
addl $0x868b8400, %eax       # imm = 0x868B8400
movslq -0xd0(%rbp), %rcx
imulq $0xe10, %rcx, %rcx      # imm = 0xE10
cltq
movslq -0x110(%rbp), %rdx
imulq $0x3c, %rdx, %rdx
addq %rcx, %rdx
movslq -0x310(%rbp), %rcx
addq %rdx, %rcx
addq %rax, %rcx
movq -0x48(%rbp), %r15
cmpq %rcx, %r15
movq -0x38(%rbp), %r12
movq -0x30(%rbp), %r13
jle 0x5b983
leaq -0x2310(%rbp), %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %eax, %eax
callq 0xcd60
movl %eax, 0x2a8(%r13)
cmpl $-0x1, %eax
je 0x5abf9
xorl %edi, %edi
callq 0xc850
movq %rax, -0x88(%rbp)
movl $0x1, 0x2b0(%r13)
movl 0x2a8(%r13), %edi
callq 0x579bd
movl $0xc8, 0x27c(%r13)
movq 0x2a0(%r13), %rdi
leaq -0x2310(%rbp), %rsi
leaq -0x60(%rbp), %rdx
callq 0x5d707
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, 0x2d0(%r13)
andq $0x0, -0x80(%rbp)
movb $0x0, -0xd0(%rbp)
andq $0x0, -0x68(%rbp)
leaq 0xdecb(%rip), %rsi      # 0x697d3
movq %r13, %rdi
callq 0x58dc0
leaq 0xcbc2(%rip), %rbx      # 0x684d9
testq %rax, %rax
je 0x5ba29
leaq -0x68(%rbp), %r14
leaq -0x80(%rbp), %r15
movq %rax, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x5dcf0
testl %eax, %eax
setg %dl
movq (%r14), %rcx
testq %rcx, %rcx
setns %dil
andb %dl, %dil
movq (%r15), %rsi
testq %rsi, %rsi
setns %dl
andb %dil, %dl
cmpb $0x1, %dl
jne 0x5ba29
movl $0xce, 0x27c(%r13)
movq 0x2d0(%r13), %rdx
cmpl $0x2, %eax
jne 0x5b9df
cmpq %rdx, %rsi
cmovlq %rsi, %rdx
subq %rcx, %rdx
incq %rdx
jmp 0x5b9e2
movq %r12, %rdi
movl $0x130, %esi            # imm = 0x130
jmp 0x5ac01
leaq 0xd981(%rip), %rsi      # 0x69318
leaq -0x60(%rbp), %rdx
leaq -0x4310(%rbp), %rcx
leaq -0x50(%rbp), %r14
leaq -0xd0(%rbp), %r9
movq %rbx, %rdi
movq %r14, %r8
xorl %eax, %eax
pushq %r12
pushq %r13
callq 0xc110
popq %rcx
popq %rdx
cmpl $0x6, %eax
sete %al
movl (%r14), %ebx
cmpl $0x7b3, %ebx            # imm = 0x7B3
setge %cl
testb %cl, %al
jne 0x5b505
jmp 0x5b7ee
subq %rcx, %rdx
movq %rdx, 0x2d0(%r13)
leaq (%rcx,%rdx), %r8
decq %r8
movq -0x40(%rbp), %rax
movq 0x30(%rax), %r9
leaq 0xd958(%rip), %rdx      # 0x69357
leaq -0xd0(%rbp), %rdi
pushq $0x40
popq %rsi
xorl %eax, %eax
callq 0x5bc9e
movl 0x2a8(%r13), %edi
movq -0x68(%rbp), %rsi
xorl %edx, %edx
callq 0xca70
leaq 0xcafb(%rip), %rbx      # 0x68524
movq %rbx, -0x48(%rbp)
leaq -0x4310(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x5dd09
movq -0x40(%rbp), %rbx
movq 0x58(%rbx), %rax
leaq -0x50(%rbp), %rsi
movq %rax, (%rsi)
leaq -0x310(%rbp), %rdi
callq 0x5dd09
leaq -0x110(%rbp), %rdi
movq %rbx, %rsi
callq 0x5dccb
movq -0x30(%rbp), %rax
movl 0x27c(%rax), %r13d
movl -0x58(%rbp), %r15d
movq -0x60(%rbp), %rbx
movq -0x30(%rbp), %rax
movq 0x2d0(%rax), %r12
movq -0x30(%rbp), %rdi
callq 0x5dd35
testl %eax, %eax
leaq 0xb90e(%rip), %rax      # 0x673a8
leaq 0xd976(%rip), %r10      # 0x69417
cmoveq %rax, %r10
movq -0x78(%rbp), %r14
testq %r14, %r14
leaq 0xbb9f(%rip), %r11      # 0x67652
cmoveq %r11, %r14
subq $0x8, %rsp
leaq 0xd8b8(%rip), %rdx      # 0x6937a
leaq -0xa310(%rbp), %rdi
movl $0x3e8, %esi            # imm = 0x3E8
movl %r13d, %ecx
movq -0x30(%rbp), %r13
movq -0x48(%rbp), %r8
leaq -0x4310(%rbp), %r9
xorl %eax, %eax
pushq %r11
pushq %r14
leaq -0xd0(%rbp), %r11
pushq %r11
pushq %r10
pushq %r12
pushq %rbx
pushq %r15
leaq -0x110(%rbp), %r10
pushq %r10
leaq -0x310(%rbp), %r10
pushq %r10
callq 0x5bc9e
addq $0x50, %rsp
movq -0x8(%r13), %rdi
movslq %eax, %rdx
leaq -0xa310(%rbp), %rsi
callq 0x57905
movq (%r13), %rdi
leaq 0x8cb7(%rip), %rsi      # 0x647e6
callq 0xc970
testl %eax, %eax
jne 0x5ac0a
movq -0x8(%r13), %rax
orl $0x1, 0xa0(%rax)
movl 0x2a8(%r13), %edi
callq 0xc2b0
andl $0x0, 0x2b0(%r13)
jmp 0x5ac0a
leaq 0xd4a2(%rip), %rdi      # 0x69009
leaq 0xc6d5(%rip), %rsi      # 0x68243
leaq 0xd4bd(%rip), %rcx      # 0x69032
movl $0x904, %edx            # imm = 0x904
callq 0xc220
leaq 0xd504(%rip), %rdi      # 0x6908a
leaq 0xc6b6(%rip), %rsi      # 0x68243
leaq 0xd49e(%rip), %rcx      # 0x69032
movl $0x905, %edx            # imm = 0x905
callq 0xc220
leaq 0xd4f2(%rip), %rdi      # 0x69097
leaq 0xc697(%rip), %rsi      # 0x68243
leaq 0xd47f(%rip), %rcx      # 0x69032
movl $0x906, %edx            # imm = 0x906
callq 0xc220
leaq -0x4310(%rbp), %rdi
callq 0xcd20
movl %r13d, %edi
xorl %esi, %esi
callq 0xc690
pushq $0x1
popq %rsi
movl %r13d, %edi
callq 0xc690
movl %r13d, %edi
callq 0xc2b0
pushq $0x11
popq %rdi
xorl %esi, %esi
callq 0xc3f0
testq %r12, %r12
jne 0x5bc14
leaq -0x2310(%rbp), %rdi
movq %rdi, %rsi
xorl %edx, %edx
movq %rbx, %rcx
xorl %eax, %eax
callq 0xca50
leaq 0xba40(%rip), %r12      # 0x67652
jmp 0x5bc38
leaq -0x2310(%rbp), %rdx
movq %r12, %rdi
movq %r12, %rsi
xorl %ecx, %ecx
movq %rbx, %r8
xorl %eax, %eax
callq 0xca50
leaq 0xbecd(%rip), %rax      # 0x67b01
movq %rax, -0x40(%rbp)
callq 0xcb50
movl (%rax), %edi
callq 0xc8d0
movq %rax, %r10
subq $0x8, %rsp
leaq 0xd4aa(%rip), %rdx      # 0x690fc
leaq -0x310(%rbp), %rbx
leaq -0x2310(%rbp), %r9
movl $0x1f4, %esi            # imm = 0x1F4
movq %rbx, %rdi
movq %r12, %rcx
movq -0x40(%rbp), %r8
xorl %eax, %eax
pushq %r10
callq 0xc5e0
popq %rcx
popq %rdx
movq %rbx, %rdi
callq 0xc470
pushq $0x1
popq %r14
movl %r14d, %edi
movq %rbx, %rsi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xc3e0
movl %r14d, %edi
callq 0xc7e0