	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function apds9300_set_power_state
_apds9300_set_power_state:              ## @apds9300_set_power_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
	movl	%esi, %r14d
	movq	%rdi, %r15
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_APDS9300_POWER_OFF@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_APDS9300_POWER_ON@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	movq	8(%r15), %rdi
	movq	_APDS9300_CONTROL@GOTPCREL(%rip), %rax
	movq	_APDS9300_CMD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	8(%r15), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_dev_err
	jmp	LBB0_6
LBB0_5:
	movl	%r14d, (%r15)
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APDS9300_POWER_ON,4,2          ## @APDS9300_POWER_ON
	.comm	_APDS9300_POWER_OFF,4,2         ## @APDS9300_POWER_OFF
	.comm	_APDS9300_CONTROL,4,2           ## @APDS9300_CONTROL
	.comm	_APDS9300_CMD,4,2               ## @APDS9300_CMD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set power state %d\n"

	.no_dead_strip	_apds9300_set_power_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_power_state
_apds9300_set_power_state:              ; @apds9300_set_power_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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _APDS9300_POWER_ON@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APDS9300_POWER_ON@GOTPAGEOFF]
Lloh2:
	adrp	x9, _APDS9300_POWER_OFF@GOTPAGE
Lloh3:
	ldr	x9, [x9, _APDS9300_POWER_OFF@GOTPAGEOFF]
	cmp	w1, #0
	csel	x8, x9, x8, eq
	ldr	w2, [x8]
Lloh4:
	adrp	x8, _APDS9300_CONTROL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _APDS9300_CONTROL@GOTPAGEOFF]
	ldr	x0, [x0, #8]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _APDS9300_CMD@GOTPAGE
Lloh8:
	ldr	x9, [x9, _APDS9300_CMD@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
	cbz	w0, LBB0_2
; %bb.1:
	ldr	x0, [x20, #8]
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	b	LBB0_3
LBB0_2:
	str	w19, [x20]
LBB0_3:
	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	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_APDS9300_POWER_ON,4,2          ; @APDS9300_POWER_ON
	.comm	_APDS9300_POWER_OFF,4,2         ; @APDS9300_POWER_OFF
	.comm	_APDS9300_CONTROL,4,2           ; @APDS9300_CONTROL
	.comm	_APDS9300_CMD,4,2               ; @APDS9300_CMD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set power state %d\n"

	.no_dead_strip	_apds9300_set_power_state
.subsections_via_symbols
