	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_device_parse_register      ## -- Begin function mtd_device_parse_register
	.p2align	4, 0x90
_mtd_device_parse_register:             ## @mtd_device_parse_register
	.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	%r8d, %r15d
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_mtd_set_dev_defaults
	movq	_CONFIG_MTD_PARTITIONED_MASTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_IS_ENABLED
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_add_mtd_device
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_15
LBB0_2:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_parse_mtd_partitions
	testl	%eax, %eax
	jle	LBB0_3
LBB0_8:
	xorl	%r14d, %r14d
	cmpq	$0, 16(%rbx)
	movl	$0, %edi
	je	LBB0_10
## %bb.9:
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	setne	%dil
LBB0_10:
	leaq	L_.str(%rip), %rsi
	callq	_WARN_ONCE
	cmpq	$0, 16(%rbx)
	je	LBB0_15
## %bb.11:
	cmpq	$0, 8(%rbx)
	jne	LBB0_15
## %bb.12:
	addq	$8, %rbx
	movq	_mtd_reboot_notifier@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	%rbx, %rdi
	callq	_register_reboot_notifier
	jmp	LBB0_15
LBB0_3:
	movq	%rbx, %rdi
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.4:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movl	%r15d, %edx
	callq	_add_mtd_partitions
LBB0_7:
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_8
## %bb.13:
	movq	%rbx, %rdi
	callq	_device_is_registered
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:
	movq	%rbx, %rdi
	callq	_del_mtd_device
LBB0_15:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	_device_is_registered
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	%rbx, %rdi
	callq	_add_mtd_device
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_MTD_PARTITIONED_MASTER,4,2 ## @CONFIG_MTD_PARTITIONED_MASTER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"MTD already registered\n"

	.comm	_mtd_reboot_notifier,8,3        ## @mtd_reboot_notifier
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mtd_device_parse_register      ; -- Begin function mtd_device_parse_register
	.p2align	2
_mtd_device_parse_register:             ; @mtd_device_parse_register
	.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, x4
	mov	x21, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	bl	_mtd_set_dev_defaults
Lloh0:
	adrp	x8, _CONFIG_MTD_PARTITIONED_MASTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CONFIG_MTD_PARTITIONED_MASTER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_IS_ENABLED
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_add_mtd_device
	mov	x22, x0
	cbnz	w0, LBB0_14
LBB0_2:
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_parse_mtd_partitions
	cmp	w0, #0
	b.le	LBB0_5
LBB0_3:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_9
; %bb.4:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, ne
	b	LBB0_10
LBB0_5:
	mov	x0, x19
	cbz	w20, LBB0_15
; %bb.6:
	mov	x1, x21
	mov	x2, x20
	bl	_add_mtd_partitions
	mov	x22, x0
	cbz	w0, LBB0_3
LBB0_7:
	mov	x0, x19
	bl	_device_is_registered
	cbz	x0, LBB0_14
; %bb.8:
	mov	x0, x19
	bl	_del_mtd_device
	b	LBB0_14
LBB0_9:
	mov	w0, #0
LBB0_10:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_WARN_ONCE
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_13
; %bb.11:
	ldr	x8, [x19, #8]!
	cbnz	x8, LBB0_13
; %bb.12:
Lloh5:
	adrp	x8, _mtd_reboot_notifier@GOTPAGE
Lloh6:
	ldr	x8, [x8, _mtd_reboot_notifier@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	str	x8, [x19]
	mov	x0, x19
	bl	_register_reboot_notifier
LBB0_13:
	mov	w22, #0
LBB0_14:
	mov	x0, x22
	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_15:
	bl	_device_is_registered
	cbnz	x0, LBB0_3
; %bb.16:
	mov	x0, x19
	bl	_add_mtd_device
	mov	x22, x0
	cbnz	w0, LBB0_7
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_MTD_PARTITIONED_MASTER,4,2 ; @CONFIG_MTD_PARTITIONED_MASTER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"MTD already registered\n"

	.comm	_mtd_reboot_notifier,8,3        ; @mtd_reboot_notifier
.subsections_via_symbols
