// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0xe3d5(%rip), %rax      # 0x1e170
movq 0xe81e(%rip), %rcx      # 0x1e5c0
movq (%rcx,%rdi,8), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x6f1e(%rip), %r15      # 0x16ccf
movq %r15, %rdi
callq 0x432f
movq %rax, %r14
movq 0xe3ad(%rip), %rax      # 0x1e170
movq 0xe7f6(%rip), %rcx      # 0x1e5c0
movq (%rcx,%rbx,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rsi
movq %r15, %rdi
callq 0x432f
movq %rax, %r15
movq 0xe388(%rip), %rax      # 0x1e170
movq (%rax,%rbx,8), %rsi
testq %rsi, %rsi
js 0xfe49
movq 0xe7e8(%rip), %rcx      # 0x1e5e0
movzbl (%rcx,%rsi), %ecx
testb $0x10, %cl
je 0xfe27
cmpq $-0x21, (%rax,%rsi,8)
jne 0xfe27
testb $0x11, %cl
je 0xfe2f
movq 0xe7d4(%rip), %rcx      # 0x1e5e8
movq 0xe7a5(%rip), %rdx      # 0x1e5c0
movq (%rdx,%rsi,8), %rdx
movl -0x8(%rcx,%rdx,8), %ecx
decl %ecx
jmp 0xfe5d
andb $0x19, %cl
cmpb $0x8, %cl
jne 0xfe4f
xorl %ecx, %ecx
movq 0xe788(%rip), %rdx      # 0x1e5c0
movq %rsi, %rdi
incl %ecx
movq (%rdx,%rdi,8), %rdi
cmpq $-0x1, %rdi
jne 0xfe3b
jmp 0xfe5d
cmpq $-0x1, %rsi
je 0xfe5b
leaq 0x6e7d(%rip), %rdi      # 0x16cd3
jmp 0xff02
xorl %ecx, %ecx
testl %r14d, %r14d
js 0xfeb7
cmpl %r14d, %ecx
jl 0xfeb7
testl %r15d, %r15d
js 0xfeb7
cmpl %r15d, %ecx
jl 0xfeb7
movl %r15d, %ecx
subl %r14d, %ecx
jl 0xfeb7
testq %rsi, %rsi
js 0xff20
movq 0xe757(%rip), %rax      # 0x1e5e0
movb (%rax,%rsi), %al
andb $0x19, %al
cmpb $0x8, %al
jne 0xff2a
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
movl $0x8, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xfc99
movq 0xe702(%rip), %rcx      # 0x1e5c0
movq (%rcx,%rbx,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rdi
movq $-0x1, %rsi
xorl %edx, %edx
callq 0x36e8
movq 0xe291(%rip), %rcx      # 0x1e170
movq 0xe6da(%rip), %rdx      # 0x1e5c0
movq (%rdx,%rbx,8), %rdx
movq (%rcx,%rdx,8), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x36e8
leaq 0x6df0(%rip), %rdi      # 0x16cef
movq %rax, %rsi
callq 0x33eb
movq $-0x5, %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $-0x1, %rsi
je 0xfe96
leal 0x1(%rcx), %r13d
movq $-0x21, %rdi
movl %r13d, %esi
callq 0x416e
movq %rax, %r12
movq 0xe679(%rip), %rax      # 0x1e5c0
movq (%rax,%r12,8), %rdi
shlq $0x3, %rdi
addq 0xe692(%rip), %rdi      # 0x1e5e8
movslq %r13d, %rdx
xorl %esi, %esi
callq 0x30d0
movq 0xe681(%rip), %rax      # 0x1e5e8
movq 0xe652(%rip), %rcx      # 0x1e5c0
movq (%rcx,%r12,8), %rdx
leaq (%rax,%rdx,8), %r13
subl %r14d, %r15d
jne 0xff80
movslq %r15d, %rbx
jmp 0xffae
movq 0xe1e9(%rip), %rdx      # 0x1e170
movq (%rdx,%rbx,8), %rdx
movq (%rcx,%rdx,8), %rcx
leaq (%rax,%rcx,8), %rax
andl $0x7fffffff, %r14d      # imm = 0x7FFFFFFF
addq %rax, %r14
movslq %r15d, %rbx
movq %r13, %rdi
movq %r14, %rsi
movq %rbx, %rdx
callq 0x3130
movb $0x0, (%r13,%rbx)
jmp 0xff0e