	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_a5xx_preempt_irq               ## -- Begin function a5xx_preempt_irq
	.p2align	4, 0x90
_a5xx_preempt_irq:                      ## @a5xx_preempt_irq
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_to_adreno_gpu
	movq	%rax, %rdi
	callq	_to_a5xx_gpu
	movq	%rax, %rbx
	movq	8(%r14), %r12
	movq	8(%r12), %r15
	movq	_PREEMPT_TRIGGERED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PREEMPT_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_try_preempt_state
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	addq	$16, %rdi
	callq	_del_timer
	movq	_REG_A5XX_CP_CONTEXT_SWITCH_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_gpu_read
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	_PREEMPT_FAULTED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_set_preempt_state
	movl	(%r12), %edi
	movl	4(%r14), %edx
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movl	(%r15), %edi
	movq	%r14, %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_queue_work                     ## TAILCALL
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	8(%rbx), %rsi
	movq	%rsi, (%rbx)
	movq	$0, 8(%rbx)
	movq	%r14, %rdi
	callq	_update_wptr
	movq	_PREEMPT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_set_preempt_state              ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PREEMPT_TRIGGERED,4,2          ## @PREEMPT_TRIGGERED
	.comm	_PREEMPT_PENDING,4,2            ## @PREEMPT_PENDING
	.comm	_REG_A5XX_CP_CONTEXT_SWITCH_CNTL,4,2 ## @REG_A5XX_CP_CONTEXT_SWITCH_CNTL
	.comm	_PREEMPT_FAULTED,4,2            ## @PREEMPT_FAULTED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: Preemption failed to complete\n"

	.comm	_PREEMPT_NONE,4,2               ## @PREEMPT_NONE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_a5xx_preempt_irq               ; -- Begin function a5xx_preempt_irq
	.p2align	2
_a5xx_preempt_irq:                      ; @a5xx_preempt_irq
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_to_adreno_gpu
	bl	_to_a5xx_gpu
	mov	x20, x0
	ldr	x22, [x19, #8]
	ldr	x21, [x22, #8]
Lloh0:
	adrp	x8, _PREEMPT_TRIGGERED@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PREEMPT_TRIGGERED@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _PREEMPT_PENDING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PREEMPT_PENDING@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_try_preempt_state
	cbz	w0, LBB0_3
; %bb.1:
	add	x0, x20, #16
	bl	_del_timer
Lloh6:
	adrp	x8, _REG_A5XX_CP_CONTEXT_SWITCH_CNTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _REG_A5XX_CP_CONTEXT_SWITCH_CNTL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_gpu_read
	bl	_unlikely
	cbz	x0, LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _PREEMPT_FAULTED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PREEMPT_FAULTED@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_set_preempt_state
	ldr	w0, [x22]
	ldr	w2, [x19, #4]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
	ldr	w0, [x21]
	mov	x1, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_queue_work
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	x1, [x20, #8]
	stp	x1, xzr, [x20]
	mov	x0, x19
	bl	_update_wptr
Lloh14:
	adrp	x8, _PREEMPT_NONE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _PREEMPT_NONE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_set_preempt_state
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_PREEMPT_TRIGGERED,4,2          ; @PREEMPT_TRIGGERED
	.comm	_PREEMPT_PENDING,4,2            ; @PREEMPT_PENDING
	.comm	_REG_A5XX_CP_CONTEXT_SWITCH_CNTL,4,2 ; @REG_A5XX_CP_CONTEXT_SWITCH_CNTL
	.comm	_PREEMPT_FAULTED,4,2            ; @PREEMPT_FAULTED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: Preemption failed to complete\n"

	.comm	_PREEMPT_NONE,4,2               ; @PREEMPT_NONE
.subsections_via_symbols
