	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tsl2563_write_interrupt_config
_tsl2563_write_interrupt_config:        ## @tsl2563_write_interrupt_config
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, %ebx
	callq	_iio_priv
	movq	%rax, %r12
	leaq	8(%rax), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%r12), %edx
	testl	%ebx, %ebx
	je	LBB0_6
## %bb.1:
	xorl	%r15d, %r15d
	testb	$48, %dl
	jne	LBB0_9
## %bb.2:
	andl	$-49, %edx
	orl	$16, %edx
	movl	%edx, (%r12)
	movq	%r12, %rdi
	addq	$12, %rdi
	callq	_cancel_delayed_work
	movq	%r12, %rdi
	callq	_tsl2563_get_power
	testl	%eax, %eax
	je	LBB0_3
LBB0_5:
	movl	(%r12), %edx
	movl	16(%r12), %edi
	movq	_TSL2563_CMD@GOTPCREL(%rip), %rax
	movq	_TSL2563_REG_INT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r15d
	movl	$1, 4(%r12)
	jmp	LBB0_9
LBB0_6:
	testb	$48, %dl
	je	LBB0_7
## %bb.8:
	andl	$-49, %edx
	movl	%edx, (%r12)
	movl	16(%r12), %edi
	movq	_TSL2563_CMD@GOTPCREL(%rip), %rax
	movq	_TSL2563_REG_INT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_i2c_smbus_write_byte_data
	movl	%eax, %r15d
	movl	$0, 4(%r12)
	addq	$12, %r12
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rax,%rax,4), %esi
	movq	%r12, %rdi
	callq	_schedule_delayed_work
	jmp	LBB0_9
LBB0_7:
	xorl	%r15d, %r15d
	jmp	LBB0_9
LBB0_3:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_tsl2563_set_power
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_9
## %bb.4:
	movq	%r12, %rdi
	callq	_tsl2563_configure
	movl	%eax, %r15d
	testl	%eax, %eax
	je	LBB0_5
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TSL2563_CMD,4,2                ## @TSL2563_CMD
	.comm	_TSL2563_REG_INT,4,2            ## @TSL2563_REG_INT
	.comm	_HZ,4,2                         ## @HZ
	.no_dead_strip	_tsl2563_write_interrupt_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tsl2563_write_interrupt_config
_tsl2563_write_interrupt_config:        ; @tsl2563_write_interrupt_config
	.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	x21, x4
	bl	_iio_priv
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	w8, [x20]
	and	w9, w8, #0x30
	cbz	w21, LBB0_4
; %bb.1:
	cbnz	w9, LBB0_6
; %bb.2:
	and	w8, w8, #0xffffffcf
	orr	w8, w8, #0x10
	mov	x0, x20
	str	w8, [x0], #12
	bl	_cancel_delayed_work
	mov	x0, x20
	bl	_tsl2563_get_power
	cbz	w0, LBB0_8
LBB0_3:
	ldr	w0, [x20, #16]
Lloh0:
	adrp	x8, _TSL2563_CMD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TSL2563_CMD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _TSL2563_REG_INT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TSL2563_REG_INT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	ldr	w2, [x20]
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
	mov	w8, #1
	str	w8, [x20, #4]
	b	LBB0_7
LBB0_4:
	cbz	w9, LBB0_6
; %bb.5:
	and	w2, w8, #0xffffffcf
	str	w2, [x20]
Lloh6:
	adrp	x8, _TSL2563_CMD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TSL2563_CMD@GOTPAGEOFF]
	ldr	w0, [x20, #16]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _TSL2563_REG_INT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _TSL2563_REG_INT@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_i2c_smbus_write_byte_data
	mov	x21, x0
	str	wzr, [x20, #4]
	add	x0, x20, #12
Lloh12:
	adrp	x8, _HZ@GOTPAGE
Lloh13:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	add	w1, w8, w8, lsl #2
	bl	_schedule_delayed_work
	b	LBB0_7
LBB0_6:
	mov	w21, #0
LBB0_7:
	mov	x0, x19
	bl	_mutex_unlock
	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
LBB0_8:
	mov	x0, x20
	mov	w1, #1
	bl	_tsl2563_set_power
	mov	x21, x0
	cbnz	w0, LBB0_7
; %bb.9:
	mov	x0, x20
	bl	_tsl2563_configure
	mov	x21, x0
	cbnz	w0, LBB0_7
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TSL2563_CMD,4,2                ; @TSL2563_CMD
	.comm	_TSL2563_REG_INT,4,2            ; @TSL2563_REG_INT
	.comm	_HZ,4,2                         ; @HZ
	.no_dead_strip	_tsl2563_write_interrupt_config
.subsections_via_symbols
