	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_hash_dma_init
_img_hash_dma_init:                     ## @img_hash_dma_init
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dma_request_slave_channel
	movl	%eax, (%r14)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -24(%rbp)
	movl	8(%r14), %ecx
	movl	%ecx, -28(%rbp)
	movq	_DMA_SLAVE_BUSWIDTH_4_BYTES@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -32(%rbp)
	movq	_IMG_HASH_DMA_BURST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -36(%rbp)
	movl	$0, -40(%rbp)
	leaq	-40(%rbp), %rsi
	movl	%eax, %edi
	callq	_dmaengine_slave_config
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %ebx
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movl	(%r14), %edi
	callq	_dma_release_channel
	jmp	LBB0_5
LBB0_1:
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_3:
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tx"

L_.str.1:                               ## @.str.1
	.asciz	"Couldn't acquire a slave DMA channel.\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_DMA_MEM_TO_DEV,4,2             ## @DMA_MEM_TO_DEV
	.comm	_DMA_SLAVE_BUSWIDTH_4_BYTES,4,2 ## @DMA_SLAVE_BUSWIDTH_4_BYTES
	.comm	_IMG_HASH_DMA_BURST,4,2         ## @IMG_HASH_DMA_BURST
L_.str.2:                               ## @.str.2
	.asciz	"Couldn't configure DMA slave.\n"

	.no_dead_strip	_img_hash_dma_init
.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_init
_img_hash_dma_init:                     ; @img_hash_dma_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	ldr	w0, [x0, #4]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dma_request_slave_channel
	str	w0, [x19]
	cbz	w0, LBB0_3
; %bb.1:
Lloh2:
	adrp	x8, _DMA_MEM_TO_DEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldr	w8, [x19, #8]
Lloh5:
	adrp	x9, _DMA_SLAVE_BUSWIDTH_4_BYTES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DMA_SLAVE_BUSWIDTH_4_BYTES@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #16]
Lloh8:
	adrp	x8, _IMG_HASH_DMA_BURST@GOTPAGE
Lloh9:
	ldr	x8, [x8, _IMG_HASH_DMA_BURST@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	stp	wzr, w8, [sp, #8]
	add	x1, sp, #8
	bl	_dmaengine_slave_config
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	w0, [x19, #4]
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	w0, [x19]
	bl	_dma_release_channel
	b	LBB0_4
LBB0_3:
	ldr	w0, [x19, #4]
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh15:
	adrp	x8, _EBUSY@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tx"

l_.str.1:                               ; @.str.1
	.asciz	"Couldn't acquire a slave DMA channel.\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_DMA_MEM_TO_DEV,4,2             ; @DMA_MEM_TO_DEV
	.comm	_DMA_SLAVE_BUSWIDTH_4_BYTES,4,2 ; @DMA_SLAVE_BUSWIDTH_4_BYTES
	.comm	_IMG_HASH_DMA_BURST,4,2         ; @IMG_HASH_DMA_BURST
l_.str.2:                               ; @.str.2
	.asciz	"Couldn't configure DMA slave.\n"

	.no_dead_strip	_img_hash_dma_init
.subsections_via_symbols
