	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sii902x_bridge_mode_set
_sii902x_bridge_mode_set:               ## @sii902x_bridge_mode_set
	.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	%rdx, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_bridge_to_sii902x
	movq	%rax, %r15
	movq	8(%rax), %r14
	movq	_AVI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_HDMI_INFOFRAME_SIZE
	movl	%eax, %r13d
	movl	%eax, %eax
	shlq	$2, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movslq	(%r12), %rax
	imulq	$1717986919, %rax, %rax         ## imm = 0x66666667
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$34, %rax
	addl	%ecx, %eax
	movzbl	%al, %ecx
	movl	%ecx, (%rbx)
	sarl	$8, %eax
	movl	%eax, 4(%rbx)
	movq	_SII902X_TPI_CLK_RATIO_1X@GOTPCREL(%rip), %rax
	movq	_SII902X_TPI_AVI_PIXEL_REP_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	4(%r12), %eax
	movl	%eax, 8(%rbx)
	movq	_SII902X_TPI_AVI_PIXEL_REP_BUS_24BIT@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	$0, 12(%rbx)
	movl	8(%r12), %eax
	movl	%eax, 16(%rbx)
	sarl	$8, %eax
	movl	%eax, 20(%rbx)
	movl	12(%r12), %eax
	movl	%eax, 24(%rbx)
	sarl	$8, %eax
	movl	%eax, 28(%rbx)
	movl	%ecx, 32(%rbx)
	movq	_SII902X_TPI_AVI_INPUT_RANGE_AUTO@GOTPCREL(%rip), %rax
	movq	_SII902X_TPI_AVI_INPUT_COLORSPACE_RGB@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, 36(%rbx)
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	_SII902X_TPI_VIDEO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%rbx, %rdx
	movl	$10, %ecx
	callq	_regmap_bulk_write
	testl	%eax, %eax
	je	LBB0_1
LBB0_6:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_8
## %bb.7:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, %rsi
	addq	$4, %rsi
	leaq	-56(%rbp), %rdi
	movq	%r12, %rdx
	callq	_drm_hdmi_avi_infoframe_from_display_mode
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	shll	$2, %r13d
	leaq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_hdmi_avi_infoframe_pack
	testl	%eax, %eax
	js	LBB0_4
## %bb.5:
	movq	_SII902X_TPI_AVI_INFOFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HDMI_INFOFRAME_HEADER_SIZE@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	leaq	(%rbx,%rax,4), %rdx
	addq	$-4, %rdx
	movq	_HDMI_AVI_INFOFRAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	incl	%ecx
	movq	%r14, %rdi
	callq	_regmap_bulk_write
	jmp	LBB0_6
LBB0_2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_6
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_AVI,4,2                        ## @AVI
	.comm	_SII902X_TPI_CLK_RATIO_1X,4,2   ## @SII902X_TPI_CLK_RATIO_1X
	.comm	_SII902X_TPI_AVI_PIXEL_REP_NONE,4,2 ## @SII902X_TPI_AVI_PIXEL_REP_NONE
	.comm	_SII902X_TPI_AVI_PIXEL_REP_BUS_24BIT,4,2 ## @SII902X_TPI_AVI_PIXEL_REP_BUS_24BIT
	.comm	_SII902X_TPI_AVI_INPUT_RANGE_AUTO,4,2 ## @SII902X_TPI_AVI_INPUT_RANGE_AUTO
	.comm	_SII902X_TPI_AVI_INPUT_COLORSPACE_RGB,4,2 ## @SII902X_TPI_AVI_INPUT_COLORSPACE_RGB
	.comm	_SII902X_TPI_VIDEO_DATA,4,2     ## @SII902X_TPI_VIDEO_DATA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"couldn't fill AVI infoframe\n"

L_.str.1:                               ## @.str.1
	.asciz	"failed to pack AVI infoframe: %d\n"

	.comm	_SII902X_TPI_AVI_INFOFRAME,4,2  ## @SII902X_TPI_AVI_INFOFRAME
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,4,2 ## @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_HDMI_AVI_INFOFRAME_SIZE,4,2    ## @HDMI_AVI_INFOFRAME_SIZE
	.no_dead_strip	_sii902x_bridge_mode_set
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sii902x_bridge_mode_set
_sii902x_bridge_mode_set:               ; @sii902x_bridge_mode_set
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x21, x2
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_bridge_to_sii902x
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh3:
	adrp	x8, _AVI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVI@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_HDMI_INFOFRAME_SIZE
	mov	x23, x0
	mov	w8, w0
	lsl	x8, x8, #2
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x7fffffff0
	sub	x22, x9, x8
	mov	sp, x22
	mov	w8, #26215
	movk	w8, #26214, lsl #16
	ldp	w9, w10, [x21]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	mul	x8, x9, x8
	lsr	x9, x8, #32
	lsr	x8, x8, #63
	add	w8, w8, w9, asr #2
	and	w9, w8, #0xff
	asr	w8, w8, #8
	stp	w9, w8, [x22]
	ldp	w8, w9, [x21, #8]
	asr	w11, w8, #8
	stp	w8, w11, [x22, #16]
	asr	w8, w9, #8
	stp	w9, w8, [x22, #24]
Lloh8:
	adrp	x8, _SII902X_TPI_CLK_RATIO_1X@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SII902X_TPI_CLK_RATIO_1X@GOTPAGEOFF]
Lloh10:
	adrp	x9, _SII902X_TPI_AVI_PIXEL_REP_NONE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _SII902X_TPI_AVI_PIXEL_REP_NONE@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh14:
	adrp	x9, _SII902X_TPI_AVI_PIXEL_REP_BUS_24BIT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _SII902X_TPI_AVI_PIXEL_REP_BUS_24BIT@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _SII902X_TPI_AVI_INPUT_RANGE_AUTO@GOTPAGE
Lloh18:
	ldr	x9, [x9, _SII902X_TPI_AVI_INPUT_RANGE_AUTO@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
Lloh20:
	adrp	x11, _SII902X_TPI_AVI_INPUT_COLORSPACE_RGB@GOTPAGE
Lloh21:
	ldr	x11, [x11, _SII902X_TPI_AVI_INPUT_COLORSPACE_RGB@GOTPAGEOFF]
Lloh22:
	ldr	w11, [x11]
	orr	w9, w11, w9
	stp	w10, wzr, [x22, #8]
	stp	w8, w9, [x22, #32]
	mov	x0, x19
	bl	_mutex_lock
Lloh23:
	adrp	x8, _SII902X_TPI_VIDEO_DATA@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SII902X_TPI_VIDEO_DATA@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x22
	mov	w3, #10
	bl	_regmap_bulk_write
	cbz	w0, LBB0_3
LBB0_1:
	mov	x0, x19
	bl	_mutex_unlock
	ldur	x8, [x29, #-56]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.2:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
	add	x1, x19, #4
	sub	x0, x29, #64
	mov	x2, x21
	bl	_drm_hdmi_avi_infoframe_from_display_mode
	tbnz	w0, #31, LBB0_6
; %bb.4:
	lsl	w2, w23, #2
	sub	x0, x29, #64
	mov	x1, x22
	bl	_hdmi_avi_infoframe_pack
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_7
; %bb.5:
Lloh29:
	adrp	x8, _SII902X_TPI_AVI_INFOFRAME@GOTPAGE
Lloh30:
	ldr	x8, [x8, _SII902X_TPI_AVI_INFOFRAME@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGE
Lloh33:
	ldr	x8, [x8, _HDMI_INFOFRAME_HEADER_SIZE@GOTPAGEOFF]
Lloh34:
	ldrsw	x8, [x8]
	add	x8, x22, x8, lsl #2
	sub	x2, x8, #4
Lloh35:
	adrp	x8, _HDMI_AVI_INFOFRAME_SIZE@GOTPAGE
Lloh36:
	ldr	x8, [x8, _HDMI_AVI_INFOFRAME_SIZE@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	add	w3, w8, #1
	mov	x0, x20
	bl	_regmap_bulk_write
	b	LBB0_1
LBB0_6:
Lloh38:
	adrp	x0, l_.str@PAGE
Lloh39:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_1
LBB0_7:
	str	x0, [sp, #-16]!
Lloh40:
	adrp	x0, l_.str.1@PAGE
Lloh41:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	add	sp, sp, #16
	b	LBB0_1
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh12
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_AVI,4,2                        ; @AVI
	.comm	_SII902X_TPI_CLK_RATIO_1X,4,2   ; @SII902X_TPI_CLK_RATIO_1X
	.comm	_SII902X_TPI_AVI_PIXEL_REP_NONE,4,2 ; @SII902X_TPI_AVI_PIXEL_REP_NONE
	.comm	_SII902X_TPI_AVI_PIXEL_REP_BUS_24BIT,4,2 ; @SII902X_TPI_AVI_PIXEL_REP_BUS_24BIT
	.comm	_SII902X_TPI_AVI_INPUT_RANGE_AUTO,4,2 ; @SII902X_TPI_AVI_INPUT_RANGE_AUTO
	.comm	_SII902X_TPI_AVI_INPUT_COLORSPACE_RGB,4,2 ; @SII902X_TPI_AVI_INPUT_COLORSPACE_RGB
	.comm	_SII902X_TPI_VIDEO_DATA,4,2     ; @SII902X_TPI_VIDEO_DATA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"couldn't fill AVI infoframe\n"

l_.str.1:                               ; @.str.1
	.asciz	"failed to pack AVI infoframe: %d\n"

	.comm	_SII902X_TPI_AVI_INFOFRAME,4,2  ; @SII902X_TPI_AVI_INFOFRAME
	.comm	_HDMI_INFOFRAME_HEADER_SIZE,4,2 ; @HDMI_INFOFRAME_HEADER_SIZE
	.comm	_HDMI_AVI_INFOFRAME_SIZE,4,2    ; @HDMI_AVI_INFOFRAME_SIZE
	.no_dead_strip	_sii902x_bridge_mode_set
.subsections_via_symbols
