	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function table_lock
_table_lock:                            ## @table_lock
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	-32(%rbp), %r15
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	_IPFW_TMFLAGS_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, -28(%rbp)
	movl	%ebx, %eax
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.1:
	movq	_IPFW_TGFLAGS_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	orl	%eax, -32(%rbp)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_table_do_modify
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	testl	%ebx, %ebx
	movq	_EX_OSERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	callq	_err
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IPFW_TMFLAGS_LOCK,4,2          ## @IPFW_TMFLAGS_LOCK
	.comm	_IPFW_TGFLAGS_LOCKED,4,2        ## @IPFW_TGFLAGS_LOCKED
	.comm	_EX_OSERR,4,2                   ## @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Table %s failed"

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

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

	.no_dead_strip	_table_lock
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function table_lock
_table_lock:                            ; @table_lock
	.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	x19, x1
	mov	x20, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
Lloh0:
	adrp	x8, _IPFW_TMFLAGS_LOCK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IPFW_TMFLAGS_LOCK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w10, w9, [sp, #8]
	orr	w8, w9, w8
Lloh3:
	adrp	x9, _IPFW_TGFLAGS_LOCKED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IPFW_TGFLAGS_LOCKED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w9, wzr, w9, eq
	orr	w9, w10, w9
	stp	w9, w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x20
	bl	_table_do_modify
	cbz	x0, LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _EX_OSERR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EX_OSERR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x8, l_.str.1@PAGE
Lloh10:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh11:
	adrp	x9, l_.str.2@PAGE
Lloh12:
	add	x9, x9, l_.str.2@PAGEOFF
	cmp	w19, #0
	csel	x2, x9, x8, eq
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_err
LBB0_2:
	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 AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IPFW_TMFLAGS_LOCK,4,2          ; @IPFW_TMFLAGS_LOCK
	.comm	_IPFW_TGFLAGS_LOCKED,4,2        ; @IPFW_TGFLAGS_LOCKED
	.comm	_EX_OSERR,4,2                   ; @EX_OSERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Table %s failed"

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

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

	.no_dead_strip	_table_lock
.subsections_via_symbols
