// File: /workspace/github_c_makefile_star2_O0/samtools[P]htslib/test/test_str2int.c
// Function: check_str2int
static int check_str2int(int verbose) {
    char buffer[64], *end;
    int64_t val;
    uint64_t num, uval;
    int failed = 0, efail, i, offset;
    const char sentinel = '#';

    // Positive value (unsigned)
    for (i = 1; i < 64; i++) {
        num = (1ULL << i) - 1;
        for (offset = i < 5 ? -(1LL << (i - 1)) : -16; offset <= 30; offset++) {
            efail = (offset > 0);
            snprintf(buffer, sizeof(buffer), "%" PRIu64 "%c",
                     num + offset, sentinel);

            uval = hts_str2uint(buffer, &end, i, &failed);
            if (failed != efail || uval != (!efail ? num + offset : num)
                || *end != sentinel) {
                fprintf(stderr, "hts_str2uint failed: %d bit "
                        "%s %"PRIu64" '%c' %d (%d)\n",
                        i, buffer, uval, *end, failed, efail);
                return -1;
            } else if (verbose) {
                fprintf(stderr, "hts_str2uint OK: %d bit "
                        "%s %"PRIu64" '%c' %d (%d)\n",
                        i, buffer, uval, *end, failed, efail);
            }
            failed = 0;
        }

        // Positive value (signed)
        for (offset = i < 5 ? -(1LL << (i - 1)) : -16; offset <= 30; offset++) {
            efail = (offset > 0);
            snprintf(buffer, sizeof(buffer), "%" PRIu64 "%c",
                     num + offset, sentinel);

            val = hts_str2int(buffer, &end, i + 1, &failed);
            if (failed != efail || val != (!efail ? num + offset : num)
                || *end != sentinel) {
                fprintf(stderr,
                        "hts_str2int  failed: %d bit "
                        "%s %"PRId64" '%c' %d (%d)\n",
                        i + 1, buffer, val, *end, failed, efail);
                return -1;
            } else if (verbose) {
                fprintf(stderr, "hts_str2int  OK: %d bit "
                        "%s %"PRId64" '%c' %d (%d)\n",
                        i + 1, buffer, val, *end, failed, efail);
            }
            failed = 0;
        }

        // Negative value (signed)
        for (offset = i < 5 ? -(1LL << (i - 1)) : -16; offset <= 30; offset++) {
            efail = (offset > 0);
            snprintf(buffer, sizeof(buffer), "-%" PRIu64 "%c",
                     num + offset + 1, sentinel);

            val = hts_str2int(buffer, &end, i + 1, &failed);
            // Cast of val to unsigned in this comparison avoids undefined
            // behaviour when checking INT64_MIN.
            if (failed != efail
                || -((uint64_t) val) != (!efail ? num + offset + 1 : num + 1)
                || *end != sentinel) {
                fprintf(stderr,
                        "hts_str2int  failed: %d bit "
                        "%s %"PRId64" '%c' %d (%d)\n",
                        i + 1, buffer, val, *end, failed, efail);
                return -1;
            } else if (verbose) {
                fprintf(stderr, "hts_str2int  OK: %d bit "
                        "%s %"PRId64" '%c' %d (%d)\n",
                        i + 1, buffer, val, *end, failed, efail);
            }
            failed = 0;
        }
    }

    // Special case for UINT64_MAX
    for (offset = 0; offset <= 999; offset++) {
        efail = offset > 615;
        snprintf(buffer, sizeof(buffer), "18446744073709551%03d%c",
                 offset, sentinel);
        uval = hts_str2uint(buffer, &end, 64, &failed);
        if (failed != efail
            || uval != (efail ? UINT64_MAX : 18446744073709551000ULL + offset)
            || *end != sentinel) {
            fprintf(stderr, "hts_str2uint failed: 64 bit %s "
                    "%"PRIu64" '%c' %d (%d)\n",
                    buffer, uval, *end, failed, efail);
            return -1;
        } else if (verbose) {
            fprintf(stderr, "hts_str2uint OK: 64 bit "
                    "%s %"PRIu64" '%c' %d (%d)\n",
                    buffer, uval, *end, failed, efail);
        }
    }
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movl %edi, -0x8(%rbp)
movl $0x0, -0x74(%rbp)
movb $0x23, -0x81(%rbp)
movl $0x1, -0x7c(%rbp)
cmpl $0x40, -0x7c(%rbp)
jge 0x6072
movl -0x7c(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x68(%rbp)
cmpl $0x5, -0x7c(%rbp)
jge 0x5bbb
movl -0x7c(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0x90(%rbp)
jmp 0x5bcb
movq $-0x10, %rax
movq %rax, -0x90(%rbp)
jmp 0x5bcb
movq -0x90(%rbp), %rax
movl %eax, -0x80(%rbp)
cmpl $0x1e, -0x80(%rbp)
jg 0x5d22
cmpl $0x0, -0x80(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rcx
movslq -0x80(%rbp), %rax
addq %rax, %rcx
movl $0x40, %esi
leaq 0xe14c8(%rip), %rdx     # 0xe70d1
movl $0x23, %r8d
movb $0x0, %al
callq 0x47e0
leaq -0x50(%rbp), %rdi
movl -0x7c(%rbp), %edx
leaq -0x58(%rbp), %rsi
leaq -0x74(%rbp), %rcx
callq 0x6610
movq %rax, -0x70(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x78(%rbp), %eax
jne 0x5c85
movq -0x70(%rbp), %rax
movq %rax, -0x98(%rbp)
cmpl $0x0, -0x78(%rbp)
jne 0x5c5b
movq -0x68(%rbp), %rax
movslq -0x80(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
jmp 0x5c66
movq -0x68(%rbp), %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movq -0xa0(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5c85
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x5ccb
movq 0xff354(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
movl -0x7c(%rbp), %edx
leaq -0x50(%rbp), %rcx
movq -0x70(%rbp), %r8
movq -0x58(%rbp), %rax
movsbl (%rax), %r9d
movl -0x74(%rbp), %r10d
movl -0x78(%rbp), %eax
leaq 0xe1364(%rip), %rsi     # 0xe7014
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x46d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x61b7
cmpl $0x0, -0x8(%rbp)
je 0x5d0b
movq 0xff308(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
movl -0x7c(%rbp), %edx
leaq -0x50(%rbp), %rcx
movq -0x70(%rbp), %r8
movq -0x58(%rbp), %rax
movsbl (%rax), %r9d
movl -0x74(%rbp), %r10d
movl -0x78(%rbp), %eax
leaq 0xe1349(%rip), %rsi     # 0xe7045
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x46d0
jmp 0x5d0d
movl $0x0, -0x74(%rbp)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x5bd5
cmpl $0x5, -0x7c(%rbp)
jge 0x5d4b
movl -0x7c(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0xa8(%rbp)
jmp 0x5d5b
movq $-0x10, %rax
movq %rax, -0xa8(%rbp)
jmp 0x5d5b
movq -0xa8(%rbp), %rax
movl %eax, -0x80(%rbp)
cmpl $0x1e, -0x80(%rbp)
jg 0x5ebb
cmpl $0x0, -0x80(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rcx
movslq -0x80(%rbp), %rax
addq %rax, %rcx
movl $0x40, %esi
leaq 0xe1338(%rip), %rdx     # 0xe70d1
movl $0x23, %r8d
movb $0x0, %al
callq 0x47e0
leaq -0x50(%rbp), %rdi
movl -0x7c(%rbp), %edx
addl $0x1, %edx
leaq -0x58(%rbp), %rsi
leaq -0x74(%rbp), %rcx
callq 0x67d0
movq %rax, -0x60(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x78(%rbp), %eax
jne 0x5e18
movq -0x60(%rbp), %rax
movq %rax, -0xb0(%rbp)
cmpl $0x0, -0x78(%rbp)
jne 0x5dee
movq -0x68(%rbp), %rax
movslq -0x80(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xb8(%rbp)
jmp 0x5df9
movq -0x68(%rbp), %rax
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rax
movq -0xb8(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5e18
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x5e61
movq 0xff1c1(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
movl -0x7c(%rbp), %edx
addl $0x1, %edx
leaq -0x50(%rbp), %rcx
movq -0x60(%rbp), %r8
movq -0x58(%rbp), %rax
movsbl (%rax), %r9d
movl -0x74(%rbp), %r10d
movl -0x78(%rbp), %eax
leaq 0xe122c(%rip), %rsi     # 0xe7072
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x46d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x61b7
cmpl $0x0, -0x8(%rbp)
je 0x5ea4
movq 0xff172(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
movl -0x7c(%rbp), %edx
addl $0x1, %edx
leaq -0x50(%rbp), %rcx
movq -0x60(%rbp), %r8
movq -0x58(%rbp), %rax
movsbl (%rax), %r9d
movl -0x74(%rbp), %r10d
movl -0x78(%rbp), %eax
leaq 0xe120e(%rip), %rsi     # 0xe70a3
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x46d0
jmp 0x5ea6
movl $0x0, -0x74(%rbp)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x5d65
cmpl $0x5, -0x7c(%rbp)
jge 0x5ee4
movl -0x7c(%rbp), %eax
subl $0x1, %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
xorl %eax, %eax
subq %rcx, %rax
movq %rax, -0xc0(%rbp)
jmp 0x5ef4
movq $-0x10, %rax
movq %rax, -0xc0(%rbp)
jmp 0x5ef4
movq -0xc0(%rbp), %rax
movl %eax, -0x80(%rbp)
cmpl $0x1e, -0x80(%rbp)
jg 0x6062
cmpl $0x0, -0x80(%rbp)
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
movq -0x68(%rbp), %rcx
movslq -0x80(%rbp), %rax
addq %rax, %rcx
addq $0x1, %rcx
movl $0x40, %esi
leaq 0xe119a(%rip), %rdx     # 0xe70d0
movl $0x23, %r8d
movb $0x0, %al
callq 0x47e0
leaq -0x50(%rbp), %rdi
movl -0x7c(%rbp), %edx
addl $0x1, %edx
leaq -0x58(%rbp), %rsi
leaq -0x74(%rbp), %rcx
callq 0x67d0
movq %rax, -0x60(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x78(%rbp), %eax
jne 0x5fbf
xorl %eax, %eax
subq -0x60(%rbp), %rax
movq %rax, -0xc8(%rbp)
cmpl $0x0, -0x78(%rbp)
jne 0x5f91
movq -0x68(%rbp), %rax
movslq -0x80(%rbp), %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
jmp 0x5fa0
movq -0x68(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
movq -0xc8(%rbp), %rax
movq -0xd0(%rbp), %rcx
cmpq %rcx, %rax
jne 0x5fbf
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x6008
movq 0xff01a(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
movl -0x7c(%rbp), %edx
addl $0x1, %edx
leaq -0x50(%rbp), %rcx
movq -0x60(%rbp), %r8
movq -0x58(%rbp), %rax
movsbl (%rax), %r9d
movl -0x74(%rbp), %r10d
movl -0x78(%rbp), %eax
leaq 0xe1085(%rip), %rsi     # 0xe7072
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x46d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x61b7
cmpl $0x0, -0x8(%rbp)
je 0x604b
movq 0xfefcb(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
movl -0x7c(%rbp), %edx
addl $0x1, %edx
leaq -0x50(%rbp), %rcx
movq -0x60(%rbp), %r8
movq -0x58(%rbp), %rax
movsbl (%rax), %r9d
movl -0x74(%rbp), %r10d
movl -0x78(%rbp), %eax
leaq 0xe1067(%rip), %rsi     # 0xe70a3
movl %r10d, (%rsp)
movl %eax, 0x8(%rsp)
movb $0x0, %al
callq 0x46d0
jmp 0x604d
movl $0x0, -0x74(%rbp)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x5efe
jmp 0x6064
movl -0x7c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x7c(%rbp)
jmp 0x5b73
movl $0x0, -0x80(%rbp)
cmpl $0x3e7, -0x80(%rbp)     # imm = 0x3E7
jg 0x61b0
cmpl $0x267, -0x80(%rbp)     # imm = 0x267
setg %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x78(%rbp)
leaq -0x50(%rbp), %rdi
movl -0x80(%rbp), %ecx
movl $0x40, %esi
leaq 0xe102c(%rip), %rdx     # 0xe70d7
movl $0x23, %r8d
movb $0x0, %al
callq 0x47e0
leaq -0x50(%rbp), %rdi
leaq -0x58(%rbp), %rsi
movl $0x40, %edx
leaq -0x74(%rbp), %rcx
callq 0x6610
movq %rax, -0x70(%rbp)
movl -0x74(%rbp), %eax
cmpl -0x78(%rbp), %eax
jne 0x612b
movq -0x70(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpl $0x0, -0x78(%rbp)
je 0x60fb
movq $-0x1, %rax
movq %rax, -0xe0(%rbp)
jmp 0x610c
movslq -0x80(%rbp), %rax
addq $-0x268, %rax           # imm = 0xFD98
movq %rax, -0xe0(%rbp)
movq -0xd8(%rbp), %rax
movq -0xe0(%rbp), %rcx
cmpq %rcx, %rax
jne 0x612b
movq -0x58(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
je 0x6166
movq 0xfeeae(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
leaq -0x50(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq -0x58(%rbp), %rax
movsbl (%rax), %r8d
movl -0x74(%rbp), %r9d
movl -0x78(%rbp), %eax
leaq 0xe0f9c(%rip), %rsi     # 0xe70ef
movl %eax, (%rsp)
movb $0x0, %al
callq 0x46d0
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x61b7
cmpl $0x0, -0x8(%rbp)
je 0x619e
movq 0xfee6d(%rip), %rax     # 0x104fe0
movq (%rax), %rdi
leaq -0x50(%rbp), %rdx
movq -0x70(%rbp), %rcx
movq -0x58(%rbp), %rax
movsbl (%rax), %r8d
movl -0x74(%rbp), %r9d
movl -0x78(%rbp), %eax
leaq 0xe0f8c(%rip), %rsi     # 0xe7120
movl %eax, (%rsp)
movb $0x0, %al
callq 0x46d0
jmp 0x61a0
jmp 0x61a2
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
jmp 0x6079
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)