	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_remove_pd_bp              ## -- Begin function i40e_remove_pd_bp
	.p2align	4, 0x90
_i40e_remove_pd_bp:                     ## @i40e_remove_pd_bp
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	_I40E_HMC_PD_CNT_IN_SD@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rdx, %rax
	orq	%rcx, %rax
	shrq	$32, %rax
	je	LBB0_8
## %bb.1:
	movq	%r15, %rax
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %rbx
	cmpq	(%rsi), %rbx
	jae	LBB0_9
LBB0_2:
	movq	8(%rsi), %rcx
	movq	_I40E_SD_TYPE_PAGED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rbx, %r14
	shlq	$5, %r14
	cmpq	(%rcx,%r14), %rax
	jne	LBB0_10
## %bb.3:
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movq	24(%rcx,%r14), %r13
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r12
	shlq	$5, %r12
	leaq	(%r12,%r13), %rdi
	addq	$8, %rdi
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	callq	_I40E_DEC_BP_REFCNT
	cmpq	$0, 16(%r13,%r12)
	jne	LBB0_7
## %bb.4:
	movq	%r13, %rax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	leaq	(%r14,%r13), %rdi
	addq	$8, %rdi
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$0, (%rax,%r12)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_I40E_DEC_PD_REFCNT
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	shlq	$2, %rdi
	addq	16(%r13,%r14), %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_I40E_INVALIDATE_PF_HMC_PD
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 24(%rax,%r12)
	je	LBB0_13
LBB0_5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, 12(%rax,%r14)
	jne	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_i40e_free_virt_mem
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_12
LBB0_8:
	movl	%r15d, %eax
	xorl	%edx, %edx
	divl	%ecx
                                        ## kill: def $edx killed $edx def $rdx
	movl	%eax, %ebx
	cmpq	(%rsi), %rbx
	jb	LBB0_2
LBB0_9:
	movq	_I40E_ERR_INVALID_PAGE_DESC_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_11
LBB0_10:
	movq	_I40E_ERR_INVALID_SD_TYPE@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	leaq	L_.str.1(%rip), %rsi
LBB0_11:
	callq	_hw_dbg
LBB0_12:
	movq	%rbx, %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_i40e_free_dma_mem
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_12
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_I40E_HMC_PD_CNT_IN_SD,8,3      ## @I40E_HMC_PD_CNT_IN_SD
	.comm	_I40E_ERR_INVALID_PAGE_DESC_INDEX,8,3 ## @I40E_ERR_INVALID_PAGE_DESC_INDEX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i40e_remove_pd_bp: bad idx\n"

	.comm	_I40E_SD_TYPE_PAGED,8,3         ## @I40E_SD_TYPE_PAGED
	.comm	_I40E_ERR_INVALID_SD_TYPE,8,3   ## @I40E_ERR_INVALID_SD_TYPE
L_.str.1:                               ## @.str.1
	.asciz	"i40e_remove_pd_bp: wrong sd_entry type\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_i40e_remove_pd_bp              ; -- Begin function i40e_remove_pd_bp
	.p2align	2
_i40e_remove_pd_bp:                     ; @i40e_remove_pd_bp
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _I40E_HMC_PD_CNT_IN_SD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I40E_HMC_PD_CNT_IN_SD@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	udiv	x20, x2, x8
	ldr	x9, [x1]
	cmp	x20, x9
	b.hs	LBB0_7
; %bb.1:
Lloh3:
	adrp	x9, _I40E_SD_TYPE_PAGED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I40E_SD_TYPE_PAGED@GOTPAGEOFF]
	ldr	x24, [x1, #8]
Lloh5:
	ldr	x9, [x9]
	lsl	x10, x20, #5
	ldr	x10, [x24, x10]
	cmp	x9, x10
	b.ne	LBB0_8
; %bb.2:
	mov	x21, x2
	msub	x26, x20, x8, x2
	add	x27, x24, x20, lsl #5
	ldr	x8, [x27, #24]
	add	x25, x8, x26, lsl #5
	add	x23, x25, #8
	mov	x0, x23
	bl	_I40E_DEC_BP_REFCNT
	ldr	x8, [x25, #16]
	cbnz	x8, LBB0_6
; %bb.3:
	add	x22, x27, #8
	str	wzr, [x25]
	mov	x0, x22
	bl	_I40E_DEC_PD_REFCNT
	ldr	x8, [x27, #16]
	add	x0, x8, x26, lsl #2
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_I40E_INVALIDATE_PF_HMC_PD
	ldr	w8, [x25, #24]
	cbz	w8, LBB0_11
LBB0_4:
	add	x8, x24, x20, lsl #5
	ldr	w8, [x8, #12]
	cbnz	w8, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x22
	bl	_i40e_free_virt_mem
LBB0_6:
	mov	x21, #0
	b	LBB0_10
LBB0_7:
Lloh6:
	adrp	x8, _I40E_ERR_INVALID_PAGE_DESC_INDEX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _I40E_ERR_INVALID_PAGE_DESC_INDEX@GOTPAGEOFF]
Lloh8:
	ldr	x21, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh11:
	adrp	x8, _I40E_ERR_INVALID_SD_TYPE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _I40E_ERR_INVALID_SD_TYPE@GOTPAGEOFF]
Lloh13:
	ldr	x21, [x8]
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_hw_dbg
LBB0_10:
	mov	x0, x21
	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_11:
	mov	x0, x19
	mov	x1, x23
	bl	_i40e_free_dma_mem
	mov	x21, x0
	cbnz	x0, LBB0_10
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_I40E_HMC_PD_CNT_IN_SD,8,3      ; @I40E_HMC_PD_CNT_IN_SD
	.comm	_I40E_ERR_INVALID_PAGE_DESC_INDEX,8,3 ; @I40E_ERR_INVALID_PAGE_DESC_INDEX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i40e_remove_pd_bp: bad idx\n"

	.comm	_I40E_SD_TYPE_PAGED,8,3         ; @I40E_SD_TYPE_PAGED
	.comm	_I40E_ERR_INVALID_SD_TYPE,8,3   ; @I40E_ERR_INVALID_SD_TYPE
l_.str.1:                               ; @.str.1
	.asciz	"i40e_remove_pd_bp: wrong sd_entry type\n"

.subsections_via_symbols
