	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_device
_add_device:                            ## @add_device
	.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
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movl	%esi, %ebx
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$96, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r15
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_FMODE_READ@GOTPCREL(%rip), %r14
	movq	_FMODE_WRITE@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	orl	(%r14), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_open_bdev_exclusive
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%r12, %rdi
	callq	_name_to_dev_t
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r14), %esi
	orl	(%r13), %esi
	movq	%rax, %rdi
	callq	_open_by_devnum
	movq	%rax, %rbx
LBB0_5:
	movq	%rbx, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.6:
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_ERROR
	jmp	LBB0_7
LBB0_9:
	movq	%rbx, 80(%r15)
	movl	8(%rbx), %edi
	callq	_MAJOR
	movq	_MTD_BLOCK_MAJOR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_ERROR
	jmp	LBB0_7
LBB0_11:
	leaq	88(%r15), %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	13(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.12:
	movq	%rax, %rbx
	leaq	L_.str.2(%rip), %rsi
	movq	%rax, %rdi
	movq	%r12, %rdx
	callq	_sprintf
	movq	%rbx, (%r15)
	movq	80(%r15), %rax
	movq	(%rax), %rax
	movq	_PAGE_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movl	%ecx, 8(%r15)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 12(%r15)
	movl	$1, 16(%r15)
	movq	_MTD_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 64(%r15)
	movq	_MTD_CAP_RAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 60(%r15)
	movq	_block2mtd_erase@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 56(%r15)
	movq	_block2mtd_write@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 52(%r15)
	movq	_default_mtd_writev@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%r15)
	movq	_block2mtd_sync@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r15)
	movq	_block2mtd_read@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r15)
	movq	%r15, 32(%r15)
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%r15)
	movq	%r15, %rdi
	callq	_add_mtd_device
	testq	%rax, %rax
	je	LBB0_13
LBB0_7:
	movq	%r15, %rdi
	callq	_block2mtd_free_device
LBB0_8:
	xorl	%r15d, %r15d
LBB0_14:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r15, %rdi
	addq	$72, %rdi
	movq	_blkmtd_device_list@GOTPCREL(%rip), %rsi
	callq	_list_add
	movl	20(%r15), %r14d
	movq	(%r15), %rbx
	leaq	L_.str.4(%rip), %rdi
	callq	_strlen
	movslq	%eax, %rdx
	addq	%rbx, %rdx
	movl	12(%r15), %r8d
	movl	%r8d, %ecx
	sarl	$10, %ecx
	leaq	L_.str.3(%rip), %rdi
	movl	%r14d, %esi
	callq	_INFO
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_FMODE_READ,4,2                 ## @FMODE_READ
	.comm	_FMODE_WRITE,4,2                ## @FMODE_WRITE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error: cannot open device %s"

	.comm	_MTD_BLOCK_MAJOR,8,3            ## @MTD_BLOCK_MAJOR
L_.str.1:                               ## @.str.1
	.asciz	"attempting to use an MTD device as a block device"

L_.str.2:                               ## @.str.2
	.asciz	"block2mtd: %s"

	.comm	_PAGE_MASK,4,2                  ## @PAGE_MASK
	.comm	_MTD_RAM,4,2                    ## @MTD_RAM
	.comm	_MTD_CAP_RAM,4,2                ## @MTD_CAP_RAM
	.comm	_block2mtd_erase,4,2            ## @block2mtd_erase
	.comm	_block2mtd_write,4,2            ## @block2mtd_write
	.comm	_default_mtd_writev,4,2         ## @default_mtd_writev
	.comm	_block2mtd_sync,4,2             ## @block2mtd_sync
	.comm	_block2mtd_read,4,2             ## @block2mtd_read
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_blkmtd_device_list,4,2         ## @blkmtd_device_list
L_.str.3:                               ## @.str.3
	.asciz	"mtd%d: [%s] erase_size = %dKiB [%d]"

L_.str.4:                               ## @.str.4
	.asciz	"block2mtd: "

	.no_dead_strip	_add_device
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_device
_add_device:                            ; @add_device
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	cbz	x0, LBB0_11
; %bb.1:
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	w0, #96
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_12
; %bb.2:
Lloh2:
	adrp	x24, _FMODE_READ@GOTPAGE
Lloh3:
	ldr	x24, [x24, _FMODE_READ@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh4:
	adrp	x25, _FMODE_WRITE@GOTPAGE
Lloh5:
	ldr	x25, [x25, _FMODE_WRITE@GOTPAGEOFF]
	ldr	w9, [x25]
	orr	w1, w9, w8
	mov	x0, x21
	mov	x2, #0
	bl	_open_bdev_exclusive
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_name_to_dev_t
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w8, [x25]
	ldr	w9, [x24]
	orr	w1, w9, w8
	bl	_open_by_devnum
	mov	x22, x0
LBB0_5:
	mov	x0, x22
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	str	x21, [sp]
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_7:
	str	x22, [x19, #80]
	ldr	w0, [x22, #8]
	bl	_MAJOR
Lloh8:
	adrp	x8, _MTD_BLOCK_MAJOR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _MTD_BLOCK_MAJOR@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.8:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_9:
	bl	_ERROR
LBB0_10:
	mov	x0, x19
	bl	_block2mtd_free_device
LBB0_11:
	mov	x19, #0
LBB0_12:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_13:
	add	x0, x19, #88
	bl	_mutex_init
	mov	x0, x21
	bl	_strlen
	add	w0, w0, #13
	ldr	w1, [x23]
	bl	_kmalloc
	cbz	x0, LBB0_10
; %bb.14:
	mov	x22, x0
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x21
	bl	_sprintf
	str	x22, [x19]
	ldr	x8, [x19, #80]
	ldr	x8, [x8]
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _PAGE_MASK@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PAGE_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	and	w8, w9, w8
	stp	w8, w20, [x19, #8]
	mov	w8, #1
	str	w8, [x19, #16]
Lloh18:
	adrp	x8, _MTD_RAM@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MTD_RAM@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	str	w8, [x19, #64]
Lloh21:
	adrp	x8, _MTD_CAP_RAM@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MTD_CAP_RAM@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _block2mtd_erase@GOTPAGE
Lloh25:
	ldr	x9, [x9, _block2mtd_erase@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #56]
Lloh27:
	adrp	x8, _block2mtd_write@GOTPAGE
Lloh28:
	ldr	x8, [x8, _block2mtd_write@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
Lloh30:
	adrp	x9, _default_mtd_writev@GOTPAGE
Lloh31:
	ldr	x9, [x9, _default_mtd_writev@GOTPAGEOFF]
Lloh32:
	ldr	w9, [x9]
Lloh33:
	adrp	x10, _block2mtd_sync@GOTPAGE
Lloh34:
	ldr	x10, [x10, _block2mtd_sync@GOTPAGEOFF]
	stp	w9, w8, [x19, #48]
Lloh35:
	ldr	w8, [x10]
Lloh36:
	adrp	x9, _block2mtd_read@GOTPAGE
Lloh37:
	ldr	x9, [x9, _block2mtd_read@GOTPAGEOFF]
Lloh38:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
	str	x19, [x19, #32]
Lloh39:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	w8, [x19, #24]
	mov	x0, x19
	bl	_add_mtd_device
	cbnz	x0, LBB0_10
; %bb.15:
	add	x0, x19, #72
Lloh42:
	adrp	x1, _blkmtd_device_list@GOTPAGE
Lloh43:
	ldr	x1, [x1, _blkmtd_device_list@GOTPAGEOFF]
	bl	_list_add
	ldr	w20, [x19, #20]
	ldr	x21, [x19]
Lloh44:
	adrp	x0, l_.str.4@PAGE
Lloh45:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_strlen
	add	x2, x21, w0, sxtw
	ldr	w4, [x19, #12]
	asr	w3, w4, #10
Lloh46:
	adrp	x0, l_.str.3@PAGE
Lloh47:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_INFO
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_FMODE_READ,4,2                 ; @FMODE_READ
	.comm	_FMODE_WRITE,4,2                ; @FMODE_WRITE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error: cannot open device %s"

	.comm	_MTD_BLOCK_MAJOR,8,3            ; @MTD_BLOCK_MAJOR
l_.str.1:                               ; @.str.1
	.asciz	"attempting to use an MTD device as a block device"

l_.str.2:                               ; @.str.2
	.asciz	"block2mtd: %s"

	.comm	_PAGE_MASK,4,2                  ; @PAGE_MASK
	.comm	_MTD_RAM,4,2                    ; @MTD_RAM
	.comm	_MTD_CAP_RAM,4,2                ; @MTD_CAP_RAM
	.comm	_block2mtd_erase,4,2            ; @block2mtd_erase
	.comm	_block2mtd_write,4,2            ; @block2mtd_write
	.comm	_default_mtd_writev,4,2         ; @default_mtd_writev
	.comm	_block2mtd_sync,4,2             ; @block2mtd_sync
	.comm	_block2mtd_read,4,2             ; @block2mtd_read
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_blkmtd_device_list,4,2         ; @blkmtd_device_list
l_.str.3:                               ; @.str.3
	.asciz	"mtd%d: [%s] erase_size = %dKiB [%d]"

l_.str.4:                               ; @.str.4
	.asciz	"block2mtd: "

	.no_dead_strip	_add_device
.subsections_via_symbols
