	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function iqs5xx_dev_init
_iqs5xx_dev_init:                       ## @iqs5xx_dev_init
	.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
	subq	$224, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_i2c_get_clientdata
	movq	%rax, %r14
	movq	_IQS5XX_PROD_NUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-232(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$24, %ecx
	callq	_iqs5xx_read_burst
	testl	%eax, %eax
	je	LBB0_2
LBB0_1:
	movq	%rbx, %rdi
	callq	_iqs5xx_bl_open
	jmp	LBB0_21
LBB0_2:
	movq	$0, -240(%rbp)
	xorl	%r15d, %r15d
	cmpq	$0, -232(%rbp)
	setle	%r15b
	movl	-224(%rbp,%r15,8), %edi
	callq	_be16_to_cpu
	addl	$-130, %eax
	cmpl	$3, %eax
	jae	LBB0_3
## %bb.6:
	movl	-228(%rbp,%r15,8), %edi
	callq	_be16_to_cpu
	cmpl	$128, %eax
	je	LBB0_10
## %bb.7:
	cmpl	$129, %eax
	jne	LBB0_9
## %bb.8:
	movl	-228(%rbp,%r15,8), %edi
	callq	_be16_to_cpu
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_1
LBB0_3:
	movl	-224(%rbp,%r15,8), %edi
	callq	_be16_to_cpu
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_10:
	movq	-240(%rbp,%r15,8), %rdx
	movq	_IQS5XX_MAJOR_VER_MIN@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_13
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
	jmp	LBB0_1
LBB0_9:
	movl	-228(%rbp,%r15,8), %edi
	callq	_be16_to_cpu
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	movq	%rbx, %rdi
	movl	%eax, %edx
LBB0_5:
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_23
## %bb.22:
	addq	$224, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	-232(%rbp,%r15,8), %edx
	leal	-133(%rdx), %eax
	cmpl	$2, %eax
	jae	LBB0_14
## %bb.15:
	movq	%rbx, %rdi
	callq	_iqs5xx_axis_init
	testl	%eax, %eax
	jne	LBB0_21
## %bb.16:
	movq	_IQS5XX_SYS_CFG0@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	leaq	-248(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_iqs5xx_read_byte
	testl	%eax, %eax
	jne	LBB0_21
## %bb.17:
	movq	_IQS5XX_SETUP_COMPLETE@GOTPCREL(%rip), %rax
	movq	-248(%rbp), %rcx
	orq	(%rax), %rcx
	movq	_IQS5XX_SW_INPUT_EVENT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	notq	%rdx
	andq	%rcx, %rdx
	movq	%rdx, -248(%rbp)
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_iqs5xx_write_byte
	testl	%eax, %eax
	jne	LBB0_21
## %bb.18:
	movq	_IQS5XX_TP_EVENT@GOTPCREL(%rip), %rax
	movq	_IQS5XX_EVENT_MODE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	orq	(%rax), %rdx
	movq	%rdx, -248(%rbp)
	movq	_IQS5XX_SYS_CFG1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_iqs5xx_write_byte
	testl	%eax, %eax
	jne	LBB0_21
## %bb.19:
	movq	_IQS5XX_END_COMM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_iqs5xx_write_byte
	testl	%eax, %eax
	jne	LBB0_21
## %bb.20:
	movl	-232(%rbp,%r15,8), %eax
	movl	%eax, (%r14)
	movl	$100, %edi
	callq	_msleep
	xorl	%eax, %eax
	jmp	LBB0_21
LBB0_14:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	jmp	LBB0_5
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IQS5XX_PROD_NUM,4,2            ## @IQS5XX_PROD_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unrecognized product number: %u\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Unsupported project number: %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"Unrecognized project number: %u\n"

	.comm	_IQS5XX_MAJOR_VER_MIN,8,3       ## @IQS5XX_MAJOR_VER_MIN
L_.str.3:                               ## @.str.3
	.asciz	"Unsupported major version: %u\n"

L_.str.4:                               ## @.str.4
	.asciz	"Unrecognized bootloader status: 0x%02X\n"

	.comm	_IQS5XX_SYS_CFG0,4,2            ## @IQS5XX_SYS_CFG0
	.comm	_IQS5XX_SETUP_COMPLETE,8,3      ## @IQS5XX_SETUP_COMPLETE
	.comm	_IQS5XX_SW_INPUT_EVENT,8,3      ## @IQS5XX_SW_INPUT_EVENT
	.comm	_IQS5XX_TP_EVENT,8,3            ## @IQS5XX_TP_EVENT
	.comm	_IQS5XX_EVENT_MODE,8,3          ## @IQS5XX_EVENT_MODE
	.comm	_IQS5XX_SYS_CFG1,4,2            ## @IQS5XX_SYS_CFG1
	.comm	_IQS5XX_END_COMM,4,2            ## @IQS5XX_END_COMM
	.no_dead_strip	_iqs5xx_dev_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function iqs5xx_dev_init
_iqs5xx_dev_init:                       ; @iqs5xx_dev_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #288
	.cfi_def_cfa_offset 288
	stp	x28, x27, [sp, #224]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #240]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #256]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #272]            ; 16-byte Folded Spill
	add	x29, sp, #272
	.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
	.cfi_offset w27, -56
	.cfi_offset w28, -64
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_i2c_get_clientdata
	mov	x20, x0
Lloh3:
	adrp	x8, _IQS5XX_PROD_NUM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IQS5XX_PROD_NUM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x21, sp, #16
	add	x2, x21, #8
	mov	x0, x19
	mov	w3, #24
	bl	_iqs5xx_read_burst
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x19
	bl	_iqs5xx_bl_open
	b	LBB0_19
LBB0_2:
	str	xzr, [sp, #16]
	ldr	x8, [sp, #24]
	cmp	x8, #1
	cset	w8, lt
	add	x21, x21, w8, uxtw #3
	ldr	w0, [x21, #16]
	bl	_be16_to_cpu
	sub	w8, w0, #130
	cmp	w8, #3
	b.hs	LBB0_6
; %bb.3:
	ldr	w0, [x21, #12]
	bl	_be16_to_cpu
	cmp	w0, #128
	b.eq	LBB0_7
; %bb.4:
	cmp	w0, #129
	b.ne	LBB0_9
; %bb.5:
	ldr	w0, [x21, #12]
	bl	_be16_to_cpu
	mov	x2, x0
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_1
LBB0_6:
	ldr	w0, [x21, #16]
	bl	_be16_to_cpu
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_18
LBB0_7:
	ldr	x2, [x21]
Lloh10:
	adrp	x8, _IQS5XX_MAJOR_VER_MIN@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IQS5XX_MAJOR_VER_MIN@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	cmp	x2, x8
	b.ge	LBB0_10
; %bb.8:
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_err
	b	LBB0_1
LBB0_9:
	ldr	w0, [x21, #12]
	bl	_be16_to_cpu
	mov	x2, x0
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_10:
	ldr	w2, [x21, #8]
	sub	w8, w2, #133
	cmp	w8, #2
	b.hs	LBB0_17
; %bb.11:
	mov	x0, x19
	bl	_iqs5xx_axis_init
	cbnz	w0, LBB0_19
; %bb.12:
Lloh17:
	adrp	x22, _IQS5XX_SYS_CFG0@GOTPAGE
Lloh18:
	ldr	x22, [x22, _IQS5XX_SYS_CFG0@GOTPAGEOFF]
	ldr	w1, [x22]
	add	x2, sp, #8
	mov	x0, x19
	bl	_iqs5xx_read_byte
	cbnz	w0, LBB0_19
; %bb.13:
Lloh19:
	adrp	x8, _IQS5XX_SETUP_COMPLETE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IQS5XX_SETUP_COMPLETE@GOTPAGEOFF]
Lloh21:
	ldr	x8, [x8]
	ldr	x9, [sp, #8]
	orr	x8, x9, x8
Lloh22:
	adrp	x9, _IQS5XX_SW_INPUT_EVENT@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IQS5XX_SW_INPUT_EVENT@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	bic	x2, x8, x9
	str	x2, [sp, #8]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_iqs5xx_write_byte
	cbnz	w0, LBB0_19
; %bb.14:
Lloh25:
	adrp	x8, _IQS5XX_TP_EVENT@GOTPAGE
Lloh26:
	ldr	x8, [x8, _IQS5XX_TP_EVENT@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
Lloh28:
	adrp	x9, _IQS5XX_EVENT_MODE@GOTPAGE
Lloh29:
	ldr	x9, [x9, _IQS5XX_EVENT_MODE@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	orr	x2, x9, x8
	str	x2, [sp, #8]
Lloh31:
	adrp	x8, _IQS5XX_SYS_CFG1@GOTPAGE
Lloh32:
	ldr	x8, [x8, _IQS5XX_SYS_CFG1@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_iqs5xx_write_byte
	cbnz	w0, LBB0_19
; %bb.15:
Lloh34:
	adrp	x8, _IQS5XX_END_COMM@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IQS5XX_END_COMM@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_iqs5xx_write_byte
	cbnz	w0, LBB0_19
; %bb.16:
	ldr	w8, [x21, #8]
	str	w8, [x20]
	mov	w0, #100
	bl	_msleep
	mov	w0, #0
	b	LBB0_19
LBB0_17:
Lloh37:
	adrp	x1, l_.str.4@PAGE
Lloh38:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_18:
	mov	x0, x19
	bl	_dev_err
Lloh39:
	adrp	x8, _EINVAL@GOTPAGE
Lloh40:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_19:
	ldur	x8, [x29, #-56]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.20:
	ldp	x29, x30, [sp, #272]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #256]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #240]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #224]            ; 16-byte Folded Reload
	add	sp, sp, #288
	ret
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_IQS5XX_PROD_NUM,4,2            ; @IQS5XX_PROD_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unrecognized product number: %u\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Unsupported project number: %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"Unrecognized project number: %u\n"

	.comm	_IQS5XX_MAJOR_VER_MIN,8,3       ; @IQS5XX_MAJOR_VER_MIN
l_.str.3:                               ; @.str.3
	.asciz	"Unsupported major version: %u\n"

l_.str.4:                               ; @.str.4
	.asciz	"Unrecognized bootloader status: 0x%02X\n"

	.comm	_IQS5XX_SYS_CFG0,4,2            ; @IQS5XX_SYS_CFG0
	.comm	_IQS5XX_SETUP_COMPLETE,8,3      ; @IQS5XX_SETUP_COMPLETE
	.comm	_IQS5XX_SW_INPUT_EVENT,8,3      ; @IQS5XX_SW_INPUT_EVENT
	.comm	_IQS5XX_TP_EVENT,8,3            ; @IQS5XX_TP_EVENT
	.comm	_IQS5XX_EVENT_MODE,8,3          ; @IQS5XX_EVENT_MODE
	.comm	_IQS5XX_SYS_CFG1,4,2            ; @IQS5XX_SYS_CFG1
	.comm	_IQS5XX_END_COMM,4,2            ; @IQS5XX_END_COMM
	.no_dead_strip	_iqs5xx_dev_init
.subsections_via_symbols
