	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function si470x_vidioc_s_ctrl
_si470x_vidioc_s_ctrl:                  ## @si470x_vidioc_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	%rdx, %r14
	callq	_video_drvdata
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_si470x_disconnect_check
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.1:
	movl	(%r14), %eax
	cmpl	$129, %eax
	je	LBB0_4
## %bb.2:
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.3:
	movq	_SYSCONFIG2_VOLUME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	notl	%eax
	movq	(%r15), %rcx
	movq	_SYSCONFIG2@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	andl	(%rcx,%rsi,4), %eax
	movl	%eax, (%rcx,%rsi,4)
	orl	4(%r14), %eax
	movl	%eax, (%rcx,%rsi,4)
	jmp	LBB0_7
LBB0_4:
	cmpl	$1, 4(%r14)
	movq	_POWERCFG_DMUTE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jne	LBB0_6
## %bb.5:
	notl	%eax
	movq	(%r15), %rcx
	movq	_POWERCFG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	andl	%eax, (%rcx,%rsi,4)
	jmp	LBB0_7
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_9:
	testl	%ebx, %ebx
	jns	LBB0_11
LBB0_10:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	_dev_warn
LBB0_11:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	(%r15), %rcx
	movq	_POWERCFG@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	orl	%eax, (%rcx,%rsi,4)
LBB0_7:
	movq	%r15, %rdi
	callq	_si470x_set_register
	movl	%eax, %ebx
	testl	%ebx, %ebx
	jns	LBB0_11
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_SYSCONFIG2_VOLUME,4,2          ## @SYSCONFIG2_VOLUME
	.comm	_SYSCONFIG2,8,3                 ## @SYSCONFIG2
	.comm	_POWERCFG_DMUTE,4,2             ## @POWERCFG_DMUTE
	.comm	_POWERCFG,8,3                   ## @POWERCFG
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set control failed with %d\n"

	.no_dead_strip	_si470x_vidioc_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function si470x_vidioc_s_ctrl
_si470x_vidioc_s_ctrl:                  ; @si470x_vidioc_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, x2
	bl	_video_drvdata
	mov	x19, x0
	bl	_si470x_disconnect_check
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.1:
	ldr	w8, [x20]
	cmp	w8, #129
	b.eq	LBB0_4
; %bb.2:
	cmp	w8, #128
	b.ne	LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _SYSCONFIG2_VOLUME@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SYSCONFIG2_VOLUME@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SYSCONFIG2@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SYSCONFIG2@GOTPAGEOFF]
	ldr	x10, [x19]
Lloh5:
	ldr	x1, [x9]
	lsl	x9, x1, #2
	ldr	w11, [x10, x9]
	bic	w8, w11, w8
	str	w8, [x10, x9]
	ldr	w11, [x20, #4]
	orr	w8, w11, w8
	str	w8, [x10, x9]
	b	LBB0_12
LBB0_4:
	ldr	w9, [x20, #4]
Lloh6:
	adrp	x8, _POWERCFG_DMUTE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _POWERCFG_DMUTE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w9, #1
	b.ne	LBB0_10
; %bb.5:
	ldr	x9, [x19]
Lloh9:
	adrp	x10, _POWERCFG@GOTPAGE
Lloh10:
	ldr	x10, [x10, _POWERCFG@GOTPAGEOFF]
Lloh11:
	ldr	x1, [x10]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	bic	w8, w11, w8
	b	LBB0_11
LBB0_6:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	tbz	w21, #31, LBB0_9
LBB0_8:
	ldr	x0, [x19, #8]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_warn
LBB0_9:
	mov	x0, x21
	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_10:
	ldr	x9, [x19]
Lloh17:
	adrp	x10, _POWERCFG@GOTPAGE
Lloh18:
	ldr	x10, [x10, _POWERCFG@GOTPAGEOFF]
Lloh19:
	ldr	x1, [x10]
	lsl	x10, x1, #2
	ldr	w11, [x9, x10]
	orr	w8, w11, w8
LBB0_11:
	str	w8, [x9, x10]
LBB0_12:
	mov	x0, x19
	bl	_si470x_set_register
	mov	x21, x0
	tbz	w21, #31, LBB0_9
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_SYSCONFIG2_VOLUME,4,2          ; @SYSCONFIG2_VOLUME
	.comm	_SYSCONFIG2,8,3                 ; @SYSCONFIG2
	.comm	_POWERCFG_DMUTE,4,2             ; @POWERCFG_DMUTE
	.comm	_POWERCFG,8,3                   ; @POWERCFG
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set control failed with %d\n"

	.no_dead_strip	_si470x_vidioc_s_ctrl
.subsections_via_symbols
