	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eeprom_93xx46_ew
_eeprom_93xx46_ew:                      ## @eeprom_93xx46_ew
	.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
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_OP_START@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%rdi), %ecx
	shll	%cl, %eax
	xorl	%r13d, %r13d
	cmpl	$7, %ecx
	sete	%cl
	testl	%esi, %esi
	jne	LBB0_1
## %bb.2:
	movq	_ADDR_EWDS@GOTPCREL(%rip), %rdx
	jmp	LBB0_3
LBB0_1:
	movq	_ADDR_EWEN@GOTPCREL(%rip), %rdx
LBB0_3:
	movl	(%rdx), %ebx
	shll	%cl, %ebx
	orl	%eax, %ebx
	movb	%cl, %r13b
	addl	$9, %r13d
	movl	%ebx, -44(%rbp)
	movq	%r15, %rdi
	callq	_has_quirk_instruction_length
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	shll	$2, %ebx
	movl	%ebx, -44(%rbp)
	addl	$2, %r13d
LBB0_5:
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	movq	16(%r15), %rdi
	leaq	L_.str.2(%rip), %rdx
	leaq	L_.str.1(%rip), %r12
	cmovneq	%r12, %rdx
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %ecx
	movl	%r13d, %r8d
	callq	_dev_dbg
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_spi_message_init
	leaq	-72(%rbp), %r14
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leaq	-44(%rbp), %rax
	movq	%rax, -72(%rbp)
	movl	$2, -64(%rbp)
	movl	%r13d, -60(%rbp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_spi_message_add_tail
	leaq	4(%r15), %r13
	movq	%r13, %rdi
	callq	_mutex_lock
	movq	8(%r15), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%r15, %rdi
	callq	*%rax
LBB0_7:
	movq	16(%r15), %rdi
	leaq	-48(%rbp), %rsi
	callq	_spi_sync
	movl	%eax, %ebx
	movl	$250, %edi
	callq	_ndelay
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	movq	16(%r15), %rdi
	leaq	L_.str.4(%rip), %rax
	cmoveq	%rax, %r12
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdx
	movl	%ebx, %ecx
	callq	_dev_err
LBB0_9:
	movq	8(%r15), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	%r15, %rdi
	callq	*%rax
LBB0_11:
	movq	%r13, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OP_START,4,2                   ## @OP_START
	.comm	_ADDR_EWEN,4,2                  ## @ADDR_EWEN
	.comm	_ADDR_EWDS,4,2                  ## @ADDR_EWDS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ew%s cmd 0x%04x, %d bits\n"

L_.str.1:                               ## @.str.1
	.asciz	"en"

L_.str.2:                               ## @.str.2
	.asciz	"ds"

L_.str.3:                               ## @.str.3
	.asciz	"erase/write %sable error %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"dis"

	.no_dead_strip	_eeprom_93xx46_ew
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eeprom_93xx46_ew
_eeprom_93xx46_ew:                      ; @eeprom_93xx46_ew
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _OP_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _OP_START@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	w9, [x0]
	cmp	x9, #7
	cset	w10, eq
Lloh3:
	adrp	x11, _ADDR_EWEN@GOTPAGE
Lloh4:
	ldr	x11, [x11, _ADDR_EWEN@GOTPAGEOFF]
	lsl	w8, w8, w9
Lloh5:
	adrp	x12, _ADDR_EWDS@GOTPAGE
Lloh6:
	ldr	x12, [x12, _ADDR_EWDS@GOTPAGEOFF]
	cmp	w1, #0
	csel	x11, x12, x11, eq
	ldr	w11, [x11]
	lsl	w10, w11, w10
	cmp	w9, #7
	mov	w9, #9
	cinc	w21, w9, eq
	orr	w22, w10, w8
	str	w22, [sp, #4]
	bl	_has_quirk_instruction_length
	cbz	x0, LBB0_2
; %bb.1:
	lsl	w22, w22, #2
	str	w22, [sp, #4]
	add	w21, w21, #2
LBB0_2:
	ldr	x0, [x19, #16]
Lloh7:
	adrp	x23, l_.str.1@PAGE
Lloh8:
	add	x23, x23, l_.str.1@PAGEOFF
Lloh9:
	adrp	x8, l_.str.2@PAGE
Lloh10:
	add	x8, x8, l_.str.2@PAGEOFF
	cmp	w20, #0
	csel	x2, x8, x23, eq
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x22
	mov	x4, x21
	bl	_dev_dbg
	add	x0, sp, #24
	bl	_spi_message_init
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	add	x8, sp, #4
	str	x8, [sp, #8]
	mov	w8, #2
	stp	w8, w21, [sp, #16]
	add	x0, sp, #8
	add	x1, sp, #24
	bl	_spi_message_add_tail
	add	x21, x19, #4
	mov	x0, x21
	bl	_mutex_lock
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	blr	x8
LBB0_4:
	ldr	x0, [x19, #16]
	add	x1, sp, #24
	bl	_spi_sync
	mov	x22, x0
	mov	w0, #250
	bl	_ndelay
	cbz	w22, LBB0_6
; %bb.5:
	ldr	x0, [x19, #16]
Lloh13:
	adrp	x8, l_.str.4@PAGE
Lloh14:
	add	x8, x8, l_.str.4@PAGEOFF
	cmp	w20, #0
	csel	x2, x8, x23, eq
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x3, x22
	bl	_dev_err
LBB0_6:
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_8
; %bb.7:
	mov	x0, x19
	blr	x8
LBB0_8:
	mov	x0, x21
	bl	_mutex_unlock
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_OP_START,4,2                   ; @OP_START
	.comm	_ADDR_EWEN,4,2                  ; @ADDR_EWEN
	.comm	_ADDR_EWDS,4,2                  ; @ADDR_EWDS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ew%s cmd 0x%04x, %d bits\n"

l_.str.1:                               ; @.str.1
	.asciz	"en"

l_.str.2:                               ; @.str.2
	.asciz	"ds"

l_.str.3:                               ; @.str.3
	.asciz	"erase/write %sable error %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"dis"

	.no_dead_strip	_eeprom_93xx46_ew
.subsections_via_symbols
