	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function String_trim
_String_trim:                           ## @String_trim
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r14
	movq	%rdi, %rbx
	movl	(%rsi), %edi
	callq	_jsval_disp
	leaq	-56(%rbp), %rdx
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_to_flat_string
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	callq	_WARN
	jmp	LBB0_19
LBB0_2:
	movq	%r14, -80(%rbp)                 ## 8-byte Spill
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	-56(%rbp), %rdi
	callq	_jsstr_length
	movl	%eax, %ebx
	movq	-64(%rbp), %rdi
	movl	%eax, %esi
	callq	_debugstr_wn
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	callq	_TRACE
	movq	-64(%rbp), %r13
	movl	%ebx, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	(,%rax,4), %r14
	addq	%r13, %r14
	movq	%r13, %r12
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.3:
	movq	%r13, %r12
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	callq	_iswspace
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	addq	$4, %r12
	cmpq	%r14, %r12
	jb	LBB0_4
LBB0_6:
	leaq	4(%r12), %r15
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(,%rax,4), %rcx
	addq	%r13, %rcx
	subq	%r12, %rcx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rbx
	movq	%rcx, %r13
	cmpq	%r15, %r14
	jbe	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	-4(%rbx), %r14
	movl	-4(%rbx), %edi
	callq	_iswspace
	leaq	-4(%r13), %rcx
	testq	%rax, %rax
	jne	LBB0_7
LBB0_9:
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_10
## %bb.11:
	movq	-64(%rbp), %rax
	cmpq	%rax, %r12
	jne	LBB0_14
## %bb.12:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,4), %rax
	cmpq	%rax, %rbx
	jne	LBB0_14
## %bb.13:
	movq	-56(%rbp), %rdi
	callq	_jsstr_addref
	jmp	LBB0_15
LBB0_10:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_18
LBB0_14:
	shrq	$2, %r13
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_jsstr_alloc_len
LBB0_15:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movq	%rax, %rdi
	callq	_jsval_string
	movl	%eax, (%r14)
	jmp	LBB0_18
LBB0_17:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_18:
	movq	-56(%rbp), %rdi
	callq	_jsstr_release
LBB0_19:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"to_flat_string failed: %08x\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s\n"

	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.no_dead_strip	_String_trim
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function String_trim
_String_trim:                           ; @String_trim
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x5
	mov	x19, x0
	ldr	w0, [x1]
	bl	_jsval_disp
	mov	x1, x0
	mov	x2, sp
	add	x3, sp, #8
	mov	x0, x19
	bl	_to_flat_string
	mov	x19, x0
	bl	_FAILED
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_WARN
	b	LBB0_17
LBB0_2:
	ldr	x0, [sp]
	bl	_jsstr_length
	mov	x21, x0
	ldr	x0, [sp, #8]
	mov	x1, x21
	bl	_debugstr_wn
	mov	x1, x0
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	ldr	x24, [sp, #8]
	mov	w22, w21
	add	x23, x24, w21, uxtw #2
	cbz	w21, LBB0_6
; %bb.3:
	mov	x21, x24
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_iswspace
	cbz	x0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #4
	cmp	x21, x23
	b.lo	LBB0_4
	b	LBB0_7
LBB0_6:
	mov	x21, x24
LBB0_7:
	add	x25, x21, #4
	add	x8, x24, x22, lsl #2
	sub	x8, x8, x21
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, x23
	mov	x24, x8
	cmp	x23, x25
	b.ls	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	mov	x23, x26
	ldr	w0, [x23, #-4]!
	bl	_iswspace
	sub	x8, x24, #4
	cbnz	x0, LBB0_8
LBB0_10:
	cbz	x20, LBB0_16
; %bb.11:
	ldr	x8, [sp, #8]
	add	x9, x8, x22, lsl #2
	cmp	x21, x8
	ccmp	x26, x9, #0, eq
	b.eq	LBB0_14
; %bb.12:
	lsr	x1, x24, #2
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_jsstr_alloc_len
	cbz	x0, LBB0_15
LBB0_13:
	bl	_jsval_string
	str	w0, [x20]
	b	LBB0_16
LBB0_14:
	ldr	x0, [sp]
	bl	_jsstr_addref
	cbnz	x0, LBB0_13
LBB0_15:
Lloh4:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
Lloh6:
	ldr	w19, [x8]
LBB0_16:
	ldr	x0, [sp]
	bl	_jsstr_release
LBB0_17:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"to_flat_string failed: %08x\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s\n"

	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.no_dead_strip	_String_trim
.subsections_via_symbols
