// File: /workspace/github_cpp_makefile_star2_O3/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 %rdx, -0x8(%rsp)
movq 0x2c8(%rdi), %rbx
movq %rcx, -0x30(%rsp)
addq $0x30, %rcx
movq %rcx, -0x10(%rsp)
movq (%rsi), %rcx
leaq 0x20(%rbx), %rdx
movq %rdx, -0x18(%rsp)
vpcmpeqd %xmm0, %xmm0, %xmm0
movq %rbx, -0x28(%rsp)
movq %rsi, -0x20(%rsp)
movzbl (%rbx,%rcx), %edx
cmpl $0x7b, %edx
je 0x1d02f
cmpl $0x5b, %edx
je 0x1cce1
cmpl $0x20, %edx
jne 0x1d440
incq %rcx
movq %rcx, (%rsi)
jmp 0x1ccbe
leaq 0x3f(%rcx), %r14
testq %rcx, %rcx
cmovnsq %rcx, %r14
sarq $0x6, %r14
movl $0x1, %r8d
xorl %ebx, %ebx
xorl %esi, %esi
movq 0x2e0(%rdi), %rdx
cmpq %rdx, %r14
jge 0x1cd01
leaq (%r14,%r14), %r12
movq %r14, %r13
shlq $0x6, %r13
addq -0x18(%rsp), %r13
movl %r8d, %r15d
cmpq 0x270(%rdi), %r14
jle 0x1ce32
movq -0x10(%rsp), %rdx
movw $0x0, 0x4(%rdx)
movl $0x0, (%rdx)
movq %r12, 0x88(%rdi)
movq %r14, 0x270(%rdi)
vmovdqu -0x20(%r13), %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, %r10d
leaq 0x1(%r12), %rdx
movq %rdx, 0x88(%rdi)
vmovdqu (%r13), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %edx
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %r8d
shlq $0x20, %rdx
orq %r9, %rdx
shlq $0x20, %r8
orq %r10, %r8
leaq (%r8,%r8), %r9
notq %r9
andq %r8, %r9
movq 0x250(%rdi), %r10
movl %ebx, %eax
movq 0x240(%rdi), %rbx
movq %rbx, %r11
xorq %r10, %r11
movq %r9, %rbp
andq %r11, %rbp
notq %r11
andq %r9, %r11
addq %r8, %rbp
xorl %r9d, %r9d
addq %r8, %r11
setb %r9b
movq %r9, 0x240(%rdi)
andq 0x258(%rdi), %rbp
orq %rbx, %r11
movl %eax, %ebx
andq %r10, %r11
orq %rbp, %r11
notq %r11
orq %r8, %r11
andq %rdx, %r11
movq %r11, 0xe0(%rdi)
vmovq %r11, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %rdx
xorq 0x248(%rdi), %rdx
movq %rdx, (%rdi)
sarq $0x3f, %rdx
movq %rdx, 0x248(%rdi)
movq -0x30(%rsp), %rax
cmpb $0x0, 0x34(%rax)
jne 0x1ce7a
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 -0x30(%rsp), %rax
movq %rdx, 0x20(%rax)
movb $0x1, 0x34(%rax)
testb $0x1, %sil
jne 0x1cea6
testb $0x1, %bl
je 0x1cede
movq -0x30(%rsp), %rax
movq 0x20(%rax), %rcx
movq %rcx, %r9
negq %r9
setb %dl
andq %rcx, %r9
leaq -0x1(%r9), %r8
orq %r9, %r8
jmp 0x1cf5d
movq -0x30(%rsp), %rax
movq 0x20(%rax), %r8
movq %r8, %r11
negq %r11
andq %r8, %r11
leaq -0x1(%r8), %rdx
andq %r8, %rdx
movq %rdx, 0x20(%rax)
je 0x1cf36
movq %rdx, %r9
negq %r9
andq %rdx, %r9
movq %r9, %r8
subq %r11, %r8
orq %r9, %r8
movb $0x1, %dl
jmp 0x1cf60
movq -0x20(%rsp), %rcx
movq (%rcx), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
andl $0xc0, %edx
subl %edx, %ecx
movl $0x1, %r10d
shlq %cl, %r10
movq %r10, %r8
negq %r8
movq %r8, %r11
btcq %rcx, %r11
movq -0x30(%rsp), %rax
movq 0x20(%rax), %rcx
andq %r11, %rcx
movq %rcx, 0x20(%rax)
setne %dl
je 0x1cf4d
movq %rcx, %r9
negq %r9
andq %rcx, %r9
movq %r9, %r8
subq %r10, %r8
orq %r9, %r8
jmp 0x1cf5a
negq %r11
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %r11
xorl %edx, %edx
movq %r11, %r8
jmp 0x1cf60
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %r8
andq %r11, %r8
movb $0x1, %sil
movq -0x30(%rsp), %rax
cmpb $0x0, 0x35(%rax)
je 0x1cf76
movq -0x30(%rsp), %rax
movq 0x28(%rax), %r11
jmp 0x1cfb3
vmovdqa 0x220(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %r9d
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r10d
shlq $0x20, %r10
orq %r9, %r10
movq (%rdi), %r11
notq %r11
andq %r10, %r11
movq -0x30(%rsp), %rax
movq %r11, 0x28(%rax)
movb $0x1, 0x35(%rax)
andq %r8, %r11
popcntq %r11, %r10
movl %r15d, %r8d
subl %r10d, %r8d
jle 0x1cff9
testb %dl, %dl
jne 0x1cfeb
incq %r14
addq $0x2, %r12
addq $0x40, %r13
movb $0x1, %bl
xorl %esi, %esi
movl %r8d, %r15d
cmpq 0x2e0(%rdi), %r14
jl 0x1cd19
jmp 0x1ccfa
subl %r10d, %r15d
incl %r15d
movl %r15d, %r8d
jmp 0x1ccfa
cmpl $0x2, %r15d
jl 0x1d367
incl %r15d
movq -0x28(%rsp), %rbx
movabsq $0x100002400, %r14      # imm = 0x100002400
movq -0x20(%rsp), %rsi
leaq -0x1(%r11), %rcx
andq %rcx, %r11
decl %r15d
cmpl $0x2, %r15d
ja 0x1d01a
jmp 0x1d38c
leaq 0x3f(%rcx), %r14
testq %rcx, %rcx
cmovnsq %rcx, %r14
sarq $0x6, %r14
movl $0x1, %r8d
xorl %ebx, %ebx
xorl %ecx, %ecx
movq 0x2e0(%rdi), %rdx
cmpq %rdx, %r14
jge 0x1d04f
leaq (%r14,%r14), %r12
movq %r14, %r13
shlq $0x6, %r13
addq -0x18(%rsp), %r13
movl %r8d, %r15d
cmpq 0x270(%rdi), %r14
jle 0x1d180
movq -0x10(%rsp), %rdx
movw $0x0, 0x4(%rdx)
movl $0x0, (%rdx)
movq %r12, 0x88(%rdi)
movq %r14, 0x270(%rdi)
vmovdqu -0x20(%r13), %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, %r11d
leaq 0x1(%r12), %rdx
movq %rdx, 0x88(%rdi)
vmovdqu (%r13), %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 %r11, %r8
leaq (%r8,%r8), %r10
notq %r10
andq %r8, %r10
movl %ebx, %eax
movq 0x250(%rdi), %rbx
movq 0x240(%rdi), %r9
movq %r9, %r11
xorq %rbx, %r11
movq %r10, %rbp
andq %r11, %rbp
notq %r11
andq %r10, %r11
addq %r8, %rbp
xorl %r10d, %r10d
addq %r8, %r11
setb %r10b
movq %r10, 0x240(%rdi)
andq 0x258(%rdi), %rbp
orq %r9, %r11
andq %rbx, %r11
movl %eax, %ebx
orq %rbp, %r11
notq %r11
orq %r8, %r11
andq %rdx, %r11
movq %r11, 0xe0(%rdi)
vmovq %r11, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %rdx
xorq 0x248(%rdi), %rdx
movq %rdx, (%rdi)
sarq $0x3f, %rdx
movq %rdx, 0x248(%rdi)
movq -0x30(%rsp), %rax
cmpb $0x0, 0x32(%rax)
jne 0x1d1c8
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 -0x30(%rsp), %rax
movq %rdx, 0x10(%rax)
movb $0x1, 0x32(%rax)
testb $0x1, %cl
jne 0x1d1f3
testb $0x1, %bl
je 0x1d228
movq -0x30(%rsp), %rax
movq 0x10(%rax), %rcx
movq %rcx, %r9
negq %r9
setb %dl
andq %rcx, %r9
leaq -0x1(%r9), %r8
orq %r9, %r8
jmp 0x1d2a2
movq -0x30(%rsp), %rax
movq 0x10(%rax), %r8
movq %r8, %r11
negq %r11
andq %r8, %r11
leaq -0x1(%r8), %rdx
andq %r8, %rdx
movq %rdx, 0x10(%rax)
je 0x1d27b
movq %rdx, %r9
negq %r9
andq %rdx, %r9
movq %r9, %r8
subq %r11, %r8
orq %r9, %r8
movb $0x1, %dl
jmp 0x1d2a4
movq (%rsi), %rcx
leal 0x3f(%rcx), %edx
testq %rcx, %rcx
cmovnsl %ecx, %edx
andl $0xc0, %edx
subl %edx, %ecx
movl $0x1, %r10d
shlq %cl, %r10
movq %r10, %r8
negq %r8
movq %r8, %r11
btcq %rcx, %r11
movq -0x30(%rsp), %rax
movq 0x10(%rax), %rcx
andq %r11, %rcx
movq %rcx, 0x10(%rax)
setne %dl
je 0x1d292
movq %rcx, %r9
negq %r9
andq %rcx, %r9
movq %r9, %r8
subq %r10, %r8
orq %r9, %r8
jmp 0x1d29f
negq %r11
movabsq $-0x8000000000000000, %rdx # imm = 0x8000000000000000
orq %rdx, %r11
xorl %edx, %edx
movq %r11, %r8
jmp 0x1d2a4
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
orq %rcx, %r8
andq %r11, %r8
movb $0x1, %cl
movq -0x30(%rsp), %rax
cmpb $0x0, 0x33(%rax)
je 0x1d2ba
movq -0x30(%rsp), %rax
movq 0x18(%rax), %r11
jmp 0x1d2f7
vmovdqa 0x1c0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %r9d
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r10d
shlq $0x20, %r10
orq %r9, %r10
movq (%rdi), %r11
notq %r11
andq %r10, %r11
movq -0x30(%rsp), %rax
movq %r11, 0x18(%rax)
movb $0x1, 0x33(%rax)
andq %r8, %r11
popcntq %r11, %r10
movl %r15d, %r8d
subl %r10d, %r8d
jle 0x1d33d
testb %dl, %dl
jne 0x1d32f
incq %r14
addq $0x2, %r12
addq $0x40, %r13
movb $0x1, %bl
xorl %ecx, %ecx
movl %r8d, %r15d
cmpq 0x2e0(%rdi), %r14
jl 0x1d067
jmp 0x1d048
subl %r10d, %r15d
incl %r15d
movl %r15d, %r8d
jmp 0x1d048
cmpl $0x2, %r15d
jl 0x1d37d
incl %r15d
movq -0x28(%rsp), %rbx
movabsq $0x100002400, %r14      # imm = 0x100002400
leaq -0x1(%r11), %rcx
andq %rcx, %r11
decl %r15d
cmpl $0x2, %r15d
ja 0x1d355
jmp 0x1d38c
movq -0x28(%rsp), %rbx
movabsq $0x100002400, %r14      # imm = 0x100002400
movq -0x20(%rsp), %rsi
jmp 0x1d38c
movq -0x28(%rsp), %rbx
movabsq $0x100002400, %r14      # imm = 0x100002400
movq 0x270(%rdi), %r8
shlq $0x6, %r8
bsfq %r11, %rdx
leaq (%rdx,%r8), %rcx
incq %rcx
orq %rdx, %r8
movq %r8, (%rsi)
movq -0x8(%rsp), %r10
movl (%r10), %edx
leal -0x1(%rdx), %r9d
movl %r9d, (%r10)
movzbl (%rbx,%r8), %r10d
cmpq $0x20, %r10
ja 0x1d3dc
btq %r10, %r14
jae 0x1d3dc
incq %r8
movq %r8, (%rsi)
incq %rcx
jmp 0x1d3b7
cmpl $0x20, %r8d
jne 0x1d3f8
incq %rcx
movq %rcx, (%rsi)
movzbl (%rbx,%rcx), %r8d
cmpl $0x1f, %r8d
jg 0x1d3d3
cmpl $0xa, %r8d
je 0x1d3d9
cmpl $0xd, %r8d
je 0x1d3d9
jmp 0x1d404
cmpl $0x2c, %r8d
je 0x1d415
cmpl $0x5d, %r8d
je 0x1d42d
movzbl (%rbx,%rcx), %r8d
cmpq $0x20, %r8
ja 0x1d41d
btq %r8, %r14
jae 0x1d41d
incq %rcx
movq %rcx, (%rsi)
jmp 0x1d404
cmpl $0x1, %edx
jg 0x1ccbe
movl $0x3ec, %eax            # imm = 0x3EC
jmp 0x1d432
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 0x1d432
nop