	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s2io_eeprom_test
_s2io_eeprom_test:                      ## @s2io_eeprom_test
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	(%rdi), %rax
	movq	8(%rdi), %r13
	movq	_XFRAME_I_DEVICE@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	cmpq	(%r12), %rax
	jne	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$3, %ecx
	callq	_write_eeprom
	xorl	%ebx, %ebx
	testl	%eax, %eax
	sete	%bl
LBB0_2:
	leaq	-52(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1264, %esi                     ## imm = 0x4F0
	callq	_read_eeprom
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	$2032, %esi                     ## imm = 0x7F0
	callq	_read_eeprom
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movl	$1264, %esi                     ## imm = 0x4F0
	movl	$74565, %edx                    ## imm = 0x12345
	movl	$3, %ecx
	callq	_write_eeprom
	movl	%eax, %r14d
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$1264, %esi                     ## imm = 0x4F0
	callq	_read_eeprom
	testl	%r14d, %r14d
	movl	$1, %ecx
	cmovnel	%ecx, %ebx
	testq	%rax, %rax
	cmovnel	%ecx, %ebx
	movslq	-44(%rbp), %r8
	cmpq	$74565, %r8                     ## imm = 0x12345
	je	LBB0_4
## %bb.3:
	movq	_ERR_DBG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movl	$74565, %ecx                    ## imm = 0x12345
	callq	_DBG_PRINT
	movl	$1, %ebx
LBB0_4:
	movq	%r15, %rdi
	movl	$1264, %esi                     ## imm = 0x4F0
	movl	$16777215, %edx                 ## imm = 0xFFFFFF
	movl	$3, %ecx
	callq	_write_eeprom
	movq	(%r15), %rax
	cmpq	(%r12), %rax
	jne	LBB0_6
## %bb.5:
	movq	%r15, %rdi
	movl	$124, %esi
	xorl	%edx, %edx
	movl	$3, %ecx
	callq	_write_eeprom
	testl	%eax, %eax
	movl	$1, %eax
	cmovel	%eax, %ebx
LBB0_6:
	movq	%r15, %rdi
	movl	$2032, %esi                     ## imm = 0x7F0
	movl	$74565, %edx                    ## imm = 0x12345
	movl	$3, %ecx
	callq	_write_eeprom
	movl	%eax, %r14d
	leaq	-44(%rbp), %rdx
	movq	%r15, %rdi
	movl	$2032, %esi                     ## imm = 0x7F0
	callq	_read_eeprom
	testl	%r14d, %r14d
	movl	$1, %ecx
	cmovnel	%ecx, %ebx
	testq	%rax, %rax
	cmovnel	%ecx, %ebx
	movslq	-44(%rbp), %r8
	cmpq	$74565, %r8                     ## imm = 0x12345
	je	LBB0_8
## %bb.7:
	movq	_ERR_DBG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r13), %edx
	leaq	L_.str.1(%rip), %rsi
	movl	$74565, %ecx                    ## imm = 0x12345
	callq	_DBG_PRINT
	movl	$1, %ebx
LBB0_8:
	movq	%r15, %rdi
	movl	$2032, %esi                     ## imm = 0x7F0
	movl	$16777215, %edx                 ## imm = 0xFFFFFF
	movl	$3, %ecx
	callq	_write_eeprom
	movq	(%r15), %rax
	cmpq	(%r12), %rax
	jne	LBB0_10
## %bb.9:
	movq	%r15, %rdi
	movl	$128, %esi
	xorl	%edx, %edx
	movl	$3, %ecx
	callq	_write_eeprom
	movl	%eax, %r14d
	movq	%r15, %rdi
	movl	$252, %esi
	xorl	%edx, %edx
	movl	$3, %ecx
	callq	_write_eeprom
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	$256, %esi                      ## imm = 0x100
	xorl	%edx, %edx
	movl	$3, %ecx
	callq	_write_eeprom
	movl	%eax, %r13d
	movq	%r15, %rdi
	movl	$1260, %esi                     ## imm = 0x4EC
	xorl	%edx, %edx
	movl	$3, %ecx
	callq	_write_eeprom
	testl	%r14d, %r14d
	movl	$1, %ecx
	cmovel	%ecx, %ebx
	testl	%r12d, %r12d
	cmovel	%ecx, %ebx
	testl	%r13d, %r13d
	cmovel	%ecx, %ebx
	testl	%eax, %eax
	cmovel	%ecx, %ebx
LBB0_10:
	movq	-80(%rbp), %r14                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	testq	%r12, %r12
	je	LBB0_13
LBB0_14:
	movl	%ebx, (%r14)
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	-52(%rbp), %edx
	movq	%r15, %rdi
	movl	$1264, %esi                     ## imm = 0x4F0
	movl	$3, %ecx
	callq	_write_eeprom
	testq	%r12, %r12
	jne	LBB0_14
LBB0_13:
	movl	-48(%rbp), %edx
	movq	%r15, %rdi
	movl	$2032, %esi                     ## imm = 0x7F0
	movl	$3, %ecx
	callq	_write_eeprom
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_XFRAME_I_DEVICE,8,3            ## @XFRAME_I_DEVICE
	.comm	_ERR_DBG,4,2                    ## @ERR_DBG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: eeprom test error at offset 0x4F0. Data written %llx Data read %llx\n"

L_.str.1:                               ## @.str.1
	.asciz	"%s: eeprom test error at offset 0x7F0. Data written %llx Data read %llx\n"

	.no_dead_strip	_s2io_eeprom_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s2io_eeprom_test
_s2io_eeprom_test:                      ; @s2io_eeprom_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	ldp	x8, x25, [x0]
Lloh0:
	adrp	x24, _XFRAME_I_DEVICE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _XFRAME_I_DEVICE@GOTPAGEOFF]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #3
	bl	_write_eeprom
	cmp	w0, #0
	cset	w27, eq
	b	LBB0_3
LBB0_2:
	mov	w27, #0
LBB0_3:
	mov	w26, #9029
	movk	w26, #1, lsl #16
	add	x2, sp, #8
	mov	x0, x20
	mov	w1, #1264
	bl	_read_eeprom
	mov	x22, x0
	add	x2, sp, #4
	mov	x0, x20
	mov	w1, #2032
	bl	_read_eeprom
	mov	x21, x0
	mov	x0, x20
	mov	w1, #1264
	mov	w2, #9029
	movk	w2, #1, lsl #16
	mov	w3, #3
	bl	_write_eeprom
	mov	x23, x0
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #1264
	bl	_read_eeprom
	cmp	w23, #0
	ccmp	x0, #0, #0, eq
	csinc	w27, w27, wzr, eq
	ldrsw	x4, [sp, #12]
	cmp	w4, w26
	b.eq	LBB0_5
; %bb.4:
Lloh2:
	adrp	x8, _ERR_DBG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ERR_DBG@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	ldr	w2, [x25]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	w3, #9029
	movk	w3, #1, lsl #16
	bl	_DBG_PRINT
	mov	w27, #1
LBB0_5:
	mov	x0, x20
	mov	w1, #1264
	mov	w2, #16777215
	mov	w3, #3
	bl	_write_eeprom
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x20
	mov	w1, #124
	mov	w2, #0
	mov	w3, #3
	bl	_write_eeprom
	cmp	w0, #0
	csinc	w27, w27, wzr, ne
LBB0_7:
	mov	x0, x20
	mov	w1, #2032
	mov	w2, #9029
	movk	w2, #1, lsl #16
	mov	w3, #3
	bl	_write_eeprom
	mov	x23, x0
	add	x2, sp, #12
	mov	x0, x20
	mov	w1, #2032
	bl	_read_eeprom
	cmp	w23, #0
	ccmp	x0, #0, #0, eq
	csinc	w23, w27, wzr, eq
	ldrsw	x4, [sp, #12]
	cmp	w4, w26
	b.eq	LBB0_9
; %bb.8:
Lloh7:
	adrp	x8, _ERR_DBG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ERR_DBG@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	ldr	w2, [x25]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w3, #9029
	movk	w3, #1, lsl #16
	bl	_DBG_PRINT
	mov	w23, #1
LBB0_9:
	mov	x0, x20
	mov	w1, #2032
	mov	w2, #16777215
	mov	w3, #3
	bl	_write_eeprom
	ldr	x8, [x20]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_13
; %bb.10:
	cbz	x22, LBB0_14
LBB0_11:
	cbz	x21, LBB0_15
LBB0_12:
	str	w23, [x19]
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	mov	x0, x20
	mov	w1, #128
	mov	w2, #0
	mov	w3, #3
	bl	_write_eeprom
	mov	x24, x0
	mov	x0, x20
	mov	w1, #252
	mov	w2, #0
	mov	w3, #3
	bl	_write_eeprom
	mov	x25, x0
	mov	x0, x20
	mov	w1, #256
	mov	w2, #0
	mov	w3, #3
	bl	_write_eeprom
	mov	x26, x0
	mov	x0, x20
	mov	w1, #1260
	mov	w2, #0
	mov	w3, #3
	bl	_write_eeprom
	cmp	w24, #0
	ccmp	w25, #0, #4, ne
	ccmp	w26, #0, #4, ne
	ccmp	w0, #0, #4, ne
	csinc	w23, w23, wzr, ne
	cbnz	x22, LBB0_11
LBB0_14:
	ldr	w2, [sp, #8]
	mov	x0, x20
	mov	w1, #1264
	mov	w3, #3
	bl	_write_eeprom
	cbnz	x21, LBB0_12
LBB0_15:
	ldr	w2, [sp, #4]
	mov	x0, x20
	mov	w1, #2032
	mov	w3, #3
	bl	_write_eeprom
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_XFRAME_I_DEVICE,8,3            ; @XFRAME_I_DEVICE
	.comm	_ERR_DBG,4,2                    ; @ERR_DBG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: eeprom test error at offset 0x4F0. Data written %llx Data read %llx\n"

l_.str.1:                               ; @.str.1
	.asciz	"%s: eeprom test error at offset 0x7F0. Data written %llx Data read %llx\n"

	.no_dead_strip	_s2io_eeprom_test
.subsections_via_symbols
