// File: /workspace/github_cpp_makefile_star2_O3/AutomataLab[P]JSONSki/src/QueryProcessor.cpp
// Function: QueryProcessor::goOverPriAttr(long&, bitmap&)
__attribute__((always_inline)) void QueryProcessor::goOverPriAttr(long& pos, bitmap& bm) {
    long word_id = pos / 64;
    bool first_interval = false;
    bool new_word = false;
    while (word_id < mNumWords) {
        if (word_id > top_word) {
            // build basic bitmaps for the next word
            resetBitmap(bm);
            start_id = word_id * 2;
            build_bitmap_basic();
        }
        get_bitmap_comma(bm);
        IntervalInfo interval;
        if (first_interval == false) {
            if (new_word == true) {
                interval = get_interval_new_word(bm.commabit);
            } else {
                interval = get_interval(pos, bm.commabit);
            }
            first_interval = true;
        } else {
            interval = next_interval(bm.commabit);
        }
        get_bitmap_rbrace(bm);
        unsigned long bitmap_rbrace = bm.rbracebit & interval.intervalbit;
        if (bitmap_rbrace) {
            // end of object
            pos = get_position(bitmap_rbrace, 1) - 1;
            return;
        }
        if (interval.is_complete) {
            // position before comma
            pos = interval_end(interval.intervalbit) - 1;
            return;
        } 
        // interval is incomplete in the current word
        ++word_id;
        first_interval = false;
        new_word = true;
    }  
}

// Assembly:
movq (%rsi), %rcx
leaq 0x3f(%rcx), %rax
testq %rcx, %rcx
cmovnsq %rcx, %rax
sarq $0x6, %rax
cmpq 0x2e0(%rdi), %rax
jge 0x17f07
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
leaq 0x30(%rdx), %r8
movq 0x2c8(%rdi), %rcx
leaq (%rax,%rax), %r9
movq %rax, %r10
shlq $0x6, %r10
addq %rcx, %r10
addq $0x20, %r10
xorl %ecx, %ecx
vpcmpeqd %xmm0, %xmm0, %xmm0
cmpq 0x270(%rdi), %rax
jle 0x17daa
movw $0x0, 0x4(%r8)
movl $0x0, (%r8)
movq %r9, 0x88(%rdi)
movq %rax, 0x270(%rdi)
vmovdqu -0x20(%r10), %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, %r15d
leaq 0x1(%r9), %r11
movq %r11, 0x88(%rdi)
vmovdqu (%r10), %ymm1
vmovdqa %ymm1, 0xc0(%rdi)
vpcmpeqb %ymm1, %ymm2, %ymm2
vpmovmskb %ymm2, %r11d
vpcmpeqb %ymm1, %ymm3, %ymm1
vpmovmskb %ymm1, %ebx
shlq $0x20, %r11
orq %r14, %r11
shlq $0x20, %rbx
orq %r15, %rbx
leaq (%rbx,%rbx), %r15
notq %r15
andq %rbx, %r15
movq 0x250(%rdi), %r12
movq 0x240(%rdi), %r13
movq %r13, %r14
xorq %r12, %r14
movq %r15, %rbp
andq %r14, %rbp
notq %r14
andq %r15, %r14
addq %rbx, %rbp
xorl %r15d, %r15d
addq %rbx, %r14
setb %r15b
movq %r15, 0x240(%rdi)
andq 0x258(%rdi), %rbp
orq %r13, %r14
andq %r12, %r14
orq %rbp, %r14
notq %r14
orq %rbx, %r14
andq %r11, %r14
movq %r14, 0xe0(%rdi)
vmovq %r14, %xmm1
vpclmulqdq $0x0, %xmm0, %xmm1, %xmm1
vmovq %xmm1, %r11
xorq 0x248(%rdi), %r11
movq %r11, (%rdi)
sarq $0x3f, %r11
movq %r11, 0x248(%rdi)
cmpb $0x0, 0x31(%rdx)
jne 0x17de8
vmovdqa 0x1e0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %r11d
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %ebx
shlq $0x20, %rbx
orq %r11, %rbx
movq (%rdi), %r11
notq %r11
andq %rbx, %r11
movq %r11, 0x8(%rdx)
movb $0x1, 0x31(%rdx)
testb $0x1, %cl
je 0x17e06
movq 0x8(%rdx), %r11
movq %r11, %rbx
negq %rbx
setb %cl
andq %r11, %rbx
leaq -0x1(%rbx), %r11
orq %rbx, %r11
jmp 0x17e60
movq (%rsi), %rcx
leal 0x3f(%rcx), %r11d
testq %rcx, %rcx
cmovnsl %ecx, %r11d
andl $0xc0, %r11d
subl %r11d, %ecx
movl $0x1, %r14d
shlq %cl, %r14
movq %r14, %r11
negq %r11
movq %r11, %rbx
btcq %rcx, %rbx
movq 0x8(%rdx), %r15
andq %rbx, %r15
movq %r15, 0x8(%rdx)
setne %cl
je 0x17e58
movq %r15, %r12
negq %r12
andq %r15, %r12
movq %r12, %r11
subq %r14, %r11
orq %r12, %r11
jmp 0x17e5d
btsq $0x3f, %r11
andq %rbx, %r11
cmpb $0x0, 0x33(%rdx)
je 0x17e6c
movq 0x18(%rdx), %rbx
jmp 0x17ea4
vmovdqa 0x1c0(%rdi), %ymm1
vpcmpeqb 0xa0(%rdi), %ymm1, %ymm2
vpmovmskb %ymm2, %ebx
vpcmpeqb 0xc0(%rdi), %ymm1, %ymm1
vpmovmskb %ymm1, %r14d
shlq $0x20, %r14
orq %rbx, %r14
movq (%rdi), %rbx
notq %rbx
andq %r14, %rbx
movq %rbx, 0x18(%rdx)
movb $0x1, 0x33(%rdx)
andq %r11, %rbx
jne 0x17ec9
testb %cl, %cl
jne 0x17ee0
incq %rax
addq $0x2, %r9
addq $0x40, %r10
movb $0x1, %cl
cmpq 0x2e0(%rdi), %rax
jl 0x17c9a
jmp 0x17efd
movq 0x270(%rdi), %rax
shlq $0x6, %rax
bsfq %rbx, %rcx
addq %rcx, %rax
decq %rax
jmp 0x17efa
movq 0x270(%rdi), %rax
shlq $0x6, %rax
bsrq %r11, %rcx
xorq $0x3f, %rcx
subq %rcx, %rax
addq $0x3e, %rax
movq %rax, (%rsi)
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
vzeroupper
retq
nop