// File: /workspace/github_c_makefile_star2_O0/azhai[P]mlite/mlite.c
// Function: pp_sub
cell pp_sub(cell x) {
	int	k;
	int	p0 = integer_value("sub", cadr(x));
	int	pn = integer_value("sub", caddr(x));
	char	*src, *dst;
	cell	n;

	if (!string_p(car(x)) && !list_p(car(x)))
		return error("sub: expected list/str, got", car(x));
	k = list_p(car(x)) || tuple_p(car(x))? length(car(x)):
						string_len(car(x))-1;
	if (p0 < 0 || p0 > k || pn < 0 || pn > k || pn < p0) {
		n = node(caddr(x), NIL);
		return error("sub: invalid range", node(cadr(x), n));
	}
	if (list_p(car(x)))
		return sublis(x, p0, pn, LIST_TAG);
	n = make_string("", pn-p0);
	dst = string(n);
	src = string(car(x));
	if (pn-p0 != 0)
		memcpy(dst, &src[p0], pn-p0);
	dst[pn-p0] = 0;
	return n;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq 0x117bd(%rip), %rax     # 0x28180
movq 0x11c06(%rip), %rcx     # 0x285d0
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xa3bd(%rip), %rdi      # 0x20d9a
callq 0x4960
movl %eax, -0x18(%rbp)
movq 0x11794(%rip), %rax     # 0x28180
movq 0x11bdd(%rip), %rcx     # 0x285d0
movq 0x11bd6(%rip), %rdx     # 0x285d0
movq -0x10(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xa389(%rip), %rdi      # 0x20d9a
callq 0x4960
movl %eax, -0x1c(%rbp)
movq 0x11760(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x16a6e
movq 0x11bbe(%rip), %rax     # 0x285f0
movq 0x11747(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x16a6e
movq 0x1172c(%rip), %rax     # 0x28180
movq 0x11725(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x21, (%rax,%rcx,8)
je 0x16b1c
movq 0x1170b(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x16ae6
movq 0x11b69(%rip), %rax     # 0x285f0
movq 0x116f2(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x16ae6
movq 0x11b47(%rip), %rax     # 0x285f0
movq 0x116d0(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x16ae6
movq 0x11b25(%rip), %rax     # 0x285f0
movq 0x116ae(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x16b1c
movq 0x11693(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x16b1c
movq 0x11681(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xa290(%rip), %rdi      # 0x20d9e
callq 0x34b0
movq %rax, -0x8(%rbp)
jmp 0x16e5d
movq 0x1165d(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x16b98
movq 0x11abb(%rip), %rax     # 0x285f0
movq 0x11644(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x16b98
movq 0x11a99(%rip), %rax     # 0x285f0
movq 0x11622(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x16b98
movq 0x11a77(%rip), %rax     # 0x285f0
movq 0x11600(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x16c26
movq 0x115e1(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
je 0x16c26
movq 0x115cf(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x16c42
movq 0x11a29(%rip), %rax     # 0x285f0
movq 0x115b2(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x16c42
movq 0x11a07(%rip), %rax     # 0x285f0
movq 0x11590(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x16c42
movq 0x119e5(%rip), %rax     # 0x285f0
movq 0x1156e(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x16c42
movq 0x11553(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x5160
cltq
movq %rax, -0x40(%rbp)
jmp 0x16c73
movq 0x119af(%rip), %rax     # 0x285f8
movq 0x11980(%rip), %rcx     # 0x285d0
movq 0x11529(%rip), %rdx     # 0x28180
movq -0x10(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rax
subq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x18(%rbp)
jl 0x16c9e
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x16c9e
cmpl $0x0, -0x1c(%rbp)
jl 0x16c9e
movl -0x1c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jg 0x16c9e
movl -0x1c(%rbp), %eax
cmpl -0x18(%rbp), %eax
jge 0x16d12
movq 0x114db(%rip), %rax     # 0x28180
movq 0x11924(%rip), %rcx     # 0x285d0
movq 0x1191d(%rip), %rdx     # 0x285d0
movq -0x10(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x3780
movq %rax, -0x38(%rbp)
movq 0x114a4(%rip), %rax     # 0x28180
movq 0x118ed(%rip), %rcx     # 0x285d0
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x38(%rbp), %rsi
xorl %edx, %edx
callq 0x3780
movq %rax, %rsi
leaq 0xa0b6(%rip), %rdi      # 0x20dba
callq 0x34b0
movq %rax, -0x8(%rbp)
jmp 0x16e5d
movq 0x11467(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x16d8a
movq 0x118c5(%rip), %rax     # 0x285f0
movq 0x1144e(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x16d8a
movq 0x118a3(%rip), %rax     # 0x285f0
movq 0x1142c(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x16d8a
movq 0x11881(%rip), %rax     # 0x285f0
movq 0x1140a(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x16d9c
movq 0x113ef(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x16db9
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %esi
movl -0x1c(%rbp), %edx
movl $0x8, %ecx
callq 0x16860
movq %rax, -0x8(%rbp)
jmp 0x16e5d
movl -0x1c(%rbp), %esi
subl -0x18(%rbp), %esi
leaq 0xac0e(%rip), %rdi      # 0x219d4
callq 0xa160
movq %rax, -0x38(%rbp)
movq 0x11822(%rip), %rax     # 0x285f8
movq 0x117f3(%rip), %rcx     # 0x285d0
movq -0x38(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq 0x11801(%rip), %rax     # 0x285f8
movq 0x117d2(%rip), %rcx     # 0x285d0
movq 0x1137b(%rip), %rdx     # 0x28180
movq -0x10(%rbp), %rsi
movq (%rdx,%rsi,8), %rdx
movq (%rcx,%rdx,8), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
subl -0x18(%rbp), %eax
cmpl $0x0, %eax
je 0x16e44
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rsi
movslq -0x18(%rbp), %rax
addq %rax, %rsi
movl -0x1c(%rbp), %eax
subl -0x18(%rbp), %eax
movslq %eax, %rdx
callq 0x3140
movq -0x30(%rbp), %rax
movl -0x1c(%rbp), %ecx
subl -0x18(%rbp), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)