// File: /workspace/github_cpp_makefile_star2_O2/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, %r8
movq 0x2c8(%rdi), %rbx
leaq 0x30(%rcx), %rax
movq %rax, -0x10(%rsp)
movq %rsi, -0x40(%rsp)
movq (%rsi), %rax
leaq 0x20(%rbx), %rcx
movq %rcx, -0x8(%rsp)
vpcmpeqd %xmm0, %xmm0, %xmm0
movq %rdx, -0x18(%rsp)
movzbl (%rbx,%rax), %ecx
cmpl $0x20, %ecx
je 0x1c962
cmpl $0x7b, %ecx
je 0x1c625
cmpl $0x5b, %ecx
je 0x1ca79
movl (%rdx), %r15d
cqto
movabsq $0x40, %rcx
idivq %rcx
movq 0x250(%rdi), %rcx
movq %rcx, -0x28(%rsp)
movq 0x258(%rdi), %rcx
movq %rcx, -0x30(%rsp)
movslq %eax, %r13
movq 0x270(%rdi), %rax
movq %rax, -0x38(%rsp)
movq %r13, %r12
shlq $0x6, %r12
addq -0x8(%rsp), %r12
leaq (,%r13,2), %rbp
xorl %esi, %esi
xorl %eax, %eax
cmpq %r13, -0x38(%rsp)
jge 0x1c461
movq -0x10(%rsp), %rcx
andw $0x0, 0x4(%rcx)
andl $0x0, (%rcx)
movq %rbp, 0x88(%rdi)
movq %r13, 0x270(%rdi)
vmovdqu -0x20(%r12), %ymm1
vmovdqa %ymm1, 0xa0(%rdi)
vmovdqa 0x140(%rdi), %ymm2
vmovdqa 0x180(%rdi), %ymm3
vpcmpeqb %ymm1, %ymm2, %ymm4
vpmovmskb %ymm4, %r9d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r14d
leaq 0x1(%rbp), %rcx
movq %rcx, 0x88(%rdi)
vmovdqu (%r12), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %ecx
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rcx
orq %r9, %rcx
shlq $0x20, %rdx
orq %r14, %rdx
leaq (%rdx,%rdx), %r14
notq %r14
andq %rdx, %r14
movl %eax, %r10d
movl %r15d, %eax
movq %r13, %r15
movq %rbp, %r13
movq 0x240(%rdi), %rbp
movq %rbp, %r9
movq %r12, -0x20(%rsp)
movq -0x28(%rsp), %r12
xorq %r12, %r9
movq %r14, %r11
andq %r9, %r11
notq %r9
andq %r14, %r9
addq %rdx, %r11
xorl %r14d, %r14d
addq %rdx, %r9
setb %r14b
orq %rbp, %r9
movq %r13, %rbp
movq %r15, %r13
movl %eax, %r15d
movl %r10d, %eax
movq %r14, 0x240(%rdi)
andq -0x30(%rsp), %r11
andq %r12, %r9
movq -0x20(%rsp), %r12
orq %r11, %r9
notq %r9
orq %rdx, %r9
andq %rcx, %r9
movq %r9, 0xe0(%rdi)
vmovq %r9, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %rcx
xorq 0x248(%rdi), %rcx
movq %rcx, (%rdi)
sarq $0x3f, %rcx
movq %rcx, 0x248(%rdi)
movq %r13, -0x38(%rsp)
cmpb $0x0, 0x32(%r8)
jne 0x1c4a1
vmovdqa 0x1a0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %ecx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rdx
orq %rcx, %rdx
movq (%rdi), %rcx
notq %rcx
andq %rdx, %rcx
movq %rcx, 0x10(%r8)
movb $0x1, 0x32(%r8)
cmpb $0x0, 0x34(%r8)
je 0x1c4ae
movq 0x20(%r8), %r9
jmp 0x1c4e7
vmovdqa 0x200(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %ecx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rdx
orq %rcx, %rdx
movq (%rdi), %r9
notq %r9
andq %rdx, %r9
movq %r9, 0x20(%r8)
movb $0x1, 0x34(%r8)
orq 0x10(%r8), %r9
testb $0x1, %al
je 0x1c504
movq %r9, %rdx
negq %rdx
setb %cl
andq %r9, %rdx
leaq -0x1(%rdx), %rax
orq %rdx, %rax
jmp 0x1c564
movq -0x40(%rsp), %rax
movq (%rax), %rax
cqto
movabsq $0x40, %rcx
idivq %rcx
movq %rdx, %rcx
movabsq $0x1, %r14
shlq %cl, %r14
movq %r14, %rax
negq %rax
movq %rax, %rdx
btcq %rcx, %rdx
andq %rdx, %r9
setne %cl
je 0x1c554
movq %r9, %r11
negq %r11
andq %r9, %r11
movq %r11, %rax
subq %r14, %rax
orq %r11, %rax
jmp 0x1c561
movabsq $-0x8000000000000000, %r9 # imm = 0x8000000000000000
orq %r9, %rax
andq %rdx, %rax
vmovdqa 0x220(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r9d
shlq $0x20, %r9
orq %rdx, %r9
movq (%rdi), %r14
notq %r14
andq %r14, %r9
movq %r9, 0x28(%r8)
cmpb $0x0, 0x31(%r8)
je 0x1c5a5
movq 0x8(%r8), %rdx
jmp 0x1c5d8
vmovdqa 0x1e0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %r11d
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rdx
orq %r11, %rdx
andq %r14, %rdx
movq %rdx, 0x8(%r8)
movb $0x1, 0x31(%r8)
movq %r9, %r14
andq %rax, %r14
leaq -0x1(%r14), %r11
xorq %r9, %r11
andq %rax, %rdx
andq %r11, %rdx
popcntq %rdx, %r9
addl %r9d, %esi
movl %r15d, %r9d
subl %esi, %r9d
jle 0x1ca37
testq %r14, %r14
jne 0x1ca4b
testb %cl, %cl
jne 0x1c972
incq %r13
addq $0x40, %r12
addq $0x2, %rbp
movb $0x1, %al
movl %r9d, %r15d
jmp 0x1c32f
cqto
movabsq $0x40, %rcx
idivq %rcx
movq %rax, %r10
movl $0x0, -0x30(%rsp)
movl $0x1, %edx
leaq (%r10,%r10), %rax
movq %rax, -0x38(%rsp)
movq %r10, %rax
shlq $0x6, %rax
movq %rax, -0x20(%rsp)
leaq 0x1(,%r10,2), %r13
movq %r13, -0x28(%rsp)
shlq $0x5, %r13
xorl %eax, %eax
movl %edx, %r11d
movq 0x2e0(%rdi), %rcx
cmpq %rcx, %r10
jge 0x1c676
cmpq 0x270(%rdi), %r10
jle 0x1c795
movq -0x10(%rsp), %rcx
andw $0x0, 0x4(%rcx)
andl $0x0, (%rcx)
movq -0x38(%rsp), %rcx
movq %rcx, 0x88(%rdi)
movq %r10, 0x270(%rdi)
movq -0x20(%rsp), %rcx
vmovdqu (%rbx,%rcx), %ymm1
vmovdqa %ymm1, 0xa0(%rdi)
vmovdqa 0x140(%rdi), %ymm2
vmovdqa 0x180(%rdi), %ymm3
vpcmpeqb %ymm1, %ymm2, %ymm4
vpmovmskb %ymm4, %r9d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r15d
movq -0x28(%rsp), %rcx
movq %rcx, 0x88(%rdi)
vmovdqu (%rbx,%r13), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %ecx
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rcx
orq %r9, %rcx
shlq $0x20, %rdx
orq %r15, %rdx
leaq (%rdx,%rdx), %r15
notq %r15
andq %rdx, %r15
movq 0x250(%rdi), %rbp
movq 0x240(%rdi), %r14
movq %r14, %r9
xorq %rbp, %r9
movq %r15, %r12
andq %r9, %r12
notq %r9
andq %r15, %r9
addq %rdx, %r12
xorl %r15d, %r15d
addq %rdx, %r9
setb %r15b
movq %r15, 0x240(%rdi)
andq 0x258(%rdi), %r12
orq %r14, %r9
andq %rbp, %r9
orq %r12, %r9
notq %r9
orq %rdx, %r9
andq %rcx, %r9
movq %r9, 0xe0(%rdi)
vmovq %r9, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %rcx
xorq 0x248(%rdi), %rcx
movq %rcx, (%rdi)
sarq $0x3f, %rcx
movq %rcx, 0x248(%rdi)
cmpb $0x0, 0x32(%r8)
jne 0x1c7d5
vmovdqa 0x1a0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %ecx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rdx
orq %rcx, %rdx
movq (%rdi), %rcx
notq %rcx
andq %rdx, %rcx
movq %rcx, 0x10(%r8)
movb $0x1, 0x32(%r8)
testb $0x1, %al
jne 0x1c7fc
testb $0x1, -0x30(%rsp)
je 0x1c82f
movq 0x10(%r8), %rax
movq %rax, %r9
negq %r9
setb %cl
andq %rax, %r9
leaq -0x1(%r9), %rdx
orq %r9, %rdx
jmp 0x1c8ae
movq 0x10(%r8), %rdx
movq %rdx, %r9
negq %r9
andq %rdx, %r9
leaq -0x1(%rdx), %rcx
andq %rdx, %rcx
movq %rcx, 0x10(%r8)
je 0x1c887
movq %rcx, %r14
negq %r14
andq %rcx, %r14
movq %r14, %rdx
subq %r9, %rdx
orq %r14, %rdx
movb $0x1, %cl
jmp 0x1c8b0
movq -0x40(%rsp), %rax
movq (%rax), %rax
cqto
movabsq $0x40, %rcx
idivq %rcx
movq %rdx, %rcx
movabsq $0x1, %r9
shlq %cl, %r9
movq %r9, %rdx
negq %rdx
movq %rdx, %rax
btcq %rcx, %rax
movq 0x10(%r8), %r15
andq %rax, %r15
movq %r15, 0x10(%r8)
setne %cl
je 0x1c89e
movq %r15, %r14
negq %r14
andq %r15, %r14
movq %r14, %rdx
subq %r9, %rdx
orq %r14, %rdx
jmp 0x1c8ab
negq %r9
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %r9
xorl %ecx, %ecx
movq %r9, %rdx
jmp 0x1c8b0
movabsq $-0x8000000000000000, %r9 # imm = 0x8000000000000000
orq %r9, %rdx
andq %rax, %rdx
movb $0x1, %al
cmpb $0x0, 0x33(%r8)
je 0x1c8bd
movq 0x18(%r8), %r9
jmp 0x1c8f6
vmovdqa 0x1c0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %r9d
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r14d
shlq $0x20, %r14
orq %r9, %r14
movq (%rdi), %r9
notq %r9
andq %r14, %r9
movq %r9, 0x18(%r8)
movb $0x1, 0x33(%r8)
andq %rdx, %r9
popcntq %r9, %r15
movl %r11d, %edx
subl %r15d, %edx
jle 0x1c923
testb %cl, %cl
je 0x1c915
subl %r15d, %r11d
incl %r11d
jmp 0x1c66f
incq %r10
movb $0x1, %al
movl %eax, -0x30(%rsp)
jmp 0x1c644
movq -0x18(%rsp), %rdx
movabsq $0x100002400, %r10      # imm = 0x100002400
cmpl $0x2, %r11d
jl 0x1c944
leaq -0x1(%r9), %rax
andq %rax, %r9
decl %r11d
jmp 0x1c932
movq 0x270(%rdi), %rax
shlq $0x6, %rax
bsfq %r9, %r11
orq %rax, %r11
movq -0x40(%rsp), %rax
movq %r11, (%rax)
movl (%rdx), %ecx
jmp 0x1c9a7
incq %rax
movq -0x40(%rsp), %rcx
movq %rax, (%rcx)
jmp 0x1c2bf
movq -0x38(%rsp), %rcx
shlq $0x6, %rcx
bsrq %rax, %r11
xorq $0x3f, %r11
orq %rcx, %r11
xorq $0x3f, %r11
movq -0x40(%rsp), %rax
movq %r11, (%rax)
movq -0x18(%rsp), %rdx
movl (%rdx), %ecx
subl %esi, %ecx
incl %ecx
movabsq $0x100002400, %r10      # imm = 0x100002400
leal -0x1(%rcx), %eax
movl %eax, (%rdx)
leaq 0x1(%r11), %rax
movzbl (%rbx,%r11), %r9d
cmpq $0x20, %r9
ja 0x1c9d4
btq %r9, %r10
jae 0x1c9d4
incq %r11
movq -0x40(%rsp), %rsi
movq %r11, (%rsi)
incq %rax
jmp 0x1c9b0
incq %rax
movq -0x40(%rsp), %rsi
movq %rax, (%rsi)
movzbl (%rbx,%rax), %r9d
cmpl $0xa, %r9d
je 0x1c9d1
cmpl $0xd, %r9d
je 0x1c9d1
cmpl $0x20, %r9d
je 0x1c9d1
cmpl $0x2c, %r9d
je 0x1ca01
cmpl $0x5d, %r9d
jne 0x1ca0c
jmp 0x1ca44
incq %rax
movq -0x40(%rsp), %rsi
movq %rax, (%rsi)
movzbl (%rbx,%rax), %r9d
cmpq $0x20, %r9
ja 0x1ca1d
btq %r9, %r10
jb 0x1ca01
cmpl $0x1, %ecx
jg 0x1c2bf
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0x1ca6b
leaq -0x1(%rdx), %rax
andq %rax, %rdx
decl %r15d
cmpl $0x2, %r15d
jge 0x1ca2d
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0x1ca53
movl $0x3ea, %eax            # imm = 0x3EA
jmp 0x1ca6b
movl $0x3ea, %eax            # imm = 0x3EA
movq %r14, %rdx
movq -0x38(%rsp), %rdi
shlq $0x6, %rdi
bsfq %rdx, %rcx
orq %rdi, %rcx
movq -0x40(%rsp), %rdx
movq %rcx, (%rdx)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
movl $0x3e9, %eax            # imm = 0x3E9
jmp 0x1ca6b