	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sec_alg_alloc_and_fill_el
_sec_alg_alloc_and_fill_el:             ## @sec_alg_alloc_and_fill_el
	.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	%r9d, -44(%rbp)                 ## 4-byte Spill
	movq	%r8, %r13
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	32(%rbp), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	24(%rbp), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	16(%rbp), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$88, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rbx
	movl	%r12d, (%rax)
	leaq	40(%rax), %rdi
	movq	%r15, %rsi
	movl	$48, %edx
	callq	_memcpy
	movq	_SEC_BD_W0_CIPHER_M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	40(%rbx), %eax
	testl	%r14d, %r14d
	jne	LBB0_4
## %bb.5:
	movq	_SEC_CIPHER_DECRYPT@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_2
LBB0_4:
	movq	_SEC_CIPHER_ENCRYPT@GOTPCREL(%rip), %rcx
LBB0_6:
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	movq	%r13, %rdx
	movl	(%rcx), %esi
	movq	_SEC_BD_W0_CIPHER_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	orl	%eax, %esi
	movl	%r12d, %eax
	sarl	$16, %eax
	movq	_SEC_BD_W0_C_GRAN_SIZE_19_16_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_SEC_BD_W0_C_GRAN_SIZE_19_16_M@GOTPCREL(%rip), %rcx
	xorl	%esi, %eax
	andl	(%rcx), %eax
	xorl	%esi, %eax
	movl	%r12d, %esi
	sarl	$20, %esi
	movq	_SEC_BD_W0_C_GRAN_SIZE_21_20_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %esi
	movq	_SEC_BD_W0_C_GRAN_SIZE_21_20_M@GOTPCREL(%rip), %rcx
	xorl	%eax, %esi
	andl	(%rcx), %esi
	xorl	%eax, %esi
	movl	%esi, 40(%rbx)
	movq	_SEC_BD_W2_GRAN_NUM_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	_SEC_BD_W2_GRAN_NUM_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_SEC_BD_W2_C_GRAN_SIZE_15_0_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r12d
	movq	_SEC_BD_W2_C_GRAN_SIZE_15_0_M@GOTPCREL(%rip), %rcx
	andl	(%rcx), %r12d
	orl	%eax, %r12d
	movl	%r12d, 44(%rbx)
	movq	_SEC_BD_W3_CIPHER_LEN_OFFSET_M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 84(%rbx)
	movq	_SEC_BD_W1_ADDR_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 80(%rbx)
	movq	%r13, 32(%rbx)
	leaq	8(%rbx), %r12
	leaq	4(%rbx), %r14
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r8d, %ecx
	movq	-72(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %r8
	callq	_sec_alloc_and_fill_hw_sgl
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_7
LBB0_13:
	movq	%rbx, %rdi
	callq	_kfree
	movl	%r15d, %edi
LBB0_2:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_7:
	movl	4(%rbx), %edi
	callq	_lower_32_bits
	movq	%rax, 72(%rbx)
	movl	4(%rbx), %edi
	callq	_upper_32_bits
	movq	%rax, 64(%rbx)
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.8:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, 16(%rbx)
	leaq	24(%rbx), %rdi
	movq	%rbx, %rsi
	addq	$12, %rsi
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	movq	%r13, %r8
	callq	_sec_alloc_and_fill_hw_sgl
	testl	%eax, %eax
	je	LBB0_9
## %bb.12:
	movl	%eax, %r15d
	movl	(%r12), %edi
	movl	(%r14), %esi
	movq	%r13, %rdx
	callq	_sec_free_hw_sgl
	jmp	LBB0_13
LBB0_11:
	movq	_SEC_BD_W0_DE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	andl	%eax, 40(%rbx)
	movl	4(%rbx), %edi
	callq	_lower_32_bits
	movq	%rax, 56(%rbx)
	movl	4(%rbx), %edi
	jmp	LBB0_10
LBB0_9:
	movq	_SEC_BD_W0_DE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 40(%rbx)
	movl	12(%rbx), %edi
	callq	_lower_32_bits
	movq	%rax, 56(%rbx)
	movl	12(%rbx), %edi
LBB0_10:
	callq	_upper_32_bits
	movq	%rax, 48(%rbx)
	movq	%rbx, %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_SEC_BD_W0_CIPHER_M,4,2         ## @SEC_BD_W0_CIPHER_M
	.comm	_SEC_CIPHER_ENCRYPT,4,2         ## @SEC_CIPHER_ENCRYPT
	.comm	_SEC_BD_W0_CIPHER_S,4,2         ## @SEC_BD_W0_CIPHER_S
	.comm	_SEC_CIPHER_DECRYPT,4,2         ## @SEC_CIPHER_DECRYPT
	.comm	_SEC_BD_W0_C_GRAN_SIZE_19_16_M,4,2 ## @SEC_BD_W0_C_GRAN_SIZE_19_16_M
	.comm	_SEC_BD_W0_C_GRAN_SIZE_19_16_S,4,2 ## @SEC_BD_W0_C_GRAN_SIZE_19_16_S
	.comm	_SEC_BD_W0_C_GRAN_SIZE_21_20_M,4,2 ## @SEC_BD_W0_C_GRAN_SIZE_21_20_M
	.comm	_SEC_BD_W0_C_GRAN_SIZE_21_20_S,4,2 ## @SEC_BD_W0_C_GRAN_SIZE_21_20_S
	.comm	_SEC_BD_W2_GRAN_NUM_S,4,2       ## @SEC_BD_W2_GRAN_NUM_S
	.comm	_SEC_BD_W2_GRAN_NUM_M,4,2       ## @SEC_BD_W2_GRAN_NUM_M
	.comm	_SEC_BD_W2_C_GRAN_SIZE_15_0_S,4,2 ## @SEC_BD_W2_C_GRAN_SIZE_15_0_S
	.comm	_SEC_BD_W2_C_GRAN_SIZE_15_0_M,4,2 ## @SEC_BD_W2_C_GRAN_SIZE_15_0_M
	.comm	_SEC_BD_W3_CIPHER_LEN_OFFSET_M,4,2 ## @SEC_BD_W3_CIPHER_LEN_OFFSET_M
	.comm	_SEC_BD_W1_ADDR_TYPE,4,2        ## @SEC_BD_W1_ADDR_TYPE
	.comm	_SEC_BD_W0_DE,4,2               ## @SEC_BD_W0_DE
	.no_dead_strip	_sec_alg_alloc_and_fill_el
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sec_alg_alloc_and_fill_el
_sec_alg_alloc_and_fill_el:             ; @sec_alg_alloc_and_fill_el
	.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	x21, x7
	mov	x22, x6
	mov	x24, x5
	mov	x25, x4
	mov	x23, x3
	mov	x26, x2
	mov	x27, x1
	mov	x28, x0
	ldr	x20, [x29, #16]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #88
	bl	_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	str	w26, [x0], #40
	mov	x1, x28
	mov	w2, #48
	bl	_memcpy
Lloh3:
	adrp	x8, _SEC_BD_W0_CIPHER_M@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEC_BD_W0_CIPHER_M@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
Lloh6:
	adrp	x10, _SEC_CIPHER_DECRYPT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _SEC_CIPHER_DECRYPT@GOTPAGEOFF]
Lloh8:
	adrp	x11, _SEC_CIPHER_ENCRYPT@GOTPAGE
Lloh9:
	ldr	x11, [x11, _SEC_CIPHER_ENCRYPT@GOTPAGEOFF]
	bic	w8, w9, w8
	cmp	w27, #0
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
Lloh10:
	adrp	x10, _SEC_BD_W0_CIPHER_S@GOTPAGE
Lloh11:
	ldr	x10, [x10, _SEC_BD_W0_CIPHER_S@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	lsl	w9, w9, w10
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _SEC_BD_W0_C_GRAN_SIZE_19_16_M@GOTPAGE
Lloh14:
	ldr	x9, [x9, _SEC_BD_W0_C_GRAN_SIZE_19_16_M@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	bic	w8, w8, w9
	asr	w10, w26, #16
Lloh16:
	adrp	x11, _SEC_BD_W0_C_GRAN_SIZE_19_16_S@GOTPAGE
Lloh17:
	ldr	x11, [x11, _SEC_BD_W0_C_GRAN_SIZE_19_16_S@GOTPAGEOFF]
Lloh18:
	ldr	w11, [x11]
	lsl	w10, w10, w11
	and	w9, w10, w9
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _SEC_BD_W0_C_GRAN_SIZE_21_20_M@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SEC_BD_W0_C_GRAN_SIZE_21_20_M@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	bic	w8, w8, w9
	asr	w10, w26, #20
Lloh22:
	adrp	x11, _SEC_BD_W0_C_GRAN_SIZE_21_20_S@GOTPAGE
Lloh23:
	ldr	x11, [x11, _SEC_BD_W0_C_GRAN_SIZE_21_20_S@GOTPAGEOFF]
Lloh24:
	ldr	w11, [x11]
	lsl	w10, w10, w11
	and	w9, w10, w9
	orr	w8, w9, w8
Lloh25:
	adrp	x9, _SEC_BD_W2_GRAN_NUM_S@GOTPAGE
Lloh26:
	ldr	x9, [x9, _SEC_BD_W2_GRAN_NUM_S@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
Lloh28:
	adrp	x10, _SEC_BD_W2_GRAN_NUM_M@GOTPAGE
Lloh29:
	ldr	x10, [x10, _SEC_BD_W2_GRAN_NUM_M@GOTPAGEOFF]
Lloh30:
	ldr	w10, [x10]
	and	w9, w9, w10
Lloh31:
	adrp	x10, _SEC_BD_W2_C_GRAN_SIZE_15_0_S@GOTPAGE
Lloh32:
	ldr	x10, [x10, _SEC_BD_W2_C_GRAN_SIZE_15_0_S@GOTPAGEOFF]
Lloh33:
	ldr	w10, [x10]
	lsl	w10, w26, w10
Lloh34:
	adrp	x11, _SEC_BD_W2_C_GRAN_SIZE_15_0_M@GOTPAGE
Lloh35:
	ldr	x11, [x11, _SEC_BD_W2_C_GRAN_SIZE_15_0_M@GOTPAGEOFF]
Lloh36:
	ldr	w11, [x11]
	and	w10, w10, w11
	orr	w9, w10, w9
	stp	w8, w9, [x19, #40]
Lloh37:
	adrp	x8, _SEC_BD_W3_CIPHER_LEN_OFFSET_M@GOTPAGE
Lloh38:
	ldr	x8, [x8, _SEC_BD_W3_CIPHER_LEN_OFFSET_M@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	ldp	w10, w9, [x19, #80]
	bic	w8, w9, w8
Lloh40:
	adrp	x9, _SEC_BD_W1_ADDR_TYPE@GOTPAGE
Lloh41:
	ldr	x9, [x9, _SEC_BD_W1_ADDR_TYPE@GOTPAGEOFF]
Lloh42:
	ldr	w9, [x9]
	orr	w9, w10, w9
	stp	w9, w8, [x19, #80]
	add	x26, x19, #8
	add	x27, x19, #4
	str	x25, [x19, #32]
	mov	x0, x26
	mov	x1, x27
	mov	x2, x25
	mov	x3, x24
	mov	x4, x20
	bl	_sec_alloc_and_fill_hw_sgl
	mov	x24, x0
	cbz	w0, LBB0_5
LBB0_2:
	mov	x0, x19
	bl	_kfree
	mov	x0, x24
	b	LBB0_4
LBB0_3:
Lloh43:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh44:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	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	_ERR_PTR
LBB0_5:
	ldr	w0, [x19, #4]
	bl	_lower_32_bits
	str	x0, [x19, #72]
	ldr	w0, [x19, #4]
	bl	_upper_32_bits
	str	x0, [x19, #64]
	cbz	w23, LBB0_8
; %bb.6:
	str	x22, [x19, #16]
	add	x0, x19, #24
	add	x1, x19, #12
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_sec_alloc_and_fill_hw_sgl
	cbz	w0, LBB0_9
; %bb.7:
	mov	x24, x0
	ldr	w0, [x26]
	ldr	w1, [x27]
	mov	x2, x20
	bl	_sec_free_hw_sgl
	b	LBB0_2
LBB0_8:
Lloh46:
	adrp	x8, _SEC_BD_W0_DE@GOTPAGE
Lloh47:
	ldr	x8, [x8, _SEC_BD_W0_DE@GOTPAGEOFF]
Lloh48:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	bic	w8, w9, w8
	str	w8, [x19, #40]
	ldr	w0, [x19, #4]
	bl	_lower_32_bits
	str	x0, [x19, #56]
	ldr	w0, [x19, #4]
	b	LBB0_10
LBB0_9:
Lloh49:
	adrp	x8, _SEC_BD_W0_DE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _SEC_BD_W0_DE@GOTPAGEOFF]
Lloh51:
	ldr	w8, [x8]
	ldr	w9, [x19, #40]
	orr	w8, w9, w8
	str	w8, [x19, #40]
	ldr	w0, [x19, #12]
	bl	_lower_32_bits
	str	x0, [x19, #56]
	ldr	w0, [x19, #12]
LBB0_10:
	bl	_upper_32_bits
	str	x0, [x19, #48]
	mov	x0, x19
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_SEC_BD_W0_CIPHER_M,4,2         ; @SEC_BD_W0_CIPHER_M
	.comm	_SEC_CIPHER_ENCRYPT,4,2         ; @SEC_CIPHER_ENCRYPT
	.comm	_SEC_BD_W0_CIPHER_S,4,2         ; @SEC_BD_W0_CIPHER_S
	.comm	_SEC_CIPHER_DECRYPT,4,2         ; @SEC_CIPHER_DECRYPT
	.comm	_SEC_BD_W0_C_GRAN_SIZE_19_16_M,4,2 ; @SEC_BD_W0_C_GRAN_SIZE_19_16_M
	.comm	_SEC_BD_W0_C_GRAN_SIZE_19_16_S,4,2 ; @SEC_BD_W0_C_GRAN_SIZE_19_16_S
	.comm	_SEC_BD_W0_C_GRAN_SIZE_21_20_M,4,2 ; @SEC_BD_W0_C_GRAN_SIZE_21_20_M
	.comm	_SEC_BD_W0_C_GRAN_SIZE_21_20_S,4,2 ; @SEC_BD_W0_C_GRAN_SIZE_21_20_S
	.comm	_SEC_BD_W2_GRAN_NUM_S,4,2       ; @SEC_BD_W2_GRAN_NUM_S
	.comm	_SEC_BD_W2_GRAN_NUM_M,4,2       ; @SEC_BD_W2_GRAN_NUM_M
	.comm	_SEC_BD_W2_C_GRAN_SIZE_15_0_S,4,2 ; @SEC_BD_W2_C_GRAN_SIZE_15_0_S
	.comm	_SEC_BD_W2_C_GRAN_SIZE_15_0_M,4,2 ; @SEC_BD_W2_C_GRAN_SIZE_15_0_M
	.comm	_SEC_BD_W3_CIPHER_LEN_OFFSET_M,4,2 ; @SEC_BD_W3_CIPHER_LEN_OFFSET_M
	.comm	_SEC_BD_W1_ADDR_TYPE,4,2        ; @SEC_BD_W1_ADDR_TYPE
	.comm	_SEC_BD_W0_DE,4,2               ; @SEC_BD_W0_DE
	.no_dead_strip	_sec_alg_alloc_and_fill_el
.subsections_via_symbols
