// File: /workspace/github_c_makefile_star2_O2/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 0xd841(%rip), %rax      # 0x1c170
movq 0xdc8a(%rip), %rcx      # 0x1c5c0
movq (%rcx,%rdi,8), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0x638a(%rip), %r15      # 0x14ccf
movq %r15, %rdi
callq 0x41c5
movq %rax, %r14
movq 0xd819(%rip), %rax      # 0x1c170
movq 0xdc62(%rip), %rcx      # 0x1c5c0
movq (%rcx,%rbx,8), %rdx
movq (%rcx,%rdx,8), %rcx
movq (%rax,%rcx,8), %rsi
movq %r15, %rdi
callq 0x41c5
movq %rax, %r15
movq 0xd7f4(%rip), %r13      # 0x1c170
movq (%r13,%rbx,8), %r12
testq %r12, %r12
js 0xea23
movq 0xdc4f(%rip), %rax      # 0x1c5e0
movzbl (%rax,%r12), %eax
testb $0x10, %al
je 0xe9c0
cmpq $-0x21, (%r13,%r12,8)
jne 0xe9c0
testb $0x11, %al
je 0xe9c6
movq 0xdc3b(%rip), %rax      # 0x1c5e8
movq 0xdc0c(%rip), %rcx      # 0x1c5c0
movq (%rcx,%r12,8), %rcx
movl -0x8(%rax,%rcx,8), %eax
decl %eax
jmp 0xe9ce
andb $0x19, %al
cmpb $0x8, %al
jne 0xea29
movq %r12, %rdi
callq 0x46c4
testl %r14d, %r14d
js 0xea35
cmpl %r14d, %eax
jl 0xea35
testl %r15d, %r15d
js 0xea35
cmpl %r15d, %eax
jl 0xea35
movl %r15d, %esi
subl %r14d, %esi
jl 0xea35
testq %r12, %r12
js 0xea04
movq 0xdbea(%rip), %rax      # 0x1c5e0
movb (%rax,%r12), %al
andb $0x19, %al
cmpb $0x8, %al
jne 0xea98
pushq $0x8
popq %rcx
movq %rbx, %rdi
movl %r14d, %esi
movl %r15d, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xe847
cmpq $-0x1, %r12
je 0xe9c6
leaq 0x62a3(%rip), %rdi      # 0x14cd3
movq %r12, %rsi
jmp 0xea7d
movq 0xdb84(%rip), %rax      # 0x1c5c0
movq (%rax,%rbx,8), %rcx
movq (%rax,%rcx,8), %rax
movq (%r13,%rax,8), %rdi
pushq $-0x1
popq %rsi
xorl %edx, %edx
callq 0x3613
movq 0xd716(%rip), %rcx      # 0x1c170
movq 0xdb5f(%rip), %rdx      # 0x1c5c0
movq (%rdx,%rbx,8), %rdx
movq (%rcx,%rdx,8), %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x3613
leaq 0x6275(%rip), %rdi      # 0x14cef
movq %rax, %rsi
callq 0x33e4
pushq $-0x5
popq %r12
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x6e39(%rip), %rdi      # 0x158d8
callq 0x729e
movq %rax, %r12
movq 0xdb3a(%rip), %rax      # 0x1c5e8
movq 0xdb0b(%rip), %rcx      # 0x1c5c0
movq (%rcx,%r12,8), %rdx
leaq (%rax,%rdx,8), %r13
subl %r14d, %r15d
jne 0xeac7
movslq %r15d, %rbx
jmp 0xeaf5
movq 0xd6a2(%rip), %rdx      # 0x1c170
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 0xea86