// File: /workspace/github_c_makefile_star2_O0/azhai[P]mlite/mlite.c
// Function: pp_rev
cell pp_rev(cell x) {
	cell	n, m;
	int	k, i;
	char	*s, *d;

	if (list_p(car(x))) {
		m = NIL;
		for (n = car(x); n != NIL; n = cdr(n))
			m = cons(car(n), m);
		return m;
	}
	if (string_p(car(x))) {
		s = string(car(x));
		k = string_len(car(x))-1;
		m = make_string("", k);
		d = string(m);
		for (i=0; i<k; i++)
			d[i] = s[k-i-1];
		d[i] = 0;
		return m;
	}
	return error("rev: expected list/str, got", car(x));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq 0x12a7d(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x15774
movq 0x12edb(%rip), %rax     # 0x285f0
movq 0x12a64(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x15774
movq 0x12eb9(%rip), %rax     # 0x285f0
movq 0x12a42(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x15774
movq 0x12e97(%rip), %rax     # 0x285f0
movq 0x12a20(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x8, %eax
cmpl $0x0, %eax
jne 0x15786
movq 0x12a05(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $-0x1, (%rax,%rcx,8)
jne 0x157eb
movq $-0x1, -0x20(%rbp)
movq 0x129eb(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
cmpq $-0x1, -0x18(%rbp)
je 0x157de
movq 0x129d1(%rip), %rax     # 0x28180
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x20(%rbp), %rsi
movl $0x8, %edx
callq 0x3780
movq %rax, -0x20(%rbp)
movq 0x12e00(%rip), %rax     # 0x285d0
movq -0x18(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x18(%rbp)
jmp 0x157a1
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x15945
movq 0x1298e(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jl 0x15926
movq 0x12de8(%rip), %rax     # 0x285f0
movq 0x12971(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movsbl (%rax,%rcx), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x15926
movq 0x12952(%rip), %rax     # 0x28180
movq 0x1294b(%rip), %rcx     # 0x28180
movq -0x10(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
cmpq $-0x21, (%rax,%rcx,8)
jne 0x15926
movq 0x12da9(%rip), %rax     # 0x285f8
movq 0x12d7a(%rip), %rcx     # 0x285d0
movq 0x12923(%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, -0x30(%rbp)
movq 0x12d7d(%rip), %rax     # 0x285f8
movq 0x12d4e(%rip), %rcx     # 0x285d0
movq 0x128f7(%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
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %esi
leaq 0xc126(%rip), %rdi      # 0x219d4
callq 0xa160
movq %rax, -0x20(%rbp)
movq 0x12d3a(%rip), %rax     # 0x285f8
movq 0x12d0b(%rip), %rcx     # 0x285d0
movq -0x20(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jge 0x15910
movq -0x30(%rbp), %rax
movl -0x24(%rbp), %ecx
subl -0x28(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movb (%rax,%rcx), %dl
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x158df
movq -0x38(%rbp), %rax
movslq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x15945
movq 0x12853(%rip), %rax     # 0x28180
movq -0x10(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
leaq 0xb3f8(%rip), %rdi      # 0x20d34
callq 0x34b0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop