	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eeprom_93xx46_write
_eeprom_93xx46_write:                   ## @eeprom_93xx46_write
	.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	%rcx, %r13
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r12
	xorl	%edi, %edi
	cmpl	%esi, (%r12)
	setbe	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EFBIG@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_2:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	%r14d, %r15d
	leaq	(%r15,%r13), %rax
	movl	(%r12), %ecx
	movl	%ecx, %ebx
	subl	%r14d, %ebx
	cmpq	%rcx, %rax
	cmovbeq	%r13, %rbx
	xorl	%edi, %edi
	testq	%rbx, %rbx
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_17
## %bb.3:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, %r13
	andq	$-2, %r13
	cmpl	$6, 4(%r12)
	sete	%r15b
	cmovneq	%rbx, %r13
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_eeprom_93xx46_ew
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.4:
	movl	%r15d, %ebx
	leaq	8(%r12), %r15
	movq	%r15, %rdi
	callq	_mutex_lock
	movq	16(%r12), %rax
	movq	8(%rax), %rax
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movq	%r12, %rdi
	callq	*%rax
LBB0_6:
	testq	%r13, %r13
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	je	LBB0_7
## %bb.10:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movb	%bl, %al
	incq	%rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%r15), %rsi
	leal	(%rcx,%r15), %edx
	movq	%r12, %rdi
	callq	_eeprom_93xx46_write_word
	testl	%eax, %eax
	jne	LBB0_12
## %bb.8:                               ##   in Loop: Header=BB0_11 Depth=1
	addq	-64(%rbp), %r15                 ## 8-byte Folded Reload
	cmpq	%r15, %r13
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	ja	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_14
LBB0_12:
	movl	%eax, %ebx
	movq	24(%r12), %rdi
	addl	%r15d, %r14d
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	movl	%eax, %ecx
	callq	_dev_err
LBB0_13:
	movq	-48(%rbp), %r15                 ## 8-byte Reload
LBB0_14:
	movq	16(%r12), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%r12, %rdi
	callq	*%rax
LBB0_16:
	movq	%r15, %rdi
	callq	_mutex_unlock
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_eeprom_93xx46_ew
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EFBIG,4,2                      ## @EFBIG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"write failed at %d: %d\n"

	.no_dead_strip	_eeprom_93xx46_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eeprom_93xx46_write
_eeprom_93xx46_write:                   ; @eeprom_93xx46_write
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, w1
	cset	w0, ls
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EFBIG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EFBIG@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_15
LBB0_2:
	add	x8, x22, w20, uxtw
	ldr	w9, [x19]
	sub	w10, w9, w20
	cmp	x8, x9
	csel	x23, x10, x22, hi
	cmp	x23, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_15
; %bb.3:
	ldr	w8, [x19, #4]
	and	x9, x23, #0xfffffffffffffffe
	cmp	w8, #6
	csel	x24, x9, x23, eq
	mov	w8, #1
	cinc	x25, x8, eq
	mov	x0, x19
	mov	w1, #1
	bl	_eeprom_93xx46_ew
	mov	x23, x0
	cbnz	w0, LBB0_15
; %bb.4:
	add	x22, x19, #8
	mov	x0, x22
	bl	_mutex_lock
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	blr	x8
LBB0_6:
	cbz	x24, LBB0_10
; %bb.7:
	mov	x26, #0
	mov	w27, w20
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, x21, x26
	add	w2, w27, w26
	mov	x0, x19
	bl	_eeprom_93xx46_write_word
	cbnz	w0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x26, x26, x25
	cmp	x24, x26
	b.hi	LBB0_8
LBB0_10:
	mov	w23, #0
	b	LBB0_12
LBB0_11:
	mov	x23, x0
	ldr	x0, [x19, #24]
	add	w2, w20, w26
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x3, x23
	bl	_dev_err
LBB0_12:
	ldr	x8, [x19, #16]
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.13:
	mov	x0, x19
	blr	x8
LBB0_14:
	mov	x0, x22
	bl	_mutex_unlock
	mov	x0, x19
	mov	w1, #0
	bl	_eeprom_93xx46_ew
LBB0_15:
	mov	x0, x23
	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
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EFBIG,4,2                      ; @EFBIG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"write failed at %d: %d\n"

	.no_dead_strip	_eeprom_93xx46_write
.subsections_via_symbols
