	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sw_done
_sw_done:                               ## @sw_done
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	jne	LBB0_4
## %bb.1:
	movq	8(%rbx), %r14
	movq	_REG_HDMI_DDC_INT_CTRL@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_hdmi_read
	movq	_HDMI_DDC_INT_CTRL_SW_DONE_MASK@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.2:
	movq	_HDMI_DDC_INT_CTRL_SW_DONE_INT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.3:
	movl	$1, (%rbx)
	movl	(%r15), %esi
	movq	_HDMI_DDC_INT_CTRL_SW_DONE_ACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_hdmi_write
LBB0_4:
	movl	(%rbx), %eax
	addq	$8, %rsp
	popq	%rbx
	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_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
	.comm	_HDMI_DDC_INT_CTRL_SW_DONE_ACK,4,2 ## @HDMI_DDC_INT_CTRL_SW_DONE_ACK
	.no_dead_strip	_sw_done
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sw_done
_sw_done:                               ; @sw_done
	.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
	ldr	w8, [x0]
	cbnz	w8, LBB0_4
; %bb.1:
	ldr	x20, [x19, #8]
Lloh0:
	adrp	x21, _REG_HDMI_DDC_INT_CTRL@GOTPAGE
Lloh1:
	ldr	x21, [x21, _REG_HDMI_DDC_INT_CTRL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x20
	bl	_hdmi_read
Lloh2:
	adrp	x8, _HDMI_DDC_INT_CTRL_SW_DONE_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _HDMI_DDC_INT_CTRL_SW_DONE_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.2:
Lloh5:
	adrp	x8, _HDMI_DDC_INT_CTRL_SW_DONE_INT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _HDMI_DDC_INT_CTRL_SW_DONE_INT@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_4
; %bb.3:
	mov	w8, #1
	str	w8, [x19]
	ldr	w1, [x21]
Lloh8:
	adrp	x8, _HDMI_DDC_INT_CTRL_SW_DONE_ACK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _HDMI_DDC_INT_CTRL_SW_DONE_ACK@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_hdmi_write
LBB0_4:
	ldr	w0, [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
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_REG_HDMI_DDC_INT_CTRL,4,2      ; @REG_HDMI_DDC_INT_CTRL
	.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
	.comm	_HDMI_DDC_INT_CTRL_SW_DONE_ACK,4,2 ; @HDMI_DDC_INT_CTRL_SW_DONE_ACK
	.no_dead_strip	_sw_done
.subsections_via_symbols
