	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv748x_hdmi_s_ctrl
_adv748x_hdmi_s_ctrl:                   ## @adv748x_hdmi_s_ctrl
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	callq	_adv748x_ctrl_to_hdmi
	movq	%rax, %rdi
	callq	_adv748x_hdmi_to_state
	movq	%rax, %r14
	movq	_ADV748X_CP_VID_ADJ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ADV748X_CP_VID_ADJ_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	%ecx, %edx
	callq	_cp_clrset
	testl	%eax, %eax
	js	LBB0_11
## %bb.1:
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_10
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:
	movl	4(%rbx), %eax
	leal	-1(%rax), %ecx
	movq	_ADV748X_CP_PAT_GEN_EN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	xorl	%edx, %edx
	cmpl	$1, %eax
	cmovael	%ecx, %edx
	movq	_ADV748X_CP_PAT_GEN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_5
LBB0_10:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_8:
	movq	_ADV748X_CP_SAT@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_6:
	movq	_ADV748X_CP_HUE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_7:
	movq	_ADV748X_CP_CON@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ADV748X_CP_BRI@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movl	4(%rbx), %edx
LBB0_5:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_cp_write                       ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_8
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_3
	.end_data_region
                                        ## -- End function
	.comm	_ADV748X_CP_VID_ADJ,4,2         ## @ADV748X_CP_VID_ADJ
	.comm	_ADV748X_CP_VID_ADJ_ENABLE,4,2  ## @ADV748X_CP_VID_ADJ_ENABLE
	.comm	_ADV748X_CP_BRI,4,2             ## @ADV748X_CP_BRI
	.comm	_ADV748X_CP_HUE,4,2             ## @ADV748X_CP_HUE
	.comm	_ADV748X_CP_CON,4,2             ## @ADV748X_CP_CON
	.comm	_ADV748X_CP_SAT,4,2             ## @ADV748X_CP_SAT
	.comm	_ADV748X_CP_PAT_GEN_EN,4,2      ## @ADV748X_CP_PAT_GEN_EN
	.comm	_ADV748X_CP_PAT_GEN,4,2         ## @ADV748X_CP_PAT_GEN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_adv748x_hdmi_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv748x_hdmi_s_ctrl
_adv748x_hdmi_s_ctrl:                   ; @adv748x_hdmi_s_ctrl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x0
	bl	_adv748x_ctrl_to_hdmi
	bl	_adv748x_hdmi_to_state
	mov	x19, x0
Lloh0:
	adrp	x8, _ADV748X_CP_VID_ADJ@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ADV748X_CP_VID_ADJ@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _ADV748X_CP_VID_ADJ_ENABLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ADV748X_CP_VID_ADJ_ENABLE@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_cp_clrset
	tbnz	w0, #31, LBB0_5
; %bb.1:
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_4
; %bb.2:
Lloh6:
	adrp	x9, lJTI0_0@PAGE
Lloh7:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_3
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_3:
	ldr	w8, [x20, #4]
	sub	w9, w8, #1
Lloh8:
	adrp	x10, _ADV748X_CP_PAT_GEN_EN@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ADV748X_CP_PAT_GEN_EN@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	orr	w9, w9, w10
	cmp	w8, #0
	csel	w2, wzr, w9, eq
Lloh11:
	adrp	x8, _ADV748X_CP_PAT_GEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ADV748X_CP_PAT_GEN@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	b	LBB0_11
LBB0_4:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_6:
Lloh17:
	adrp	x8, _ADV748X_CP_SAT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ADV748X_CP_SAT@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
Lloh19:
	adrp	x8, _ADV748X_CP_HUE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _ADV748X_CP_HUE@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh21:
	adrp	x8, _ADV748X_CP_CON@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ADV748X_CP_CON@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh23:
	adrp	x8, _ADV748X_CP_BRI@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ADV748X_CP_BRI@GOTPAGEOFF]
LBB0_10:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_cp_write
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_6-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_8-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
                                        ; -- End function
	.comm	_ADV748X_CP_VID_ADJ,4,2         ; @ADV748X_CP_VID_ADJ
	.comm	_ADV748X_CP_VID_ADJ_ENABLE,4,2  ; @ADV748X_CP_VID_ADJ_ENABLE
	.comm	_ADV748X_CP_BRI,4,2             ; @ADV748X_CP_BRI
	.comm	_ADV748X_CP_HUE,4,2             ; @ADV748X_CP_HUE
	.comm	_ADV748X_CP_CON,4,2             ; @ADV748X_CP_CON
	.comm	_ADV748X_CP_SAT,4,2             ; @ADV748X_CP_SAT
	.comm	_ADV748X_CP_PAT_GEN_EN,4,2      ; @ADV748X_CP_PAT_GEN_EN
	.comm	_ADV748X_CP_PAT_GEN,4,2         ; @ADV748X_CP_PAT_GEN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_adv748x_hdmi_s_ctrl
.subsections_via_symbols
