	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sii902x_get_modes
_sii902x_get_modes:                     ## @sii902x_get_modes
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	callq	_connector_to_sii902x
	movq	%rax, %r15
	movq	_MEDIA_BUS_FMT_RGB888_1X24@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)
	movq	_SII902X_SYS_CTRL_OUTPUT_DVI@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	8(%r15), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_drm_get_edid
	movq	%rax, %rbx
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_drm_connector_update_edid_property
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movq	%rbx, %rdi
	callq	_drm_detect_hdmi_monitor
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_SII902X_SYS_CTRL_OUTPUT_HDMI@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_4:
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_drm_add_edid_modes
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_5
LBB0_1:
	xorl	%r12d, %r12d
LBB0_5:
	leaq	-44(%rbp), %rsi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_drm_display_info_set_bus_formats
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movl	4(%r15), %edi
	movq	_SII902X_SYS_CTRL_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SII902X_SYS_CTRL_OUTPUT_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	cmovnel	%eax, %r12d
	movl	%r12d, %ebx
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MEDIA_BUS_FMT_RGB888_1X24,4,2  ## @MEDIA_BUS_FMT_RGB888_1X24
	.comm	_SII902X_SYS_CTRL_OUTPUT_DVI,4,2 ## @SII902X_SYS_CTRL_OUTPUT_DVI
	.comm	_SII902X_SYS_CTRL_OUTPUT_HDMI,4,2 ## @SII902X_SYS_CTRL_OUTPUT_HDMI
	.comm	_SII902X_SYS_CTRL_DATA,4,2      ## @SII902X_SYS_CTRL_DATA
	.comm	_SII902X_SYS_CTRL_OUTPUT_MODE,4,2 ## @SII902X_SYS_CTRL_OUTPUT_MODE
	.no_dead_strip	_sii902x_get_modes
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sii902x_get_modes
_sii902x_get_modes:                     ; @sii902x_get_modes
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x0
	bl	_connector_to_sii902x
	mov	x19, x0
Lloh0:
	adrp	x8, _MEDIA_BUS_FMT_RGB888_1X24@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MEDIA_BUS_FMT_RGB888_1X24@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #12]
Lloh3:
	adrp	x8, _SII902X_SYS_CTRL_OUTPUT_DVI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SII902X_SYS_CTRL_OUTPUT_DVI@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	ldr	w1, [x8]
	mov	x0, x21
	bl	_drm_get_edid
	mov	x23, x0
	mov	x0, x21
	mov	x1, x23
	bl	_drm_connector_update_edid_property
	cbz	x23, LBB0_2
; %bb.1:
	mov	x0, x23
	bl	_drm_detect_hdmi_monitor
Lloh6:
	adrp	x8, _SII902X_SYS_CTRL_OUTPUT_HDMI@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SII902X_SYS_CTRL_OUTPUT_HDMI@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	x0, #0
	csel	w20, w20, w8, eq
	mov	x0, x21
	mov	x1, x23
	bl	_drm_add_edid_modes
	mov	x22, x0
	mov	x0, x23
	bl	_kfree
	b	LBB0_3
LBB0_2:
	mov	w22, #0
LBB0_3:
	add	x1, sp, #12
	mov	x0, x21
	mov	w2, #1
	bl	_drm_display_info_set_bus_formats
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.4:
	ldr	w0, [x19, #4]
Lloh9:
	adrp	x8, _SII902X_SYS_CTRL_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SII902X_SYS_CTRL_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x8, _SII902X_SYS_CTRL_OUTPUT_MODE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SII902X_SYS_CTRL_OUTPUT_MODE@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
	mov	x3, x20
	bl	_regmap_update_bits
	cmp	w0, #0
	csel	w21, w22, w0, eq
LBB0_5:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MEDIA_BUS_FMT_RGB888_1X24,4,2  ; @MEDIA_BUS_FMT_RGB888_1X24
	.comm	_SII902X_SYS_CTRL_OUTPUT_DVI,4,2 ; @SII902X_SYS_CTRL_OUTPUT_DVI
	.comm	_SII902X_SYS_CTRL_OUTPUT_HDMI,4,2 ; @SII902X_SYS_CTRL_OUTPUT_HDMI
	.comm	_SII902X_SYS_CTRL_DATA,4,2      ; @SII902X_SYS_CTRL_DATA
	.comm	_SII902X_SYS_CTRL_OUTPUT_MODE,4,2 ; @SII902X_SYS_CTRL_OUTPUT_MODE
	.no_dead_strip	_sii902x_get_modes
.subsections_via_symbols
