	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rcar_pcie_enable_msi
_rcar_pcie_enable_msi:                  ## @rcar_pcie_enable_msi
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	56(%rdi), %r14
	addq	$48, %rdi
	callq	_mutex_init
	leaq	24(%r12), %rcx
	movq	%r14, 40(%r12)
	movq	_rcar_msi_setup_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movq	_rcar_msi_setup_irqs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 28(%r12)
	movq	_rcar_msi_teardown_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r12)
	movl	(%r14), %edi
	movq	_INT_PCI_MSI_NR@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_msi_domain_ops@GOTPCREL(%rip), %rdx
	callq	_irq_domain_add_linear
	movl	%eax, 16(%r12)
	testl	%eax, %eax
	je	LBB0_12
## %bb.1:
	cmpl	$0, (%r15)
	jle	LBB0_5
## %bb.2:
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_irq_create_mapping
	cmpl	$2, (%r15)
	jl	LBB0_5
## %bb.3:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	16(%r12), %edi
	movl	%ebx, %esi
	callq	_irq_create_mapping
	incl	%ebx
	cmpl	(%r15), %ebx
	jl	LBB0_4
LBB0_5:
	movl	12(%r12), %esi
	movq	_rcar_pcie_msi_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	movq	_IRQF_NO_THREAD@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	orl	(%rax), %ecx
	movq	_rcar_msi_irq_chip@GOTPCREL(%rip), %rbx
	movl	(%rbx), %r8d
	movq	%r14, %rdi
	movq	%r12, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	8(%r12), %esi
	movq	_rcar_pcie_msi_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	movq	_IRQF_SHARED@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	(%rbx), %r8d
	movq	%r14, %rdi
	movq	%r12, %r9
	callq	_devm_request_irq
	testl	%eax, %eax
	js	LBB0_6
## %bb.8:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	___get_free_pages
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_9
## %bb.13:
	movq	%rax, %rdi
	callq	_virt_to_phys
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_lower_32_bits
	movq	_MSIFE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_PCIEMSIALR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_rcar_pci_write_reg
	movl	%ebx, %edi
	callq	_upper_32_bits
	movq	_PCIEMSIAUR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_rcar_pci_write_reg
	movq	_PCIEMSIIER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$-1, %esi
	callq	_rcar_pci_write_reg
	jmp	LBB0_11
LBB0_6:
	movl	%eax, %r15d
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_10
LBB0_12:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_11
LBB0_9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_10:
	movq	%r12, %rdi
	callq	_rcar_pcie_unmap_msi
LBB0_11:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_rcar_msi_setup_irq,4,2         ## @rcar_msi_setup_irq
	.comm	_rcar_msi_setup_irqs,4,2        ## @rcar_msi_setup_irqs
	.comm	_rcar_msi_teardown_irq,4,2      ## @rcar_msi_teardown_irq
	.comm	_INT_PCI_MSI_NR,4,2             ## @INT_PCI_MSI_NR
	.comm	_msi_domain_ops,4,2             ## @msi_domain_ops
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to create IRQ domain\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_rcar_pcie_msi_irq,4,2          ## @rcar_pcie_msi_irq
	.comm	_IRQF_SHARED,4,2                ## @IRQF_SHARED
	.comm	_IRQF_NO_THREAD,4,2             ## @IRQF_NO_THREAD
	.comm	_rcar_msi_irq_chip,4,2          ## @rcar_msi_irq_chip
L_.str.1:                               ## @.str.1
	.asciz	"failed to request IRQ: %d\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_MSIFE,4,2                      ## @MSIFE
	.comm	_PCIEMSIALR,4,2                 ## @PCIEMSIALR
	.comm	_PCIEMSIAUR,4,2                 ## @PCIEMSIAUR
	.comm	_PCIEMSIIER,4,2                 ## @PCIEMSIIER
	.no_dead_strip	_rcar_pcie_enable_msi
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rcar_pcie_enable_msi
_rcar_pcie_enable_msi:                  ; @rcar_pcie_enable_msi
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x0
	ldr	x20, [x0, #56]
	add	x0, x0, #48
	bl	_mutex_init
Lloh0:
	adrp	x8, _rcar_msi_teardown_irq@GOTPAGE
Lloh1:
	ldr	x8, [x8, _rcar_msi_teardown_irq@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x21, x19
	str	w8, [x21, #24]!
	str	x20, [x21, #16]
Lloh3:
	adrp	x8, _rcar_msi_setup_irq@GOTPAGE
Lloh4:
	ldr	x8, [x8, _rcar_msi_setup_irq@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _rcar_msi_setup_irqs@GOTPAGE
Lloh7:
	ldr	x9, [x9, _rcar_msi_setup_irqs@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w9, w8, [x21, #4]
	ldr	w0, [x20]
Lloh9:
	adrp	x22, _INT_PCI_MSI_NR@GOTPAGE
Lloh10:
	ldr	x22, [x22, _INT_PCI_MSI_NR@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh11:
	adrp	x2, _msi_domain_ops@GOTPAGE
Lloh12:
	ldr	x2, [x2, _msi_domain_ops@GOTPAGEOFF]
	mov	x3, x21
	bl	_irq_domain_add_linear
	stur	w0, [x21, #-8]
	cbz	w0, LBB0_9
; %bb.1:
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w1, #0
	bl	_irq_create_mapping
	ldr	w8, [x22]
	cmp	w8, #2
	b.lt	LBB0_5
; %bb.3:
	mov	w21, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #16]
	mov	x1, x21
	bl	_irq_create_mapping
	add	w21, w21, #1
	ldr	w8, [x22]
	cmp	w21, w8
	b.lt	LBB0_4
LBB0_5:
Lloh13:
	adrp	x22, _rcar_pcie_msi_irq@GOTPAGE
Lloh14:
	ldr	x22, [x22, _rcar_pcie_msi_irq@GOTPAGEOFF]
	ldr	w1, [x19, #12]
	ldr	w2, [x22]
Lloh15:
	adrp	x23, _IRQF_SHARED@GOTPAGE
Lloh16:
	ldr	x23, [x23, _IRQF_SHARED@GOTPAGEOFF]
Lloh17:
	adrp	x24, _IRQF_NO_THREAD@GOTPAGE
Lloh18:
	ldr	x24, [x24, _IRQF_NO_THREAD@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w3, w9, w8
Lloh19:
	adrp	x25, _rcar_msi_irq_chip@GOTPAGE
Lloh20:
	ldr	x25, [x25, _rcar_msi_irq_chip@GOTPAGEOFF]
	ldr	w4, [x25]
	mov	x0, x20
	mov	x5, x19
	bl	_devm_request_irq
	tbnz	w0, #31, LBB0_10
; %bb.6:
	ldr	w1, [x19, #8]
	ldr	w2, [x22]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w3, w9, w8
	ldr	w4, [x25]
	mov	x0, x20
	mov	x5, x19
	bl	_devm_request_irq
	tbnz	w0, #31, LBB0_11
; %bb.7:
Lloh21:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	mov	w1, #0
	bl	___get_free_pages
	str	x0, [x19]
	cbz	x0, LBB0_12
; %bb.8:
	bl	_virt_to_phys
	mov	x20, x0
	bl	_lower_32_bits
Lloh24:
	adrp	x8, _MSIFE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MSIFE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	orr	w1, w8, w0
Lloh27:
	adrp	x8, _PCIEMSIALR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PCIEMSIALR@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rcar_pci_write_reg
	mov	x0, x20
	bl	_upper_32_bits
	mov	x1, x0
Lloh30:
	adrp	x8, _PCIEMSIAUR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PCIEMSIAUR@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_rcar_pci_write_reg
Lloh33:
	adrp	x8, _PCIEMSIIER@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PCIEMSIIER@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #-1
	bl	_rcar_pci_write_reg
	mov	w21, #0
	b	LBB0_14
LBB0_9:
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh38:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_10:
	mov	x21, x0
	str	x21, [sp]
Lloh41:
	adrp	x1, l_.str.1@PAGE
Lloh42:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	b	LBB0_13
LBB0_11:
	mov	x21, x0
	str	x21, [sp]
Lloh43:
	adrp	x1, l_.str.1@PAGE
Lloh44:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	b	LBB0_13
LBB0_12:
Lloh45:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh46:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	mov	x0, x19
	bl	_rcar_pcie_unmap_msi
LBB0_14:
	mov	x0, x21
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_rcar_msi_setup_irq,4,2         ; @rcar_msi_setup_irq
	.comm	_rcar_msi_setup_irqs,4,2        ; @rcar_msi_setup_irqs
	.comm	_rcar_msi_teardown_irq,4,2      ; @rcar_msi_teardown_irq
	.comm	_INT_PCI_MSI_NR,4,2             ; @INT_PCI_MSI_NR
	.comm	_msi_domain_ops,4,2             ; @msi_domain_ops
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to create IRQ domain\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_rcar_pcie_msi_irq,4,2          ; @rcar_pcie_msi_irq
	.comm	_IRQF_SHARED,4,2                ; @IRQF_SHARED
	.comm	_IRQF_NO_THREAD,4,2             ; @IRQF_NO_THREAD
	.comm	_rcar_msi_irq_chip,4,2          ; @rcar_msi_irq_chip
l_.str.1:                               ; @.str.1
	.asciz	"failed to request IRQ: %d\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_MSIFE,4,2                      ; @MSIFE
	.comm	_PCIEMSIALR,4,2                 ; @PCIEMSIALR
	.comm	_PCIEMSIAUR,4,2                 ; @PCIEMSIAUR
	.comm	_PCIEMSIIER,4,2                 ; @PCIEMSIIER
	.no_dead_strip	_rcar_pcie_enable_msi
.subsections_via_symbols
