	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsi_register_port_event        ## -- Begin function hsi_register_port_event
	.p2align	4, 0x90
_hsi_register_port_event:               ## @hsi_register_port_event
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_hsi_get_port
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_hsi_port_claimed
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	%r14, (%rbx)
	movq	_hsi_event_notifier_call@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	addq	$8, %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_blocking_notifier_chain_register ## TAILCALL
LBB0_5:
	movq	_EACCES@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_hsi_event_notifier_call,4,2    ## @hsi_event_notifier_call
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hsi_register_port_event        ; -- Begin function hsi_register_port_event
	.p2align	2
_hsi_register_port_event:               ; @hsi_register_port_event
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_hsi_get_port
	cbz	x20, LBB0_2
; %bb.1:
	ldr	x8, [x19]
	cbz	x8, LBB0_4
LBB0_2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x21, x0
	mov	x0, x19
	bl	_hsi_port_claimed
	cbz	w0, LBB0_6
; %bb.5:
Lloh2:
	adrp	x8, _hsi_event_notifier_call@GOTPAGE
Lloh3:
	ldr	x8, [x8, _hsi_event_notifier_call@GOTPAGEOFF]
	str	x20, [x19]
Lloh4:
	ldr	w8, [x8]
	str	w8, [x19, #8]!
	mov	x0, x21
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_blocking_notifier_chain_register
LBB0_6:
Lloh5:
	adrp	x8, _EACCES@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_hsi_event_notifier_call,4,2    ; @hsi_event_notifier_call
.subsections_via_symbols
