	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qt2160_identify
_qt2160_identify:                       ## @qt2160_identify
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_QT2160_CMD_CHIPID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_qt2160_read
	movq	_QT2160_VALID_CHIPID@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_1
## %bb.2:
	movq	_QT2160_CMD_CODEVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qt2160_read
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movl	%eax, %r14d
	movq	_QT2160_CMD_SUBVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_qt2160_read
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movl	%r14d, %edx
	shrl	$4, %edx
	andl	$15, %r14d
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r14d, %ecx
	movl	%eax, %r8d
	callq	_dev_info
	movl	$1, %r14d
	jmp	LBB0_8
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_8
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.2(%rip), %rsi
LBB0_4:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
LBB0_8:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QT2160_CMD_CHIPID,4,2          ## @QT2160_CMD_CHIPID
	.comm	_QT2160_VALID_CHIPID,4,2        ## @QT2160_VALID_CHIPID
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ID %d not supported\n"

	.comm	_QT2160_CMD_CODEVER,4,2         ## @QT2160_CMD_CODEVER
L_.str.1:                               ## @.str.1
	.asciz	"could not get firmware version\n"

	.comm	_QT2160_CMD_SUBVER,4,2          ## @QT2160_CMD_SUBVER
L_.str.2:                               ## @.str.2
	.asciz	"could not get firmware revision\n"

L_.str.3:                               ## @.str.3
	.asciz	"AT42QT2160 firmware version %d.%d.%d\n"

	.no_dead_strip	_qt2160_identify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qt2160_identify
_qt2160_identify:                       ; @qt2160_identify
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _QT2160_CMD_CHIPID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QT2160_CMD_CHIPID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_qt2160_read
                                        ; kill: def $w0 killed $w0 def $x0
Lloh3:
	adrp	x8, _QT2160_VALID_CHIPID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _QT2160_VALID_CHIPID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_4
; %bb.1:
Lloh6:
	adrp	x8, _QT2160_CMD_CODEVER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QT2160_CMD_CODEVER@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qt2160_read
	tbnz	w0, #31, LBB0_5
; %bb.2:
	mov	x20, x0
Lloh9:
	adrp	x8, _QT2160_CMD_SUBVER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _QT2160_CMD_SUBVER@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_qt2160_read
	tbnz	w0, #31, LBB0_6
; %bb.3:
	mov	x4, x0
	lsr	w2, w20, #4
	and	w3, w20, #0xf
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	w0, #1
	b	LBB0_8
LBB0_4:
	str	x0, [sp]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_7
LBB0_5:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_7:
	mov	x0, x19
	bl	_dev_err
	mov	w0, #0
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_QT2160_CMD_CHIPID,4,2          ; @QT2160_CMD_CHIPID
	.comm	_QT2160_VALID_CHIPID,4,2        ; @QT2160_VALID_CHIPID
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ID %d not supported\n"

	.comm	_QT2160_CMD_CODEVER,4,2         ; @QT2160_CMD_CODEVER
l_.str.1:                               ; @.str.1
	.asciz	"could not get firmware version\n"

	.comm	_QT2160_CMD_SUBVER,4,2          ; @QT2160_CMD_SUBVER
l_.str.2:                               ; @.str.2
	.asciz	"could not get firmware revision\n"

l_.str.3:                               ; @.str.3
	.asciz	"AT42QT2160 firmware version %d.%d.%d\n"

	.no_dead_strip	_qt2160_identify
.subsections_via_symbols
