	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __flashwritecommand
___flashwritecommand:                   ## @__flashwritecommand
	.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, %eax
	shll	$9, %eax
	addl	%edx, %edx
	orl	%eax, %edx
	orl	$-536870912, %edx               ## imm = 0xE0000000
	movl	%edx, -44(%rbp)
	xorl	%eax, %eax
	cmpl	$524287, %esi                   ## imm = 0x7FFFF
	jg	LBB0_2
## %bb.1:
	movl	%edi, %r13d
	movq	_EXI_DEVICE_0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_EXI_SPEED16MHZ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_EXI_Select
	testl	%eax, %eax
	setne	%r15b
	movq	_EXI_WRITE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	leaq	-44(%rbp), %r14
	movl	%r13d, %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_EXI_ImmEx
	testl	%eax, %eax
	setne	%bl
	movl	(%r12), %ecx
	movl	%r13d, %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_EXI_ImmEx
	testl	%eax, %eax
	setne	%r14b
	movl	%r13d, %edi
	callq	_EXI_Deselect
	testl	%eax, %eax
	setne	%al
	andb	%r14b, %al
	andb	%r15b, %bl
	andb	%al, %bl
	movzbl	%bl, %eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EXI_DEVICE_0,4,2               ## @EXI_DEVICE_0
	.comm	_EXI_SPEED16MHZ,4,2             ## @EXI_SPEED16MHZ
	.comm	_EXI_WRITE,4,2                  ## @EXI_WRITE
	.no_dead_strip	___flashwritecommand
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __flashwritecommand
___flashwritecommand:                   ; @__flashwritecommand
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	lsl	w8, w1, #9
	orr	w8, w8, w2, lsl #1
	orr	w8, w8, #0xe0000000
	str	w8, [sp, #12]
	cmp	w1, #128, lsl #12               ; =524288
	b.lt	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_3
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x8, _EXI_DEVICE_0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EXI_DEVICE_0@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _EXI_SPEED16MHZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EXI_SPEED16MHZ@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	bl	_EXI_Select
	mov	x20, x0
Lloh6:
	adrp	x22, _EXI_WRITE@GOTPAGE
Lloh7:
	ldr	x22, [x22, _EXI_WRITE@GOTPAGEOFF]
	ldr	w3, [x22]
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_EXI_ImmEx
	mov	x21, x0
	ldr	w3, [x22]
	add	x1, sp, #12
	mov	x0, x19
	mov	w2, #4
	bl	_EXI_ImmEx
	mov	x22, x0
	mov	x0, x19
	bl	_EXI_Deselect
	cmp	w0, #0
	ccmp	w22, #0, #4, ne
	ccmp	w21, #0, #4, ne
	ccmp	w20, #0, #4, ne
	cset	w0, ne
LBB0_3:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EXI_DEVICE_0,4,2               ; @EXI_DEVICE_0
	.comm	_EXI_SPEED16MHZ,4,2             ; @EXI_SPEED16MHZ
	.comm	_EXI_WRITE,4,2                  ; @EXI_WRITE
	.no_dead_strip	___flashwritecommand
.subsections_via_symbols
