// File: nmmmnu[P]HM3/test/test_stringtokenizer.cc
// Function: test_stringtokenizer()
static int test_stringtokenizer(){
	const char *s1 = "hello world";

	StringTokenizer st1{ s1 };

	assert(st1.getNext() == "hello");
	assert(st1.getNext() == "world");
	assert(st1.getNext().empty());
	assert(st1.getNext().empty());
	assert(st1.getNext().empty());

	const auto v1 = st1.getAll();

	assert(v1.size() == 2);
	assert(v1[0] == "hello");
	assert(v1[1] == "world");

	const char *s2 = " hello world ";

	StringTokenizer st2{ s2 };

	assert(st2.getNext().empty());
	assert(st2.getNext() == "hello");
	assert(st2.getNext() == "world");
	assert(st2.getNext().empty());
	assert(st2.getNext().empty());
	assert(st2.getNext().empty());

	const auto v2 = st2.getAll();

	assert(v2.size() == 3);
	assert(v2[0] == "");
	assert(v2[1] == "hello");
	assert(v2[2] == "world");

	return 0;
}

// Assembly:
subq $0x1c8, %rsp            # imm = 0x1C8
leaq 0x1e06(%rip), %rax      # 0x3004
movq %rax, 0x1c0(%rsp)
movq 0x1c0(%rsp), %rsi
leaq 0x190(%rsp), %rdi
callq 0x18e0
leaq 0x1a0(%rsp), %rdi
leaq 0x190(%rsp), %rsi
movl $0x20, %edx
callq 0x1930
leaq 0x1a0(%rsp), %rdi
callq 0x1df0
movq %rax, 0x180(%rsp)
movq %rdx, 0x188(%rsp)
leaq 0x180(%rsp), %rdi
leaq 0x1daf(%rip), %rsi      # 0x3010
callq 0x1970
testb $0x1, %al
jne 0x126c
jmp 0x126e
jmp 0x128d
leaq 0x1da1(%rip), %rdi      # 0x3016
leaq 0x1db3(%rip), %rsi      # 0x302f
movl $0xa, %edx
leaq 0x1dc4(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x1a0(%rsp), %rdi
callq 0x1df0
movq %rax, 0x170(%rsp)
movq %rdx, 0x178(%rsp)
leaq 0x170(%rsp), %rdi
leaq 0x1d51(%rip), %rsi      # 0x300a
callq 0x1970
testb $0x1, %al
jne 0x12c4
jmp 0x12c6
jmp 0x12e5
leaq 0x1d9a(%rip), %rdi      # 0x3067
leaq 0x1d5b(%rip), %rsi      # 0x302f
movl $0xb, %edx
leaq 0x1d6c(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x1a0(%rsp), %rdi
callq 0x1df0
movq %rax, 0x160(%rsp)
movq %rdx, 0x168(%rsp)
leaq 0x160(%rsp), %rdi
callq 0x19c0
testb $0x1, %al
jne 0x1315
jmp 0x1317
jmp 0x1336
leaq 0x1d62(%rip), %rdi      # 0x3080
leaq 0x1d0a(%rip), %rsi      # 0x302f
movl $0xc, %edx
leaq 0x1d1b(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x1a0(%rsp), %rdi
callq 0x1df0
movq %rax, 0x150(%rsp)
movq %rdx, 0x158(%rsp)
leaq 0x150(%rsp), %rdi
callq 0x19c0
testb $0x1, %al
jne 0x1366
jmp 0x1368
jmp 0x1387
leaq 0x1d11(%rip), %rdi      # 0x3080
leaq 0x1cb9(%rip), %rsi      # 0x302f
movl $0xd, %edx
leaq 0x1cca(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x1a0(%rsp), %rdi
callq 0x1df0
movq %rax, 0x140(%rsp)
movq %rdx, 0x148(%rsp)
leaq 0x140(%rsp), %rdi
callq 0x19c0
testb $0x1, %al
jne 0x13b7
jmp 0x13b9
jmp 0x13d8
leaq 0x1cc0(%rip), %rdi      # 0x3080
leaq 0x1c68(%rip), %rsi      # 0x302f
movl $0xe, %edx
leaq 0x1c79(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x128(%rsp), %rdi
leaq 0x1a0(%rsp), %rsi
callq 0x1f10
leaq 0x128(%rsp), %rdi
callq 0x19e0
cmpq $0x2, %rax
jne 0x1402
jmp 0x1421
leaq 0x1c8d(%rip), %rdi      # 0x3096
leaq 0x1c1f(%rip), %rsi      # 0x302f
movl $0x12, %edx
leaq 0x1c30(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x128(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1a00
movq %rax, %rdi
leaq 0x1bd4(%rip), %rsi      # 0x3010
callq 0x1970
testb $0x1, %al
jne 0x1447
jmp 0x1449
jmp 0x1468
leaq 0x1c55(%rip), %rdi      # 0x30a5
leaq 0x1bd8(%rip), %rsi      # 0x302f
movl $0x13, %edx
leaq 0x1be9(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x128(%rsp), %rdi
movl $0x1, %esi
callq 0x1a00
movq %rax, %rdi
leaq 0x1b86(%rip), %rsi      # 0x300a
callq 0x1970
testb $0x1, %al
jne 0x148f
jmp 0x1491
jmp 0x14b0
leaq 0x1c1e(%rip), %rdi      # 0x30b6
leaq 0x1b90(%rip), %rsi      # 0x302f
movl $0x14, %edx
leaq 0x1ba1(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x1c10(%rip), %rax      # 0x30c7
movq %rax, 0x120(%rsp)
movq 0x120(%rsp), %rsi
leaq 0xf0(%rsp), %rdi
callq 0x18e0
jmp 0x14d6
leaq 0x100(%rsp), %rdi
leaq 0xf0(%rsp), %rsi
movl $0x20, %edx
callq 0x1930
jmp 0x14f2
leaq 0x100(%rsp), %rdi
callq 0x1df0
movq %rdx, 0x58(%rsp)
movq %rax, 0x60(%rsp)
jmp 0x150b
movq 0x58(%rsp), %rax
movq 0x60(%rsp), %rcx
movq %rcx, 0xd0(%rsp)
movq %rax, 0xd8(%rsp)
leaq 0xd0(%rsp), %rdi
callq 0x19c0
testb $0x1, %al
jne 0x1538
jmp 0x153a
jmp 0x157f
leaq 0x1b94(%rip), %rdi      # 0x30d5
leaq 0x1ae7(%rip), %rsi      # 0x302f
movl $0x1a, %edx
leaq 0x1af8(%rip), %rcx      # 0x304c
callq 0x1090
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xe8(%rsp)
movl %eax, 0xe4(%rsp)
leaq 0x128(%rsp), %rdi
callq 0x1a20
jmp 0x18c4
leaq 0x100(%rsp), %rdi
callq 0x1df0
movq %rdx, 0x48(%rsp)
movq %rax, 0x50(%rsp)
jmp 0x1598
movq 0x48(%rsp), %rax
movq 0x50(%rsp), %rcx
movq %rcx, 0xc0(%rsp)
movq %rax, 0xc8(%rsp)
leaq 0xc0(%rsp), %rdi
leaq 0x1a4f(%rip), %rsi      # 0x3010
callq 0x1970
testb $0x1, %al
jne 0x15cc
jmp 0x15ce
jmp 0x15ed
leaq 0x1b16(%rip), %rdi      # 0x30eb
leaq 0x1a53(%rip), %rsi      # 0x302f
movl $0x1b, %edx
leaq 0x1a64(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x100(%rsp), %rdi
callq 0x1df0
movq %rdx, 0x38(%rsp)
movq %rax, 0x40(%rsp)
jmp 0x1606
movq 0x38(%rsp), %rax
movq 0x40(%rsp), %rcx
movq %rcx, 0xb0(%rsp)
movq %rax, 0xb8(%rsp)
leaq 0xb0(%rsp), %rdi
leaq 0x19db(%rip), %rsi      # 0x300a
callq 0x1970
testb $0x1, %al
jne 0x163a
jmp 0x163c
jmp 0x165b
leaq 0x1ac1(%rip), %rdi      # 0x3104
leaq 0x19e5(%rip), %rsi      # 0x302f
movl $0x1c, %edx
leaq 0x19f6(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x100(%rsp), %rdi
callq 0x1df0
movq %rdx, 0x28(%rsp)
movq %rax, 0x30(%rsp)
jmp 0x1674
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
movq %rcx, 0xa0(%rsp)
movq %rax, 0xa8(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x19c0
testb $0x1, %al
jne 0x16a1
jmp 0x16a3
jmp 0x16c2
leaq 0x1a2b(%rip), %rdi      # 0x30d5
leaq 0x197e(%rip), %rsi      # 0x302f
movl $0x1d, %edx
leaq 0x198f(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x100(%rsp), %rdi
callq 0x1df0
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
jmp 0x16db
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rcx, 0x90(%rsp)
movq %rax, 0x98(%rsp)
leaq 0x90(%rsp), %rdi
callq 0x19c0
testb $0x1, %al
jne 0x1708
jmp 0x170a
jmp 0x1729
leaq 0x19c4(%rip), %rdi      # 0x30d5
leaq 0x1917(%rip), %rsi      # 0x302f
movl $0x1e, %edx
leaq 0x1928(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x100(%rsp), %rdi
callq 0x1df0
movq %rdx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
jmp 0x1742
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq %rcx, 0x80(%rsp)
movq %rax, 0x88(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x19c0
testb $0x1, %al
jne 0x176f
jmp 0x1771
jmp 0x1790
leaq 0x195d(%rip), %rdi      # 0x30d5
leaq 0x18b0(%rip), %rsi      # 0x302f
movl $0x1f, %edx
leaq 0x18c1(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x68(%rsp), %rdi
leaq 0x100(%rsp), %rsi
callq 0x1f10
jmp 0x17a4
leaq 0x68(%rsp), %rdi
callq 0x19e0
cmpq $0x3, %rax
jne 0x17b6
jmp 0x17d5
leaq 0x1960(%rip), %rdi      # 0x311d
leaq 0x186b(%rip), %rsi      # 0x302f
movl $0x23, %edx
leaq 0x187c(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x68(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1a00
movq %rax, %rdi
leaq 0x18e7(%rip), %rsi      # 0x30d4
callq 0x1970
testb $0x1, %al
jne 0x17f8
jmp 0x17fa
jmp 0x1819
leaq 0x192b(%rip), %rdi      # 0x312c
leaq 0x1827(%rip), %rsi      # 0x302f
movl $0x24, %edx
leaq 0x1838(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x68(%rsp), %rdi
movl $0x1, %esi
callq 0x1a00
movq %rax, %rdi
leaq 0x17de(%rip), %rsi      # 0x3010
callq 0x1970
testb $0x1, %al
jne 0x183d
jmp 0x183f
jmp 0x185e
leaq 0x18f2(%rip), %rdi      # 0x3138
leaq 0x17e2(%rip), %rsi      # 0x302f
movl $0x25, %edx
leaq 0x17f3(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x68(%rsp), %rdi
movl $0x2, %esi
callq 0x1a00
movq %rax, %rdi
leaq 0x1793(%rip), %rsi      # 0x300a
callq 0x1970
testb $0x1, %al
jne 0x1882
jmp 0x1884
jmp 0x18a3
leaq 0x18be(%rip), %rdi      # 0x3149
leaq 0x179d(%rip), %rsi      # 0x302f
movl $0x26, %edx
leaq 0x17ae(%rip), %rcx      # 0x304c
callq 0x1090
leaq 0x68(%rsp), %rdi
callq 0x1a20
leaq 0x128(%rsp), %rdi
callq 0x1a20
xorl %eax, %eax
addq $0x1c8, %rsp            # imm = 0x1C8
retq
movq 0xe8(%rsp), %rdi
callq 0x10d0
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)