	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dm_get_device                  ## -- Begin function dm_get_device
	.p2align	4, 0x90
_dm_get_device:                         ## @dm_get_device
	.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, %r12
	movl	%edx, %r15d
	movq	%rsi, %rbx
	movq	(%rdi), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_BUG_ON
	movq	%rbx, %rdi
	callq	_dm_get_dev_t
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movl	%eax, %ebx
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	leaq	4(%r14), %r12
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_find_device
	testq	%rax, %rax
	je	LBB0_4
## %bb.9:
	movq	%rax, %r13
	movq	(%rax), %rax
	movl	(%rax), %eax
	notl	%eax
	testl	%r15d, %eax
	je	LBB0_11
## %bb.10:
	movl	(%r14), %edx
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_upgrade_mode
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
LBB0_11:
	movq	%r13, %rdi
	addq	$8, %rdi
	callq	_refcount_inc
LBB0_12:
	movq	(%r13), %rax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$16, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r13
	movl	(%r14), %edi
	movl	%ebx, %esi
	movl	%r15d, %edx
	movq	%rax, %rcx
	callq	_dm_get_table_device
	testl	%eax, %eax
	je	LBB0_8
## %bb.7:
	movl	%eax, %ebx
	movq	%r13, %rdi
	callq	_kfree
	jmp	LBB0_13
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_8:
	leaq	8(%r13), %rdi
	movl	$1, %esi
	callq	_refcount_set
	movq	%r13, %rdi
	addq	$12, %rdi
	movq	%r12, %rsi
	callq	_list_add
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dm_get_device                  ; -- Begin function dm_get_device
	.p2align	2
_dm_get_device:                         ; @dm_get_device
	.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	x20, x1
	ldr	x24, [x0]
	cmp	x24, #0
	cset	w0, eq
	bl	_BUG_ON
	mov	x0, x20
	bl	_dm_get_dev_t
	cbz	w0, LBB0_6
; %bb.1:
	mov	x23, x0
	add	x22, x24, #4
	mov	x0, x22
	mov	x1, x23
	bl	_find_device
	cbz	x0, LBB0_9
; %bb.2:
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w8, [x8]
	orr	w9, w8, w21
	cmp	w8, w9
	b.eq	LBB0_4
; %bb.3:
	ldr	w2, [x24]
	mov	x0, x20
	mov	x1, x21
	bl	_upgrade_mode
	mov	x21, x0
	cbnz	w0, LBB0_8
LBB0_4:
	add	x0, x20, #8
	bl	_refcount_inc
LBB0_5:
	mov	w21, #0
	ldr	x8, [x20]
	str	x8, [x19]
	b	LBB0_8
LBB0_6:
Lloh0:
	adrp	x8, _ENODEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_8:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_9:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	w0, #16
	bl	_kmalloc
	cbz	x0, LBB0_12
; %bb.10:
	mov	x20, x0
	ldr	w0, [x24]
	mov	x1, x23
	mov	x2, x21
	mov	x3, x20
	bl	_dm_get_table_device
	cbz	w0, LBB0_13
; %bb.11:
	mov	x21, x0
	mov	x0, x20
	bl	_kfree
	b	LBB0_8
LBB0_12:
Lloh5:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_7
LBB0_13:
	add	x0, x20, #8
	mov	w1, #1
	bl	_refcount_set
	add	x0, x20, #12
	mov	x1, x22
	bl	_list_add
	b	LBB0_5
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
