	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function its_vpe_irq_domain_alloc
_its_vpe_irq_domain_alloc:              ## @its_vpe_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %r14
	xorl	%edi, %edi
	testq	%rcx, %rcx
	sete	%dil
	callq	_BUG_ON
	movl	%r15d, %edi
	callq	_roundup_pow_of_two
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movl	%eax, %edi
	callq	_its_lpi_alloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.1:
	movq	%rax, %r12
	movl	-48(%rbp), %edx
	cmpl	%r15d, %edx
	jae	LBB0_3
## %bb.2:
	movl	-44(%rbp), %esi
	jmp	LBB0_11
LBB0_3:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_its_allocate_prop_table
	testq	%rax, %rax
	je	LBB0_10
## %bb.4:
	movq	%r12, (%rbx)
	movl	-44(%rbp), %edx
	movl	%edx, 8(%rbx)
	movl	-48(%rbp), %ecx
	movl	%ecx, 12(%rbx)
	movq	%rax, 24(%rbx)
	testl	%r15d, %r15d
	je	LBB0_14
## %bb.5:
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %rcx
	movq	(%rcx), %rdi
	movl	%edx, (%rdi)
	callq	_its_vpe_init
	testl	%eax, %eax
	movl	%r13d, -52(%rbp)                ## 4-byte Spill
	je	LBB0_15
## %bb.6:
	movl	%eax, %r14d
	xorl	%r13d, %r13d
LBB0_7:
	testl	%r13d, %r13d
	je	LBB0_9
## %bb.8:
	decl	%r13d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-52(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	callq	_its_vpe_irq_domain_free
LBB0_9:
	movl	-44(%rbp), %esi
	movl	-48(%rbp), %edx
	movq	%r12, %rdi
	callq	_its_lpi_free
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	callq	_its_free_prop_table
	jmp	LBB0_13
LBB0_10:
	movl	-44(%rbp), %esi
	movl	-48(%rbp), %edx
LBB0_11:
	movq	%r12, %rdi
	callq	_its_lpi_free
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_13:
	movl	%r14d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movl	%r15d, %eax
	movl	%r13d, %ecx
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	decq	%rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r15
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r13), %rbx
	movq	16(%r15), %rax
	movq	(%rax,%r13,8), %rax
	movl	(%rax), %edx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_its_irq_gic_domain_alloc
	testl	%eax, %eax
	jne	LBB0_20
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	16(%r15), %rax
	movq	(%rax,%r13,8), %r8
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r13d, %edx
	movq	_its_vpe_irq_chip@GOTPCREL(%rip), %rcx
	callq	_irq_domain_set_hwirq_and_chip
	movl	%r13d, %edi
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_set_bit
	cmpq	%r13, -88(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_14
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	movl	-44(%rbp), %eax
	addl	%r13d, %eax
	incl	%eax
	movq	16(%r15), %rcx
	movq	8(%rcx,%r13,8), %rdi
	movl	%eax, (%rdi)
	callq	_its_vpe_init
	incq	%r13
	testl	%eax, %eax
	movq	%r15, %rbx
	je	LBB0_16
## %bb.19:
	movl	%eax, %r14d
	jmp	LBB0_7
LBB0_14:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_20:
	movl	%eax, %r14d
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_its_vpe_irq_chip,4,2           ## @its_vpe_irq_chip
	.no_dead_strip	_its_vpe_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 its_vpe_irq_domain_alloc
_its_vpe_irq_domain_alloc:              ; @its_vpe_irq_domain_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x23, x3
	mov	x26, x2
	mov	x19, x1
	mov	x20, x0
	cmp	x3, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, x26
	bl	_roundup_pow_of_two
	add	x1, sp, #12
	add	x2, sp, #8
	bl	_its_lpi_alloc
	cbz	x0, LBB0_11
; %bb.1:
	mov	x21, x0
	ldr	w2, [sp, #8]
	cmp	w2, w26
	b.hs	LBB0_3
; %bb.2:
	ldr	w1, [sp, #12]
	b	LBB0_10
LBB0_3:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_its_allocate_prop_table
	cbz	x0, LBB0_9
; %bb.4:
	mov	x22, x0
	str	x21, [x23]
	ldp	w9, w8, [sp, #8]
	stp	w8, w9, [x23, #8]
	str	x0, [x23, #24]
	cbz	w26, LBB0_18
; %bb.5:
	ldr	x9, [x23, #16]
	ldr	x0, [x9]
	str	w8, [x0]
	bl	_its_vpe_init
	cbz	w0, LBB0_13
; %bb.6:
	mov	x25, x0
	mov	w24, #0
	cbz	w24, LBB0_8
LBB0_7:
	sub	w2, w24, #1
	mov	x0, x20
	mov	x1, x19
	bl	_its_vpe_irq_domain_free
LBB0_8:
	ldp	w2, w1, [sp, #8]
	mov	x0, x21
	bl	_its_lpi_free
	mov	x0, x22
	bl	_its_free_prop_table
	b	LBB0_12
LBB0_9:
	ldp	w2, w1, [sp, #8]
LBB0_10:
	mov	x0, x21
	bl	_its_lpi_free
LBB0_11:
Lloh3:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_12:
	mov	x0, x25
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	mov	x24, #0
	mov	w8, w26
	mov	w28, w19
	sub	x26, x8, #1
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	add	x27, x28, x24
	ldr	x8, [x23, #16]
	ldr	x8, [x8, x24, lsl #3]
	ldr	w2, [x8]
	mov	x0, x20
	mov	x1, x27
	bl	_its_irq_gic_domain_alloc
	cbnz	w0, LBB0_17
; %bb.15:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	x8, [x23, #16]
	ldr	x4, [x8, x24, lsl #3]
	mov	x0, x20
	mov	x1, x27
	mov	x2, x24
Lloh6:
	adrp	x3, _its_vpe_irq_chip@GOTPAGE
Lloh7:
	ldr	x3, [x3, _its_vpe_irq_chip@GOTPAGEOFF]
	bl	_irq_domain_set_hwirq_and_chip
	mov	x0, x24
	mov	x1, x21
	bl	_set_bit
	cmp	x26, x24
	b.eq	LBB0_18
; %bb.16:                               ;   in Loop: Header=BB0_14 Depth=1
	ldr	w8, [sp, #12]
	add	w8, w24, w8
	add	w8, w8, #1
	ldr	x9, [x23, #16]
	add	x9, x9, x24, lsl #3
	ldr	x0, [x9, #8]
	str	w8, [x0]
	bl	_its_vpe_init
	add	x24, x24, #1
	cbz	w0, LBB0_14
LBB0_17:
	mov	x25, x0
	cbnz	w24, LBB0_7
	b	LBB0_8
LBB0_18:
	mov	w25, #0
	b	LBB0_12
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_its_vpe_irq_chip,4,2           ; @its_vpe_irq_chip
	.no_dead_strip	_its_vpe_irq_domain_alloc
.subsections_via_symbols
