	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ionic_map_bars
_ionic_map_bars:                        ## @ionic_map_bars
	.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
	movq	24(%rdi), %r12
	movq	8(%rdi), %r13
	movq	16(%rdi), %rax
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	$0, (%rdi)
	movq	_IONIC_BARS_MAX@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	je	LBB0_7
## %bb.1:
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%ebx, %ebx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	$0, 8(%r13,%r15,8)
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_pci_resource_start
	movl	%eax, 4(%r13,%r15,8)
	movl	%ebx, (%r13,%r15,8)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incq	(%rax)
	incl	%r14d
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incl	%ebx
	movq	_IONIC_BARS_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jae	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_pci_resource_flags
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_pci_resource_len
	movl	%r14d, %ecx
	leaq	(%rcx,%rcx,2), %r15
	movl	%eax, 16(%r13,%r15,8)
	testl	%r14d, %r14d
	jne	LBB0_4
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_pci_iomap
	movq	%rax, 8(%r13,%r15,8)
	testq	%rax, %rax
	jne	LBB0_5
## %bb.9:
	leaq	L_.str(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_7:
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IONIC_BARS_MAX,4,2             ## @IONIC_BARS_MAX
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Cannot memory-map BAR %d, aborting\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_ionic_map_bars
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ionic_map_bars
_ionic_map_bars:                        ; @ionic_map_bars
	.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
	ldp	x19, x21, [x0, #16]
	ldr	x23, [x0, #8]
	str	xzr, [x0]
Lloh0:
	adrp	x24, _IONIC_BARS_MAX@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IONIC_BARS_MAX@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x20, x0
	mov	w25, #0
	mov	w22, #0
Lloh2:
	adrp	x26, _IORESOURCE_MEM@GOTPAGE
Lloh3:
	ldr	x26, [x26, _IORESOURCE_MEM@GOTPAGEOFF]
	mov	w27, #24
	b	LBB0_5
LBB0_2:                                 ;   in Loop: Header=BB0_5 Depth=1
	madd	x8, x28, x27, x23
	str	xzr, [x8, #8]
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_pci_resource_start
	madd	x8, x28, x27, x23
	stp	w22, w0, [x8]
	ldr	x8, [x20]
	add	x8, x8, #1
	str	x8, [x20]
	add	w25, w25, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w22, w22, #1
	ldr	w8, [x24]
	cmp	w22, w8
	b.hs	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_pci_resource_flags
	ldr	w8, [x26]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x22
	bl	_pci_resource_len
	mov	w28, w25
	umaddl	x8, w25, w27, x23
	str	w0, [x8, #16]
	cbnz	w25, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x2, x0
	mov	x0, x21
	mov	x1, x22
	bl	_pci_iomap
	madd	x8, x28, x27, x23
	str	x0, [x8, #8]
	cbnz	x0, LBB0_3
; %bb.8:
Lloh4:
	adrp	x1, l_.str@PAGE
Lloh5:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	bl	_dev_err
Lloh6:
	adrp	x8, _ENODEV@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IONIC_BARS_MAX,4,2             ; @IONIC_BARS_MAX
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Cannot memory-map BAR %d, aborting\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_ionic_map_bars
.subsections_via_symbols
