	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_sham_prepare_request
_omap_sham_prepare_request:             ## @omap_sham_prepare_request
	.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	%esi, %r12d
	movq	%rdi, %rbx
	callq	_ahash_request_ctx
	movq	%rax, %r15
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_FLAGS_FINUP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	movl	%eax, %r14d
	movq	%r15, %rdi
	callq	_get_block_size
	movl	%eax, %r13d
	testl	%r12d, %r12d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.1:
	movl	(%rbx), %r12d
	movl	8(%r15), %edx
	movl	%edx, %eax
	addl	%r12d, %eax
	movl	%eax, 4(%r15)
	je	LBB0_2
## %bb.5:
	leaq	8(%r15), %rbx
	testl	%r12d, %r12d
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.7:
	movl	%edx, %edi
	movl	%r13d, %esi
	callq	_IS_ALIGNED
	movl	(%rbx), %edx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	movslq	%edx, %rdi
	movl	%edi, %eax
	cltd
	idivl	%r13d
	movl	%r13d, %ebx
	subl	%edx, %ebx
	cmpl	%r12d, %ebx
	cmovgel	%r12d, %ebx
	addq	24(%r15), %rdi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	xorl	%r8d, %r8d
	callq	_scatterwalk_map_and_copy
	movl	8(%r15), %edx
	addl	%ebx, %edx
	movl	%edx, 8(%r15)
	subl	%ebx, %r12d
	movl	%ebx, 12(%r15)
	jmp	LBB0_9
LBB0_3:
	movl	8(%r15), %edx
	movl	%edx, 4(%r15)
	xorl	%r12d, %r12d
	testl	%edx, %edx
	je	LBB0_29
## %bb.4:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	leaq	8(%r15), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rax
	addq	$4, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_10
LBB0_2:
	xorl	%r12d, %r12d
	jmp	LBB0_29
LBB0_6:
	xorl	%r12d, %r12d
LBB0_9:
	movq	%r15, %rax
	addq	$4, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%r12d, %r14d
	testl	%edx, %edx
	je	LBB0_11
LBB0_10:
	movq	24(%r15), %rsi
	movq	40(%r15), %rax
	movq	(%rax), %rdi
	callq	_memcpy
	movl	%r12d, %r14d
LBB0_11:
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	andl	-44(%rbp), %ebx                 ## 4-byte Folded Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %edi
	movl	%r14d, %esi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	movq	%r15, %r8
	callq	_omap_sham_align_sgs
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_29
## %bb.12:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r12d
	movl	%r12d, %edi
	movl	%r13d, %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_13
## %bb.16:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	cmovel	%r13d, %eax
	subl	%eax, %r12d
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_13:
	testl	%ebx, %ebx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_15
## %bb.14:
	movl	%r12d, %edi
	movl	%r13d, %esi
	movq	%rcx, %r12
	callq	_DIV_ROUND_UP
	movq	%r12, %rcx
	movl	%eax, %r12d
	imull	%r13d, %r12d
	jmp	LBB0_17
LBB0_15:
	movl	%r12d, %eax
	cltd
	idivl	%r13d
	subl	%edx, %r12d
LBB0_17:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r13d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	subl	%r12d, %r13d
	xorl	%eax, %eax
	testl	%r13d, %r13d
	cmovgl	%r13d, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	testl	%r14d, %r14d
	je	LBB0_20
## %bb.18:
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	32(%r15), %edi
	movl	$2, %esi
	movq	%rcx, %r14
	callq	_sg_init_table
	movl	8(%r15), %edx
	movl	32(%r15), %edi
	movq	40(%r15), %rax
	movq	(%rax), %rsi
	callq	_sg_set_buf
	movl	32(%r15), %edi
	movl	4(%r14), %edx
	movl	$2, %esi
	callq	_sg_chain
	movl	32(%r15), %eax
	movl	%eax, 36(%r15)
	incl	16(%r15)
	jmp	LBB0_22
LBB0_20:
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	32(%r15), %edi
	movl	$1, %esi
	callq	_sg_init_table
	movl	32(%r15), %edi
	movq	40(%r15), %rax
	movq	(%rax), %rsi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_sg_set_buf
	movl	32(%r15), %eax
	movl	%eax, 36(%r15)
	movl	$1, 16(%r15)
LBB0_22:
	xorl	%r12d, %r12d
	movl	$0, %r14d
	testl	%r13d, %r13d
	jle	LBB0_27
## %bb.23:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	movl	-48(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %edx
	subl	%eax, %edx
	jle	LBB0_25
## %bb.24:
	movq	24(%r15), %rdi
	movslq	-44(%rbp), %rsi                 ## 4-byte Folded Reload
	addq	%rdi, %rsi
	callq	_memcpy
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	movl	%r14d, %ecx
	subl	%eax, %ecx
LBB0_25:
	testl	%eax, %eax
	je	LBB0_27
## %bb.26:
	movslq	%ecx, %rdx
	movq	24(%r15), %rdi
	addq	%rdx, %rdi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rcx), %esi
	subl	%r14d, %eax
	addl	%eax, %edx
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_scatterwalk_map_and_copy
LBB0_27:
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movl	%r14d, (%rcx)
	testl	%ebx, %ebx
	jne	LBB0_29
## %bb.28:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
LBB0_29:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FLAGS_FINUP,4,2                ## @FLAGS_FINUP
	.no_dead_strip	_omap_sham_prepare_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_sham_prepare_request
_omap_sham_prepare_request:             ; @omap_sham_prepare_request
	.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	x23, x1
	mov	x19, x0
	bl	_ahash_request_ctx
	mov	x20, x0
	ldr	w27, [x0]
Lloh0:
	adrp	x8, _FLAGS_FINUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FLAGS_FINUP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_BIT
	mov	x21, x0
	mov	x0, x20
	bl	_get_block_size
	mov	x22, x0
	cbz	w23, LBB0_6
; %bb.1:
	ldr	w23, [x19]
	mov	x25, x20
	ldr	w2, [x25, #8]!
	mov	x26, x20
	adds	w8, w2, w23
	str	w8, [x26, #4]!
	b.eq	LBB0_11
; %bb.2:
	cbz	w23, LBB0_5
; %bb.3:
	mov	x0, x2
	mov	x1, x22
	bl	_IS_ALIGNED
	ldr	w2, [x25]
	cbnz	w0, LBB0_5
; %bb.4:
	sxtw	x8, w2
	sdiv	w9, w2, w22
	neg	w10, w2
	madd	w9, w9, w22, w10
	add	w9, w22, w9
	cmp	w9, w23
	csel	w24, w9, w23, lt
	ldr	x9, [x20, #24]
	add	x0, x9, x8
	ldr	w1, [x19, #4]
	mov	w2, #0
	mov	x3, x24
	mov	w4, #0
	bl	_scatterwalk_map_and_copy
	ldr	w8, [x20, #8]
	add	w2, w8, w24
	sub	w23, w23, w24
	stp	w2, w24, [x20, #8]
LBB0_5:
	mov	x24, x23
	cbnz	w2, LBB0_7
	b	LBB0_8
LBB0_6:
	mov	x25, x20
	ldr	w2, [x25, #8]!
	mov	x26, x20
	str	w2, [x26, #4]!
	cbz	w2, LBB0_28
LBB0_7:
	ldr	x8, [x20, #40]
	ldr	x0, [x8]
	ldr	x1, [x20, #24]
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcpy
	mov	x24, x23
LBB0_8:
	and	w21, w21, w27
	ldr	w0, [x19, #4]
	mov	x1, x24
	mov	x2, x22
	mov	x3, x21
	mov	x4, x20
	bl	_omap_sham_align_sgs
	mov	x23, x0
	cbnz	w0, LBB0_28
; %bb.9:
	ldr	w23, [x26]
	mov	x0, x23
	mov	x1, x22
	bl	_IS_ALIGNED
	cbz	w0, LBB0_12
; %bb.10:
	cmp	w21, #0
	csel	w8, w22, wzr, eq
	sub	w22, w23, w8
	b	LBB0_15
LBB0_11:
	mov	w23, #0
	b	LBB0_28
LBB0_12:
	cbz	w21, LBB0_14
; %bb.13:
	mov	x0, x23
	mov	x1, x22
	bl	_DIV_ROUND_UP
	mul	w22, w0, w22
	b	LBB0_15
LBB0_14:
	sdiv	w8, w23, w22
	mul	w22, w8, w22
LBB0_15:
	ldr	w8, [x26]
	sub	w27, w8, w22
	cmp	w27, #0
	csel	w23, w27, wzr, gt
	ldr	w8, [x25]
	cbz	w24, LBB0_18
; %bb.16:
	cbz	w8, LBB0_18
; %bb.17:
	ldr	w0, [x20, #32]
	mov	w1, #2
	bl	_sg_init_table
	ldr	w0, [x20, #32]
	ldr	x8, [x20, #40]
	ldr	x1, [x8]
	ldr	w2, [x20, #8]
	bl	_sg_set_buf
	ldr	w0, [x20, #32]
	ldr	w2, [x19, #4]
	mov	w1, #2
	bl	_sg_chain
	ldr	w8, [x20, #32]
	str	w8, [x20, #36]
	ldr	w8, [x20, #16]
	add	w8, w8, #1
	str	w8, [x20, #16]
	b	LBB0_20
LBB0_18:
	cbz	w8, LBB0_20
; %bb.19:
	ldr	w0, [x20, #32]
	mov	w24, #1
	mov	w1, #1
	bl	_sg_init_table
	ldr	w0, [x20, #32]
	ldr	x8, [x20, #40]
	ldr	x1, [x8]
	mov	x2, x22
	bl	_sg_set_buf
	ldr	w8, [x20, #32]
	str	w8, [x20, #36]
	str	w24, [x20, #16]
LBB0_20:
	cmp	w27, #1
	b.lt	LBB0_23
; %bb.21:
	ldr	w8, [x19]
	subs	w2, w23, w8
	b.le	LBB0_24
; %bb.22:
	ldr	x0, [x20, #24]
	add	x1, x0, w22, sxtw
	bl	_memcpy
	ldr	w8, [x19]
	sub	w9, w23, w8
	cbnz	w8, LBB0_25
	b	LBB0_26
LBB0_23:
	mov	w23, #0
	b	LBB0_26
LBB0_24:
	mov	w9, #0
	cbz	w8, LBB0_26
LBB0_25:
	ldr	x10, [x20, #24]
	add	x0, x10, w9, sxtw
	ldr	w1, [x19, #4]
	sub	w8, w8, w23
	add	w2, w8, w9
	mov	x3, x23
	mov	w4, #0
	bl	_scatterwalk_map_and_copy
LBB0_26:
	str	w23, [x25]
	mov	w23, #0
	cbnz	w21, LBB0_28
; %bb.27:
	str	w22, [x26]
LBB0_28:
	mov	x0, x23
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_FLAGS_FINUP,4,2                ; @FLAGS_FINUP
	.no_dead_strip	_omap_sham_prepare_request
.subsections_via_symbols
