	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function img_irq_handler
_img_irq_handler:                       ## @img_irq_handler
	.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	%rsi, %r14
	movq	_CR_INTSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_img_hash_read
	movl	%eax, %ebx
	movq	_CR_INTCLEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_img_hash_write
	movq	_CR_INT_NEW_RESULTS_SET@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.1:
	movl	4(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_dbg
	movq	_DRIVER_FLAGS_BUSY@GOTPCREL(%rip), %rcx
	movl	(%r14), %eax
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.2:
	movq	_DRIVER_FLAGS_OUTPUT_READY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
	movq	_DRIVER_FLAGS_CPU@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_4
## %bb.3:
	movq	_DRIVER_FLAGS_DMA_READY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%r14)
LBB0_4:
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_tasklet_schedule
	jmp	LBB0_13
LBB0_6:
	movq	_CR_INT_RESULTS_AVAILABLE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_8
## %bb.7:
	movl	4(%r14), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_12
LBB0_5:
	movl	4(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_12
LBB0_8:
	movq	_CR_INT_RESULT_READ_ERR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_10
## %bb.9:
	movl	4(%r14), %edi
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_12
LBB0_10:
	movq	_CR_INT_MESSAGE_WRITE_ERROR@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_13
## %bb.11:
	movl	4(%r14), %edi
	leaq	L_.str.4(%rip), %rsi
LBB0_12:
	callq	_dev_warn
LBB0_13:
	movq	_IRQ_HANDLED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CR_INTSTAT,4,2                 ## @CR_INTSTAT
	.comm	_CR_INTCLEAR,4,2                ## @CR_INTCLEAR
	.comm	_CR_INT_NEW_RESULTS_SET,4,2     ## @CR_INT_NEW_RESULTS_SET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"IRQ CR_INT_NEW_RESULTS_SET\n"

	.comm	_DRIVER_FLAGS_BUSY,4,2          ## @DRIVER_FLAGS_BUSY
	.comm	_DRIVER_FLAGS_OUTPUT_READY,4,2  ## @DRIVER_FLAGS_OUTPUT_READY
	.comm	_DRIVER_FLAGS_CPU,4,2           ## @DRIVER_FLAGS_CPU
	.comm	_DRIVER_FLAGS_DMA_READY,4,2     ## @DRIVER_FLAGS_DMA_READY
L_.str.1:                               ## @.str.1
	.asciz	"HASH interrupt when no active requests.\n"

	.comm	_CR_INT_RESULTS_AVAILABLE,4,2   ## @CR_INT_RESULTS_AVAILABLE
L_.str.2:                               ## @.str.2
	.asciz	"IRQ triggered before the hash had completed\n"

	.comm	_CR_INT_RESULT_READ_ERR,4,2     ## @CR_INT_RESULT_READ_ERR
L_.str.3:                               ## @.str.3
	.asciz	"Attempt to read from an empty result queue\n"

	.comm	_CR_INT_MESSAGE_WRITE_ERROR,4,2 ## @CR_INT_MESSAGE_WRITE_ERROR
L_.str.4:                               ## @.str.4
	.asciz	"Data written before the hardware was configured\n"

	.comm	_IRQ_HANDLED,4,2                ## @IRQ_HANDLED
	.no_dead_strip	_img_irq_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function img_irq_handler
_img_irq_handler:                       ; @img_irq_handler
	.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, x1
Lloh0:
	adrp	x8, _CR_INTSTAT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CR_INTSTAT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_img_hash_read
	mov	x20, x0
Lloh3:
	adrp	x8, _CR_INTCLEAR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _CR_INTCLEAR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_img_hash_write
Lloh6:
	adrp	x8, _CR_INT_NEW_RESULTS_SET@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CR_INT_NEW_RESULTS_SET@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.1:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
Lloh11:
	adrp	x8, _DRIVER_FLAGS_BUSY@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DRIVER_FLAGS_BUSY@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x8]
	ldr	w8, [x19]
	tst	w8, w9
	b.eq	LBB0_7
; %bb.2:
Lloh14:
	adrp	x9, _DRIVER_FLAGS_OUTPUT_READY@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DRIVER_FLAGS_OUTPUT_READY@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
Lloh17:
	adrp	x9, _DRIVER_FLAGS_CPU@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DRIVER_FLAGS_CPU@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_4
; %bb.3:
Lloh20:
	adrp	x9, _DRIVER_FLAGS_DMA_READY@GOTPAGE
Lloh21:
	ldr	x9, [x9, _DRIVER_FLAGS_DMA_READY@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_4:
	add	x0, x19, #8
	bl	_tasklet_schedule
	b	LBB0_13
LBB0_5:
Lloh23:
	adrp	x8, _CR_INT_RESULTS_AVAILABLE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _CR_INT_RESULTS_AVAILABLE@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_8
; %bb.6:
	ldr	w0, [x19, #4]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_7:
	ldr	w0, [x19, #4]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_8:
Lloh30:
	adrp	x8, _CR_INT_RESULT_READ_ERR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _CR_INT_RESULT_READ_ERR@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_10
; %bb.9:
	ldr	w0, [x19, #4]
Lloh33:
	adrp	x1, l_.str.3@PAGE
Lloh34:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_10:
Lloh35:
	adrp	x8, _CR_INT_MESSAGE_WRITE_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CR_INT_MESSAGE_WRITE_ERROR@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_13
; %bb.11:
	ldr	w0, [x19, #4]
Lloh38:
	adrp	x1, l_.str.4@PAGE
Lloh39:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_12:
	bl	_dev_warn
LBB0_13:
Lloh40:
	adrp	x8, _IRQ_HANDLED@GOTPAGE
Lloh41:
	ldr	x8, [x8, _IRQ_HANDLED@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_CR_INTSTAT,4,2                 ; @CR_INTSTAT
	.comm	_CR_INTCLEAR,4,2                ; @CR_INTCLEAR
	.comm	_CR_INT_NEW_RESULTS_SET,4,2     ; @CR_INT_NEW_RESULTS_SET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"IRQ CR_INT_NEW_RESULTS_SET\n"

	.comm	_DRIVER_FLAGS_BUSY,4,2          ; @DRIVER_FLAGS_BUSY
	.comm	_DRIVER_FLAGS_OUTPUT_READY,4,2  ; @DRIVER_FLAGS_OUTPUT_READY
	.comm	_DRIVER_FLAGS_CPU,4,2           ; @DRIVER_FLAGS_CPU
	.comm	_DRIVER_FLAGS_DMA_READY,4,2     ; @DRIVER_FLAGS_DMA_READY
l_.str.1:                               ; @.str.1
	.asciz	"HASH interrupt when no active requests.\n"

	.comm	_CR_INT_RESULTS_AVAILABLE,4,2   ; @CR_INT_RESULTS_AVAILABLE
l_.str.2:                               ; @.str.2
	.asciz	"IRQ triggered before the hash had completed\n"

	.comm	_CR_INT_RESULT_READ_ERR,4,2     ; @CR_INT_RESULT_READ_ERR
l_.str.3:                               ; @.str.3
	.asciz	"Attempt to read from an empty result queue\n"

	.comm	_CR_INT_MESSAGE_WRITE_ERROR,4,2 ; @CR_INT_MESSAGE_WRITE_ERROR
l_.str.4:                               ; @.str.4
	.asciz	"Data written before the hardware was configured\n"

	.comm	_IRQ_HANDLED,4,2                ; @IRQ_HANDLED
	.no_dead_strip	_img_irq_handler
.subsections_via_symbols
