	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intr_add_handler               ## -- Begin function intr_add_handler
	.p2align	4, 0x90
_intr_add_handler:                      ## @intr_add_handler
	.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	%r9d, %r14d
	movq	%r8, %r12
	movl	%ecx, %r13d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movl	%esi, %edi
	callq	_intr_lookup_source
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	16(%rax), %r12d
	movl	%r14d, %edi
	callq	_intr_priority
	movl	%r12d, %edi
	movq	%r15, %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movl	%r13d, %ecx
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movl	%eax, %r9d
	pushq	16(%rbp)
	pushq	%r14
	callq	_intr_event_add_handler
	addq	$16, %rsp
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	_intrsrc_lock@GOTPCREL(%rip), %rdi
	callq	_sx_xlock
	movq	%rbx, %rdi
	callq	_intrcnt_updatename
	movl	(%rbx), %eax
	leal	1(%rax), %ecx
	movl	%ecx, (%rbx)
	testl	%eax, %eax
	jne	LBB0_5
## %bb.4:
	movl	24(%rbp), %eax
	movl	%eax, 4(%rbx)
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
LBB0_5:
	movq	_intrsrc_lock@GOTPCREL(%rip), %rdi
	callq	_sx_xunlock
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_intrsrc_lock,4,2               ## @intrsrc_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_intr_add_handler               ; -- Begin function intr_add_handler
	.p2align	2
_intr_add_handler:                      ; @intr_add_handler
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x21, x6
	mov	x22, x5
	mov	x23, x4
	mov	x24, x3
	mov	x25, x2
	mov	x26, x0
	mov	x0, x1
	bl	_intr_lookup_source
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
	ldr	w27, [x0, #16]
	mov	x0, x22
	bl	_intr_priority
	mov	x5, x0
	mov	x0, x27
	mov	x1, x26
	mov	x2, x25
	mov	x3, x24
	mov	x4, x23
	mov	x6, x22
	mov	x7, x21
	bl	_intr_event_add_handler
	cbnz	w0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x0, _intrsrc_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _intrsrc_lock@GOTPAGEOFF]
	bl	_sx_xlock
	mov	x0, x20
	bl	_intrcnt_updatename
	ldr	w8, [x20]
	add	w9, w8, #1
	str	w9, [x20]
	cbnz	w8, LBB0_4
; %bb.3:
	str	w19, [x20, #4]
	ldr	x8, [x20, #8]
	ldr	x8, [x8, #8]
	mov	x0, x20
	blr	x8
	ldr	x8, [x20, #8]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
LBB0_4:
Lloh2:
	adrp	x0, _intrsrc_lock@GOTPAGE
Lloh3:
	ldr	x0, [x0, _intrsrc_lock@GOTPAGEOFF]
	bl	_sx_xunlock
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_intrsrc_lock,4,2               ; @intrsrc_lock
.subsections_via_symbols
