	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_s_ctrl
_ioctl_s_ctrl:                          ## @ioctl_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	(%rdi), %r13
	movq	8(%r13), %r14
	movl	(%rsi), %r12d
	movq	8(%rsi), %rdi
	movq	_V4L2_CID_EXPOSURE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_5
## %bb.1:
	movq	_TCM825X_ESRSPD_L@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TCM825X_MASK
	movl	%eax, %r15d
	movl	%r12d, %ebx
	sarl	$8, %ebx
	movq	_TCM825X_ESRSPD_U@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	callq	_TCM825X_MASK
	andl	%eax, %ebx
	movl	(%r13), %esi
	movq	%r14, %rdi
	movl	%ebx, %edx
	callq	_tcm825x_write_reg_mask
	testq	%rax, %rax
	jne	LBB0_10
## %bb.2:
	andl	%r12d, %r15d
	movq	_TCM825X_ESRSPD_L@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r15d, %edx
	jmp	LBB0_3
LBB0_5:
	movq	%rsi, %rbx
	callq	_find_vctrl
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	%rax, %r15
	movq	8(%rbx), %rax
	movq	_V4L2_CID_HFLIP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.7:
	movq	_V4L2_CID_VFLIP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
LBB0_8:
	movq	(%r13), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	xorl	%eax, %r12d
LBB0_9:
	movb	(%r15), %cl
	shll	%cl, %r12d
	movl	4(%r15), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
LBB0_3:
	callq	_tcm825x_write_reg_mask
	testq	%rax, %rax
	je	LBB0_4
LBB0_10:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_12
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_12:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CID_EXPOSURE,8,3          ## @V4L2_CID_EXPOSURE
	.comm	_TCM825X_ESRSPD_L,4,2           ## @TCM825X_ESRSPD_L
	.comm	_TCM825X_ESRSPD_U,4,2           ## @TCM825X_ESRSPD_U
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_CID_HFLIP,8,3             ## @V4L2_CID_HFLIP
	.comm	_V4L2_CID_VFLIP,8,3             ## @V4L2_CID_VFLIP
	.no_dead_strip	_ioctl_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_s_ctrl
_ioctl_s_ctrl:                          ; @ioctl_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
	ldr	x23, [x0]
	ldr	x19, [x23, #8]
	ldr	w22, [x1]
	ldr	x0, [x1, #8]
Lloh0:
	adrp	x8, _V4L2_CID_EXPOSURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_CID_EXPOSURE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x21, _TCM825X_ESRSPD_L@GOTPAGE
Lloh4:
	ldr	x21, [x21, _TCM825X_ESRSPD_L@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_TCM825X_MASK
	mov	x20, x0
Lloh5:
	adrp	x23, _TCM825X_ESRSPD_U@GOTPAGE
Lloh6:
	ldr	x23, [x23, _TCM825X_ESRSPD_U@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_TCM825X_MASK
	and	w2, w0, w22, asr #8
	ldr	w1, [x23]
	mov	x0, x19
	bl	_tcm825x_write_reg_mask
	cbnz	x0, LBB0_8
; %bb.2:
	and	w2, w20, w22
	ldr	w1, [x21]
	b	LBB0_7
LBB0_3:
	mov	x21, x1
	bl	_find_vctrl
	cbz	x0, LBB0_9
; %bb.4:
	mov	x20, x0
	ldr	x8, [x21, #8]
Lloh7:
	adrp	x9, _V4L2_CID_HFLIP@GOTPAGE
Lloh8:
	ldr	x9, [x9, _V4L2_CID_HFLIP@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
Lloh10:
	adrp	x10, _V4L2_CID_VFLIP@GOTPAGE
Lloh11:
	ldr	x10, [x10, _V4L2_CID_VFLIP@GOTPAGEOFF]
Lloh12:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.5:
	ldr	x8, [x23]
	ldr	x8, [x8]
	blr	x8
	eor	w22, w0, w22
LBB0_6:
	ldp	w8, w1, [x20]
	lsl	w2, w22, w8
LBB0_7:
	mov	x0, x19
	bl	_tcm825x_write_reg_mask
	cbz	x0, LBB0_11
LBB0_8:
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_11:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CID_EXPOSURE,8,3          ; @V4L2_CID_EXPOSURE
	.comm	_TCM825X_ESRSPD_L,4,2           ; @TCM825X_ESRSPD_L
	.comm	_TCM825X_ESRSPD_U,4,2           ; @TCM825X_ESRSPD_U
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_CID_HFLIP,8,3             ; @V4L2_CID_HFLIP
	.comm	_V4L2_CID_VFLIP,8,3             ; @V4L2_CID_VFLIP
	.no_dead_strip	_ioctl_s_ctrl
.subsections_via_symbols
