	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_setup_pbles
_i40iw_setup_pbles:                     ## @i40iw_setup_pbles
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	testl	%edx, %edx
	je	LBB0_5
## %bb.1:
	movq	%rdi, %rbx
	leaq	24(%r14), %r15
	callq	_mutex_lock
	leaq	8(%rbx), %rdi
	movl	4(%rbx), %esi
	movl	8(%r14), %ecx
	movq	%r15, %rdx
	callq	_i40iw_get_pble
	movl	%eax, %r15d
	movq	%rbx, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_9
LBB0_5:
	movq	_I40IW_LEVEL_1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	(%r14), %rsi
	movq	%r14, %rdi
	callq	_i40iw_copy_user_pgaddrs
	jmp	LBB0_8
LBB0_3:
	movl	$1, 16(%r14)
	movl	24(%r14), %edx
	movq	_I40IW_LEVEL_1@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_6
## %bb.4:
	leaq	40(%r14), %rax
	jmp	LBB0_7
LBB0_6:
	movq	32(%r14), %rax
LBB0_7:
	movq	(%rax), %rbx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i40iw_copy_user_pgaddrs
	movl	(%rbx), %eax
	movq	(%r14), %rcx
	movl	%eax, (%rcx)
LBB0_8:
	xorl	%eax, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I40IW_LEVEL_1,4,2              ## @I40IW_LEVEL_1
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_i40iw_setup_pbles
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_setup_pbles
_i40iw_setup_pbles:                     ; @i40iw_setup_pbles
	.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, x1
	cbz	w2, LBB0_3
; %bb.1:
	mov	x20, x0
	add	x21, x19, #24
	bl	_mutex_lock
	add	x0, x20, #8
	ldr	w1, [x20, #4]
	ldr	w3, [x19, #8]
	mov	x2, x21
	bl	_i40iw_get_pble
	mov	x21, x0
	mov	x0, x20
	bl	_mutex_unlock
	cbz	w21, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_3:
Lloh3:
	adrp	x8, _I40IW_LEVEL_1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_LEVEL_1@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	ldr	x1, [x19]
	mov	x0, x19
	bl	_i40iw_copy_user_pgaddrs
	mov	w0, #0
	b	LBB0_8
LBB0_4:
	mov	w8, #1
	str	w8, [x19, #16]
	ldr	w2, [x19, #24]
Lloh6:
	adrp	x8, _I40IW_LEVEL_1@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I40IW_LEVEL_1@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_6
; %bb.5:
	add	x8, x19, #40
	b	LBB0_7
LBB0_6:
	ldr	x8, [x19, #32]
LBB0_7:
	ldr	x20, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_i40iw_copy_user_pgaddrs
	mov	w0, #0
	ldr	w8, [x20]
	ldr	x9, [x19]
	str	w8, [x9]
LBB0_8:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_I40IW_LEVEL_1,4,2              ; @I40IW_LEVEL_1
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_i40iw_setup_pbles
.subsections_via_symbols
