	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ilo_map_device
_ilo_map_device:                        ## @ilo_map_device
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movl	$1, %esi
	xorl	%edx, %edx
	callq	_pci_iomap
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	cmpl	$228, (%rbx)
	jne	LBB0_3
## %bb.4:
	movl	$5, %r15d
	movq	%rbx, %rdi
	movl	$5, %esi
	callq	_pci_resource_len
	addl	$-8192, %eax                    ## imm = 0xE000
	movslq	%eax, %rdx
	jmp	LBB0_5
LBB0_1:
	addq	$4, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	jmp	LBB0_10
LBB0_3:
	movl	$2, %r15d
	xorl	%edx, %edx
LBB0_5:
	movq	_max_ccb@GOTPCREL(%rip), %r12
	movq	_ILOHW_CCB_SZ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	imull	(%r12), %ecx
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_pci_iomap_range
	movq	%rax, 8(%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	_ONE_DB_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	imull	(%r12), %edx
	movq	%rbx, %rdi
	movl	$3, %esi
	callq	_pci_iomap
	movq	%rax, %rcx
	movq	%rax, 16(%r14)
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jne	LBB0_11
## %bb.8:
	leaq	4(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	8(%r14), %rsi
	movq	%rbx, %rdi
	callq	_pci_iounmap
	jmp	LBB0_9
LBB0_6:
	leaq	4(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_9:
	movq	(%r14), %rsi
	movq	%rbx, %rdi
	callq	_pci_iounmap
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error mapping mmio\n"

	.comm	_max_ccb,4,2                    ## @max_ccb
	.comm	_ILOHW_CCB_SZ,4,2               ## @ILOHW_CCB_SZ
L_.str.1:                               ## @.str.1
	.asciz	"Error mapping shared mem\n"

	.comm	_ONE_DB_SIZE,4,2                ## @ONE_DB_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"Error mapping doorbell\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ilo_map_device
_ilo_map_device:                        ; @ilo_map_device
	.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	x20, x1
	mov	x19, x0
	mov	w1, #1
	mov	w2, #0
	bl	_pci_iomap
	str	x0, [x20]
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, #228
	b.ne	LBB0_4
; %bb.2:
	mov	w21, #5
	mov	x0, x19
	mov	w1, #5
	bl	_pci_resource_len
	sub	w8, w0, #2, lsl #12             ; =8192
	sxtw	x2, w8
	b	LBB0_5
LBB0_3:
	add	x0, x19, #4
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_11
LBB0_4:
	mov	x2, #0
	mov	w21, #2
LBB0_5:
Lloh2:
	adrp	x22, _max_ccb@GOTPAGE
Lloh3:
	ldr	x22, [x22, _max_ccb@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh4:
	adrp	x9, _ILOHW_CCB_SZ@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ILOHW_CCB_SZ@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	mul	w3, w9, w8
	mov	x0, x19
	mov	x1, x21
	bl	_pci_iomap_range
	str	x0, [x20, #8]
	cbz	x0, LBB0_8
; %bb.6:
	ldr	w8, [x22]
Lloh7:
	adrp	x9, _ONE_DB_SIZE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _ONE_DB_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	mul	w2, w9, w8
	mov	x0, x19
	mov	w1, #3
	bl	_pci_iomap
	str	x0, [x20, #16]
	cbz	x0, LBB0_9
; %bb.7:
	mov	w0, #0
	b	LBB0_12
LBB0_8:
	add	x0, x19, #4
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_10
LBB0_9:
	add	x0, x19, #4
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	x1, [x20, #8]
	mov	x0, x19
	bl	_pci_iounmap
LBB0_10:
	ldr	x1, [x20]
	mov	x0, x19
	bl	_pci_iounmap
LBB0_11:
Lloh14:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error mapping mmio\n"

	.comm	_max_ccb,4,2                    ; @max_ccb
	.comm	_ILOHW_CCB_SZ,4,2               ; @ILOHW_CCB_SZ
l_.str.1:                               ; @.str.1
	.asciz	"Error mapping shared mem\n"

	.comm	_ONE_DB_SIZE,4,2                ; @ONE_DB_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"Error mapping doorbell\n"

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