	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xgene_irq_domain_alloc
_xgene_irq_domain_alloc:                ## @xgene_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	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	(%rdi), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	4(%r12), %ecx
	movl	8(%r12), %edi
	movq	_NR_MSI_VEC@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	xorl	%r8d, %r8d
	callq	_bitmap_find_next_zero_area
	cmpl	(%r14), %eax
	jge	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	movl	4(%r12), %edx
	movl	8(%r12), %edi
	movl	%eax, %esi
	callq	_bitmap_set
	jmp	LBB0_3
LBB0_2:
	movq	_ENOSPC@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	movl	%r13d, %ebx
LBB0_3:
	movq	%r12, %rdi
	callq	_mutex_unlock
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.4:
	movq	(%r15), %r8
	movq	_handle_simple_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movq	_xgene_msi_bottom_irq_chip@GOTPCREL(%rip), %rcx
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%ebx, %edx
	callq	_irq_domain_set_info
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NR_MSI_VEC,4,2                 ## @NR_MSI_VEC
	.comm	_ENOSPC,4,2                     ## @ENOSPC
	.comm	_xgene_msi_bottom_irq_chip,4,2  ## @xgene_msi_bottom_irq_chip
	.comm	_handle_simple_irq,4,2          ## @handle_simple_irq
	.no_dead_strip	_xgene_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 xgene_irq_domain_alloc
_xgene_irq_domain_alloc:                ; @xgene_irq_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
	mov	x19, x1
	mov	x20, x0
	ldr	x21, [x0]
	mov	x0, x21
	bl	_mutex_lock
Lloh0:
	adrp	x23, _NR_MSI_VEC@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NR_MSI_VEC@GOTPAGEOFF]
	ldr	w1, [x23]
	ldp	w3, w0, [x21, #4]
	mov	w2, #0
	mov	w4, #0
	bl	_bitmap_find_next_zero_area
	ldr	w8, [x23]
	cmp	w0, w8
	b.ge	LBB0_2
; %bb.1:
	mov	x22, x0
	ldp	w2, w0, [x21, #4]
	mov	x1, x22
	bl	_bitmap_set
	b	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _ENOSPC@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOSPC@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_3:
	mov	x0, x21
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_5
; %bb.4:
	ldr	x4, [x20]
Lloh5:
	adrp	x8, _handle_simple_irq@GOTPAGE
Lloh6:
	ldr	x8, [x8, _handle_simple_irq@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
Lloh8:
	adrp	x3, _xgene_msi_bottom_irq_chip@GOTPAGE
Lloh9:
	ldr	x3, [x3, _xgene_msi_bottom_irq_chip@GOTPAGEOFF]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x22
	mov	x6, #0
	mov	x7, #0
	bl	_irq_domain_set_info
	mov	w22, #0
LBB0_5:
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_NR_MSI_VEC,4,2                 ; @NR_MSI_VEC
	.comm	_ENOSPC,4,2                     ; @ENOSPC
	.comm	_xgene_msi_bottom_irq_chip,4,2  ; @xgene_msi_bottom_irq_chip
	.comm	_handle_simple_irq,4,2          ; @handle_simple_irq
	.no_dead_strip	_xgene_irq_domain_alloc
.subsections_via_symbols
