	.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	%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	%rcx, %r14
	movq	%rdx, %rbx
	movq	%rdi, %r12
	callq	_to_i2c_client
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_i2c_get_clientdata
	movq	%rax, %r15
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_kstrtoul
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.1:
	movq	-48(%rbp), %rcx
	movl	$1, %eax
	cmpq	$4096, %rcx                     ## imm = 0x1000
	jb	LBB0_4
## %bb.2:
	movl	$2, %eax
	cmpq	$65536, %rcx                    ## imm = 0x10000
	jae	LBB0_3
LBB0_4:
	movq	%rax, -48(%rbp)
	movq	%r12, %rdi
	callq	_pm_runtime_get_sync
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	%r13, %rdi
	movl	$129, %esi
	callq	_i2c_smbus_read_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_7
## %bb.5:
	andl	$250, %ebx
	xorl	%edx, %edx
	cmpq	$1, -48(%rbp)
	sete	%dl
	orl	%ebx, %edx
	movq	%r13, %rdi
	movl	$129, %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	js	LBB0_6
## %bb.9:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	callq	_pm_runtime_put_sync
	movl	%r14d, %ebx
	jmp	LBB0_8
LBB0_3:
	movq	_ERANGE@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_6:
	movl	%eax, %ebx
LBB0_7:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	callq	_pm_runtime_put_sync
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ERANGE,4,2                     ## @ERANGE
	.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, #80
	.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
	mov	x20, x3
	mov	x23, x2
	mov	x19, x0
	bl	_to_i2c_client
	mov	x22, x0
	bl	_i2c_get_clientdata
	mov	x21, x0
	add	x2, sp, #8
	mov	x0, x23
	mov	w1, #10
	bl	_kstrtoul
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	x8, [sp, #8]
	cmp	x8, #1, lsl #12                 ; =4096
	b.hs	LBB0_3
; %bb.2:
	mov	w8, #1
	b	LBB0_5
LBB0_3:
	cmp	x8, #16, lsl #12                ; =65536
	b.hs	LBB0_8
; %bb.4:
	mov	w8, #2
LBB0_5:
	str	x8, [sp, #8]
	mov	x0, x19
	bl	_pm_runtime_get_sync
	mov	x0, x21
	bl	_mutex_lock
	mov	x0, x22
	mov	w1, #129
	bl	_i2c_smbus_read_byte_data
	mov	x23, x0
	tbnz	w0, #31, LBB0_10
; %bb.6:
	mov	w8, #250
	and	w8, w23, w8
	ldr	x9, [sp, #8]
	cmp	x9, #1
	cset	w9, eq
	orr	w2, w8, w9
	mov	x0, x22
	mov	w1, #129
	bl	_i2c_smbus_write_byte_data
	tbnz	w0, #31, LBB0_9
; %bb.7:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	bl	_pm_runtime_put_sync
	mov	x23, x20
	b	LBB0_11
LBB0_8:
Lloh0:
	adrp	x8, _ERANGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_11
LBB0_9:
	mov	x23, x0
LBB0_10:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x19
	bl	_pm_runtime_put_sync
LBB0_11:
	mov	x0, x23
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ERANGE,4,2                     ; @ERANGE
	.no_dead_strip	_als_sensing_range_store
.subsections_via_symbols
