// File: /workspace/github_cpp_makefile_star2_O1/AutomataLab[P]JSONSki/src/QueryProcessor.cpp
// Function: QueryProcessor::goToPrimElemInRange(long&, int&, bitmap&)
__attribute__((always_inline)) int QueryProcessor::goToPrimElemInRange(long& pos, int& num_elements, bitmap& bm) {
    do {
        int element_type = getElementType(pos);
        int result = 0;
        switch(element_type) {
            case PRIMITIVE: {
                return SUCCESS;
            }
            case OBJECT:
                goOverObj(pos, bm);
                break;
            case ARRAY:
                goOverAry(pos, bm);
        }
        --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, -0x10(%rsp)
vpcmpeqd %xmm0, %xmm0, %xmm0
movabsq $0x100002400, %rbx      # imm = 0x100002400
movq %rdx, -0x8(%rsp)
movq (%rsi), %rcx
movzbl (%r10,%rcx), %eax
cmpl $0x20, %eax
jne 0x1ce0b
incq %rcx
movq %rcx, (%rsi)
jmp 0x1cdf9
cmpl $0x5b, %eax
je 0x1ce1c
cmpl $0x7b, %eax
jne 0x1ce23
movl $0x65, %eax
jmp 0x1ce28
movl $0x66, %eax
jmp 0x1ce28
movl $0x67, %eax
cmpl $0x67, %eax
je 0x1d165
leaq 0x3f(%rcx), %r14
cmpl $0x66, %eax
jne 0x1d174
testq %rcx, %rcx
cmovnsq %rcx, %r14
sarq $0x6, %r14
movl $0x1, %r15d
movl $0x0, -0x18(%rsp)
xorl %ecx, %ecx
cmpq 0x2e0(%rdi), %r14
jge 0x1ce59
cmpq 0x270(%rdi), %r14
jle 0x1cf8b
leaq (%r14,%r14), %rax
movq -0x10(%rsp), %rdx
movw $0x0, 0x4(%rdx)
movl $0x0, (%rdx)
movq %rax, 0x88(%rdi)
movq %r14, 0x270(%rdi)
movq %r14, %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, %eax
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %edx
leaq 0x1(,%r14,2), %r9
movq %r9, 0x88(%rdi)
shlq $0x5, %r9
vmovdqu (%r10,%r9), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %r12d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r13d
shlq $0x20, %r12
orq %rax, %r12
shlq $0x20, %r13
orq %rdx, %r13
leaq (,%r13,2), %rax
notq %rax
andq %r13, %rax
movq 0x250(%rdi), %rdx
movq 0x240(%rdi), %r11
movq %r11, %r9
xorq %rdx, %r9
movq %rax, %rbp
andq %r9, %rbp
notq %r9
andq %rax, %r9
addq %r13, %rbp
xorl %eax, %eax
addq %r13, %r9
setb %al
movq %rax, 0x240(%rdi)
andq 0x258(%rdi), %rbp
orq %r11, %r9
andq %rdx, %r9
orq %rbp, %r9
notq %r9
orq %r13, %r9
andq %r12, %r9
movq %r9, 0xe0(%rdi)
vmovq %r9, %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, 0x34(%r8)
jne 0x1cfcf
vmovdqa 0x200(%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, 0x20(%r8)
movq (%rdi), %rax
notq %rax
andq %rdx, %rax
movq %rax, 0x20(%r8)
movb $0x1, 0x34(%r8)
testb $0x1, %cl
jne 0x1cff8
testb $0x1, -0x18(%rsp)
je 0x1d02a
movq 0x20(%r8), %rax
movq %rax, %rcx
negq %rcx
setb %r13b
andq %rax, %rcx
leaq -0x1(%rcx), %r12
orq %rcx, %r12
jmp 0x1d09c
movq 0x20(%r8), %rdx
movq %rdx, %r9
negq %r9
andq %rdx, %r9
leaq -0x1(%rdx), %rax
andq %rdx, %rax
movq %rax, 0x20(%r8)
setne %r13b
je 0x1d077
movq %rax, %rdx
negq %rdx
andq %rax, %rdx
movq %rdx, %r12
subq %r9, %r12
orq %rdx, %r12
jmp 0x1d09e
movq (%rsi), %rcx
leal 0x3f(%rcx), %eax
testq %rcx, %rcx
cmovnsl %ecx, %eax
andl $0xc0, %eax
subl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %r12
negq %r12
movq %r12, %r9
btcq %rcx, %r9
movq 0x20(%r8), %rcx
andq %r9, %rcx
movq %rcx, 0x20(%r8)
setne %r13b
je 0x1d08c
movq %rcx, %rdx
negq %rdx
andq %rcx, %rdx
movq %rdx, %r12
subq %rax, %r12
orq %rdx, %r12
jmp 0x1d099
negq %r9
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
orq %rax, %r9
movq %r9, %r12
jmp 0x1d09e
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
orq %rax, %r12
andq %r9, %r12
movb $0x1, %cl
cmpb $0x0, 0x35(%r8)
jne 0x1d0e2
vmovdqa 0x220(%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, 0x28(%r8)
movq (%rdi), %rax
notq %rax
andq %rdx, %rax
movq %rax, 0x28(%r8)
movb $0x1, 0x35(%r8)
andq 0x28(%r8), %r12
popcntq %r12, %r9
movl %r15d, %eax
subl %r9d, %eax
jle 0x1d106
testb %r13b, %r13b
je 0x1d13c
subl %r9d, %r15d
incl %r15d
movl $0x5, %r9d
jmp 0x1d14d
cmpl $0x2, %r15d
jl 0x1d11f
leal 0x1(%r15), %eax
leaq -0x1(%r12), %rdx
andq %rdx, %r12
decl %eax
cmpl $0x2, %eax
jg 0x1d110
movq 0x270(%rdi), %rax
shlq $0x6, %rax
bsfq %r12, %rdx
orq %rax, %rdx
movq %rdx, (%rsi)
movl $0x1, %r9d
jmp 0x1d14d
incq %r14
xorl %ecx, %ecx
movb $0x1, %dl
movl %edx, -0x18(%rsp)
movl %eax, %r15d
xorl %r9d, %r9d
testl %r9d, %r9d
je 0x1ce59
cmpl $0x5, %r9d
je 0x1ce59
jmp 0x1d496
movl $0x3e9, -0x14(%rsp)     # imm = 0x3E9
xorl %ebp, %ebp
jmp 0x1d50e
testq %rcx, %rcx
cmovnsq %rcx, %r14
sarq $0x6, %r14
movl $0x1, %r15d
movl $0x0, -0x18(%rsp)
xorl %ecx, %ecx
cmpq 0x2e0(%rdi), %r14
jge 0x1d18f
cmpq 0x270(%rdi), %r14
jle 0x1d2c1
leaq (%r14,%r14), %rax
movq -0x10(%rsp), %rdx
movw $0x0, 0x4(%rdx)
movl $0x0, (%rdx)
movq %rax, 0x88(%rdi)
movq %r14, 0x270(%rdi)
movq %r14, %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, %eax
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r9d
leaq 0x1(,%r14,2), %r12
movq %r12, 0x88(%rdi)
shlq $0x5, %r12
vmovdqu (%r10,%r12), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %r12d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r13d
shlq $0x20, %r12
orq %rax, %r12
shlq $0x20, %r13
orq %r9, %r13
leaq (,%r13,2), %rax
notq %rax
andq %r13, %rax
movq 0x250(%rdi), %rdx
movq 0x240(%rdi), %rbp
movq %rbp, %r9
xorq %rdx, %r9
movq %rax, %r11
andq %r9, %r11
notq %r9
andq %rax, %r9
addq %r13, %r11
xorl %eax, %eax
addq %r13, %r9
setb %al
movq %rax, 0x240(%rdi)
andq 0x258(%rdi), %r11
orq %rbp, %r9
andq %rdx, %r9
orq %r11, %r9
notq %r9
orq %r13, %r9
andq %r12, %r9
movq %r9, 0xe0(%rdi)
vmovq %r9, %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 0x1d305
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 0x1d32e
testb $0x1, -0x18(%rsp)
je 0x1d360
movq 0x10(%r8), %rax
movq %rax, %rcx
negq %rcx
setb %r13b
andq %rax, %rcx
leaq -0x1(%rcx), %r12
orq %rcx, %r12
jmp 0x1d3d2
movq 0x10(%r8), %rdx
movq %rdx, %r9
negq %r9
andq %rdx, %r9
leaq -0x1(%rdx), %rax
andq %rdx, %rax
movq %rax, 0x10(%r8)
setne %r13b
je 0x1d3ad
movq %rax, %rdx
negq %rdx
andq %rax, %rdx
movq %rdx, %r12
subq %r9, %r12
orq %rdx, %r12
jmp 0x1d3d4
movq (%rsi), %rcx
leal 0x3f(%rcx), %eax
testq %rcx, %rcx
cmovnsl %ecx, %eax
andl $0xc0, %eax
subl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %r12
negq %r12
movq %r12, %r9
btcq %rcx, %r9
movq 0x10(%r8), %rcx
andq %r9, %rcx
movq %rcx, 0x10(%r8)
setne %r13b
je 0x1d3c2
movq %rcx, %rdx
negq %rdx
andq %rcx, %rdx
movq %rdx, %r12
subq %rax, %r12
orq %rdx, %r12
jmp 0x1d3cf
negq %r9
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
orq %rax, %r9
movq %r9, %r12
jmp 0x1d3d4
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
orq %rax, %r12
andq %r9, %r12
movb $0x1, %cl
cmpb $0x0, 0x33(%r8)
jne 0x1d418
vmovdqa 0x1c0(%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, 0x18(%r8)
movq (%rdi), %rax
notq %rax
andq %rdx, %rax
movq %rax, 0x18(%r8)
movb $0x1, 0x33(%r8)
andq 0x18(%r8), %r12
popcntq %r12, %r9
movl %r15d, %eax
subl %r9d, %eax
jle 0x1d43c
testb %r13b, %r13b
je 0x1d472
subl %r9d, %r15d
incl %r15d
movl $0x5, %r9d
jmp 0x1d483
cmpl $0x2, %r15d
jl 0x1d455
leal 0x1(%r15), %eax
leaq -0x1(%r12), %rdx
andq %rdx, %r12
decl %eax
cmpl $0x2, %eax
jg 0x1d446
movq 0x270(%rdi), %rax
shlq $0x6, %rax
bsfq %r12, %rdx
orq %rax, %rdx
movq %rdx, (%rsi)
movl $0x1, %r9d
jmp 0x1d483
incq %r14
xorl %ecx, %ecx
movb $0x1, %dl
movl %edx, -0x18(%rsp)
movl %eax, %r15d
xorl %r9d, %r9d
testl %r9d, %r9d
je 0x1d18f
cmpl $0x5, %r9d
je 0x1d18f
movq -0x8(%rsp), %rdx
decl (%rdx)
movq (%rsi), %r9
leaq 0x1(%r9), %rcx
movzbl (%r10,%r9), %eax
cmpq $0x20, %rax
ja 0x1d4c3
btq %rax, %rbx
jae 0x1d4c3
incq %r9
movq %r9, (%rsi)
incq %rcx
jmp 0x1d4a4
incq %rcx
movq %rcx, (%rsi)
movzbl (%r10,%rcx), %eax
cmpq $0x20, %rax
ja 0x1d4d7
btq %rax, %rbx
jb 0x1d4c0
cmpb $0x5d, %al
setne %bpl
je 0x1d506
cmpb $0x2c, %al
jne 0x1d4e9
incq %rcx
movq %rcx, (%rsi)
movq (%rsi), %rax
incq %rax
movzbl -0x1(%r10,%rax), %ecx
cmpq $0x20, %rcx
ja 0x1d50e
btq %rcx, %rbx
jae 0x1d50e
movq %rax, (%rsi)
jmp 0x1d4ec
movl $0x3ea, -0x14(%rsp)     # imm = 0x3EA
testb %bpl, %bpl
je 0x1d523
cmpl $0x0, (%rdx)
jg 0x1cdf6
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0x1d527
movl -0x14(%rsp), %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
nop