	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function t4_read_flash
_t4_read_flash:                         ## @t4_read_flash
	.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
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	testb	$3, %sil
	jne	LBB0_2
## %bb.1:
	movq	%rcx, %r13
	movl	%edx, %r12d
	movq	%rdi, %r15
	movl	%esi, %eax
	movl	%edx, %ecx
	leaq	(%rax,%rcx,4), %rax
	movl	(%rdi), %ecx
	cmpq	%rcx, %rax
	ja	LBB0_2
## %bb.3:
	movl	%esi, %edi
	callq	_swab32
	movq	_SF_RD_DATA_FAST@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	%r15, %rdi
	movl	$4, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	movl	%eax, %r8d
	callq	_sf1_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.4:
	movq	%r15, %rdi
	movl	$1, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	movq	%r13, %r8
	callq	_sf1_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movl	$0, %ebx
	testl	%r12d, %r12d
	je	LBB0_13
## %bb.6:
	movl	$1, %r14d
	subl	%r12d, %r14d
	movq	_SF_OP@GOTPCREL(%rip), %r12
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	addq	$4, %r13
	incl	%r14d
	xorl	%ebx, %ebx
	cmpl	$1, %r14d
	je	LBB0_13
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	testl	%r14d, %r14d
	setne	%dl
	sete	%cl
	movq	%r15, %rdi
	movl	$4, %esi
	movq	%r13, %r8
	callq	_sf1_read
	movl	%eax, %ebx
	testl	%r14d, %r14d
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r12), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_t4_write_reg
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	testl	%ebx, %ebx
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	(%r13), %edi
	callq	_htonl
	movl	%eax, (%r13)
	jmp	LBB0_12
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SF_RD_DATA_FAST,4,2            ## @SF_RD_DATA_FAST
	.comm	_SF_OP,4,2                      ## @SF_OP
	.no_dead_strip	_t4_read_flash
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function t4_read_flash
_t4_read_flash:                         ; @t4_read_flash
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	tst	w1, #0x3
	b.ne	LBB0_12
; %bb.1:
	mov	x22, x2
	mov	x21, x0
	mov	w8, w2
	lsl	x8, x8, #2
	add	x8, x8, w1, uxtw
	ldr	w9, [x0]
	cmp	x8, x9
	b.hi	LBB0_12
; %bb.2:
	mov	x19, x4
	mov	x20, x3
	mov	x0, x1
	bl	_swab32
Lloh0:
	adrp	x8, _SF_RD_DATA_FAST@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SF_RD_DATA_FAST@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w4, w8, w0
	mov	x0, x21
	mov	w1, #4
	mov	w2, #1
	mov	w3, #0
	bl	_sf1_write
	mov	x23, x0
	cbnz	w0, LBB0_13
; %bb.3:
	mov	x0, x21
	mov	w1, #1
	mov	w2, #1
	mov	w3, #0
	mov	x4, x20
	bl	_sf1_read
	mov	x23, x0
	cbnz	w0, LBB0_13
; %bb.4:
	cbz	w22, LBB0_14
; %bb.5:
	mov	w8, #1
	sub	w22, w8, w22
Lloh3:
	adrp	x24, _SF_OP@GOTPAGE
Lloh4:
	ldr	x24, [x24, _SF_OP@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w23, #0
	add	x20, x20, #4
	add	w22, w22, #1
	cmp	w22, #1
	b.eq	LBB0_13
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w22, #0
	cset	w2, ne
	cset	w3, eq
	mov	x0, x21
	mov	w1, #4
	mov	x4, x20
	bl	_sf1_read
	mov	x23, x0
	cbnz	w22, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x24]
	mov	x0, x21
	mov	w2, #0
	bl	_t4_write_reg
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	cbnz	w23, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	cbz	w19, LBB0_6
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	w0, [x20]
	bl	_htonl
	str	w0, [x20]
	b	LBB0_6
LBB0_12:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_13:
	mov	x0, x23
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w23, #0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SF_RD_DATA_FAST,4,2            ; @SF_RD_DATA_FAST
	.comm	_SF_OP,4,2                      ; @SF_OP
	.no_dead_strip	_t4_read_flash
.subsections_via_symbols
