	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function upd64083_s_routing
_upd64083_s_routing:                    ## @upd64083_s_routing
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	callq	_to_state
	cmpl	$7, %ebx
	jg	LBB0_2
## %bb.1:
	movl	%ebx, %ecx
	andl	$6, %ecx
	cmpl	$6, %ecx
	je	LBB0_2
## %bb.3:
	movl	%ebx, %ecx
	shll	$6, %ecx
	movzbl	%cl, %ecx
	movl	%ecx, (%rax)
	movq	_UPD64083_EXT_Y_ADC@GOTPCREL(%rip), %rdx
	andl	(%rdx), %ebx
	shll	$3, %ebx
	movl	%ebx, 4(%rax)
	movq	8(%rax), %rax
	movq	_R00@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rsi
	movl	$-193, %edx
	andl	(%rax,%rsi,4), %edx
	orl	%ecx, %edx
	movq	_R02@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movl	(%rax,%rcx,4), %r15d
	andl	$-33, %r15d
	orl	%ebx, %r15d
	movq	%r14, %rdi
	callq	_upd64083_write
	movq	(%r12), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	callq	_upd64083_write
	xorl	%eax, %eax
	jmp	LBB0_4
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_UPD64083_EXT_Y_ADC,4,2         ## @UPD64083_EXT_Y_ADC
	.comm	_R00,8,3                        ## @R00
	.comm	_R02,8,3                        ## @R02
	.no_dead_strip	_upd64083_s_routing
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function upd64083_s_routing
_upd64083_s_routing:                    ; @upd64083_s_routing
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	bl	_to_state
	cmp	w20, #7
	b.gt	LBB0_3
; %bb.1:
	and	w8, w20, #0x6
	cmp	w8, #6
	b.eq	LBB0_3
; %bb.2:
	ubfiz	w8, w20, #6, #2
	str	w8, [x0]
Lloh0:
	adrp	x8, _UPD64083_EXT_Y_ADC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UPD64083_EXT_Y_ADC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	and	w8, w8, w20
	lsl	w8, w8, #3
	str	w8, [x0, #4]
Lloh3:
	adrp	x9, _R00@GOTPAGE
Lloh4:
	ldr	x9, [x9, _R00@GOTPAGEOFF]
	ldr	x10, [x0, #8]
Lloh5:
	ldr	x1, [x9]
	ldr	w2, [x10, x1, lsl #2]
Lloh6:
	adrp	x21, _R02@GOTPAGE
Lloh7:
	ldr	x21, [x21, _R02@GOTPAGEOFF]
	bfi	w2, w20, #6, #2
	ldr	x9, [x21]
	ldr	w9, [x10, x9, lsl #2]
	and	w9, w9, #0xffffffdf
	orr	w20, w9, w8
	mov	x0, x19
	bl	_upd64083_write
	ldr	x1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_upd64083_write
	mov	w0, #0
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_UPD64083_EXT_Y_ADC,4,2         ; @UPD64083_EXT_Y_ADC
	.comm	_R00,8,3                        ; @R00
	.comm	_R02,8,3                        ; @R02
	.no_dead_strip	_upd64083_s_routing
.subsections_via_symbols
