// File: AMDmi3[P]dangling_ptr/tests/testing.h
// Function: void Tester::ExpectException<dangling::bad_access>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::function<void ()>&&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int, Tester::DummyArgument)
void ExpectException(const std::string& expression_str, std::function<void()>&& func, const std::string& exception_str, const std::string& description, int flags, DummyArgument) {
		bool as_expected = false;
		bool thrown = false;
		bool std_exception = false;

		std::string what;

		try {
			func();
		} catch (E&) {
			as_expected = true;
			thrown = true;
		} catch (std::exception& e) {
			thrown = true;
			std_exception = true;
			what = e.what();
		} catch (...) {
			thrown = true;
		}

		std::string message;

		if (thrown && as_expected)
			message = Stylify(EXPRESSION, expression_str) + " has thrown " + Stylify(EXPRESSION, exception_str) + " as expected";
		else if (thrown && std_exception)
			message = Stylify(EXPRESSION, expression_str) + " has thrown unexpected exception derived from std::exception (what(): " + Stylify(LITERAL, what) + "), while expected " + Stylify(EXPRESSION, exception_str);
		else if (thrown)
			message = Stylify(EXPRESSION, expression_str) + " has thrown unexpected exception not derived from std::exception, while expected " + Stylify(EXPRESSION, exception_str);
		else
			message = Stylify(EXPRESSION, expression_str) + " hasn't thrown expected exception " + Stylify(EXPRESSION, exception_str);

		RegisterTest(thrown && as_expected, flags, message, description);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x330, %rsp            # imm = 0x330
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x320(%rbp)
movb $0x0, -0x35(%rbp)
movb $0x0, -0x36(%rbp)
movb $0x0, -0x37(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x32d0
movq -0x20(%rbp), %rdi
callq 0x10e30
jmp 0x1074e
jmp 0x10790
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
movl -0x64(%rbp), %eax
movl %eax, -0x324(%rbp)
movl $0x3, %ecx
cmpl %ecx, %eax
jne 0x10894
movq -0x60(%rbp), %rdi
callq 0x30a0
movq %rax, -0x78(%rbp)
movb $0x1, -0x35(%rbp)
movb $0x1, -0x36(%rbp)
callq 0x3320
jmp 0x1078e
jmp 0x10790
leaq -0x98(%rbp), %rdi
callq 0x32d0
testb $0x1, -0x36(%rbp)
je 0x1099d
testb $0x1, -0x35(%rbp)
je 0x1099d
movq -0x320(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq -0x118(%rbp), %rdi
movl $0x4, %edx
callq 0xf1b0
jmp 0x107ce
leaq 0x1ec1(%rip), %rdx      # 0x12696
leaq -0xf8(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0xc8e0
jmp 0x107ea
movq -0x320(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x138(%rbp), %rdi
movl $0x4, %edx
callq 0xf1b0
jmp 0x10808
leaq -0xd8(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
leaq -0x138(%rbp), %rdx
callq 0xc710
jmp 0x10824
leaq 0x1d54(%rip), %rdx      # 0x1257f
leaq -0xb8(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0xc8e0
jmp 0x10840
leaq -0x98(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x3280
leaq -0xb8(%rbp), %rdi
callq 0x3130
leaq -0xd8(%rbp), %rdi
callq 0x3130
leaq -0x138(%rbp), %rdi
callq 0x3130
leaq -0xf8(%rbp), %rdi
callq 0x3130
leaq -0x118(%rbp), %rdi
callq 0x3130
jmp 0x10dab
movl -0x324(%rbp), %eax
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x108df
movq -0x60(%rbp), %rdi
callq 0x30a0
movq %rax, -0x70(%rbp)
movb $0x1, -0x36(%rbp)
movb $0x1, -0x37(%rbp)
movq -0x70(%rbp), %rdi
movq (%rdi), %rax
movq 0x10(%rax), %rax
callq *%rax
movq %rax, %rsi
leaq -0x58(%rbp), %rdi
callq 0x32c0
jmp 0x108d3
callq 0x3320
jmp 0x108da
jmp 0x10790
movq -0x60(%rbp), %rdi
callq 0x30a0
movb $0x1, -0x36(%rbp)
callq 0x3320
jmp 0x108f3
jmp 0x10790
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10e14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
callq 0x3320
jmp 0x1091c
jmp 0x10e14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10e08
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1098c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10980
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10974
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x3130
leaq -0x138(%rbp), %rdi
callq 0x3130
leaq -0xf8(%rbp), %rdi
callq 0x3130
leaq -0x118(%rbp), %rdi
callq 0x3130
jmp 0x10e08
testb $0x1, -0x36(%rbp)
je 0x10b89
testb $0x1, -0x37(%rbp)
je 0x10b89
movq -0x320(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq -0x1d8(%rbp), %rdi
movl $0x4, %edx
callq 0xf1b0
jmp 0x109cf
leaq 0x1ccd(%rip), %rdx      # 0x126a3
leaq -0x1b8(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0xc8e0
jmp 0x109eb
movq -0x320(%rbp), %rsi
leaq -0x1f8(%rbp), %rdi
movl $0x3, %edx
leaq -0x58(%rbp), %rcx
callq 0xf1b0
jmp 0x10a09
leaq -0x198(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
leaq -0x1f8(%rbp), %rdx
callq 0xc710
jmp 0x10a25
leaq 0x1cbe(%rip), %rdx      # 0x126ea
leaq -0x178(%rbp), %rdi
leaq -0x198(%rbp), %rsi
callq 0xc8e0
jmp 0x10a41
movq -0x320(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x218(%rbp), %rdi
movl $0x4, %edx
callq 0xf1b0
jmp 0x10a5f
leaq -0x158(%rbp), %rdi
leaq -0x178(%rbp), %rsi
leaq -0x218(%rbp), %rdx
callq 0xc710
jmp 0x10a7b
leaq -0x98(%rbp), %rdi
leaq -0x158(%rbp), %rsi
callq 0x3280
leaq -0x158(%rbp), %rdi
callq 0x3130
leaq -0x218(%rbp), %rdi
callq 0x3130
leaq -0x178(%rbp), %rdi
callq 0x3130
leaq -0x198(%rbp), %rdi
callq 0x3130
leaq -0x1f8(%rbp), %rdi
callq 0x3130
leaq -0x1b8(%rbp), %rdi
callq 0x3130
leaq -0x1d8(%rbp), %rdi
callq 0x3130
jmp 0x10da9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10b78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10b6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10b60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10b54
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10b48
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x218(%rbp), %rdi
callq 0x3130
leaq -0x178(%rbp), %rdi
callq 0x3130
leaq -0x198(%rbp), %rdi
callq 0x3130
leaq -0x1f8(%rbp), %rdi
callq 0x3130
leaq -0x1b8(%rbp), %rdi
callq 0x3130
leaq -0x1d8(%rbp), %rdi
callq 0x3130
jmp 0x10e08
testb $0x1, -0x36(%rbp)
je 0x10ca0
movq -0x320(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq -0x278(%rbp), %rdi
movl $0x4, %edx
callq 0xf1b0
jmp 0x10bb1
leaq 0x1b45(%rip), %rdx      # 0x126fd
leaq -0x258(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0xc8e0
jmp 0x10bcd
movq -0x320(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x298(%rbp), %rdi
movl $0x4, %edx
callq 0xf1b0
jmp 0x10beb
leaq -0x238(%rbp), %rdi
leaq -0x258(%rbp), %rsi
leaq -0x298(%rbp), %rdx
callq 0xc710
jmp 0x10c07
leaq -0x98(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x3280
leaq -0x238(%rbp), %rdi
callq 0x3130
leaq -0x298(%rbp), %rdi
callq 0x3130
leaq -0x258(%rbp), %rdi
callq 0x3130
leaq -0x278(%rbp), %rdi
callq 0x3130
jmp 0x10da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10c8f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10c83
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x298(%rbp), %rdi
callq 0x3130
leaq -0x258(%rbp), %rdi
callq 0x3130
leaq -0x278(%rbp), %rdi
callq 0x3130
jmp 0x10e08
movq -0x320(%rbp), %rsi
movq -0x18(%rbp), %rcx
leaq -0x2f8(%rbp), %rdi
movl $0x4, %edx
callq 0xf1b0
jmp 0x10cbe
leaq 0x1a8a(%rip), %rdx      # 0x1274f
leaq -0x2d8(%rbp), %rdi
leaq -0x2f8(%rbp), %rsi
callq 0xc8e0
jmp 0x10cda
movq -0x320(%rbp), %rsi
movq -0x28(%rbp), %rcx
leaq -0x318(%rbp), %rdi
movl $0x4, %edx
callq 0xf1b0
jmp 0x10cf8
leaq -0x2b8(%rbp), %rdi
leaq -0x2d8(%rbp), %rsi
leaq -0x318(%rbp), %rdx
callq 0xc710
jmp 0x10d14
leaq -0x98(%rbp), %rdi
leaq -0x2b8(%rbp), %rsi
callq 0x3280
leaq -0x2b8(%rbp), %rdi
callq 0x3130
leaq -0x318(%rbp), %rdi
callq 0x3130
leaq -0x2d8(%rbp), %rdi
callq 0x3130
leaq -0x2f8(%rbp), %rdi
callq 0x3130
jmp 0x10da7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10d99
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x10d8d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x318(%rbp), %rdi
callq 0x3130
leaq -0x2d8(%rbp), %rdi
callq 0x3130
leaq -0x2f8(%rbp), %rdi
callq 0x3130
jmp 0x10e08
jmp 0x10da9
jmp 0x10dab
xorl %eax, %eax
testb $0x1, -0x36(%rbp)
movb %al, -0x325(%rbp)
je 0x10dc2
movb -0x35(%rbp), %al
movb %al, -0x325(%rbp)
movq -0x320(%rbp), %rdi
movb -0x325(%rbp), %al
movl -0x34(%rbp), %edx
movq -0x30(%rbp), %r8
movzbl %al, %esi
andl $0x1, %esi
leaq -0x98(%rbp), %rcx
callq 0xed20
jmp 0x10dea
leaq -0x98(%rbp), %rdi
callq 0x3130
leaq -0x58(%rbp), %rdi
callq 0x3130
addq $0x330, %rsp            # imm = 0x330
popq %rbp
retq
leaq -0x98(%rbp), %rdi
callq 0x3130
leaq -0x58(%rbp), %rdi
callq 0x3130
movq -0x60(%rbp), %rdi
callq 0x3360
movq %rax, %rdi
callq 0xd6d0
nop