	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function zbuf_setup
_zbuf_setup:                            ## @zbuf_setup
	.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	$0, (%rcx)
	movq	_PAGE_MASK@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	testl	%esi, %eax
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %r13
	testq	%rdx, %rax
	jne	LBB0_1
## %bb.3:
	movq	%rcx, %rbx
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r13, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_4
## %bb.5:
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rcx
	jmp	LBB0_6
LBB0_4:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $eax killed $eax def $rax
LBB0_6:
	movq	_BPF_MAX_PAGES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jbe	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_M_BPF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movq	_M_WAITOK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$40, %edi
	callq	_malloc
	movq	%rax, %r14
	movl	%r12d, (%rax)
	movq	%r13, 8(%rax)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r13, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_8
## %bb.9:
	movq	%r13, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rdi
	jmp	LBB0_10
LBB0_8:
	movl	%r13d, %eax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %edi
LBB0_10:
	movq	_M_ZERO@GOTPCREL(%rip), %rax
	movq	_M_BPF@GOTPCREL(%rip), %rcx
	movq	_M_WAITOK@GOTPCREL(%rip), %rdx
	movq	%rdi, 16(%r14)
	shll	$3, %edi
	movl	(%rcx), %esi
	movl	(%rdx), %edx
	orl	(%rax), %edx
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	movq	%rax, 32(%r14)
	cmpq	$0, 16(%r14)
	je	LBB0_11
## %bb.13:
	movq	%rbx, %r13
	movq	(%r15), %rax
	movq	(%rax), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	imull	%ebx, %esi
	addl	%r12d, %esi
	movq	%r15, %rdi
	callq	_zbuf_sfbuf_get
	movq	32(%r14), %rcx
	movq	%rax, (%rcx,%rbx,8)
	movq	32(%r14), %rax
	cmpq	$0, (%rax,%rbx,8)
	je	LBB0_16
## %bb.14:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	cmpq	%rbx, 16(%r14)
	ja	LBB0_15
	jmp	LBB0_12
LBB0_11:
	movq	%rbx, %r13
LBB0_12:
	movq	(%rax), %rdi
	callq	_sf_buf_kva
	movq	%rax, 24(%r14)
	movq	%rax, %rdi
	movl	$4, %esi
	callq	_bzero
	movq	%r14, (%r13)
	xorl	%ebx, %ebx
	jmp	LBB0_17
LBB0_16:
	movq	_EFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r14, %rdi
	callq	_zbuf_free
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,8,3                  ## @PAGE_SIZE
	.comm	_BPF_MAX_PAGES,8,3              ## @BPF_MAX_PAGES
	.comm	_M_BPF,4,2                      ## @M_BPF
	.comm	_M_ZERO,4,2                     ## @M_ZERO
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_zbuf_setup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function zbuf_setup
_zbuf_setup:                            ; @zbuf_setup
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	str	xzr, [x3]
Lloh0:
	adrp	x8, _PAGE_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_MASK@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	tst	w8, w1
	b.ne	LBB0_3
; %bb.1:
	mov	x23, x2
	tst	x8, x2
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x24, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PAGE_SIZE@GOTPAGEOFF]
	ldr	x8, [x24]
	udiv	x8, x23, x8
Lloh5:
	adrp	x9, _BPF_MAX_PAGES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BPF_MAX_PAGES@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ls	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
LBB0_4:
	mov	x0, x20
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x19, x3
	mov	x20, x1
	mov	x22, x0
Lloh11:
	adrp	x25, _M_BPF@GOTPAGE
Lloh12:
	ldr	x25, [x25, _M_BPF@GOTPAGEOFF]
Lloh13:
	adrp	x26, _M_ZERO@GOTPAGE
Lloh14:
	ldr	x26, [x26, _M_ZERO@GOTPAGEOFF]
	ldr	w1, [x25]
	ldr	w8, [x26]
Lloh15:
	adrp	x27, _M_WAITOK@GOTPAGE
Lloh16:
	ldr	x27, [x27, _M_WAITOK@GOTPAGEOFF]
	ldr	w9, [x27]
	orr	w2, w9, w8
	mov	w0, #40
	bl	_malloc
	mov	x21, x0
	str	w20, [x0]
	ldr	x8, [x24]
	udiv	x8, x23, x8
	stp	x23, x8, [x0, #8]
	lsl	w0, w8, #3
	ldr	w1, [x25]
	ldr	w8, [x26]
	ldr	w9, [x27]
	orr	w2, w9, w8
	bl	_malloc
	str	x0, [x21, #32]
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_9
; %bb.6:
	mov	x23, #0
	ldr	x8, [x22]
	ldr	x22, [x8]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	madd	w1, w23, w8, w20
	mov	x0, x22
	bl	_zbuf_sfbuf_get
	ldr	x8, [x21, #32]
	lsl	x9, x23, #3
	str	x0, [x8, x9]
	ldr	x0, [x21, #32]
	ldr	x8, [x0, x9]
	cbz	x8, LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x23, x23, #1
	ldr	x8, [x21, #16]
	cmp	x8, x23
	b.hi	LBB0_7
LBB0_9:
	ldr	x0, [x0]
	bl	_sf_buf_kva
	str	x0, [x21, #24]
	mov	w1, #4
	bl	_bzero
	mov	w20, #0
	str	x21, [x19]
	b	LBB0_4
LBB0_10:
Lloh17:
	adrp	x8, _EFAULT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
Lloh19:
	ldr	w20, [x8]
	mov	x0, x21
	bl	_zbuf_free
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,8,3                  ; @PAGE_SIZE
	.comm	_BPF_MAX_PAGES,8,3              ; @BPF_MAX_PAGES
	.comm	_M_BPF,4,2                      ; @M_BPF
	.comm	_M_ZERO,4,2                     ; @M_ZERO
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_zbuf_setup
.subsections_via_symbols
