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

	n = 1;
	for (s = s0; *s;) {
		s += chartorune(&rune, s);
		full = toupperrune_full(rune);
		if (full) {
			while (*full) {
				n += runelen(*full);
				++full;
			}
		} else {
			rune = toupperrune(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 = toupperrune_full(rune);
		if (full) {
			while (*full) {
				d += runetochar(d, full);
				++full;
			}
		} else {
			rune = toupperrune(rune);
			d += runetochar(d, &rune);
		}
	}
	*d = 0;

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

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, 0x20(%rsp)
callq 0x2925f
movq $0x0, 0x10(%rsp)
cmpb $0x0, (%rax)
movq %rax, 0x18(%rsp)
je 0x19a51
movl $0x1, %r14d
leaq 0x2e(%rsp), %r15
leaq 0xc(%rsp), %r12
movq %rax, %r13
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x18750
movl %eax, %ebp
movl 0x8(%rsp), %ebx
movl %ebx, %edi
callq 0x1cb30
testq %rax, %rax
je 0x19a1a
movl (%rax), %ecx
testl %ecx, %ecx
je 0x19a3a
addq $0x4, %rax
movl %r14d, %edx
movl %edx, %ebx
movq %rax, %r14
movl %ecx, 0xc(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1c76f
addl %eax, %ebx
movl (%r14), %esi
addq $0x4, %r14
movq %r14, %rax
movl %esi, %ecx
movl %ebx, %r14d
movl %ebx, %edx
testl %esi, %esi
jne 0x199ed
jmp 0x19a3a
movl %ebx, %edi
callq 0x1c8bb
movl %eax, 0x8(%rsp)
movl %eax, 0xc(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x1c76f
addl %r14d, %eax
movl %eax, %r14d
movl %ebp, %ebp
movl %ebp, %eax
addq %rax, %r13
cmpb $0x0, (%r13)
movl %r14d, %ebp
jne 0x199c1
jmp 0x19a56
movl $0x1, %ebp
movq 0x20(%rsp), %r13
movq %r13, %rdi
callq 0x13fbb
movq %rax, %rdi
callq 0x3100
testl %eax, %eax
jne 0x19b59
movq %r13, %rdi
movl %ebp, %esi
callq 0xe119
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %r15
cmpb $0x0, (%r15)
je 0x19b17
leaq 0x8(%rsp), %r14
movq %rax, %r12
movq %r14, %rdi
movq %r15, %rsi
callq 0x18750
movl %eax, %ebp
movl 0x8(%rsp), %ebx
movl %ebx, %edi
callq 0x1cb30
testq %rax, %rax
je 0x19ae9
cmpl $0x0, (%rax)
je 0x19b07
movq %r12, %rbx
movq %rax, %r12
movq %rbx, %rdi
movq %rax, %rsi
callq 0x1c76f
movl %eax, %eax
movq %rax, %rcx
addq %rbx, %rcx
cmpl $0x0, 0x4(%r12)
leaq 0x4(%r12), %rax
movq %rcx, %r12
movq %rcx, %rbx
jne 0x19abe
jmp 0x19b07
movl %ebx, %edi
callq 0x1c8bb
movl %eax, 0x8(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x1c76f
movl %eax, %eax
addq %r12, %rax
movq %rax, %r12
movl %ebp, %ebp
movl %ebp, %eax
addq %rax, %r15
cmpb $0x0, (%r15)
movq %r12, %rax
jne 0x19a99
movb $0x0, (%rax)
movq 0x10(%rsp), %rsi
movq %r13, %rdi
callq 0x13665
movl 0x8198(%r13), %eax
testl %eax, %eax
je 0x19b70
decl %eax
movl %eax, 0x8198(%r13)
movq 0x10(%rsp), %rsi
movq (%r13), %rdi
xorl %edx, %edx
callq *0x10(%r13)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rsi
movq (%r13), %rdi
xorl %edx, %edx
callq *0x10(%r13)
movq %r13, %rdi
callq 0x8ec6
leaq 0x19c92(%rip), %rsi     # 0x33809
xorl %eax, %eax
movq %r13, %rdi
callq 0xc939