	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxt_lookup_bootloader_address
_mxt_lookup_bootloader_address:         ## @mxt_lookup_bootloader_address
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	8(%rdi), %r9
	movq	16(%rdi), %rcx
	movl	(%r9), %edx
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movl	(%rcx), %r8d
	jmp	LBB0_3
LBB0_1:
	xorl	%r8d, %r8d
LBB0_3:
	leal	-74(%rdx), %ecx
	cmpl	$17, %ecx
	ja	LBB0_11
## %bb.4:
	movl	$196620, %eax                   ## imm = 0x3000C
	btl	%ecx, %eax
	jae	LBB0_5
LBB0_8:
	movl	$-38, %eax
LBB0_9:
	addl	%eax, %edx
	movl	%edx, (%rdi)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_5:
	movl	$3, %eax
	btl	%ecx, %eax
	jae	LBB0_11
## %bb.6:
	movl	$-36, %eax
	testl	%esi, %esi
	jne	LBB0_9
## %bb.7:
	cmpl	$161, %r8d
	jle	LBB0_8
	jmp	LBB0_9
LBB0_11:
	addq	$4, %r9
	leaq	L_.str(%rip), %rsi
	movq	%r9, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Appmode i2c address 0x%02x not found\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mxt_lookup_bootloader_address
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxt_lookup_bootloader_address
_mxt_lookup_bootloader_address:         ; @mxt_lookup_bootloader_address
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldp	x8, x9, [x0, #8]
	ldr	w2, [x8]
	cbz	x9, LBB0_2
; %bb.1:
	ldr	w9, [x9]
LBB0_2:
	sub	w10, w2, #74
	cmp	w10, #17
	b.hi	LBB0_10
; %bb.3:
	mov	w11, #1
	lsl	w10, w11, w10
	mov	w11, #12
	movk	w11, #3, lsl #16
	tst	w10, w11
	b.eq	LBB0_7
LBB0_4:
	mov	w10, #-38
LBB0_5:
	mov	w8, #0
	add	w9, w2, w10
	str	w9, [x0]
LBB0_6:
	mov	x0, x8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_7:
	tst	w10, #0x3
	b.eq	LBB0_10
; %bb.8:
	mov	w10, #-36
	cbnz	w1, LBB0_5
; %bb.9:
	cmp	w9, #161
	b.le	LBB0_4
	b	LBB0_5
LBB0_10:
	add	x0, x8, #4
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w8, w8
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Appmode i2c address 0x%02x not found\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mxt_lookup_bootloader_address
.subsections_via_symbols
