// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, -0x8(%rsp)
movq 0x2c8(%rdi), %rbx
leaq 0x30(%rcx), %rax
movq %rax, -0x10(%rsp)
movq (%rsi), %rax
vpcmpeqd %xmm0, %xmm0, %xmm0
movabsq $0x100002400, %r13      # imm = 0x100002400
movzbl (%rbx,%rax), %ecx
cmpl $0x7b, %ecx
je 0x1cdeb
cmpl $0x5b, %ecx
je 0x1cad6
cmpl $0x20, %ecx
jne 0x1d1a2
incq %rax
movq %rax, (%rsi)
jmp 0x1cab3
cqto
movabsq $0x40, %rcx
idivq %rcx
movq %rax, %r10
movl $0x0, -0x34(%rsp)
movl $0x1, %r12d
leaq (%r10,%r10), %rax
movq %rax, -0x18(%rsp)
movq %r10, %rax
shlq $0x6, %rax
movq %rax, -0x20(%rsp)
leaq 0x1(,%r10,2), %rax
movq %rax, -0x28(%rsp)
shlq $0x5, %rax
movq %rax, -0x30(%rsp)
xorl %eax, %eax
movl %r12d, %r9d
movq 0x2e0(%rdi), %rcx
cmpq %rcx, %r10
jge 0x1cb2d
cmpq 0x270(%rdi), %r10
jle 0x1cc50
movq -0x10(%rsp), %rcx
andw $0x0, 0x4(%rcx)
andl $0x0, (%rcx)
movq -0x18(%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, %r14d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r12d
movq -0x28(%rsp), %rcx
movq %rcx, 0x88(%rdi)
movq -0x30(%rsp), %rcx
vmovdqu (%rbx,%rcx), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %ecx
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rcx
orq %r14, %rcx
shlq $0x20, %rdx
orq %r12, %rdx
leaq (%rdx,%rdx), %r14
notq %r14
andq %rdx, %r14
movq 0x250(%rdi), %rbp
movq 0x240(%rdi), %r11
movq %r11, %r12
xorq %rbp, %r12
movq %r14, %r15
andq %r12, %r15
notq %r12
andq %r14, %r12
addq %rdx, %r15
xorl %r14d, %r14d
addq %rdx, %r12
setb %r14b
movq %r14, 0x240(%rdi)
andq 0x258(%rdi), %r15
orq %r11, %r12
andq %rbp, %r12
orq %r15, %r12
notq %r12
orq %rdx, %r12
andq %rcx, %r12
movq %r12, 0xe0(%rdi)
vmovq %r12, %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, 0x34(%r8)
jne 0x1cc90
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), %rcx
notq %rcx
andq %rdx, %rcx
movq %rcx, 0x20(%r8)
movb $0x1, 0x34(%r8)
testb $0x1, %al
jne 0x1ccb7
testb $0x1, -0x34(%rsp)
je 0x1cce7
movq 0x20(%r8), %rax
movq %rax, %rdx
negq %rdx
setb %cl
andq %rax, %rdx
leaq -0x1(%rdx), %r12
orq %rdx, %r12
jmp 0x1cd61
movq 0x20(%r8), %r11
movq %r11, %rdx
negq %rdx
andq %r11, %rdx
leaq -0x1(%r11), %rcx
andq %r11, %rcx
movq %rcx, 0x20(%r8)
je 0x1cd3a
movq %rcx, %r11
negq %r11
andq %rcx, %r11
movq %r11, %r12
subq %rdx, %r12
orq %r11, %r12
movb $0x1, %cl
jmp 0x1cd63
movq (%rsi), %rax
cqto
movabsq $0x40, %rcx
idivq %rcx
movq %rdx, %rcx
movabsq $0x1, %rdx
shlq %cl, %rdx
movq %rdx, %r12
negq %r12
movq %r12, %rax
btcq %rcx, %rax
movq 0x20(%r8), %rbp
andq %rax, %rbp
movq %rbp, 0x20(%r8)
setne %cl
je 0x1cd51
movq %rbp, %r11
negq %r11
andq %rbp, %r11
movq %r11, %r12
subq %rdx, %r12
orq %r11, %r12
jmp 0x1cd5e
negq %rdx
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %rdx
xorl %ecx, %ecx
movq %rdx, %r12
jmp 0x1cd63
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %r12
andq %rax, %r12
movb $0x1, %al
cmpb $0x0, 0x35(%r8)
je 0x1cd70
movq 0x28(%r8), %rdx
jmp 0x1cda9
vmovdqa 0x220(%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 (%rdi), %rdx
notq %rdx
andq %r11, %rdx
movq %rdx, 0x28(%r8)
movb $0x1, 0x35(%r8)
andq %r12, %rdx
popcntq %rdx, %rbp
movl %r9d, %r12d
subl %ebp, %r12d
jle 0x1cde0
testb %cl, %cl
je 0x1cdc8
subl %ebp, %r9d
incl %r9d
jmp 0x1cb26
incq %r10
movb $0x1, %al
movl %eax, -0x34(%rsp)
jmp 0x1caf6
leaq -0x1(%rdx), %rax
andq %rax, %rdx
decl %r9d
cmpl $0x2, %r9d
jge 0x1cdd6
jmp 0x1d0fa
cqto
movabsq $0x40, %rcx
idivq %rcx
movq %rax, %r10
movl $0x0, -0x34(%rsp)
movl $0x1, %r12d
leaq (%r10,%r10), %rax
movq %rax, -0x18(%rsp)
movq %r10, %rax
shlq $0x6, %rax
movq %rax, -0x20(%rsp)
leaq 0x1(,%r10,2), %rax
movq %rax, -0x28(%rsp)
shlq $0x5, %rax
movq %rax, -0x30(%rsp)
xorl %eax, %eax
movl %r12d, %r9d
movq 0x2e0(%rdi), %rcx
cmpq %rcx, %r10
jge 0x1ce42
cmpq 0x270(%rdi), %r10
jle 0x1cf64
movq -0x10(%rsp), %rcx
andw $0x0, 0x4(%rcx)
andl $0x0, (%rcx)
movq -0x18(%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, %r12d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %ebp
movq -0x28(%rsp), %rcx
movq %rcx, 0x88(%rdi)
movq -0x30(%rsp), %rcx
vmovdqu (%rbx,%rcx), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %ecx
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %edx
shlq $0x20, %rcx
orq %r12, %rcx
shlq $0x20, %rdx
orq %rbp, %rdx
leaq (%rdx,%rdx), %rbp
notq %rbp
andq %rdx, %rbp
movq 0x250(%rdi), %r11
movq 0x240(%rdi), %r15
movq %r15, %r12
xorq %r11, %r12
movq %rbp, %r14
andq %r12, %r14
notq %r12
andq %rbp, %r12
addq %rdx, %r14
xorl %ebp, %ebp
addq %rdx, %r12
setb %bpl
movq %rbp, 0x240(%rdi)
andq 0x258(%rdi), %r14
orq %r15, %r12
andq %r11, %r12
orq %r14, %r12
notq %r12
orq %rdx, %r12
andq %rcx, %r12
movq %r12, 0xe0(%rdi)
vmovq %r12, %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 0x1cfa4
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 0x1cfcb
testb $0x1, -0x34(%rsp)
je 0x1cffb
movq 0x10(%r8), %rax
movq %rax, %rdx
negq %rdx
setb %cl
andq %rax, %rdx
leaq -0x1(%rdx), %r12
orq %rdx, %r12
jmp 0x1d075
movq 0x10(%r8), %r11
movq %r11, %rdx
negq %rdx
andq %r11, %rdx
leaq -0x1(%r11), %rcx
andq %r11, %rcx
movq %rcx, 0x10(%r8)
je 0x1d04e
movq %rcx, %r11
negq %r11
andq %rcx, %r11
movq %r11, %r12
subq %rdx, %r12
orq %r11, %r12
movb $0x1, %cl
jmp 0x1d077
movq (%rsi), %rax
cqto
movabsq $0x40, %rcx
idivq %rcx
movq %rdx, %rcx
movabsq $0x1, %rdx
shlq %cl, %rdx
movq %rdx, %r12
negq %r12
movq %r12, %rax
btcq %rcx, %rax
movq 0x10(%r8), %rbp
andq %rax, %rbp
movq %rbp, 0x10(%r8)
setne %cl
je 0x1d065
movq %rbp, %r11
negq %r11
andq %rbp, %r11
movq %r11, %r12
subq %rdx, %r12
orq %r11, %r12
jmp 0x1d072
negq %rdx
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %rdx
xorl %ecx, %ecx
movq %rdx, %r12
jmp 0x1d077
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %r12
andq %rax, %r12
movb $0x1, %al
cmpb $0x0, 0x33(%r8)
je 0x1d084
movq 0x18(%r8), %rdx
jmp 0x1d0bd
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 (%rdi), %rdx
notq %rdx
andq %r11, %rdx
movq %rdx, 0x18(%r8)
movb $0x1, 0x33(%r8)
andq %r12, %rdx
popcntq %rdx, %rbp
movl %r9d, %r12d
subl %ebp, %r12d
jle 0x1d0f4
testb %cl, %cl
je 0x1d0dc
subl %ebp, %r9d
incl %r9d
jmp 0x1ce3b
incq %r10
movb $0x1, %al
movl %eax, -0x34(%rsp)
jmp 0x1ce0b
leaq -0x1(%rdx), %rax
andq %rax, %rdx
decl %r9d
cmpl $0x2, %r9d
jge 0x1d0ea
movq 0x270(%rdi), %rcx
shlq $0x6, %rcx
bsfq %rdx, %r9
leaq (%r9,%rcx), %rax
incq %rax
movq %rcx, %rdx
orq %r9, %rdx
movq %rdx, (%rsi)
movq -0x8(%rsp), %r10
movl (%r10), %ecx
leal -0x1(%rcx), %r9d
movl %r9d, (%r10)
movzbl (%rbx,%rdx), %r9d
cmpq $0x20, %r9
ja 0x1d147
btq %r9, %r13
jae 0x1d147
incq %rdx
movq %rdx, (%rsi)
incq %rax
jmp 0x1d128
incq %rax
movq %rax, (%rsi)
movzbl (%rbx,%rax), %edx
cmpl $0xa, %edx
je 0x1d144
cmpl $0xd, %edx
je 0x1d144
cmpl $0x20, %edx
je 0x1d144
cmpl $0x2c, %edx
je 0x1d169
cmpl $0x5d, %edx
jne 0x1d16f
jmp 0x1d18f
incq %rax
movq %rax, (%rsi)
movzbl (%rbx,%rax), %edx
cmpq $0x20, %rdx
ja 0x1d17f
btq %rdx, %r13
jb 0x1d169
cmpl $0x1, %ecx
jg 0x1cab3
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0x1d194
movl $0x3ea, %eax            # imm = 0x3EA
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
movl $0x3e9, %eax            # imm = 0x3E9
jmp 0x1d194
nop