	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_brk                        ## -- Begin function sys_brk
	.p2align	4, 0x90
_sys_brk:                               ## @sys_brk
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	callq	_STRACE
	movq	_current@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %r12
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	cmpq	%rbx, (%r12)
	jle	LBB0_4
## %bb.2:
	movq	__EINVAL@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	jmp	LBB0_11
LBB0_3:
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_write_wrlock
	movq	8(%r12), %rbx
	jmp	LBB0_10
LBB0_4:
	leaq	16(%r12), %r14
	movq	%r14, %rdi
	callq	_write_wrlock
	movq	8(%r12), %r15
	cmpq	%rbx, %r15
	jge	LBB0_7
## %bb.5:
	movq	%r15, %rdi
	callq	_PAGE_ROUND_UP
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_PAGE_ROUND_UP
	movq	%rax, %r13
	movq	%r15, %rdi
	callq	_PAGE_ROUND_UP
	subq	%rax, %r13
	movq	_P_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	callq	_pt_map_nothing
	testl	%eax, %eax
	jns	LBB0_9
## %bb.6:
	movl	%eax, %r15d
	movq	%r14, %rdi
	callq	_write_wrunlock
	movslq	%r15d, %rbx
	jmp	LBB0_11
LBB0_7:
	jle	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_PAGE
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_PAGE
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_pt_unmap_always
LBB0_9:
	movq	%rbx, 8(%r12)
LBB0_10:
	movq	%r14, %rdi
	callq	_write_wrunlock
LBB0_11:
	movq	%rbx, %rax
	addq	$8, %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	"brk(0x%x)"

	.comm	_current,8,3                    ## @current
	.comm	__EINVAL,8,3                    ## @_EINVAL
	.comm	_P_WRITE,4,2                    ## @P_WRITE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_sys_brk                        ; -- Begin function sys_brk
	.p2align	2
_sys_brk:                               ; @sys_brk
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_STRACE
Lloh2:
	adrp	x8, _current@GOTPAGE
Lloh3:
	ldr	x8, [x8, _current@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	ldr	x24, [x8]
	cbz	x19, LBB0_3
; %bb.1:
	ldr	x8, [x24]
	cmp	x8, x19
	b.le	LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, __EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, __EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	x19, [x8]
	b	LBB0_11
LBB0_3:
	add	x20, x24, #16
	mov	x0, x20
	bl	_write_wrlock
	ldr	x19, [x24, #8]
	b	LBB0_10
LBB0_4:
	add	x20, x24, #16
	mov	x0, x20
	bl	_write_wrlock
	ldr	x21, [x24, #8]
	cmp	x21, x19
	b.ge	LBB0_7
; %bb.5:
	mov	x0, x21
	bl	_PAGE_ROUND_UP
	mov	x22, x0
	mov	x0, x19
	bl	_PAGE_ROUND_UP
	mov	x23, x0
	mov	x0, x21
	bl	_PAGE_ROUND_UP
	sub	x2, x23, x0
Lloh8:
	adrp	x8, _P_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _P_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x22
	bl	_pt_map_nothing
	tbz	w0, #31, LBB0_9
; %bb.6:
	mov	x21, x0
	mov	x0, x20
	bl	_write_wrunlock
	sxtw	x19, w21
	b	LBB0_11
LBB0_7:
	b.le	LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_PAGE
	mov	x22, x0
	mov	x0, x21
	bl	_PAGE
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_pt_unmap_always
LBB0_9:
	str	x19, [x24, #8]
LBB0_10:
	mov	x0, x20
	bl	_write_wrunlock
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"brk(0x%x)"

	.comm	_current,8,3                    ; @current
	.comm	__EINVAL,8,3                    ; @_EINVAL
	.comm	_P_WRITE,4,2                    ; @P_WRITE
.subsections_via_symbols
