	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_register_blkdev                ## -- Begin function register_blkdev
	.p2align	4, 0x90
_register_blkdev:                       ## @register_blkdev
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_block_class_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_lock
	xorl	%r15d, %r15d
	testl	%ebx, %ebx
	jne	LBB0_7
## %bb.1:
	movq	_major_names@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_ARRAY_SIZE
	movq	(%rbx), %rcx
	movl	%eax, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2, %ebx
	jl	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	-1(%rbx), %r15
	cmpq	$0, -8(%rcx,%rbx,8)
	movq	%r15, %rbx
	jne	LBB0_2
## %bb.4:
	movl	%r15d, %ebx
	jmp	LBB0_7
LBB0_5:
	cmpl	$1, %ebx
	jne	LBB0_6
## %bb.9:
	leaq	L_.str(%rip), %rdi
	xorl	%r15d, %r15d
	movq	%r14, %rsi
	xorl	%eax, %eax
	callq	_printk
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_19
LBB0_6:
	decq	%rbx
	movl	%ebx, %r15d
LBB0_7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.10:
	movq	%rax, %r12
	movl	%ebx, (%rax)
	movl	16(%rax), %edi
	movq	%r14, %rsi
	movl	$4, %edx
	callq	_strlcpy
	movq	$0, 8(%r12)
	movl	%ebx, %edi
	callq	_major_to_index
	movq	_major_names@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cltq
	movq	(%rdx,%rax,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_11
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ebx, (%rcx)
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rcx, %rax
	movq	8(%rcx), %rcx
	testq	%rcx, %rcx
	jne	LBB0_13
## %bb.15:
	addq	$8, %rax
	jmp	LBB0_16
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_19
LBB0_11:
	leaq	(%rdx,%rax,8), %rax
LBB0_16:
	movq	%r12, (%rax)
	testl	%r15d, %r15d
	jns	LBB0_19
LBB0_18:
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_printk
	movq	%r12, %rdi
	callq	_kfree
LBB0_19:
	movq	_block_class_lock@GOTPCREL(%rip), %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	testl	%r15d, %r15d
	jns	LBB0_19
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_block_class_lock,4,2           ## @block_class_lock
	.comm	_major_names,8,3                ## @major_names
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"register_blkdev: failed to get major for %s\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"register_blkdev: cannot get major %d for %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_register_blkdev                ; -- Begin function register_blkdev
	.p2align	2
_register_blkdev:                       ; @register_blkdev
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x0, _block_class_lock@GOTPAGE
Lloh1:
	ldr	x0, [x0, _block_class_lock@GOTPAGEOFF]
	bl	_mutex_lock
	cbz	w20, LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_7
LBB0_2:
Lloh2:
	adrp	x20, _major_names@GOTPAGE
Lloh3:
	ldr	x20, [x20, _major_names@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	ldr	x8, [x20]
	sub	w20, w0, #1
	add	x8, x8, w0, uxtw #3
	sub	x8, x8, #8
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w9, w20, #1
	cmp	w9, #2
	b.lt	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x9, [x8], #-8
	sub	w20, w20, #1
	cbnz	x9, LBB0_3
; %bb.5:
	add	w20, w20, #1
	mov	x21, x20
	b	LBB0_7
LBB0_6:
	mov	x21, x20
	cbz	w20, LBB0_18
LBB0_7:
Lloh4:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kmalloc
	cbz	x0, LBB0_13
; %bb.8:
	mov	x22, x0
	str	w20, [x0]
	ldr	w0, [x0, #16]
	mov	x1, x19
	mov	w2, #4
	bl	_strlcpy
	str	xzr, [x22, #8]
	mov	x0, x20
	bl	_major_to_index
Lloh7:
	adrp	x8, _major_names@GOTPAGE
Lloh8:
	ldr	x8, [x8, _major_names@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	add	x8, x8, w0, sxtw #3
	ldr	x9, [x8]
	cbz	x9, LBB0_12
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x8, x9
	ldr	w9, [x9]
	cmp	w9, w20
	b.eq	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x9, [x8, #8]
	cbnz	x9, LBB0_9
; %bb.11:
	add	x8, x8, #8
LBB0_12:
	str	x22, [x8]
	tbz	w21, #31, LBB0_17
	b	LBB0_16
LBB0_13:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_14:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_17
LBB0_15:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w21, w8
	tbz	w21, #31, LBB0_17
LBB0_16:
	stp	x20, x19, [sp]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_printk
	mov	x0, x22
	bl	_kfree
LBB0_17:
Lloh17:
	adrp	x0, _block_class_lock@GOTPAGE
Lloh18:
	ldr	x0, [x0, _block_class_lock@GOTPAGEOFF]
	bl	_mutex_unlock
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_18:
	str	x19, [sp]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printk
Lloh21:
	adrp	x8, _EBUSY@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_block_class_lock,4,2           ; @block_class_lock
	.comm	_major_names,8,3                ; @major_names
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"register_blkdev: failed to get major for %s\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"register_blkdev: cannot get major %d for %s\n"

.subsections_via_symbols
