	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isl29018_read_proximity_ir
_isl29018_read_proximity_ir:            ## @isl29018_read_proximity_ir
	.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	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movl	(%rdi), %edi
	callq	_regmap_get_device
	movq	%rax, %r13
	movl	(%r15), %edi
	movq	_ISL29018_REG_ADD_COMMAND2@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ISL29018_CMD2_SCHEME_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISL29018_CMD2_SCHEME_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r12d, %eax
	shll	%cl, %eax
	movl	%eax, %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	jmp	LBB0_8
LBB0_2:
	movq	_ISL29018_CMD1_OPMODE_PROX_ONCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_isl29018_read_sensor_input
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_8
## %bb.3:
	cmpl	$1, %r12d
	je	LBB0_7
## %bb.4:
	movq	_ISL29018_CMD1_OPMODE_IR_ONCE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_isl29018_read_sensor_input
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	xorl	%ecx, %ecx
	subl	%eax, %ebx
	cmovbl	%ecx, %ebx
LBB0_7:
	movl	%ebx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_5:
	movl	%eax, %ebx
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	_ISL29018_REG_ADD_COMMAND2,4,2  ## @ISL29018_REG_ADD_COMMAND2
	.comm	_ISL29018_CMD2_SCHEME_MASK,4,2  ## @ISL29018_CMD2_SCHEME_MASK
	.comm	_ISL29018_CMD2_SCHEME_SHIFT,4,2 ## @ISL29018_CMD2_SCHEME_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error in setting operating mode\n"

	.comm	_ISL29018_CMD1_OPMODE_PROX_ONCE,4,2 ## @ISL29018_CMD1_OPMODE_PROX_ONCE
	.comm	_ISL29018_CMD1_OPMODE_IR_ONCE,4,2 ## @ISL29018_CMD1_OPMODE_IR_ONCE
	.no_dead_strip	_isl29018_read_proximity_ir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isl29018_read_proximity_ir
_isl29018_read_proximity_ir:            ; @isl29018_read_proximity_ir
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x2
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0]
	bl	_regmap_get_device
	mov	x23, x0
	ldr	w0, [x21]
Lloh0:
	adrp	x8, _ISL29018_REG_ADD_COMMAND2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISL29018_REG_ADD_COMMAND2@GOTPAGEOFF]
Lloh2:
	adrp	x9, _ISL29018_CMD2_SCHEME_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ISL29018_CMD2_SCHEME_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	ldr	w2, [x9]
Lloh6:
	adrp	x8, _ISL29018_CMD2_SCHEME_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ISL29018_CMD2_SCHEME_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	lsl	w3, w22, w8
	bl	_regmap_update_bits
	cbz	w0, LBB0_3
; %bb.1:
	mov	x20, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_dev_err
LBB0_2:
	mov	x0, x20
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh11:
	adrp	x8, _ISL29018_CMD1_OPMODE_PROX_ONCE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ISL29018_CMD1_OPMODE_PROX_ONCE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_isl29018_read_sensor_input
	mov	x20, x0
	tbnz	w0, #31, LBB0_2
; %bb.4:
	cmp	w22, #1
	b.ne	LBB0_6
; %bb.5:
	str	w20, [x19]
	mov	w20, #0
	b	LBB0_2
LBB0_6:
Lloh14:
	adrp	x8, _ISL29018_CMD1_OPMODE_IR_ONCE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ISL29018_CMD1_OPMODE_IR_ONCE@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_isl29018_read_sensor_input
	tbnz	w0, #31, LBB0_8
; %bb.7:
	subs	w8, w20, w0
	mov	w20, #0
	csel	w8, wzr, w8, lo
	str	w8, [x19]
	b	LBB0_2
LBB0_8:
	mov	x20, x0
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_ISL29018_REG_ADD_COMMAND2,4,2  ; @ISL29018_REG_ADD_COMMAND2
	.comm	_ISL29018_CMD2_SCHEME_MASK,4,2  ; @ISL29018_CMD2_SCHEME_MASK
	.comm	_ISL29018_CMD2_SCHEME_SHIFT,4,2 ; @ISL29018_CMD2_SCHEME_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error in setting operating mode\n"

	.comm	_ISL29018_CMD1_OPMODE_PROX_ONCE,4,2 ; @ISL29018_CMD1_OPMODE_PROX_ONCE
	.comm	_ISL29018_CMD1_OPMODE_IR_ONCE,4,2 ; @ISL29018_CMD1_OPMODE_IR_ONCE
	.no_dead_strip	_isl29018_read_proximity_ir
.subsections_via_symbols
