	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nfp6000_area_acquire
_nfp6000_area_acquire:                  ## @nfp6000_area_acquire
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_nfp_cpp_area_cpp
	movl	%eax, %edi
	callq	_nfp_cpp_priv
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_nfp_cpp_area_priv
	cmpq	$0, 8(%rax)
	je	LBB0_1
LBB0_13:
	movq	%r15, %rdi
	callq	_priv_area_get
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%rax, %r12
	movl	76(%rax), %esi
	movl	84(%rax), %edx
	movl	72(%rax), %ecx
	movl	(%rax), %r8d
	movq	24(%rax), %r9
	movl	80(%rax), %eax
	movq	%r14, %rdi
	pushq	$1
	pushq	%rax
	callq	_nfp_alloc_bar
	addq	$16, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_14
## %bb.2:
	movl	%ebx, %edi
	shlq	$4, %rdi
	addq	8(%r14), %rdi
	movq	%rdi, 8(%r12)
	callq	_nfp_bar_maptype
	movq	_NFP_PCIE_BAR_PCIE2CPP_MapType_GENERAL@GOTPCREL(%rip), %rcx
	movl	(%r12), %ebx
	movq	8(%r12), %rdi
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	callq	_NFP_PCIE_P2C_GENERAL_SIZE
	decl	%eax
	andl	%ebx, %eax
	movl	%eax, 4(%r12)
	movq	8(%r12), %rdi
	movl	76(%r12), %esi
	callq	_NFP_PCIE_P2C_GENERAL_TARGET_OFFSET
	addl	%eax, 4(%r12)
	movq	8(%r12), %rdi
	movl	72(%r12), %esi
	callq	_NFP_PCIE_P2C_GENERAL_TOKEN_OFFSET
	addl	%eax, 4(%r12)
	movq	8(%r12), %rdi
	jmp	LBB0_5
LBB0_4:
	andl	(%rdi), %ebx
	movl	%ebx, 4(%r12)
LBB0_5:
	callq	_nfp_bar_resource_start
	movslq	4(%r12), %rcx
	addq	%rax, %rcx
	movq	%rcx, 32(%r12)
	movq	%r15, %rdi
	callq	_nfp_cpp_area_name
	movl	%eax, 64(%r12)
	movq	32(%r12), %rdi
	movq	%rdi, 48(%r12)
	movq	8(%r12), %rax
	movq	24(%r12), %rsi
	leaq	-1(%rdi,%rsi), %rcx
	movq	%rcx, 56(%r12)
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 40(%r12)
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movslq	4(%r12), %rcx
	leaq	(%rax,%rcx,4), %rdi
	jmp	LBB0_8
LBB0_7:
	callq	_ioremap_nocache
	movq	%rax, %rdi
LBB0_8:
	movq	%rdi, 16(%r12)
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	je	LBB0_13
## %bb.9:
	movl	(%r14), %edi
	movl	24(%r12), %edx
	movq	8(%r12), %rax
	movl	4(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	16(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.11:
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movq	$0, 16(%r12)
	movq	8(%r12), %rsi
	movq	%r14, %rdi
	callq	_nfp_bar_put
	movq	$0, 8(%r12)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_NFP_PCIE_BAR_PCIE2CPP_MapType_GENERAL,8,3 ## @NFP_PCIE_BAR_PCIE2CPP_MapType_GENERAL
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Can't ioremap() a %d byte region of BAR %d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_nfp6000_area_acquire
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nfp6000_area_acquire
_nfp6000_area_acquire:                  ; @nfp6000_area_acquire
	.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	x21, x0
	bl	_nfp_cpp_area_cpp
	bl	_nfp_cpp_priv
	mov	x19, x0
	mov	x0, x21
	bl	_nfp_cpp_area_priv
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_3
LBB0_1:
	mov	x0, x21
	bl	_priv_area_get
	mov	w22, #0
LBB0_2:
	mov	x0, x22
	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
LBB0_3:
	mov	x20, x0
	ldp	w3, w1, [x0, #72]
	ldr	w4, [x0]
	ldr	x5, [x0, #24]
	ldp	w6, w2, [x0, #80]
	mov	x0, x19
	mov	w7, #1
	bl	_nfp_alloc_bar
	mov	x22, x0
	tbnz	w0, #31, LBB0_2
; %bb.4:
	ldr	x8, [x19, #8]
	add	x0, x8, w22, uxtw #4
	str	x0, [x20, #8]
	bl	_nfp_bar_maptype
	mov	x8, x0
Lloh0:
	adrp	x9, _NFP_PCIE_BAR_PCIE2CPP_MapType_GENERAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NFP_PCIE_BAR_PCIE2CPP_MapType_GENERAL@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	ldr	w22, [x20]
	ldr	x0, [x20, #8]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	bl	_NFP_PCIE_P2C_GENERAL_SIZE
	sub	w8, w0, #1
	and	w8, w8, w22
	str	w8, [x20, #4]
	ldr	x0, [x20, #8]
	ldr	w1, [x20, #76]
	bl	_NFP_PCIE_P2C_GENERAL_TARGET_OFFSET
	ldr	w8, [x20, #4]
	add	w8, w8, w0
	str	w8, [x20, #4]
	ldr	x0, [x20, #8]
	ldr	w1, [x20, #72]
	bl	_NFP_PCIE_P2C_GENERAL_TOKEN_OFFSET
	ldr	w8, [x20, #4]
	add	w8, w8, w0
	str	w8, [x20, #4]
	ldr	x0, [x20, #8]
	b	LBB0_7
LBB0_6:
	ldr	w8, [x0]
	and	w8, w8, w22
	str	w8, [x20, #4]
LBB0_7:
	bl	_nfp_bar_resource_start
	ldrsw	x8, [x20, #4]
	add	x8, x0, x8
	str	x8, [x20, #32]
	mov	x0, x21
	bl	_nfp_cpp_area_name
	str	w0, [x20, #64]
	ldp	x1, x0, [x20, #24]
	add	x8, x0, x1
	sub	x8, x8, #1
	stp	x0, x8, [x20, #48]
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #40]
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_9
; %bb.8:
	ldrsw	x9, [x20, #4]
	add	x0, x8, x9, lsl #2
	b	LBB0_10
LBB0_9:
	bl	_ioremap_nocache
LBB0_10:
	str	x0, [x20, #16]
	bl	_IS_ERR_OR_NULL
	cbz	x0, LBB0_1
; %bb.11:
	ldr	w0, [x19]
	ldr	w2, [x20, #24]
	ldr	x8, [x20, #8]
	ldr	w3, [x8, #4]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_13
; %bb.12:
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_14
LBB0_13:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_14:
	str	xzr, [x20, #16]
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_nfp_bar_put
	str	xzr, [x20, #8]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NFP_PCIE_BAR_PCIE2CPP_MapType_GENERAL,8,3 ; @NFP_PCIE_BAR_PCIE2CPP_MapType_GENERAL
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Can't ioremap() a %d byte region of BAR %d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_nfp6000_area_acquire
.subsections_via_symbols
