	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function at24_read
_at24_read:                             ## @at24_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	%rdx, %r15
	movl	%esi, %r12d
	movq	%rdi, %r13
	callq	_at24_base_client_dev
	movq	%rax, %r14
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_11
## %bb.1:
	movl	%r12d, %eax
	addq	%rbx, %rax
	movl	(%r13), %ecx
	cmpq	%rcx, %rax
	jbe	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_3:
	movq	%r14, %rdi
	callq	_pm_runtime_get_sync
	movq	%r14, %rdi
	testl	%eax, %eax
	js	LBB0_8
## %bb.4:
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leaq	4(%r13), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	testq	%rbx, %rbx
	je	LBB0_7
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	movq	%rbx, %rcx
	callq	_at24_regmap_read
	movl	%eax, %r14d
	testl	%eax, %eax
	js	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %eax
	addq	%rax, %r15
	addl	%r14d, %r12d
	subq	%rax, %rbx
	jne	LBB0_5
LBB0_7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_pm_runtime_put
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movl	%eax, %r14d
	callq	_pm_runtime_put_noidle
	jmp	LBB0_10
LBB0_9:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_pm_runtime_put
LBB0_10:
	movl	%r14d, %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_at24_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function at24_read
_at24_read:                             ; @at24_read
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	bl	_at24_base_client_dev
	mov	x20, x0
	cmp	x19, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_10
; %bb.1:
	add	x8, x19, w22, uxtw
	ldr	w9, [x23]
	cmp	x8, x9
	b.ls	LBB0_3
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_10
LBB0_3:
	mov	x0, x20
	bl	_pm_runtime_get_sync
	tbnz	w0, #31, LBB0_8
; %bb.4:
	add	x24, x23, #4
	mov	x0, x24
	bl	_mutex_lock
	cbz	x19, LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x21
	mov	x2, x22
	mov	x3, x19
	bl	_at24_regmap_read
	mov	x25, x0
	tbnz	w0, #31, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w8, w25
	add	x21, x21, x8
	add	w22, w25, w22
	subs	x19, x19, x8
	b.ne	LBB0_5
LBB0_7:
	mov	x0, x24
	bl	_mutex_unlock
	mov	x0, x20
	bl	_pm_runtime_put
	mov	w19, #0
	b	LBB0_10
LBB0_8:
	mov	x24, x0
	mov	x0, x20
	bl	_pm_runtime_put_noidle
	mov	x19, x24
	b	LBB0_10
LBB0_9:
	mov	x0, x24
	bl	_mutex_unlock
	mov	x0, x20
	bl	_pm_runtime_put
	mov	x19, x25
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_at24_read
.subsections_via_symbols
