	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function indycam_s_ctrl
_indycam_s_ctrl:                        ## @indycam_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	%rsi, %rbx
	movq	%rdi, %r14
	callq	_to_indycam
	movl	(%rbx), %ecx
	addl	$-128, %ecx
	cmpl	$8, %ecx
	ja	LBB0_20
## %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), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	movq	%r14, %rdi
	callq	_indycam_read_reg
	testl	%eax, %eax
	jne	LBB0_21
## %bb.3:
	movl	4(%rbx), %eax
	cmpl	$134, (%rbx)
	jne	LBB0_7
## %bb.4:
	movq	_INDYCAM_CONTROL_AGCENA@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_20:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_14:
	movq	_INDYCAM_REG_RED_BALANCE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_18:
	movl	(%rax), %ecx
	movq	_CAMERA_VERSION_MOOSE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	jne	LBB0_21
## %bb.19:
	movq	_INDYCAM_REG_GAMMA@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_11:
	movq	_INDYCAM_REG_GAIN@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movl	4(%rbx), %eax
	leal	1(%rax), %ecx
	xorl	%edx, %edx
	cmpl	$255, %eax
	cmovnel	%ecx, %edx
	movq	_INDYCAM_REG_SHUTTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	jmp	LBB0_13
LBB0_15:
	movq	_INDYCAM_REG_BLUE_BALANCE@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_16:
	movq	_INDYCAM_REG_RED_SATURATION@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_17:
	movq	_INDYCAM_REG_BLUE_SATURATION@GOTPCREL(%rip), %rax
LBB0_12:
	movl	(%rax), %esi
	movl	4(%rbx), %edx
LBB0_13:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_indycam_write_reg              ## TAILCALL
LBB0_7:
	movq	_INDYCAM_CONTROL_AWBCTL@GOTPCREL(%rip), %rcx
LBB0_5:
	movl	(%rcx), %edx
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:
	orl	-28(%rbp), %edx
	jmp	LBB0_9
LBB0_8:
	notl	%edx
	andl	-28(%rbp), %edx
LBB0_9:
	movl	%edx, -28(%rbp)
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_indycam_write_reg
LBB0_21:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_18, LBB0_18-LJTI0_0
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_15, LBB0_15-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_16, LBB0_16-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
LJTI0_0:
	.long	L0_0_set_14
	.long	L0_0_set_18
	.long	L0_0_set_11
	.long	L0_0_set_10
	.long	L0_0_set_15
	.long	L0_0_set_2
	.long	L0_0_set_2
	.long	L0_0_set_16
	.long	L0_0_set_17
	.end_data_region
                                        ## -- End function
	.comm	_INDYCAM_REG_CONTROL,4,2        ## @INDYCAM_REG_CONTROL
	.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	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_indycam_s_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function indycam_s_ctrl
_indycam_s_ctrl:                        ; @indycam_s_ctrl
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_to_indycam
	ldr	w8, [x20]
	sub	w8, w8, #128
	cmp	w8, #8
	b.hi	LBB0_6
; %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	x21, _INDYCAM_REG_CONTROL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _INDYCAM_REG_CONTROL@GOTPAGEOFF]
	ldr	w1, [x21]
	add	x2, sp, #12
	mov	x0, x19
	bl	_indycam_read_reg
	cbnz	w0, LBB0_21
; %bb.3:
	ldp	w9, w8, [x20]
	cmp	w9, #134
	b.ne	LBB0_18
; %bb.4:
Lloh4:
	adrp	x9, _INDYCAM_CONTROL_AGCENA@GOTPAGE
Lloh5:
	ldr	x9, [x9, _INDYCAM_CONTROL_AGCENA@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cbz	w8, LBB0_19
LBB0_5:
	ldr	w8, [sp, #12]
	orr	w2, w8, w9
	b	LBB0_20
LBB0_6:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_21
LBB0_7:
Lloh10:
	adrp	x8, _INDYCAM_REG_RED_BALANCE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _INDYCAM_REG_RED_BALANCE@GOTPAGEOFF]
	b	LBB0_15
LBB0_8:
	ldr	w8, [x0]
Lloh12:
	adrp	x9, _CAMERA_VERSION_MOOSE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _CAMERA_VERSION_MOOSE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_17
; %bb.9:
Lloh15:
	adrp	x8, _INDYCAM_REG_GAMMA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INDYCAM_REG_GAMMA@GOTPAGEOFF]
	b	LBB0_15
LBB0_10:
Lloh17:
	adrp	x8, _INDYCAM_REG_GAIN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _INDYCAM_REG_GAIN@GOTPAGEOFF]
	b	LBB0_15
LBB0_11:
	ldr	w8, [x20, #4]
	cmp	w8, #255
	csinc	w2, wzr, w8, eq
Lloh19:
	adrp	x8, _INDYCAM_REG_SHUTTER@GOTPAGE
Lloh20:
	ldr	x8, [x8, _INDYCAM_REG_SHUTTER@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	b	LBB0_16
LBB0_12:
Lloh22:
	adrp	x8, _INDYCAM_REG_BLUE_BALANCE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _INDYCAM_REG_BLUE_BALANCE@GOTPAGEOFF]
	b	LBB0_15
LBB0_13:
Lloh24:
	adrp	x8, _INDYCAM_REG_RED_SATURATION@GOTPAGE
Lloh25:
	ldr	x8, [x8, _INDYCAM_REG_RED_SATURATION@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh26:
	adrp	x8, _INDYCAM_REG_BLUE_SATURATION@GOTPAGE
Lloh27:
	ldr	x8, [x8, _INDYCAM_REG_BLUE_SATURATION@GOTPAGEOFF]
LBB0_15:
	ldr	w1, [x8]
	ldr	w2, [x20, #4]
LBB0_16:
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_indycam_write_reg
LBB0_17:
	mov	w0, #0
	b	LBB0_21
LBB0_18:
Lloh28:
	adrp	x9, _INDYCAM_CONTROL_AWBCTL@GOTPAGE
Lloh29:
	ldr	x9, [x9, _INDYCAM_CONTROL_AWBCTL@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	cbnz	w8, LBB0_5
LBB0_19:
	ldr	w8, [sp, #12]
	bic	w2, w8, w9
LBB0_20:
	str	w2, [sp, #12]
	ldr	w1, [x21]
	mov	x0, x19
	bl	_indycam_write_reg
LBB0_21:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
	.byte	(LBB0_11-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	_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	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_indycam_s_ctrl
.subsections_via_symbols
