	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hv7131r_set_ctrl
_hv7131r_set_ctrl:                      ## @hv7131r_set_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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	(%rsi), %eax
	addl	$-128, %eax
	cmpl	$4, %eax
	ja	LBB0_9
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_2:
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$49, %esi
	jmp	LBB0_11
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_10:
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$48, %esi
	jmp	LBB0_11
LBB0_3:
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$51, %esi
	jmp	LBB0_11
LBB0_5:
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_sn9c102_i2c_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.8:
	movl	4(%rbx), %ecx
	shll	$3, %ecx
	andl	$247, %eax
	orl	%ecx, %eax
	movq	%r14, %rdi
	movl	$1, %esi
	movl	%eax, %edx
	jmp	LBB0_11
LBB0_4:
	movl	4(%rbx), %edx
	movq	%r14, %rdi
	movl	$50, %esi
LBB0_11:
	callq	_sn9c102_i2c_write
	movq	_EIO@GOTPCREL(%rip), %rdx
	xorl	%ecx, %ecx
	subl	(%rdx), %ecx
	testl	%eax, %eax
	cmovel	%eax, %ecx
	jmp	LBB0_12
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
LBB0_12:
	movl	%ecx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_4, LBB0_4-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_10
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_4
	.end_data_region
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_hv7131r_set_ctrl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hv7131r_set_ctrl
_hv7131r_set_ctrl:                      ; @hv7131r_set_ctrl
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	w8, [x1]
	sub	w8, w8, #128
	cmp	w8, #4
	b.hi	LBB0_3
; %bb.1:
	mov	x20, x1
	mov	x19, x0
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:
	ldr	w2, [x20, #4]
	mov	x0, x19
	mov	w1, #49
	b	LBB0_9
LBB0_3:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_4:
	ldr	w2, [x20, #4]
	mov	x0, x19
	mov	w1, #48
	b	LBB0_9
LBB0_5:
	ldr	w2, [x20, #4]
	mov	x0, x19
	mov	w1, #51
	b	LBB0_9
LBB0_6:
	mov	x0, x19
	mov	w1, #1
	bl	_sn9c102_i2c_read
	tbnz	w0, #31, LBB0_10
; %bb.7:
	ldr	w8, [x20, #4]
	mov	w9, #247
	and	w9, w0, w9
	orr	w2, w9, w8, lsl #3
	mov	x0, x19
	mov	w1, #1
	b	LBB0_9
LBB0_8:
	ldr	w2, [x20, #4]
	mov	x0, x19
	mov	w1, #50
LBB0_9:
	bl	_sn9c102_i2c_write
Lloh4:
	adrp	x8, _EIO@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cmp	w0, #0
	csneg	w0, wzr, w8, eq
	b	LBB0_12
LBB0_10:
Lloh7:
	adrp	x8, _EIO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_4-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_hv7131r_set_ctrl
.subsections_via_symbols
