	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function scb2_flash_remove
_scb2_flash_remove:                     ## @scb2_flash_remove
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	_scb2_mtd@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	movl	(%rdi), %edx
	xorl	%esi, %esi
	callq	_mtd_lock
	movq	(%rbx), %rdi
	callq	_mtd_device_unregister
	movq	(%rbx), %rdi
	callq	_map_destroy
	movq	_scb2_ioaddr@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_iounmap
	movq	$0, (%rbx)
	movq	_region_fail@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	je	LBB0_3
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_3:
	movq	_SCB2_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SCB2_WINDOW@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_release_mem_region             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_scb2_mtd,8,3                   ## @scb2_mtd
	.comm	_scb2_ioaddr,8,3                ## @scb2_ioaddr
	.comm	_region_fail,4,2                ## @region_fail
	.comm	_SCB2_ADDR,4,2                  ## @SCB2_ADDR
	.comm	_SCB2_WINDOW,4,2                ## @SCB2_WINDOW
	.no_dead_strip	_scb2_flash_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function scb2_flash_remove
_scb2_flash_remove:                     ; @scb2_flash_remove
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x19, _scb2_mtd@GOTPAGE
Lloh1:
	ldr	x19, [x19, _scb2_mtd@GOTPAGEOFF]
	ldr	x0, [x19]
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w2, [x0]
	mov	w1, #0
	bl	_mtd_lock
	ldr	x0, [x19]
	bl	_mtd_device_unregister
	ldr	x0, [x19]
	bl	_map_destroy
Lloh2:
	adrp	x19, _scb2_ioaddr@GOTPAGE
Lloh3:
	ldr	x19, [x19, _scb2_ioaddr@GOTPAGEOFF]
	ldr	x0, [x19]
	bl	_iounmap
	str	xzr, [x19]
Lloh4:
	adrp	x8, _region_fail@GOTPAGE
Lloh5:
	ldr	x8, [x8, _region_fail@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	cbz	w8, LBB0_3
LBB0_2:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh7:
	adrp	x8, _SCB2_ADDR@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SCB2_ADDR@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x8, _SCB2_WINDOW@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SCB2_WINDOW@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_release_mem_region
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_scb2_mtd,8,3                   ; @scb2_mtd
	.comm	_scb2_ioaddr,8,3                ; @scb2_ioaddr
	.comm	_region_fail,4,2                ; @region_fail
	.comm	_SCB2_ADDR,4,2                  ; @SCB2_ADDR
	.comm	_SCB2_WINDOW,4,2                ; @SCB2_WINDOW
	.no_dead_strip	_scb2_flash_remove
.subsections_via_symbols
