// File: halfflat[P]tinyopt/test/test_saved_options.cc
// Function: saved_options_arglist_Test::TestBody()
TEST(saved_options, arglist) {
    to::saved_options so;
    for (auto x: {"tasty", "fish", "cake"}) so.add(x);

    auto A = so.as_arglist();
    EXPECT_EQ(3, A.argc);
    EXPECT_EQ("tasty", std::string(A.argv[0]));
    EXPECT_EQ("fish", std::string(A.argv[1]));
    EXPECT_EQ("cake", std::string(A.argv[2]));
    EXPECT_EQ(nullptr, A.argv[3]);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x280, %rsp            # imm = 0x280
movq %rdi, -0x8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x611a0
movq 0xb53e1(%rip), %rax     # 0x115030
movq %rax, -0x50(%rbp)
movq 0xb53de(%rip), %rax     # 0x115038
movq %rax, -0x48(%rbp)
movq 0xb53db(%rip), %rax     # 0x115040
movq %rax, -0x40(%rbp)
leaq -0x50(%rbp), %rax
movq %rax, -0x38(%rbp)
movq $0x3, -0x30(%rbp)
leaq -0x38(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rdi
callq 0x611c0
movq %rax, -0x58(%rbp)
movq -0x28(%rbp), %rdi
callq 0x611e0
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x60(%rbp), %rax
je 0x5fd6c
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq -0x89(%rbp), %rdi
movq %rdi, -0x1f0(%rbp)
callq 0x10e10
movq -0x1f8(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
leaq -0x88(%rbp), %rdi
callq 0x1d070
jmp 0x5fcee
leaq -0x20(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0x61220
jmp 0x5fd00
leaq -0x88(%rbp), %rdi
callq 0x10fc8
leaq -0x89(%rbp), %rdi
callq 0x10810
movq -0x58(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
jmp 0x5fc9b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5fd5b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x10fc8
leaq -0x89(%rbp), %rdi
callq 0x10810
jmp 0x605df
leaq -0xc8(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x61390
jmp 0x5fd7e
movl $0x3, -0xdc(%rbp)
leaq 0x6b06b(%rip), %rsi     # 0xcadfa
leaq 0x6b4fe(%rip), %rdx     # 0xcb294
leaq -0xd8(%rbp), %rdi
leaq -0xdc(%rbp), %rcx
leaq -0xc8(%rbp), %r8
callq 0x1d5d0
jmp 0x5fdb2
leaq -0xd8(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x1f9(%rbp)
jmp 0x5fdc6
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0x5fdd2
jmp 0x5fe1c
jmp 0x5fed7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x605df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x605d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5ff8a
leaq -0xe8(%rbp), %rdi
callq 0x84210
jmp 0x5fe2a
leaq -0xd8(%rbp), %rdi
callq 0x1d620
movq %rax, -0x208(%rbp)
jmp 0x5fe3f
movq -0x208(%rbp), %r8
leaq 0x6b334(%rip), %rdx     # 0xcb181
leaq -0xf0(%rbp), %rdi
movl $0x1, %esi
movl $0x1c, %ecx
callq 0x80580
jmp 0x5fe65
leaq -0xf0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x7d370
jmp 0x5fe7a
leaq -0xf0(%rbp), %rdi
callq 0x80600
leaq -0xe8(%rbp), %rdi
callq 0x1d500
jmp 0x5fed7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5fec6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x80600
leaq -0xe8(%rbp), %rdi
callq 0x1d500
jmp 0x5ff8a
leaq -0xd8(%rbp), %rdi
callq 0x1d520
movq -0xc0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x218(%rbp)
leaq -0x121(%rbp), %rdi
movq %rdi, -0x210(%rbp)
callq 0x10e10
movq -0x218(%rbp), %rsi
movq -0x210(%rbp), %rdx
leaq -0x120(%rbp), %rdi
callq 0x1d070
jmp 0x5ff23
leaq 0x6b371(%rip), %rsi     # 0xcb29b
leaq 0x6b372(%rip), %rdx     # 0xcb2a3
leaq 0x6b29f(%rip), %rcx     # 0xcb1d7
leaq -0x100(%rbp), %rdi
leaq -0x120(%rbp), %r8
callq 0x614c0
jmp 0x5ff4d
leaq -0x120(%rbp), %rdi
callq 0x10fc8
leaq -0x121(%rbp), %rdi
callq 0x10810
leaq -0x100(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x219(%rbp)
jmp 0x5ff79
movb -0x219(%rbp), %al
testb $0x1, %al
jne 0x5ff85
jmp 0x5fff5
jmp 0x600b0
leaq -0xd8(%rbp), %rdi
callq 0x1d520
jmp 0x605d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x5ffcd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x10fc8
leaq -0x121(%rbp), %rdi
callq 0x10810
jmp 0x605d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x60164
leaq -0x130(%rbp), %rdi
callq 0x84210
jmp 0x60003
leaq -0x100(%rbp), %rdi
callq 0x1d620
movq %rax, -0x228(%rbp)
jmp 0x60018
movq -0x228(%rbp), %r8
leaq 0x6b15b(%rip), %rdx     # 0xcb181
leaq -0x138(%rbp), %rdi
movl $0x1, %esi
movl $0x1d, %ecx
callq 0x80580
jmp 0x6003e
leaq -0x138(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x7d370
jmp 0x60053
leaq -0x138(%rbp), %rdi
callq 0x80600
leaq -0x130(%rbp), %rdi
callq 0x1d500
jmp 0x600b0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x6009f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x80600
leaq -0x130(%rbp), %rdi
callq 0x1d500
jmp 0x60164
leaq -0x100(%rbp), %rdi
callq 0x1d520
movq -0xc0(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x238(%rbp)
leaq -0x169(%rbp), %rdi
movq %rdi, -0x230(%rbp)
callq 0x10e10
movq -0x238(%rbp), %rsi
movq -0x230(%rbp), %rdx
leaq -0x168(%rbp), %rdi
callq 0x1d070
jmp 0x600fd
leaq 0x6b1b6(%rip), %rsi     # 0xcb2ba
leaq 0x6b1b6(%rip), %rdx     # 0xcb2c1
leaq 0x683c1(%rip), %rcx     # 0xc84d3
leaq -0x148(%rbp), %rdi
leaq -0x168(%rbp), %r8
callq 0x61510
jmp 0x60127
leaq -0x168(%rbp), %rdi
callq 0x10fc8
leaq -0x169(%rbp), %rdi
callq 0x10810
leaq -0x148(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x239(%rbp)
jmp 0x60153
movb -0x239(%rbp), %al
testb $0x1, %al
jne 0x6015f
jmp 0x601cf
jmp 0x6028a
leaq -0x100(%rbp), %rdi
callq 0x1d520
jmp 0x605d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x601a7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x10fc8
leaq -0x169(%rbp), %rdi
callq 0x10810
jmp 0x605d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x6033e
leaq -0x178(%rbp), %rdi
callq 0x84210
jmp 0x601dd
leaq -0x148(%rbp), %rdi
callq 0x1d620
movq %rax, -0x248(%rbp)
jmp 0x601f2
movq -0x248(%rbp), %r8
leaq 0x6af81(%rip), %rdx     # 0xcb181
leaq -0x180(%rbp), %rdi
movl $0x1, %esi
movl $0x1e, %ecx
callq 0x80580
jmp 0x60218
leaq -0x180(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x7d370
jmp 0x6022d
leaq -0x180(%rbp), %rdi
callq 0x80600
leaq -0x178(%rbp), %rdi
callq 0x1d500
jmp 0x6028a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x60279
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x80600
leaq -0x178(%rbp), %rdi
callq 0x1d500
jmp 0x6033e
leaq -0x148(%rbp), %rdi
callq 0x1d520
movq -0xc0(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x258(%rbp)
leaq -0x1b1(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x10e10
movq -0x258(%rbp), %rsi
movq -0x250(%rbp), %rdx
leaq -0x1b0(%rbp), %rdi
callq 0x1d070
jmp 0x602d7
leaq 0x6affa(%rip), %rsi     # 0xcb2d8
leaq 0x6affa(%rip), %rdx     # 0xcb2df
leaq 0x6aef1(%rip), %rcx     # 0xcb1dd
leaq -0x190(%rbp), %rdi
leaq -0x1b0(%rbp), %r8
callq 0x61510
jmp 0x60301
leaq -0x1b0(%rbp), %rdi
callq 0x10fc8
leaq -0x1b1(%rbp), %rdi
callq 0x10810
leaq -0x190(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x259(%rbp)
jmp 0x6032d
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0x60339
jmp 0x603a9
jmp 0x60461
leaq -0x148(%rbp), %rdi
callq 0x1d520
jmp 0x605d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x60381
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x10fc8
leaq -0x1b1(%rbp), %rdi
callq 0x10810
jmp 0x605d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x604bd
leaq -0x1c0(%rbp), %rdi
callq 0x84210
jmp 0x603b7
leaq -0x190(%rbp), %rdi
callq 0x1d620
movq %rax, -0x268(%rbp)
jmp 0x603cc
movq -0x268(%rbp), %r8
leaq 0x6ada7(%rip), %rdx     # 0xcb181
leaq -0x1c8(%rbp), %rdi
movl $0x1, %esi
movl $0x1f, %ecx
callq 0x80580
jmp 0x603f2
leaq -0x1c8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x7d370
jmp 0x60407
leaq -0x1c8(%rbp), %rdi
callq 0x80600
leaq -0x1c0(%rbp), %rdi
callq 0x1d500
jmp 0x60461
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x60453
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x80600
leaq -0x1c0(%rbp), %rdi
callq 0x1d500
jmp 0x604bd
leaq -0x190(%rbp), %rdi
callq 0x1d520
movq -0xc0(%rbp), %rax
movq 0x18(%rax), %r8
leaq 0x69ea3(%rip), %rsi     # 0xca322
leaq 0x6ae70(%rip), %rdx     # 0xcb2f6
xorl %eax, %eax
movl %eax, %ecx
leaq -0x1d8(%rbp), %rdi
callq 0x4c230
jmp 0x60498
leaq -0x1d8(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x269(%rbp)
jmp 0x604ac
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x604b8
jmp 0x604e5
jmp 0x6059d
leaq -0x190(%rbp), %rdi
callq 0x1d520
jmp 0x605d3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x605c7
leaq -0x1e0(%rbp), %rdi
callq 0x84210
jmp 0x604f3
leaq -0x1d8(%rbp), %rdi
callq 0x1d620
movq %rax, -0x278(%rbp)
jmp 0x60508
movq -0x278(%rbp), %r8
leaq 0x6ac6b(%rip), %rdx     # 0xcb181
leaq -0x1e8(%rbp), %rdi
movl $0x1, %esi
movl $0x20, %ecx
callq 0x80580
jmp 0x6052e
leaq -0x1e8(%rbp), %rdi
leaq -0x1e0(%rbp), %rsi
callq 0x7d370
jmp 0x60543
leaq -0x1e8(%rbp), %rdi
callq 0x80600
leaq -0x1e0(%rbp), %rdi
callq 0x1d500
jmp 0x6059d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
jmp 0x6058f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x98(%rbp)
movl %eax, -0x9c(%rbp)
leaq -0x1e8(%rbp), %rdi
callq 0x80600
leaq -0x1e0(%rbp), %rdi
callq 0x1d500
jmp 0x605c7
leaq -0x1d8(%rbp), %rdi
callq 0x1d520
leaq -0xc8(%rbp), %rdi
callq 0x61560
leaq -0x20(%rbp), %rdi
callq 0x61330
addq $0x280, %rsp            # imm = 0x280
popq %rbp
retq
leaq -0x1d8(%rbp), %rdi
callq 0x1d520
leaq -0xc8(%rbp), %rdi
callq 0x61560
leaq -0x20(%rbp), %rdi
callq 0x61330
movq -0x98(%rbp), %rdi
callq 0x10e00
nopw %cs:(%rax,%rax)