	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sbrk                           ## -- Begin function sbrk
	.p2align	4, 0x90
_sbrk:                                  ## @sbrk
	.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	%edi, %r14d
	movq	_heapbase@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	callq	_panic
LBB0_2:
	movq	_heapsize@GOTPCREL(%rip), %r12
	movq	(%r12), %rbx
	movslq	%r14d, %r14
	leaq	(%rbx,%r14), %rax
	movq	_maxheap@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_3
## %bb.4:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	$-1, %rbx
	jmp	LBB0_5
LBB0_3:
	addq	(%r15), %rbx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_bzero
	addq	%r14, (%r12)
LBB0_5:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_heapbase,8,3                   ## @heapbase
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No heap setup"

	.comm	_heapsize,8,3                   ## @heapsize
	.comm	_maxheap,8,3                    ## @maxheap
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_errno,4,2                      ## @errno
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sbrk                           ; -- Begin function sbrk
	.p2align	2
_sbrk:                                  ; @sbrk
	.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	x19, x0
Lloh0:
	adrp	x20, _heapbase@GOTPAGE
Lloh1:
	ldr	x20, [x20, _heapbase@GOTPAGEOFF]
	ldr	x8, [x20]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_panic
LBB0_2:
Lloh4:
	adrp	x21, _heapsize@GOTPAGE
Lloh5:
	ldr	x21, [x21, _heapsize@GOTPAGEOFF]
	ldr	x8, [x21]
	sxtw	x22, w19
Lloh6:
	adrp	x9, _maxheap@GOTPAGE
Lloh7:
	ldr	x9, [x9, _maxheap@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x10, x8, x22
	cmp	x10, x9
	b.le	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _errno@GOTPAGE
Lloh13:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh14:
	str	w8, [x9]
	mov	x20, #-1
	b	LBB0_5
LBB0_4:
	ldr	x9, [x20]
	add	x20, x9, x8
	mov	x0, x20
	mov	x1, x19
	bl	_bzero
	ldr	x8, [x21]
	add	x8, x8, x22
	str	x8, [x21]
LBB0_5:
	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 AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotStr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_heapbase,8,3                   ; @heapbase
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No heap setup"

	.comm	_heapsize,8,3                   ; @heapsize
	.comm	_maxheap,8,3                    ; @maxheap
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_errno,4,2                      ; @errno
.subsections_via_symbols
