// File: yukioc[P]tscrpt/t-tscrpt.cpp
// Function: t_sub()
void t_sub(){/*{{{*/
	tscrpt_t sc;
	obj_t*o;

	//! \test 7-5 => 2
	o = sc.eval("7-5");
	mu_assert(o!=NULL);
	mu_assert(o->type=='N');
	mu_assert(o->value()==2);
	delete o;

	//! \test 8-17 => -9
	o = sc.eval("7-0x10");
	mu_assert(o!=NULL);
	mu_assert(o->type=='N');
	mu_assert(o->value()==-9);
	delete o;

	//!\test 2+3-4+5+-6+7-+8 => -1
	o = sc.eval("2+3-4+5+-6+7-+8");
	mu_assert(o!=NULL);
	mu_assert(o->type=='N');
	mu_assert(o->value()==-1);
	delete o;

	//! \test "5" - 7 => "-2"
	o = sc.eval("\"5\" - 7");
	mu_assert(o!=NULL);
	mu_assert(o->type=='N');
	mu_assert(o->value()==-2);
	delete o;

	//! \test "ddd" - 8 => "-8"
	o = sc.eval("\"ddd\" - 8");
	mu_assert(o!=NULL);
	mu_assert(o->type=='N');
	mu_assert(o->value()==-8);
	delete o;

	//! \test "0xf" - "3" => "12"
	o = sc.eval("\"0xf\" - \"3\"");
	mu_assert(o!=NULL);
	mu_assert(o->type=='N');
	mu_assert(o->value()==12);
	delete o;

	//! \test 9 - "sss" => 9
	o = sc.eval("9 - \"sss\"");
	mu_assert(o!=NULL);
	mu_assert(o->type=='N');
	mu_assert(o->value()==9);
	delete o;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
leaq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x25b0
movq -0x30(%rbp), %rdi
leaq 0x1dda(%rip), %rsi      # 0xaa5d
callq 0x2670
movq %rax, -0x28(%rbp)
jmp 0x8c8e
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x5560(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x5557(%rip)      # 0xe1fc
cmpq $0x0, -0x10(%rbp)
jne 0x8cf9
movl 0x5542(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x553a(%rip)      # 0xe1f4
leaq 0x181b(%rip), %rdi      # 0xa4dc
leaq 0x1832(%rip), %rsi      # 0xa4fa
leaq 0x1a45(%rip), %rcx      # 0xa714
xorl %eax, %eax
movl $0x191, %edx            # imm = 0x191
callq 0x2040
jmp 0x8cdd
jmp 0x8cf9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
leaq -0x8(%rbp), %rdi
callq 0x25d0
jmp 0x95b3
jmp 0x8cfb
jmp 0x8cfd
jmp 0x8cff
movl 0x54f7(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x54ee(%rip)      # 0xe1fc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
je 0x8d4d
movl 0x54d4(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x54cc(%rip)      # 0xe1f4
leaq 0x17ad(%rip), %rdi      # 0xa4dc
leaq 0x17c4(%rip), %rsi      # 0xa4fa
leaq 0x19df(%rip), %rcx      # 0xa71c
xorl %eax, %eax
movl $0x192, %edx            # imm = 0x192
callq 0x2040
jmp 0x8d4b
jmp 0x8d4d
jmp 0x8d4f
jmp 0x8d51
jmp 0x8d53
movl 0x54a3(%rip), %eax      # 0xe1fc
incl %eax
movl %eax, 0x549b(%rip)      # 0xe1fc
movq -0x10(%rbp), %rdi
callq 0x2480
movl %eax, -0x34(%rbp)
jmp 0x8d6f
movl -0x34(%rbp), %eax
cmpl $0x2, %eax
je 0x8daa
movl 0x5477(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x546f(%rip)      # 0xe1f4
leaq 0x1750(%rip), %rdi      # 0xa4dc
leaq 0x1767(%rip), %rsi      # 0xa4fa
leaq 0x1a59(%rip), %rcx      # 0xa7f3
xorl %eax, %eax
movl $0x193, %edx            # imm = 0x193
callq 0x2040
jmp 0x8da8
jmp 0x8daa
jmp 0x8dac
jmp 0x8dae
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
cmpq $0x0, %rax
je 0x8dd3
movq -0x40(%rbp), %rdi
callq 0x4480
movq -0x40(%rbp), %rdi
movl $0x30, %esi
callq 0x21d0
leaq 0x1c87(%rip), %rsi      # 0xaa61
leaq -0x8(%rbp), %rdi
callq 0x2670
movq %rax, -0x48(%rbp)
jmp 0x8de9
movq -0x48(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x5405(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x53fc(%rip)      # 0xe1fc
cmpq $0x0, -0x10(%rbp)
jne 0x8e3a
movl 0x53e7(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x53df(%rip)      # 0xe1f4
leaq 0x16c0(%rip), %rdi      # 0xa4dc
leaq 0x16d7(%rip), %rsi      # 0xa4fa
leaq 0x18ea(%rip), %rcx      # 0xa714
xorl %eax, %eax
movl $0x198, %edx            # imm = 0x198
callq 0x2040
jmp 0x8e38
jmp 0x8e3a
jmp 0x8e3c
jmp 0x8e3e
jmp 0x8e40
movl 0x53b6(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x53ad(%rip)      # 0xe1fc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
je 0x8e8e
movl 0x5393(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x538b(%rip)      # 0xe1f4
leaq 0x166c(%rip), %rdi      # 0xa4dc
leaq 0x1683(%rip), %rsi      # 0xa4fa
leaq 0x189e(%rip), %rcx      # 0xa71c
xorl %eax, %eax
movl $0x199, %edx            # imm = 0x199
callq 0x2040
jmp 0x8e8c
jmp 0x8e8e
jmp 0x8e90
jmp 0x8e92
jmp 0x8e94
movl 0x5362(%rip), %eax      # 0xe1fc
incl %eax
movl %eax, 0x535a(%rip)      # 0xe1fc
movq -0x10(%rbp), %rdi
callq 0x2480
movl %eax, -0x4c(%rbp)
jmp 0x8eb0
movl -0x4c(%rbp), %eax
cmpl $-0x9, %eax
je 0x8eeb
movl 0x5336(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x532e(%rip)      # 0xe1f4
leaq 0x160f(%rip), %rdi      # 0xa4dc
leaq 0x1626(%rip), %rsi      # 0xa4fa
leaq 0x1b8d(%rip), %rcx      # 0xaa68
xorl %eax, %eax
movl $0x19a, %edx            # imm = 0x19A
callq 0x2040
jmp 0x8ee9
jmp 0x8eeb
jmp 0x8eed
jmp 0x8eef
movq -0x10(%rbp), %rax
movq %rax, -0x58(%rbp)
cmpq $0x0, %rax
je 0x8f14
movq -0x58(%rbp), %rdi
callq 0x4480
movq -0x58(%rbp), %rdi
movl $0x30, %esi
callq 0x21d0
leaq 0x1b5c(%rip), %rsi      # 0xaa77
leaq -0x8(%rbp), %rdi
callq 0x2670
movq %rax, -0x60(%rbp)
jmp 0x8f2a
movq -0x60(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x52c4(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x52bb(%rip)      # 0xe1fc
cmpq $0x0, -0x10(%rbp)
jne 0x8f7b
movl 0x52a6(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x529e(%rip)      # 0xe1f4
leaq 0x157f(%rip), %rdi      # 0xa4dc
leaq 0x1596(%rip), %rsi      # 0xa4fa
leaq 0x17a9(%rip), %rcx      # 0xa714
xorl %eax, %eax
movl $0x19f, %edx            # imm = 0x19F
callq 0x2040
jmp 0x8f79
jmp 0x8f7b
jmp 0x8f7d
jmp 0x8f7f
jmp 0x8f81
movl 0x5275(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x526c(%rip)      # 0xe1fc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
je 0x8fcf
movl 0x5252(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x524a(%rip)      # 0xe1f4
leaq 0x152b(%rip), %rdi      # 0xa4dc
leaq 0x1542(%rip), %rsi      # 0xa4fa
leaq 0x175d(%rip), %rcx      # 0xa71c
xorl %eax, %eax
movl $0x1a0, %edx            # imm = 0x1A0
callq 0x2040
jmp 0x8fcd
jmp 0x8fcf
jmp 0x8fd1
jmp 0x8fd3
jmp 0x8fd5
movl 0x5221(%rip), %eax      # 0xe1fc
incl %eax
movl %eax, 0x5219(%rip)      # 0xe1fc
movq -0x10(%rbp), %rdi
callq 0x2480
movl %eax, -0x64(%rbp)
jmp 0x8ff1
movl -0x64(%rbp), %eax
cmpl $-0x1, %eax
je 0x902c
movl 0x51f5(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x51ed(%rip)      # 0xe1f4
leaq 0x14ce(%rip), %rdi      # 0xa4dc
leaq 0x14e5(%rip), %rsi      # 0xa4fa
leaq 0x1a6b(%rip), %rcx      # 0xaa87
xorl %eax, %eax
movl $0x1a1, %edx            # imm = 0x1A1
callq 0x2040
jmp 0x902a
jmp 0x902c
jmp 0x902e
jmp 0x9030
movq -0x10(%rbp), %rax
movq %rax, -0x70(%rbp)
cmpq $0x0, %rax
je 0x9055
movq -0x70(%rbp), %rdi
callq 0x4480
movq -0x70(%rbp), %rdi
movl $0x30, %esi
callq 0x21d0
leaq 0x1a3a(%rip), %rsi      # 0xaa96
leaq -0x8(%rbp), %rdi
callq 0x2670
movq %rax, -0x78(%rbp)
jmp 0x906b
movq -0x78(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x5183(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x517a(%rip)      # 0xe1fc
cmpq $0x0, -0x10(%rbp)
jne 0x90bc
movl 0x5165(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x515d(%rip)      # 0xe1f4
leaq 0x143e(%rip), %rdi      # 0xa4dc
leaq 0x1455(%rip), %rsi      # 0xa4fa
leaq 0x1668(%rip), %rcx      # 0xa714
xorl %eax, %eax
movl $0x1a6, %edx            # imm = 0x1A6
callq 0x2040
jmp 0x90ba
jmp 0x90bc
jmp 0x90be
jmp 0x90c0
jmp 0x90c2
movl 0x5134(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x512b(%rip)      # 0xe1fc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
je 0x9110
movl 0x5111(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x5109(%rip)      # 0xe1f4
leaq 0x13ea(%rip), %rdi      # 0xa4dc
leaq 0x1401(%rip), %rsi      # 0xa4fa
leaq 0x161c(%rip), %rcx      # 0xa71c
xorl %eax, %eax
movl $0x1a7, %edx            # imm = 0x1A7
callq 0x2040
jmp 0x910e
jmp 0x9110
jmp 0x9112
jmp 0x9114
jmp 0x9116
movl 0x50e0(%rip), %eax      # 0xe1fc
incl %eax
movl %eax, 0x50d8(%rip)      # 0xe1fc
movq -0x10(%rbp), %rdi
callq 0x2480
movl %eax, -0x7c(%rbp)
jmp 0x9132
movl -0x7c(%rbp), %eax
cmpl $-0x2, %eax
je 0x916d
movl 0x50b4(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x50ac(%rip)      # 0xe1f4
leaq 0x138d(%rip), %rdi      # 0xa4dc
leaq 0x13a4(%rip), %rsi      # 0xa4fa
leaq 0x16a7(%rip), %rcx      # 0xa804
xorl %eax, %eax
movl $0x1a8, %edx            # imm = 0x1A8
callq 0x2040
jmp 0x916b
jmp 0x916d
jmp 0x916f
jmp 0x9171
movq -0x10(%rbp), %rax
movq %rax, -0x88(%rbp)
cmpq $0x0, %rax
je 0x919f
movq -0x88(%rbp), %rdi
callq 0x4480
movq -0x88(%rbp), %rdi
movl $0x30, %esi
callq 0x21d0
leaq 0x18f8(%rip), %rsi      # 0xaa9e
leaq -0x8(%rbp), %rdi
callq 0x2670
movq %rax, -0x90(%rbp)
jmp 0x91b8
movq -0x90(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x5033(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x502a(%rip)      # 0xe1fc
cmpq $0x0, -0x10(%rbp)
jne 0x920c
movl 0x5015(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x500d(%rip)      # 0xe1f4
leaq 0x12ee(%rip), %rdi      # 0xa4dc
leaq 0x1305(%rip), %rsi      # 0xa4fa
leaq 0x1518(%rip), %rcx      # 0xa714
xorl %eax, %eax
movl $0x1ad, %edx            # imm = 0x1AD
callq 0x2040
jmp 0x920a
jmp 0x920c
jmp 0x920e
jmp 0x9210
jmp 0x9212
movl 0x4fe4(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x4fdb(%rip)      # 0xe1fc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
je 0x9260
movl 0x4fc1(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x4fb9(%rip)      # 0xe1f4
leaq 0x129a(%rip), %rdi      # 0xa4dc
leaq 0x12b1(%rip), %rsi      # 0xa4fa
leaq 0x14cc(%rip), %rcx      # 0xa71c
xorl %eax, %eax
movl $0x1ae, %edx            # imm = 0x1AE
callq 0x2040
jmp 0x925e
jmp 0x9260
jmp 0x9262
jmp 0x9264
jmp 0x9266
movl 0x4f90(%rip), %eax      # 0xe1fc
incl %eax
movl %eax, 0x4f88(%rip)      # 0xe1fc
movq -0x10(%rbp), %rdi
callq 0x2480
movl %eax, -0x94(%rbp)
jmp 0x9285
movl -0x94(%rbp), %eax
cmpl $-0x8, %eax
je 0x92c3
movl 0x4f5e(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x4f56(%rip)      # 0xe1f4
leaq 0x1237(%rip), %rdi      # 0xa4dc
leaq 0x124e(%rip), %rsi      # 0xa4fa
leaq 0x17f5(%rip), %rcx      # 0xaaa8
xorl %eax, %eax
movl $0x1af, %edx            # imm = 0x1AF
callq 0x2040
jmp 0x92c1
jmp 0x92c3
jmp 0x92c5
jmp 0x92c7
movq -0x10(%rbp), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, %rax
je 0x92f5
movq -0xa0(%rbp), %rdi
callq 0x4480
movq -0xa0(%rbp), %rdi
movl $0x30, %esi
callq 0x21d0
leaq 0x17bb(%rip), %rsi      # 0xaab7
leaq -0x8(%rbp), %rdi
callq 0x2670
movq %rax, -0xa8(%rbp)
jmp 0x930e
movq -0xa8(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x4edd(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x4ed4(%rip)      # 0xe1fc
cmpq $0x0, -0x10(%rbp)
jne 0x9362
movl 0x4ebf(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x4eb7(%rip)      # 0xe1f4
leaq 0x1198(%rip), %rdi      # 0xa4dc
leaq 0x11af(%rip), %rsi      # 0xa4fa
leaq 0x13c2(%rip), %rcx      # 0xa714
xorl %eax, %eax
movl $0x1b4, %edx            # imm = 0x1B4
callq 0x2040
jmp 0x9360
jmp 0x9362
jmp 0x9364
jmp 0x9366
jmp 0x9368
movl 0x4e8e(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x4e85(%rip)      # 0xe1fc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
je 0x93b6
movl 0x4e6b(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x4e63(%rip)      # 0xe1f4
leaq 0x1144(%rip), %rdi      # 0xa4dc
leaq 0x115b(%rip), %rsi      # 0xa4fa
leaq 0x1376(%rip), %rcx      # 0xa71c
xorl %eax, %eax
movl $0x1b5, %edx            # imm = 0x1B5
callq 0x2040
jmp 0x93b4
jmp 0x93b6
jmp 0x93b8
jmp 0x93ba
jmp 0x93bc
movl 0x4e3a(%rip), %eax      # 0xe1fc
incl %eax
movl %eax, 0x4e32(%rip)      # 0xe1fc
movq -0x10(%rbp), %rdi
callq 0x2480
movl %eax, -0xac(%rbp)
jmp 0x93db
movl -0xac(%rbp), %eax
cmpl $0xc, %eax
je 0x9419
movl 0x4e08(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x4e00(%rip)      # 0xe1f4
leaq 0x10e1(%rip), %rdi      # 0xa4dc
leaq 0x10f8(%rip), %rsi      # 0xa4fa
leaq 0x16ba(%rip), %rcx      # 0xaac3
xorl %eax, %eax
movl $0x1b6, %edx            # imm = 0x1B6
callq 0x2040
jmp 0x9417
jmp 0x9419
jmp 0x941b
jmp 0x941d
movq -0x10(%rbp), %rax
movq %rax, -0xb8(%rbp)
cmpq $0x0, %rax
je 0x944b
movq -0xb8(%rbp), %rdi
callq 0x4480
movq -0xb8(%rbp), %rdi
movl $0x30, %esi
callq 0x21d0
leaq 0x1680(%rip), %rsi      # 0xaad2
leaq -0x8(%rbp), %rdi
callq 0x2670
movq %rax, -0xc0(%rbp)
jmp 0x9464
movq -0xc0(%rbp), %rax
movq %rax, -0x10(%rbp)
movl 0x4d87(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x4d7e(%rip)      # 0xe1fc
cmpq $0x0, -0x10(%rbp)
jne 0x94b8
movl 0x4d69(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x4d61(%rip)      # 0xe1f4
leaq 0x1042(%rip), %rdi      # 0xa4dc
leaq 0x1059(%rip), %rsi      # 0xa4fa
leaq 0x126c(%rip), %rcx      # 0xa714
xorl %eax, %eax
movl $0x1bb, %edx            # imm = 0x1BB
callq 0x2040
jmp 0x94b6
jmp 0x94b8
jmp 0x94ba
jmp 0x94bc
jmp 0x94be
movl 0x4d38(%rip), %eax      # 0xe1fc
addl $0x1, %eax
movl %eax, 0x4d2f(%rip)      # 0xe1fc
movq -0x10(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x4e, %eax
je 0x950c
movl 0x4d15(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x4d0d(%rip)      # 0xe1f4
leaq 0xfee(%rip), %rdi       # 0xa4dc
leaq 0x1005(%rip), %rsi      # 0xa4fa
leaq 0x1220(%rip), %rcx      # 0xa71c
xorl %eax, %eax
movl $0x1bc, %edx            # imm = 0x1BC
callq 0x2040
jmp 0x950a
jmp 0x950c
jmp 0x950e
jmp 0x9510
jmp 0x9512
movl 0x4ce4(%rip), %eax      # 0xe1fc
incl %eax
movl %eax, 0x4cdc(%rip)      # 0xe1fc
movq -0x10(%rbp), %rdi
callq 0x2480
movl %eax, -0xc4(%rbp)
jmp 0x9531
movl -0xc4(%rbp), %eax
cmpl $0x9, %eax
je 0x956f
movl 0x4cb2(%rip), %eax      # 0xe1f4
incl %eax
movl %eax, 0x4caa(%rip)      # 0xe1f4
leaq 0xf8b(%rip), %rdi       # 0xa4dc
leaq 0xfa2(%rip), %rsi       # 0xa4fa
leaq 0x157d(%rip), %rcx      # 0xaadc
xorl %eax, %eax
movl $0x1bd, %edx            # imm = 0x1BD
callq 0x2040
jmp 0x956d
jmp 0x956f
jmp 0x9571
jmp 0x9573
movq -0x10(%rbp), %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, %rax
je 0x95a1
movq -0xd0(%rbp), %rdi
callq 0x4480
movq -0xd0(%rbp), %rdi
movl $0x30, %esi
callq 0x21d0
leaq -0x8(%rbp), %rdi
callq 0x25d0
addq $0xd0, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x2330
nopl (%rax)