	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function run_access_hook
_run_access_hook:                       ## @run_access_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	%r15
	pushq	%r14
	pushq	%rbx
	subq	$120, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rsi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_CHILD_PROCESS_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movaps	%xmm1, -128(%rbp)
	movaps	%xmm0, -144(%rbp)
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -104(%rbp)
	movq	_access_hook@GOTPCREL(%rip), %r15
	movslq	(%r15), %rax
	movq	%rax, -96(%rbp)
	movslq	(%rdi), %rax
	movq	%rax, -88(%rbp)
	movq	%rdx, -80(%rbp)
	movslq	4(%rcx), %rax
	movq	%rax, -72(%rbp)
	movq	%rcx, %rdi
	callq	_get_canon_hostname
	cltq
	movq	%rax, -64(%rbp)
	movq	%rbx, %rdi
	callq	_get_ip_address
	cltq
	movq	%rax, -56(%rbp)
	movslq	(%rbx), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -40(%rbp)
	movl	$1, -144(%rbp)
	leaq	-96(%rbp), %rax
	movq	%rax, -136(%rbp)
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, -128(%rbp)
	movl	$-1, -120(%rbp)
	leaq	-144(%rbp), %rdi
	callq	_start_command
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movl	(%r15), %esi
	leaq	L_.str(%rip), %rdi
	callq	_logerror
LBB0_8:
	leaq	-104(%rbp), %rdi
	callq	_strbuf_ltrim
	cmpl	$0, -100(%rbp)
	jne	LBB0_10
## %bb.9:
	leaq	L_.str.3(%rip), %rsi
	leaq	-104(%rbp), %rdi
	callq	_strbuf_addstr
LBB0_10:
	movl	-104(%rbp), %edi
	movl	$10, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movb	$0, (%rax)
LBB0_12:
	movq	_EACCES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	-104(%rbp), %esi
	movq	%r14, %rdi
	callq	_daemon_error
	movl	$-1, %ebx
LBB0_13:
	leaq	-104(%rbp), %rdi
	callq	_strbuf_release
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	movl	%ebx, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movl	-120(%rbp), %esi
	leaq	-104(%rbp), %rdi
	xorl	%ebx, %ebx
	xorl	%edx, %edx
	callq	_strbuf_read
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:
	movl	(%r15), %esi
	leaq	L_.str.1(%rip), %rdi
	callq	_logerror
	leaq	-104(%rbp), %rdi
	callq	_strbuf_reset
	movl	$1, %ebx
LBB0_4:
	movl	-120(%rbp), %edi
	callq	_close
	testq	%rax, %rax
	jns	LBB0_6
## %bb.5:
	movl	(%r15), %esi
	leaq	L_.str.2(%rip), %rdi
	callq	_logerror
	movl	$1, %ebx
LBB0_6:
	leaq	-144(%rbp), %rdi
	callq	_finish_command
	testl	%ebx, %ebx
	jne	LBB0_8
## %bb.7:
	xorl	%ebx, %ebx
	testq	%rax, %rax
	je	LBB0_13
	jmp	LBB0_8
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_CHILD_PROCESS_INIT,32,3        ## @CHILD_PROCESS_INIT
	.comm	_STRBUF_INIT,8,2                ## @STRBUF_INIT
	.comm	_access_hook,4,2                ## @access_hook
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"daemon access hook '%s' failed to start"

L_.str.1:                               ## @.str.1
	.asciz	"failed to read from pipe to daemon access hook '%s'"

L_.str.2:                               ## @.str.2
	.asciz	"failed to close pipe to daemon access hook '%s'"

L_.str.3:                               ## @.str.3
	.asciz	"service rejected"

	.comm	_EACCES,4,2                     ## @EACCES
	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_run_access_hook
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function run_access_hook
_run_access_hook:                       ; @run_access_hook
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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, x3
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _CHILD_PROCESS_INIT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHILD_PROCESS_INIT@GOTPAGEOFF]
	stur	x8, [x29, #-40]
	ldp	q0, q1, [x9]
Lloh5:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
	stp	q0, q1, [sp, #16]
Lloh7:
	ldr	x8, [x8]
	str	x8, [sp, #8]
Lloh8:
	adrp	x21, _access_hook@GOTPAGE
Lloh9:
	ldr	x21, [x21, _access_hook@GOTPAGEOFF]
	ldrsw	x8, [x21]
	ldrsw	x9, [x0]
	stp	x8, x9, [sp, #56]
	ldrsw	x8, [x3, #4]
	stp	x2, x8, [sp, #72]
	mov	x0, x3
	bl	_get_canon_hostname
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	str	x8, [sp, #88]
	mov	x0, x20
	bl	_get_ip_address
                                        ; kill: def $w0 killed $w0 def $x0
	ldrsw	x8, [x20]
	sxtw	x9, w0
	stp	x9, x8, [sp, #96]
	str	xzr, [sp, #112]
	mov	w8, #1
	str	w8, [sp, #16]
	add	x8, sp, #56
	str	x8, [sp, #24]
	movi.2s	v0, #1
	str	d0, [sp, #32]
	mov	w8, #-1
	str	w8, [sp, #40]
	add	x0, sp, #16
	bl	_start_command
	cbz	x0, LBB0_9
; %bb.1:
	ldr	w1, [x21]
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_logerror
LBB0_2:
	add	x0, sp, #8
	bl	_strbuf_ltrim
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_4
; %bb.3:
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	add	x0, sp, #8
	bl	_strbuf_addstr
LBB0_4:
	ldr	w0, [sp, #8]
	mov	w1, #10
	bl	_strchr
	cbz	x0, LBB0_6
; %bb.5:
	strb	wzr, [x0]
LBB0_6:
Lloh14:
	adrp	x8, _EACCES@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EACCES@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _errno@GOTPAGE
Lloh18:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh19:
	str	w8, [x9]
	ldr	w1, [sp, #8]
	mov	x0, x19
	bl	_daemon_error
	mov	w19, #-1
LBB0_7:
	add	x0, sp, #8
	bl	_strbuf_release
	ldur	x8, [x29, #-40]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.8:
	mov	x0, x19
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
LBB0_9:
	ldr	w1, [sp, #40]
	add	x0, sp, #8
	mov	w2, #0
	bl	_strbuf_read
	mov	w20, #0
	tbz	x0, #63, LBB0_11
; %bb.10:
	ldr	w1, [x21]
Lloh23:
	adrp	x0, l_.str.1@PAGE
Lloh24:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_logerror
	add	x0, sp, #8
	bl	_strbuf_reset
	mov	w20, #1
LBB0_11:
	ldr	w0, [sp, #40]
	bl	_close
	tbz	x0, #63, LBB0_13
; %bb.12:
	ldr	w1, [x21]
Lloh25:
	adrp	x0, l_.str.2@PAGE
Lloh26:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_logerror
	mov	w20, #1
LBB0_13:
	add	x0, sp, #16
	bl	_finish_command
	cbnz	w20, LBB0_2
; %bb.14:
	cbnz	x0, LBB0_2
; %bb.15:
	mov	w19, #0
	b	LBB0_7
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotStr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_CHILD_PROCESS_INIT,32,3        ; @CHILD_PROCESS_INIT
	.comm	_STRBUF_INIT,8,2                ; @STRBUF_INIT
	.comm	_access_hook,4,2                ; @access_hook
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"daemon access hook '%s' failed to start"

l_.str.1:                               ; @.str.1
	.asciz	"failed to read from pipe to daemon access hook '%s'"

l_.str.2:                               ; @.str.2
	.asciz	"failed to close pipe to daemon access hook '%s'"

l_.str.3:                               ; @.str.3
	.asciz	"service rejected"

	.comm	_EACCES,4,2                     ; @EACCES
	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_run_access_hook
.subsections_via_symbols
