// File: /workspace/github_c_makefile_star2_O0/ccxvii[P]mujs/./jsstring.c
// Function: Sp_toLowerCase
static void Sp_toLowerCase(js_State *J)
{
	const char *s, *s0 = checkstring(J, 0);
	char * volatile dst = NULL;
	char *d;
	Rune rune;
	const Rune *full;
	int n;

	n = 1;
	for (s = s0; *s;) {
		s += chartorune(&rune, s);
		full = tolowerrune_full(rune);
		if (full) {
			while (*full) {
				n += runelen(*full);
				++full;
			}
		} else {
			rune = tolowerrune(rune);
			n += runelen(rune);
		}
	}

	if (js_try(J)) {
		js_free(J, dst);
		js_throw(J);
	}

	d = dst = js_malloc(J, n);
	for (s = s0; *s;) {
		s += chartorune(&rune, s);
		full = tolowerrune_full(rune);
		if (full) {
			while (*full) {
				d += runetochar(d, full);
				++full;
			}
		} else {
			rune = tolowerrune(rune);
			d += runetochar(d, &rune);
		}
	}
	*d = 0;

	js_pushstring(J, dst);
	js_endtry(J);
	js_free(J, dst);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x2fae0
movq %rax, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1aba2
movq -0x10(%rbp), %rsi
leaq -0x2c(%rbp), %rdi
callq 0x19d20
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %edi
callq 0x1de60
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x1ab87
jmp 0x1ab5d
movq -0x38(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ab85
movq -0x38(%rbp), %rax
movl (%rax), %edi
callq 0x1da60
addl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x1ab5d
jmp 0x1aba0
movl -0x2c(%rbp), %edi
callq 0x1da90
movl %eax, -0x2c(%rbp)
movl -0x2c(%rbp), %edi
callq 0x1da60
addl -0x3c(%rbp), %eax
movl %eax, -0x3c(%rbp)
jmp 0x1ab22
movq -0x8(%rbp), %rdi
callq 0x14270
movq %rax, %rdi
callq 0x30e0
cmpl $0x0, %eax
je 0x1abce
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xd710
movq -0x8(%rbp), %rdi
callq 0x8cb0
movq -0x8(%rbp), %rdi
movl -0x3c(%rbp), %esi
callq 0xd9d0
movq %rax, -0x20(%rbp)
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1ac8c
movq -0x10(%rbp), %rsi
leaq -0x2c(%rbp), %rdi
callq 0x19d20
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x2c(%rbp), %edi
callq 0x1de60
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0x1ac5f
jmp 0x1ac29
movq -0x38(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ac5d
movq -0x28(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x1d910
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x38(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x38(%rbp)
jmp 0x1ac29
jmp 0x1ac87
movl -0x2c(%rbp), %edi
callq 0x1da90
movl %eax, -0x2c(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x2c(%rbp), %rsi
callq 0x1d910
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x1abea
movq -0x28(%rbp), %rax
movb $0x0, (%rax)
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x13880
movq -0x8(%rbp), %rdi
callq 0x14a10
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xd710
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)