// File: /workspace/github_cpp_makefile_star2_O3/AutomataLab[P]JSONSki/src/QueryProcessor.cpp
// Function: QueryProcessor::goToObjElemInRange(long&, int&, bitmap&)
__attribute__((always_inline)) int QueryProcessor::goToObjElemInRange(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:
                return SUCCESS;
            case ARRAY:
                goOverAry(pos, bm);
                break;
        }
        --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 0x1c337
cmpl $0x5b, %r8d
je 0x1c017
cmpl $0x7b, %r8d
je 0x1c487
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 0x1be72
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 0x1beb0
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 0x1bebc
movq 0x20(%rax), %r10
jmp 0x1bef4
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 0x1bf12
movq %r10, %rdx
negq %rdx
setb %cl
andq %r10, %rdx
leaq -0x1(%rdx), %r12
orq %rdx, %r12
jmp 0x1bf65
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 0x1bf55
movq %r10, %rdx
negq %rdx
andq %r10, %rdx
movq %rdx, %r12
subq %r8, %r12
jmp 0x1bf5f
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 0x1bfa5
movq 0x8(%rax), %r15
jmp 0x1bfd7
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 0x1c430
popcntq %r15, %rdx
addl %edx, %r14d
movl %ebp, %r10d
subl %r14d, %r10d
jle 0x1c44c
testb %cl, %cl
jne 0x1c375
incq %r13
addq $0x40, %r11
addq $0x2, %r9
movb $0x1, %cl
movl %r10d, %ebp
jmp 0x1bd42
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 0x1c03c
leaq (%r14,%r14), %r11
movq %r14, %r12
shlq $0x6, %r12
addq -0x20(%rsp), %r12
movl %r8d, %r15d
cmpq 0x270(%rdi), %r14
jle 0x1c167
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, 0x34(%rax)
jne 0x1c1a5
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), %rdx
notq %rdx
andq %r8, %rdx
movq %rdx, 0x20(%rax)
movb $0x1, 0x34(%rax)
testb $0x1, %cl
jne 0x1c1cc
testb $0x1, %sil
je 0x1c1fc
movq 0x20(%rax), %rcx
movq %rcx, %r9
negq %r9
setb %dl
andq %rcx, %r9
leaq -0x1(%r9), %r8
orq %r9, %r8
jmp 0x1c276
movq 0x20(%rax), %r8
movq %r8, %r10
negq %r10
andq %r8, %r10
leaq -0x1(%r8), %rdx
andq %r8, %rdx
movq %rdx, 0x20(%rax)
je 0x1c24f
movq %rdx, %r9
negq %r9
andq %rdx, %r9
movq %r9, %r8
subq %r10, %r8
orq %r9, %r8
movb $0x1, %dl
jmp 0x1c278
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 0x20(%rax), %rcx
andq %r10, %rcx
movq %rcx, 0x20(%rax)
setne %dl
je 0x1c266
movq %rcx, %r9
negq %r9
andq %rcx, %r9
movq %r9, %r8
subq %r13, %r8
orq %r9, %r8
jmp 0x1c273
negq %r10
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %r10
xorl %edx, %edx
movq %r10, %r8
jmp 0x1c278
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %r8
andq %r10, %r8
movb $0x1, %cl
cmpb $0x0, 0x35(%rax)
je 0x1c284
movq 0x28(%rax), %r10
jmp 0x1c2bc
vmovdqa 0x220(%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, 0x28(%rax)
movb $0x1, 0x35(%rax)
andq %r8, %r10
popcntq %r10, %r13
movl %r15d, %r8d
subl %r13d, %r8d
jle 0x1c303
testb %dl, %dl
jne 0x1c2f5
incq %r14
addq $0x2, %r11
addq $0x40, %r12
movb $0x1, %sil
xorl %ecx, %ecx
movl %r8d, %r15d
cmpq 0x2e0(%rdi), %r14
jl 0x1c054
jmp 0x1c035
subl %r13d, %r15d
incl %r15d
movl %r15d, %r8d
jmp 0x1c035
cmpl $0x2, %r15d
jl 0x1c342
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 0x1c325
jmp 0x1c35b
incq %rcx
movq %rcx, (%rsi)
jmp 0x1bcd3
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 0x1c3a8
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 0x1c3d7
btq %r8, %rbx
jae 0x1c3d7
incq %r10
movq %r10, (%rsi)
incq %rcx
jmp 0x1c3b2
cmpl $0x20, %r8d
jne 0x1c3f3
incq %rcx
movq %rcx, (%rsi)
movzbl (%r11,%rcx), %r8d
cmpl $0x1f, %r8d
jg 0x1c3ce
cmpl $0xa, %r8d
je 0x1c3d4
cmpl $0xd, %r8d
je 0x1c3d4
jmp 0x1c3ff
cmpl $0x2c, %r8d
je 0x1c410
cmpl $0x5d, %r8d
je 0x1c429
movzbl (%r11,%rcx), %r8d
cmpq $0x20, %r8
ja 0x1c418
btq %r8, %rbx
jae 0x1c418
incq %rcx
movq %rcx, (%rsi)
jmp 0x1c3ff
cmpl $0x1, %r9d
jg 0x1bcd3
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0x1c479
movl $0x3ea, %eax            # imm = 0x3EA
jmp 0x1c479
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 0x1c46b
movl $0x3ec, %eax            # imm = 0x3EC
cmpl $0x2, %ebp
jl 0x1c468
incl %ebp
movq %r15, %rcx
decq %r15
andq %rcx, %r15
decl %ebp
cmpl $0x2, %ebp
ja 0x1c458
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 0x1c479