	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function physmap_flash_remove
_physmap_flash_remove:                  ## @physmap_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	callq	_platform_get_drvdata
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %r15
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_5
## %bb.2:
	callq	_mtd_device_unregister
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movq	(%r15), %rdi
	movq	8(%r15), %rax
	cmpq	(%rax), %rdi
	je	LBB0_5
## %bb.4:
	callq	_mtd_concat_destroy
LBB0_5:
	movl	16(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_10
## %bb.6:
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_10
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	callq	_map_destroy
	movl	16(%r15), %eax
	jmp	LBB0_9
LBB0_10:
	movq	%r14, %rdi
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_13
## %bb.12:
	movq	%r14, %rdi
	callq	*%rcx
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_physmap_flash_remove
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function physmap_flash_remove
_physmap_flash_remove:                  ; @physmap_flash_remove
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_platform_get_drvdata
	cbz	x0, LBB0_14
; %bb.1:
	mov	x20, x0
	ldr	x0, [x0]
	cbz	x0, LBB0_5
; %bb.2:
	bl	_mtd_device_unregister
	cbnz	w0, LBB0_14
; %bb.3:
	ldp	x0, x8, [x20]
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.4:
	bl	_mtd_concat_destroy
LBB0_5:
	ldr	w8, [x20, #16]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.6:
	mov	x21, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, sxtw
	b.ge	LBB0_10
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x20, #8]
	ldr	x0, [x9, x21, lsl #3]
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	bl	_map_destroy
	ldr	w8, [x20, #16]
	b	LBB0_7
LBB0_10:
	mov	x0, x19
	bl	_dev_get_platdata
	cbz	x0, LBB0_14
; %bb.11:
	ldr	x8, [x0]
	cbz	x8, LBB0_13
; %bb.12:
	mov	x0, x19
	blr	x8
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_physmap_flash_remove
.subsections_via_symbols
