	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function als_sensing_range_store
_als_sensing_range_store:               ## @als_sensing_range_store
	.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	%rcx, %r14
	movq	%rdx, %rbx
	callq	_to_i2c_client
	movq	%rax, %r15
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	testl	%eax, %eax
	jne	LBB0_12
## %bb.1:
	movq	-32(%rbp), %rax
	leaq	-64001(%rax), %rcx
	cmpq	$-64001, %rcx                   ## imm = 0xFFFF05FF
	ja	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_3:
	cmpq	$1000, %rax                     ## imm = 0x3E8
	ja	LBB0_5
## %bb.4:
	movq	$1, -32(%rbp)
	jmp	LBB0_10
LBB0_5:
	cmpq	$4000, %rax                     ## imm = 0xFA0
	ja	LBB0_7
## %bb.6:
	movq	$2, -32(%rbp)
	jmp	LBB0_10
LBB0_7:
	cmpq	$16000, %rax                    ## imm = 0x3E80
	ja	LBB0_9
## %bb.8:
	movq	$3, -32(%rbp)
	jmp	LBB0_10
LBB0_9:
	movq	$4, -32(%rbp)
LBB0_10:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_i2c_smbus_read_byte_data
	testl	%eax, %eax
	js	LBB0_12
## %bb.11:
	andl	$252, %eax
	movl	-32(%rbp), %edx
	decl	%edx
	orl	%eax, %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	cmovsl	%eax, %r14d
	movl	%r14d, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_als_sensing_range_store
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function als_sensing_range_store
_als_sensing_range_store:               ; @als_sensing_range_store
	.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	x19, x3
	mov	x21, x2
	bl	_to_i2c_client
	mov	x20, x0
	add	x2, sp, #8
	mov	x0, x21
	mov	w1, #10
	bl	_kstrtoul
	cbnz	w0, LBB0_12
; %bb.1:
	ldr	x8, [sp, #8]
	mov	x9, #-64001
	add	x10, x8, x9
	cmp	x10, x9
	b.hi	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_3:
	cmp	x8, #1000
	b.hi	LBB0_5
; %bb.4:
	mov	w8, #1
	b	LBB0_10
LBB0_5:
	cmp	x8, #4000
	b.hi	LBB0_7
; %bb.6:
	mov	w8, #2
	b	LBB0_10
LBB0_7:
	mov	w9, #16000
	cmp	x8, x9
	b.hi	LBB0_9
; %bb.8:
	mov	w8, #3
	b	LBB0_10
LBB0_9:
	mov	w8, #4
LBB0_10:
	str	x8, [sp, #8]
	mov	x0, x20
	mov	w1, #0
	bl	_i2c_smbus_read_byte_data
	tbnz	w0, #31, LBB0_12
; %bb.11:
	and	w8, w0, #0xfc
	ldr	w9, [sp, #8]
	sub	w9, w9, #1
	orr	w2, w9, w8
	mov	x0, x20
	mov	w1, #0
	bl	_i2c_smbus_write_byte_data
	cmp	w0, #0
	csel	w0, w0, w19, lt
LBB0_12:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_als_sensing_range_store
.subsections_via_symbols
