	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nlm_host_monitor               ## -- Begin function nlm_host_monitor
	.p2align	4, 0x90
_nlm_host_monitor:                      ## @nlm_host_monitor
	.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	%r12
	pushq	%rbx
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	testl	%esi, %esi
	je	LBB0_3
## %bb.1:
	cmpl	$0, (%rbx)
	jne	LBB0_3
## %bb.2:
	movl	%esi, %r8d
	movl	%esi, (%rbx)
	movl	4(%rbx), %edx
	movl	20(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_NLM_DEBUG
LBB0_3:
	leaq	16(%rbx), %r14
	movq	%r14, %rdi
	callq	_mtx_lock
	movq	8(%rbx), %rax
	movq	_NLM_UNMONITORED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.4:
	movq	_NLM_MONITORED@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	callq	_mtx_unlock
	leaq	20(%rbx), %r15
	movl	4(%rbx), %edx
	movl	20(%rbx), %ecx
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edi
	xorl	%eax, %eax
	callq	_NLM_DEBUG
	movl	4(%rbx), %eax
	movl	%eax, -88(%rbp)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, -80(%rbp)
	movq	_NLM_PROG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movq	_NLM_SM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	_NLM_SM_NOTIFY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	$25, -56(%rbp)
	movq	$0, -48(%rbp)
	movq	_nlm_nsm@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SM_MON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_xdr_mon@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_xdr_sm_stat@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movups	-56(%rbp), %xmm0
	movups	%xmm0, (%rsp)
	leaq	-96(%rbp), %rcx
	leaq	-40(%rbp), %r9
	callq	_CLNT_CALL
	movq	_RPC_SUCCESS@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_5
## %bb.6:
	movq	-40(%rbp), %rax
	movq	_stat_fail@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movl	4(%rbx), %esi
	leaq	L_.str.4(%rip), %rdi
	callq	_NLM_ERR
	movq	%r14, %rdi
	callq	_mtx_lock
	movq	_NLM_MONITOR_FAILED@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 8(%rbx)
	movq	%r14, %rdi
	callq	_mtx_unlock
	jmp	LBB0_9
LBB0_10:
	movq	%r14, %rdi
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mtx_unlock                     ## TAILCALL
LBB0_5:
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %esi
	callq	_NLM_ERR
	jmp	LBB0_9
LBB0_8:
	movq	(%r12), %rax
	movq	%rax, 8(%rbx)
LBB0_9:
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NLM: host %s (sysid %d) has NSM state %d\n"

	.comm	_NLM_UNMONITORED,8,3            ## @NLM_UNMONITORED
	.comm	_NLM_MONITORED,8,3              ## @NLM_MONITORED
L_.str.1:                               ## @.str.1
	.asciz	"NLM: monitoring %s (sysid %d)\n"

L_.str.2:                               ## @.str.2
	.asciz	"localhost"

	.comm	_NLM_PROG,4,2                   ## @NLM_PROG
	.comm	_NLM_SM,4,2                     ## @NLM_SM
	.comm	_NLM_SM_NOTIFY,4,2              ## @NLM_SM_NOTIFY
	.comm	_nlm_nsm,4,2                    ## @nlm_nsm
	.comm	_SM_MON,4,2                     ## @SM_MON
	.comm	_xdr_mon,8,3                    ## @xdr_mon
	.comm	_xdr_sm_stat,8,3                ## @xdr_sm_stat
	.comm	_RPC_SUCCESS,4,2                ## @RPC_SUCCESS
L_.str.3:                               ## @.str.3
	.asciz	"Failed to contact local NSM - rpc error %d\n"

	.comm	_stat_fail,8,3                  ## @stat_fail
L_.str.4:                               ## @.str.4
	.asciz	"Local NSM refuses to monitor %s\n"

	.comm	_NLM_MONITOR_FAILED,8,3         ## @NLM_MONITOR_FAILED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nlm_host_monitor               ; -- Begin function nlm_host_monitor
	.p2align	2
_nlm_host_monitor:                      ; @nlm_host_monitor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x19, x0
	cbz	w1, LBB0_3
; %bb.1:
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
; %bb.2:
	str	w1, [x19]
	ldr	w2, [x19, #4]
	ldr	w3, [x19, #20]
	str	x1, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_NLM_DEBUG
LBB0_3:
	add	x20, x19, #16
	mov	x0, x20
	bl	_mtx_lock
	ldr	x8, [x19, #8]
Lloh2:
	adrp	x9, _NLM_UNMONITORED@GOTPAGE
Lloh3:
	ldr	x9, [x9, _NLM_UNMONITORED@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.4:
Lloh5:
	adrp	x22, _NLM_MONITORED@GOTPAGE
Lloh6:
	ldr	x22, [x22, _NLM_MONITORED@GOTPAGEOFF]
	ldr	x8, [x22]
	str	x8, [x19, #8]
	mov	x0, x20
	bl	_mtx_unlock
	mov	x21, x19
	ldr	w3, [x21, #20]!
	ldur	w2, [x21, #-16]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w0, #1
	bl	_NLM_DEBUG
	ldur	w8, [x21, #-16]
	str	w8, [sp, #32]
Lloh9:
	adrp	x8, l_.str.2@PAGE
Lloh10:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [sp, #40]
Lloh11:
	adrp	x8, _NLM_PROG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NLM_PROG@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	str	w8, [sp, #56]
Lloh14:
	adrp	x8, _NLM_SM@GOTPAGE
Lloh15:
	ldr	x8, [x8, _NLM_SM@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
Lloh17:
	adrp	x9, _NLM_SM_NOTIFY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _NLM_SM_NOTIFY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #48]
	mov	x1, x21
	mov	w2, #4
	bl	_memcpy
Lloh20:
	adrp	x8, _nlm_nsm@GOTPAGE
Lloh21:
	ldr	x8, [x8, _nlm_nsm@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x8, _SM_MON@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SM_MON@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
Lloh26:
	adrp	x8, _xdr_mon@GOTPAGE
Lloh27:
	ldr	x8, [x8, _xdr_mon@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
Lloh29:
	adrp	x8, _xdr_sm_stat@GOTPAGE
Lloh30:
	ldr	x8, [x8, _xdr_sm_stat@GOTPAGEOFF]
Lloh31:
	ldr	w4, [x8]
	add	x3, sp, #24
	add	x5, sp, #16
	mov	w6, #25
	mov	x7, #0
	bl	_CLNT_CALL
Lloh32:
	adrp	x8, _RPC_SUCCESS@GOTPAGE
Lloh33:
	ldr	x8, [x8, _RPC_SUCCESS@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.5:
	ldr	x8, [sp, #16]
Lloh35:
	adrp	x9, _stat_fail@GOTPAGE
Lloh36:
	ldr	x9, [x9, _stat_fail@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.6:
	ldr	w1, [x19, #4]
Lloh38:
	adrp	x0, l_.str.4@PAGE
Lloh39:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_NLM_ERR
	mov	x0, x20
	bl	_mtx_lock
Lloh40:
	adrp	x8, _NLM_MONITOR_FAILED@GOTPAGE
Lloh41:
	ldr	x8, [x8, _NLM_MONITOR_FAILED@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	str	x8, [x19, #8]
	mov	x0, x20
	bl	_mtx_unlock
	b	LBB0_10
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_mtx_unlock
LBB0_8:
	mov	x1, x0
Lloh43:
	adrp	x0, l_.str.3@PAGE
Lloh44:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_NLM_ERR
	b	LBB0_10
LBB0_9:
	ldr	x8, [x22]
	str	x8, [x19, #8]
LBB0_10:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NLM: host %s (sysid %d) has NSM state %d\n"

	.comm	_NLM_UNMONITORED,8,3            ; @NLM_UNMONITORED
	.comm	_NLM_MONITORED,8,3              ; @NLM_MONITORED
l_.str.1:                               ; @.str.1
	.asciz	"NLM: monitoring %s (sysid %d)\n"

l_.str.2:                               ; @.str.2
	.asciz	"localhost"

	.comm	_NLM_PROG,4,2                   ; @NLM_PROG
	.comm	_NLM_SM,4,2                     ; @NLM_SM
	.comm	_NLM_SM_NOTIFY,4,2              ; @NLM_SM_NOTIFY
	.comm	_nlm_nsm,4,2                    ; @nlm_nsm
	.comm	_SM_MON,4,2                     ; @SM_MON
	.comm	_xdr_mon,8,3                    ; @xdr_mon
	.comm	_xdr_sm_stat,8,3                ; @xdr_sm_stat
	.comm	_RPC_SUCCESS,4,2                ; @RPC_SUCCESS
l_.str.3:                               ; @.str.3
	.asciz	"Failed to contact local NSM - rpc error %d\n"

	.comm	_stat_fail,8,3                  ; @stat_fail
l_.str.4:                               ; @.str.4
	.asciz	"Local NSM refuses to monitor %s\n"

	.comm	_NLM_MONITOR_FAILED,8,3         ; @NLM_MONITOR_FAILED
.subsections_via_symbols
