// File: /workspace/github_cpp_makefile_star2_O1/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), %r10
leaq 0x30(%rcx), %rax
movq %rax, -0x8(%rsp)
vpcmpeqd %xmm0, %xmm0, %xmm0
movabsq $0x100002400, %rbx      # imm = 0x100002400
movq %rdx, -0x10(%rsp)
movq (%rsi), %rax
movzbl (%r10,%rax), %ecx
cmpl $0x20, %ecx
jne 0x1c5e3
incq %rax
movq %rax, (%rsi)
jmp 0x1c5d1
cmpl $0x5b, %ecx
je 0x1c5f4
cmpl $0x7b, %ecx
jne 0x1c5fb
movl $0x65, %ecx
jmp 0x1c600
movl $0x66, %ecx
jmp 0x1c600
movl $0x67, %ecx
cmpl $0x65, %ecx
je 0x1c61b
cmpl $0x66, %ecx
jne 0x1c945
movl $0x3e9, -0x1c(%rsp)     # imm = 0x3E9
jmp 0x1cd93
leaq 0x3f(%rax), %r9
testq %rax, %rax
cmovnsq %rax, %r9
sarq $0x6, %r9
movl $0x1, %r12d
movl $0x0, -0x20(%rsp)
xorl %ecx, %ecx
cmpq 0x2e0(%rdi), %r9
jge 0x1c63a
cmpq 0x270(%rdi), %r9
jle 0x1c76e
leaq (%r9,%r9), %rax
movq -0x8(%rsp), %rdx
movw $0x0, 0x4(%rdx)
movl $0x0, (%rdx)
movq %rax, 0x88(%rdi)
movq %r9, 0x270(%rdi)
movq %r9, %rax
shlq $0x6, %rax
vmovdqu (%r10,%rax), %ymm1
vmovdqa %ymm1, 0xa0(%rdi)
vmovdqa 0x140(%rdi), %ymm2
vmovdqa 0x180(%rdi), %ymm3
vpcmpeqb %ymm1, %ymm2, %ymm4
vpmovmskb %ymm4, %edx
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r11d
leaq 0x1(,%r9,2), %rax
movq %rax, 0x88(%rdi)
shlq $0x5, %rax
vmovdqu (%r10,%rax), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %eax
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r13d
shlq $0x20, %rax
orq %rdx, %rax
shlq $0x20, %r13
orq %r11, %r13
leaq (,%r13,2), %r11
notq %r11
andq %r13, %r11
movq 0x250(%rdi), %r14
movq 0x240(%rdi), %rbp
movq %rbp, %rdx
xorq %r14, %rdx
movq %r11, %r15
andq %rdx, %r15
notq %rdx
andq %r11, %rdx
addq %r13, %r15
xorl %r11d, %r11d
addq %r13, %rdx
setb %r11b
movq %r11, 0x240(%rdi)
andq 0x258(%rdi), %r15
orq %rbp, %rdx
andq %r14, %rdx
orq %r15, %rdx
notq %rdx
orq %r13, %rdx
andq %rax, %rdx
movq %rdx, 0xe0(%rdi)
vmovq %rdx, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %rax
xorq 0x248(%rdi), %rax
movq %rax, (%rdi)
sarq $0x3f, %rax
movq %rax, 0x248(%rdi)
cmpb $0x0, 0x32(%r8)
jne 0x1c7b2
vmovdqa 0x1a0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %eax
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rdx
orq %rax, %rdx
movq %rdx, 0x10(%r8)
movq (%rdi), %rax
notq %rax
andq %rdx, %rax
movq %rax, 0x10(%r8)
movb $0x1, 0x32(%r8)
testb $0x1, %cl
jne 0x1c7da
testb $0x1, -0x20(%rsp)
je 0x1c80b
movq 0x10(%r8), %rcx
movq %rcx, %rdx
negq %rdx
setb %al
andq %rcx, %rdx
leaq -0x1(%rdx), %r13
orq %rdx, %r13
jmp 0x1c87d
movq 0x10(%r8), %rax
movq %rax, %rdx
negq %rdx
andq %rax, %rdx
leaq -0x1(%rax), %r14
andq %rax, %r14
movq %r14, 0x10(%r8)
setne %al
je 0x1c858
movq %r14, %r11
negq %r11
andq %r14, %r11
movq %r11, %r13
subq %rdx, %r13
orq %r11, %r13
jmp 0x1c87f
movq (%rsi), %rcx
leal 0x3f(%rcx), %eax
testq %rcx, %rcx
cmovnsl %ecx, %eax
andl $0xc0, %eax
subl %eax, %ecx
movl $0x1, %r14d
shlq %cl, %r14
movq %r14, %r13
negq %r13
movq %r13, %rdx
btcq %rcx, %rdx
movq 0x10(%r8), %rcx
andq %rdx, %rcx
movq %rcx, 0x10(%r8)
setne %al
je 0x1c86d
movq %rcx, %r11
negq %r11
andq %rcx, %r11
movq %r11, %r13
subq %r14, %r13
orq %r11, %r13
jmp 0x1c87a
negq %rdx
movabsq $-0x8000000000000000, %r11 # imm = 0x8000000000000000
orq %r11, %rdx
movq %rdx, %r13
jmp 0x1c87f
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %r13
andq %rdx, %r13
movb $0x1, %cl
cmpb $0x0, 0x33(%r8)
jne 0x1c8c3
vmovdqa 0x1c0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r11d
shlq $0x20, %r11
orq %rdx, %r11
movq %r11, 0x18(%r8)
movq (%rdi), %rdx
notq %rdx
andq %r11, %rdx
movq %rdx, 0x18(%r8)
movb $0x1, 0x33(%r8)
andq 0x18(%r8), %r13
popcntq %r13, %r14
movl %r12d, %edx
subl %r14d, %edx
jle 0x1c8e5
testb %al, %al
je 0x1c91a
subl %r14d, %r12d
incl %r12d
movl $0x5, %eax
jmp 0x1c92a
cmpl $0x2, %r12d
jl 0x1c8fe
leal 0x1(%r12), %eax
leaq -0x1(%r13), %rdx
andq %rdx, %r13
decl %eax
cmpl $0x2, %eax
jg 0x1c8f0
movq 0x270(%rdi), %rax
shlq $0x6, %rax
bsfq %r13, %rdx
orq %rax, %rdx
movq %rdx, (%rsi)
movl $0x1, %eax
jmp 0x1c92a
incq %r9
xorl %ecx, %ecx
movb $0x1, %al
movl %eax, -0x20(%rsp)
movl %edx, %r12d
xorl %eax, %eax
testl %eax, %eax
je 0x1c63a
cmpl $0x5, %eax
je 0x1c63a
movq -0x10(%rsp), %rdx
jmp 0x1cd25
leaq 0x3f(%rax), %r15
testq %rax, %rax
cmovnsq %rax, %r15
movl (%rdx), %r13d
shrq $0x6, %r15
xorl %r12d, %r12d
movl $0x0, -0x20(%rsp)
movslq %r15d, %rax
cmpq %rax, 0x270(%rdi)
jge 0x1ca8f
leal (%r15,%r15), %eax
cltq
movq -0x8(%rsp), %rcx
movw $0x0, 0x4(%rcx)
movl $0x0, (%rcx)
movq %rax, 0x88(%rdi)
movq %rax, %rcx
sarq %rcx
movq %rcx, 0x270(%rdi)
movq %rax, %rcx
shlq $0x5, %rcx
vmovdqu (%r10,%rcx), %ymm1
vmovdqa %ymm1, 0xa0(%rdi)
vmovdqa 0x140(%rdi), %ymm2
vmovdqa 0x180(%rdi), %ymm3
vpcmpeqb %ymm1, %ymm2, %ymm4
vpmovmskb %ymm4, %edx
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r14d
incq %rax
movq %rax, 0x88(%rdi)
shlq $0x5, %rax
vmovdqu (%r10,%rax), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %eax
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %ecx
shlq $0x20, %rax
orq %rdx, %rax
shlq $0x20, %rcx
orq %r14, %rcx
leaq (%rcx,%rcx), %r14
notq %r14
andq %rcx, %r14
movq 0x250(%rdi), %rbp
movq 0x240(%rdi), %r9
movq %r9, %rdx
xorq %rbp, %rdx
movq %r14, %r11
andq %rdx, %r11
notq %rdx
andq %r14, %rdx
addq %rcx, %r11
xorl %r14d, %r14d
addq %rcx, %rdx
setb %r14b
movq %r14, 0x240(%rdi)
andq 0x258(%rdi), %r11
orq %r9, %rdx
andq %rbp, %rdx
orq %r11, %rdx
notq %rdx
orq %rcx, %rdx
andq %rax, %rdx
movq %rdx, 0xe0(%rdi)
vmovq %rdx, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %rax
xorq 0x248(%rdi), %rax
movq %rax, (%rdi)
sarq $0x3f, %rax
movq %rax, 0x248(%rdi)
cmpb $0x0, 0x32(%r8)
jne 0x1cad3
vmovdqa 0x1a0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %eax
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x10(%r8)
movq (%rdi), %rax
notq %rax
andq %rcx, %rax
movq %rax, 0x10(%r8)
movb $0x1, 0x32(%r8)
cmpb $0x0, 0x34(%r8)
jne 0x1cb17
vmovdqa 0x200(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %eax
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x20(%r8)
movq (%rdi), %rax
notq %rax
andq %rcx, %rax
movq %rax, 0x20(%r8)
movb $0x1, 0x34(%r8)
movq 0x20(%r8), %rdx
orq 0x10(%r8), %rdx
testb $0x1, -0x20(%rsp)
je 0x1cb3b
movq %rdx, %r9
negq %r9
setb %cl
andq %rdx, %r9
leaq -0x1(%r9), %rax
orq %r9, %rax
jmp 0x1cb8f
movq (%rsi), %rcx
leal 0x3f(%rcx), %eax
testq %rcx, %rcx
cmovnsl %ecx, %eax
andl $0xc0, %eax
subl %eax, %ecx
movl $0x1, %ebp
shlq %cl, %rbp
movq %rbp, %rax
negq %rax
movq %rax, %r14
btcq %rcx, %r14
andq %r14, %rdx
setne %cl
je 0x1cb7f
movq %rdx, %r9
negq %r9
andq %rdx, %r9
movq %r9, %rax
subq %rbp, %rax
orq %r9, %rax
jmp 0x1cb8c
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %rax
andq %r14, %rax
vmovdqa 0x220(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r14d
shlq $0x20, %r14
orq %rdx, %r14
movq %r14, 0x28(%r8)
movq (%rdi), %rdx
notq %rdx
andq %rdx, %r14
movq %r14, 0x28(%r8)
cmpb $0x0, 0x31(%r8)
jne 0x1cc01
vmovdqa 0x1e0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %r9d
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r11d
shlq $0x20, %r11
orq %r9, %r11
andq %rdx, %r11
movq %r11, 0x8(%r8)
movb $0x1, 0x31(%r8)
movq %r14, %rbp
andq %rax, %rbp
leaq -0x1(%rbp), %rdx
xorq %r14, %rdx
andq 0x8(%r8), %rdx
andq %rax, %rdx
popcntq %rdx, %r9
addl %r9d, %r12d
movl %r13d, %r14d
subl %r12d, %r14d
jle 0x1cc51
testq %rbp, %rbp
je 0x1cc9a
movq 0x270(%rdi), %rax
shlq $0x6, %rax
bsfq %rbp, %rcx
orq %rax, %rcx
movq %rcx, (%rsi)
movl $0x0, -0x18(%rsp)
movl $0x3ea, -0x14(%rsp)     # imm = 0x3EA
jmp 0x1cc8e
cmpl $0x2, %r13d
jl 0x1cc69
leal 0x1(%r13), %eax
leaq -0x1(%rdx), %rcx
andq %rcx, %rdx
decl %eax
cmpl $0x2, %eax
jg 0x1cc5b
movq 0x270(%rdi), %rax
shlq $0x6, %rax
bsfq %rdx, %rcx
orq %rax, %rcx
movq %rcx, (%rsi)
movl $0x0, -0x18(%rsp)
movl $0x3e9, -0x14(%rsp)     # imm = 0x3E9
xorl %eax, %eax
testb %al, %al
jne 0x1c962
jmp 0x1ccdc
testb %cl, %cl
je 0x1cccc
movq 0x270(%rdi), %rcx
shlq $0x6, %rcx
bsrq %rax, %rax
xorq $0x3f, %rax
orq %rcx, %rax
xorq $0x3f, %rax
movq %rax, (%rsi)
movl $0x3ed, -0x14(%rsp)     # imm = 0x3ED
xorl %eax, %eax
movl %r12d, -0x18(%rsp)
jmp 0x1cc90
incl %r15d
movb $0x1, %al
movl %eax, -0x20(%rsp)
movl %r14d, %r13d
movb $0x1, %al
jmp 0x1cc90
movl -0x14(%rsp), %eax
cmpl $0x3ed, %eax            # imm = 0x3ED
je 0x1cd10
cmpl $0x3ea, %eax            # imm = 0x3EA
movq -0x10(%rsp), %rdx
je 0x1cd06
cmpl $0x3e9, %eax            # imm = 0x3E9
jne 0x1cd1f
movl $0x3ec, -0x1c(%rsp)     # imm = 0x3EC
xorl %eax, %eax
jmp 0x1cd21
movl %eax, %ecx
xorl %eax, %eax
movl %ecx, -0x1c(%rsp)
jmp 0x1cd21
movq -0x10(%rsp), %rdx
movl (%rdx), %eax
subl -0x18(%rsp), %eax
incl %eax
movl %eax, (%rdx)
movb $0x1, %al
testb %al, %al
je 0x1cd93
decl (%rdx)
movq (%rsi), %rax
leaq 0x1(%rax), %rcx
movzbl (%r10,%rax), %r9d
cmpq $0x20, %r9
ja 0x1cd4d
btq %r9, %rbx
jae 0x1cd4d
incq %rax
movq %rax, (%rsi)
incq %rcx
jmp 0x1cd2e
incq %rcx
movq %rcx, (%rsi)
movzbl (%r10,%rcx), %r9d
cmpq $0x20, %r9
ja 0x1cd61
btq %r9, %rbx
jb 0x1cd4a
cmpb $0x5d, %r9b
setne %al
je 0x1cd97
cmpb $0x2c, %r9b
jne 0x1cd76
incq %rcx
movq %rcx, (%rsi)
movq (%rsi), %rcx
incq %rcx
movzbl -0x1(%r10,%rcx), %r9d
cmpq $0x20, %r9
ja 0x1cd9f
btq %r9, %rbx
jae 0x1cd9f
movq %rcx, (%rsi)
jmp 0x1cd79
xorl %eax, %eax
jmp 0x1cd9f
movl $0x3ea, -0x1c(%rsp)     # imm = 0x3EA
testb %al, %al
je 0x1cdb3
cmpl $0x0, (%rdx)
jg 0x1c5ce
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0x1cdb7
movl -0x1c(%rsp), %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
nop