	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qt1050_identify
_qt1050_identify:                       ## @qt1050_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	movq	_QT1050_CHIP_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	movl	-12(%rbp), %edx
	movq	_QT1050_CHIP_ID_VER@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_1
## %bb.2:
	movl	8(%rbx), %edi
	movq	_QT1050_FW_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_regmap_read
	movq	(%rbx), %rdi
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_1:
	movq	(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_5
LBB0_4:
	movl	-12(%rbp), %ecx
	movl	%ecx, %edx
	shrl	$4, %edx
	andl	$15, %ecx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_info
	movl	$1, %ebx
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_QT1050_CHIP_ID,4,2             ## @QT1050_CHIP_ID
	.comm	_QT1050_CHIP_ID_VER,4,2         ## @QT1050_CHIP_ID_VER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ID %d not supported\n"

	.comm	_QT1050_FW_VERSION,4,2          ## @QT1050_FW_VERSION
L_.str.1:                               ## @.str.1
	.asciz	"could not read the firmware version\n"

L_.str.2:                               ## @.str.2
	.asciz	"AT42QT1050 firmware version %1d.%1d\n"

	.no_dead_strip	_qt1050_identify
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qt1050_identify
_qt1050_identify:                       ; @qt1050_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
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _QT1050_CHIP_ID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _QT1050_CHIP_ID@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	ldr	w8, [sp, #12]
Lloh3:
	adrp	x9, _QT1050_CHIP_ID_VER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _QT1050_CHIP_ID_VER@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_3
; %bb.1:
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _QT1050_FW_VERSION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _QT1050_FW_VERSION@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
	mov	x8, x0
	ldr	x0, [x19]
	cbz	w8, LBB0_5
; %bb.2:
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_4
LBB0_3:
	ldr	x0, [x19]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
LBB0_4:
	bl	_dev_err
	mov	w0, #0
	b	LBB0_6
LBB0_5:
	ldr	w8, [sp, #12]
	lsr	w2, w8, #4
	and	w3, w8, #0xf
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_info
	mov	w0, #1
LBB0_6:
	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 AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_QT1050_CHIP_ID,4,2             ; @QT1050_CHIP_ID
	.comm	_QT1050_CHIP_ID_VER,4,2         ; @QT1050_CHIP_ID_VER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ID %d not supported\n"

	.comm	_QT1050_FW_VERSION,4,2          ; @QT1050_FW_VERSION
l_.str.1:                               ; @.str.1
	.asciz	"could not read the firmware version\n"

l_.str.2:                               ; @.str.2
	.asciz	"AT42QT1050 firmware version %1d.%1d\n"

	.no_dead_strip	_qt1050_identify
.subsections_via_symbols
