	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_add_volume                 ## -- Begin function ubi_add_volume
	.p2align	4, 0x90
_ubi_add_volume:                        ## @ubi_add_volume
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	(%rsi), %r15d
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_dbg_gen
	leaq	4(%r12), %rbx
	movq	_ubi_vol_cdev_operations@GOTPCREL(%rip), %rsi
	movq	%rbx, %rdi
	callq	_cdev_init
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%r12)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movl	8(%r14), %edi
	callq	_MAJOR
	movl	(%r12), %esi
	incl	%esi
	movl	%eax, %edi
	callq	_MKDEV
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	%eax, %esi
	movl	$1, %edx
	callq	_cdev_add
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_ubi_err
	jmp	LBB0_8
LBB0_2:
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	_vol_release@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leaq	8(%r12), %r13
	movl	%eax, 24(%r12)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	leaq	4(%r15), %rax
	movq	%rax, 16(%r12)
	movl	%r14d, 12(%r12)
	movq	_ubi_class@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movl	(%r15), %edx
	movl	(%r12), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_set_name
	movq	%r13, %rdi
	callq	_device_register
	testl	%eax, %eax
	je	LBB0_3
## %bb.7:
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_cdev_del
	jmp	LBB0_8
LBB0_3:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_volume_sysfs_init
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_cdev_del
	movq	%r12, %rdi
	callq	_volume_sysfs_close
	jmp	LBB0_8
LBB0_5:
	movq	%r15, %rdi
	callq	_paranoid_check_volumes
	xorl	%r13d, %r13d
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	leaq	L_.str.3(%rip), %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_dbg_err
LBB0_8:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"add volume %d"

	.comm	_ubi_vol_cdev_operations,4,2    ## @ubi_vol_cdev_operations
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
L_.str.1:                               ## @.str.1
	.asciz	"cannot add character device for volume %d, error %d"

	.comm	_vol_release,4,2                ## @vol_release
	.comm	_ubi_class,4,2                  ## @ubi_class
L_.str.2:                               ## @.str.2
	.asciz	"%s_%d"

L_.str.3:                               ## @.str.3
	.asciz	"check failed while adding volume %d"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubi_add_volume                 ; -- Begin function ubi_add_volume
	.p2align	2
_ubi_add_volume:                        ; @ubi_add_volume
	.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, x1
	mov	x21, x0
	ldr	w19, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_dbg_gen
	add	x22, x20, #4
Lloh2:
	adrp	x1, _ubi_vol_cdev_operations@GOTPAGE
Lloh3:
	ldr	x1, [x1, _ubi_vol_cdev_operations@GOTPAGEOFF]
	mov	x0, x22
	bl	_cdev_init
Lloh4:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	str	w8, [x20, #4]
	ldr	w0, [x21, #8]
	bl	_MAJOR
	ldr	w8, [x20]
	add	w1, w8, #1
	bl	_MKDEV
	mov	x24, x0
	mov	x0, x22
	mov	x1, x24
	mov	w2, #1
	bl	_cdev_add
	cbz	w0, LBB0_2
; %bb.1:
	mov	x23, x0
Lloh7:
	adrp	x0, l_.str.1@PAGE
Lloh8:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	mov	x2, x23
	bl	_ubi_err
	b	LBB0_9
LBB0_2:
Lloh9:
	adrp	x8, _vol_release@GOTPAGE
Lloh10:
	ldr	x8, [x8, _vol_release@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x20, #24]
	mov	x8, x21
	ldr	w2, [x8], #4
	str	x8, [x20, #16]
Lloh12:
	adrp	x8, _ubi_class@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ubi_class@GOTPAGEOFF]
	str	w24, [x20, #12]
Lloh14:
	ldr	w8, [x8]
	mov	x23, x20
	str	w8, [x23, #8]!
	ldr	w3, [x20]
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x23
	bl	_dev_set_name
	mov	x0, x23
	bl	_device_register
	cbz	w0, LBB0_4
; %bb.3:
	mov	x23, x0
	mov	x0, x22
	bl	_cdev_del
	b	LBB0_9
LBB0_4:
	mov	x0, x21
	mov	x1, x20
	bl	_volume_sysfs_init
	cbz	w0, LBB0_6
; %bb.5:
	mov	x23, x0
	mov	x0, x22
	bl	_cdev_del
	mov	x0, x20
	bl	_volume_sysfs_close
	b	LBB0_9
LBB0_6:
	mov	x0, x21
	bl	_paranoid_check_volumes
	cbz	x0, LBB0_8
; %bb.7:
Lloh17:
	adrp	x0, l_.str.3@PAGE
Lloh18:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x19
	bl	_dbg_err
LBB0_8:
	mov	w23, #0
LBB0_9:
	mov	x0, x23
	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
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"add volume %d"

	.comm	_ubi_vol_cdev_operations,4,2    ; @ubi_vol_cdev_operations
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
l_.str.1:                               ; @.str.1
	.asciz	"cannot add character device for volume %d, error %d"

	.comm	_vol_release,4,2                ; @vol_release
	.comm	_ubi_class,4,2                  ; @ubi_class
l_.str.2:                               ; @.str.2
	.asciz	"%s_%d"

l_.str.3:                               ; @.str.3
	.asciz	"check failed while adding volume %d"

.subsections_via_symbols
