	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ng_add_hook
_ng_add_hook:                           ## @ng_add_hook
	.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
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.3:
	callq	_ng_findhook
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_EEXIST@GOTPCREL(%rip), %rbx
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rbx
LBB0_2:
	xorl	%eax, %eax
	callq	_TRAP_ERROR
	movl	(%rbx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_5:
	callq	_ng_add_hook.cold.1
	xorl	%eax, %eax
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function ng_add_hook.cold.1
_ng_add_hook.cold.1:                    ## @ng_add_hook.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	callq	_NG_ALLOC_HOOK
	ud2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_HK_INVALID,4,2                 ## @HK_INVALID
	.comm	_ng_deadhook,4,2                ## @ng_deadhook
	.comm	_NG_HOOKSIZ,4,2                 ## @NG_HOOKSIZ
	.comm	_hk_hooks,4,2                   ## @hk_hooks
	.no_dead_strip	_ng_add_hook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ng_add_hook
_ng_add_hook:                           ; @ng_add_hook
	.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
	cbz	x1, LBB0_3
; %bb.1:
	bl	_ng_findhook
	cbz	x0, LBB0_5
; %bb.2:
Lloh0:
	adrp	x19, _EEXIST@GOTPAGE
Lloh1:
	ldr	x19, [x19, _EEXIST@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x19, _EINVAL@GOTPAGE
Lloh3:
	ldr	x19, [x19, _EINVAL@GOTPAGEOFF]
LBB0_4:
	bl	_TRAP_ERROR
	ldr	w0, [x19]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_5:
	bl	_ng_add_hook.cold.1
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function ng_add_hook.cold.1
_ng_add_hook.cold.1:                    ; @ng_add_hook.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_NG_ALLOC_HOOK
	brk	#0x1
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_HK_INVALID,4,2                 ; @HK_INVALID
	.comm	_ng_deadhook,4,2                ; @ng_deadhook
	.comm	_NG_HOOKSIZ,4,2                 ; @NG_HOOKSIZ
	.comm	_hk_hooks,4,2                   ; @hk_hooks
	.no_dead_strip	_ng_add_hook
.subsections_via_symbols
