// File: /workspace/github_c_makefile_star2_O0/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
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, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpb $0x0, (%rax)
je 0x1ad72
movq -0x10(%rbp), %rsi
leaq -0x34(%rbp), %rdi
callq 0x19d20
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %edi
callq 0x1dec0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1ad57
jmp 0x1ad2d
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ad55
movq -0x30(%rbp), %rax
movl (%rax), %edi
callq 0x1da60
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
jmp 0x1ad2d
jmp 0x1ad70
movl -0x34(%rbp), %edi
callq 0x1dbd0
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %edi
callq 0x1da60
addl -0x38(%rbp), %eax
movl %eax, -0x38(%rbp)
jmp 0x1acf2
movq -0x8(%rbp), %rdi
callq 0x14270
movq %rax, %rdi
callq 0x30e0
cmpl $0x0, %eax
je 0x1ad9e
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xd710
movq -0x8(%rbp), %rdi
callq 0x8cb0
movq -0x8(%rbp), %rdi
movl -0x38(%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 0x1ae5c
movq -0x10(%rbp), %rsi
leaq -0x34(%rbp), %rdi
callq 0x19d20
movl %eax, %ecx
movq -0x10(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x10(%rbp)
movl -0x34(%rbp), %edi
callq 0x1dec0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
je 0x1ae2f
jmp 0x1adf9
movq -0x30(%rbp), %rax
cmpl $0x0, (%rax)
je 0x1ae2d
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x1d910
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x4, %rax
movq %rax, -0x30(%rbp)
jmp 0x1adf9
jmp 0x1ae57
movl -0x34(%rbp), %edi
callq 0x1dbd0
movl %eax, -0x34(%rbp)
movq -0x28(%rbp), %rdi
leaq -0x34(%rbp), %rsi
callq 0x1d910
movl %eax, %ecx
movq -0x28(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
jmp 0x1adba
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)