	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function talitos_sg_unmap
_talitos_sg_unmap:                      ## @talitos_sg_unmap
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %eax
	movl	4(%rsi), %r12d
	testl	%eax, %eax
	movl	$1, %ecx
	cmovel	%ecx, %eax
	testl	%r12d, %r12d
	cmovel	%ecx, %r12d
	movq	8(%rsi), %rsi
	cmpq	%r15, %rdx
	je	LBB0_7
## %bb.1:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.2:
	movq	%rdx, %rsi
	movl	%ecx, %edx
	callq	_talitos_unmap_sg_chain
	jmp	LBB0_4
LBB0_7:
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	%r14, %rdi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.8:
	movq	%rdx, %rsi
	jmp	LBB0_9
LBB0_3:
	movq	%rdx, %rsi
	movl	%eax, %edx
	callq	_dma_unmap_sg
LBB0_4:
	cmpq	$0, 16(%rbx)
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r15, %rsi
	je	LBB0_5
LBB0_9:
	movl	%ecx, %edx
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_talitos_unmap_sg_chain         ## TAILCALL
LBB0_5:
	movl	%r12d, %edx
	jmp	LBB0_6
LBB0_10:
	movq	%rdx, %rsi
	movl	%eax, %edx
LBB0_6:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_unmap_sg                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_talitos_sg_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function talitos_sg_unmap
_talitos_sg_unmap:                      ; @talitos_sg_unmap
	.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	x8, x2
	mov	x19, x0
	ldp	w9, w10, [x1]
	cmp	w9, #0
	csinc	w2, w9, wzr, ne
	cmp	w10, #0
	csinc	w21, w10, wzr, ne
	ldr	x9, [x1, #8]
	cmp	x8, x3
	b.eq	LBB0_3
; %bb.1:
	mov	x20, x3
	mov	x22, x1
Lloh0:
	adrp	x10, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w3, [x10]
	mov	x0, x19
	mov	x1, x8
	cbz	x9, LBB0_4
; %bb.2:
	mov	x2, x3
	bl	_talitos_unmap_sg_chain
	b	LBB0_5
LBB0_3:
Lloh3:
	adrp	x10, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh4:
	ldr	x10, [x10, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x10]
	mov	x0, x19
	mov	x1, x8
	cbnz	x9, LBB0_6
	b	LBB0_8
LBB0_4:
	bl	_dma_unmap_sg
LBB0_5:
	ldr	x8, [x22, #16]
Lloh6:
	adrp	x9, _DMA_FROM_DEVICE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x9]
	mov	x0, x19
	mov	x1, x20
	cbz	x8, LBB0_7
LBB0_6:
	mov	x2, x3
	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
	b	_talitos_unmap_sg_chain
LBB0_7:
	mov	x2, x21
LBB0_8:
	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
	b	_dma_unmap_sg
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_talitos_sg_unmap
.subsections_via_symbols
