	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function userdisk_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_userdisk_init:                         ## @userdisk_init
	.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	_userboot_disk_maxunit@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_userdisk_maxunit@GOTPCREL(%rip), %r12
	movl	%edi, (%r12)
	testl	%edi, %edi
	jle	LBB0_7
## %bb.1:
	shll	$5, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_malloc
	movq	_ud_info@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movl	(%r12), %edi
	testl	%edi, %edi
	jle	LBB0_7
## %bb.3:
	xorl	%r14d, %r14d
	movq	_diskioctl@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movq	_DIOCGSECTORSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	leaq	-48(%rbp), %rcx
	callq	_CALLBACK
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %edi
	movq	_DIOCGMEDIASIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %esi
	leaq	-56(%rbp), %rcx
	callq	_CALLBACK
	testq	%rax, %rax
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	-56(%rbp), %rax
	movq	(%r13), %rcx
	movq	%rax, 24(%rcx,%r14)
	movq	-48(%rbp), %rax
	movq	(%r13), %rcx
	movq	%rax, 16(%rcx,%r14)
	movq	(%r13), %rax
	incq	%rbx
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rax,%r14)
	movslq	(%r12), %rdi
	addq	$32, %r14
	cmpq	%rdi, %rbx
	jl	LBB0_4
LBB0_7:
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_bcache_add_dev
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	movq	_ENXIO@GOTPCREL(%rip), %rax
LBB0_10:
	movl	(%rax), %eax
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_userboot_disk_maxunit,4,2      ## @userboot_disk_maxunit
	.comm	_userdisk_maxunit,4,2           ## @userdisk_maxunit
	.comm	_ud_info,8,3                    ## @ud_info
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_diskioctl,4,2                  ## @diskioctl
	.comm	_DIOCGSECTORSIZE,4,2            ## @DIOCGSECTORSIZE
	.comm	_DIOCGMEDIASIZE,4,2             ## @DIOCGMEDIASIZE
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_userdisk_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function userdisk_init
_userdisk_init:                         ; @userdisk_init
	.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
Lloh0:
	adrp	x8, _userboot_disk_maxunit@GOTPAGE
Lloh1:
	ldr	x8, [x8, _userboot_disk_maxunit@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x20, _userdisk_maxunit@GOTPAGE
Lloh4:
	ldr	x20, [x20, _userdisk_maxunit@GOTPAGEOFF]
	str	w0, [x20]
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.1:
	lsl	w0, w0, #5
	bl	_malloc
Lloh5:
	adrp	x21, _ud_info@GOTPAGE
Lloh6:
	ldr	x21, [x21, _ud_info@GOTPAGEOFF]
	str	x0, [x21]
	cbz	x0, LBB0_8
; %bb.2:
	ldr	w0, [x20]
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x22, #0
	mov	x19, #0
Lloh7:
	adrp	x23, _diskioctl@GOTPAGE
Lloh8:
	ldr	x23, [x23, _diskioctl@GOTPAGEOFF]
Lloh9:
	adrp	x24, _DIOCGSECTORSIZE@GOTPAGE
Lloh10:
	ldr	x24, [x24, _DIOCGSECTORSIZE@GOTPAGEOFF]
Lloh11:
	adrp	x25, _DIOCGMEDIASIZE@GOTPAGE
Lloh12:
	ldr	x25, [x25, _DIOCGMEDIASIZE@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	ldr	w2, [x24]
	mov	x3, sp
	mov	x1, x19
	bl	_CALLBACK
	cbnz	x0, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x23]
	ldr	w2, [x25]
	add	x3, sp, #8
	mov	x1, x19
	bl	_CALLBACK
	cbnz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [sp, #8]
	ldr	x9, [x21]
	add	x9, x9, x22
	str	x8, [x9, #24]
	ldr	x8, [sp]
	ldr	x9, [x21]
	add	x9, x9, x22
	str	x8, [x9, #16]
	ldr	x8, [x21]
	add	x19, x19, #1
	add	x8, x8, x22
	stp	xzr, xzr, [x8]
	ldrsw	x0, [x20]
	add	x22, x22, #32
	cmp	x19, x0
	b.lt	LBB0_4
LBB0_7:
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_bcache_add_dev
	mov	w0, #0
	b	LBB0_11
LBB0_8:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_9:
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
LBB0_11:
	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
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_userboot_disk_maxunit,4,2      ; @userboot_disk_maxunit
	.comm	_userdisk_maxunit,4,2           ; @userdisk_maxunit
	.comm	_ud_info,8,3                    ; @ud_info
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_diskioctl,4,2                  ; @diskioctl
	.comm	_DIOCGSECTORSIZE,4,2            ; @DIOCGSECTORSIZE
	.comm	_DIOCGMEDIASIZE,4,2             ; @DIOCGMEDIASIZE
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_userdisk_init
.subsections_via_symbols
