	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rk3066_hdmi_hardirq
_rk3066_hdmi_hardirq:                   ## @rk3066_hdmi_hardirq
	.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	%rsi, %r15
	movq	_IRQ_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rsi, %rdi
	callq	_rk3066_hdmi_get_power_mode
	movq	_HDMI_SYS_POWER_MODE_A@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movq	_HDMI_SYS_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HDMI_SYS_POWER_MODE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_hdmi_writeb
LBB0_2:
	movq	_HDMI_INTR_STATUS1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_hdmi_readb
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_hdmi_writeb
LBB0_4:
	movq	_HDMI_INTR_EDID_MASK@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.5:
	movq	(%r15), %rdi
	movl	%ebx, (%rdi)
	addq	$4, %rdi
	callq	_complete
LBB0_6:
	movq	_HDMI_INTR_HOTPLUG@GOTPCREL(%rip), %rax
	movq	_HDMI_INTR_MSENS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ebx, %ecx
	je	LBB0_8
## %bb.7:
	movq	_IRQ_WAKE_THREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IRQ_NONE,4,2                   ## @IRQ_NONE
	.comm	_HDMI_SYS_POWER_MODE_A,8,3      ## @HDMI_SYS_POWER_MODE_A
	.comm	_HDMI_SYS_CTRL,4,2              ## @HDMI_SYS_CTRL
	.comm	_HDMI_SYS_POWER_MODE_B,4,2      ## @HDMI_SYS_POWER_MODE_B
	.comm	_HDMI_INTR_STATUS1,4,2          ## @HDMI_INTR_STATUS1
	.comm	_HDMI_INTR_EDID_MASK,4,2        ## @HDMI_INTR_EDID_MASK
	.comm	_HDMI_INTR_HOTPLUG,4,2          ## @HDMI_INTR_HOTPLUG
	.comm	_HDMI_INTR_MSENS,4,2            ## @HDMI_INTR_MSENS
	.comm	_IRQ_WAKE_THREAD,4,2            ## @IRQ_WAKE_THREAD
	.no_dead_strip	_rk3066_hdmi_hardirq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rk3066_hdmi_hardirq
_rk3066_hdmi_hardirq:                   ; @rk3066_hdmi_hardirq
	.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, x1
Lloh0:
	adrp	x8, _IRQ_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IRQ_NONE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	mov	x0, x1
	bl	_rk3066_hdmi_get_power_mode
Lloh3:
	adrp	x8, _HDMI_SYS_POWER_MODE_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HDMI_SYS_POWER_MODE_A@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _HDMI_SYS_CTRL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HDMI_SYS_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _HDMI_SYS_POWER_MODE_B@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HDMI_SYS_POWER_MODE_B@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_hdmi_writeb
LBB0_2:
Lloh12:
	adrp	x22, _HDMI_INTR_STATUS1@GOTPAGE
Lloh13:
	ldr	x22, [x22, _HDMI_INTR_STATUS1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_hdmi_readb
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.3:
	ldr	w1, [x22]
	mov	x0, x19
	mov	x2, x20
	bl	_hdmi_writeb
LBB0_4:
Lloh14:
	adrp	x8, _HDMI_INTR_EDID_MASK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _HDMI_INTR_EDID_MASK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_6
; %bb.5:
	ldr	x0, [x19]
	str	w20, [x0], #4
	bl	_complete
LBB0_6:
Lloh17:
	adrp	x8, _HDMI_INTR_HOTPLUG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _HDMI_INTR_HOTPLUG@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _HDMI_INTR_MSENS@GOTPAGE
Lloh21:
	ldr	x9, [x9, _HDMI_INTR_MSENS@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh23:
	adrp	x9, _IRQ_WAKE_THREAD@GOTPAGE
Lloh24:
	ldr	x9, [x9, _IRQ_WAKE_THREAD@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w8, w20
	csel	w0, w21, w9, eq
	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
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_IRQ_NONE,4,2                   ; @IRQ_NONE
	.comm	_HDMI_SYS_POWER_MODE_A,8,3      ; @HDMI_SYS_POWER_MODE_A
	.comm	_HDMI_SYS_CTRL,4,2              ; @HDMI_SYS_CTRL
	.comm	_HDMI_SYS_POWER_MODE_B,4,2      ; @HDMI_SYS_POWER_MODE_B
	.comm	_HDMI_INTR_STATUS1,4,2          ; @HDMI_INTR_STATUS1
	.comm	_HDMI_INTR_EDID_MASK,4,2        ; @HDMI_INTR_EDID_MASK
	.comm	_HDMI_INTR_HOTPLUG,4,2          ; @HDMI_INTR_HOTPLUG
	.comm	_HDMI_INTR_MSENS,4,2            ; @HDMI_INTR_MSENS
	.comm	_IRQ_WAKE_THREAD,4,2            ; @IRQ_WAKE_THREAD
	.no_dead_strip	_rk3066_hdmi_hardirq
.subsections_via_symbols
