	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipsec_esp_unmap
_ipsec_esp_unmap:                       ## @ipsec_esp_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdx, %rdi
	callq	_crypto_aead_reqtfm
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_crypto_aead_ctx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_crypto_aead_ivsize
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	callq	_crypto_aead_authsize
	movl	%eax, %r12d
	movl	(%r13), %ecx
	xorl	%eax, %eax
	testl	%r14d, %r14d
	cmovel	%r12d, %eax
	subl	%eax, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	_DESC_HDR_TYPE_IPSEC_ESP@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	movq	32(%r15), %rsi
	andl	24(%r15), %ebx
	sete	%al
	leaq	8(%rsi,%rax,4), %rcx
	je	LBB0_2
## %bb.1:
	addq	$24, %rsi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %r14d
	movq	%rcx, %rbx
	callq	_unmap_single_talitos_ptr
	movq	%rbx, %rcx
	movl	%r14d, %ebx
LBB0_2:
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%rcx, %rsi
	callq	_unmap_single_talitos_ptr
	movl	20(%r13), %edx
	movl	16(%r13), %ecx
	addl	-44(%rbp), %r12d                ## 4-byte Folded Reload
	movq	8(%r13), %r9
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%r12d, %r8d
	callq	_talitos_sg_unmap
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_4
## %bb.3:
	movl	16(%r15), %esi
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_dma_unmap_single
LBB0_4:
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.5:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	(%r15), %eax
	testl	%eax, %eax
	movl	$1, %esi
	cmovnel	%eax, %esi
	movl	16(%r13), %edi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, %eax
	subq	%rax, %r8
	addq	8(%r13), %r8
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sg_pcopy_to_buffer             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DESC_HDR_TYPE_IPSEC_ESP,4,2    ## @DESC_HDR_TYPE_IPSEC_ESP
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
	.no_dead_strip	_ipsec_esp_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipsec_esp_unmap
_ipsec_esp_unmap:                       ; @ipsec_esp_unmap
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x3
	mov	x19, x2
	mov	x20, x1
	mov	x23, x0
	mov	x0, x2
	bl	_crypto_aead_reqtfm
	mov	x24, x0
	bl	_crypto_aead_ctx
	mov	x22, x0
	mov	x0, x24
	bl	_crypto_aead_ivsize
	mov	x21, x0
	mov	x0, x24
	bl	_crypto_aead_authsize
	mov	x24, x0
	ldr	w8, [x19]
	cmp	w25, #0
	csel	w9, w0, wzr, eq
	sub	w26, w8, w9
	ldr	w8, [x20, #24]
Lloh0:
	adrp	x9, _DESC_HDR_TYPE_IPSEC_ESP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DESC_HDR_TYPE_IPSEC_ESP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ands	w27, w9, w8
	ldr	x8, [x20, #32]
	mov	w9, #8
	mov	w10, #12
	csel	x9, x10, x9, eq
	add	x25, x8, x9
	cbz	w27, LBB0_2
; %bb.1:
	add	x1, x8, #24
Lloh3:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x23
	bl	_unmap_single_talitos_ptr
LBB0_2:
Lloh6:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x25
	bl	_unmap_single_talitos_ptr
	ldp	w3, w2, [x19, #16]
	add	w4, w26, w24
	ldr	x5, [x19, #8]
	mov	x0, x23
	mov	x1, x20
	bl	_talitos_sg_unmap
	ldr	x2, [x20, #8]
	cbz	x2, LBB0_4
; %bb.3:
	ldr	w1, [x20, #16]
Lloh9:
	adrp	x8, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	mov	x0, x23
	bl	_dma_unmap_single
LBB0_4:
	cbz	w27, LBB0_6
; %bb.5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_6:
	ldr	w8, [x20]
	cmp	w8, #0
	csinc	w1, w8, wzr, ne
	ldr	w0, [x19, #16]
	ldr	w2, [x22]
	ldr	x8, [x19, #8]
	sub	x9, x26, w21, uxtw
	add	x4, x9, x8
	mov	x3, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_sg_pcopy_to_buffer
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DESC_HDR_TYPE_IPSEC_ESP,4,2    ; @DESC_HDR_TYPE_IPSEC_ESP
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
	.no_dead_strip	_ipsec_esp_unmap
.subsections_via_symbols
