	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function buffer_op
_buffer_op:                             ## @buffer_op
	.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	%r8, %r12
	movq	%rcx, %r13
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_PAGE_ALIGN
	subq	%r15, %rax
	movslq	%ebx, %rsi
	movq	%rax, %rdi
	callq	_min
	movq	%r15, %rdi
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%eax, %esi
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %edx
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rcx
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %r8
	callq	_do_op_one_page
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r12d
	sarl	$31, %r12d
	andl	%ebx, %r12d
LBB0_11:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	xorl	%r12d, %r12d
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	subl	%eax, %ebx
	je	LBB0_11
## %bb.3:
	movslq	%eax, %r14
	addq	%r15, %r14
	movslq	%ebx, %rax
	addq	%r14, %rax
	movq	_PAGE_MASK@GOTPCREL(%rip), %r15
	andq	(%r15), %rax
	cmpq	%rax, %r14
	jae	LBB0_4
## %bb.5:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r13, %r8
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_do_op_one_page
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%rsi, %r14
	subl	%esi, %ebx
	movslq	%ebx, %rax
	addq	%r14, %rax
	andq	(%r15), %rax
	cmpq	%rax, %r14
	movq	%r13, %r8
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	jb	LBB0_6
## %bb.8:
	testl	%ebx, %ebx
	jne	LBB0_9
	jmp	LBB0_11
LBB0_4:
	movq	%r13, %r8
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
LBB0_9:
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_do_op_one_page
	testl	%eax, %eax
	je	LBB0_11
LBB0_10:
	sarl	$31, %eax
	andl	%ebx, %eax
	movl	%eax, %r12d
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,8,3                  ## @PAGE_MASK
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.no_dead_strip	_buffer_op
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function buffer_op
_buffer_op:                             ; @buffer_op
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	bl	_PAGE_ALIGN
	sub	x0, x0, x23
	sxtw	x1, w22
	bl	_min
	mov	x24, x0
	mov	x0, x23
	mov	x1, x24
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_do_op_one_page
	cbz	w0, LBB0_2
; %bb.1:
	and	w0, w22, w0, asr #31
	b	LBB0_11
LBB0_2:
	subs	w22, w22, w24
	b.eq	LBB0_9
; %bb.3:
	add	x23, x23, w24, sxtw
	add	x8, x23, w22, sxtw
Lloh0:
	adrp	x24, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x24, [x24, _PAGE_MASK@GOTPAGEOFF]
	ldr	x9, [x24]
	and	x8, x8, x9
	cmp	x23, x8
	b.hs	LBB0_8
; %bb.4:
Lloh2:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x1, [x25]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_do_op_one_page
	cbnz	w0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x25]
	sub	w22, w22, w1
	add	x23, x1, x23
	add	x8, x23, w22, sxtw
	ldr	x9, [x24]
	and	x8, x8, x9
	cmp	x23, x8
	b.lo	LBB0_5
; %bb.7:
	cbz	w22, LBB0_9
LBB0_8:
	mov	x0, x23
	mov	x1, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x19
	bl	_do_op_one_page
	and	w8, w22, w0, asr #31
	cmp	w0, #0
	csel	w0, wzr, w8, eq
	b	LBB0_11
LBB0_9:
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	and	w0, w22, w0, asr #31
LBB0_11:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,8,3                  ; @PAGE_MASK
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.no_dead_strip	_buffer_op
.subsections_via_symbols
