	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sbrk_r                        ## -- Begin function _sbrk_r
	.p2align	4, 0x90
__sbrk_r:                               ## @_sbrk_r
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movq	__newlib_sbrk_mutex@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_sceKernelLockLwMutex
	testq	%rax, %rax
	js	LBB0_4
## %bb.1:
	movq	__newlib_heap_base@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
## %bb.2:
	movq	__newlib_heap_cur@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movslq	%r15d, %rcx
	addq	%rbx, %rcx
	movq	__newlib_heap_end@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_3
## %bb.5:
	movq	%rcx, (%rax)
	movq	(%r12), %rdi
	movl	$1, %esi
	callq	_sceKernelUnlockLwMutex
	jmp	LBB0_6
LBB0_3:
	movq	(%r12), %rdi
	movl	$1, %esi
	callq	_sceKernelUnlockLwMutex
LBB0_4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	movq	$-1, %rbx
LBB0_6:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	__newlib_sbrk_mutex,8,3         ## @_newlib_sbrk_mutex
	.comm	__newlib_heap_base,4,2          ## @_newlib_heap_base
	.comm	__newlib_heap_cur,8,3           ## @_newlib_heap_cur
	.comm	__newlib_heap_end,8,3           ## @_newlib_heap_end
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__sbrk_r                        ; -- Begin function _sbrk_r
	.p2align	2
__sbrk_r:                               ; @_sbrk_r
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x22, __newlib_sbrk_mutex@GOTPAGE
Lloh1:
	ldr	x22, [x22, __newlib_sbrk_mutex@GOTPAGEOFF]
	ldr	x0, [x22]
	mov	w1, #1
	mov	w2, #0
	bl	_sceKernelLockLwMutex
	tbnz	x0, #63, LBB0_5
; %bb.1:
Lloh2:
	adrp	x8, __newlib_heap_base@GOTPAGE
Lloh3:
	ldr	x8, [x8, __newlib_heap_base@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cbz	w8, LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, __newlib_heap_cur@GOTPAGE
Lloh6:
	ldr	x8, [x8, __newlib_heap_cur@GOTPAGEOFF]
	ldr	x20, [x8]
	add	x9, x20, w21, sxtw
Lloh7:
	adrp	x10, __newlib_heap_end@GOTPAGE
Lloh8:
	ldr	x10, [x10, __newlib_heap_end@GOTPAGEOFF]
Lloh9:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_4
; %bb.3:
	str	x9, [x8]
	ldr	x0, [x22]
	mov	w1, #1
	bl	_sceKernelUnlockLwMutex
	b	LBB0_6
LBB0_4:
	ldr	x0, [x22]
	mov	w1, #1
	bl	_sceKernelUnlockLwMutex
LBB0_5:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	x20, #-1
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	__newlib_sbrk_mutex,8,3         ; @_newlib_sbrk_mutex
	.comm	__newlib_heap_base,4,2          ; @_newlib_heap_base
	.comm	__newlib_heap_cur,8,3           ; @_newlib_heap_cur
	.comm	__newlib_heap_end,8,3           ; @_newlib_heap_end
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
