	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_hash_dma_task
_img_hash_dma_task:                     ## @img_hash_dma_task
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movl	12(%rdi), %edi
	callq	_ahash_request_ctx
	cmpl	$0, 12(%r14)
	je	LBB0_19
## %bb.1:
	movq	%rax, %r13
	movq	16(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.2:
	callq	_sg_virt
	movq	(%r13), %rdx
	movq	16(%r13), %rcx
	movq	(%rcx), %rbx
	subq	%rdx, %rbx
	movl	%ebx, %r15d
	andl	$3, %r15d
	cmpq	$4, %rbx
	jae	LBB0_10
## %bb.3:
	xorl	%r12d, %r12d
	testq	%r15, %r15
	je	LBB0_18
LBB0_4:
	movl	44(%r13), %edi
	movl	40(%r13), %esi
	movq	24(%r13), %r8
	movq	32(%r13), %rdx
	movq	%r15, %rcx
	callq	_sg_pcopy_to_buffer
	movl	%eax, 8(%r13)
	movq	16(%r13), %rdi
	callq	_sg_next
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:
	movl	8(%r13), %edx
	cmpl	$3, %edx
	jg	LBB0_13
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	$4, %ecx
	subl	%edx, %ecx
	movq	(%rax), %rbx
	xorl	%edi, %edi
	cmpq	%rcx, %rbx
	seta	%dil
	callq	_likely
	movslq	8(%r13), %r8
	movl	$4, %ecx
	subq	%r8, %rcx
	testq	%rax, %rax
	cmoveq	%rbx, %rcx
	movl	40(%r13), %esi
	movl	44(%r13), %edi
	movq	32(%r13), %rdx
	addq	%r8, %rdx
	addq	24(%r13), %r8
	callq	_sg_pcopy_to_buffer
	movq	%rax, %rcx
	addl	%ecx, 8(%r13)
	movq	16(%r13), %rax
	cmpq	%rcx, (%rax)
	ja	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	%rax, %rdi
	callq	_sg_next
	movq	%rax, 16(%r13)
	xorl	%ecx, %ecx
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	8(%r13), %edx
	cmpl	$3, %edx
	jle	LBB0_6
	jmp	LBB0_14
LBB0_10:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	(%rax,%rdx,4), %rsi
	movq	%rbx, %r12
	andq	$-4, %r12
	leaq	-48(%rbp), %rdi
	movq	%r12, %rdx
	callq	_sg_init_one
	movq	%r14, %rdi
	leaq	-48(%rbp), %rsi
	callq	_img_hash_xmit_dma
	testq	%rax, %rax
	je	LBB0_16
## %bb.11:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_DRIVER_FLAGS_CPU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 48(%r13)
	movq	$0, (%r14)
	movq	(%r13), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	callq	_img_hash_xmit_cpu
	jmp	LBB0_17
LBB0_13:
	xorl	%ecx, %ecx
LBB0_14:
	movslq	8(%r13), %rax
	addq	%rax, 24(%r13)
	movq	%rcx, (%r13)
	testq	%r12, %r12
	jne	LBB0_19
## %bb.15:
	movq	%r14, %rdi
	callq	_img_hash_dma_callback
	jmp	LBB0_19
LBB0_16:
	shrq	$2, %rbx
LBB0_17:
	addq	%r12, 24(%r13)
	movq	%rbx, %r12
	testq	%r15, %r15
	jne	LBB0_4
LBB0_18:
	movq	$0, (%r13)
	movq	16(%r13), %rdi
	callq	_sg_next
	movq	%rax, 16(%r13)
LBB0_19:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DMA failed, falling back to CPU"

	.comm	_DRIVER_FLAGS_CPU,4,2           ## @DRIVER_FLAGS_CPU
	.no_dead_strip	_img_hash_dma_task
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function img_hash_dma_task
_img_hash_dma_task:                     ; @img_hash_dma_task
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x0, #12]
	bl	_ahash_request_ctx
	ldr	w8, [x19, #12]
	cbz	w8, LBB0_19
; %bb.1:
	mov	x20, x0
	ldr	x0, [x0, #16]
	cbz	x0, LBB0_19
; %bb.2:
	bl	_sg_virt
	ldr	x8, [x20, #16]
	ldr	x9, [x8]
	ldr	x8, [x20]
	sub	x24, x9, x8
	and	x21, x24, #0x3
	cmp	x24, #4
	b.hs	LBB0_11
; %bb.3:
	mov	x23, #0
	cbz	x21, LBB0_18
LBB0_4:
	ldp	w1, w0, [x20, #40]
	ldp	x4, x2, [x20, #24]
	mov	x3, x21
	bl	_sg_pcopy_to_buffer
	str	w0, [x20, #8]
	ldr	x0, [x20, #16]
	bl	_sg_next
	str	x0, [x20, #16]
	cbz	x0, LBB0_13
; %bb.5:
	ldr	w9, [x20, #8]
	cmp	w9, #3
	b.gt	LBB0_13
; %bb.6:
	mov	w21, #4
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x22, [x0]
	sub	w8, w21, w9
	cmp	x22, x8
	cset	w0, hi
	bl	_likely
	ldrsw	x8, [x20, #8]
	sub	x9, x21, x8
	cmp	x0, #0
	csel	x3, x22, x9, eq
	ldp	w1, w0, [x20, #40]
	ldp	x10, x9, [x20, #24]
	add	x2, x9, x8
	add	x4, x10, x8
	bl	_sg_pcopy_to_buffer
	mov	x8, x0
	ldr	w9, [x20, #8]
	add	w9, w9, w8
	str	w9, [x20, #8]
	ldr	x0, [x20, #16]
	ldr	x9, [x0]
	cmp	x9, x8
	b.hi	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_sg_next
	mov	x8, #0
	str	x0, [x20, #16]
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	cbz	x0, LBB0_14
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x20, #8]
	cmp	w9, #3
	b.le	LBB0_7
	b	LBB0_14
LBB0_11:
	mov	x23, x0
	add	x1, x0, x8, lsl #2
	and	x22, x24, #0xfffffffffffffffc
	add	x0, sp, #8
	mov	x2, x22
	bl	_sg_init_one
	add	x1, sp, #8
	mov	x0, x19
	bl	_img_hash_xmit_dma
	cbz	x0, LBB0_16
; %bb.12:
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _DRIVER_FLAGS_CPU@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DRIVER_FLAGS_CPU@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	ldr	w9, [x20, #48]
	orr	w8, w9, w8
	str	w8, [x20, #48]
	str	xzr, [x19]
	ldr	x8, [x20]
	add	x1, x23, x8, lsl #2
	mov	x0, x19
	mov	x2, x22
	mov	w3, #0
	bl	_img_hash_xmit_cpu
	mov	x23, #0
	b	LBB0_17
LBB0_13:
	mov	x8, #0
LBB0_14:
	ldrsw	x9, [x20, #8]
	ldr	x10, [x20, #24]
	add	x9, x10, x9
	str	x9, [x20, #24]
	str	x8, [x20]
	cbnz	x23, LBB0_19
; %bb.15:
	mov	x0, x19
	bl	_img_hash_dma_callback
	b	LBB0_19
LBB0_16:
	lsr	x23, x24, #2
LBB0_17:
	ldr	x8, [x20, #24]
	add	x8, x8, x22
	str	x8, [x20, #24]
	cbnz	x21, LBB0_4
LBB0_18:
	str	xzr, [x20]
	ldr	x0, [x20, #16]
	bl	_sg_next
	str	x0, [x20, #16]
LBB0_19:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DMA failed, falling back to CPU"

	.comm	_DRIVER_FLAGS_CPU,4,2           ; @DRIVER_FLAGS_CPU
	.no_dead_strip	_img_hash_dma_task
.subsections_via_symbols
