	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iqs5xx_set_state
_iqs5xx_set_state:                      ## @iqs5xx_set_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_i2c_get_clientdata
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	_IQS5XX_BL_STATUS_RESET@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_2
## %bb.1:
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movl	(%r12), %edi
	callq	_disable_irq
	movq	_IQS5XX_SYS_CTRL1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_iqs5xx_write_byte
	movl	%eax, %r15d
	movq	_IQS5XX_END_COMM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_iqs5xx_write_byte
	movl	%eax, %ebx
	movl	$50, %edi
	movl	$100, %esi
	callq	_usleep_range
	movl	(%r12), %edi
	callq	_enable_irq
	movq	%r14, %rdi
	callq	_mutex_unlock
	testl	%r15d, %r15d
	cmovnel	%r15d, %ebx
LBB0_2:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IQS5XX_BL_STATUS_RESET,8,3     ## @IQS5XX_BL_STATUS_RESET
	.comm	_IQS5XX_SYS_CTRL1,4,2           ## @IQS5XX_SYS_CTRL1
	.comm	_IQS5XX_END_COMM,4,2            ## @IQS5XX_END_COMM
	.no_dead_strip	_iqs5xx_set_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iqs5xx_set_state
_iqs5xx_set_state:                      ; @iqs5xx_set_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	x20, x1
	mov	x19, x0
	bl	_i2c_get_clientdata
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _IQS5XX_BL_STATUS_RESET@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IQS5XX_BL_STATUS_RESET@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	add	x21, x0, #8
	mov	x0, x21
	bl	_mutex_lock
	ldr	w0, [x19]
	bl	_disable_irq
Lloh3:
	adrp	x8, _IQS5XX_SYS_CTRL1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IQS5XX_SYS_CTRL1@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x20
	bl	_iqs5xx_write_byte
	mov	x20, x0
Lloh6:
	adrp	x8, _IQS5XX_END_COMM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IQS5XX_END_COMM@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_iqs5xx_write_byte
	mov	x22, x0
	mov	w0, #50
	mov	w1, #100
	bl	_usleep_range
	ldr	w0, [x19]
	bl	_enable_irq
	mov	x0, x21
	bl	_mutex_unlock
	cmp	w20, #0
	csel	w0, w22, w20, eq
LBB0_3:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_IQS5XX_BL_STATUS_RESET,8,3     ; @IQS5XX_BL_STATUS_RESET
	.comm	_IQS5XX_SYS_CTRL1,4,2           ; @IQS5XX_SYS_CTRL1
	.comm	_IQS5XX_END_COMM,4,2            ; @IQS5XX_END_COMM
	.no_dead_strip	_iqs5xx_set_state
.subsections_via_symbols
