	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sf1_write
_sf1_write:                             ## @sf1_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	leal	-5(%rbx), %eax
	cmpl	$-5, %eax
	ja	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movl	%r8d, %r12d
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rdi, %r14
	movq	_SF_OP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_t4_read_reg
	movq	_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_5
## %bb.4:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	testl	%r13d, %r13d
	je	LBB0_7
## %bb.6:
	movq	_SF_CONT@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
LBB0_7:
	testl	%r15d, %r15d
	je	LBB0_9
## %bb.8:
	movq	_SF_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_9:
	orl	%r13d, %r15d
	movq	_SF_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	%r12d, %edx
	callq	_t4_write_reg
	movq	_SF_OP@GOTPCREL(%rip), %r13
	movl	(%r13), %r12d
	decl	%ebx
	movl	%ebx, %edi
	callq	_BYTECNT
	orl	%eax, %r15d
	movq	_OP_WR@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
	movq	%r14, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	callq	_t4_write_reg
	movl	(%r13), %esi
	movq	_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_SF_ATTEMPTS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	movl	$5, %r9d
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_t4_wait_op_done                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SF_OP,4,2                      ## @SF_OP
	.comm	_BUSY,4,2                       ## @BUSY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SF_CONT,4,2                    ## @SF_CONT
	.comm	_SF_LOCK,4,2                    ## @SF_LOCK
	.comm	_SF_DATA,4,2                    ## @SF_DATA
	.comm	_OP_WR,4,2                      ## @OP_WR
	.comm	_SF_ATTEMPTS,4,2                ## @SF_ATTEMPTS
	.no_dead_strip	_sf1_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sf1_write
_sf1_write:                             ; @sf1_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	sub	w8, w1, #5
	cmn	w8, #5
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:
	mov	x21, x4
	mov	x22, x3
	mov	x23, x2
	mov	x20, x1
	mov	x19, x0
Lloh2:
	adrp	x24, _SF_OP@GOTPAGE
Lloh3:
	ldr	x24, [x24, _SF_OP@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_t4_read_reg
Lloh4:
	adrp	x25, _BUSY@GOTPAGE
Lloh5:
	ldr	x25, [x25, _BUSY@GOTPAGEOFF]
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_5
; %bb.3:
Lloh6:
	adrp	x8, _EBUSY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_4:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_5:
Lloh8:
	adrp	x8, _SF_CONT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SF_CONT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmp	w23, #0
	csel	w23, wzr, w8, eq
Lloh11:
	adrp	x8, _SF_LOCK@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SF_LOCK@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w22, #0
	csel	w22, wzr, w8, eq
Lloh14:
	adrp	x8, _SF_DATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SF_DATA@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x21
	bl	_t4_write_reg
	ldr	w21, [x24]
	orr	w22, w22, w23
	sub	w0, w20, #1
	bl	_BYTECNT
	orr	w8, w22, w0
Lloh17:
	adrp	x9, _OP_WR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _OP_WR@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	orr	w2, w8, w9
	mov	x0, x19
	mov	x1, x21
	bl	_t4_write_reg
	ldr	w1, [x24]
	ldr	w2, [x25]
Lloh20:
	adrp	x8, _SF_ATTEMPTS@GOTPAGE
Lloh21:
	ldr	x8, [x8, _SF_ATTEMPTS@GOTPAGEOFF]
Lloh22:
	ldr	w4, [x8]
	mov	x0, x19
	mov	w3, #0
	mov	w5, #5
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_t4_wait_op_done
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SF_OP,4,2                      ; @SF_OP
	.comm	_BUSY,4,2                       ; @BUSY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SF_CONT,4,2                    ; @SF_CONT
	.comm	_SF_LOCK,4,2                    ; @SF_LOCK
	.comm	_SF_DATA,4,2                    ; @SF_DATA
	.comm	_OP_WR,4,2                      ; @OP_WR
	.comm	_SF_ATTEMPTS,4,2                ; @SF_ATTEMPTS
	.no_dead_strip	_sf1_write
.subsections_via_symbols
