	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function crossbar_domain_alloc
_crossbar_domain_alloc:                 ## @crossbar_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$3, (%rcx)
	jne	LBB0_1
## %bb.2:
	movq	8(%rcx), %rax
	cmpq	$0, (%rax)
	jne	LBB0_1
## %bb.3:
	movq	8(%rax), %r12
	movl	%edx, %r13d
	leaq	(%r12,%r13), %rax
	movq	_cb@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	(%rcx), %rax
	jle	LBB0_4
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	testl	%edx, %edx
	je	LBB0_5
## %bb.6:
	movl	%esi, %r15d
	movq	%rdi, %r14
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	callq	_allocate_gic_irq
	testl	%eax, %eax
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%r15d, %esi
	movq	%r12, %rdx
	movq	_crossbar_chip@GOTPCREL(%rip), %rcx
	xorl	%r8d, %r8d
	callq	_irq_domain_set_hwirq_and_chip
	incl	%r15d
	incq	%r12
	decq	%r13
	jne	LBB0_7
	jmp	LBB0_10
LBB0_5:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_8:
	movl	%eax, %ebx
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cb,8,3                         ## @cb
	.comm	_crossbar_chip,4,2              ## @crossbar_chip
	.no_dead_strip	_crossbar_domain_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function crossbar_domain_alloc
_crossbar_domain_alloc:                 ; @crossbar_domain_alloc
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x3]
	cmp	w8, #3
	b.ne	LBB0_3
; %bb.1:
	ldr	x8, [x3, #8]
	ldr	x9, [x8]
	cbnz	x9, LBB0_3
; %bb.2:
	ldr	x21, [x8, #8]
	mov	w23, w2
Lloh0:
	adrp	x8, _cb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _cb@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	x8, [x8]
	add	x9, x21, x23
	cmp	x9, x8
	b.le	LBB0_5
LBB0_3:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_5:
	cbz	w2, LBB0_9
; %bb.6:
	mov	x19, x1
	mov	x20, x0
Lloh6:
	adrp	x22, _crossbar_chip@GOTPAGE
Lloh7:
	ldr	x22, [x22, _crossbar_chip@GOTPAGEOFF]
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_allocate_gic_irq
	cbnz	w0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x22
	mov	x4, #0
	bl	_irq_domain_set_hwirq_and_chip
	mov	w0, #0
	add	w19, w19, #1
	add	x21, x21, #1
	subs	x23, x23, #1
	b.ne	LBB0_7
	b	LBB0_4
LBB0_9:
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cb,8,3                         ; @cb
	.comm	_crossbar_chip,4,2              ; @crossbar_chip
	.no_dead_strip	_crossbar_domain_alloc
.subsections_via_symbols
