	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds9300_set_intr_state
_apds9300_set_intr_state:               ## @apds9300_set_intr_state
	.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
	cmpl	$0, 16(%rdi)
	je	LBB0_1
## %bb.2:
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_APDS9300_INTR_ENABLE@GOTPCREL(%rip), %rax
	movq	_APDS9300_THRESH_INTR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	testl	%esi, %esi
	cmovel	%esi, %edx
	movq	8(%rdi), %rdi
	movq	_APDS9300_INTERRUPT@GOTPCREL(%rip), %rax
	movq	_APDS9300_CMD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_i2c_smbus_write_byte_data
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	jmp	LBB0_5
LBB0_1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	movl	%r14d, (%r15)
	xorl	%ebx, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_APDS9300_INTR_ENABLE,4,2       ## @APDS9300_INTR_ENABLE
	.comm	_APDS9300_THRESH_INTR,4,2       ## @APDS9300_THRESH_INTR
	.comm	_APDS9300_INTERRUPT,4,2         ## @APDS9300_INTERRUPT
	.comm	_APDS9300_CMD,4,2               ## @APDS9300_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set interrupt state %d\n"

	.no_dead_strip	_apds9300_set_intr_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function apds9300_set_intr_state
_apds9300_set_intr_state:               ; @apds9300_set_intr_state
	.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, #16]
	cbz	w8, LBB0_3
; %bb.1:
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _APDS9300_INTR_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APDS9300_INTR_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _APDS9300_THRESH_INTR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _APDS9300_THRESH_INTR@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	cmp	w1, #0
	csel	w2, wzr, w8, eq
Lloh6:
	adrp	x8, _APDS9300_INTERRUPT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _APDS9300_INTERRUPT@GOTPAGEOFF]
	ldr	x0, [x0, #8]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _APDS9300_CMD@GOTPAGE
Lloh10:
	ldr	x9, [x9, _APDS9300_CMD@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
	cbz	w0, LBB0_4
; %bb.2:
	ldr	x0, [x20, #8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_5
LBB0_3:
Lloh14:
	adrp	x8, _EBUSY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_5
LBB0_4:
	str	w19, [x20]
LBB0_5:
	mov	x0, x21
	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	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_APDS9300_INTR_ENABLE,4,2       ; @APDS9300_INTR_ENABLE
	.comm	_APDS9300_THRESH_INTR,4,2       ; @APDS9300_THRESH_INTR
	.comm	_APDS9300_INTERRUPT,4,2         ; @APDS9300_INTERRUPT
	.comm	_APDS9300_CMD,4,2               ; @APDS9300_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set interrupt state %d\n"

	.no_dead_strip	_apds9300_set_intr_state
.subsections_via_symbols
