	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_hash_prepare_request
_s5p_hash_prepare_request:              ## @s5p_hash_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, %r14d
	movq	%rdi, %rbx
	callq	_ahash_request_ctx
	movq	%rax, %rcx
	movq	%rax, %r15
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%r14d, %r14d
	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:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	8(%rcx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	$4, %rcx
	xorl	%r14d, %r14d
	testl	%r12d, %r12d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_6
## %bb.7:
	movq	_BUFLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%edx, %edi
	callq	_IS_ALIGNED
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	jmp	LBB0_10
LBB0_3:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	8(%r15), %edx
	movl	%edx, 4(%r15)
	xorl	%r14d, %r14d
	testl	%edx, %edx
	je	LBB0_22
## %bb.4:
	leaq	8(%rcx), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	addq	$4, %rcx
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	jmp	LBB0_10
LBB0_2:
	xorl	%r14d, %r14d
	jmp	LBB0_22
LBB0_6:
	xorl	%r12d, %r12d
	jmp	LBB0_10
LBB0_9:
	movl	(%rbx), %r14d
	movslq	8(%r15), %rdi
	movl	%edi, %eax
	cltd
	idivl	%r14d
	subl	%edx, %r14d
	cmpl	%r12d, %r14d
	cmovgel	%r12d, %r14d
	addq	40(%r15), %rdi
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	4(%rax), %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_scatterwalk_map_and_copy
	movl	8(%r15), %edx
	addl	%r14d, %edx
	movl	%edx, 8(%r15)
	subl	%r14d, %r12d
LBB0_10:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movl	%r12d, -76(%rbp)                ## 4-byte Spill
	movl	%r14d, 12(%r15)
	testl	%edx, %edx
	je	LBB0_12
## %bb.11:
	movq	32(%r15), %rax
	movq	40(%r15), %rsi
	movq	(%rax), %rdi
	callq	_memcpy
LBB0_12:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %r12d
	testl	%r13d, %r13d
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_14
## %bb.13:
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_15
LBB0_14:
	movq	_BUFLEN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r12d, %edi
	callq	_IS_ALIGNED
	movl	(%rbx), %ebx
	movl	%r12d, %ecx
	subl	%ebx, %ecx
	negl	%ebx
	andl	%r12d, %ebx
	testq	%rax, %rax
	cmovnel	%ecx, %ebx
	movl	4(%r15), %ecx
	subl	%ebx, %ecx
	movq	40(%r15), %rdi
	movl	(%r14), %edx
	movl	4(%r14), %esi
	subl	%ecx, %edx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	xorl	%r8d, %r8d
	callq	_scatterwalk_map_and_copy
	movl	%ebx, %r12d
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_15:
	movq	_BUFLEN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jle	LBB0_17
## %bb.16:
	movl	4(%r14), %esi
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	subl	%ebx, %edx
	movq	%r15, %rdi
	movl	%r13d, %ecx
	callq	_s5p_hash_prepare_sgs
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_22
	jmp	LBB0_20
LBB0_17:
	xorl	%edi, %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$0, (%rax)
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movq	32(%r15), %rax
	movq	(%rax), %rdi
	movl	4(%r14), %esi
	xorl	%edx, %edx
	movl	%r12d, %ecx
	xorl	%r8d, %r8d
	callq	_scatterwalk_map_and_copy
LBB0_19:
	movl	20(%r15), %edi
	movl	$1, %esi
	callq	_sg_init_table
	movl	20(%r15), %edi
	movq	32(%r15), %rax
	movq	(%rax), %rsi
	movl	%r12d, %edx
	callq	_sg_set_buf
	movl	20(%r15), %eax
	movl	%eax, 24(%r15)
	movl	$1, 16(%r15)
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
LBB0_20:
	xorl	%r14d, %r14d
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	%ebx, (%rax)
	testl	%r13d, %r13d
	jne	LBB0_22
## %bb.21:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%r12d, (%rax)
LBB0_22:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BUFLEN,4,2                     ## @BUFLEN
	.no_dead_strip	_s5p_hash_prepare_request
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5p_hash_prepare_request
_s5p_hash_prepare_request:              ; @s5p_hash_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	x22, x1
	mov	x21, x0
	bl	_ahash_request_ctx
	mov	x20, x0
	ldr	w19, [x0]
	cbz	w22, LBB0_5
; %bb.1:
	ldr	w27, [x21]
	mov	x25, x20
	ldr	w2, [x25, #8]!
	mov	x26, x20
	adds	w8, w2, w27
	str	w8, [x26, #4]!
	b.eq	LBB0_7
; %bb.2:
	cbz	w27, LBB0_8
; %bb.3:
Lloh0:
	adrp	x22, _BUFLEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _BUFLEN@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x2
	bl	_IS_ALIGNED
	cbz	x0, LBB0_21
; %bb.4:
	mov	w23, #0
	ldr	w2, [x25]
	str	w23, [x20, #12]
	cbnz	w2, LBB0_9
	b	LBB0_10
LBB0_5:
	mov	w23, #0
	mov	x25, x20
	ldr	w2, [x25, #8]!
	mov	x26, x20
	str	w2, [x26, #4]!
	cbz	w2, LBB0_20
; %bb.6:
	mov	x27, x23
	str	w23, [x20, #12]
	cbnz	w2, LBB0_9
	b	LBB0_10
LBB0_7:
	mov	w23, #0
	b	LBB0_20
LBB0_8:
	mov	w23, #0
	str	w23, [x20, #12]
	cbz	w2, LBB0_10
LBB0_9:
	ldp	x8, x1, [x20, #32]
	ldr	x0, [x8]
	bl	_memcpy
LBB0_10:
	ldr	w22, [x26]
	cbz	w19, LBB0_12
; %bb.11:
	mov	w24, #0
	b	LBB0_13
LBB0_12:
Lloh2:
	adrp	x23, _BUFLEN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _BUFLEN@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x22
	bl	_IS_ALIGNED
	ldr	w8, [x23]
	sub	w9, w22, w8
	neg	w8, w8
	and	w8, w22, w8
	cmp	x0, #0
	csel	w22, w8, w9, eq
	ldr	w8, [x20, #4]
	ldr	x0, [x20, #40]
	ldp	w9, w1, [x21]
	sub	w24, w8, w22
	sub	w2, w9, w24
	mov	x3, x24
	mov	w4, #0
	bl	_scatterwalk_map_and_copy
LBB0_13:
Lloh4:
	adrp	x8, _BUFLEN@GOTPAGE
Lloh5:
	ldr	x8, [x8, _BUFLEN@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w22, w8
	b.le	LBB0_15
; %bb.14:
	ldr	w1, [x21, #4]
	sub	w2, w27, w24
	mov	x0, x20
	mov	x3, x19
	bl	_s5p_hash_prepare_sgs
	mov	x23, x0
	cbnz	w0, LBB0_20
	b	LBB0_18
LBB0_15:
	ldr	w8, [x25]
	cmp	w8, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_17
; %bb.16:
	ldr	x8, [x20, #32]
	ldr	x0, [x8]
	ldr	w1, [x21, #4]
	mov	w2, #0
	mov	x3, x22
	mov	w4, #0
	bl	_scatterwalk_map_and_copy
LBB0_17:
	ldr	w0, [x20, #20]
	mov	w21, #1
	mov	w1, #1
	bl	_sg_init_table
	ldr	w0, [x20, #20]
	ldr	x8, [x20, #32]
	ldr	x1, [x8]
	mov	x2, x22
	bl	_sg_set_buf
	ldr	w8, [x20, #20]
	str	w8, [x20, #24]
	str	w21, [x20, #16]
LBB0_18:
	str	w24, [x25]
	mov	w23, #0
	cbnz	w19, LBB0_20
; %bb.19:
	str	w22, [x26]
LBB0_20:
	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
LBB0_21:
	ldr	w8, [x22]
	ldrsw	x9, [x20, #8]
	sdiv	w10, w9, w8
	neg	w11, w9
	madd	w10, w10, w8, w11
	add	w8, w8, w10
	cmp	w8, w27
	csel	w23, w8, w27, lt
	ldr	x8, [x20, #40]
	add	x0, x8, x9
	ldr	w1, [x21, #4]
	mov	w2, #0
	mov	x3, x23
	mov	w4, #0
	bl	_scatterwalk_map_and_copy
	ldr	w8, [x20, #8]
	add	w2, w8, w23
	str	w2, [x20, #8]
	sub	w27, w27, w23
	str	w23, [x20, #12]
	cbnz	w2, LBB0_9
	b	LBB0_10
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFLEN,4,2                     ; @BUFLEN
	.no_dead_strip	_s5p_hash_prepare_request
.subsections_via_symbols
