	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cm36651_setup_reg
_cm36651_setup_reg:                     ## @cm36651_setup_reg
	.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	%rdi, %r14
	movq	24(%rdi), %rbx
	movq	(%rdi), %rax
	movq	_CM36651_ALS_ENABLE@GOTPCREL(%rip), %rcx
	movq	_CM36651_ALS_THRES@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	16(%rdi), %rcx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	_CM36651_CS_CONF1@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%edx, (%rax,%rcx,4)
	movq	_CM36651_CS_CONF2_DEFAULT_BIT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_CM36651_CS_CONF2@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	_CM36651_CS_CONF_REG_NUM@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_5
## %bb.1:
	movq	_cm36651_cs_reg@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	(%rcx), %rsi
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	movl	$1, %r15d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r13), %rax
	cmpq	%rax, %r15
	jge	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	(%r14), %rax
	movq	(%r12), %rcx
	movq	(%rcx,%r15,8), %rsi
	movl	(%rax,%r15,4), %edx
	movq	%rbx, %rdi
	callq	_i2c_smbus_write_byte_data
	incq	%r15
	testl	%eax, %eax
	jns	LBB0_3
	jmp	LBB0_12
LBB0_5:
	movq	%rbx, %r15
	movq	_CM36651_PS_ENABLE@GOTPCREL(%rip), %rax
	movq	_CM36651_PS_IT2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	8(%r14), %rax
	movq	_CM36651_PS_CONF1@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	_CM36651_PS_INITIAL_THD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_CM36651_PS_THD@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	_CM36651_PS_CANC_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_CM36651_PS_CANC@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%ecx, (%rax,%rdx,4)
	movq	_CM36651_PS_HYS2@GOTPCREL(%rip), %rcx
	movq	_CM36651_PS_DIR_INT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movq	_CM36651_PS_SMART_PERS_EN@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movq	_CM36651_PS_CONF2@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	%edx, (%rax,%rcx,4)
	movq	_CM36651_PS_REG_NUM@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_10
## %bb.6:
	movq	_cm36651_ps_reg@GOTPCREL(%rip), %r12
	movq	(%r12), %rcx
	movq	(%rcx), %rsi
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_12
## %bb.7:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r14), %rax
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rsi
	movl	(%rax,%rbx,4), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_i2c_smbus_write_byte_data
	incq	%rbx
	testl	%eax, %eax
	jns	LBB0_8
	jmp	LBB0_12
LBB0_10:
	movq	_CM36651_CS_CONF1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_CM36651_ALS_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_12
## %bb.11:
	movq	16(%r14), %rdi
	movq	_CM36651_PS_CONF1@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_CM36651_PS_DISABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%ecx, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CM36651_ALS_ENABLE,4,2         ## @CM36651_ALS_ENABLE
	.comm	_CM36651_ALS_THRES,4,2          ## @CM36651_ALS_THRES
	.comm	_CM36651_CS_CONF1,8,3           ## @CM36651_CS_CONF1
	.comm	_CM36651_CS_CONF2_DEFAULT_BIT,4,2 ## @CM36651_CS_CONF2_DEFAULT_BIT
	.comm	_CM36651_CS_CONF2,8,3           ## @CM36651_CS_CONF2
	.comm	_CM36651_CS_CONF_REG_NUM,4,2    ## @CM36651_CS_CONF_REG_NUM
	.comm	_cm36651_cs_reg,8,3             ## @cm36651_cs_reg
	.comm	_CM36651_PS_ENABLE,4,2          ## @CM36651_PS_ENABLE
	.comm	_CM36651_PS_IT2,4,2             ## @CM36651_PS_IT2
	.comm	_CM36651_PS_CONF1,8,3           ## @CM36651_PS_CONF1
	.comm	_CM36651_PS_INITIAL_THD,4,2     ## @CM36651_PS_INITIAL_THD
	.comm	_CM36651_PS_THD,8,3             ## @CM36651_PS_THD
	.comm	_CM36651_PS_CANC_DEFAULT,4,2    ## @CM36651_PS_CANC_DEFAULT
	.comm	_CM36651_PS_CANC,8,3            ## @CM36651_PS_CANC
	.comm	_CM36651_PS_HYS2,4,2            ## @CM36651_PS_HYS2
	.comm	_CM36651_PS_DIR_INT,4,2         ## @CM36651_PS_DIR_INT
	.comm	_CM36651_PS_SMART_PERS_EN,4,2   ## @CM36651_PS_SMART_PERS_EN
	.comm	_CM36651_PS_CONF2,8,3           ## @CM36651_PS_CONF2
	.comm	_CM36651_PS_REG_NUM,4,2         ## @CM36651_PS_REG_NUM
	.comm	_cm36651_ps_reg,8,3             ## @cm36651_ps_reg
	.comm	_CM36651_ALS_DISABLE,4,2        ## @CM36651_ALS_DISABLE
	.comm	_CM36651_PS_DISABLE,4,2         ## @CM36651_PS_DISABLE
	.no_dead_strip	_cm36651_setup_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cm36651_setup_reg
_cm36651_setup_reg:                     ; @cm36651_setup_reg
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
Lloh0:
	adrp	x8, _CM36651_ALS_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CM36651_ALS_ENABLE@GOTPAGEOFF]
	ldp	x21, x20, [x0, #16]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _CM36651_ALS_THRES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CM36651_ALS_THRES@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	x8, [x0]
Lloh6:
	adrp	x22, _CM36651_CS_CONF1@GOTPAGE
Lloh7:
	ldr	x22, [x22, _CM36651_CS_CONF1@GOTPAGEOFF]
	ldr	x10, [x22]
	str	w9, [x8, x10, lsl #2]
Lloh8:
	adrp	x9, _CM36651_CS_CONF2_DEFAULT_BIT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CM36651_CS_CONF2_DEFAULT_BIT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _CM36651_CS_CONF2@GOTPAGE
Lloh12:
	ldr	x10, [x10, _CM36651_CS_CONF2@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	str	w9, [x8, x10, lsl #2]
Lloh14:
	adrp	x23, _CM36651_CS_CONF_REG_NUM@GOTPAGE
Lloh15:
	ldr	x23, [x23, _CM36651_CS_CONF_REG_NUM@GOTPAGEOFF]
	ldr	w9, [x23]
	cmp	w9, #1
	b.lt	LBB0_5
; %bb.1:
Lloh16:
	adrp	x24, _cm36651_cs_reg@GOTPAGE
Lloh17:
	ldr	x24, [x24, _cm36651_cs_reg@GOTPAGEOFF]
	ldr	x9, [x24]
	ldr	x1, [x9]
	ldr	w2, [x8]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_12
; %bb.2:
	mov	w25, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x23]
	cmp	x25, x8
	b.ge	LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19]
	ldr	x9, [x24]
	ldr	x1, [x9, x25, lsl #3]
	ldr	w2, [x8, x25, lsl #2]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	add	x25, x25, #1
	tbz	w0, #31, LBB0_3
	b	LBB0_12
LBB0_5:
Lloh18:
	adrp	x8, _CM36651_PS_ENABLE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CM36651_PS_ENABLE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _CM36651_PS_IT2@GOTPAGE
Lloh22:
	ldr	x9, [x9, _CM36651_PS_IT2@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	orr	w9, w9, w8
	ldr	x8, [x19, #8]
Lloh24:
	adrp	x23, _CM36651_PS_CONF1@GOTPAGE
Lloh25:
	ldr	x23, [x23, _CM36651_PS_CONF1@GOTPAGEOFF]
	ldr	x10, [x23]
	str	w9, [x8, x10, lsl #2]
Lloh26:
	adrp	x9, _CM36651_PS_INITIAL_THD@GOTPAGE
Lloh27:
	ldr	x9, [x9, _CM36651_PS_INITIAL_THD@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
Lloh29:
	adrp	x10, _CM36651_PS_THD@GOTPAGE
Lloh30:
	ldr	x10, [x10, _CM36651_PS_THD@GOTPAGEOFF]
Lloh31:
	ldr	x10, [x10]
	str	w9, [x8, x10, lsl #2]
Lloh32:
	adrp	x9, _CM36651_PS_CANC_DEFAULT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _CM36651_PS_CANC_DEFAULT@GOTPAGEOFF]
Lloh34:
	adrp	x10, _CM36651_PS_CANC@GOTPAGE
Lloh35:
	ldr	x10, [x10, _CM36651_PS_CANC@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
Lloh37:
	ldr	x10, [x10]
	str	w9, [x8, x10, lsl #2]
Lloh38:
	adrp	x9, _CM36651_PS_HYS2@GOTPAGE
Lloh39:
	ldr	x9, [x9, _CM36651_PS_HYS2@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
Lloh41:
	adrp	x10, _CM36651_PS_DIR_INT@GOTPAGE
Lloh42:
	ldr	x10, [x10, _CM36651_PS_DIR_INT@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x10]
Lloh44:
	adrp	x11, _CM36651_PS_SMART_PERS_EN@GOTPAGE
Lloh45:
	ldr	x11, [x11, _CM36651_PS_SMART_PERS_EN@GOTPAGEOFF]
	orr	w9, w10, w9
Lloh46:
	ldr	w10, [x11]
	orr	w9, w9, w10
Lloh47:
	adrp	x10, _CM36651_PS_CONF2@GOTPAGE
Lloh48:
	ldr	x10, [x10, _CM36651_PS_CONF2@GOTPAGEOFF]
Lloh49:
	ldr	x10, [x10]
	str	w9, [x8, x10, lsl #2]
Lloh50:
	adrp	x24, _CM36651_PS_REG_NUM@GOTPAGE
Lloh51:
	ldr	x24, [x24, _CM36651_PS_REG_NUM@GOTPAGEOFF]
	ldr	w9, [x24]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.6:
Lloh52:
	adrp	x25, _cm36651_ps_reg@GOTPAGE
Lloh53:
	ldr	x25, [x25, _cm36651_ps_reg@GOTPAGEOFF]
	ldr	x9, [x25]
	ldr	x1, [x9]
	ldr	w2, [x8]
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_12
; %bb.7:
	mov	w26, #1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x8, [x24]
	cmp	x26, x8
	b.ge	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x25]
	ldr	x1, [x9, x26, lsl #3]
	ldr	w2, [x8, x26, lsl #2]
	mov	x0, x21
	bl	_i2c_smbus_write_byte_data
	add	x26, x26, #1
	tbz	w0, #31, LBB0_8
	b	LBB0_12
LBB0_10:
	ldr	x1, [x22]
Lloh54:
	adrp	x8, _CM36651_ALS_DISABLE@GOTPAGE
Lloh55:
	ldr	x8, [x8, _CM36651_ALS_DISABLE@GOTPAGEOFF]
Lloh56:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_12
; %bb.11:
	ldr	x0, [x19, #16]
	ldr	x1, [x23]
Lloh57:
	adrp	x8, _CM36651_PS_DISABLE@GOTPAGE
Lloh58:
	ldr	x8, [x8, _CM36651_PS_DISABLE@GOTPAGEOFF]
Lloh59:
	ldr	w2, [x8]
	bl	_i2c_smbus_write_byte_data
	cmp	w0, #0
	csel	w0, w0, wzr, lt
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh36
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.cfi_endproc
                                        ; -- End function
	.comm	_CM36651_ALS_ENABLE,4,2         ; @CM36651_ALS_ENABLE
	.comm	_CM36651_ALS_THRES,4,2          ; @CM36651_ALS_THRES
	.comm	_CM36651_CS_CONF1,8,3           ; @CM36651_CS_CONF1
	.comm	_CM36651_CS_CONF2_DEFAULT_BIT,4,2 ; @CM36651_CS_CONF2_DEFAULT_BIT
	.comm	_CM36651_CS_CONF2,8,3           ; @CM36651_CS_CONF2
	.comm	_CM36651_CS_CONF_REG_NUM,4,2    ; @CM36651_CS_CONF_REG_NUM
	.comm	_cm36651_cs_reg,8,3             ; @cm36651_cs_reg
	.comm	_CM36651_PS_ENABLE,4,2          ; @CM36651_PS_ENABLE
	.comm	_CM36651_PS_IT2,4,2             ; @CM36651_PS_IT2
	.comm	_CM36651_PS_CONF1,8,3           ; @CM36651_PS_CONF1
	.comm	_CM36651_PS_INITIAL_THD,4,2     ; @CM36651_PS_INITIAL_THD
	.comm	_CM36651_PS_THD,8,3             ; @CM36651_PS_THD
	.comm	_CM36651_PS_CANC_DEFAULT,4,2    ; @CM36651_PS_CANC_DEFAULT
	.comm	_CM36651_PS_CANC,8,3            ; @CM36651_PS_CANC
	.comm	_CM36651_PS_HYS2,4,2            ; @CM36651_PS_HYS2
	.comm	_CM36651_PS_DIR_INT,4,2         ; @CM36651_PS_DIR_INT
	.comm	_CM36651_PS_SMART_PERS_EN,4,2   ; @CM36651_PS_SMART_PERS_EN
	.comm	_CM36651_PS_CONF2,8,3           ; @CM36651_PS_CONF2
	.comm	_CM36651_PS_REG_NUM,4,2         ; @CM36651_PS_REG_NUM
	.comm	_cm36651_ps_reg,8,3             ; @cm36651_ps_reg
	.comm	_CM36651_ALS_DISABLE,4,2        ; @CM36651_ALS_DISABLE
	.comm	_CM36651_PS_DISABLE,4,2         ; @CM36651_PS_DISABLE
	.no_dead_strip	_cm36651_setup_reg
.subsections_via_symbols
