	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ubd_disk_register
_ubd_disk_register:                     ## @ubd_disk_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
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movl	%edx, %r15d
	movl	%esi, %r13d
	movl	%edi, %r12d
	movq	_UBD_SHIFT@GOTPCREL(%rip), %rbx
	movb	(%rbx), %cl
	movl	$1, %edi
	shll	%cl, %edi
	callq	_alloc_disk
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movl	%r12d, (%rax)
	movb	(%rbx), %cl
	movl	%r15d, %eax
	shll	%cl, %eax
	movl	%eax, 4(%r14)
	movq	_ubd_blops@GOTPCREL(%rip), %rax
	movq	%rax, 40(%r14)
	leal	511(%r13), %esi
	testl	%r13d, %r13d
	cmovnsl	%r13d, %esi
	sarl	$9, %esi
	movq	%r14, %rdi
	callq	_set_capacity
	movq	_UBD_MAJOR@GOTPCREL(%rip), %rbx
	movl	32(%r14), %edi
	cmpl	%r12d, (%rbx)
	jne	LBB0_4
## %bb.3:
	leal	97(%r15), %edx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edx
LBB0_5:
	callq	_sprintf
	movq	_ubd_devs@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rax
	movslq	%r15d, %r13
	cmpl	%r12d, (%rbx)
	jne	LBB0_7
## %bb.6:
	movq	%r13, %rbx
	shlq	$4, %rbx
	leaq	(%rax,%rbx), %rsi
	movl	%r15d, 4(%rax,%rbx)
	movq	%rcx, %r15
	movq	_DRIVER_NAME@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 12(%rax,%rbx)
	movq	_ubd_device_release@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leaq	(%rax,%rbx), %rdi
	addq	$8, %rdi
	movl	%ecx, 8(%rax,%rbx)
	callq	_dev_set_drvdata
	movq	(%r15), %rax
	leaq	(%rax,%rbx), %rdi
	addq	$4, %rdi
	callq	_platform_device_register
	movq	(%r15), %rax
	leaq	(%rax,%rbx), %rcx
	addq	$8, %rcx
	movq	%rcx, 24(%r14)
LBB0_7:
	shlq	$4, %r13
	leaq	(%rax,%r13), %rcx
	movq	%rcx, 16(%r14)
	movl	(%rax,%r13), %eax
	movl	%eax, 8(%r14)
	movq	%r14, %rdi
	callq	_add_disk
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r14, (%rax)
	xorl	%eax, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UBD_SHIFT,4,2                  ## @UBD_SHIFT
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ubd_blops,4,2                  ## @ubd_blops
	.comm	_UBD_MAJOR,4,2                  ## @UBD_MAJOR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ubd%c"

L_.str.1:                               ## @.str.1
	.asciz	"ubd_fake%d"

	.comm	_ubd_devs,8,3                   ## @ubd_devs
	.comm	_DRIVER_NAME,4,2                ## @DRIVER_NAME
	.comm	_ubd_device_release,4,2         ## @ubd_device_release
	.no_dead_strip	_ubd_disk_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ubd_disk_register
_ubd_disk_register:                     ; @ubd_disk_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	x19, x3
	mov	x21, x2
	mov	x23, x1
	mov	x22, x0
Lloh0:
	adrp	x24, _UBD_SHIFT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _UBD_SHIFT@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	w9, #1
	lsl	w0, w9, w8
	bl	_alloc_disk
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	str	w22, [x0]
	ldr	w8, [x24]
	lsl	w8, w21, w8
Lloh2:
	adrp	x9, _ubd_blops@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ubd_blops@GOTPAGEOFF]
	str	w8, [x0, #4]
	str	x9, [x0, #40]
	add	w8, w23, #511
	cmp	w23, #0
	csel	w8, w8, w23, lt
	asr	w1, w8, #9
	bl	_set_capacity
Lloh4:
	adrp	x23, _UBD_MAJOR@GOTPAGE
Lloh5:
	ldr	x23, [x23, _UBD_MAJOR@GOTPAGEOFF]
	ldr	w8, [x23]
	ldr	w0, [x20, #32]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.2:
	add	w2, w21, #97
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_5
LBB0_3:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
LBB0_5:
	bl	_sprintf
	ldr	w9, [x23]
Lloh13:
	adrp	x24, _ubd_devs@GOTPAGE
Lloh14:
	ldr	x24, [x24, _ubd_devs@GOTPAGEOFF]
	ldr	x8, [x24]
	sxtw	x23, w21
	cmp	w9, w22
	b.ne	LBB0_7
; %bb.6:
	lsl	x22, x23, #4
	add	x1, x8, x22
	str	w21, [x1, #4]
Lloh15:
	adrp	x8, _DRIVER_NAME@GOTPAGE
Lloh16:
	ldr	x8, [x8, _DRIVER_NAME@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	str	w8, [x1, #12]
Lloh18:
	adrp	x8, _ubd_device_release@GOTPAGE
Lloh19:
	ldr	x8, [x8, _ubd_device_release@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mov	x0, x1
	str	w8, [x0, #8]!
	bl	_dev_set_drvdata
	ldr	x8, [x24]
	add	x8, x8, x22
	add	x0, x8, #4
	bl	_platform_device_register
	ldr	x8, [x24]
	add	x9, x8, x22
	add	x9, x9, #8
	str	x9, [x20, #24]
LBB0_7:
	add	x8, x8, x23, lsl #4
	str	x8, [x20, #16]
	ldr	w8, [x8]
	str	w8, [x20, #8]
	mov	x0, x20
	bl	_add_disk
	mov	w0, #0
	str	x20, [x19]
LBB0_8:
	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 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 AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_UBD_SHIFT,4,2                  ; @UBD_SHIFT
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ubd_blops,4,2                  ; @ubd_blops
	.comm	_UBD_MAJOR,4,2                  ; @UBD_MAJOR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ubd%c"

l_.str.1:                               ; @.str.1
	.asciz	"ubd_fake%d"

	.comm	_ubd_devs,8,3                   ; @ubd_devs
	.comm	_DRIVER_NAME,4,2                ; @DRIVER_NAME
	.comm	_ubd_device_release,4,2         ; @ubd_device_release
	.no_dead_strip	_ubd_disk_register
.subsections_via_symbols
