	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_ctrl
_vidioc_s_ctrl:                         ## @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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	callq	_video_drvdata
	cmpl	$128, (%r15)
	jne	LBB0_5
## %bb.1:
	movq	%rax, %r14
	movq	8(%rax), %rbx
	movq	%rax, %rdi
	callq	_mutex_lock
	movq	_IO_MASK@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	addq	%rbx, %rdi
	callq	_inw
	movq	%rax, %r12
	movq	_STR_WREN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	notq	%rdi
	movq	(%r13), %rsi
	addq	%rbx, %rsi
	callq	_outw
	movl	4(%r15), %eax
	movl	%eax, 4(%r14)
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	movq	_STR_WREN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	jmp	LBB0_4
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_2:
	xorl	%edi, %edi
LBB0_4:
	movq	%rbx, %rsi
	callq	_outw
	movl	$4, %edi
	callq	_udelay
	movq	_IO_MASK@GOTPCREL(%rip), %rax
	addq	(%rax), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_outw
	movl	$125, %edi
	callq	_msleep
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IO_MASK,8,3                    ## @IO_MASK
	.comm	_STR_WREN,8,3                   ## @STR_WREN
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_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 vidioc_s_ctrl
_vidioc_s_ctrl:                         ; @vidioc_s_ctrl
	.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
	mov	x20, x2
	bl	_video_drvdata
	ldr	w8, [x20]
	cmp	w8, #128
	b.ne	LBB0_2
; %bb.1:
	mov	x19, x0
	ldr	x21, [x0, #8]
	bl	_mutex_lock
Lloh0:
	adrp	x23, _IO_MASK@GOTPAGE
Lloh1:
	ldr	x23, [x23, _IO_MASK@GOTPAGEOFF]
	ldr	x8, [x23]
	add	x0, x8, x21
	bl	_inw
	mov	x22, x0
Lloh2:
	adrp	x24, _STR_WREN@GOTPAGE
Lloh3:
	ldr	x24, [x24, _STR_WREN@GOTPAGEOFF]
	ldr	x8, [x24]
	mvn	x0, x8
	ldr	x8, [x23]
	add	x1, x8, x21
	bl	_outw
	ldr	w8, [x20, #4]
	str	w8, [x19, #4]
	ldr	x9, [x24]
	cmp	w8, #0
	csel	x0, xzr, x9, eq
	mov	x1, x21
	bl	_outw
	mov	w0, #4
	bl	_udelay
	ldr	x8, [x23]
	add	x1, x8, x21
	mov	x0, x22
	bl	_outw
	mov	w0, #125
	bl	_msleep
	mov	x0, x19
	bl	_mutex_unlock
	mov	w0, #0
	b	LBB0_3
LBB0_2:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_IO_MASK,8,3                    ; @IO_MASK
	.comm	_STR_WREN,8,3                   ; @STR_WREN
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_vidioc_s_ctrl
.subsections_via_symbols
