	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function table_load
_table_load:                            ## @table_load
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r15
	movq	%rsi, %rdi
	callq	_find_device
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_get_mode
	movl	4(%r15), %edx
	leaq	-40(%rbp), %rdi
	movl	%eax, %esi
	movq	%r14, %rcx
	callq	_dm_table_create
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_14
## %bb.3:
	movq	%r14, %rdi
	callq	_dm_lock_md_type
	movq	-40(%rbp), %rdi
	movq	%r15, %rsi
	movq	%r12, %rdx
	callq	_populate_table
	movl	%eax, %ebx
	testl	%eax, %eax
	je	LBB0_4
LBB0_12:
	movq	%r14, %rdi
	callq	_dm_unlock_md_type
LBB0_13:
	movq	-40(%rbp), %rdi
	callq	_dm_table_destroy
LBB0_14:
	movq	%r14, %rdi
	callq	_dm_put
	jmp	LBB0_23
LBB0_1:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%r14, %rdi
	callq	_dm_get_immutable_target_type
	testq	%rax, %rax
	je	LBB0_9
## %bb.5:
	movq	%rax, %rbx
	movq	-40(%rbp), %rdi
	callq	_dm_table_get_immutable_target_type
	cmpq	%rax, %rbx
	je	LBB0_9
## %bb.6:
	movq	-40(%rbp), %rdi
	callq	_dm_table_get_wildcard_target
	testl	%eax, %eax
	je	LBB0_7
LBB0_9:
	movq	%r14, %rdi
	callq	_dm_get_md_type
	movq	_DM_TYPE_NONE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.10:
	movq	-40(%rbp), %rdi
	callq	_dm_table_get_type
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_dm_set_md_type
	movq	-40(%rbp), %rsi
	movq	%r14, %rdi
	callq	_dm_setup_md_queue
	testl	%eax, %eax
	je	LBB0_17
## %bb.11:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_DMWARN
	jmp	LBB0_12
LBB0_15:
	movq	%r14, %rdi
	callq	_dm_get_md_type
	movq	%rax, %rbx
	movq	-40(%rbp), %rdi
	callq	_dm_table_get_type
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_is_valid_type
	testl	%eax, %eax
	je	LBB0_16
LBB0_17:
	movq	%r14, %rdi
	callq	_dm_unlock_md_type
	movq	__hash_lock@GOTPCREL(%rip), %rdi
	callq	_down_write
	movq	%r14, %rdi
	callq	_dm_get_mdptr
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	cmpq	%r14, 8(%rax)
	je	LBB0_20
LBB0_19:
	leaq	L_.str.3(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DMWARN
	movq	__hash_lock@GOTPCREL(%rip), %rdi
	callq	_up_write
	movq	_ENXIO@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_16:
	movq	%r14, %rdi
	callq	_dm_get_md_type
	movq	%rax, %r15
	movq	-40(%rbp), %rdi
	callq	_dm_table_get_type
	leaq	L_.str.2(%rip), %rdi
	xorl	%ebx, %ebx
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_DMWARN
	jmp	LBB0_8
LBB0_7:
	movl	(%rbx), %esi
	leaq	L_.str(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_DMWARN
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_12
LBB0_20:
	movq	(%rax), %rbx
	movq	-40(%rbp), %rcx
	movq	%rcx, (%rax)
	movq	__hash_lock@GOTPCREL(%rip), %rdi
	callq	_up_write
	movq	_DM_INACTIVE_PRESENT_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	___dev_status
	testq	%rbx, %rbx
	je	LBB0_22
## %bb.21:
	movq	%r14, %rdi
	callq	_dm_sync_table
	movq	%rbx, %rdi
	callq	_dm_table_destroy
LBB0_22:
	movq	%r14, %rdi
	callq	_dm_put
	xorl	%ebx, %ebx
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_ENXIO,4,2                      ## @ENXIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't replace immutable target type %s"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_DM_TYPE_NONE,8,3               ## @DM_TYPE_NONE
L_.str.1:                               ## @.str.1
	.asciz	"unable to set up device queue for new table."

L_.str.2:                               ## @.str.2
	.asciz	"can't change device type (old=%u vs new=%u) after initial table load."

	.comm	__hash_lock,4,2                 ## @_hash_lock
L_.str.3:                               ## @.str.3
	.asciz	"device has been removed from the dev hash table."

	.comm	_DM_INACTIVE_PRESENT_FLAG,4,2   ## @DM_INACTIVE_PRESENT_FLAG
	.no_dead_strip	_table_load
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function table_load
_table_load:                            ; @table_load
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x22, x2
	mov	x20, x1
	mov	x0, x1
	bl	_find_device
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	bl	_get_mode
	mov	x1, x0
	ldr	w2, [x20, #4]
	add	x0, sp, #24
	mov	x3, x19
	bl	_dm_table_create
	mov	x21, x0
	cbnz	w0, LBB0_5
; %bb.2:
	mov	x0, x19
	bl	_dm_lock_md_type
	ldr	x0, [sp, #24]
	mov	x1, x20
	mov	x2, x22
	bl	_populate_table
	mov	x21, x0
	cbz	w0, LBB0_8
LBB0_3:
	mov	x0, x19
	bl	_dm_unlock_md_type
LBB0_4:
	ldr	x0, [sp, #24]
	bl	_dm_table_destroy
LBB0_5:
	mov	x0, x19
	bl	_dm_put
	b	LBB0_7
LBB0_6:
Lloh0:
	adrp	x8, _ENXIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_7:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_8:
	mov	x0, x19
	bl	_dm_get_immutable_target_type
	cbz	x0, LBB0_11
; %bb.9:
	mov	x21, x0
	ldr	x0, [sp, #24]
	bl	_dm_table_get_immutable_target_type
	cmp	x21, x0
	b.eq	LBB0_11
; %bb.10:
	ldr	x0, [sp, #24]
	bl	_dm_table_get_wildcard_target
	cbz	w0, LBB0_19
LBB0_11:
	mov	x0, x19
	bl	_dm_get_md_type
Lloh3:
	adrp	x8, _DM_TYPE_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DM_TYPE_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.12:
	ldr	x0, [sp, #24]
	bl	_dm_table_get_type
	mov	x1, x0
	mov	x0, x19
	bl	_dm_set_md_type
	ldr	x1, [sp, #24]
	mov	x0, x19
	bl	_dm_setup_md_queue
	cbz	w0, LBB0_15
; %bb.13:
	mov	x21, x0
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DMWARN
	b	LBB0_3
LBB0_14:
	mov	x0, x19
	bl	_dm_get_md_type
	mov	x21, x0
	ldr	x0, [sp, #24]
	bl	_dm_table_get_type
	mov	x1, x0
	mov	x0, x21
	bl	_is_valid_type
	cbz	w0, LBB0_18
LBB0_15:
	mov	x0, x19
	bl	_dm_unlock_md_type
Lloh8:
	adrp	x0, __hash_lock@GOTPAGE
Lloh9:
	ldr	x0, [x0, __hash_lock@GOTPAGEOFF]
	bl	_down_write
	mov	x0, x19
	bl	_dm_get_mdptr
	cbz	x0, LBB0_17
; %bb.16:
	ldr	x8, [x0, #8]
	cmp	x8, x19
	b.eq	LBB0_21
LBB0_17:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DMWARN
Lloh12:
	adrp	x0, __hash_lock@GOTPAGE
Lloh13:
	ldr	x0, [x0, __hash_lock@GOTPAGEOFF]
	bl	_up_write
Lloh14:
	adrp	x8, _ENXIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_4
LBB0_18:
	mov	x0, x19
	bl	_dm_get_md_type
	mov	x20, x0
	ldr	x0, [sp, #24]
	bl	_dm_table_get_type
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x20, x0, [sp]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_19:
	ldr	w8, [x21]
	str	x8, [sp]
Lloh19:
	adrp	x0, l_.str@PAGE
Lloh20:
	add	x0, x0, l_.str@PAGEOFF
LBB0_20:
	bl	_DMWARN
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_3
LBB0_21:
	ldr	x21, [x0]
	ldr	x8, [sp, #24]
	str	x8, [x0]
Lloh24:
	adrp	x0, __hash_lock@GOTPAGE
Lloh25:
	ldr	x0, [x0, __hash_lock@GOTPAGEOFF]
	bl	_up_write
Lloh26:
	adrp	x8, _DM_INACTIVE_PRESENT_FLAG@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DM_INACTIVE_PRESENT_FLAG@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	ldr	w9, [x20]
	orr	w8, w9, w8
	str	w8, [x20]
	mov	x0, x19
	mov	x1, x20
	bl	___dev_status
	cbz	x21, LBB0_23
; %bb.22:
	mov	x0, x19
	bl	_dm_sync_table
	mov	x0, x21
	bl	_dm_table_destroy
LBB0_23:
	mov	x0, x19
	bl	_dm_put
	mov	w21, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_ENXIO,4,2                      ; @ENXIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't replace immutable target type %s"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_DM_TYPE_NONE,8,3               ; @DM_TYPE_NONE
l_.str.1:                               ; @.str.1
	.asciz	"unable to set up device queue for new table."

l_.str.2:                               ; @.str.2
	.asciz	"can't change device type (old=%u vs new=%u) after initial table load."

	.comm	__hash_lock,4,2                 ; @_hash_lock
l_.str.3:                               ; @.str.3
	.asciz	"device has been removed from the dev hash table."

	.comm	_DM_INACTIVE_PRESENT_FLAG,4,2   ; @DM_INACTIVE_PRESENT_FLAG
	.no_dead_strip	_table_load
.subsections_via_symbols
