	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function max77620_read_es_version
_max77620_read_es_version:              ## @max77620_read_es_version
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX77620_REG_CID0@GOTPCREL(%rip), %r13
	movslq	(%r13), %rbx
	leaq	-80(,%rbx,4), %r12
	addq	%rbp, %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %edi
	movl	%ebx, %esi
	leaq	-84(%rbp), %rdx
	callq	_regmap_read
	movl	%eax, %r15d
	movl	(%r14), %edi
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	%ebx, %edx
	subl	(%r13), %edx
	movl	-84(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_dbg
	movl	-84(%rbp), %eax
	movslq	(%r13), %rcx
	shlq	$2, %rcx
	negq	%rcx
	movl	%eax, (%r12,%rcx)
	leal	1(%rbx), %eax
	addq	$4, %r12
	movq	_MAX77620_REG_CID5@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	movl	%eax, %ebx
	jl	LBB0_1
## %bb.4:
	movl	-64(%rbp), %r12d
	movl	-60(%rbp), %edi
	movl	(%r14), %ebx
	callq	_MAX77620_CID5_DIDM
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movl	%r12d, %edx
	movl	%eax, %ecx
	callq	_dev_info
	jmp	LBB0_5
LBB0_2:
	leaq	L_.str(%rip), %rsi
	movl	%r15d, %edx
	callq	_dev_err
LBB0_5:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX77620_REG_CID0,4,2          ## @MAX77620_REG_CID0
	.comm	_MAX77620_REG_CID5,4,2          ## @MAX77620_REG_CID5
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to read CID: %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"CID%d: 0x%02x\n"

L_.str.2:                               ## @.str.2
	.asciz	"PMIC Version OTP:0x%02X and ES:0x%X\n"

	.no_dead_strip	_max77620_read_es_version
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function max77620_read_es_version
_max77620_read_es_version:              ; @max77620_read_es_version
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x23, _MAX77620_REG_CID0@GOTPAGE
Lloh4:
	ldr	x23, [x23, _MAX77620_REG_CID0@GOTPAGEOFF]
	ldrsw	x21, [x23]
	add	x8, sp, #16
	add	x24, x8, x21, lsl #2
Lloh5:
	adrp	x22, l_.str.1@PAGE
Lloh6:
	add	x22, x22, l_.str.1@PAGEOFF
Lloh7:
	adrp	x25, _MAX77620_REG_CID5@GOTPAGE
Lloh8:
	ldr	x25, [x25, _MAX77620_REG_CID5@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #4]
	add	x2, sp, #12
	mov	x1, x21
	bl	_regmap_read
	mov	x19, x0
	ldr	w0, [x20]
	tbnz	w19, #31, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x23]
	sub	w2, w21, w8
	ldr	w3, [sp, #12]
	mov	x1, x22
	bl	_dev_dbg
	ldr	w8, [sp, #12]
	ldrsw	x9, [x23]
	sub	x9, x24, x9, lsl #2
	str	w8, [x9]
	add	w8, w21, #1
	ldr	w9, [x25]
	add	x24, x24, #4
	cmp	w21, w9
	mov	x21, x8
	b.lt	LBB0_1
; %bb.3:
	ldp	w21, w0, [sp, #32]
	ldr	w20, [x20]
	bl	_MAX77620_CID5_DIDM
	mov	x3, x0
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_info
	b	LBB0_5
LBB0_4:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_err
LBB0_5:
	ldr	x8, [sp, #40]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX77620_REG_CID0,4,2          ; @MAX77620_REG_CID0
	.comm	_MAX77620_REG_CID5,4,2          ; @MAX77620_REG_CID5
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to read CID: %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"CID%d: 0x%02x\n"

l_.str.2:                               ; @.str.2
	.asciz	"PMIC Version OTP:0x%02X and ES:0x%X\n"

	.no_dead_strip	_max77620_read_es_version
.subsections_via_symbols
