	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function isl29028_set_als_ir_mode
_isl29028_set_als_ir_mode:              ## @isl29028_set_als_ir_mode
	.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
	xorl	%r14d, %r14d
	cmpl	%esi, (%rdi)
	je	LBB0_16
## %bb.1:
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	8(%rdi), %esi
	callq	_isl29028_set_als_scale
	testl	%eax, %eax
	js	LBB0_15
## %bb.2:
	cmpl	$128, %r15d
	je	LBB0_8
## %bb.3:
	cmpl	$129, %r15d
	je	LBB0_9
## %bb.4:
	cmpl	$130, %r15d
	jne	LBB0_11
## %bb.5:
	movl	4(%rbx), %edi
	movq	_ISL29028_REG_CONFIGURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ISL29028_CONF_ALS_IR_MODE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISL29028_CONF_ALS_IR_MODE_ALS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_15
## %bb.6:
	leaq	4(%rbx), %rcx
	movq	_ISL29028_CONF_ALS_RANGE_HIGH_LUX@GOTPCREL(%rip), %rax
	movq	_ISL29028_CONF_ALS_RANGE_MASK@GOTPCREL(%rip), %rdx
	jmp	LBB0_10
LBB0_8:
	movl	4(%rbx), %edi
	movq	_ISL29028_REG_CONFIGURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ISL29028_CONF_ALS_EN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISL29028_CONF_ALS_DIS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_regmap_update_bits             ## TAILCALL
LBB0_9:
	leaq	4(%rbx), %rcx
	movq	_ISL29028_CONF_ALS_IR_MODE_IR@GOTPCREL(%rip), %rax
	movq	_ISL29028_CONF_ALS_IR_MODE_MASK@GOTPCREL(%rip), %rdx
LBB0_10:
	movl	(%rcx), %edi
	movq	_ISL29028_REG_CONFIGURE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%rdx), %edx
	movl	(%rax), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_15
LBB0_11:
	movl	4(%rbx), %edi
	movq	_ISL29028_REG_CONFIGURE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ISL29028_CONF_ALS_EN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_ISL29028_CONF_ALS_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_regmap_update_bits
	testl	%eax, %eax
	js	LBB0_15
## %bb.12:
	movq	_ISL29028_CONV_TIME_MS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msleep
	movl	%r15d, (%rbx)
	jmp	LBB0_16
LBB0_15:
	movl	%eax, %r14d
LBB0_16:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ISL29028_REG_CONFIGURE,4,2     ## @ISL29028_REG_CONFIGURE
	.comm	_ISL29028_CONF_ALS_IR_MODE_MASK,4,2 ## @ISL29028_CONF_ALS_IR_MODE_MASK
	.comm	_ISL29028_CONF_ALS_IR_MODE_ALS,4,2 ## @ISL29028_CONF_ALS_IR_MODE_ALS
	.comm	_ISL29028_CONF_ALS_RANGE_MASK,4,2 ## @ISL29028_CONF_ALS_RANGE_MASK
	.comm	_ISL29028_CONF_ALS_RANGE_HIGH_LUX,4,2 ## @ISL29028_CONF_ALS_RANGE_HIGH_LUX
	.comm	_ISL29028_CONF_ALS_IR_MODE_IR,4,2 ## @ISL29028_CONF_ALS_IR_MODE_IR
	.comm	_ISL29028_CONF_ALS_EN_MASK,4,2  ## @ISL29028_CONF_ALS_EN_MASK
	.comm	_ISL29028_CONF_ALS_DIS,4,2      ## @ISL29028_CONF_ALS_DIS
	.comm	_ISL29028_CONF_ALS_EN,4,2       ## @ISL29028_CONF_ALS_EN
	.comm	_ISL29028_CONV_TIME_MS,4,2      ## @ISL29028_CONV_TIME_MS
	.no_dead_strip	_isl29028_set_als_ir_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function isl29028_set_als_ir_mode
_isl29028_set_als_ir_mode:              ; @isl29028_set_als_ir_mode
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0]
	cmp	w8, w1
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_13
LBB0_2:
	mov	x20, x1
	mov	x19, x0
	ldr	w1, [x0, #8]
	bl	_isl29028_set_als_scale
	tbnz	w0, #31, LBB0_13
; %bb.3:
	cmp	w20, #128
	b.eq	LBB0_8
; %bb.4:
	cmp	w20, #129
	b.eq	LBB0_9
; %bb.5:
	cmp	w20, #130
	b.ne	LBB0_11
; %bb.6:
	mov	x21, x19
	ldr	w0, [x21, #4]!
Lloh0:
	adrp	x8, _ISL29028_REG_CONFIGURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ISL29028_REG_CONFIGURE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _ISL29028_CONF_ALS_IR_MODE_MASK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ISL29028_CONF_ALS_IR_MODE_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _ISL29028_CONF_ALS_IR_MODE_ALS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ISL29028_CONF_ALS_IR_MODE_ALS@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_13
; %bb.7:
Lloh9:
	adrp	x8, _ISL29028_CONF_ALS_RANGE_HIGH_LUX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ISL29028_CONF_ALS_RANGE_HIGH_LUX@GOTPAGEOFF]
Lloh11:
	adrp	x9, _ISL29028_CONF_ALS_RANGE_MASK@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ISL29028_CONF_ALS_RANGE_MASK@GOTPAGEOFF]
	b	LBB0_10
LBB0_8:
Lloh13:
	adrp	x8, _ISL29028_REG_CONFIGURE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ISL29028_REG_CONFIGURE@GOTPAGEOFF]
	ldr	w0, [x19, #4]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _ISL29028_CONF_ALS_EN_MASK@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ISL29028_CONF_ALS_EN_MASK@GOTPAGEOFF]
Lloh18:
	adrp	x9, _ISL29028_CONF_ALS_DIS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _ISL29028_CONF_ALS_DIS@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
Lloh21:
	ldr	w3, [x9]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_regmap_update_bits
LBB0_9:
	add	x21, x19, #4
Lloh22:
	adrp	x8, _ISL29028_CONF_ALS_IR_MODE_IR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ISL29028_CONF_ALS_IR_MODE_IR@GOTPAGEOFF]
Lloh24:
	adrp	x9, _ISL29028_CONF_ALS_IR_MODE_MASK@GOTPAGE
Lloh25:
	ldr	x9, [x9, _ISL29028_CONF_ALS_IR_MODE_MASK@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x21]
Lloh26:
	adrp	x10, _ISL29028_REG_CONFIGURE@GOTPAGE
Lloh27:
	ldr	x10, [x10, _ISL29028_REG_CONFIGURE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x10]
	ldr	w2, [x9]
	ldr	w3, [x8]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_13
LBB0_11:
	ldr	w0, [x19, #4]
Lloh29:
	adrp	x8, _ISL29028_REG_CONFIGURE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ISL29028_REG_CONFIGURE@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
Lloh32:
	adrp	x8, _ISL29028_CONF_ALS_EN_MASK@GOTPAGE
Lloh33:
	ldr	x8, [x8, _ISL29028_CONF_ALS_EN_MASK@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
Lloh35:
	adrp	x8, _ISL29028_CONF_ALS_EN@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ISL29028_CONF_ALS_EN@GOTPAGEOFF]
Lloh37:
	ldr	w3, [x8]
	bl	_regmap_update_bits
	tbnz	w0, #31, LBB0_13
; %bb.12:
Lloh38:
	adrp	x8, _ISL29028_CONV_TIME_MS@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ISL29028_CONV_TIME_MS@GOTPAGEOFF]
Lloh40:
	ldr	w0, [x8]
	bl	_msleep
	mov	w0, #0
	str	w20, [x19]
LBB0_13:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_ISL29028_REG_CONFIGURE,4,2     ; @ISL29028_REG_CONFIGURE
	.comm	_ISL29028_CONF_ALS_IR_MODE_MASK,4,2 ; @ISL29028_CONF_ALS_IR_MODE_MASK
	.comm	_ISL29028_CONF_ALS_IR_MODE_ALS,4,2 ; @ISL29028_CONF_ALS_IR_MODE_ALS
	.comm	_ISL29028_CONF_ALS_RANGE_MASK,4,2 ; @ISL29028_CONF_ALS_RANGE_MASK
	.comm	_ISL29028_CONF_ALS_RANGE_HIGH_LUX,4,2 ; @ISL29028_CONF_ALS_RANGE_HIGH_LUX
	.comm	_ISL29028_CONF_ALS_IR_MODE_IR,4,2 ; @ISL29028_CONF_ALS_IR_MODE_IR
	.comm	_ISL29028_CONF_ALS_EN_MASK,4,2  ; @ISL29028_CONF_ALS_EN_MASK
	.comm	_ISL29028_CONF_ALS_DIS,4,2      ; @ISL29028_CONF_ALS_DIS
	.comm	_ISL29028_CONF_ALS_EN,4,2       ; @ISL29028_CONF_ALS_EN
	.comm	_ISL29028_CONV_TIME_MS,4,2      ; @ISL29028_CONV_TIME_MS
	.no_dead_strip	_isl29028_set_als_ir_mode
.subsections_via_symbols
