// File: /workspace/github_c_makefile_star2_O0/c-zhou[P]yahs/yahs.c
// Function: default_nr
static int default_nr(char *fai, uint32_t ml)
{
    int i, max_res, nr;
    int64_t genome_size;
    genome_size = 0;
    sdict_t *sdict = make_sdict_from_index(fai, ml);
    for (i = 0; i < sdict->n; ++i)
        genome_size += sdict->s[i].len;
    sd_destroy(sdict);
    
    max_res = 0;
    if (genome_size < 100000000)
        max_res = 1000000;
    else if (genome_size < 200000000)
        max_res = 2000000;
    else if (genome_size < 500000000)
        max_res = 5000000;
    else if (genome_size < 1000000000)
        max_res = 10000000;
    else if (genome_size < 2000000000)
        max_res = 20000000;
    else if (genome_size < 5000000000)
        max_res = 50000000;
    else if (genome_size < 10000000000)
        max_res = 100000000;
    else if (genome_size < 20000000000)
        max_res = 200000000;
    else
        max_res = 500000000;

    nr = 0;
    while (nr < sizeof(default_resolutions) / sizeof(int) && default_resolutions[nr] <= max_res)
        ++nr;

    return nr;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq $0x0, -0x20(%rbp)
movq -0x8(%rbp), %rdi
movl -0xc(%rbp), %esi
callq 0x17660
movq %rax, -0x28(%rbp)
movl $0x0, -0x10(%rbp)
movl -0x10(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl (%rcx), %eax
jae 0x2fbe2
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x10(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movl 0x10(%rax), %eax
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x2fbae
movq -0x28(%rbp), %rdi
callq 0x16650
movl $0x0, -0x14(%rbp)
cmpq $0x5f5e100, -0x20(%rbp) # imm = 0x5F5E100
jge 0x2fc08
movl $0xf4240, -0x14(%rbp)   # imm = 0xF4240
jmp 0x2fcba
cmpq $0xbebc200, -0x20(%rbp) # imm = 0xBEBC200
jge 0x2fc1e
movl $0x1e8480, -0x14(%rbp)  # imm = 0x1E8480
jmp 0x2fcb8
cmpq $0x1dcd6500, -0x20(%rbp) # imm = 0x1DCD6500
jge 0x2fc34
movl $0x4c4b40, -0x14(%rbp)  # imm = 0x4C4B40
jmp 0x2fcb6
cmpq $0x3b9aca00, -0x20(%rbp) # imm = 0x3B9ACA00
jge 0x2fc47
movl $0x989680, -0x14(%rbp)  # imm = 0x989680
jmp 0x2fcb4
cmpq $0x77359400, -0x20(%rbp) # imm = 0x77359400
jge 0x2fc5a
movl $0x1312d00, -0x14(%rbp) # imm = 0x1312D00
jmp 0x2fcb2
movabsq $0x12a05f200, %rax      # imm = 0x12A05F200
cmpq %rax, -0x20(%rbp)
jge 0x2fc73
movl $0x2faf080, -0x14(%rbp) # imm = 0x2FAF080
jmp 0x2fcb0
movabsq $0x2540be400, %rax      # imm = 0x2540BE400
cmpq %rax, -0x20(%rbp)
jge 0x2fc8c
movl $0x5f5e100, -0x14(%rbp) # imm = 0x5F5E100
jmp 0x2fcae
movabsq $0x4a817c800, %rax      # imm = 0x4A817C800
cmpq %rax, -0x20(%rbp)
jge 0x2fca5
movl $0xbebc200, -0x14(%rbp) # imm = 0xBEBC200
jmp 0x2fcac
movl $0x1dcd6500, -0x14(%rbp) # imm = 0x1DCD6500
jmp 0x2fcae
jmp 0x2fcb0
jmp 0x2fcb2
jmp 0x2fcb4
jmp 0x2fcb6
jmp 0x2fcb8
jmp 0x2fcba
movl $0x0, -0x18(%rbp)
movslq -0x18(%rbp), %rcx
xorl %eax, %eax
cmpq $0xf, %rcx
movb %al, -0x29(%rbp)
jae 0x2fce7
movslq -0x18(%rbp), %rcx
leaq 0xa095(%rip), %rax      # 0x39d70
movl (%rax,%rcx,4), %eax
cmpl -0x14(%rbp), %eax
setle %al
movb %al, -0x29(%rbp)
movb -0x29(%rbp), %al
testb $0x1, %al
jne 0x2fcf0
jmp 0x2fcfb
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x2fcc1
movl -0x18(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)