// File: /workspace/github_cpp_makefile_star2_O3/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 %r14
pushq %rbx
subq $0x10, %rsp
movl $0x1, %esi
xorl %edi, %edi
callq 0x2dda
incl 0x643e(%rip)            # 0xa174
testq %rax, %rax
je 0x3d62
incl 0x642b(%rip)            # 0xa16c
leaq 0x365f(%rip), %rdi      # 0x73a7
leaq 0x3676(%rip), %rsi      # 0x73c5
leaq 0x367c(%rip), %rcx      # 0x73d2
movl $0x15, %edx
xorl %eax, %eax
callq 0x2040
leaq 0x3671(%rip), %rdi      # 0x73da
xorl %esi, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x63fb(%rip), %eax      # 0xa174
incl %eax
movl %eax, 0x63f3(%rip)      # 0xa174
testq %rbx, %rbx
jne 0x3db3
incl 0x63e0(%rip)            # 0xa16c
leaq 0x3614(%rip), %rdi      # 0x73a7
leaq 0x362b(%rip), %rsi      # 0x73c5
leaq 0x363f(%rip), %rcx      # 0x73e0
movl $0x19, %edx
xorl %eax, %eax
callq 0x2040
movl 0x63c1(%rip), %eax      # 0xa174
incl %eax
movl %eax, 0x63b9(%rip)      # 0xa174
cmpb $0x0, (%rbx)
je 0x3de7
incl 0x63a6(%rip)            # 0xa16c
leaq 0x35da(%rip), %rdi      # 0x73a7
leaq 0x35f1(%rip), %rsi      # 0x73c5
leaq 0x360d(%rip), %rcx      # 0x73e8
movl $0x1a, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x35df(%rip), %rdi      # 0x73da
movl $0x5, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x6366(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x635e(%rip)      # 0xa174
testq %rax, %rax
jne 0x3e48
incl 0x634b(%rip)            # 0xa16c
leaq 0x357f(%rip), %rdi      # 0x73a7
leaq 0x3596(%rip), %rsi      # 0x73c5
leaq 0x35aa(%rip), %rcx      # 0x73e0
movl $0x1f, %edx
xorl %eax, %eax
callq 0x2040
movl 0x632c(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x6324(%rip)      # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x5, %rax
je 0x3e8b
incl 0x6308(%rip)            # 0xa16c
leaq 0x353c(%rip), %rdi      # 0x73a7
leaq 0x3553(%rip), %rsi      # 0x73c5
leaq 0x357c(%rip), %rcx      # 0x73f5
movl $0x20, %edx
xorl %eax, %eax
callq 0x2040
movl 0x62e9(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x62e1(%rip)      # 0xa174
leaq 0x3540(%rip), %rsi      # 0x73da
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x3ecd
incl 0x62c0(%rip)            # 0xa16c
leaq 0x34f4(%rip), %rdi      # 0x73a7
leaq 0x350b(%rip), %rsi      # 0x73c5
leaq 0x3541(%rip), %rcx      # 0x7402
movl $0x21, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x34f9(%rip), %rdi      # 0x73da
movl $0x4, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x6280(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x6278(%rip)      # 0xa174
testq %rax, %rax
jne 0x3f2e
incl 0x6265(%rip)            # 0xa16c
leaq 0x3499(%rip), %rdi      # 0x73a7
leaq 0x34b0(%rip), %rsi      # 0x73c5
leaq 0x34c4(%rip), %rcx      # 0x73e0
movl $0x26, %edx
xorl %eax, %eax
callq 0x2040
movl 0x6246(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x623e(%rip)      # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x4, %rax
je 0x3f71
incl 0x6222(%rip)            # 0xa16c
leaq 0x3456(%rip), %rdi      # 0x73a7
leaq 0x346d(%rip), %rsi      # 0x73c5
leaq 0x34b8(%rip), %rcx      # 0x7417
movl $0x27, %edx
xorl %eax, %eax
callq 0x2040
movl 0x6203(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x61fb(%rip)      # 0xa174
leaq 0x34a4(%rip), %rsi      # 0x7424
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x3fb3
incl 0x61da(%rip)            # 0xa16c
leaq 0x340e(%rip), %rdi      # 0x73a7
leaq 0x3425(%rip), %rsi      # 0x73c5
leaq 0x3482(%rip), %rcx      # 0x7429
movl $0x28, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x3a7e(%rip), %rdi      # 0x7a45
movl $0xc, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x619a(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x6192(%rip)      # 0xa174
testq %rax, %rax
jne 0x4014
incl 0x617f(%rip)            # 0xa16c
leaq 0x33b3(%rip), %rdi      # 0x73a7
leaq 0x33ca(%rip), %rsi      # 0x73c5
leaq 0x33de(%rip), %rcx      # 0x73e0
movl $0x2d, %edx
xorl %eax, %eax
callq 0x2040
movl 0x6160(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x6158(%rip)      # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x5, %rax
je 0x4057
incl 0x613c(%rip)            # 0xa16c
leaq 0x3370(%rip), %rdi      # 0x73a7
leaq 0x3387(%rip), %rsi      # 0x73c5
leaq 0x33b0(%rip), %rcx      # 0x73f5
movl $0x2e, %edx
xorl %eax, %eax
callq 0x2040
movl 0x611d(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x6115(%rip)      # 0xa174
leaq 0x33d7(%rip), %rsi      # 0x743d
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x4099
incl 0x60f4(%rip)            # 0xa16c
leaq 0x3328(%rip), %rdi      # 0x73a7
leaq 0x333f(%rip), %rsi      # 0x73c5
leaq 0x33b6(%rip), %rcx      # 0x7443
movl $0x2f, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x33ab(%rip), %rdi      # 0x7458
movl $0xd, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x60b4(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x60ac(%rip)      # 0xa174
testq %rax, %rax
jne 0x40fa
incl 0x6099(%rip)            # 0xa16c
leaq 0x32cd(%rip), %rdi      # 0x73a7
leaq 0x32e4(%rip), %rsi      # 0x73c5
leaq 0x32f8(%rip), %rcx      # 0x73e0
movl $0x34, %edx
xorl %eax, %eax
callq 0x2040
movl 0x607a(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x6072(%rip)      # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0xb, %rax
je 0x413d
incl 0x6056(%rip)            # 0xa16c
leaq 0x328a(%rip), %rdi      # 0x73a7
leaq 0x32a1(%rip), %rsi      # 0x73c5
leaq 0x333b(%rip), %rcx      # 0x7466
movl $0x35, %edx
xorl %eax, %eax
callq 0x2040
movl 0x6037(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x602f(%rip)      # 0xa174
leaq 0x3328(%rip), %rsi      # 0x7474
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x417f
incl 0x600e(%rip)            # 0xa16c
leaq 0x3242(%rip), %rdi      # 0x73a7
leaq 0x3259(%rip), %rsi      # 0x73c5
leaq 0x330d(%rip), %rcx      # 0x7480
movl $0x36, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x330a(%rip), %rdi      # 0x749d
movl $0x21, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x5fce(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5fc6(%rip)      # 0xa174
testq %rax, %rax
jne 0x41e0
incl 0x5fb3(%rip)            # 0xa16c
leaq 0x31e7(%rip), %rdi      # 0x73a7
leaq 0x31fe(%rip), %rsi      # 0x73c5
leaq 0x3212(%rip), %rcx      # 0x73e0
movl $0x3b, %edx
xorl %eax, %eax
callq 0x2040
movl 0x5f94(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5f8c(%rip)      # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x16, %rax
je 0x4223
incl 0x5f70(%rip)            # 0xa16c
leaq 0x31a4(%rip), %rdi      # 0x73a7
leaq 0x31bb(%rip), %rsi      # 0x73c5
leaq 0x32ae(%rip), %rcx      # 0x74bf
movl $0x3c, %edx
xorl %eax, %eax
callq 0x2040
movl 0x5f51(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5f49(%rip)      # 0xa174
leaq 0x329b(%rip), %rsi      # 0x74cd
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x4265
incl 0x5f28(%rip)            # 0xa16c
leaq 0x315c(%rip), %rdi      # 0x73a7
leaq 0x3173(%rip), %rsi      # 0x73c5
leaq 0x328b(%rip), %rcx      # 0x74e4
movl $0x3d, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x329c(%rip), %rdi      # 0x7515
movl $0x6, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x5ee8(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5ee0(%rip)      # 0xa174
testq %rax, %rax
jne 0x42c6
incl 0x5ecd(%rip)            # 0xa16c
leaq 0x3101(%rip), %rdi      # 0x73a7
leaq 0x3118(%rip), %rsi      # 0x73c5
leaq 0x312c(%rip), %rcx      # 0x73e0
movl $0x42, %edx
xorl %eax, %eax
callq 0x2040
movl 0x5eae(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5ea6(%rip)      # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x3, %rax
je 0x4309
incl 0x5e8a(%rip)            # 0xa16c
leaq 0x30be(%rip), %rdi      # 0x73a7
leaq 0x30d5(%rip), %rsi      # 0x73c5
leaq 0x3225(%rip), %rcx      # 0x751c
movl $0x43, %edx
xorl %eax, %eax
callq 0x2040
movl 0x5e6b(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5e63(%rip)      # 0xa174
leaq 0x3211(%rip), %rsi      # 0x7529
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x434b
incl 0x5e42(%rip)            # 0xa16c
leaq 0x3076(%rip), %rdi      # 0x73a7
leaq 0x308d(%rip), %rsi      # 0x73c5
leaq 0x31ee(%rip), %rcx      # 0x752d
movl $0x44, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x31e1(%rip), %rdi      # 0x7540
movl $0x7, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x5e02(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5dfa(%rip)      # 0xa174
testq %rax, %rax
jne 0x43ac
incl 0x5de7(%rip)            # 0xa16c
leaq 0x301b(%rip), %rdi      # 0x73a7
leaq 0x3032(%rip), %rsi      # 0x73c5
leaq 0x3046(%rip), %rcx      # 0x73e0
movl $0x49, %edx
xorl %eax, %eax
callq 0x2040
movl 0x5dc8(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5dc0(%rip)      # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x4, %rax
je 0x43ef
incl 0x5da4(%rip)            # 0xa16c
leaq 0x2fd8(%rip), %rdi      # 0x73a7
leaq 0x2fef(%rip), %rsi      # 0x73c5
leaq 0x303a(%rip), %rcx      # 0x7417
movl $0x4a, %edx
xorl %eax, %eax
callq 0x2040
movl 0x5d85(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5d7d(%rip)      # 0xa174
leaq 0x314a(%rip), %rsi      # 0x7548
movq %rbx, %rdi
callq 0x2190
testl %eax, %eax
je 0x4431
incl 0x5d5c(%rip)            # 0xa16c
leaq 0x2f90(%rip), %rdi      # 0x73a7
leaq 0x2fa7(%rip), %rsi      # 0x73c5
leaq 0x3128(%rip), %rcx      # 0x754d
movl $0x4b, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x311c(%rip), %rdi      # 0x7561
movl $0xd, %esi
callq 0x2dda
movq %rax, %rbx
movl 0x5d1c(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5d14(%rip)      # 0xa174
testq %rax, %rax
jne 0x4492
incl 0x5d01(%rip)            # 0xa16c
leaq 0x2f35(%rip), %rdi      # 0x73a7
leaq 0x2f4c(%rip), %rsi      # 0x73c5
leaq 0x2f60(%rip), %rcx      # 0x73e0
movl $0x50, %edx
xorl %eax, %eax
callq 0x2040
movl 0x5ce2(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5cda(%rip)      # 0xa174
movq %rbx, %rdi
callq 0x20d0
cmpq $0x5, %rax
je 0x44d5
incl 0x5cbe(%rip)            # 0xa16c
leaq 0x2ef2(%rip), %rdi      # 0x73a7
leaq 0x2f09(%rip), %rsi      # 0x73c5
leaq 0x2f32(%rip), %rcx      # 0x73f5
movl $0x51, %edx
xorl %eax, %eax
callq 0x2040
movl 0x5c9f(%rip), %ebp      # 0xa174
incl %ebp
movl %ebp, 0x5c97(%rip)      # 0xa174
movabsq $0x4553005453524946, %rax # imm = 0x4553005453524946
xorq (%rbx), %rax
movabsq $0x444e4f43455300, %rcx # imm = 0x444E4F43455300
xorq 0x5(%rbx), %rcx
orq %rax, %rcx
je 0x4524
incl 0x5c69(%rip)            # 0xa16c
leaq 0x2e9d(%rip), %rdi      # 0x73a7
leaq 0x2eb4(%rip), %rsi      # 0x73c5
leaq 0x3057(%rip), %rcx      # 0x756f
movl $0x52, %edx
xorl %eax, %eax
callq 0x2040
movl $0x1, %esi
movq %rbx, %rdi
callq 0x2150
leaq 0x3059(%rip), %rdi      # 0x7591
movl $0x7, %esi
callq 0x2dda
leaq 0x3074(%rip), %rdi      # 0x75bd
leaq 0x2e75(%rip), %rsi      # 0x73c5
leaq 0x3073(%rip), %rcx      # 0x75ca
movl $0x5e, %edx
callq 0x2100
movq %rdx, %rbx
cmpl $0x1, %ebx
jne 0x45cd
leaq 0x8(%rsp), %r14
movq %rax, %rdi
movl %ebx, %esi
movq %r14, %rdx
callq 0x22e3
movq (%r14), %r14
callq 0x2210
leaq 0x3052(%rip), %rdi      # 0x75dc
movl $0x2, %esi
callq 0x2dda
leaq 0x3022(%rip), %rdi      # 0x75bd
leaq 0x2e23(%rip), %rsi      # 0x73c5
leaq 0x3021(%rip), %rcx      # 0x75ca
movl $0x68, %edx
callq 0x2100
cmpl %ebx, %edx
jne 0x45cd
movq %rax, %rdi
movl %edx, %esi
movq %r14, %rdx
callq 0x2346
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x2240