// File: /workspace/github_cpp_makefile_star2_O1/yukioc[P]tscrpt/t-tscrpt.cpp
// Function: t_estrndup()
void t_estrndup(){/*{{{*/
	bool except;
	char* s;
	//! \test NULL ptr => NULL
	s=estrndup(NULL,1);
	mu_assert(s==NULL);

	//! \test zero => ""
	s=estrndup("hello",0);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==0);
	delete s;

	//! \test hello => hello
	s=estrndup("hello",5);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==5);
	mu_assert(strcmp(s,"hello")==0);
	delete s;

	//! \test hello,n=4 => hell
	s=estrndup("hello",4);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==4);
	mu_assert(strcmp(s,"hell")==0);
	delete s;

	//! \test first\\0second,n=12 => first
	s=estrndup("first\0second",12);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==5);
	mu_assert(strcmp(s,"first")==0);
	delete s;

	//! \test say "hello" => say "hello"
	s=estrndup("say \\\"hello\\\"",13);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==11);
	mu_assert(strcmp(s,"say \"hello\"")==0);
	delete s;

	//! \test esc chars => unescaped
	s=estrndup("\\a,\\b,\\f,\\n,\\r,\\t,\\v,\\?,\\\\,\\',\\\"$",33);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==22);
	mu_assert(strcmp(s,"\a,\b,\f,\n,\r,\t,\v,\?,\\,\',\"$")==0);
	delete s;

	//! \test \\x4Fh! => Oh!
	s=estrndup("\\x4Fh!",6);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==3);
	mu_assert(strcmp(s,"Oh!")==0);
	delete s;

	//! \test \\107ood => Good
	s=estrndup("\\107ood",7);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==4);
	mu_assert(strcmp(s,"Good")==0);
	delete s;

	//! \test FIRST\\0SECOND => FIRST\\0SECOND\\0
	s=estrndup("FIRST\\0SECOND",13);
	mu_assert(s!=NULL);
	mu_assert(strlen(s)==5);
	mu_assert(memcmp(s,"FIRST\0SECOND\0",13)==0);
	delete s;
	s=0;

	//! \test aaa"bbb => exception
	except=false;
	try {
		s=estrndup("aaa\"bbb",7);
	}catch(std::exception& e){
		except=true;
		mu_assert(typeid(e)==typeid(std::logic_error));
	}
	assert(except==true);

	//! \test \\z => exception
	except=false;
	try {
		s=estrndup("\\z",2);
	}catch(std::exception& e){
		except=true;
		mu_assert(typeid(e)==typeid(std::logic_error));
	}
	assert(except==true);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl $0x1, %esi
xorl %edi, %edi
callq 0x2dee
incl 0x6427(%rip)            # 0xa174
testq %rax, %rax
je 0x3d79
incl 0x6414(%rip)            # 0xa16c
leaq 0x364b(%rip), %rdi      # 0x73aa
leaq 0x3662(%rip), %rsi      # 0x73c8
leaq 0x3668(%rip), %rcx      # 0x73d5
movl $0x15, %edx
xorl %eax, %eax
callq 0x2040
leaq 0x365d(%rip), %rdi      # 0x73dd
xorl %esi, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x63e4(%rip)            # 0xa174
testq %rax, %rax
jne 0x3dbc
incl 0x63d1(%rip)            # 0xa16c
leaq 0x3608(%rip), %rdi      # 0x73aa
leaq 0x361f(%rip), %rsi      # 0x73c8
leaq 0x3633(%rip), %rcx      # 0x73e3
movl $0x19, %edx
xorl %eax, %eax
callq 0x2040
incl 0x63b2(%rip)            # 0xa174
cmpb $0x0, (%rbx)
je 0x3dee
incl 0x639f(%rip)            # 0xa16c
leaq 0x35d6(%rip), %rdi      # 0x73aa
leaq 0x35ed(%rip), %rsi      # 0x73c8
leaq 0x3609(%rip), %rcx      # 0x73eb
movl $0x1a, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x35db(%rip), %rdi      # 0x73dd
movl $0x5, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x635f(%rip)            # 0xa174
testq %rax, %rax
jne 0x3e41
incl 0x634c(%rip)            # 0xa16c
leaq 0x3583(%rip), %rdi      # 0x73aa
leaq 0x359a(%rip), %rsi      # 0x73c8
leaq 0x35ae(%rip), %rcx      # 0x73e3
movl $0x1f, %edx
xorl %eax, %eax
callq 0x2040
incl 0x632d(%rip)            # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x5, %rax
je 0x3e7c
incl 0x6311(%rip)            # 0xa16c
leaq 0x3548(%rip), %rdi      # 0x73aa
leaq 0x355f(%rip), %rsi      # 0x73c8
leaq 0x3588(%rip), %rcx      # 0x73f8
movl $0x20, %edx
xorl %eax, %eax
callq 0x2040
incl 0x62f2(%rip)            # 0xa174
leaq 0x3554(%rip), %rsi      # 0x73dd
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x3ebc
incl 0x62d1(%rip)            # 0xa16c
leaq 0x3508(%rip), %rdi      # 0x73aa
leaq 0x351f(%rip), %rsi      # 0x73c8
leaq 0x3555(%rip), %rcx      # 0x7405
movl $0x21, %edx
xorl %eax, %eax
callq 0x2040
testq %rbx, %rbx
je 0x3ece
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x3508(%rip), %rdi      # 0x73dd
movl $0x4, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x628c(%rip)            # 0xa174
testq %rax, %rax
jne 0x3f14
incl 0x6279(%rip)            # 0xa16c
leaq 0x34b0(%rip), %rdi      # 0x73aa
leaq 0x34c7(%rip), %rsi      # 0x73c8
leaq 0x34db(%rip), %rcx      # 0x73e3
movl $0x26, %edx
xorl %eax, %eax
callq 0x2040
incl 0x625a(%rip)            # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x4, %rax
je 0x3f4f
incl 0x623e(%rip)            # 0xa16c
leaq 0x3475(%rip), %rdi      # 0x73aa
leaq 0x348c(%rip), %rsi      # 0x73c8
leaq 0x34d7(%rip), %rcx      # 0x741a
movl $0x27, %edx
xorl %eax, %eax
callq 0x2040
incl 0x621f(%rip)            # 0xa174
leaq 0x34cb(%rip), %rsi      # 0x7427
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x3f8f
incl 0x61fe(%rip)            # 0xa16c
leaq 0x3435(%rip), %rdi      # 0x73aa
leaq 0x344c(%rip), %rsi      # 0x73c8
leaq 0x34a9(%rip), %rcx      # 0x742c
movl $0x28, %edx
xorl %eax, %eax
callq 0x2040
testq %rbx, %rbx
je 0x3fa1
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x3aa0(%rip), %rdi      # 0x7a48
movl $0xc, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x61b9(%rip)            # 0xa174
testq %rax, %rax
jne 0x3fe7
incl 0x61a6(%rip)            # 0xa16c
leaq 0x33dd(%rip), %rdi      # 0x73aa
leaq 0x33f4(%rip), %rsi      # 0x73c8
leaq 0x3408(%rip), %rcx      # 0x73e3
movl $0x2d, %edx
xorl %eax, %eax
callq 0x2040
incl 0x6187(%rip)            # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x5, %rax
je 0x4022
incl 0x616b(%rip)            # 0xa16c
leaq 0x33a2(%rip), %rdi      # 0x73aa
leaq 0x33b9(%rip), %rsi      # 0x73c8
leaq 0x33e2(%rip), %rcx      # 0x73f8
movl $0x2e, %edx
xorl %eax, %eax
callq 0x2040
incl 0x614c(%rip)            # 0xa174
leaq 0x3411(%rip), %rsi      # 0x7440
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x4062
incl 0x612b(%rip)            # 0xa16c
leaq 0x3362(%rip), %rdi      # 0x73aa
leaq 0x3379(%rip), %rsi      # 0x73c8
leaq 0x33f0(%rip), %rcx      # 0x7446
movl $0x2f, %edx
xorl %eax, %eax
callq 0x2040
testq %rbx, %rbx
je 0x4074
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x33e0(%rip), %rdi      # 0x745b
movl $0xd, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x60e6(%rip)            # 0xa174
testq %rax, %rax
jne 0x40ba
incl 0x60d3(%rip)            # 0xa16c
leaq 0x330a(%rip), %rdi      # 0x73aa
leaq 0x3321(%rip), %rsi      # 0x73c8
leaq 0x3335(%rip), %rcx      # 0x73e3
movl $0x34, %edx
xorl %eax, %eax
callq 0x2040
incl 0x60b4(%rip)            # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0xb, %rax
je 0x40f5
incl 0x6098(%rip)            # 0xa16c
leaq 0x32cf(%rip), %rdi      # 0x73aa
leaq 0x32e6(%rip), %rsi      # 0x73c8
leaq 0x3380(%rip), %rcx      # 0x7469
movl $0x35, %edx
xorl %eax, %eax
callq 0x2040
incl 0x6079(%rip)            # 0xa174
leaq 0x3375(%rip), %rsi      # 0x7477
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x4135
incl 0x6058(%rip)            # 0xa16c
leaq 0x328f(%rip), %rdi      # 0x73aa
leaq 0x32a6(%rip), %rsi      # 0x73c8
leaq 0x335a(%rip), %rcx      # 0x7483
movl $0x36, %edx
xorl %eax, %eax
callq 0x2040
testq %rbx, %rbx
je 0x4147
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x3352(%rip), %rdi      # 0x74a0
movl $0x21, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x6013(%rip)            # 0xa174
testq %rax, %rax
jne 0x418d
incl 0x6000(%rip)            # 0xa16c
leaq 0x3237(%rip), %rdi      # 0x73aa
leaq 0x324e(%rip), %rsi      # 0x73c8
leaq 0x3262(%rip), %rcx      # 0x73e3
movl $0x3b, %edx
xorl %eax, %eax
callq 0x2040
incl 0x5fe1(%rip)            # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x16, %rax
je 0x41c8
incl 0x5fc5(%rip)            # 0xa16c
leaq 0x31fc(%rip), %rdi      # 0x73aa
leaq 0x3213(%rip), %rsi      # 0x73c8
leaq 0x3306(%rip), %rcx      # 0x74c2
movl $0x3c, %edx
xorl %eax, %eax
callq 0x2040
incl 0x5fa6(%rip)            # 0xa174
leaq 0x32fb(%rip), %rsi      # 0x74d0
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x4208
incl 0x5f85(%rip)            # 0xa16c
leaq 0x31bc(%rip), %rdi      # 0x73aa
leaq 0x31d3(%rip), %rsi      # 0x73c8
leaq 0x32eb(%rip), %rcx      # 0x74e7
movl $0x3d, %edx
xorl %eax, %eax
callq 0x2040
testq %rbx, %rbx
je 0x421a
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x32f7(%rip), %rdi      # 0x7518
movl $0x6, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x5f40(%rip)            # 0xa174
testq %rax, %rax
jne 0x4260
incl 0x5f2d(%rip)            # 0xa16c
leaq 0x3164(%rip), %rdi      # 0x73aa
leaq 0x317b(%rip), %rsi      # 0x73c8
leaq 0x318f(%rip), %rcx      # 0x73e3
movl $0x42, %edx
xorl %eax, %eax
callq 0x2040
incl 0x5f0e(%rip)            # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x3, %rax
je 0x429b
incl 0x5ef2(%rip)            # 0xa16c
leaq 0x3129(%rip), %rdi      # 0x73aa
leaq 0x3140(%rip), %rsi      # 0x73c8
leaq 0x3290(%rip), %rcx      # 0x751f
movl $0x43, %edx
xorl %eax, %eax
callq 0x2040
incl 0x5ed3(%rip)            # 0xa174
leaq 0x3284(%rip), %rsi      # 0x752c
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x42db
incl 0x5eb2(%rip)            # 0xa16c
leaq 0x30e9(%rip), %rdi      # 0x73aa
leaq 0x3100(%rip), %rsi      # 0x73c8
leaq 0x3261(%rip), %rcx      # 0x7530
movl $0x44, %edx
xorl %eax, %eax
callq 0x2040
testq %rbx, %rbx
je 0x42ed
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x324f(%rip), %rdi      # 0x7543
movl $0x7, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x5e6d(%rip)            # 0xa174
testq %rax, %rax
jne 0x4333
incl 0x5e5a(%rip)            # 0xa16c
leaq 0x3091(%rip), %rdi      # 0x73aa
leaq 0x30a8(%rip), %rsi      # 0x73c8
leaq 0x30bc(%rip), %rcx      # 0x73e3
movl $0x49, %edx
xorl %eax, %eax
callq 0x2040
incl 0x5e3b(%rip)            # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x4, %rax
je 0x436e
incl 0x5e1f(%rip)            # 0xa16c
leaq 0x3056(%rip), %rdi      # 0x73aa
leaq 0x306d(%rip), %rsi      # 0x73c8
leaq 0x30b8(%rip), %rcx      # 0x741a
movl $0x4a, %edx
xorl %eax, %eax
callq 0x2040
incl 0x5e00(%rip)            # 0xa174
leaq 0x31d0(%rip), %rsi      # 0x754b
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x43ae
incl 0x5ddf(%rip)            # 0xa16c
leaq 0x3016(%rip), %rdi      # 0x73aa
leaq 0x302d(%rip), %rsi      # 0x73c8
leaq 0x31ae(%rip), %rcx      # 0x7550
movl $0x4b, %edx
xorl %eax, %eax
callq 0x2040
testq %rbx, %rbx
je 0x43c0
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x319d(%rip), %rdi      # 0x7564
movl $0xd, %esi
callq 0x2dee
movq %rax, %rbx
incl 0x5d9a(%rip)            # 0xa174
testq %rax, %rax
jne 0x4406
incl 0x5d87(%rip)            # 0xa16c
leaq 0x2fbe(%rip), %rdi      # 0x73aa
leaq 0x2fd5(%rip), %rsi      # 0x73c8
leaq 0x2fe9(%rip), %rcx      # 0x73e3
movl $0x50, %edx
xorl %eax, %eax
callq 0x2040
incl 0x5d68(%rip)            # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x5, %rax
je 0x4441
incl 0x5d4c(%rip)            # 0xa16c
leaq 0x2f83(%rip), %rdi      # 0x73aa
leaq 0x2f9a(%rip), %rsi      # 0x73c8
leaq 0x2fc3(%rip), %rcx      # 0x73f8
movl $0x51, %edx
xorl %eax, %eax
callq 0x2040
incl 0x5d2d(%rip)            # 0xa174
movabsq $0x4553005453524946, %rax # imm = 0x4553005453524946
xorq (%rbx), %rax
movabsq $0x444e4f43455300, %rcx # imm = 0x444E4F43455300
xorq 0x5(%rbx), %rcx
orq %rax, %rcx
je 0x448e
incl 0x5cff(%rip)            # 0xa16c
leaq 0x2f36(%rip), %rdi      # 0x73aa
leaq 0x2f4d(%rip), %rsi      # 0x73c8
leaq 0x30f0(%rip), %rcx      # 0x7572
movl $0x52, %edx
xorl %eax, %eax
callq 0x2040
testq %rbx, %rbx
je 0x44a0
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x30ed(%rip), %rdi      # 0x7594
movl $0x7, %esi
callq 0x2dee
leaq 0x3108(%rip), %rdi      # 0x75c0
leaq 0x2f09(%rip), %rsi      # 0x73c8
leaq 0x3107(%rip), %rcx      # 0x75cd
movl $0x5e, %edx
callq 0x2100
cmpl $0x1, %edx
jne 0x453a
movl $0x1, %ebp
movq %rsp, %rbx
movq %rax, %rdi
movl %edx, %esi
movq %rbx, %rdx
callq 0x22ee
movq (%rbx), %rbx
callq 0x2210
leaq 0x30e6(%rip), %rdi      # 0x75df
movl $0x2, %esi
callq 0x2dee
leaq 0x30b6(%rip), %rdi      # 0x75c0
leaq 0x2eb7(%rip), %rsi      # 0x73c8
leaq 0x30b5(%rip), %rcx      # 0x75cd
movl $0x68, %edx
callq 0x2100
cmpl %ebp, %edx
jne 0x453a
movq %rax, %rdi
movl %edx, %esi
movq %rbx, %rdx
callq 0x2351
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rdi
callq 0x2240