	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv748x_afe_s_ctrl
_adv748x_afe_s_ctrl:                    ## @adv748x_afe_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_adv748x_ctrl_to_afe
	movq	%rax, %rdi
	callq	_adv748x_afe_to_state
	movq	%rax, %r14
	movq	%rax, %rdi
	movl	$14, %esi
	xorl	%edx, %edx
	callq	_sdp_write
	testl	%eax, %eax
	js	LBB0_16
## %bb.1:
	movl	(%rbx), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_15
## %bb.2:
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_10:
	movl	4(%rbx), %r15d
	xorl	%ecx, %ecx
	testl	%r15d, %r15d
	setne	%cl
	movq	_ADV748X_SDP_DEF@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ADV748X_SDP_DEF_VAL_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_sdp_clrset
	testl	%eax, %eax
	jne	LBB0_16
## %bb.11:
	movq	_ADV748X_SDP_FRP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ADV748X_SDP_FRP_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	testl	%r15d, %r15d
	je	LBB0_12
## %bb.13:
	movl	4(%rbx), %ecx
	decl	%ecx
	jmp	LBB0_14
LBB0_15:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_16
LBB0_8:
	movq	_ADV748X_SDP_SD_SAT_U@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	callq	_sdp_write
	testl	%eax, %eax
	je	LBB0_9
LBB0_16:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_ADV748X_SDP_HUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	subl	4(%rbx), %edx
	jmp	LBB0_5
LBB0_7:
	movq	_ADV748X_SDP_CON@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_3:
	movq	_ADV748X_SDP_BRI@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_9:
	movq	_ADV748X_SDP_SD_SAT_V@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %esi
	movl	4(%rbx), %edx
LBB0_5:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdp_write                      ## TAILCALL
LBB0_12:
	xorl	%ecx, %ecx
LBB0_14:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_sdp_clrset                     ## TAILCALL
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_10, LBB0_10-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_10
	.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_SDP_BRI,4,2            ## @ADV748X_SDP_BRI
	.comm	_ADV748X_SDP_HUE,4,2            ## @ADV748X_SDP_HUE
	.comm	_ADV748X_SDP_CON,4,2            ## @ADV748X_SDP_CON
	.comm	_ADV748X_SDP_SD_SAT_U,4,2       ## @ADV748X_SDP_SD_SAT_U
	.comm	_ADV748X_SDP_SD_SAT_V,4,2       ## @ADV748X_SDP_SD_SAT_V
	.comm	_ADV748X_SDP_DEF,4,2            ## @ADV748X_SDP_DEF
	.comm	_ADV748X_SDP_DEF_VAL_EN,4,2     ## @ADV748X_SDP_DEF_VAL_EN
	.comm	_ADV748X_SDP_FRP,4,2            ## @ADV748X_SDP_FRP
	.comm	_ADV748X_SDP_FRP_MASK,4,2       ## @ADV748X_SDP_FRP_MASK
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_adv748x_afe_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_afe_s_ctrl
_adv748x_afe_s_ctrl:                    ; @adv748x_afe_s_ctrl
	.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	x20, x0
	bl	_adv748x_ctrl_to_afe
	bl	_adv748x_afe_to_state
	mov	x19, x0
	mov	w1, #14
	mov	w2, #0
	bl	_sdp_write
	tbnz	w0, #31, LBB0_8
; %bb.1:
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_6
; %bb.2:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	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	w21, [x20, #4]
	cmp	w21, #0
	cset	w3, ne
Lloh2:
	adrp	x8, _ADV748X_SDP_DEF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ADV748X_SDP_DEF@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _ADV748X_SDP_DEF_VAL_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADV748X_SDP_DEF_VAL_EN@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_sdp_clrset
	cbnz	w0, LBB0_8
; %bb.4:
Lloh8:
	adrp	x8, _ADV748X_SDP_FRP@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ADV748X_SDP_FRP@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _ADV748X_SDP_FRP_MASK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ADV748X_SDP_FRP_MASK@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	cbz	w21, LBB0_15
; %bb.5:
	ldr	w8, [x20, #4]
	sub	w3, w8, #1
	b	LBB0_16
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
Lloh17:
	adrp	x8, _ADV748X_SDP_SD_SAT_U@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ADV748X_SDP_SD_SAT_U@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
	mov	x0, x19
	bl	_sdp_write
	cbz	w0, LBB0_12
LBB0_8:
	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
LBB0_9:
Lloh20:
	adrp	x8, _ADV748X_SDP_HUE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ADV748X_SDP_HUE@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	ldr	w8, [x20, #4]
	neg	w2, w8
	b	LBB0_14
LBB0_10:
Lloh23:
	adrp	x8, _ADV748X_SDP_CON@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ADV748X_SDP_CON@GOTPAGEOFF]
	b	LBB0_13
LBB0_11:
Lloh25:
	adrp	x8, _ADV748X_SDP_BRI@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ADV748X_SDP_BRI@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh27:
	adrp	x8, _ADV748X_SDP_SD_SAT_V@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ADV748X_SDP_SD_SAT_V@GOTPAGEOFF]
LBB0_13:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
LBB0_14:
	mov	x0, 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
	b	_sdp_write
LBB0_15:
	mov	w3, #0
LBB0_16:
	mov	x0, 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
	b	_sdp_clrset
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_3-LBB0_3)>>2
	.byte	(LBB0_7-LBB0_3)>>2
	.byte	(LBB0_9-LBB0_3)>>2
	.byte	(LBB0_10-LBB0_3)>>2
	.byte	(LBB0_11-LBB0_3)>>2
                                        ; -- End function
	.comm	_ADV748X_SDP_BRI,4,2            ; @ADV748X_SDP_BRI
	.comm	_ADV748X_SDP_HUE,4,2            ; @ADV748X_SDP_HUE
	.comm	_ADV748X_SDP_CON,4,2            ; @ADV748X_SDP_CON
	.comm	_ADV748X_SDP_SD_SAT_U,4,2       ; @ADV748X_SDP_SD_SAT_U
	.comm	_ADV748X_SDP_SD_SAT_V,4,2       ; @ADV748X_SDP_SD_SAT_V
	.comm	_ADV748X_SDP_DEF,4,2            ; @ADV748X_SDP_DEF
	.comm	_ADV748X_SDP_DEF_VAL_EN,4,2     ; @ADV748X_SDP_DEF_VAL_EN
	.comm	_ADV748X_SDP_FRP,4,2            ; @ADV748X_SDP_FRP
	.comm	_ADV748X_SDP_FRP_MASK,4,2       ; @ADV748X_SDP_FRP_MASK
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_adv748x_afe_s_ctrl
.subsections_via_symbols
