	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function indycam_g_ctrl
_indycam_g_ctrl:                        ## @indycam_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_indycam
	movl	(%r14), %ecx
	addl	$-128, %ecx
	cmpl	$8, %ecx
	ja	LBB0_5
## %bb.1:
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_2:
	movq	_INDYCAM_REG_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_indycam_read_reg
	testl	%eax, %eax
	jne	LBB0_16
## %bb.3:
	cmpl	$134, (%r14)
	movl	-20(%rbp), %eax
	jne	LBB0_21
## %bb.4:
	movq	_INDYCAM_CONTROL_AGCENA@GOTPCREL(%rip), %rcx
	jmp	LBB0_22
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_6:
	movq	_INDYCAM_REG_RED_BALANCE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_7:
	movl	(%rax), %eax
	movq	_CAMERA_VERSION_MOOSE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
## %bb.8:
	movq	_INDYCAM_REG_GAMMA@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_9:
	movq	_INDYCAM_REG_GAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_10:
	movq	_INDYCAM_REG_SHUTTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_indycam_read_reg
	testl	%eax, %eax
	jne	LBB0_16
## %bb.11:
	movl	-20(%rbp), %eax
	subl	$1, %eax
	movl	$255, %ecx
	cmovael	%eax, %ecx
	movl	%ecx, 4(%r14)
	jmp	LBB0_23
LBB0_12:
	movq	_INDYCAM_REG_BLUE_BALANCE@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_13:
	movq	_INDYCAM_REG_RED_SATURATION@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_INDYCAM_REG_BLUE_SATURATION@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %esi
	leaq	-20(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_indycam_read_reg
	testl	%eax, %eax
	je	LBB0_18
LBB0_16:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_17:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_24
LBB0_18:
	movl	-20(%rbp), %eax
LBB0_19:
	movl	%eax, 4(%r14)
	jmp	LBB0_23
LBB0_20:
	movq	_INDYCAM_GAMMA_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_19
LBB0_21:
	movq	_INDYCAM_CONTROL_AWBCTL@GOTPCREL(%rip), %rcx
LBB0_22:
	xorl	%edx, %edx
	andl	(%rcx), %eax
	setne	%dl
	movl	%edx, 4(%r14)
LBB0_23:
	xorl	%eax, %eax
LBB0_24:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
LJTI0_0:
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_12
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_13
	.long	L0_0_set_14
	.end_data_region
                                        ## -- End function
	.comm	_INDYCAM_REG_CONTROL,4,2        ## @INDYCAM_REG_CONTROL
	.comm	_EIO,4,2                        ## @EIO
	.comm	_INDYCAM_CONTROL_AGCENA,4,2     ## @INDYCAM_CONTROL_AGCENA
	.comm	_INDYCAM_CONTROL_AWBCTL,4,2     ## @INDYCAM_CONTROL_AWBCTL
	.comm	_INDYCAM_REG_SHUTTER,4,2        ## @INDYCAM_REG_SHUTTER
	.comm	_INDYCAM_REG_GAIN,4,2           ## @INDYCAM_REG_GAIN
	.comm	_INDYCAM_REG_RED_BALANCE,4,2    ## @INDYCAM_REG_RED_BALANCE
	.comm	_INDYCAM_REG_BLUE_BALANCE,4,2   ## @INDYCAM_REG_BLUE_BALANCE
	.comm	_INDYCAM_REG_RED_SATURATION,4,2 ## @INDYCAM_REG_RED_SATURATION
	.comm	_INDYCAM_REG_BLUE_SATURATION,4,2 ## @INDYCAM_REG_BLUE_SATURATION
	.comm	_CAMERA_VERSION_MOOSE,4,2       ## @CAMERA_VERSION_MOOSE
	.comm	_INDYCAM_REG_GAMMA,4,2          ## @INDYCAM_REG_GAMMA
	.comm	_INDYCAM_GAMMA_DEFAULT,4,2      ## @INDYCAM_GAMMA_DEFAULT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_indycam_g_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function indycam_g_ctrl
_indycam_g_ctrl:                        ; @indycam_g_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x1
	mov	x20, x0
	bl	_to_indycam
	ldr	w8, [x19]
	sub	w8, w8, #128
	cmp	w8, #8
	b.hi	LBB0_5
; %bb.1:
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
Lloh2:
	adrp	x8, _INDYCAM_REG_CONTROL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INDYCAM_REG_CONTROL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_indycam_read_reg
	cbnz	w0, LBB0_16
; %bb.3:
	ldr	w9, [x19]
	ldr	w8, [sp, #12]
	cmp	w9, #134
	b.ne	LBB0_20
; %bb.4:
	mov	w0, #0
Lloh5:
	adrp	x9, _INDYCAM_CONTROL_AGCENA@GOTPAGE
Lloh6:
	ldr	x9, [x9, _INDYCAM_CONTROL_AGCENA@GOTPAGEOFF]
	b	LBB0_21
LBB0_5:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_17
LBB0_6:
Lloh9:
	adrp	x8, _INDYCAM_REG_RED_BALANCE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _INDYCAM_REG_RED_BALANCE@GOTPAGEOFF]
	b	LBB0_15
LBB0_7:
	ldr	w8, [x0]
Lloh11:
	adrp	x9, _CAMERA_VERSION_MOOSE@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CAMERA_VERSION_MOOSE@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_19
; %bb.8:
Lloh14:
	adrp	x8, _INDYCAM_REG_GAMMA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _INDYCAM_REG_GAMMA@GOTPAGEOFF]
	b	LBB0_15
LBB0_9:
Lloh16:
	adrp	x8, _INDYCAM_REG_GAIN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _INDYCAM_REG_GAIN@GOTPAGEOFF]
	b	LBB0_15
LBB0_10:
Lloh18:
	adrp	x8, _INDYCAM_REG_SHUTTER@GOTPAGE
Lloh19:
	ldr	x8, [x8, _INDYCAM_REG_SHUTTER@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_indycam_read_reg
	cbnz	w0, LBB0_16
; %bb.11:
	ldr	w8, [sp, #12]
	sub	w9, w8, #1
	mov	w10, #255
	cmp	w8, #0
	csel	w8, w10, w9, eq
	b	LBB0_22
LBB0_12:
Lloh21:
	adrp	x8, _INDYCAM_REG_BLUE_BALANCE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _INDYCAM_REG_BLUE_BALANCE@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh23:
	adrp	x8, _INDYCAM_REG_RED_SATURATION@GOTPAGE
Lloh24:
	ldr	x8, [x8, _INDYCAM_REG_RED_SATURATION@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh25:
	adrp	x8, _INDYCAM_REG_BLUE_SATURATION@GOTPAGE
Lloh26:
	ldr	x8, [x8, _INDYCAM_REG_BLUE_SATURATION@GOTPAGEOFF]
LBB0_15:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x20
	bl	_indycam_read_reg
	cbz	w0, LBB0_18
LBB0_16:
Lloh27:
	adrp	x8, _EIO@GOTPAGE
Lloh28:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_17:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_23
LBB0_18:
	ldr	w8, [sp, #12]
	b	LBB0_22
LBB0_19:
	mov	w0, #0
Lloh29:
	adrp	x8, _INDYCAM_GAMMA_DEFAULT@GOTPAGE
Lloh30:
	ldr	x8, [x8, _INDYCAM_GAMMA_DEFAULT@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	b	LBB0_22
LBB0_20:
	mov	w0, #0
Lloh32:
	adrp	x9, _INDYCAM_CONTROL_AWBCTL@GOTPAGE
Lloh33:
	ldr	x9, [x9, _INDYCAM_CONTROL_AWBCTL@GOTPAGEOFF]
LBB0_21:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w8, ne
LBB0_22:
	str	w8, [x19, #4]
LBB0_23:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGot	Lloh32, Lloh33
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_13-LBB0_2)>>2
	.byte	(LBB0_14-LBB0_2)>>2
                                        ; -- End function
	.comm	_INDYCAM_REG_CONTROL,4,2        ; @INDYCAM_REG_CONTROL
	.comm	_EIO,4,2                        ; @EIO
	.comm	_INDYCAM_CONTROL_AGCENA,4,2     ; @INDYCAM_CONTROL_AGCENA
	.comm	_INDYCAM_CONTROL_AWBCTL,4,2     ; @INDYCAM_CONTROL_AWBCTL
	.comm	_INDYCAM_REG_SHUTTER,4,2        ; @INDYCAM_REG_SHUTTER
	.comm	_INDYCAM_REG_GAIN,4,2           ; @INDYCAM_REG_GAIN
	.comm	_INDYCAM_REG_RED_BALANCE,4,2    ; @INDYCAM_REG_RED_BALANCE
	.comm	_INDYCAM_REG_BLUE_BALANCE,4,2   ; @INDYCAM_REG_BLUE_BALANCE
	.comm	_INDYCAM_REG_RED_SATURATION,4,2 ; @INDYCAM_REG_RED_SATURATION
	.comm	_INDYCAM_REG_BLUE_SATURATION,4,2 ; @INDYCAM_REG_BLUE_SATURATION
	.comm	_CAMERA_VERSION_MOOSE,4,2       ; @CAMERA_VERSION_MOOSE
	.comm	_INDYCAM_REG_GAMMA,4,2          ; @INDYCAM_REG_GAMMA
	.comm	_INDYCAM_GAMMA_DEFAULT,4,2      ; @INDYCAM_GAMMA_DEFAULT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_indycam_g_ctrl
.subsections_via_symbols
