	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inthand_remove                 ## -- Begin function inthand_remove
	.p2align	4, 0x90
_inthand_remove:                        ## @inthand_remove
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	testl	%edi, %edi
	js	LBB0_2
## %bb.1:
	movl	%edi, %ebx
	movq	_IV_MAX@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_2
## %bb.3:
	movq	%rsi, %rdi
	callq	_intr_event_remove_handler
	testl	%eax, %eax
	jne	LBB0_7
## %bb.4:
	movq	_intr_table_lock@GOTPCREL(%rip), %rdi
	callq	_sx_xlock
	movq	_intr_vectors@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	decq	(%rax,%rcx,8)
	jne	LBB0_6
## %bb.5:
	leaq	(%rax,%rcx,8), %r8
	movq	_PIL_LOW@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_intr_fast@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_intr_stray_vector@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ebx, %edx
	callq	_intr_setup
LBB0_6:
	movq	_intr_table_lock@GOTPCREL(%rip), %rdi
	callq	_sx_xunlock
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IV_MAX,4,2                     ## @IV_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_intr_table_lock,4,2            ## @intr_table_lock
	.comm	_intr_vectors,8,3               ## @intr_vectors
	.comm	_PIL_LOW,4,2                    ## @PIL_LOW
	.comm	_intr_fast,4,2                  ## @intr_fast
	.comm	_intr_stray_vector,4,2          ## @intr_stray_vector
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_inthand_remove                 ; -- Begin function inthand_remove
	.p2align	2
_inthand_remove:                        ; @inthand_remove
	.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
	tbnz	w0, #31, LBB0_6
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x8, _IV_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IV_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_6
; %bb.2:
	mov	x0, x1
	bl	_intr_event_remove_handler
	cbnz	w0, LBB0_7
; %bb.3:
Lloh3:
	adrp	x0, _intr_table_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _intr_table_lock@GOTPAGEOFF]
	bl	_sx_xlock
Lloh5:
	adrp	x8, _intr_vectors@GOTPAGE
Lloh6:
	ldr	x8, [x8, _intr_vectors@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	add	x4, x8, w19, uxtw #3
	ldr	x8, [x4]
	subs	x8, x8, #1
	str	x8, [x4]
	b.ne	LBB0_5
; %bb.4:
Lloh8:
	adrp	x8, _PIL_LOW@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PIL_LOW@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x8, _intr_fast@GOTPAGE
Lloh12:
	ldr	x8, [x8, _intr_fast@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x8, _intr_stray_vector@GOTPAGE
Lloh15:
	ldr	x8, [x8, _intr_stray_vector@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x8]
	mov	x2, x19
	bl	_intr_setup
LBB0_5:
Lloh17:
	adrp	x0, _intr_table_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _intr_table_lock@GOTPAGEOFF]
	bl	_sx_xunlock
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh19:
	adrp	x8, _EINVAL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
LBB0_7:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_IV_MAX,4,2                     ; @IV_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_intr_table_lock,4,2            ; @intr_table_lock
	.comm	_intr_vectors,8,3               ; @intr_vectors
	.comm	_PIL_LOW,4,2                    ; @PIL_LOW
	.comm	_intr_fast,4,2                  ; @intr_fast
	.comm	_intr_stray_vector,4,2          ; @intr_stray_vector
.subsections_via_symbols
