// File: /workspace/github_cpp_makefile_star2_O1/ridiculousfish[P]docopt_fish/docopt_matching.cpp
// Function: void docopt_fish::repeat_matching<docopt_fish::alternation_list_t>(docopt_fish::alternation_list_t const&, unsigned long, docopt_fish::match_context_t const&, std::vector<docopt_fish::match_state_t, std::allocator<docopt_fish::match_state_t>>*)
static void repeat_matching(const Node &node, size_t init_prior_state_count, const match_context_t &ctx,
                            match_state_list_t *resulting_states) {
    assert(resulting_states->size() >= init_prior_state_count);
    // Get the number of existing states
    // Keep going until we stop getting new states
    size_t prior_state_count = init_prior_state_count;
    while (prior_state_count < resulting_states->size()) {
        // Get a vector of intermediate states
        match_state_list_t intermediate_states;
        intermediate_states.reserve(resulting_states->size() - prior_state_count);
        for (size_t i = prior_state_count; i < resulting_states->size(); i++) {
            intermediate_states.push_back(resulting_states->at(i).copy());
        }
        prior_state_count = resulting_states->size();
        match_list(node, std::move(intermediate_states), ctx, resulting_states, true /* require progress */);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %rdx, 0x30(%rsp)
movq %rdi, 0x28(%rsp)
movq 0x8(%rcx), %rax
subq (%rcx), %rax
sarq $0x5, %rax
movabsq $-0x5555555555555555, %r14 # imm = 0xAAAAAAAAAAAAAAAB
imulq %r14, %rax
cmpq %rsi, %rax
jb 0x1536b
movq %rcx, %rbx
movq %rsi, %r15
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x5, %rsi
imulq %r14, %rsi
cmpq %r15, %rsi
jbe 0x1530a
movq %rsp, %r12
leaq 0x48(%rsp), %rbp
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
subq %r15, %rsi
movq %r12, %rdi
callq 0x1659e
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
imulq %r14, %rax
cmpq %rax, %r15
jae 0x151cf
movq %r15, %rax
shlq $0x5, %rax
leaq (%rax,%rax,2), %r12
addq %r12, %rsi
movq %rbp, %rdi
callq 0x16bc0
movq %rsp, %rdi
movq %rbp, %rsi
callq 0x15ec2
leaq 0x70(%rsp), %rdi
callq 0xc244
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x151a2
callq 0x167a2
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x151b1
callq 0x167a2
incq %r15
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
subq %rsi, %rax
sarq $0x5, %rax
imulq %r14, %rax
addq $0x60, %r12
cmpq %rax, %r15
jb 0x15173
movq %rax, 0x20(%rsp)
movq (%rsp), %r15
movq 0x8(%rsp), %rax
movq %rax, 0x38(%rsp)
cmpq %rax, %r15
je 0x152df
movq %r15, %rdi
callq 0x1664e
movq %rax, %r13
movq 0x8(%rbx), %r12
subq (%rbx), %r12
movq %rbp, %rdi
movq %r15, %rsi
callq 0x15dda
movq 0x28(%rsp), %rdi
movq %rbp, %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rcx
callq 0x1415d
leaq 0x70(%rsp), %rdi
callq 0xc244
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x15236
callq 0x167a2
movq %r15, 0x40(%rsp)
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x1524a
callq 0x167a2
sarq $0x5, %r12
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
imulq %r14, %r12
sarq $0x5, %rsi
imulq %r14, %rsi
cmpq %r12, %rsi
jb 0x1534c
movq %r14, %rbp
jbe 0x152c3
leaq (%rsi,%rsi,2), %r14
shlq $0x5, %r14
addq $-0x60, %r14
leaq -0x1(%rsi), %r15
movq (%rbx), %rdi
movq 0x8(%rbx), %rdx
subq %rdi, %rdx
sarq $0x5, %rdx
imulq %rbp, %rdx
cmpq %r15, %rdx
jbe 0x1533b
addq %r14, %rdi
callq 0x1664e
cmpq %r13, %rax
jb 0x1531c
jne 0x152b7
movq (%rbx), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x166c0
addq $-0x60, %r14
movq %r15, %rsi
cmpq %r12, %r15
ja 0x1527b
movq 0x40(%rsp), %r15
addq $0x60, %r15
cmpq 0x38(%rsp), %r15
movq %rbp, %r14
leaq 0x48(%rsp), %rbp
jne 0x151eb
movq %rsp, %r12
movq %r12, %rdi
callq 0x15daa
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x5, %rsi
imulq %r14, %rsi
movq 0x20(%rsp), %rax
movq %rax, %r15
cmpq %rsi, %rax
jb 0x15136
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe2e1(%rip), %rdi      # 0x23604
leaq 0xde65(%rip), %rsi      # 0x2318f
leaq 0xe381(%rip), %rcx      # 0x236b2
movl $0x148, %edx            # imm = 0x148
callq 0x7120
decq %rsi
leaq 0xdada(%rip), %rdi      # 0x22e1f
xorl %eax, %eax
callq 0x7300
leaq 0xe209(%rip), %rdi      # 0x2355c
leaq 0xde35(%rip), %rsi      # 0x2318f
leaq 0xe351(%rip), %rcx      # 0x236b2
movl $0x145, %edx            # imm = 0x145
callq 0x7120
leaq 0xe12a(%rip), %rdi      # 0x2349c
leaq 0xde16(%rip), %rsi      # 0x2318f
leaq 0xe2a2(%rip), %rcx      # 0x23622
movl $0x1a7, %edx            # imm = 0x1A7
callq 0x7120
jmp 0x153a3
jmp 0x15392
jmp 0x153a3
jmp 0x153a3
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x158a2
jmp 0x153a6
jmp 0x153a3
movq %rax, %rbx
movq %rsp, %rdi
callq 0x15daa
movq %rbx, %rdi
callq 0x7360