	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function af9013_regmap_read
_af9013_regmap_read:                    ## @af9013_regmap_read
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, %r13
	movq	%rsi, %r12
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_i2c_get_clientdata
	xorl	%r15d, %r15d
	cmpl	$0, (%r12)
	sete	%r15b
	movl	4(%r12), %r14d
	shll	$8, %r14d
	orl	8(%r12), %r14d
	movq	(%rax), %rax
	movq	_AF9013_TS_MODE_USB@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	%r14d, %eax
	andl	$65280, %eax                    ## imm = 0xFF00
	cmpl	$44544, %eax                    ## imm = 0xAE00
	je	LBB0_2
## %bb.7:
	leal	-2(,%rbx,4), %esi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	movl	%r14d, %edx
	movq	%r13, %rcx
	movl	%ebx, %r8d
	movl	%r15d, %r9d
	callq	_af9013_rregs
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
	jmp	LBB0_9
LBB0_2:
	movq	%rbx, %rax
	xorl	%ebx, %ebx
	testl	%eax, %eax
	je	LBB0_10
## %bb.3:
	movl	%eax, %ebx
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$2, %esi
	movl	%r14d, %edx
	movq	%r13, %rcx
	movl	$1, %r8d
	movl	%r15d, %r9d
	callq	_af9013_rregs
	testl	%eax, %eax
	jne	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	incl	%r14d
	addq	$4, %r13
	decq	%rbx
	jne	LBB0_4
LBB0_9:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_5:
	movl	%eax, %ebx
LBB0_6:
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%ebx, %edx
	callq	_dev_dbg
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AF9013_TS_MODE_USB,8,3         ## @AF9013_TS_MODE_USB
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed %d\n"

	.no_dead_strip	_af9013_regmap_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function af9013_regmap_read
_af9013_regmap_read:                    ; @af9013_regmap_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w23, -56
	.cfi_offset w24, -64
	mov	x23, x4
	mov	x20, x3
	mov	x22, x1
	mov	x19, x0
	bl	_i2c_get_clientdata
	ldp	w8, w9, [x22]
	cmp	w8, #0
	cset	w21, eq
	ldr	w8, [x22, #8]
	orr	w22, w8, w9, lsl #8
Lloh0:
	adrp	x8, _AF9013_TS_MODE_USB@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF9013_TS_MODE_USB@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	ldr	x8, [x8]
	and	w10, w22, #0xff00
	cmp	x9, x8
	mov	w8, #44544
	ccmp	w10, w8, #4, eq
	b.ne	LBB0_6
; %bb.1:
	cbz	w23, LBB0_9
; %bb.2:
	and	x24, x23, #0xffffffff
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #2
	mov	x2, x22
	mov	x3, x20
	mov	w4, #1
	mov	x5, x21
	bl	_af9013_rregs
	cbnz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w22, w22, #1
	add	x20, x20, #4
	subs	x24, x24, #1
	b.ne	LBB0_3
; %bb.5:
	mov	w23, #0
	b	LBB0_9
LBB0_6:
	lsl	w8, w23, #2
	sub	w1, w8, #2
	mov	x0, x19
	mov	x2, x22
	mov	x3, x20
	mov	x4, x23
	mov	x5, x21
	bl	_af9013_rregs
	mov	x23, x0
	cbnz	w0, LBB0_8
	b	LBB0_9
LBB0_7:
	mov	x23, x0
LBB0_8:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x23
	bl	_dev_dbg
LBB0_9:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_AF9013_TS_MODE_USB,8,3         ; @AF9013_TS_MODE_USB
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed %d\n"

	.no_dead_strip	_af9013_regmap_read
.subsections_via_symbols
