	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ioctl_g_ctrl
_ioctl_g_ctrl:                          ## @ioctl_g_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	%rsi, %r14
	movq	(%rdi), %r13
	movq	8(%r13), %r15
	movq	(%rsi), %rdi
	movq	_V4L2_CID_EXPOSURE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_5
## %bb.1:
	movq	_TCM825X_ESRSPD_U@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TCM825X_ADDR
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_tcm825x_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.2:
	movq	_TCM825X_ESRSPD_L@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_TCM825X_ADDR
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_tcm825x_read_reg
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	andl	$31, %ebx
	shll	$8, %ebx
	orl	%ebx, %eax
	movl	%eax, 8(%r14)
	jmp	LBB0_12
LBB0_5:
	callq	_find_vctrl
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r12
	movl	4(%rax), %edi
	callq	_TCM825X_ADDR
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_tcm825x_read_reg
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.8:
	movl	4(%r12), %edi
	callq	_TCM825X_MASK
	movl	%eax, %r15d
	andl	%ebx, %r15d
	movb	(%r12), %cl
	shrl	%cl, %r15d
	movq	(%r14), %rax
	movq	_V4L2_CID_HFLIP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_10
## %bb.9:
	movq	_V4L2_CID_VFLIP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
LBB0_10:
	movq	(%r13), %rcx
	xorl	%eax, %eax
	callq	*(%rcx)
	xorl	%eax, %r15d
LBB0_11:
	movl	%r15d, 8(%r14)
LBB0_12:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	movl	%eax, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_CID_EXPOSURE,8,3          ## @V4L2_CID_EXPOSURE
	.comm	_TCM825X_ESRSPD_U,4,2           ## @TCM825X_ESRSPD_U
	.comm	_TCM825X_ESRSPD_L,4,2           ## @TCM825X_ESRSPD_L
	.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_g_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ioctl_g_ctrl
_ioctl_g_ctrl:                          ; @ioctl_g_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	x19, x1
	ldr	x23, [x0]
	ldr	x21, [x23, #8]
	ldr	x0, [x1]
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_4
; %bb.1:
Lloh3:
	adrp	x8, _TCM825X_ESRSPD_U@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TCM825X_ESRSPD_U@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	bl	_TCM825X_ADDR
	mov	x1, x0
	mov	x0, x21
	bl	_tcm825x_read_reg
	mov	x20, x0
	tbnz	w0, #31, LBB0_11
; %bb.2:
Lloh6:
	adrp	x8, _TCM825X_ESRSPD_L@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TCM825X_ESRSPD_L@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	bl	_TCM825X_ADDR
	mov	x1, x0
	mov	x0, x21
	bl	_tcm825x_read_reg
	tbnz	w0, #31, LBB0_10
; %bb.3:
	ubfiz	w8, w20, #8, #5
	mov	w20, #0
	orr	w8, w0, w8
	str	w8, [x19, #8]
	b	LBB0_11
LBB0_4:
	bl	_find_vctrl
	cbz	x0, LBB0_9
; %bb.5:
	mov	x22, x0
	ldr	w0, [x0, #4]
	bl	_TCM825X_ADDR
	mov	x1, x0
	mov	x0, x21
	bl	_tcm825x_read_reg
	mov	x20, x0
	tbnz	w0, #31, LBB0_11
; %bb.6:
	ldr	w0, [x22, #4]
	bl	_TCM825X_MASK
	and	w8, w0, w20
	ldr	w9, [x22]
	lsr	w21, w8, w9
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _V4L2_CID_HFLIP@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_CID_HFLIP@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
Lloh12:
	adrp	x10, _V4L2_CID_VFLIP@GOTPAGE
Lloh13:
	ldr	x10, [x10, _V4L2_CID_VFLIP@GOTPAGEOFF]
Lloh14:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_8
; %bb.7:
	ldr	x8, [x23]
	ldr	x8, [x8]
	blr	x8
	eor	w21, w0, w21
LBB0_8:
	mov	w20, #0
	str	w21, [x19, #8]
	b	LBB0_11
LBB0_9:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_11
LBB0_10:
	mov	x20, x0
LBB0_11:
	mov	x0, x20
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_CID_EXPOSURE,8,3          ; @V4L2_CID_EXPOSURE
	.comm	_TCM825X_ESRSPD_U,4,2           ; @TCM825X_ESRSPD_U
	.comm	_TCM825X_ESRSPD_L,4,2           ; @TCM825X_ESRSPD_L
	.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_g_ctrl
.subsections_via_symbols
