	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_free_ctx_mem
_bnxt_free_ctx_mem:                     ## @bnxt_free_ctx_mem
	.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
	movq	8(%rdi), %r14
	testq	%r14, %r14
	je	LBB0_9
## %bb.1:
	movq	%rdi, %r15
	movq	32(%r14), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_8
## %bb.2:
	cmpl	$0, (%r15)
	js	LBB0_7
## %bb.3:
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	cmpl	$0, (%r15)
	jle	LBB0_6
## %bb.4:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r14), %rax
	movq	8(%rax,%rbx,8), %rsi
	incq	%rbx
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
LBB0_6:
	movq	32(%r14), %rax
	movq	(%rax), %rsi
LBB0_7:
	movq	%rsi, %rdi
	callq	_kfree
	movq	32(%r14), %rax
	movq	$0, (%rax)
LBB0_8:
	leaq	28(%r14), %rsi
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	leaq	24(%r14), %rsi
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	leaq	20(%r14), %rsi
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	leaq	16(%r14), %rsi
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	leaq	12(%r14), %rsi
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	leaq	8(%r14), %rsi
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	leaq	4(%r14), %rsi
	movq	%r15, %rdi
	callq	_bnxt_free_ctx_pg_tbls
	movq	_BNXT_CTX_FLAG_INITED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNXT_CTX_FLAG_INITED,4,2       ## @BNXT_CTX_FLAG_INITED
	.no_dead_strip	_bnxt_free_ctx_mem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_free_ctx_mem
_bnxt_free_ctx_mem:                     ; @bnxt_free_ctx_mem
	.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
	ldr	x20, [x0, #8]
	cbz	x20, LBB0_9
; %bb.1:
	mov	x19, x0
	ldr	x8, [x20, #32]
	ldr	x1, [x8]
	cbz	x1, LBB0_8
; %bb.2:
	ldr	w8, [x19]
	tbnz	w8, #31, LBB0_7
; %bb.3:
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x8, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	add	x21, x8, #1
	ldr	x9, [x20, #32]
	add	x8, x9, x8, lsl #3
	ldr	x1, [x8, #8]
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
	ldrsw	x9, [x19]
	mov	x8, x21
	cmp	x21, x9
	b.lt	LBB0_5
LBB0_6:
	ldr	x8, [x20, #32]
	ldr	x1, [x8]
LBB0_7:
	mov	x0, x1
	bl	_kfree
	ldr	x8, [x20, #32]
	str	xzr, [x8]
LBB0_8:
	add	x1, x20, #28
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
	add	x1, x20, #24
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
	add	x1, x20, #20
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
	add	x1, x20, #16
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
	add	x1, x20, #12
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
	add	x1, x20, #8
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
	add	x1, x20, #4
	mov	x0, x19
	bl	_bnxt_free_ctx_pg_tbls
Lloh0:
	adrp	x8, _BNXT_CTX_FLAG_INITED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BNXT_CTX_FLAG_INITED@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_BNXT_CTX_FLAG_INITED,4,2       ; @BNXT_CTX_FLAG_INITED
	.no_dead_strip	_bnxt_free_ctx_mem
.subsections_via_symbols
