	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function allocate_gic_irq
_allocate_gic_irq:                      ## @allocate_gic_irq
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	(%rdi), %rdi
	callq	_irq_domain_get_of_node
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_cb@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	$24, %rdi
	callq	_raw_spin_lock
	movq	(%rbx), %rdi
	movl	(%rdi), %eax
	movq	_IRQ_FREE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%eax, %eax
	jle	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	-1(%rax), %rsi
	movq	8(%rdi), %rdx
	cmpq	%rcx, -8(%rdx,%rax,8)
	movq	%rsi, %rax
	jne	LBB0_3
## %bb.5:
	movl	%esi, %eax
	movq	%r14, (%rdx,%rax,8)
	addq	$24, %rdi
	callq	_raw_spin_unlock
	ud2
LBB0_6:
	addq	$24, %rdi
	callq	_raw_spin_unlock
	movq	_ENODEV@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cb,8,3                         ## @cb
	.comm	_IRQ_FREE,8,3                   ## @IRQ_FREE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ## @IRQ_TYPE_LEVEL_HIGH
	.no_dead_strip	_allocate_gic_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function allocate_gic_irq
_allocate_gic_irq:                      ; @allocate_gic_irq
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	ldr	x0, [x0]
	bl	_irq_domain_get_of_node
	cbz	w0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x20, _cb@GOTPAGE
Lloh1:
	ldr	x20, [x20, _cb@GOTPAGEOFF]
	ldr	x8, [x20]
	add	x0, x8, #24
	bl	_raw_spin_lock
	ldr	x8, [x20]
	ldr	w10, [x8]
Lloh2:
	adrp	x9, _IRQ_FREE@GOTPAGE
Lloh3:
	ldr	x9, [x9, _IRQ_FREE@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w10, #1
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x11, x10, #1
	ldr	x12, [x8, #8]
	add	x10, x12, x10, lsl #3
	ldur	x13, [x10, #-8]
	mov	x10, x11
	cmp	x13, x9
	b.ne	LBB0_2
; %bb.4:
	str	x19, [x12, w11, uxtw #3]
	add	x0, x8, #24
	bl	_raw_spin_unlock
	brk	#0x1
LBB0_5:
	add	x0, x8, #24
	bl	_raw_spin_unlock
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cb,8,3                         ; @cb
	.comm	_IRQ_FREE,8,3                   ; @IRQ_FREE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_IRQ_TYPE_LEVEL_HIGH,4,2        ; @IRQ_TYPE_LEVEL_HIGH
	.no_dead_strip	_allocate_gic_irq
.subsections_via_symbols
