	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adv7180_s_ctrl
_adv7180_s_ctrl:                        ## @adv7180_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	callq	_to_adv7180_sd
	movq	%rax, %rdi
	callq	_to_state
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_mutex_lock_interruptible
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_13
## %bb.1:
	movl	4(%rbx), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_5
## %bb.2:
	movl	(%rbx), %r15d
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_3:
	movq	_ADV7180_REG_SD_SAT_CB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_adv7180_write
	testl	%eax, %eax
	js	LBB0_11
## %bb.4:
	movq	_ADV7180_REG_SD_SAT_CR@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_12
LBB0_6:
	movq	_ADV7180_REG_HUE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	negl	%r15d
	jmp	LBB0_10
LBB0_7:
	movq	_ADV7180_REG_CON@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_8:
	movq	_ADV7180_REG_BRI@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
LBB0_10:
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_adv7180_write
LBB0_11:
	movl	%eax, %r12d
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%r12d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	%r14, %rdi
	movl	$32985, %esi                    ## imm = 0x80D9
	testl	%r15d, %r15d
	je	LBB0_17
## %bb.15:
	movl	$68, %edx
	callq	_adv7180_write
	movq	_ADV7180_REG_FLCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ADV7180_FLCONTROL_FL_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_adv7180_write
	xorl	%r12d, %r12d
	jmp	LBB0_12
LBB0_17:
	movl	$196, %edx
	callq	_adv7180_write
	movq	_ADV7180_REG_FLCONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_adv7180_write
	jmp	LBB0_12
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_3
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_ADV7180_REG_BRI,4,2            ## @ADV7180_REG_BRI
	.comm	_ADV7180_REG_HUE,4,2            ## @ADV7180_REG_HUE
	.comm	_ADV7180_REG_CON,4,2            ## @ADV7180_REG_CON
	.comm	_ADV7180_REG_SD_SAT_CB,4,2      ## @ADV7180_REG_SD_SAT_CB
	.comm	_ADV7180_REG_SD_SAT_CR,4,2      ## @ADV7180_REG_SD_SAT_CR
	.comm	_ADV7180_REG_FLCONTROL,4,2      ## @ADV7180_REG_FLCONTROL
	.comm	_ADV7180_FLCONTROL_FL_ENABLE,4,2 ## @ADV7180_FLCONTROL_FL_ENABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_adv7180_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adv7180_s_ctrl
_adv7180_s_ctrl:                        ; @adv7180_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	x21, x0
	bl	_to_adv7180_sd
	bl	_to_state
	mov	x19, x0
	bl	_mutex_lock_interruptible
	mov	x20, x0
	cbnz	w0, LBB0_17
; %bb.1:
	ldr	w8, [x21, #4]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_5
; %bb.2:
	ldr	w21, [x21]
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:
Lloh2:
	adrp	x8, _ADV7180_REG_SD_SAT_CB@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ADV7180_REG_SD_SAT_CB@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_adv7180_write
	tbnz	w0, #31, LBB0_13
; %bb.4:
Lloh5:
	adrp	x8, _ADV7180_REG_SD_SAT_CR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ADV7180_REG_SD_SAT_CR@GOTPAGEOFF]
	b	LBB0_9
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_16
LBB0_6:
Lloh10:
	adrp	x8, _ADV7180_REG_HUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ADV7180_REG_HUE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	neg	w2, w21
	mov	x0, x19
	b	LBB0_10
LBB0_7:
Lloh13:
	adrp	x8, _ADV7180_REG_CON@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ADV7180_REG_CON@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:
Lloh15:
	adrp	x8, _ADV7180_REG_BRI@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ADV7180_REG_BRI@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
LBB0_10:
	bl	_adv7180_write
	mov	x20, x0
	b	LBB0_16
LBB0_11:
	mov	x0, x19
	mov	w1, #32985
	cbz	w21, LBB0_14
; %bb.12:
	mov	w2, #68
	bl	_adv7180_write
Lloh17:
	adrp	x8, _ADV7180_REG_FLCONTROL@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ADV7180_REG_FLCONTROL@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x8, _ADV7180_FLCONTROL_FL_ENABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _ADV7180_FLCONTROL_FL_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w2, [x8]
	mov	x0, x19
	b	LBB0_15
LBB0_13:
	mov	x20, x0
	b	LBB0_16
LBB0_14:
	mov	w2, #196
	bl	_adv7180_write
Lloh23:
	adrp	x8, _ADV7180_REG_FLCONTROL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ADV7180_REG_FLCONTROL@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
LBB0_15:
	bl	_adv7180_write
	mov	w20, #0
LBB0_16:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_17:
	mov	x0, x20
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.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_11-LBB0_3)>>2
                                        ; -- End function
	.comm	_ADV7180_REG_BRI,4,2            ; @ADV7180_REG_BRI
	.comm	_ADV7180_REG_HUE,4,2            ; @ADV7180_REG_HUE
	.comm	_ADV7180_REG_CON,4,2            ; @ADV7180_REG_CON
	.comm	_ADV7180_REG_SD_SAT_CB,4,2      ; @ADV7180_REG_SD_SAT_CB
	.comm	_ADV7180_REG_SD_SAT_CR,4,2      ; @ADV7180_REG_SD_SAT_CR
	.comm	_ADV7180_REG_FLCONTROL,4,2      ; @ADV7180_REG_FLCONTROL
	.comm	_ADV7180_FLCONTROL_FL_ENABLE,4,2 ; @ADV7180_FLCONTROL_FL_ENABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_adv7180_s_ctrl
.subsections_via_symbols
