	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ddc_clear_irq
_ddc_clear_irq:                         ## @ddc_clear_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	movq	(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$-65534, %eax                   ## imm = 0xFFFF0002
	movq	_REG_HDMI_DDC_INT_CTRL@GOTPCREL(%rip), %r12
	movq	_HDMI_DDC_INT_CTRL_SW_DONE_MASK@GOTPCREL(%rip), %r15
	movq	_HDMI_DDC_INT_CTRL_SW_DONE_INT@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r13d
	movl	(%r12), %esi
	movl	(%r15), %edx
	movq	_HDMI_DDC_INT_CTRL_SW_DONE_ACK@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_hdmi_write
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_hdmi_read
	testl	%eax, (%r14)
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	1(%r13), %eax
	testl	%r13d, %r13d
	jne	LBB0_1
LBB0_3:
	testl	%r13d, %r13d
	je	LBB0_4
## %bb.5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_DRM_DEV_ERROR
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REG_HDMI_DDC_INT_CTRL,4,2      ## @REG_HDMI_DDC_INT_CTRL
	.comm	_HDMI_DDC_INT_CTRL_SW_DONE_ACK,4,2 ## @HDMI_DDC_INT_CTRL_SW_DONE_ACK
	.comm	_HDMI_DDC_INT_CTRL_SW_DONE_MASK,4,2 ## @HDMI_DDC_INT_CTRL_SW_DONE_MASK
	.comm	_HDMI_DDC_INT_CTRL_SW_DONE_INT,4,2 ## @HDMI_DDC_INT_CTRL_SW_DONE_INT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"timeout waiting for DDC\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_ddc_clear_irq
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ddc_clear_irq
_ddc_clear_irq:                         ; @ddc_clear_irq
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldr	x21, [x20]
	mov	w8, #-65534
Lloh0:
	adrp	x22, _REG_HDMI_DDC_INT_CTRL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REG_HDMI_DDC_INT_CTRL@GOTPAGEOFF]
Lloh2:
	adrp	x23, _HDMI_DDC_INT_CTRL_SW_DONE_ACK@GOTPAGE
Lloh3:
	ldr	x23, [x23, _HDMI_DDC_INT_CTRL_SW_DONE_ACK@GOTPAGEOFF]
Lloh4:
	adrp	x24, _HDMI_DDC_INT_CTRL_SW_DONE_MASK@GOTPAGE
Lloh5:
	ldr	x24, [x24, _HDMI_DDC_INT_CTRL_SW_DONE_MASK@GOTPAGEOFF]
Lloh6:
	adrp	x25, _HDMI_DDC_INT_CTRL_SW_DONE_INT@GOTPAGE
Lloh7:
	ldr	x25, [x25, _HDMI_DDC_INT_CTRL_SW_DONE_INT@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, x8
	ldr	w1, [x22]
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w2, w9, w8
	mov	x0, x20
	bl	_hdmi_write
	ldr	w1, [x22]
	mov	x0, x20
	bl	_hdmi_read
	ldr	w8, [x25]
	and	w9, w8, w0
	add	w8, w26, #1
	cmp	w9, #0
	ccmp	w26, #0, #4, ne
	b.ne	LBB0_1
; %bb.2:
	cbz	w26, LBB0_4
; %bb.3:
	mov	w0, #0
	str	wzr, [x19]
	b	LBB0_5
LBB0_4:
	ldr	w0, [x21]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_DRM_DEV_ERROR
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_HDMI_DDC_INT_CTRL,4,2      ; @REG_HDMI_DDC_INT_CTRL
	.comm	_HDMI_DDC_INT_CTRL_SW_DONE_ACK,4,2 ; @HDMI_DDC_INT_CTRL_SW_DONE_ACK
	.comm	_HDMI_DDC_INT_CTRL_SW_DONE_MASK,4,2 ; @HDMI_DDC_INT_CTRL_SW_DONE_MASK
	.comm	_HDMI_DDC_INT_CTRL_SW_DONE_INT,4,2 ; @HDMI_DDC_INT_CTRL_SW_DONE_INT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"timeout waiting for DDC\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_ddc_clear_irq
.subsections_via_symbols
