	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvebu_icu_irq_domain_alloc
_mvebu_icu_irq_domain_alloc:            ## @mvebu_icu_irq_domain_alloc
	.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	%rcx, %r14
	movl	%edx, %ebx
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	callq	_platform_msi_get_host_data
	movq	%rax, %r15
	movq	8(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	%rax, %rcx
	addq	$16, %rcx
	leaq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_mvebu_icu_irq_domain_translate
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_17
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_4:
	movq	_legacy_bindings@GOTPCREL(%rip), %rdi
	callq	_static_branch_unlikely
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	(%r14), %rax
	jmp	LBB0_7
LBB0_6:
	movq	(%r15), %rax
LBB0_7:
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	%rax, (%r13)
	movq	%r15, 8(%r13)
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_platform_msi_domain_alloc
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_17
LBB0_9:
	movq	_IRQCHIP_STATE_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edi
	xorl	%edx, %edx
	callq	_irq_set_irqchip_state
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_16
## %bb.10:
	movq	(%r13), %rax
	movq	_ICU_GRP_SEI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.12:
	movq	_mvebu_icu_sei_chip@GOTPCREL(%rip), %rcx
	jmp	LBB0_13
LBB0_11:
	movq	_mvebu_icu_nsr_chip@GOTPCREL(%rip), %rcx
LBB0_13:
	movq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r13, %r8
	callq	_irq_domain_set_hwirq_and_chip
	testl	%eax, %eax
	je	LBB0_14
## %bb.15:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
LBB0_16:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_platform_msi_domain_free
LBB0_17:
	movq	%r13, %rdi
	callq	_kfree
LBB0_18:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	xorl	%ebx, %ebx
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_mvebu_icu_nsr_chip,4,2         ## @mvebu_icu_nsr_chip
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to translate ICU parameters\n"

	.comm	_legacy_bindings,4,2            ## @legacy_bindings
L_.str.1:                               ## @.str.1
	.asciz	"failed to allocate ICU interrupt in parent domain\n"

	.comm	_IRQCHIP_STATE_PENDING,4,2      ## @IRQCHIP_STATE_PENDING
	.comm	_ICU_GRP_SEI,8,3                ## @ICU_GRP_SEI
	.comm	_mvebu_icu_sei_chip,4,2         ## @mvebu_icu_sei_chip
L_.str.2:                               ## @.str.2
	.asciz	"failed to set the data to IRQ domain\n"

	.no_dead_strip	_mvebu_icu_irq_domain_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvebu_icu_irq_domain_alloc
_mvebu_icu_irq_domain_alloc:            ; @mvebu_icu_irq_domain_alloc
	.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	x24, x3
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	bl	_platform_msi_get_host_data
	mov	x25, x0
	ldr	x26, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	add	x3, x0, #16
	add	x2, sp, #8
	mov	x0, x22
	mov	x1, x24
	bl	_mvebu_icu_irq_domain_translate
	cbz	w0, LBB0_4
; %bb.2:
	mov	x23, x0
	ldr	w0, [x26]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_3:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_14
LBB0_4:
Lloh8:
	adrp	x0, _legacy_bindings@GOTPAGE
Lloh9:
	ldr	x0, [x0, _legacy_bindings@GOTPAGEOFF]
	bl	_static_branch_unlikely
	cbz	x0, LBB0_6
; %bb.5:
	ldr	x8, [x24]
	b	LBB0_7
LBB0_6:
	ldr	x8, [x25]
LBB0_7:
	ldr	x8, [x8]
	stp	x8, x26, [x19]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_platform_msi_domain_alloc
	cbz	w0, LBB0_9
; %bb.8:
	mov	x23, x0
	ldr	w0, [x26]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	b	LBB0_13
LBB0_9:
Lloh12:
	adrp	x8, _IRQCHIP_STATE_PENDING@GOTPAGE
Lloh13:
	ldr	x8, [x8, _IRQCHIP_STATE_PENDING@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_irq_set_irqchip_state
	mov	x23, x0
	cbnz	w0, LBB0_12
; %bb.10:
	ldr	x8, [x19]
Lloh15:
	adrp	x9, _ICU_GRP_SEI@GOTPAGE
Lloh16:
	ldr	x9, [x9, _ICU_GRP_SEI@GOTPAGEOFF]
Lloh17:
	adrp	x10, _mvebu_icu_nsr_chip@GOTPAGE
Lloh18:
	ldr	x10, [x10, _mvebu_icu_nsr_chip@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
Lloh20:
	adrp	x11, _mvebu_icu_sei_chip@GOTPAGE
Lloh21:
	ldr	x11, [x11, _mvebu_icu_sei_chip@GOTPAGEOFF]
	cmp	x8, x9
	csel	x3, x11, x10, eq
	ldr	x2, [sp, #8]
	mov	x0, x22
	mov	x1, x21
	mov	x4, x19
	bl	_irq_domain_set_hwirq_and_chip
	mov	x23, x0
	cbz	w0, LBB0_14
; %bb.11:
	ldr	w0, [x26]
Lloh22:
	adrp	x1, l_.str.2@PAGE
Lloh23:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
LBB0_12:
	mov	x0, x22
	mov	x1, x21
	mov	x2, x20
	bl	_platform_msi_domain_free
LBB0_13:
	mov	x0, x19
	bl	_kfree
LBB0_14:
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_mvebu_icu_nsr_chip,4,2         ; @mvebu_icu_nsr_chip
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to translate ICU parameters\n"

	.comm	_legacy_bindings,4,2            ; @legacy_bindings
l_.str.1:                               ; @.str.1
	.asciz	"failed to allocate ICU interrupt in parent domain\n"

	.comm	_IRQCHIP_STATE_PENDING,4,2      ; @IRQCHIP_STATE_PENDING
	.comm	_ICU_GRP_SEI,8,3                ; @ICU_GRP_SEI
	.comm	_mvebu_icu_sei_chip,4,2         ; @mvebu_icu_sei_chip
l_.str.2:                               ; @.str.2
	.asciz	"failed to set the data to IRQ domain\n"

	.no_dead_strip	_mvebu_icu_irq_domain_alloc
.subsections_via_symbols
