	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getlock                        ## -- Begin function getlock
	.p2align	4, 0x90
_getlock:                               ## @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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_debuglog
	movq	_grace_expired@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
## %bb.1:
	cmpq	$0, (%rbx)
	je	LBB0_11
LBB0_2:
	leaq	52(%rbx), %r12
	leaq	60(%rbx), %r13
	movl	(%r15), %edi
	callq	_svc_getrpccaller
	movq	(%rax), %rdx
	movl	48(%rbx), %ecx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_allocate_file_lock
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r15
	movl	32(%rbx), %esi
	cmpl	$4, %esi
	je	LBB0_5
## %bb.4:
	leaq	L_.str.2(%rip), %rdi
	movl	$4, %edx
	xorl	%eax, %eax
	callq	_debuglog
LBB0_5:
	movq	40(%rbx), %rsi
	movl	56(%rbx), %edx
	movl	24(%rbx), %ecx
	movl	20(%rbx), %r8d
	movl	16(%rbx), %r9d
	movl	8(%rbx), %eax
	movl	12(%rbx), %ebx
	movq	%r15, %rdi
	pushq	%rax
	pushq	%r14
	pushq	$0
	pushq	%rbx
	callq	_fill_file_lock
	addq	$32, %rsp
	xorl	%eax, %eax
	callq	_siglock
	leaq	L_.str.3(%rip), %r14
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_debuglog
	movq	%r15, %rdi
	callq	_do_lock
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	xorl	%eax, %eax
	callq	_debuglog
	xorl	%eax, %eax
	callq	_sigunlock
	movl	%ebx, %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	_deallocate_file_lock
LBB0_7:
	leaq	L_.str.4(%rip), %rdi
	xorl	%eax, %eax
	callq	_debuglog
	jmp	LBB0_15
LBB0_8:
	movq	_LOG_NOTICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%eax, %edx
	callq	_syslog
	movq	_LOCK_V4@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_10
## %bb.9:
	movq	_nlm_denied_nolocks@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_10:
	movq	_nlm4_denied_nolocks@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_11:
	movq	_LOCK_V4@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	jne	LBB0_13
## %bb.12:
	movq	_nlm_denied_grace_period@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_13:
	movq	_nlm4_denied_grace_period@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Entering getlock...\n"

	.comm	_grace_expired,8,3              ## @grace_expired
	.comm	_LOCK_V4,4,2                    ## @LOCK_V4
	.comm	_nlm4_denied_grace_period,4,2   ## @nlm4_denied_grace_period
	.comm	_nlm_denied_grace_period,4,2    ## @nlm_denied_grace_period
	.comm	_LOG_NOTICE,4,2                 ## @LOG_NOTICE
L_.str.1:                               ## @.str.1
	.asciz	"lock allocate failed: %s"

	.comm	_errno,4,2                      ## @errno
	.comm	_nlm4_denied_nolocks,4,2        ## @nlm4_denied_nolocks
	.comm	_nlm_denied_nolocks,4,2         ## @nlm_denied_nolocks
L_.str.2:                               ## @.str.2
	.asciz	"received fhandle size %d, local size %d"

L_.str.3:                               ## @.str.3
	.asciz	"Pointer to new lock is %p\n"

L_.str.4:                               ## @.str.4
	.asciz	"Exiting getlock...\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_getlock                        ; -- Begin function getlock
	.p2align	2
_getlock:                               ; @getlock
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debuglog
Lloh2:
	adrp	x8, _grace_expired@GOTPAGE
Lloh3:
	ldr	x8, [x8, _grace_expired@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	cbnz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x21]
	cbz	x8, LBB0_9
LBB0_2:
	add	x22, x21, #52
	add	x23, x21, #60
	ldr	w0, [x20]
	bl	_svc_getrpccaller
	ldr	x2, [x0]
	ldr	w3, [x21, #48]
	mov	x0, x22
	mov	x1, x23
	bl	_allocate_file_lock
	cbz	x0, LBB0_8
; %bb.3:
	mov	x20, x0
	ldr	w8, [x21, #32]
	cmp	w8, #4
	b.eq	LBB0_5
; %bb.4:
	mov	w9, #4
	stp	x8, x9, [sp]
Lloh5:
	adrp	x0, l_.str.2@PAGE
Lloh6:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_debuglog
LBB0_5:
	ldr	x1, [x21, #40]
	ldr	w2, [x21, #56]
	ldp	w4, w3, [x21, #20]
	ldp	w6, w5, [x21, #12]
	ldr	w8, [x21, #8]
	stp	w19, w8, [sp]
	mov	x0, x20
	mov	w7, #0
	bl	_fill_file_lock
	bl	_siglock
	str	x20, [sp]
Lloh7:
	adrp	x21, l_.str.3@PAGE
Lloh8:
	add	x21, x21, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_debuglog
	mov	x0, x20
	bl	_do_lock
	mov	x19, x0
	str	x20, [sp]
	mov	x0, x21
	bl	_debuglog
	bl	_sigunlock
	and	w8, w19, #0xfffffffe
	cmp	w8, #128
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x20
	bl	_deallocate_file_lock
LBB0_7:
Lloh9:
	adrp	x0, l_.str.4@PAGE
Lloh10:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_debuglog
	b	LBB0_11
LBB0_8:
Lloh11:
	adrp	x8, _LOG_NOTICE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _LOG_NOTICE@GOTPAGEOFF]
Lloh13:
	ldr	w20, [x8]
Lloh14:
	adrp	x8, _errno@GOTPAGE
Lloh15:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_syslog
Lloh19:
	adrp	x8, _LOCK_V4@GOTPAGE
Lloh20:
	ldr	x8, [x8, _LOCK_V4@GOTPAGEOFF]
Lloh21:
	adrp	x9, _nlm4_denied_nolocks@GOTPAGE
Lloh22:
	ldr	x9, [x9, _nlm4_denied_nolocks@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x10, _nlm_denied_nolocks@GOTPAGE
Lloh25:
	ldr	x10, [x10, _nlm_denied_nolocks@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh26:
	adrp	x8, _LOCK_V4@GOTPAGE
Lloh27:
	ldr	x8, [x8, _LOCK_V4@GOTPAGEOFF]
Lloh28:
	adrp	x9, _nlm4_denied_grace_period@GOTPAGE
Lloh29:
	ldr	x9, [x9, _nlm4_denied_grace_period@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x10, _nlm_denied_grace_period@GOTPAGE
Lloh32:
	ldr	x10, [x10, _nlm_denied_grace_period@GOTPAGEOFF]
LBB0_10:
	tst	w8, w19
	csel	x8, x10, x9, eq
	ldr	w19, [x8]
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh23
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh31, Lloh32
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Entering getlock...\n"

	.comm	_grace_expired,8,3              ; @grace_expired
	.comm	_LOCK_V4,4,2                    ; @LOCK_V4
	.comm	_nlm4_denied_grace_period,4,2   ; @nlm4_denied_grace_period
	.comm	_nlm_denied_grace_period,4,2    ; @nlm_denied_grace_period
	.comm	_LOG_NOTICE,4,2                 ; @LOG_NOTICE
l_.str.1:                               ; @.str.1
	.asciz	"lock allocate failed: %s"

	.comm	_errno,4,2                      ; @errno
	.comm	_nlm4_denied_nolocks,4,2        ; @nlm4_denied_nolocks
	.comm	_nlm_denied_nolocks,4,2         ; @nlm_denied_nolocks
l_.str.2:                               ; @.str.2
	.asciz	"received fhandle size %d, local size %d"

l_.str.3:                               ; @.str.3
	.asciz	"Pointer to new lock is %p\n"

l_.str.4:                               ; @.str.4
	.asciz	"Exiting getlock...\n"

.subsections_via_symbols
