	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mbi_allocate_domains
_mbi_allocate_domains:                  ## @mbi_allocate_domains
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	movq	_mbi_domain_ops@GOTPCREL(%rip), %rsi
	xorl	%r14d, %r14d
	xorl	%edx, %edx
	callq	_irq_domain_create_tree
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r15
	movq	_DOMAIN_BUS_NEXUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_irq_domain_update_bus_token
	movq	%rbx, 8(%r15)
	leaq	-40(%rbp), %rsi
	movq	%r15, %rdi
	callq	_mbi_allocate_pci_domain
	movl	%eax, %r12d
	movl	(%rbx), %edi
	movq	_mbi_pmsi_domain_info@GOTPCREL(%rip), %rsi
	movq	%r15, %rdx
	callq	_platform_msi_create_irq_domain
	testl	%r12d, %r12d
	jne	LBB0_3
## %bb.2:
	testq	%rax, %rax
	jne	LBB0_9
LBB0_3:
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rax, %rdi
	callq	_irq_domain_remove
LBB0_5:
	movq	-40(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.6:
	callq	_irq_domain_remove
LBB0_7:
	movq	%r15, %rdi
	callq	_irq_domain_remove
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mbi_domain_ops,4,2             ## @mbi_domain_ops
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DOMAIN_BUS_NEXUS,4,2           ## @DOMAIN_BUS_NEXUS
	.comm	_mbi_pmsi_domain_info,4,2       ## @mbi_pmsi_domain_info
	.no_dead_strip	_mbi_allocate_domains
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mbi_allocate_domains
_mbi_allocate_domains:                  ; @mbi_allocate_domains
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x0
	ldr	w0, [x0]
Lloh0:
	adrp	x1, _mbi_domain_ops@GOTPAGE
Lloh1:
	ldr	x1, [x1, _mbi_domain_ops@GOTPAGEOFF]
	mov	x2, #0
	bl	_irq_domain_create_tree
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x0
Lloh2:
	adrp	x8, _DOMAIN_BUS_NEXUS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DOMAIN_BUS_NEXUS@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_irq_domain_update_bus_token
	str	x20, [x19, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_mbi_allocate_pci_domain
	mov	x21, x0
	ldr	w0, [x20]
Lloh5:
	adrp	x1, _mbi_pmsi_domain_info@GOTPAGE
Lloh6:
	ldr	x1, [x1, _mbi_pmsi_domain_info@GOTPAGEOFF]
	mov	x2, x19
	bl	_platform_msi_create_irq_domain
	cmp	w21, #0
	ccmp	x0, #0, #4, eq
	b.ne	LBB0_8
; %bb.2:
	cbz	x0, LBB0_4
; %bb.3:
	bl	_irq_domain_remove
LBB0_4:
	ldr	x0, [sp, #8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_irq_domain_remove
LBB0_6:
	mov	x0, x19
	bl	_irq_domain_remove
LBB0_7:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_8:
	mov	w0, #0
LBB0_9:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_mbi_domain_ops,4,2             ; @mbi_domain_ops
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DOMAIN_BUS_NEXUS,4,2           ; @DOMAIN_BUS_NEXUS
	.comm	_mbi_pmsi_domain_info,4,2       ; @mbi_pmsi_domain_info
	.no_dead_strip	_mbi_allocate_domains
.subsections_via_symbols
