	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ubiblock_create                ## -- Begin function ubiblock_create
	.p2align	4, 0x90
_ubiblock_create:                       ## @ubiblock_create
	.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
	movq	%rdi, %r15
	leaq	-44(%rbp), %rsi
	callq	_calc_disk_capacity
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_21
## %bb.1:
	movq	_devices_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	movl	(%r15), %edi
	movl	4(%r15), %esi
	callq	_find_dev_nolock
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_EEXIST@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_20
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	$80, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r14
	leaq	76(%rax), %rdi
	callq	_mutex_init
	movl	(%r15), %eax
	movl	%eax, (%r14)
	movl	4(%r15), %eax
	movl	%eax, 4(%r14)
	movl	12(%r15), %eax
	movl	%eax, 72(%r14)
	movl	$1, %edi
	callq	_alloc_disk
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	_ubiblock_ops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r12)
	movq	_ubiblock_major@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%r12)
	movl	(%rbx), %r8d
	movq	_ubiblock_minor_idr@GOTPCREL(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_idr_alloc
	movq	%rax, (%r12)
	testq	%rax, %rax
	js	LBB0_9
## %bb.10:
	movq	%r14, 24(%r12)
	movl	8(%r12), %edi
	movl	(%r14), %edx
	movl	4(%r14), %ecx
	leaq	L_.str.2(%rip), %rsi
	callq	_sprintf
	movl	-44(%rbp), %esi
	movq	%r12, %rdi
	callq	_set_capacity
	movq	%r12, 8(%r14)
	leaq	16(%r14), %r13
	movq	_ubiblock_mq_ops@GOTPCREL(%rip), %rax
	movq	%rax, 48(%r14)
	movl	$64, 16(%r14)
	movq	_NUMA_NO_NODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%r14)
	movq	_BLK_MQ_F_SHOULD_MERGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%r14)
	movabsq	$4294967300, %rax               ## imm = 0x100000004
	movq	%rax, 20(%r14)
	movq	%r14, 32(%r14)
	movq	%r13, %rdi
	callq	_blk_mq_alloc_tag_set
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %ebx
	movq	8(%r14), %rdi
	callq	_disk_to_dev
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	jmp	LBB0_17
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_19
LBB0_9:
	movq	%r12, %rdi
	callq	_disk_to_dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_18
LBB0_12:
	movq	%r13, %rdi
	callq	_blk_mq_init_queue
	movq	%rax, 56(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%r12, %rdi
	callq	_disk_to_dev
	leaq	L_.str.4(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_err
	movq	56(%r14), %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_16:
	movq	%r13, %rdi
	callq	_blk_mq_free_tag_set
LBB0_17:
	movq	(%r12), %rsi
	movq	_ubiblock_minor_idr@GOTPCREL(%rip), %rdi
	callq	_idr_remove
LBB0_18:
	movq	8(%r14), %rdi
	callq	_put_disk
LBB0_19:
	movq	%r14, %rdi
	callq	_kfree
LBB0_20:
	movq	_devices_mutex@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
LBB0_21:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	56(%r14), %rdi
	movq	_UBI_MAX_SG_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_blk_queue_max_segments
	movq	56(%r14), %rax
	movq	%r14, (%rax)
	movq	8(%r14), %rcx
	movq	%rax, 16(%rcx)
	movl	8(%r12), %ecx
	leaq	L_.str.5(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_alloc_workqueue
	movl	%eax, 68(%r14)
	testl	%eax, %eax
	je	LBB0_15
## %bb.22:
	movq	%r14, %rdi
	addq	$64, %rdi
	movq	_ubiblock_devices@GOTPCREL(%rip), %rsi
	callq	_list_add_tail
	movq	8(%r14), %rdi
	callq	_add_disk
	movq	8(%r14), %rdi
	callq	_disk_to_dev
	movl	(%r14), %edx
	movl	4(%r14), %ecx
	movl	8(%r15), %r8d
	leaq	L_.str.6(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_info
	jmp	LBB0_20
LBB0_15:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	56(%r14), %rdi
	callq	_blk_cleanup_queue
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_devices_mutex,4,2              ## @devices_mutex
	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"UBI: block: alloc_disk failed\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_ubiblock_ops,4,2               ## @ubiblock_ops
	.comm	_ubiblock_major,4,2             ## @ubiblock_major
	.comm	_ubiblock_minor_idr,4,2         ## @ubiblock_minor_idr
L_.str.1:                               ## @.str.1
	.asciz	"block: dynamic minor allocation failed"

L_.str.2:                               ## @.str.2
	.asciz	"ubiblock%d_%d"

	.comm	_ubiblock_mq_ops,4,2            ## @ubiblock_mq_ops
	.comm	_NUMA_NO_NODE,4,2               ## @NUMA_NO_NODE
	.comm	_BLK_MQ_F_SHOULD_MERGE,4,2      ## @BLK_MQ_F_SHOULD_MERGE
L_.str.3:                               ## @.str.3
	.asciz	"blk_mq_alloc_tag_set failed"

L_.str.4:                               ## @.str.4
	.asciz	"blk_mq_init_queue failed"

	.comm	_UBI_MAX_SG_COUNT,4,2           ## @UBI_MAX_SG_COUNT
L_.str.5:                               ## @.str.5
	.asciz	"%s"

	.comm	_ubiblock_devices,4,2           ## @ubiblock_devices
L_.str.6:                               ## @.str.6
	.asciz	"created from ubi%d:%d(%s)"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function ubiblock_create
lCPI0_0:
	.long	64                              ; 0x40
	.long	4                               ; 0x4
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_ubiblock_create
	.p2align	2
_ubiblock_create:                       ; @ubiblock_create
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x0
	add	x1, sp, #12
	bl	_calc_disk_capacity
	mov	x23, x0
	cbnz	w0, LBB0_19
; %bb.1:
Lloh0:
	adrp	x0, _devices_mutex@GOTPAGE
Lloh1:
	ldr	x0, [x0, _devices_mutex@GOTPAGEOFF]
	bl	_mutex_lock
	ldp	w0, w1, [x20]
	bl	_find_dev_nolock
	cbz	x0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, _EEXIST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
LBB0_3:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_18
LBB0_4:
Lloh4:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	w0, #80
	bl	_kzalloc
	cbz	x0, LBB0_9
; %bb.5:
	mov	x19, x0
	add	x0, x0, #76
	bl	_mutex_init
	ldr	d0, [x20]
	str	d0, [x19]
	ldr	w8, [x20, #12]
	str	w8, [x19, #72]
	mov	w0, #1
	bl	_alloc_disk
	cbz	x0, LBB0_10
; %bb.6:
	mov	x21, x0
Lloh6:
	adrp	x8, _ubiblock_ops@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ubiblock_ops@GOTPAGEOFF]
	str	x8, [x0, #40]
Lloh8:
	adrp	x8, _ubiblock_major@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ubiblock_major@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x0, #32]
	ldr	w4, [x22]
Lloh11:
	adrp	x0, _ubiblock_minor_idr@GOTPAGE
Lloh12:
	ldr	x0, [x0, _ubiblock_minor_idr@GOTPAGEOFF]
	mov	x1, x19
	mov	w2, #0
	mov	w3, #0
	bl	_idr_alloc
	str	x0, [x21]
	tbnz	x0, #63, LBB0_11
; %bb.7:
	str	x19, [x21, #24]
	ldr	w0, [x21, #8]
	ldp	w2, w3, [x19]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_sprintf
	ldr	w1, [sp, #12]
	mov	x0, x21
	bl	_set_capacity
	str	x21, [x19, #8]
Lloh15:
	adrp	x8, lCPI0_0@PAGE
Lloh16:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	mov	x22, x19
	str	d0, [x22, #16]!
Lloh17:
	adrp	x8, _ubiblock_mq_ops@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ubiblock_mq_ops@GOTPAGEOFF]
	str	x8, [x19, #48]
Lloh19:
	adrp	x8, _NUMA_NO_NODE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _NUMA_NO_NODE@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
Lloh22:
	adrp	x9, _BLK_MQ_F_SHOULD_MERGE@GOTPAGE
Lloh23:
	ldr	x9, [x9, _BLK_MQ_F_SHOULD_MERGE@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #40]
	str	x19, [x19, #32]
	mov	w8, #1
	str	w8, [x19, #24]
	mov	x0, x22
	bl	_blk_mq_alloc_tag_set
	cbz	w0, LBB0_12
; %bb.8:
	mov	x23, x0
	ldr	x0, [x19, #8]
	bl	_disk_to_dev
Lloh25:
	adrp	x1, l_.str.3@PAGE
Lloh26:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_dev_err
	b	LBB0_15
LBB0_9:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_3
LBB0_10:
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
Lloh31:
	adrp	x8, _ENODEV@GOTPAGE
Lloh32:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_17
LBB0_11:
	mov	x0, x21
	bl	_disk_to_dev
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh36:
	adrp	x8, _ENODEV@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_16
LBB0_12:
	mov	x0, x22
	bl	_blk_mq_init_queue
	str	x0, [x19, #56]
	bl	_IS_ERR
	cbz	x0, LBB0_20
; %bb.13:
	mov	x0, x21
	bl	_disk_to_dev
Lloh39:
	adrp	x1, l_.str.4@PAGE
Lloh40:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19, #56]
	bl	_PTR_ERR
	mov	x23, x0
LBB0_14:
	mov	x0, x22
	bl	_blk_mq_free_tag_set
LBB0_15:
	ldr	x1, [x21]
Lloh41:
	adrp	x0, _ubiblock_minor_idr@GOTPAGE
Lloh42:
	ldr	x0, [x0, _ubiblock_minor_idr@GOTPAGEOFF]
	bl	_idr_remove
LBB0_16:
	ldr	x0, [x19, #8]
	bl	_put_disk
LBB0_17:
	mov	x0, x19
	bl	_kfree
LBB0_18:
Lloh43:
	adrp	x0, _devices_mutex@GOTPAGE
Lloh44:
	ldr	x0, [x0, _devices_mutex@GOTPAGEOFF]
	bl	_mutex_unlock
LBB0_19:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_20:
	ldr	x0, [x19, #56]
Lloh45:
	adrp	x8, _UBI_MAX_SG_COUNT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _UBI_MAX_SG_COUNT@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
	bl	_blk_queue_max_segments
	ldr	x8, [x19, #56]
	str	x19, [x8]
	ldr	x9, [x19, #8]
	str	x8, [x9, #16]
	ldr	w3, [x21, #8]
Lloh48:
	adrp	x0, l_.str.5@PAGE
Lloh49:
	add	x0, x0, l_.str.5@PAGEOFF
	mov	w1, #0
	mov	w2, #0
	bl	_alloc_workqueue
	str	w0, [x19, #68]
	cbz	w0, LBB0_22
; %bb.21:
	add	x0, x19, #64
Lloh50:
	adrp	x1, _ubiblock_devices@GOTPAGE
Lloh51:
	ldr	x1, [x1, _ubiblock_devices@GOTPAGEOFF]
	bl	_list_add_tail
	ldr	x0, [x19, #8]
	bl	_add_disk
	ldr	x0, [x19, #8]
	bl	_disk_to_dev
	ldp	w2, w3, [x19]
	ldr	w4, [x20, #8]
Lloh52:
	adrp	x1, l_.str.6@PAGE
Lloh53:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_dev_info
	mov	w23, #0
	b	LBB0_18
LBB0_22:
Lloh54:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh55:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	neg	w23, w8
	ldr	x0, [x19, #56]
	bl	_blk_cleanup_queue
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpAdrp	Lloh15, Lloh17
	.loh AdrpLdr	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.cfi_endproc
                                        ; -- End function
	.comm	_devices_mutex,4,2              ; @devices_mutex
	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"UBI: block: alloc_disk failed\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_ubiblock_ops,4,2               ; @ubiblock_ops
	.comm	_ubiblock_major,4,2             ; @ubiblock_major
	.comm	_ubiblock_minor_idr,4,2         ; @ubiblock_minor_idr
l_.str.1:                               ; @.str.1
	.asciz	"block: dynamic minor allocation failed"

l_.str.2:                               ; @.str.2
	.asciz	"ubiblock%d_%d"

	.comm	_ubiblock_mq_ops,4,2            ; @ubiblock_mq_ops
	.comm	_NUMA_NO_NODE,4,2               ; @NUMA_NO_NODE
	.comm	_BLK_MQ_F_SHOULD_MERGE,4,2      ; @BLK_MQ_F_SHOULD_MERGE
l_.str.3:                               ; @.str.3
	.asciz	"blk_mq_alloc_tag_set failed"

l_.str.4:                               ; @.str.4
	.asciz	"blk_mq_init_queue failed"

	.comm	_UBI_MAX_SG_COUNT,4,2           ; @UBI_MAX_SG_COUNT
l_.str.5:                               ; @.str.5
	.asciz	"%s"

	.comm	_ubiblock_devices,4,2           ; @ubiblock_devices
l_.str.6:                               ; @.str.6
	.asciz	"created from ubi%d:%d(%s)"

.subsections_via_symbols
