	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cros_ec_lpc_readmem
_cros_ec_lpc_readmem:                   ## @cros_ec_lpc_readmem
	.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	%rcx, %r12
	movq	_EC_MEMMAP_SIZE@GOTPCREL(%rip), %r15
	movl	(%r15), %eax
	movl	%eax, %ecx
	subl	%edx, %ecx
	cmpl	%esi, %ecx
	jbe	LBB0_1
## %bb.2:
	movl	%edx, %r14d
	testl	%edx, %edx
	je	LBB0_3
## %bb.8:
	movq	_cros_ec_lpc_ops@GOTPCREL(%rip), %rax
	movq	_EC_LPC_ADDR_MEMMAP@GOTPCREL(%rip), %rcx
	movl	%esi, %edi
	addq	(%rcx), %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	*(%rax)
	jmp	LBB0_7
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	xorl	%r14d, %r14d
	cmpl	%esi, %eax
	jbe	LBB0_7
## %bb.4:
	movslq	%esi, %rbx
	movl	$1, %eax
	movq	_EC_LPC_ADDR_MEMMAP@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, %r14d
	movq	(%r13), %rdi
	addq	%rbx, %rdi
	movl	$1, %esi
	movq	%r12, %rdx
	movq	_cros_ec_lpc_ops@GOTPCREL(%rip), %rax
	callq	*(%rax)
	cmpb	$0, (%r12)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	incq	%r12
	leal	1(%r14), %eax
	cmpl	%ebx, (%r15)
	ja	LBB0_5
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_EC_MEMMAP_SIZE,4,2             ## @EC_MEMMAP_SIZE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cros_ec_lpc_ops,8,3            ## @cros_ec_lpc_ops
	.comm	_EC_LPC_ADDR_MEMMAP,8,3         ## @EC_LPC_ADDR_MEMMAP
	.no_dead_strip	_cros_ec_lpc_readmem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cros_ec_lpc_readmem
_cros_ec_lpc_readmem:                   ; @cros_ec_lpc_readmem
	.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
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x21, _EC_MEMMAP_SIZE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _EC_MEMMAP_SIZE@GOTPAGEOFF]
	ldr	w8, [x21]
	sub	w9, w8, w2
	cmp	w9, w1
	b.ls	LBB0_3
; %bb.1:
	mov	x19, x3
	mov	x20, x2
	cbz	w2, LBB0_5
; %bb.2:
Lloh2:
	adrp	x8, _cros_ec_lpc_ops@GOTPAGE
Lloh3:
	ldr	x8, [x8, _cros_ec_lpc_ops@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _EC_LPC_ADDR_MEMMAP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _EC_LPC_ADDR_MEMMAP@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	add	x0, x9, w1, uxtw
	mov	x1, x20
	mov	x2, x19
	blr	x8
	b	LBB0_4
LBB0_3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	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
LBB0_5:
	cmp	w8, w1
	b.ls	LBB0_10
; %bb.6:
	mov	x8, #0
	sxtw	x22, w1
Lloh11:
	adrp	x23, _cros_ec_lpc_ops@GOTPAGE
Lloh12:
	ldr	x23, [x23, _cros_ec_lpc_ops@GOTPAGEOFF]
Lloh13:
	adrp	x24, _EC_LPC_ADDR_MEMMAP@GOTPAGE
Lloh14:
	ldr	x24, [x24, _EC_LPC_ADDR_MEMMAP@GOTPAGEOFF]
	mov	w25, w1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x26, x8
	add	x20, x19, x8
	ldr	x8, [x23]
	ldr	x9, [x24]
	add	x10, x22, x26
	add	x0, x10, x9
	mov	w1, #1
	mov	x2, x20
	blr	x8
	ldrb	w8, [x20]
	cbz	w8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w9, [x21]
	add	x8, x26, #1
	add	w10, w25, w8
	cmp	w9, w10
	b.hi	LBB0_7
LBB0_9:
	add	w20, w26, #1
	b	LBB0_4
LBB0_10:
	mov	w20, #0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EC_MEMMAP_SIZE,4,2             ; @EC_MEMMAP_SIZE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cros_ec_lpc_ops,8,3            ; @cros_ec_lpc_ops
	.comm	_EC_LPC_ADDR_MEMMAP,8,3         ; @EC_LPC_ADDR_MEMMAP
	.no_dead_strip	_cros_ec_lpc_readmem
.subsections_via_symbols
