	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sec_alg_alloc_and_calc_split_sizes
_sec_alg_alloc_and_calc_split_sizes:    ## @sec_alg_alloc_and_calc_split_sizes
	.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	%rdx, %rbx
	movq	%rsi, %r14
	movl	%edi, %r15d
	movq	_SEC_REQ_LIMIT@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_roundup
	cltd
	idivl	(%r12)
	movl	%eax, (%rbx)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movl	%eax, %edi
	movl	$8, %esi
	callq	_kcalloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movl	(%rbx), %ecx
	leal	-1(%rcx), %r8d
	movslq	(%r12), %rdx
	cmpl	$2, %ecx
	jl	LBB0_13
## %bb.2:
	movl	%r8d, %esi
	cmpl	$4, %r8d
	jae	LBB0_4
## %bb.3:
	xorl	%edi, %edi
	jmp	LBB0_12
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_14
LBB0_4:
	movl	%esi, %edi
	andl	$-4, %edi
	movq	%rdx, %xmm0
	pshufd	$68, %xmm0, %xmm0               ## xmm0 = xmm0[0,1,0,1]
	leaq	-4(%rdi), %rcx
	movq	%rcx, %rbx
	shrq	$2, %rbx
	incq	%rbx
	movl	%ebx, %r9d
	andl	$7, %r9d
	cmpq	$28, %rcx
	jae	LBB0_6
## %bb.5:
	xorl	%ecx, %ecx
	jmp	LBB0_8
LBB0_6:
	andq	$-8, %rbx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, (%rax,%rcx,8)
	movdqu	%xmm0, 16(%rax,%rcx,8)
	movdqu	%xmm0, 32(%rax,%rcx,8)
	movdqu	%xmm0, 48(%rax,%rcx,8)
	movdqu	%xmm0, 64(%rax,%rcx,8)
	movdqu	%xmm0, 80(%rax,%rcx,8)
	movdqu	%xmm0, 96(%rax,%rcx,8)
	movdqu	%xmm0, 112(%rax,%rcx,8)
	movdqu	%xmm0, 128(%rax,%rcx,8)
	movdqu	%xmm0, 144(%rax,%rcx,8)
	movdqu	%xmm0, 160(%rax,%rcx,8)
	movdqu	%xmm0, 176(%rax,%rcx,8)
	movdqu	%xmm0, 192(%rax,%rcx,8)
	movdqu	%xmm0, 208(%rax,%rcx,8)
	movdqu	%xmm0, 224(%rax,%rcx,8)
	movdqu	%xmm0, 240(%rax,%rcx,8)
	addq	$32, %rcx
	addq	$-8, %rbx
	jne	LBB0_7
LBB0_8:
	testq	%r9, %r9
	je	LBB0_11
## %bb.9:
	leaq	(%rax,%rcx,8), %rcx
	addq	$16, %rcx
	shlq	$5, %r9
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movdqu	%xmm0, -16(%rcx,%rbx)
	movdqu	%xmm0, (%rcx,%rbx)
	addq	$32, %rbx
	cmpq	%rbx, %r9
	jne	LBB0_10
LBB0_11:
	cmpq	%rsi, %rdi
	je	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rdx, (%rax,%rdi,8)
	incq	%rdi
	cmpq	%rdi, %rsi
	jne	LBB0_12
LBB0_13:
	imull	%r8d, %edx
	subl	%edx, %r15d
	movslq	%r15d, %rcx
	movslq	%r8d, %rdx
	movq	%rcx, (%rax,%rdx,8)
	movq	%rax, (%r14)
	xorl	%eax, %eax
LBB0_14:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SEC_REQ_LIMIT,4,2              ## @SEC_REQ_LIMIT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_sec_alg_alloc_and_calc_split_sizes
.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_calc_split_sizes
_sec_alg_alloc_and_calc_split_sizes:    ; @sec_alg_alloc_and_calc_split_sizes
	.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	x21, x2
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x22, _SEC_REQ_LIMIT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _SEC_REQ_LIMIT@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_roundup
	ldr	w8, [x22]
	sdiv	w0, w0, w8
	str	w0, [x21]
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
	mov	w1, #8
	bl	_kcalloc
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w8, [x21]
	sub	w9, w8, #1
	ldrsw	x10, [x22]
	cmp	w8, #2
	b.lt	LBB0_10
; %bb.2:
	cmp	w9, #8
	b.hs	LBB0_5
; %bb.3:
	mov	x8, #0
	b	LBB0_8
LBB0_4:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w8, w8
	b	LBB0_11
LBB0_5:
	and	x8, x9, #0xfffffff8
	dup.2d	v0, x10
	add	x11, x0, #32
	mov	x12, x8
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	stp	q0, q0, [x11, #-32]
	stp	q0, q0, [x11], #64
	subs	x12, x12, #8
	b.ne	LBB0_6
; %bb.7:
	cmp	x8, x9
	b.eq	LBB0_10
LBB0_8:
	add	x11, x0, x8, lsl #3
	sub	x8, x9, x8
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	str	x10, [x11], #8
	subs	x8, x8, #1
	b.ne	LBB0_9
LBB0_10:
	mov	w8, #0
	msub	w10, w10, w9, w20
	sxtw	x10, w10
	str	x10, [x0, w9, sxtw #3]
	str	x0, [x19]
LBB0_11:
	mov	x0, x8
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_SEC_REQ_LIMIT,4,2              ; @SEC_REQ_LIMIT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_sec_alg_alloc_and_calc_split_sizes
.subsections_via_symbols
