	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nlm_getlock
_nlm_getlock:                           ## @nlm_getlock
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$216, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -84(%rbp)                 ## 4-byte Spill
	movq	%rcx, -120(%rbp)                ## 8-byte Spill
	movl	%edx, %ebx
	movq	%rsi, -112(%rbp)                ## 8-byte Spill
	movq	%rdi, -104(%rbp)                ## 8-byte Spill
	movq	24(%rbp), %r15
	movl	32(%rbp), %r12d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_F_FLOCK@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	movl	(%rax), %eax
	andl	%r12d, %eax
	sete	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	leaq	-248(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	leaq	-184(%rbp), %rdi
	xorl	%esi, %esi
	movl	$64, %edx
	callq	_memset
	movq	(%r15), %r13
	movq	_F_WRLCK@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	leaq	-192(%rbp), %r10
	subq	$8, %rsp
	leaq	-80(%rbp), %rax
	movq	%r15, %rdi
	movl	%r12d, %esi
	movl	40(%rbp), %edx
	movl	%ebx, %ecx
	movq	48(%rbp), %r8
	movq	56(%rbp), %r9
	pushq	%rax
	pushq	%r10
	movl	64(%rbp), %eax
	pushq	%rax
	callq	_nlm_init_lock
	addq	$32, %rsp
	testl	%eax, %eax
	je	LBB0_1
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_18
## %bb.17:
	addq	$216, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-104(%rbp), %r15                ## 8-byte Reload
	movl	%ebx, -88(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	cmpq	%r14, %r13
	sete	%al
	movl	%eax, -248(%rbp)
	leaq	-248(%rbp), %r14
	movl	-84(%rbp), %ebx                 ## 4-byte Reload
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_nlm_host_get_rpc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movq	_nlm_xid@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_atomic_fetchadd_int
	movl	%eax, -92(%rbp)
	movl	$4, -208(%rbp)
	leaq	-92(%rbp), %rax
	movq	%rax, -200(%rbp)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %r9d
	movl	-88(%rbp), %edi                 ## 4-byte Reload
	movq	%r14, %r12
	movq	%r14, %rsi
	leaq	-184(%rbp), %rdx
	movq	%r13, %rcx
	movq	-112(%rbp), %r8                 ## 8-byte Reload
	callq	_nlm_test_rpc
	movl	%eax, %r14d
	movq	%r13, %rdi
	callq	_CLNT_RELEASE
	movq	_RPC_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-176(%rbp), %rax
	movq	_nlm4_denied_grace_period@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_xdr_nlm4_testres@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-184(%rbp), %rsi
	callq	_xdr_free
	movq	_PCATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_hz@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %ecx
	movq	%r12, %r14
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rdx
	callq	_tsleep
	testl	%eax, %eax
	je	LBB0_2
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_EWOULDBLOCK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_2
	jmp	LBB0_16
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	subl	$1, %ebx
	movq	%r12, %r14
	jae	LBB0_2
## %bb.6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_3:
	movq	_ENOLCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_16
LBB0_10:
	movq	_nlm4_denied@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.11:
	movl	-152(%rbp), %eax
	movq	24(%rbp), %rcx
	movl	%eax, 28(%rcx)
	movl	-156(%rbp), %eax
	movl	%eax, 24(%rcx)
	movl	-160(%rbp), %eax
	movl	%eax, 20(%rcx)
	cmpq	$0, -168(%rbp)
	movq	_F_WRLCK@GOTPCREL(%rip), %rax
	jne	LBB0_13
## %bb.12:
	movq	_F_RDLCK@GOTPCREL(%rip), %rax
LBB0_13:
	movq	(%rax), %rax
	movq	%rax, (%rcx)
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rcx)
	movq	$0, 8(%rcx)
	jmp	LBB0_15
LBB0_14:
	movq	_F_UNLCK@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	24(%rbp), %rcx
	movq	%rax, (%rcx)
LBB0_15:
	movq	_xdr_nlm4_testres@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	-184(%rbp), %rsi
	callq	_xdr_free
	xorl	%eax, %eax
	jmp	LBB0_16
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_F_FLOCK,4,2                    ## @F_FLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected F_FLOCK for F_GETLK"

	.comm	_F_WRLCK,8,3                    ## @F_WRLCK
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_ENOLCK,4,2                     ## @ENOLCK
	.comm	_nlm_xid,4,2                    ## @nlm_xid
	.comm	_RPC_SUCCESS,4,2                ## @RPC_SUCCESS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_nlm4_denied_grace_period,8,3   ## @nlm4_denied_grace_period
	.comm	_xdr_nlm4_testres,8,3           ## @xdr_nlm4_testres
	.comm	_PCATCH,4,2                     ## @PCATCH
L_.str.1:                               ## @.str.1
	.asciz	"nlmgrace"

	.comm	_hz,4,2                         ## @hz
	.comm	_EWOULDBLOCK,4,2                ## @EWOULDBLOCK
	.comm	_nlm4_denied,8,3                ## @nlm4_denied
	.comm	_F_RDLCK,8,3                    ## @F_RDLCK
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_F_UNLCK,8,3                    ## @F_UNLCK
	.no_dead_strip	_nlm_getlock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nlm_getlock
_nlm_getlock:                           ; @nlm_getlock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #304
	.cfi_def_cfa_offset 304
	stp	x28, x27, [sp, #208]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #224]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #240]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #256]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #272]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #288]            ; 16-byte Folded Spill
	add	x29, sp, #288
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x7
	str	w4, [sp, #24]                   ; 4-byte Folded Spill
	str	x3, [sp, #16]                   ; 8-byte Folded Spill
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	ldp	x24, x26, [x29, #24]
	ldr	w27, [x29, #40]
	ldp	w19, w28, [x29, #16]
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x8, _F_FLOCK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _F_FLOCK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w19
	cset	w0, eq
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
	add	x0, sp, #96
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #64
	bl	_memset
	ldr	x8, [x20]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
Lloh8:
	adrp	x8, _F_WRLCK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_WRLCK@GOTPAGEOFF]
Lloh10:
	ldr	x25, [x8]
	add	x8, sp, #96
	add	x7, x8, #56
	sub	x8, x29, #128
	str	x8, [sp]
	mov	x0, x20
	mov	x1, x19
	mov	x2, x28
	mov	x3, x21
	mov	x4, x24
	mov	x5, x26
	mov	x6, x27
	bl	_nlm_init_lock
	cbz	w0, LBB0_3
LBB0_1:
	ldur	x8, [x29, #-96]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.2:
	ldp	x29, x30, [sp, #288]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #272]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #256]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #240]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #224]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #208]            ; 16-byte Folded Reload
	add	sp, sp, #304
	ret
LBB0_3:
	ldp	x8, x28, [sp, #8]               ; 16-byte Folded Reload
	cmp	x8, x25
	cset	w8, eq
	str	w8, [sp, #96]
Lloh14:
	adrp	x27, _RPC_SUCCESS@GOTPAGE
Lloh15:
	ldr	x27, [x27, _RPC_SUCCESS@GOTPAGEOFF]
Lloh16:
	adrp	x26, l_.str.1@PAGE
Lloh17:
	add	x26, x26, l_.str.1@PAGEOFF
Lloh18:
	adrp	x24, _F_WRLCK@GOTPAGE
Lloh19:
	ldr	x24, [x24, _F_WRLCK@GOTPAGEOFF]
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
LBB0_5:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
Lloh20:
	adrp	x8, _FALSE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_nlm_host_get_rpc
	cbz	x0, LBB0_11
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	mov	x25, x0
Lloh23:
	adrp	x0, _nlm_xid@GOTPAGE
Lloh24:
	ldr	x0, [x0, _nlm_xid@GOTPAGEOFF]
	mov	w1, #1
	bl	_atomic_fetchadd_int
	str	w0, [sp, #28]
	mov	w8, #4
	str	w8, [sp, #136]
	add	x8, sp, #28
	str	x8, [sp, #144]
	ldr	w5, [x28]
	add	x1, sp, #96
	add	x2, sp, #32
	mov	x0, x21
	mov	x3, x25
	mov	x4, x22
	bl	_nlm_test_rpc
	mov	x19, x0
	mov	x0, x25
	bl	_CLNT_RELEASE
	ldr	w8, [x27]
	cmp	w19, w8
	b.ne	LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
	ldr	x8, [sp, #40]
Lloh25:
	adrp	x9, _nlm4_denied_grace_period@GOTPAGE
Lloh26:
	ldr	x9, [x9, _nlm4_denied_grace_period@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=2
Lloh28:
	adrp	x8, _xdr_nlm4_testres@GOTPAGE
Lloh29:
	ldr	x8, [x8, _xdr_nlm4_testres@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	add	x1, sp, #32
	bl	_xdr_free
Lloh31:
	adrp	x8, _PCATCH@GOTPAGE
Lloh32:
	ldr	x8, [x8, _PCATCH@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _hz@GOTPAGE
Lloh35:
	ldr	x8, [x8, _hz@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	add	w3, w8, w8, lsl #2
	add	x0, sp, #96
	mov	x2, x26
	bl	_tsleep
Lloh37:
	adrp	x8, _EWOULDBLOCK@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EWOULDBLOCK@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	cmp	w0, #0
	ccmp	w0, w8, #4, ne
	b.eq	LBB0_5
	b	LBB0_1
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [sp, #24]                   ; 4-byte Folded Reload
	sub	w8, w9, #1
	cbnz	w9, LBB0_4
; %bb.10:
Lloh40:
	adrp	x8, _EINVAL@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	b	LBB0_1
LBB0_11:
Lloh43:
	adrp	x8, _ENOLCK@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENOLCK@GOTPAGEOFF]
Lloh45:
	ldr	w0, [x8]
	b	LBB0_1
LBB0_12:
Lloh46:
	adrp	x9, _nlm4_denied@GOTPAGE
Lloh47:
	ldr	x9, [x9, _nlm4_denied@GOTPAGEOFF]
Lloh48:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	ldr	w8, [sp, #64]
	str	w8, [x20, #28]
	ldr	d0, [sp, #56]
	stur	d0, [x20, #20]
	ldr	x8, [sp, #48]
Lloh49:
	adrp	x9, _F_RDLCK@GOTPAGE
Lloh50:
	ldr	x9, [x9, _F_RDLCK@GOTPAGEOFF]
	cmp	x8, #0
	csel	x8, x9, x24, eq
	ldr	x8, [x8]
Lloh51:
	adrp	x9, _SEEK_SET@GOTPAGE
Lloh52:
	ldr	x9, [x9, _SEEK_SET@GOTPAGEOFF]
	stp	x8, xzr, [x20]
Lloh53:
	ldr	w8, [x9]
	str	w8, [x20, #16]
	b	LBB0_15
LBB0_14:
Lloh54:
	adrp	x8, _F_UNLCK@GOTPAGE
Lloh55:
	ldr	x8, [x8, _F_UNLCK@GOTPAGEOFF]
Lloh56:
	ldr	x8, [x8]
	str	x8, [x20]
LBB0_15:
Lloh57:
	adrp	x8, _xdr_nlm4_testres@GOTPAGE
Lloh58:
	ldr	x8, [x8, _xdr_nlm4_testres@GOTPAGEOFF]
Lloh59:
	ldr	w0, [x8]
	add	x1, sp, #32
	bl	_xdr_free
	mov	w0, #0
	b	LBB0_1
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_F_FLOCK,4,2                    ; @F_FLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected F_FLOCK for F_GETLK"

	.comm	_F_WRLCK,8,3                    ; @F_WRLCK
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_ENOLCK,4,2                     ; @ENOLCK
	.comm	_nlm_xid,4,2                    ; @nlm_xid
	.comm	_RPC_SUCCESS,4,2                ; @RPC_SUCCESS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_nlm4_denied_grace_period,8,3   ; @nlm4_denied_grace_period
	.comm	_xdr_nlm4_testres,8,3           ; @xdr_nlm4_testres
	.comm	_PCATCH,4,2                     ; @PCATCH
l_.str.1:                               ; @.str.1
	.asciz	"nlmgrace"

	.comm	_hz,4,2                         ; @hz
	.comm	_EWOULDBLOCK,4,2                ; @EWOULDBLOCK
	.comm	_nlm4_denied,8,3                ; @nlm4_denied
	.comm	_F_RDLCK,8,3                    ; @F_RDLCK
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_F_UNLCK,8,3                    ; @F_UNLCK
	.no_dead_strip	_nlm_getlock
.subsections_via_symbols
