// File: /workspace/github_cpp_makefile_star2_O2/halfflat[P]tinyopt/test/test_state.cc
// Function: state_match_multi_compact_Test::TestBody()
TEST(state, match_multi_compact) {
    to::key k1("key/one", to::key::compact);
    to::key k2("key/two", to::key::compact);
    to::key k3("key/three", to::key::compact);
    to::key k4("key/four", to::key::compact);

    {
        mockargs M("key/one/three/two\0key/four\0rest\0");
        to::state s(M.argc, M.argv);

        to::maybe<to::state::match_result> mmr;

        ASSERT_TRUE(mmr = s.match_flag(k1));
        s.consume(*mmr);

        ASSERT_FALSE(mmr = s.match_flag(k2));

        ASSERT_TRUE(mmr = s.match_flag(k3));
        s.consume(*mmr);

        ASSERT_TRUE(mmr = s.match_flag(k2));
        s.consume(*mmr);

        ASSERT_TRUE(mmr = s.match_flag(k4));
        s.consume(*mmr);

        EXPECT_EQ("rest"s, M.argv[0]);
    }
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x1b8, %rsp            # imm = 0x1B8
leaq 0x34071(%rip), %rsi     # 0x580e2
leaq 0x198(%rsp), %rbx
leaq 0x70(%rsp), %rdx
movq %rbx, %rdi
callq 0x1337a
leaq 0xf8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq (%rbx), %rdx
leaq 0x1a8(%rsp), %rax
cmpq %rax, %rdx
je 0x240bc
movq %rdx, 0xe8(%rsp)
movq 0x1a8(%rsp), %rcx
movq %rcx, 0xf8(%rsp)
jmp 0x240c2
movups (%rax), %xmm0
movups %xmm0, (%rcx)
leaq 0x198(%rsp), %rdi
movq 0x8(%rdi), %rcx
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rcx, 0xf0(%rsp)
movb $0x0, 0x10(%rdi)
movl $0x2, 0x108(%rsp)
callq 0xdbe8
leaq 0x33ff1(%rip), %rsi     # 0x580ea
leaq 0x178(%rsp), %rdi
leaq 0xc0(%rsp), %rdx
callq 0x1337a
leaq 0x80(%rsp), %rcx
movq %rcx, -0x10(%rcx)
leaq 0x188(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x24142
movq %rdx, 0x70(%rsp)
movq 0x188(%rsp), %rcx
movq %rcx, 0x80(%rsp)
jmp 0x24148
movups (%rax), %xmm0
movups %xmm0, (%rcx)
leaq 0x178(%rsp), %rdi
movq 0x8(%rdi), %rcx
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rcx, 0x78(%rsp)
movb $0x0, 0x10(%rdi)
movl $0x2, 0x90(%rsp)
callq 0xdbe8
leaq 0x33f76(%rip), %rsi     # 0x580f2
leaq 0x158(%rsp), %rdi
leaq 0x98(%rsp), %rdx
callq 0x1337a
leaq 0xd0(%rsp), %rcx
movq %rcx, -0x10(%rcx)
leaq 0x168(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x241c8
movq %rdx, 0xc0(%rsp)
movq 0x168(%rsp), %rcx
movq %rcx, 0xd0(%rsp)
jmp 0x241ce
movups (%rax), %xmm0
movups %xmm0, (%rcx)
leaq 0x158(%rsp), %rdi
movq 0x8(%rdi), %rcx
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rcx, 0xc8(%rsp)
movb $0x0, 0x10(%rdi)
movl $0x2, 0xe0(%rsp)
callq 0xdbe8
leaq 0x33ef7(%rip), %rsi     # 0x580fc
leaq 0x138(%rsp), %rdi
leaq 0x110(%rsp), %rdx
callq 0x1337a
leaq 0xa8(%rsp), %rcx
movq %rcx, -0x10(%rcx)
leaq 0x148(%rsp), %rax
movq -0x10(%rax), %rdx
cmpq %rax, %rdx
je 0x24251
movq %rdx, 0x98(%rsp)
movq 0x148(%rsp), %rcx
movq %rcx, 0xa8(%rsp)
jmp 0x24257
movups (%rax), %xmm0
movups %xmm0, (%rcx)
leaq 0x138(%rsp), %rdi
movq 0x8(%rdi), %rcx
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rcx, 0xa0(%rsp)
movb $0x0, 0x10(%rdi)
movl $0x2, 0xb8(%rsp)
callq 0xdbe8
leaq 0x33f04(%rip), %rsi     # 0x58192
leaq 0x110(%rsp), %rbx
movq %rbx, %rdi
callq 0x2488e
movq 0x118(%rsp), %rax
leaq 0x58(%rsp), %rsi
movq %rbx, (%rsi)
movq %rax, 0x8(%rsi)
andl $0x0, 0x10(%rsi)
movb $0x0, 0x40(%rsp)
leaq 0x10(%rsp), %rdi
leaq 0xe8(%rsp), %rdx
callq 0x24a92
cmpb $0x1, 0x10(%rsp)
jne 0x242ea
movb 0x40(%rsp), %al
movups 0x18(%rsp), %xmm0
movups %xmm0, 0x48(%rsp)
movb $0x1, %cl
testb %al, %al
je 0x242ec
jmp 0x242f2
xorl %ecx, %ecx
movb %cl, 0x40(%rsp)
movl %ecx, %eax
leaq 0x38(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
je 0x2434d
movq %r14, %rdi
callq 0x13646
leaq 0x48(%rsp), %rbx
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24976
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r14, %rsi
callq 0x24a92
cmpb $0x1, 0x10(%rsp)
jne 0x243a9
movb 0x40(%rsp), %al
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rbx)
movb $0x1, %cl
testb %al, %al
je 0x243ab
jmp 0x243b1
movq %rsp, %rdi
callq 0x3d5f6
leaq 0x33da9(%rip), %rdx     # 0x58105
leaq 0x31dac(%rip), %rcx     # 0x5610f
leaq 0x31dab(%rip), %r8      # 0x56115
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x399e5
movq 0x10(%rsp), %r8
leaq 0x33bef(%rip), %rdx     # 0x57f74
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x11d, %ecx            # imm = 0x11D
callq 0x3b5b6
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x39b08
jmp 0x246cb
xorl %ecx, %ecx
movb %cl, 0x40(%rsp)
movl %ecx, %eax
movl %eax, %ecx
xorb $0x1, %cl
leaq 0x38(%rsp), %r14
movb %cl, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
je 0x24423
movq %rsp, %rdi
callq 0x3d5f6
leaq 0x33d46(%rip), %rdx     # 0x5811c
leaq 0x31d38(%rip), %rcx     # 0x56115
leaq 0x31d2b(%rip), %r8      # 0x5610f
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x399e5
movq 0x10(%rsp), %r8
leaq 0x33b75(%rip), %rdx     # 0x57f74
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x120, %ecx            # imm = 0x120
callq 0x3b5b6
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x39b08
jmp 0x246cb
movq %r14, %rdi
callq 0x13646
leaq 0x10(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xc0(%rsp), %rdx
callq 0x24a92
cmpb $0x1, 0x10(%rsp)
jne 0x2445d
movb 0x40(%rsp), %al
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rbx)
movb $0x1, %cl
testb %al, %al
je 0x2445f
jmp 0x24465
xorl %ecx, %ecx
movb %cl, 0x40(%rsp)
movl %ecx, %eax
leaq 0x38(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
je 0x244bb
movq %r14, %rdi
callq 0x13646
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24976
leaq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rdx
movq %r14, %rsi
callq 0x24a92
cmpb $0x1, 0x10(%rsp)
jne 0x24517
movb 0x40(%rsp), %al
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rbx)
movb $0x1, %cl
testb %al, %al
je 0x24519
jmp 0x2451f
movq %rsp, %rdi
callq 0x3d5f6
leaq 0x33c69(%rip), %rdx     # 0x58133
leaq 0x31c3e(%rip), %rcx     # 0x5610f
leaq 0x31c3d(%rip), %r8      # 0x56115
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x399e5
movq 0x10(%rsp), %r8
leaq 0x33a81(%rip), %rdx     # 0x57f74
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x122, %ecx            # imm = 0x122
callq 0x3b5b6
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x39b08
jmp 0x246cb
xorl %ecx, %ecx
movb %cl, 0x40(%rsp)
movl %ecx, %eax
leaq 0x38(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
je 0x24578
movq %r14, %rdi
callq 0x13646
leaq 0x58(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x24976
leaq 0x10(%rsp), %rdi
leaq 0x98(%rsp), %rdx
movq %r14, %rsi
callq 0x24a92
cmpb $0x1, 0x10(%rsp)
jne 0x245d4
movb 0x40(%rsp), %al
movups 0x18(%rsp), %xmm0
movups %xmm0, (%rbx)
movb $0x1, %cl
testb %al, %al
je 0x245d6
jmp 0x245dc
movq %rsp, %rdi
callq 0x3d5f6
leaq 0x33b95(%rip), %rdx     # 0x5811c
leaq 0x31b81(%rip), %rcx     # 0x5610f
leaq 0x31b80(%rip), %r8      # 0x56115
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x399e5
movq 0x10(%rsp), %r8
leaq 0x339c4(%rip), %rdx     # 0x57f74
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x125, %ecx            # imm = 0x125
callq 0x3b5b6
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x39b08
jmp 0x246cb
xorl %ecx, %ecx
movb %cl, 0x40(%rsp)
movl %ecx, %eax
leaq 0x38(%rsp), %r14
movb %al, -0x8(%r14)
andq $0x0, (%r14)
testb %al, %al
je 0x24674
movq %r14, %rdi
callq 0x13646
leaq 0x58(%rsp), %rdi
movq %rbx, %rsi
callq 0x24976
leaq 0x33a79(%rip), %rsi     # 0x58086
leaq 0x10(%rsp), %rdi
pushq $0x4
popq %rdx
callq 0x1cc63
movq 0x118(%rsp), %r8
leaq 0x33a55(%rip), %rsi     # 0x5807e
leaq 0x339ae(%rip), %rdx     # 0x57fde
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rcx
callq 0x253bd
leaq 0x10(%rsp), %rdi
callq 0xdbe8
cmpb $0x0, 0x30(%rsp)
jne 0x24782
leaq 0x10(%rsp), %rdi
callq 0x3d5f6
movq 0x38(%rsp), %rax
testq %rax, %rax
je 0x2473f
movq (%rax), %r8
jmp 0x24746
movq %rsp, %rdi
callq 0x3d5f6
leaq 0x33ac7(%rip), %rdx     # 0x5814a
leaq 0x31a85(%rip), %rcx     # 0x5610f
leaq 0x31a84(%rip), %r8      # 0x56115
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x399e5
movq 0x10(%rsp), %r8
leaq 0x338c8(%rip), %rdx     # 0x57f74
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x128, %ecx            # imm = 0x128
callq 0x3b5b6
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x39b08
leaq 0x8(%rsp), %rdi
callq 0x3b616
leaq 0x10(%rsp), %rdi
callq 0xdbe8
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x246ee
movq (%rdi), %rax
callq *0x8(%rax)
movq %r14, %rdi
callq 0x13646
leaq 0x120(%rsp), %rdi
callq 0x25080
leaq 0x98(%rsp), %rdi
callq 0xdbe8
leaq 0xc0(%rsp), %rdi
callq 0xdbe8
leaq 0x70(%rsp), %rdi
callq 0xdbe8
leaq 0xe8(%rsp), %rdi
callq 0xdbe8
addq $0x1b8, %rsp            # imm = 0x1B8
popq %rbx
popq %r14
retq
leaq 0x34924(%rip), %r8      # 0x5906a
leaq 0x33827(%rip), %rdx     # 0x57f74
movq %rsp, %rdi
pushq $0x1
popq %rsi
movl $0x12b, %ecx            # imm = 0x12B
callq 0x3b5b6
movq %rsp, %rdi
leaq 0x10(%rsp), %rsi
callq 0x39b08
movq %rsp, %rdi
callq 0x3b616
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x24782
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x38(%rsp), %rdi
jmp 0x246f1
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3b616
jmp 0x2479c
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x247b1
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x247b1
movq %rax, %rbx
leaq 0x38(%rsp), %rdi
jmp 0x24827
jmp 0x247ef
jmp 0x247fe
jmp 0x2480d
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xdbe8
jmp 0x24833
jmp 0x24821
jmp 0x24830
jmp 0x247ef
jmp 0x247fe
jmp 0x2480d
jmp 0x24821
jmp 0x24830
jmp 0x247ef
jmp 0x247fe
jmp 0x2480d
jmp 0x24821
jmp 0x24830
jmp 0x247ef
jmp 0x247fe
jmp 0x2480d
jmp 0x24830
jmp 0x24821
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3b616
jmp 0x24801
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0xdbe8
jmp 0x24810
movq %rax, %rbx
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x24824
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x24824
movq %rax, %rbx
movq %r14, %rdi
callq 0x13646
jmp 0x24833
jmp 0x24830
movq %rax, %rbx
leaq 0x120(%rsp), %rdi
callq 0x25080
leaq 0x98(%rsp), %rdi
callq 0xdbe8
leaq 0xc0(%rsp), %rdi
callq 0xdbe8
leaq 0x70(%rsp), %rdi
callq 0xdbe8
leaq 0xe8(%rsp), %rdi
callq 0xdbe8
movq %rbx, %rdi
callq 0xdaa0
movq %rax, %rbx
jmp 0x24840
movq %rax, %rbx
jmp 0x2484d
movq %rax, %rbx
jmp 0x2485a
movq %rax, %rbx
jmp 0x24864
nop