	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipfw_add_table_algo            ## -- Begin function ipfw_add_table_algo
	.p2align	4, 0x90
_ipfw_add_table_algo:                   ## @ipfw_add_table_algo
	.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
	cmpq	$25, %rdx
	jae	LBB0_1
## %bb.2:
	movq	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	20(%rsi), %edi
	movl	$8, %esi
	callq	_roundup2
	movq	_TA_BUF_SZ@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jbe	LBB0_3
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_7
LBB0_3:
	movq	(%r12), %rax
	movq	_IPFW_TABLE_MAXTYPE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setle	%dil
	leaq	L_.str(%rip), %rsi
	callq	_KASSERT
	movq	_M_IPFW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_M_WAITOK@GOTPCREL(%rip), %rax
	movq	_M_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	$24, %edi
	callq	_malloc
	movq	%rax, %r13
	movq	%rax, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_memcpy
	movq	%r15, %rdi
	callq	_CHAIN_TO_TCFG
	movq	%rax, %rbx
	xorl	%edi, %edi
	cmpl	$255, (%rax)
	setl	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_KASSERT
	movq	16(%rbx), %rcx
	movslq	(%rbx), %rdx
	leaq	1(%rdx), %rax
	movl	%eax, (%rbx)
	movq	%r13, 8(%rcx,%rdx,8)
	movq	%rax, 8(%r13)
	movq	_TA_FLAG_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 16(%r13)
	je	LBB0_6
## %bb.4:
	movq	8(%rbx), %rcx
	movq	(%r13), %rdx
	cmpq	$0, (%rcx,%rdx,8)
	jne	LBB0_6
## %bb.5:
	movq	%r13, (%rcx,%rdx,8)
LBB0_6:
	movl	%eax, (%r14)
	xorl	%eax, %eax
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TA_BUF_SZ,8,3                  ## @TA_BUF_SZ
	.comm	_IPFW_TABLE_MAXTYPE,8,3         ## @IPFW_TABLE_MAXTYPE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Increase IPFW_TABLE_MAXTYPE"

	.comm	_M_IPFW,4,2                     ## @M_IPFW
	.comm	_M_WAITOK,4,2                   ## @M_WAITOK
	.comm	_M_ZERO,4,2                     ## @M_ZERO
L_.str.1:                               ## @.str.1
	.asciz	"Increase algo array size"

	.comm	_TA_FLAG_DEFAULT,4,2            ## @TA_FLAG_DEFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ipfw_add_table_algo            ; -- Begin function ipfw_add_table_algo
	.p2align	2
_ipfw_add_table_algo:                   ; @ipfw_add_table_algo
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cmp	x2, #25
	b.hs	LBB0_2
; %bb.1:
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x20, x0
	ldr	w0, [x1, #20]
	mov	w1, #8
	bl	_roundup2
Lloh0:
	adrp	x8, _TA_BUF_SZ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TA_BUF_SZ@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ls	LBB0_3
LBB0_2:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_7
LBB0_3:
	ldr	x8, [x22]
Lloh6:
	adrp	x9, _IPFW_TABLE_MAXTYPE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _IPFW_TABLE_MAXTYPE@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, le
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_KASSERT
Lloh11:
	adrp	x8, _M_IPFW@GOTPAGE
Lloh12:
	ldr	x8, [x8, _M_IPFW@GOTPAGEOFF]
Lloh13:
	adrp	x9, _M_WAITOK@GOTPAGE
Lloh14:
	ldr	x9, [x9, _M_WAITOK@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	ldr	w8, [x9]
Lloh17:
	adrp	x9, _M_ZERO@GOTPAGE
Lloh18:
	ldr	x9, [x9, _M_ZERO@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w9, w8
	mov	w0, #24
	bl	_malloc
	mov	x23, x0
	mov	x1, x22
	mov	x2, x21
	bl	_memcpy
	mov	x0, x20
	bl	_CHAIN_TO_TCFG
	mov	x20, x0
	ldr	w8, [x0]
	cmp	w8, #255
	cset	w0, lt
Lloh20:
	adrp	x1, l_.str.1@PAGE
Lloh21:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_KASSERT
	ldr	x9, [x20, #16]
	ldrsw	x8, [x20]
	add	x8, x8, #1
	str	w8, [x20]
	str	x23, [x9, x8, lsl #3]
	str	x8, [x23, #8]
	ldr	w9, [x23, #16]
Lloh22:
	adrp	x10, _TA_FLAG_DEFAULT@GOTPAGE
Lloh23:
	ldr	x10, [x10, _TA_FLAG_DEFAULT@GOTPAGEOFF]
Lloh24:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.4:
	ldr	x9, [x20, #8]
	ldr	x10, [x23]
	ldr	x11, [x9, x10, lsl #3]
	cbnz	x11, LBB0_6
; %bb.5:
	str	x23, [x9, x10, lsl #3]
LBB0_6:
	mov	w0, #0
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh15
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TA_BUF_SZ,8,3                  ; @TA_BUF_SZ
	.comm	_IPFW_TABLE_MAXTYPE,8,3         ; @IPFW_TABLE_MAXTYPE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Increase IPFW_TABLE_MAXTYPE"

	.comm	_M_IPFW,4,2                     ; @M_IPFW
	.comm	_M_WAITOK,4,2                   ; @M_WAITOK
	.comm	_M_ZERO,4,2                     ; @M_ZERO
l_.str.1:                               ; @.str.1
	.asciz	"Increase algo array size"

	.comm	_TA_FLAG_DEFAULT,4,2            ; @TA_FLAG_DEFAULT
.subsections_via_symbols
