	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_hash_done_task
_img_hash_done_task:                    ## @img_hash_done_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movl	(%rdi), %esi
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%esi, %eax
	je	LBB0_12
## %bb.1:
	movq	_DRIVER_FLAGS_BUSY@GOTPCREL(%rip), %rcx
	movl	4(%rbx), %eax
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.2:
	movq	_DRIVER_FLAGS_CPU@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.3:
	movq	_DRIVER_FLAGS_OUTPUT_READY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_4
LBB0_11:
	notl	%ecx
	andl	%eax, %ecx
	movl	%ecx, 4(%rbx)
	xorl	%esi, %esi
LBB0_12:
	movl	8(%rbx), %edi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_img_hash_finish_req            ## TAILCALL
LBB0_13:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_img_hash_handle_queue          ## TAILCALL
LBB0_5:
	movq	_DRIVER_FLAGS_DMA_READY@GOTPCREL(%rip), %r14
	testl	%eax, (%r14)
	je	LBB0_4
## %bb.6:
	movq	_DRIVER_FLAGS_DMA_ACTIVE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_9
## %bb.7:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_img_hash_write_via_dma_stop
	movl	(%rbx), %esi
	testl	%esi, %esi
	jne	LBB0_12
## %bb.8:
	movl	4(%rbx), %eax
LBB0_9:
	movq	_DRIVER_FLAGS_OUTPUT_READY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, %eax
	je	LBB0_4
## %bb.10:
	orl	(%r14), %ecx
	jmp	LBB0_11
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DRIVER_FLAGS_BUSY,4,2          ## @DRIVER_FLAGS_BUSY
	.comm	_DRIVER_FLAGS_CPU,4,2           ## @DRIVER_FLAGS_CPU
	.comm	_DRIVER_FLAGS_OUTPUT_READY,4,2  ## @DRIVER_FLAGS_OUTPUT_READY
	.comm	_DRIVER_FLAGS_DMA_READY,4,2     ## @DRIVER_FLAGS_DMA_READY
	.comm	_DRIVER_FLAGS_DMA_ACTIVE,4,2    ## @DRIVER_FLAGS_DMA_ACTIVE
	.no_dead_strip	_img_hash_done_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_done_task
_img_hash_done_task:                    ; @img_hash_done_task
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.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	w1, [x0]
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmn	w1, w8
	b.eq	LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _DRIVER_FLAGS_BUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DRIVER_FLAGS_BUSY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x8]
	ldr	w8, [x19, #4]
	tst	w8, w9
	b.eq	LBB0_6
; %bb.2:
Lloh6:
	adrp	x9, _DRIVER_FLAGS_CPU@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DRIVER_FLAGS_CPU@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.3:
Lloh9:
	adrp	x9, _DRIVER_FLAGS_OUTPUT_READY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DRIVER_FLAGS_OUTPUT_READY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_13
LBB0_4:
	mov	w1, #0
	bic	w8, w8, w9
	str	w8, [x19, #4]
LBB0_5:
	ldr	w0, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_img_hash_finish_req
LBB0_6:
	mov	x0, x19
	mov	x1, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_img_hash_handle_queue
LBB0_7:
Lloh12:
	adrp	x20, _DRIVER_FLAGS_DMA_READY@GOTPAGE
Lloh13:
	ldr	x20, [x20, _DRIVER_FLAGS_DMA_READY@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.eq	LBB0_13
; %bb.8:
Lloh14:
	adrp	x9, _DRIVER_FLAGS_DMA_ACTIVE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DRIVER_FLAGS_DMA_ACTIVE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_11
; %bb.9:
	bic	w8, w8, w9
	str	w8, [x19, #4]
	mov	x0, x19
	bl	_img_hash_write_via_dma_stop
	ldr	w1, [x19]
	cbnz	w1, LBB0_5
; %bb.10:
	ldr	w8, [x19, #4]
LBB0_11:
Lloh17:
	adrp	x9, _DRIVER_FLAGS_OUTPUT_READY@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DRIVER_FLAGS_OUTPUT_READY@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w8, w9
	b.eq	LBB0_13
; %bb.12:
	ldr	w10, [x20]
	orr	w9, w10, w9
	b	LBB0_4
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DRIVER_FLAGS_BUSY,4,2          ; @DRIVER_FLAGS_BUSY
	.comm	_DRIVER_FLAGS_CPU,4,2           ; @DRIVER_FLAGS_CPU
	.comm	_DRIVER_FLAGS_OUTPUT_READY,4,2  ; @DRIVER_FLAGS_OUTPUT_READY
	.comm	_DRIVER_FLAGS_DMA_READY,4,2     ; @DRIVER_FLAGS_DMA_READY
	.comm	_DRIVER_FLAGS_DMA_ACTIVE,4,2    ; @DRIVER_FLAGS_DMA_ACTIVE
	.no_dead_strip	_img_hash_done_task
.subsections_via_symbols
