	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tango_write_page
_tango_write_page:                      ## @tango_write_page
	.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	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_nand_to_mtd
	movq	%rax, %r13
	movl	8(%rbx), %edi
	callq	_to_tango_nfc
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rcx
LBB0_6:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_7
LBB0_2:
	movq	%rax, %r12
	movl	(%r13), %r14d
	movq	_METADATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r12), %rsi
	movl	$-1, %edi
	callq	_writel_relaxed
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NFC_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r15, %rcx
	movl	%r14d, %r8d
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	_do_dma
	testl	%eax, %eax
	je	LBB0_3
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rbx, %rdi
	callq	*(%rbx)
	movq	_NAND_STATUS_FAIL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_6
LBB0_4:
	xorl	%eax, %eax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_METADATA,8,3                   ## @METADATA
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_NFC_WRITE,4,2                  ## @NFC_WRITE
	.comm	_NAND_STATUS_FAIL,4,2           ## @NAND_STATUS_FAIL
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_tango_write_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tango_write_page
_tango_write_page:                      ; @tango_write_page
	.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
	mov	x20, x3
	mov	x24, x2
	mov	x21, x1
	mov	x19, x0
	bl	_nand_to_mtd
	mov	x23, x0
	ldr	w0, [x19, #8]
	bl	_to_tango_nfc
	cbz	w24, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_4
LBB0_3:
	mov	x22, x0
	ldr	w23, [x23]
	ldr	x8, [x0]
Lloh2:
	adrp	x9, _METADATA@GOTPAGE
Lloh3:
	ldr	x9, [x9, _METADATA@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	add	x1, x9, x8
	mov	w0, #-1
	bl	_writel_relaxed
Lloh5:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
Lloh8:
	adrp	x8, _NFC_WRITE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NFC_WRITE@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x3, x21
	mov	x4, x23
	mov	x5, x20
	bl	_do_dma
	cbz	w0, LBB0_5
LBB0_4:
	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_5:
	ldr	x8, [x19]
	mov	x0, x19
	blr	x8
Lloh11:
	adrp	x8, _NAND_STATUS_FAIL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NAND_STATUS_FAIL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_7
; %bb.6:
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
	mov	w0, #0
	b	LBB0_4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_METADATA,8,3                   ; @METADATA
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_NFC_WRITE,4,2                  ; @NFC_WRITE
	.comm	_NAND_STATUS_FAIL,4,2           ; @NAND_STATUS_FAIL
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_tango_write_page
.subsections_via_symbols
