// File: /workspace/github_cpp_makefile_star2_O3/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 $0x98, %rsp
movq %rdx, 0x20(%rsp)
movq %rsi, %r15
movq %rdi, 0x18(%rsp)
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x5, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
cmpq %r15, %rsi
jb 0x14271
jbe 0x14210
movq %rcx, %rbx
movq %rsp, %r14
xorps %xmm0, %xmm0
movaps %xmm0, (%rsp)
movq $0x0, 0x10(%rsp)
subq %r15, %rsi
movq %r14, %rdi
callq 0x15434
movq (%rbx), %rsi
movq 0x8(%rbx), %rbp
subq %rsi, %rbp
sarq $0x5, %rbp
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbp
cmpq %rbp, %r15
leaq 0x38(%rsp), %r14
jae 0x140c7
movq %r15, %rax
shlq $0x5, %rax
leaq (%rax,%rax,2), %r12
addq %r12, %rsi
movq %r14, %rdi
callq 0x15a4c
movq %rsp, %rdi
movq %r14, %rsi
callq 0x14d20
leaq 0x60(%rsp), %rdi
callq 0xb254
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x14090
callq 0x1563c
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1409f
callq 0x1563c
incq %r15
movq (%rbx), %rsi
movq 0x8(%rbx), %rbp
subq %rsi, %rbp
sarq $0x5, %rbp
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rbp
addq $0x60, %r12
cmpq %rbp, %r15
jb 0x14061
movq (%rsp), %r15
movq 0x8(%rsp), %rax
movq %rax, 0x28(%rsp)
cmpq %rax, %r15
je 0x141e0
movq %r15, %rdi
callq 0x154e4
movq %rax, %r13
movq 0x8(%rbx), %r12
subq (%rbx), %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x14c48
movq 0x18(%rsp), %rdi
movq %r14, %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rcx
callq 0x13091
leaq 0x60(%rsp), %rdi
callq 0xb254
movq 0x50(%rsp), %rdi
testq %rdi, %rdi
je 0x14129
callq 0x1563c
movq %r15, 0x30(%rsp)
movq 0x40(%rsp), %rdi
testq %rdi, %rdi
je 0x1413d
callq 0x1563c
sarq $0x5, %r12
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %r12
sarq $0x5, %rsi
imulq %rax, %rsi
cmpq %r12, %rsi
jb 0x14252
jbe 0x141c7
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
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rdx
cmpq %r15, %rdx
jbe 0x14241
addq %r14, %rdi
callq 0x154e4
cmpq %r13, %rax
jb 0x14222
jne 0x141bb
movq (%rbx), %rsi
addq %r14, %rsi
movq %rbx, %rdi
callq 0x15556
addq $-0x60, %r14
movq %r15, %rsi
cmpq %r12, %r15
ja 0x14175
movq 0x30(%rsp), %r15
addq $0x60, %r15
cmpq 0x28(%rsp), %r15
leaq 0x38(%rsp), %r14
jne 0x140de
movq %rsp, %r14
movq %r14, %rdi
callq 0x14c18
movq 0x8(%rbx), %rsi
subq (%rbx), %rsi
sarq $0x5, %rsi
movabsq $-0x5555555555555555, %rax # imm = 0xAAAAAAAAAAAAAAAB
imulq %rax, %rsi
movq %rbp, %r15
cmpq %rsi, %rbp
jb 0x14015
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xd38b(%rip), %rdi      # 0x215b4
leaq 0xcf0f(%rip), %rsi      # 0x2113f
leaq 0xd42b(%rip), %rcx      # 0x21662
movl $0x148, %edx            # imm = 0x148
callq 0x6120
decq %rsi
leaq 0xcb83(%rip), %rdi      # 0x20dce
xorl %eax, %eax
callq 0x6300
leaq 0xd2b3(%rip), %rdi      # 0x2150c
leaq 0xcedf(%rip), %rsi      # 0x2113f
leaq 0xd3fb(%rip), %rcx      # 0x21662
movl $0x145, %edx            # imm = 0x145
callq 0x6120
leaq 0xd1d4(%rip), %rdi      # 0x2144c
leaq 0xcec0(%rip), %rsi      # 0x2113f
leaq 0xd34c(%rip), %rcx      # 0x215d2
movl $0x1a7, %edx            # imm = 0x1A7
callq 0x6120
jmp 0x142a9
jmp 0x14298
jmp 0x142a9
jmp 0x142a9
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
callq 0x1475a
jmp 0x142ac
jmp 0x142a9
movq %rax, %rbx
movq %rsp, %rdi
callq 0x14c18
movq %rbx, %rdi
callq 0x6360