// File: /workspace/github_cpp_makefile_star2_O3/AutomataLab[P]JSONSki/src/QueryProcessor.cpp
// Function: QueryProcessor::goToAryElemInRange(long&, int&, bitmap&)
__attribute__((always_inline)) int QueryProcessor::goToAryElemInRange(long& pos, int& num_elements, bitmap& bm) {
    do {
        int element_type = getElementType(pos);
        int result = 0;
        switch(element_type) {
            case PRIMITIVE: {
                JumpInfo res = goOverPrimElemsInRange(pos, num_elements, bm);
                if (res.status == ARRAY_END) {
                    return res.status;
                }
                if (res.status == SUCCESS) {
                    return RANGE_END;
                }
                if (res.status == PARTIAL_SKIP) {
                    num_elements = num_elements - res.num_comma + 1;
                }
                break;
            }
            case OBJECT:
                goOverObj(pos, bm);
                break;
            case ARRAY:
                return SUCCESS;
        }
        --num_elements;
        if (!hasMoreElements(pos)) {
            return ARRAY_END;
        }
    } while (num_elements > 0);
    return RANGE_END;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rax
movq 0x2c8(%rdi), %r11
addq $0x30, %rcx
movq %rcx, -0x18(%rsp)
movq (%rsi), %rcx
leaq 0x20(%r11), %r8
movq %r8, -0x20(%rsp)
vpcmpeqd %xmm0, %xmm0, %xmm0
movq %rdx, -0x28(%rsp)
movq %r11, -0x30(%rsp)
movzbl (%r11,%rcx), %r8d
cmpl $0x20, %r8d
je 0x1cb29
cmpl $0x7b, %r8d
je 0x1c809
cmpl $0x5b, %r8d
je 0x1cc79
leaq 0x3f(%rcx), %r8
testq %rcx, %rcx
cmovnsq %rcx, %r8
movl (%rdx), %ebp
shrq $0x6, %r8
movq 0x250(%rdi), %rcx
movq %rcx, -0x8(%rsp)
movq 0x258(%rdi), %rcx
movq %rcx, -0x10(%rsp)
movslq %r8d, %r13
movq 0x270(%rdi), %rbx
movq %r13, %r11
shlq $0x6, %r11
addq -0x20(%rsp), %r11
leaq (,%r13,2), %r9
xorl %r14d, %r14d
xorl %ecx, %ecx
cmpq %r13, %rbx
jge 0x1c664
movq -0x18(%rsp), %rdx
movw $0x0, 0x4(%rdx)
movl $0x0, (%rdx)
movq %r9, 0x88(%rdi)
movq %r13, 0x270(%rdi)
vmovdqu -0x20(%r11), %ymm1
vmovdqa %ymm1, 0xa0(%rdi)
vmovdqa 0x140(%rdi), %ymm2
vmovdqa 0x180(%rdi), %ymm3
vpcmpeqb %ymm1, %ymm2, %ymm4
vpmovmskb %ymm4, %r15d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r12d
leaq 0x1(%r9), %r8
movq %r8, 0x88(%rdi)
vmovdqu (%r11), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %r8d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r10d
shlq $0x20, %r8
orq %r15, %r8
shlq $0x20, %r10
orq %r12, %r10
leaq (%r10,%r10), %r12
notq %r12
andq %r10, %r12
movq 0x240(%rdi), %rbx
movq %rbx, %r15
movl %r14d, -0x38(%rsp)
movq %r13, %r14
movl %ecx, %r13d
movq %r11, %rcx
movq %r9, %r11
movq -0x8(%rsp), %r9
xorq %r9, %r15
movq %r12, %rdx
andq %r15, %rdx
notq %r15
andq %r12, %r15
addq %r10, %rdx
xorl %r12d, %r12d
addq %r10, %r15
setb %r12b
orq %rbx, %r15
movq %r12, 0x240(%rdi)
andq -0x10(%rsp), %rdx
andq %r9, %r15
movq %r11, %r9
movq %rcx, %r11
movl %r13d, %ecx
movq %r14, %r13
movl -0x38(%rsp), %r14d
orq %rdx, %r15
notq %r15
orq %r10, %r15
andq %r8, %r15
movq %r15, 0xe0(%rdi)
vmovq %r15, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %rdx
xorq 0x248(%rdi), %rdx
movq %rdx, (%rdi)
sarq $0x3f, %rdx
movq %rdx, 0x248(%rdi)
movq %r13, %rbx
cmpb $0x0, 0x32(%rax)
jne 0x1c6a2
vmovdqa 0x1a0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r8d
shlq $0x20, %r8
orq %rdx, %r8
movq (%rdi), %rdx
notq %rdx
andq %r8, %rdx
movq %rdx, 0x10(%rax)
movb $0x1, 0x32(%rax)
cmpb $0x0, 0x34(%rax)
je 0x1c6ae
movq 0x20(%rax), %r10
jmp 0x1c6e6
vmovdqa 0x200(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r8d
shlq $0x20, %r8
orq %rdx, %r8
movq (%rdi), %r10
notq %r10
andq %r8, %r10
movq %r10, 0x20(%rax)
movb $0x1, 0x34(%rax)
orq 0x10(%rax), %r10
testb $0x1, %cl
je 0x1c704
movq %r10, %rdx
negq %rdx
setb %cl
andq %r10, %rdx
leaq -0x1(%rdx), %r12
orq %rdx, %r12
jmp 0x1c757
movq (%rsi), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
andl $0xc0, %edx
subl %edx, %ecx
movl $0x1, %r8d
shlq %cl, %r8
movq %r8, %r12
negq %r12
movq %r12, %r15
btcq %rcx, %r15
andq %r15, %r10
setne %cl
je 0x1c747
movq %r10, %rdx
negq %rdx
andq %r10, %rdx
movq %rdx, %r12
subq %r8, %r12
jmp 0x1c751
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %r12
andq %r15, %r12
vmovdqa 0x220(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r10d
shlq $0x20, %r10
orq %rdx, %r10
movq (%rdi), %r8
notq %r8
andq %r8, %r10
movq %r10, 0x28(%rax)
cmpb $0x0, 0x31(%rax)
je 0x1c797
movq 0x8(%rax), %r15
jmp 0x1c7c9
vmovdqa 0x1e0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r15d
shlq $0x20, %r15
orq %rdx, %r15
andq %r8, %r15
movq %r15, 0x8(%rax)
movb $0x1, 0x31(%rax)
andq %r12, %r10
andq %r12, %r15
testq %r10, %r10
jne 0x1cc22
popcntq %r15, %rdx
addl %edx, %r14d
movl %ebp, %r10d
subl %r14d, %r10d
jle 0x1cc3e
testb %cl, %cl
jne 0x1cb67
incq %r13
addq $0x40, %r11
addq $0x2, %r9
movb $0x1, %cl
movl %r10d, %ebp
jmp 0x1c534
movq %rsi, -0x38(%rsp)
leaq 0x3f(%rcx), %r14
testq %rcx, %rcx
cmovnsq %rcx, %r14
sarq $0x6, %r14
movl $0x1, %r8d
xorl %esi, %esi
xorl %ecx, %ecx
movq 0x2e0(%rdi), %rdx
cmpq %rdx, %r14
jge 0x1c82e
leaq (%r14,%r14), %r11
movq %r14, %r12
shlq $0x6, %r12
addq -0x20(%rsp), %r12
movl %r8d, %r15d
cmpq 0x270(%rdi), %r14
jle 0x1c959
movq -0x18(%rsp), %rdx
movw $0x0, 0x4(%rdx)
movl $0x0, (%rdx)
movq %r11, 0x88(%rdi)
movq %r14, 0x270(%rdi)
vmovdqu -0x20(%r12), %ymm1
vmovdqa %ymm1, 0xa0(%rdi)
vmovdqa 0x140(%rdi), %ymm2
vmovdqa 0x180(%rdi), %ymm3
vpcmpeqb %ymm1, %ymm2, %ymm4
vpmovmskb %ymm4, %r10d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %ebx
leaq 0x1(%r11), %rdx
movq %rdx, 0x88(%rdi)
vmovdqu (%r12), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r8d
shlq $0x20, %rdx
orq %r10, %rdx
shlq $0x20, %r8
orq %rbx, %r8
leaq (%r8,%r8), %rbx
notq %rbx
andq %r8, %rbx
movq 0x250(%rdi), %r13
movq 0x240(%rdi), %r9
movq %r9, %r10
xorq %r13, %r10
movq %rbx, %rbp
andq %r10, %rbp
notq %r10
andq %rbx, %r10
addq %r8, %rbp
xorl %ebx, %ebx
addq %r8, %r10
setb %bl
movq %rbx, 0x240(%rdi)
andq 0x258(%rdi), %rbp
orq %r9, %r10
andq %r13, %r10
orq %rbp, %r10
notq %r10
orq %r8, %r10
andq %rdx, %r10
movq %r10, 0xe0(%rdi)
vmovq %r10, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %rdx
xorq 0x248(%rdi), %rdx
movq %rdx, (%rdi)
sarq $0x3f, %rdx
movq %rdx, 0x248(%rdi)
cmpb $0x0, 0x32(%rax)
jne 0x1c997
vmovdqa 0x1a0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r8d
shlq $0x20, %r8
orq %rdx, %r8
movq (%rdi), %rdx
notq %rdx
andq %r8, %rdx
movq %rdx, 0x10(%rax)
movb $0x1, 0x32(%rax)
testb $0x1, %cl
jne 0x1c9be
testb $0x1, %sil
je 0x1c9ee
movq 0x10(%rax), %rcx
movq %rcx, %r9
negq %r9
setb %dl
andq %rcx, %r9
leaq -0x1(%r9), %r8
orq %r9, %r8
jmp 0x1ca68
movq 0x10(%rax), %r8
movq %r8, %r10
negq %r10
andq %r8, %r10
leaq -0x1(%r8), %rdx
andq %r8, %rdx
movq %rdx, 0x10(%rax)
je 0x1ca41
movq %rdx, %r9
negq %r9
andq %rdx, %r9
movq %r9, %r8
subq %r10, %r8
orq %r9, %r8
movb $0x1, %dl
jmp 0x1ca6a
movq -0x38(%rsp), %rcx
movq (%rcx), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
andl $0xc0, %edx
subl %edx, %ecx
movl $0x1, %r13d
shlq %cl, %r13
movq %r13, %r8
negq %r8
movq %r8, %r10
btcq %rcx, %r10
movq 0x10(%rax), %rcx
andq %r10, %rcx
movq %rcx, 0x10(%rax)
setne %dl
je 0x1ca58
movq %rcx, %r9
negq %r9
andq %rcx, %r9
movq %r9, %r8
subq %r13, %r8
orq %r9, %r8
jmp 0x1ca65
negq %r10
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %r10
xorl %edx, %edx
movq %r10, %r8
jmp 0x1ca6a
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %r8
andq %r10, %r8
movb $0x1, %cl
cmpb $0x0, 0x33(%rax)
je 0x1ca76
movq 0x18(%rax), %r10
jmp 0x1caae
vmovdqa 0x1c0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %r9d
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %ebx
shlq $0x20, %rbx
orq %r9, %rbx
movq (%rdi), %r10
notq %r10
andq %rbx, %r10
movq %r10, 0x18(%rax)
movb $0x1, 0x33(%rax)
andq %r8, %r10
popcntq %r10, %r13
movl %r15d, %r8d
subl %r13d, %r8d
jle 0x1caf5
testb %dl, %dl
jne 0x1cae7
incq %r14
addq $0x2, %r11
addq $0x40, %r12
movb $0x1, %sil
xorl %ecx, %ecx
movl %r8d, %r15d
cmpq 0x2e0(%rdi), %r14
jl 0x1c846
jmp 0x1c827
subl %r13d, %r15d
incl %r15d
movl %r15d, %r8d
jmp 0x1c827
cmpl $0x2, %r15d
jl 0x1cb34
incl %r15d
movq -0x38(%rsp), %rsi
movq -0x28(%rsp), %rdx
movq -0x30(%rsp), %r11
movabsq $0x100002400, %rbx      # imm = 0x100002400
leaq -0x1(%r10), %rcx
andq %rcx, %r10
decl %r15d
cmpl $0x2, %r15d
ja 0x1cb17
jmp 0x1cb4d
incq %rcx
movq %rcx, (%rsi)
jmp 0x1c4c5
movq -0x38(%rsp), %rsi
movq -0x28(%rsp), %rdx
movq -0x30(%rsp), %r11
movabsq $0x100002400, %rbx      # imm = 0x100002400
movq 0x270(%rdi), %rcx
shlq $0x6, %rcx
bsfq %r10, %r10
orq %rcx, %r10
movq %r10, (%rsi)
movl (%rdx), %r9d
jmp 0x1cb9a
shlq $0x6, %rbx
bsrq %r12, %r10
xorq $0x3f, %r10
orq %rbx, %r10
xorq $0x3f, %r10
movq %r10, (%rsi)
movq -0x28(%rsp), %rdx
movl (%rdx), %r9d
subl %r14d, %r9d
incl %r9d
movq -0x30(%rsp), %r11
movabsq $0x100002400, %rbx      # imm = 0x100002400
leal -0x1(%r9), %ecx
movl %ecx, (%rdx)
leaq 0x1(%r10), %rcx
movzbl (%r11,%r10), %r8d
cmpq $0x20, %r8
ja 0x1cbc9
btq %r8, %rbx
jae 0x1cbc9
incq %r10
movq %r10, (%rsi)
incq %rcx
jmp 0x1cba4
cmpl $0x20, %r8d
jne 0x1cbe5
incq %rcx
movq %rcx, (%rsi)
movzbl (%r11,%rcx), %r8d
cmpl $0x1f, %r8d
jg 0x1cbc0
cmpl $0xa, %r8d
je 0x1cbc6
cmpl $0xd, %r8d
je 0x1cbc6
jmp 0x1cbf1
cmpl $0x2c, %r8d
je 0x1cc02
cmpl $0x5d, %r8d
je 0x1cc1b
movzbl (%r11,%rcx), %r8d
cmpq $0x20, %r8
ja 0x1cc0a
btq %r8, %rbx
jae 0x1cc0a
incq %rcx
movq %rcx, (%rsi)
jmp 0x1cbf1
cmpl $0x1, %r9d
jg 0x1c4c5
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0x1cc6b
movl $0x3ea, %eax            # imm = 0x3EA
jmp 0x1cc6b
leaq -0x1(%r10), %rax
xorq %r10, %rax
andq %rax, %r15
popcntq %r15, %rax
addl %eax, %r14d
movl $0x3ea, %eax            # imm = 0x3EA
cmpl %ebp, %r14d
jl 0x1cc5d
movl $0x3ec, %eax            # imm = 0x3EC
cmpl $0x2, %ebp
jl 0x1cc5a
incl %ebp
movq %r15, %rcx
decq %r15
andq %rcx, %r15
decl %ebp
cmpl $0x2, %ebp
ja 0x1cc4a
movq %r15, %r10
shlq $0x6, %rbx
bsfq %r10, %rcx
orq %rbx, %rcx
movq %rcx, (%rsi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
movl $0x3e9, %eax            # imm = 0x3E9
jmp 0x1cc6b