	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jme_reload_eeprom
_jme_reload_eeprom:                     ## @jme_reload_eeprom
	.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	%rdi, %r15
	movq	_JME_SMBCSR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_jread32
	movl	%eax, %ebx
	movq	_SMBCSR_EEPROMD@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	testl	%ebx, (%rax)
	je	LBB0_7
## %bb.1:
	movq	_SMBCSR_CNACK@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_jwrite32
	movq	_SMBCSR_RELOAD@GOTPCREL(%rip), %r13
	orl	(%r13), %ebx
	movl	(%r12), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_jwrite32
	movl	$12, %edi
	callq	_mdelay
	movq	_JME_EEPROM_RELOAD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.2:
	incl	%ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, %edi
	callq	_mdelay
	movl	(%r12), %esi
	movq	%r15, %rdi
	callq	_jread32
	testl	%eax, (%r13)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	decl	%ebx
	cmpl	$1, %ebx
	jg	LBB0_3
	jmp	LBB0_6
LBB0_5:
	jne	LBB0_7
LBB0_6:
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_jeprintk
	movq	_EIO@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
	.cfi_endproc
                                        ## -- End function
	.comm	_JME_SMBCSR,4,2                 ## @JME_SMBCSR
	.comm	_SMBCSR_EEPROMD,4,2             ## @SMBCSR_EEPROMD
	.comm	_SMBCSR_CNACK,4,2               ## @SMBCSR_CNACK
	.comm	_SMBCSR_RELOAD,4,2              ## @SMBCSR_RELOAD
	.comm	_JME_EEPROM_RELOAD_TIMEOUT,4,2  ## @JME_EEPROM_RELOAD_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"eeprom reload timeout\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_jme_reload_eeprom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jme_reload_eeprom
_jme_reload_eeprom:                     ; @jme_reload_eeprom
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x0
Lloh0:
	adrp	x21, _JME_SMBCSR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _JME_SMBCSR@GOTPAGEOFF]
	ldr	w1, [x21]
	bl	_jread32
Lloh2:
	adrp	x8, _SMBCSR_EEPROMD@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SMBCSR_EEPROMD@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.1:
Lloh5:
	adrp	x8, _SMBCSR_CNACK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SMBCSR_CNACK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	orr	w20, w8, w0
	ldr	w1, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_jwrite32
Lloh8:
	adrp	x22, _SMBCSR_RELOAD@GOTPAGE
Lloh9:
	ldr	x22, [x22, _SMBCSR_RELOAD@GOTPAGEOFF]
	ldr	w8, [x22]
	orr	w2, w8, w20
	ldr	w1, [x21]
	mov	x0, x19
	bl	_jwrite32
	mov	w0, #12
	bl	_mdelay
Lloh10:
	adrp	x8, _JME_EEPROM_RELOAD_TIMEOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _JME_EEPROM_RELOAD_TIMEOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	add	w20, w8, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	w0, #1
	bl	_mdelay
	ldr	w1, [x21]
	mov	x0, x19
	bl	_jread32
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	w20, w20, #1
	cmp	w20, #1
	b.gt	LBB0_3
	b	LBB0_7
LBB0_5:
	cbz	w8, LBB0_7
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	ldr	w0, [x19]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_jeprintk
Lloh15:
	adrp	x8, _EIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_JME_SMBCSR,4,2                 ; @JME_SMBCSR
	.comm	_SMBCSR_EEPROMD,4,2             ; @SMBCSR_EEPROMD
	.comm	_SMBCSR_CNACK,4,2               ; @SMBCSR_CNACK
	.comm	_SMBCSR_RELOAD,4,2              ; @SMBCSR_RELOAD
	.comm	_JME_EEPROM_RELOAD_TIMEOUT,4,2  ; @JME_EEPROM_RELOAD_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"eeprom reload timeout\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_jme_reload_eeprom
.subsections_via_symbols
