	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_pci_init                ## -- Begin function mantis_pci_init
	.p2align	4, 0x90
_mantis_pci_init:                       ## @mantis_pci_init
	.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	%rdi, %r14
	movq	16(%rdi), %r13
	movq	32(%rdi), %r15
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	4(%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	8(%r15), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	24(%r13), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	movl	16(%r13), %edi
	callq	_PCI_SLOT
	movl	%eax, %r12d
	movq	16(%r14), %rax
	movl	16(%rax), %edi
	callq	_PCI_FUNC
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rdx
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	xorl	%esi, %esi
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-56(%rbp), %r9d                 ## 4-byte Reload
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r12
	callq	_dprintk
	addq	$16, %rsp
	movq	%r13, %rdi
	callq	_pci_enable_device
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	subl	(%rcx), %r15d
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rdx
	movl	$1, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	jmp	LBB0_13
LBB0_2:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_MANTIS_ERROR@GOTPCREL(%rip), %r12
	movl	$32, %edi
	callq	_DMA_BIT_MASK
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_pci_set_consistent_dma_mask
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movq	%r12, %rbx
	movl	(%r12), %edi
	leaq	L_.str.2(%rip), %rdx
	xorl	%r15d, %r15d
	movl	$1, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_4:
	movq	%r13, %rdi
	callq	_pci_set_master
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_request_mem_region
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	xorl	%r15d, %r15d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, %ebx
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_ioremap
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	_PCI_LATENCY_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-64(%rbp), %rdx
	movq	%r13, %rdi
	callq	_pci_read_config_byte
	movl	-64(%rbp), %eax
	movl	%eax, 8(%r14)
	movl	12(%r13), %ecx
	movl	%ecx, 24(%r14)
	movq	%r12, %rbx
	movl	(%r12), %edi
	movq	16(%r14), %rax
	movl	4(%rax), %r9d
	movl	8(%rax), %r8d
	leaq	L_.str.5(%rip), %rdx
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r12), %edi
	movq	16(%r14), %rax
	movl	(%rax), %ecx
	movl	8(%r14), %r8d
	movl	(%r14), %r10d
	movl	4(%r14), %r9d
	subq	$8, %rsp
	leaq	L_.str.6(%rip), %rdx
	xorl	%esi, %esi
	xorl	%eax, %eax
	pushq	%r10
	callq	_dprintk
	addq	$16, %rsp
	movl	(%r13), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %r8
	callq	_request_irq
	testl	%eax, %eax
	je	LBB0_15
## %bb.9:
	movl	(%rbx), %edi
	leaq	L_.str.7(%rip), %rdx
	movl	$1, %esi
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	(%rbx), %edi
	leaq	L_.str.8(%rip), %rdx
	movl	$1, %esi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movl	(%r14), %edi
	testl	%edi, %edi
	je	LBB0_11
## %bb.10:
	callq	_iounmap
	jmp	LBB0_11
LBB0_5:
	movq	%r12, %rbx
	movl	(%r12), %edi
	leaq	L_.str.3(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_12
LBB0_7:
	movq	%r12, %rbx
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rdx
	movl	$1, %esi
	xorl	%eax, %eax
	callq	_dprintk
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_11:
	movl	(%rbx), %edi
	leaq	L_.str.9(%rip), %rdx
	movl	$1, %esi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_start
	movl	%eax, %r14d
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_pci_resource_len
	movl	%r14d, %edi
	movl	%eax, %esi
	callq	_release_mem_region
LBB0_12:
	movl	(%rbx), %edi
	leaq	L_.str.10(%rip), %rdx
	movl	$1, %esi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
	movq	%r13, %rdi
	callq	_pci_disable_device
LBB0_13:
	movl	(%rbx), %edi
	leaq	L_.str.11(%rip), %rdx
	movl	$1, %esi
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_dprintk
LBB0_14:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_pci_set_drvdata
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_MANTIS_ERROR,4,2               ## @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"found a %s PCI %s device on (%02x:%02x.%x),\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"ERROR: PCI enable failed <%i>"

L_.str.2:                               ## @.str.2
	.asciz	"ERROR: Unable to obtain 32 bit DMA <%i>"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
L_.str.3:                               ## @.str.3
	.asciz	"ERROR: BAR0 Request failed !"

L_.str.4:                               ## @.str.4
	.asciz	"ERROR: BAR0 remap failed !"

	.comm	_PCI_LATENCY_TIMER,4,2          ## @PCI_LATENCY_TIMER
L_.str.5:                               ## @.str.5
	.asciz	"    Mantis Rev %d [%04x:%04x], "

L_.str.6:                               ## @.str.6
	.asciz	"irq: %d, latency: %d\n    memory: 0x%lx, mmio: 0x%p\n"

	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
L_.str.7:                               ## @.str.7
	.asciz	"ERROR: IRQ registration failed ! <%d>"

L_.str.8:                               ## @.str.8
	.asciz	"ERROR: <%d> I/O unmap"

L_.str.9:                               ## @.str.9
	.asciz	"ERROR: <%d> releasing regions"

L_.str.10:                              ## @.str.10
	.asciz	"ERROR: <%d> disabling device"

L_.str.11:                              ## @.str.11
	.asciz	"ERROR: <%d> exiting"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mantis_pci_init                ; -- Begin function mantis_pci_init
	.p2align	2
_mantis_pci_init:                       ; @mantis_pci_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	mov	x20, x0
	ldr	x24, [x0, #32]
	ldr	x19, [x0, #16]
Lloh0:
	adrp	x23, _MANTIS_ERROR@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MANTIS_ERROR@GOTPAGEOFF]
	ldr	w21, [x23]
	ldr	x8, [x19, #24]
	ldr	w0, [x19, #16]
	ldp	w26, w25, [x24, #4]
	ldr	w27, [x8]
	bl	_PCI_SLOT
	mov	x22, x0
	ldr	x8, [x20, #16]
	ldr	w0, [x8, #16]
	bl	_PCI_FUNC
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x22, x0, [sp, #24]
	stp	x26, x27, [sp, #8]
	str	x25, [sp]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	mov	w1, #0
	bl	_dprintk
	mov	x0, x19
	bl	_pci_enable_device
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_2
; %bb.1:
Lloh4:
	adrp	x8, _ENODEV@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	w8, [x23]
	str	x0, [sp]
Lloh7:
	adrp	x2, l_.str.1@PAGE
Lloh8:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x8
	mov	w1, #1
	bl	_dprintk
	b	LBB0_6
LBB0_2:
	mov	w0, #32
	bl	_DMA_BIT_MASK
	mov	x1, x0
	mov	x0, x19
	bl	_pci_set_consistent_dma_mask
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_8
; %bb.3:
	ldr	w8, [x23]
	str	x0, [sp]
Lloh9:
	adrp	x2, l_.str.2@PAGE
Lloh10:
	add	x2, x2, l_.str.2@PAGEOFF
	mov	x0, x8
	mov	w1, #1
	bl	_dprintk
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_5:
	ldr	w0, [x23]
	mov	x8, x21
	str	x8, [sp]
Lloh13:
	adrp	x2, l_.str.10@PAGE
Lloh14:
	add	x2, x2, l_.str.10@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	x0, x19
	bl	_pci_disable_device
LBB0_6:
	ldr	w0, [x23]
	mov	x8, x21
	str	x8, [sp]
Lloh15:
	adrp	x2, l_.str.11@PAGE
Lloh16:
	add	x2, x2, l_.str.11@PAGEOFF
	mov	w1, #1
	bl	_dprintk
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_8:
	mov	x0, x19
	bl	_pci_set_master
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_start
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_len
	mov	x1, x0
Lloh17:
	adrp	x22, _DRIVER_NAME@GOTPAGE
Lloh18:
	ldr	x22, [x22, _DRIVER_NAME@GOTPAGEOFF]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_request_mem_region
	cbz	w0, LBB0_13
; %bb.9:
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_start
	mov	x21, x0
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_len
	mov	x1, x0
	mov	x0, x21
	bl	_ioremap
	str	w0, [x20]
	cbz	w0, LBB0_14
; %bb.10:
Lloh19:
	adrp	x8, _PCI_LATENCY_TIMER@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PCI_LATENCY_TIMER@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	add	x2, sp, #44
	mov	x0, x19
	bl	_pci_read_config_byte
	ldr	w8, [sp, #44]
	str	w8, [x20, #8]
	ldr	w8, [x19, #12]
	str	w8, [x20, #24]
	ldr	w0, [x23]
	ldr	x9, [x20, #16]
	ldp	w9, w10, [x9, #4]
	stp	x10, x9, [sp, #8]
	str	x8, [sp]
Lloh22:
	adrp	x2, l_.str.5@PAGE
Lloh23:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	w1, #0
	bl	_dprintk
	ldr	w0, [x23]
	ldr	x8, [x20, #16]
	ldr	w8, [x8]
	ldp	w10, w9, [x20, #4]
	ldr	w11, [x20]
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
Lloh24:
	adrp	x2, l_.str.6@PAGE
Lloh25:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	w1, #0
	bl	_dprintk
	ldr	w0, [x19]
	ldr	w1, [x24]
Lloh26:
	adrp	x8, _IRQF_SHARED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _IRQF_SHARED@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	ldr	w3, [x22]
	mov	x4, x20
	bl	_request_irq
                                        ; kill: def $w0 killed $w0 def $x0
	cbz	w0, LBB0_16
; %bb.11:
	ldr	w8, [x23]
	str	x0, [sp]
Lloh29:
	adrp	x2, l_.str.7@PAGE
Lloh30:
	add	x2, x2, l_.str.7@PAGEOFF
	mov	x0, x8
	mov	w1, #1
	bl	_dprintk
Lloh31:
	adrp	x8, _ENODEV@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w21, w8
	ldr	w0, [x23]
	mov	x8, x21
	str	x8, [sp]
Lloh34:
	adrp	x2, l_.str.8@PAGE
Lloh35:
	add	x2, x2, l_.str.8@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	ldr	w0, [x20]
	cbz	w0, LBB0_15
; %bb.12:
	bl	_iounmap
	b	LBB0_15
LBB0_13:
	ldr	w0, [x23]
Lloh36:
	adrp	x2, l_.str.3@PAGE
Lloh37:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh38:
	adrp	x8, _ENODEV@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_4
LBB0_14:
	ldr	w0, [x23]
Lloh40:
	adrp	x2, l_.str.4@PAGE
Lloh41:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	w1, #1
	bl	_dprintk
Lloh42:
	adrp	x8, _ENODEV@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_15:
	ldr	w0, [x23]
	str	x21, [sp]
Lloh45:
	adrp	x2, l_.str.9@PAGE
Lloh46:
	add	x2, x2, l_.str.9@PAGEOFF
	mov	w1, #1
	bl	_dprintk
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_start
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	bl	_pci_resource_len
	mov	x1, x0
	mov	x0, x20
	bl	_release_mem_region
	b	LBB0_5
LBB0_16:
	mov	x0, x19
	mov	x1, x20
	bl	_pci_set_drvdata
	mov	w21, #0
	b	LBB0_7
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.cfi_endproc
                                        ; -- End function
	.comm	_MANTIS_ERROR,4,2               ; @MANTIS_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"found a %s PCI %s device on (%02x:%02x.%x),\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"ERROR: PCI enable failed <%i>"

l_.str.2:                               ; @.str.2
	.asciz	"ERROR: Unable to obtain 32 bit DMA <%i>"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
l_.str.3:                               ; @.str.3
	.asciz	"ERROR: BAR0 Request failed !"

l_.str.4:                               ; @.str.4
	.asciz	"ERROR: BAR0 remap failed !"

	.comm	_PCI_LATENCY_TIMER,4,2          ; @PCI_LATENCY_TIMER
l_.str.5:                               ; @.str.5
	.asciz	"    Mantis Rev %d [%04x:%04x], "

l_.str.6:                               ; @.str.6
	.asciz	"irq: %d, latency: %d\n    memory: 0x%lx, mmio: 0x%p\n"

	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
l_.str.7:                               ; @.str.7
	.asciz	"ERROR: IRQ registration failed ! <%d>"

l_.str.8:                               ; @.str.8
	.asciz	"ERROR: <%d> I/O unmap"

l_.str.9:                               ; @.str.9
	.asciz	"ERROR: <%d> releasing regions"

l_.str.10:                              ; @.str.10
	.asciz	"ERROR: <%d> disabling device"

l_.str.11:                              ; @.str.11
	.asciz	"ERROR: <%d> exiting"

.subsections_via_symbols
