	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function octeon_map_pci_barx
_octeon_map_pci_barx:                   ## @octeon_map_pci_barx
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %rdi
	leal	(%r15,%r15), %r14d
	movq	_DRV_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	callq	_pci_request_region
	movq	(%rbx), %rdi
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
	jmp	LBB0_6
LBB0_2:
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	movl	%r14d, %esi
	callq	_pci_resource_start
	movq	8(%rbx), %rcx
	movslq	%r15d, %r13
	leaq	(,%r13,4), %rdx
	leaq	(%rdx,%rdx,4), %r12
	movl	%eax, 16(%rcx,%r12)
	movq	(%rbx), %rdi
	movl	%r14d, %esi
	callq	_pci_resource_len
	movq	8(%rbx), %rcx
	movl	%eax, (%rcx,%r12)
	testl	%eax, %eax
	je	LBB0_5
## %bb.3:
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, %eax
	movl	%eax, %r13d
	cmovgl	%edx, %r13d
	testl	%edx, %edx
	cmovel	%eax, %r13d
	movl	16(%rcx,%r12), %edi
	movl	%r13d, %esi
	callq	_ioremap
	movq	8(%rbx), %rcx
	movl	%eax, 12(%rcx,%r12)
	movl	%r13d, 4(%rcx,%r12)
	movq	(%rbx), %rdi
	movl	(%rcx,%r12), %r9d
	movl	16(%rcx,%r12), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
	movl	%r13d, %r8d
	callq	_dev_dbg
	movq	8(%rbx), %rax
	cmpl	$0, 12(%rax,%r12)
	je	LBB0_4
## %bb.8:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rcx,4), %rcx
	movl	$1, 8(%rax,%rcx,4)
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	movq	(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_5:
	movq	(%rbx), %rdi
	movl	%r14d, %esi
	callq	_pci_release_region
LBB0_6:
	movl	$1, %eax
LBB0_7:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DRV_NAME,4,2                   ## @DRV_NAME
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pci_request_region failed for bar %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"BAR%d start: 0x%llx mapped %u of %u bytes\n"

L_.str.2:                               ## @.str.2
	.asciz	"error ioremap for bar %d\n"

	.no_dead_strip	_octeon_map_pci_barx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function octeon_map_pci_barx
_octeon_map_pci_barx:                   ; @octeon_map_pci_barx
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x22, x2
	mov	x19, x1
	mov	x21, x0
	ldr	x0, [x0]
	lsl	w20, w1, #1
Lloh0:
	adrp	x8, _DRV_NAME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DRV_NAME@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_pci_request_region
	mov	x8, x0
	ldr	x0, [x21]
	cbz	x8, LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_7
LBB0_2:
	mov	x1, x20
	bl	_pci_resource_start
	sxtw	x23, w19
	add	x8, x23, w19, sxtw #2
	lsl	x24, x8, #2
	ldp	x8, x9, [x21]
	add	x9, x9, x24
	str	w0, [x9, #16]
	mov	x0, x8
	mov	x1, x20
	bl	_pci_resource_len
	ldr	x8, [x21, #8]
	str	w0, [x8, x24]
	cbz	w0, LBB0_6
; %bb.3:
	cmp	w0, w22
	ccmp	w22, #0, #4, gt
	csel	w22, w22, w0, ne
	add	x9, x23, x23, lsl #2
	lsl	x24, x9, #2
	add	x8, x8, x24
	ldr	w0, [x8, #16]
	mov	x1, x22
	bl	_ioremap
	ldp	x8, x9, [x21]
	add	x9, x9, x24
	str	w0, [x9, #12]
	str	w22, [x9, #4]
	ldr	w3, [x9, #16]
	ldr	w5, [x9]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	mov	x2, x19
	mov	x4, x22
	bl	_dev_dbg
	ldr	x8, [x21, #8]
	add	x9, x8, x24
	ldr	w9, [x9, #12]
	cbz	w9, LBB0_5
; %bb.4:
	mov	w0, #0
	mov	w9, #20
	madd	x8, x23, x9, x8
	mov	w9, #1
	str	w9, [x8, #8]
	b	LBB0_8
LBB0_5:
	ldr	x0, [x21]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_6:
	ldr	x0, [x21]
	mov	x1, x20
	bl	_pci_release_region
LBB0_7:
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DRV_NAME,4,2                   ; @DRV_NAME
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pci_request_region failed for bar %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"BAR%d start: 0x%llx mapped %u of %u bytes\n"

l_.str.2:                               ; @.str.2
	.asciz	"error ioremap for bar %d\n"

	.no_dead_strip	_octeon_map_pci_barx
.subsections_via_symbols
