	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5p_hash_prepare_sgs
_s5p_hash_prepare_sgs:                  ## @s5p_hash_prepare_sgs
	.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
	testq	%rsi, %rsi
	je	LBB0_18
## %bb.1:
	testl	%edx, %edx
	je	LBB0_18
## %bb.2:
	movq	%rdi, %rax
	movl	(%rsi), %edi
	testl	%edi, %edi
	je	LBB0_18
## %bb.3:
	movl	%ecx, -72(%rbp)                 ## 4-byte Spill
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	(%rax), %r13d
	movl	$1, %r12d
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r15d
	movl	%r13d, -68(%rbp)                ## 4-byte Spill
	movl	%r13d, %r14d
	subl	%edi, %r14d
	jae	LBB0_5
	.p2align	4, 0x90
LBB0_7:
	subl	%r13d, %edi
	movq	_BUFLEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_IS_ALIGNED
	testl	%eax, %eax
	je	LBB0_6
## %bb.8:
	movl	(%rbx), %eax
	subl	%r13d, %eax
	subl	%eax, %r15d
	jb	LBB0_19
## %bb.9:
	xorl	%r14d, %r14d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_5:
	testl	%edi, %edi
	je	LBB0_6
LBB0_10:
	movq	%rbx, %rdi
	callq	_sg_next
	testl	%r15d, %r15d
	je	LBB0_13
## %bb.11:
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movl	(%rbx), %edi
	incl	%r12d
	movl	%r14d, %r13d
	subl	%edi, %r14d
	jae	LBB0_5
	jmp	LBB0_7
LBB0_6:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_s5p_hash_copy_sgs              ## TAILCALL
LBB0_13:
	cmpl	$0, -72(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_19
## %bb.14:
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_19
## %bb.15:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 24(%rbx)
	je	LBB0_17
## %bb.16:
	movl	%r12d, 4(%rbx)
	movq	16(%rbx), %rdi
	movl	$2, %esi
	callq	_sg_init_table
	movq	32(%rbx), %rax
	movl	(%rax), %esi
	movq	16(%rbx), %rdi
	movq	24(%rbx), %rdx
	callq	_sg_set_buf
	movq	16(%rbx), %rdi
	movl	$2, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	callq	_sg_chain
	movq	16(%rbx), %rax
	movq	%rax, 8(%rbx)
	incl	4(%rbx)
	jmp	LBB0_18
LBB0_19:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_s5p_hash_copy_sg_lists         ## TAILCALL
LBB0_17:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 8(%rbx)
	movl	%r12d, 4(%rbx)
LBB0_18:
	xorl	%eax, %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_sgs
.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_sgs
_s5p_hash_prepare_sgs:                  ; @s5p_hash_prepare_sgs
	.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
	cbz	x1, LBB0_18
; %bb.1:
	mov	x21, x2
	cbz	w2, LBB0_18
; %bb.2:
	mov	x20, x1
	ldr	w8, [x1]
	cbz	w8, LBB0_18
; %bb.3:
	mov	x22, x3
	mov	x19, x0
	ldr	w25, [x0]
	mov	w24, #1
Lloh0:
	adrp	x26, _BUFLEN@GOTPAGE
Lloh1:
	ldr	x26, [x26, _BUFLEN@GOTPAGEOFF]
	mov	x23, x20
	mov	x27, x21
	mov	x28, x25
	subs	w9, w28, w8
	b.hs	LBB0_7
LBB0_4:
	sub	w0, w8, w28
	ldr	w1, [x26]
	bl	_IS_ALIGNED
	cbz	w0, LBB0_11
; %bb.5:
	ldr	w8, [x23]
	sub	w8, w8, w28
	subs	w27, w27, w8
	b.lo	LBB0_16
; %bb.6:
	mov	w28, #0
	b	LBB0_8
LBB0_7:
	mov	x28, x9
	cbz	w8, LBB0_11
LBB0_8:
	mov	x0, x23
	bl	_sg_next
	cbz	w27, LBB0_12
; %bb.9:
	mov	x23, x0
	cbz	x0, LBB0_12
; %bb.10:
	ldr	w8, [x23]
	add	w24, w24, #1
	subs	w9, w28, w8
	b.hs	LBB0_7
	b	LBB0_4
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	mov	x2, 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	_s5p_hash_copy_sgs
LBB0_12:
	cbz	w22, LBB0_16
; %bb.13:
	cbnz	w25, LBB0_16
; %bb.14:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_17
; %bb.15:
	str	w24, [x19, #4]
	ldr	x0, [x19, #16]
	mov	w1, #2
	bl	_sg_init_table
	ldp	x2, x8, [x19, #24]
	ldr	w1, [x8]
	ldr	x0, [x19, #16]
	bl	_sg_set_buf
	ldr	x0, [x19, #16]
	mov	w1, #2
	mov	x2, x20
	bl	_sg_chain
	ldr	x8, [x19, #16]
	str	x8, [x19, #8]
	ldr	w8, [x19, #4]
	add	w8, w8, #1
	str	w8, [x19, #4]
	b	LBB0_18
LBB0_16:
	mov	x0, x19
	mov	x1, x20
	mov	x2, 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	_s5p_hash_copy_sg_lists
LBB0_17:
	str	x20, [x19, #8]
	str	w24, [x19, #4]
LBB0_18:
	mov	w0, #0
	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 AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_BUFLEN,4,2                     ; @BUFLEN
	.no_dead_strip	_s5p_hash_prepare_sgs
.subsections_via_symbols
