	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lock_file
_lock_file:                             ## @lock_file
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %ebx
	movq	%rdi, %r14
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -24(%rbp)
	leaq	-24(%rbp), %rdi
	callq	_strbuf_addstr
	movq	_LOCK_NO_DEREF@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	jne	LBB0_2
## %bb.1:
	leaq	-24(%rbp), %rdi
	callq	_resolve_symlink
LBB0_2:
	movq	_LOCK_SUFFIX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	-24(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_strbuf_addstr
	movl	-24(%rbp), %edi
	callq	_create_tempfile
	movq	%rax, (%r14)
	movq	%rbx, %rdi
	callq	_strbuf_release
	movq	(%r14), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%rax), %eax
	jmp	LBB0_5
LBB0_3:
	movl	$-1, %eax
LBB0_5:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,4,2                ## @STRBUF_INIT
	.comm	_LOCK_NO_DEREF,4,2              ## @LOCK_NO_DEREF
	.comm	_LOCK_SUFFIX,8,3                ## @LOCK_SUFFIX
	.no_dead_strip	_lock_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lock_file
_lock_file:                             ; @lock_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x0
Lloh0:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x0, sp, #8
	bl	_strbuf_addstr
Lloh3:
	adrp	x8, _LOCK_NO_DEREF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _LOCK_NO_DEREF@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w20
	b.ne	LBB0_2
; %bb.1:
	add	x0, sp, #8
	bl	_resolve_symlink
LBB0_2:
Lloh6:
	adrp	x8, _LOCK_SUFFIX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _LOCK_SUFFIX@GOTPAGEOFF]
Lloh8:
	ldr	x1, [x8]
	add	x0, sp, #8
	bl	_strbuf_addstr
	ldr	w0, [sp, #8]
	bl	_create_tempfile
	str	x0, [x19]
	add	x0, sp, #8
	bl	_strbuf_release
	ldr	x8, [x19]
	cbz	x8, LBB0_4
; %bb.3:
	ldr	w0, [x8]
	b	LBB0_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,4,2                ; @STRBUF_INIT
	.comm	_LOCK_NO_DEREF,4,2              ; @LOCK_NO_DEREF
	.comm	_LOCK_SUFFIX,8,3                ; @LOCK_SUFFIX
	.no_dead_strip	_lock_file
.subsections_via_symbols
