	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_qplib_alloc_dpi_tbl
_bnxt_qplib_alloc_dpi_tbl:              ## @bnxt_qplib_alloc_dpi_tbl
	.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, %r15
	movq	_RCFW_DBR_PCI_BAR_REGION@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	cmpl	$0, 8(%rsi)
	movq	(%rdi), %rdi
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_err
	movq	_EALREADY@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_2:
	movl	%edx, %r12d
	movq	%rsi, %r14
	movl	%ebx, %esi
	callq	_pci_resource_start
	movq	(%r15), %rdi
	testl	%eax, %eax
	je	LBB0_6
## %bb.3:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %esi
	callq	_pci_resource_len
	movl	%eax, %r13d
	subl	%r12d, %r13d
	je	LBB0_5
## %bb.4:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	decl	%eax
	testl	%r13d, %eax
	je	LBB0_12
LBB0_5:
	movq	(%r15), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r13d, %edx
	jmp	LBB0_8
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
LBB0_7:
	movl	%ebx, %edx
LBB0_8:
	callq	_dev_err
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	addl	%r12d, %eax
	movl	%eax, %r12d
	movl	%eax, %edi
	movl	%r13d, %esi
	callq	_ioremap_nocache
	movl	%eax, 8(%r14)
	testl	%eax, %eax
	je	LBB0_16
## %bb.13:
	movl	%r12d, (%r14)
	movl	%r13d, %eax
	cltd
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	idivl	(%rcx)
	movl	%eax, 4(%r14)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_kcalloc
	movq	%rax, 24(%r14)
	testq	%rax, %rax
	je	LBB0_18
## %bb.14:
	movl	4(%r14), %eax
	movl	%eax, %ecx
	sarl	$3, %ecx
	cmpl	$8, %eax
	movl	$1, %ebx
	cmovael	%ecx, %ebx
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_kmalloc
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_17
## %bb.15:
	movq	%rax, %rdi
	movl	$255, %esi
	movl	%ebx, %edx
	callq	_memset
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_16:
	movq	(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_7
LBB0_17:
	movq	24(%r14), %rdi
	callq	_kfree
	movq	$0, 24(%r14)
LBB0_18:
	movq	(%r15), %rdi
	movl	8(%r14), %esi
	callq	_pci_iounmap
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_RCFW_DBR_PCI_BAR_REGION,4,2    ## @RCFW_DBR_PCI_BAR_REGION
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DBR BAR region %d already mapped\n"

	.comm	_EALREADY,4,2                   ## @EALREADY
L_.str.1:                               ## @.str.1
	.asciz	"BAR region %d resc start failed\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Invalid DBR length %d\n"

L_.str.3:                               ## @.str.3
	.asciz	"FP: DBR BAR region %d mapping failed\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_bnxt_qplib_alloc_dpi_tbl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_qplib_alloc_dpi_tbl
_bnxt_qplib_alloc_dpi_tbl:              ; @bnxt_qplib_alloc_dpi_tbl
	.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, x0
Lloh0:
	adrp	x8, _RCFW_DBR_PCI_BAR_REGION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RCFW_DBR_PCI_BAR_REGION@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	ldr	w8, [x1, #8]
	ldr	x0, [x0]
	cbz	w8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
Lloh5:
	adrp	x8, _EALREADY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EALREADY@GOTPAGEOFF]
	b	LBB0_10
LBB0_2:
	mov	x22, x2
	mov	x20, x1
	mov	x1, x21
	bl	_pci_resource_start
	mov	x24, x0
	ldr	x0, [x19]
	cbz	w24, LBB0_6
; %bb.3:
	mov	x1, x21
	bl	_pci_resource_len
	subs	w23, w0, w22
	b.eq	LBB0_5
; %bb.4:
Lloh7:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh8:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x25]
	sub	w8, w8, #1
	tst	w8, w23
	b.eq	LBB0_12
LBB0_5:
	ldr	x0, [x19]
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x23
	b	LBB0_8
LBB0_6:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	mov	x2, x21
LBB0_8:
	bl	_dev_err
LBB0_9:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
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
LBB0_12:
	add	w22, w24, w22
	mov	x0, x22
	mov	x1, x23
	bl	_ioremap_nocache
	str	w0, [x20, #8]
	cbz	w0, LBB0_16
; %bb.13:
	str	w22, [x20]
	ldr	w8, [x25]
	sdiv	w0, w23, w8
	str	w0, [x20, #4]
Lloh15:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh16:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	w1, #8
	bl	_kcalloc
	str	x0, [x20, #24]
	cbz	x0, LBB0_18
; %bb.14:
	ldr	w8, [x20, #4]
	asr	w9, w8, #3
	cmp	w8, #8
	csinc	w21, w9, wzr, hs
	ldr	w1, [x22]
	mov	x0, x21
	bl	_kmalloc
	str	x0, [x20, #16]
	cbz	x0, LBB0_17
; %bb.15:
	mov	w1, #255
	mov	x2, x21
	bl	_memset
	mov	w0, #0
	b	LBB0_11
LBB0_16:
	ldr	x0, [x19]
Lloh17:
	adrp	x1, l_.str.3@PAGE
Lloh18:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_7
LBB0_17:
	ldr	x0, [x20, #24]
	bl	_kfree
	str	xzr, [x20, #24]
LBB0_18:
	ldr	x0, [x19]
	ldr	w1, [x20, #8]
	bl	_pci_iounmap
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_RCFW_DBR_PCI_BAR_REGION,4,2    ; @RCFW_DBR_PCI_BAR_REGION
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DBR BAR region %d already mapped\n"

	.comm	_EALREADY,4,2                   ; @EALREADY
l_.str.1:                               ; @.str.1
	.asciz	"BAR region %d resc start failed\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Invalid DBR length %d\n"

l_.str.3:                               ; @.str.3
	.asciz	"FP: DBR BAR region %d mapping failed\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_bnxt_qplib_alloc_dpi_tbl
.subsections_via_symbols
