	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function err_free_sgl
_err_free_sgl:                          ## @err_free_sgl
	.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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r14, %rdi
	callq	_sg_is_chain
	movq	%r14, %rbx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rbx
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_sg_virt
	movl	%eax, %edi
	callq	_kfree
	movq	%rbx, %rdi
	callq	_sg_is_last
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	addq	$4, %rbx
	movq	%rbx, %rdi
	callq	_sg_is_chain
	testl	%eax, %eax
	je	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_sg_is_last
	testq	%rax, %rax
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_sg_chain_ptr
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_free_page
	movq	%rbx, %r14
	testq	%rbx, %rbx
	jne	LBB0_2
LBB0_8:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_9:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_free_page                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_err_free_sgl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function err_free_sgl
_err_free_sgl:                          ; @err_free_sgl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	x0, LBB0_8
; %bb.1:
	mov	x19, x0
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	x0, x19
	bl	_sg_is_chain
	mov	x20, x19
	cbnz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, x19
LBB0_4:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_sg_virt
	bl	_kfree
	mov	x0, x20
	bl	_sg_is_last
	cbnz	x0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	add	x20, x20, #4
	mov	x0, x20
	bl	_sg_is_chain
	cbz	w0, LBB0_4
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_sg_is_last
	cbnz	x0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_sg_chain_ptr
	mov	x20, x0
	mov	x0, x19
	bl	_free_page
	mov	x19, x20
	cbnz	x20, LBB0_2
LBB0_8:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_free_page
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_err_free_sgl
.subsections_via_symbols
