	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __aat2870_read
___aat2870_read:                        ## @__aat2870_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdx, %r14
	movq	%rsi, %rdx
	movq	%rdi, %rbx
	movq	%rsi, -24(%rbp)
	movq	_AAT2870_REG_NUM@GOTPCREL(%rip), %rax
	cmpq	%rsi, (%rax)
	jbe	LBB0_1
## %bb.2:
	movq	8(%rbx), %rax
	movq	%rdx, %rcx
	shlq	$4, %rcx
	cmpl	$0, 8(%rax,%rcx)
	je	LBB0_3
## %bb.4:
	movl	4(%rbx), %edi
	leaq	-24(%rbp), %rsi
	movl	$1, %edx
	callq	_i2c_master_send
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.8:
	movl	4(%rbx), %edi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_i2c_master_recv
	testl	%eax, %eax
	js	LBB0_12
## %bb.9:
	cmpl	$1, %eax
	jne	LBB0_6
## %bb.10:
	movq	-24(%rbp), %rdx
	movq	(%r14), %rcx
	jmp	LBB0_11
LBB0_1:
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_7
LBB0_3:
	movq	(%rax,%rcx), %rcx
	movq	%rcx, (%r14)
LBB0_11:
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_7:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AAT2870_REG_NUM,8,3            ## @AAT2870_REG_NUM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid address, 0x%02x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EIO,4,2                        ## @EIO
L_.str.1:                               ## @.str.1
	.asciz	"read: addr=0x%02x, val=0x%02x\n"

	.no_dead_strip	___aat2870_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __aat2870_read
___aat2870_read:                        ; @__aat2870_read
	.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	x20, x2
	mov	x2, x1
	mov	x19, x0
	str	x1, [sp, #8]
Lloh0:
	adrp	x8, _AAT2870_REG_NUM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AAT2870_REG_NUM@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x8, x1
	b.ls	LBB0_7
; %bb.1:
	ldr	x8, [x19, #8]
	add	x9, x8, x2, lsl #4
	ldr	w9, [x9, #8]
	cbz	w9, LBB0_8
; %bb.2:
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	mov	w2, #1
	bl	_i2c_master_send
	tbnz	w0, #31, LBB0_12
; %bb.3:
	cmp	w0, #1
	b.ne	LBB0_10
; %bb.4:
	ldr	w0, [x19, #4]
	mov	x1, x20
	mov	w2, #1
	bl	_i2c_master_recv
	tbnz	w0, #31, LBB0_12
; %bb.5:
	cmp	w0, #1
	b.ne	LBB0_10
; %bb.6:
	ldr	x2, [sp, #8]
	ldr	x3, [x20]
	b	LBB0_9
LBB0_7:
	ldr	w0, [x19]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	lsl	x9, x2, #4
	ldr	x3, [x8, x9]
	str	x3, [x20]
LBB0_9:
	ldr	w0, [x19]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_12
LBB0_10:
Lloh9:
	adrp	x8, _EIO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AAT2870_REG_NUM,8,3            ; @AAT2870_REG_NUM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid address, 0x%02x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EIO,4,2                        ; @EIO
l_.str.1:                               ; @.str.1
	.asciz	"read: addr=0x%02x, val=0x%02x\n"

	.no_dead_strip	___aat2870_read
.subsections_via_symbols
