	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function nwl_irq_domain_alloc
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_nwl_irq_domain_alloc:                  ## @nwl_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
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %r12
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	4(%r14), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	_INT_PCI_MSI_NR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r15d, %edi
	callq	_get_count_order
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_bitmap_find_free_region
	testl	%eax, %eax
	js	LBB0_6
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	je	LBB0_4
## %bb.2:
	movl	%eax, %ebx
	movq	_nwl_irq_chip@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %r8
	movq	_handle_simple_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%ebx, %edx
	movq	%r14, %rcx
	callq	_irq_domain_set_info
	incl	%ebx
	incl	%r13d
	decl	%r15d
	jne	LBB0_3
LBB0_4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movq	_ENOSPC@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_PCI_MSI_NR,4,2             ## @INT_PCI_MSI_NR
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_nwl_irq_chip,4,2               ## @nwl_irq_chip
	.comm	_handle_simple_irq,4,2          ## @handle_simple_irq
	.no_dead_strip	_nwl_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 nwl_irq_domain_alloc
_nwl_irq_domain_alloc:                  ; @nwl_irq_domain_alloc
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	x19, [x0]
	mov	x0, x19
	bl	_mutex_lock
	ldr	w23, [x19, #4]
Lloh0:
	adrp	x8, _INT_PCI_MSI_NR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_PCI_MSI_NR@GOTPAGEOFF]
Lloh2:
	ldr	w24, [x8]
	mov	x0, x20
	bl	_get_count_order
	mov	x2, x0
	mov	x0, x23
	mov	x1, x24
	bl	_bitmap_find_free_region
	tbnz	w0, #31, LBB0_5
; %bb.1:
	cbz	w20, LBB0_4
; %bb.2:
	mov	x23, x0
Lloh3:
	adrp	x25, _handle_simple_irq@GOTPAGE
Lloh4:
	ldr	x25, [x25, _handle_simple_irq@GOTPAGEOFF]
Lloh5:
	adrp	x24, _nwl_irq_chip@GOTPAGE
Lloh6:
	ldr	x24, [x24, _nwl_irq_chip@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x4, [x22]
	ldr	w5, [x25]
	mov	x0, x22
	mov	x1, x21
	mov	x2, x23
	mov	x3, x24
	mov	x6, #0
	mov	x7, #0
	bl	_irq_domain_set_info
	add	w23, w23, #1
	add	w21, w21, #1
	subs	w20, w20, #1
	b.ne	LBB0_3
LBB0_4:
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
Lloh7:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_PCI_MSI_NR,4,2             ; @INT_PCI_MSI_NR
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_nwl_irq_chip,4,2               ; @nwl_irq_chip
	.comm	_handle_simple_irq,4,2          ; @handle_simple_irq
	.no_dead_strip	_nwl_irq_domain_alloc
.subsections_via_symbols
