	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function file_unlock
_file_unlock:                           ## @file_unlock
	.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
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %r15
	movl	$1, %r14d
	movl	$1, %esi
	movq	%r15, %rdx
	callq	_check_file
	movq	%rax, %r12
	movq	%rbx, %rdi
	movl	$2, %esi
	xorl	%edx, %edx
	callq	_luaL_optlong
	movq	%rax, %r13
	movq	%rbx, %rdi
	movl	$3, %esi
	xorl	%edx, %edx
	callq	_luaL_optlong
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rcx
	movq	%rax, %r8
	movq	%r15, %r9
	callq	__file_lock
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_lua_pushboolean
	jmp	LBB0_3
LBB0_2:
	movq	%rbx, %rdi
	callq	_lua_pushnil
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_lua_pushfstring
	movl	$2, %r14d
LBB0_3:
	movl	%r14d, %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	"unlock"

L_.str.1:                               ## @.str.1
	.asciz	"u"

L_.str.2:                               ## @.str.2
	.asciz	"%s"

	.comm	_errno,4,2                      ## @errno
	.no_dead_strip	_file_unlock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function file_unlock
_file_unlock:                           ; @file_unlock
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x20, l_.str@PAGE
Lloh1:
	add	x20, x20, l_.str@PAGEOFF
	mov	w1, #1
	mov	x2, x20
	bl	_check_file
	mov	x21, x0
	mov	x0, x19
	mov	w1, #2
	mov	w2, #0
	bl	_luaL_optlong
	mov	x22, x0
	mov	x0, x19
	mov	w1, #3
	mov	w2, #0
	bl	_luaL_optlong
	mov	x4, x0
Lloh2:
	adrp	x2, l_.str.1@PAGE
Lloh3:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x3, x22
	mov	x5, x20
	bl	__file_lock
	cbz	x0, LBB0_2
; %bb.1:
	mov	w20, #1
	mov	x0, x19
	mov	w1, #1
	bl	_lua_pushboolean
	b	LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_lua_pushnil
Lloh4:
	adrp	x8, _errno@GOTPAGE
Lloh5:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	bl	_strerror
	mov	x2, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_lua_pushfstring
	mov	w20, #2
LBB0_3:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unlock"

l_.str.1:                               ; @.str.1
	.asciz	"u"

l_.str.2:                               ; @.str.2
	.asciz	"%s"

	.comm	_errno,4,2                      ; @errno
	.no_dead_strip	_file_unlock
.subsections_via_symbols
