	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_hdmi_set_edid
_intel_hdmi_set_edid:                   ## @intel_hdmi_set_edid
	.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, %r12
	movl	(%rdi), %edi
	callq	_to_i915
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_intel_attached_hdmi
	movq	%rax, %rbx
	movq	_POWER_DOMAIN_GMBUS@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	movq	%r13, %rdi
	callq	_intel_display_power_get
	movl	%eax, %r15d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	12(%rbx), %esi
	movq	%r13, %rdi
	callq	_intel_gmbus_get_adapter
	movq	%r12, %rdi
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_drm_get_edid
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.1:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_intel_gmbus_is_forced_bit
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_4
LBB0_3:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG_KMS
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_intel_gmbus_force_bit
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_drm_get_edid
	movq	%rax, %rbx
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_intel_gmbus_force_bit
LBB0_4:
	movq	_POWER_DOMAIN_GMBUS@GOTPCREL(%rip), %r14
LBB0_5:
	xorl	%esi, %esi
	testq	%rbx, %rbx
	setne	%sil
	movq	%r12, %rdi
	callq	_intel_hdmi_dp_dual_mode_detect
	movl	(%r14), %esi
	movq	%r13, %rdi
	movl	%r15d, %edx
	callq	_intel_display_power_put
	movq	%r12, %rdi
	callq	_to_intel_connector
	xorl	%r15d, %r15d
	movq	%rbx, (%rax)
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.7:
	movq	_DRM_EDID_INPUT_DIGITAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rbx)
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_drm_detect_monitor_audio
	movl	%eax, 8(%r14)
	movq	%rbx, %rdi
	callq	_drm_detect_hdmi_monitor
	movl	%eax, 4(%r14)
	movl	$1, %r15d
	jmp	LBB0_9
LBB0_6:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_9:
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_cec_notifier_set_phys_addr_from_edid
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_POWER_DOMAIN_GMBUS,4,2         ## @POWER_DOMAIN_GMBUS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"HDMI GMBUS EDID read failed, retry using GPIO bit-banging\n"

	.comm	_DRM_EDID_INPUT_DIGITAL,4,2     ## @DRM_EDID_INPUT_DIGITAL
	.no_dead_strip	_intel_hdmi_set_edid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_hdmi_set_edid
_intel_hdmi_set_edid:                   ; @intel_hdmi_set_edid
	.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	x20, x0
	ldr	w0, [x0]
	bl	_to_i915
	mov	x21, x0
	mov	x0, x20
	bl	_intel_attached_hdmi
	mov	x19, x0
Lloh0:
	adrp	x25, _POWER_DOMAIN_GMBUS@GOTPAGE
Lloh1:
	ldr	x25, [x25, _POWER_DOMAIN_GMBUS@GOTPAGEOFF]
	ldr	w1, [x25]
	mov	x0, x21
	bl	_intel_display_power_get
	mov	x23, x0
	ldr	w1, [x19, #12]
	mov	x0, x21
	bl	_intel_gmbus_get_adapter
	mov	x24, x0
	mov	x0, x20
	mov	x1, x24
	bl	_drm_get_edid
	mov	x22, x0
	cbnz	x0, LBB0_4
; %bb.1:
	mov	x0, x24
	bl	_intel_gmbus_is_forced_bit
	cbz	w0, LBB0_3
; %bb.2:
	mov	x22, #0
	b	LBB0_4
LBB0_3:
Lloh2:
	adrp	x0, l_.str@PAGE
Lloh3:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG_KMS
	mov	x0, x24
	mov	w1, #1
	bl	_intel_gmbus_force_bit
	mov	x0, x20
	mov	x1, x24
	bl	_drm_get_edid
	mov	x22, x0
	mov	x0, x24
	mov	w1, #0
	bl	_intel_gmbus_force_bit
LBB0_4:
	cmp	x22, #0
	cset	w1, ne
	mov	x0, x20
	bl	_intel_hdmi_dp_dual_mode_detect
	ldr	w1, [x25]
	mov	x0, x21
	mov	x2, x23
	bl	_intel_display_power_put
	mov	x0, x20
	bl	_to_intel_connector
	str	x22, [x0]
	cbz	x22, LBB0_7
; %bb.5:
	ldr	w8, [x22]
Lloh4:
	adrp	x9, _DRM_EDID_INPUT_DIGITAL@GOTPAGE
Lloh5:
	ldr	x9, [x9, _DRM_EDID_INPUT_DIGITAL@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x22
	bl	_drm_detect_monitor_audio
	str	w0, [x19, #8]
	mov	x0, x22
	bl	_drm_detect_hdmi_monitor
	str	w0, [x19, #4]
	mov	w20, #1
	b	LBB0_8
LBB0_7:
	mov	w20, #0
LBB0_8:
	ldr	w0, [x19]
	mov	x1, x22
	bl	_cec_notifier_set_phys_addr_from_edid
	mov	x0, x20
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_POWER_DOMAIN_GMBUS,4,2         ; @POWER_DOMAIN_GMBUS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"HDMI GMBUS EDID read failed, retry using GPIO bit-banging\n"

	.comm	_DRM_EDID_INPUT_DIGITAL,4,2     ; @DRM_EDID_INPUT_DIGITAL
	.no_dead_strip	_intel_hdmi_set_edid
.subsections_via_symbols
