	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cm3232_write_als_it
_cm3232_write_als_it:                   ## @cm3232_write_als_it
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_cm3232_als_it_scales@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movl	$8, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%r15
	callq	_ARRAY_SIZE
	cltq
	addq	$12, %r14
	cmpq	%rax, %r15
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdi
	cmpl	%ebx, -8(%rdi,%r14)
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%r12d, -4(%rdi,%r14)
	jne	LBB0_6
## %bb.4:
	movl	(%rdi,%r14), %eax
	movq	_CM3232_CMD_ALS_IT_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_CM3232_CMD_ALS_IT_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	notl	%ebx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	andl	(%r14), %ebx
	orl	%eax, %ebx
	movq	_CM3232_REG_ADDR_CMD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_i2c_smbus_write_byte_data
	testq	%rax, %rax
	js	LBB0_8
## %bb.5:
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_8:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_cm3232_als_it_scales,8,3       ## @cm3232_als_it_scales
	.comm	_CM3232_CMD_ALS_IT_SHIFT,4,2    ## @CM3232_CMD_ALS_IT_SHIFT
	.comm	_CM3232_CMD_ALS_IT_MASK,4,2     ## @CM3232_CMD_ALS_IT_MASK
	.comm	_CM3232_REG_ADDR_CMD,4,2        ## @CM3232_REG_ADDR_CMD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cm3232_write_als_it
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cm3232_write_als_it
_cm3232_write_als_it:                   ; @cm3232_write_als_it
	.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	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x20, [x0, #8]
Lloh0:
	adrp	x23, _cm3232_als_it_scales@GOTPAGE
Lloh1:
	ldr	x23, [x23, _cm3232_als_it_scales@GOTPAGEOFF]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x24, #0
	mov	x25, #0
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x25, x25, #1
	bl	_ARRAY_SIZE
	add	x24, x24, #12
	cmp	x25, w0, sxtw
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x23]
	ldr	w8, [x0, x24]
	cmp	w8, w22
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x0, x24
	ldr	w9, [x8, #4]
	cmp	w9, w21
	b.ne	LBB0_2
; %bb.5:
Lloh2:
	adrp	x9, _CM3232_CMD_ALS_IT_SHIFT@GOTPAGE
Lloh3:
	ldr	x9, [x9, _CM3232_CMD_ALS_IT_SHIFT@GOTPAGEOFF]
	ldr	w8, [x8, #8]
Lloh4:
	ldr	w9, [x9]
	lsl	w8, w8, w9
	ldr	w9, [x19]
Lloh5:
	adrp	x10, _CM3232_CMD_ALS_IT_MASK@GOTPAGE
Lloh6:
	ldr	x10, [x10, _CM3232_CMD_ALS_IT_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	bic	w9, w9, w10
	orr	w21, w9, w8
Lloh8:
	adrp	x8, _CM3232_REG_ADDR_CMD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CM3232_REG_ADDR_CMD@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_i2c_smbus_write_byte_data
	tbnz	x0, #63, LBB0_8
; %bb.6:
	mov	w0, #0
	str	w21, [x19]
	b	LBB0_8
LBB0_7:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
                                        ; kill: def $w0 killed $w0 killed $x0
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_cm3232_als_it_scales,8,3       ; @cm3232_als_it_scales
	.comm	_CM3232_CMD_ALS_IT_SHIFT,4,2    ; @CM3232_CMD_ALS_IT_SHIFT
	.comm	_CM3232_CMD_ALS_IT_MASK,4,2     ; @CM3232_CMD_ALS_IT_MASK
	.comm	_CM3232_REG_ADDR_CMD,4,2        ; @CM3232_REG_ADDR_CMD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cm3232_write_als_it
.subsections_via_symbols
