	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_mirror
_get_mirror:                            ## @get_mirror
	.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	%rcx, %rbx
	movl	%edx, %r15d
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	8(%rcx), %rdi
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	leaq	-33(%rbp), %rcx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.2:
	movq	(%rbx), %rbx
	movl	8(%r12), %edi
	callq	_dm_table_get_mode
	movq	(%r14), %rcx
	movl	%r15d, %r15d
	leaq	(%r15,%r15,4), %rdx
	leaq	(%rcx,%rdx,8), %rcx
	addq	$32, %rcx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_dm_get_device
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rax
	movq	%rax, (%r12)
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str.1(%rip), %rax
	movq	%rax, (%r12)
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_4:
	movq	(%r14), %rax
	shlq	$3, %r15
	leaq	(%r15,%r15,4), %r15
	movq	%r14, 24(%rax,%r15)
	leaq	(%rax,%r15), %rdi
	addq	$16, %rdi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_atomic_set
	movq	(%r14), %rax
	movq	$0, 8(%rax,%r15)
	movq	-48(%rbp), %rcx
	movq	%rcx, (%rax,%r15)
LBB0_5:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%llu%c"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid offset"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.2:                               ## @.str.2
	.asciz	"Device lookup failure"

	.no_dead_strip	_get_mirror
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_mirror
_get_mirror:                            ; @get_mirror
	.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	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	x0, [x3, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #8
	add	x3, sp, #7
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_3
; %bb.1:
	ldr	x22, [x22]
	ldr	w0, [x20, #8]
	bl	_dm_table_get_mode
	mov	x2, x0
	ldr	x8, [x19]
	mov	w9, #40
	umaddl	x8, w21, w9, x8
	add	x3, x8, #32
	mov	x0, x20
	mov	x1, x22
	bl	_dm_get_device
	cbz	w0, LBB0_4
; %bb.2:
Lloh2:
	adrp	x8, l_.str.2@PAGE
Lloh3:
	add	x8, x8, l_.str.2@PAGEOFF
	str	x8, [x20]
	b	LBB0_5
LBB0_3:
Lloh4:
	adrp	x8, l_.str.1@PAGE
Lloh5:
	add	x8, x8, l_.str.1@PAGEOFF
	str	x8, [x20]
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_4:
	mov	w8, w21
	ldr	x9, [x19]
	add	x8, x8, x8, lsl #2
	lsl	x20, x8, #3
	add	x8, x9, x20
	str	x19, [x8, #24]
	add	x0, x8, #16
	mov	w1, #0
	bl	_atomic_set
	mov	w0, #0
	ldr	x8, [x19]
	add	x8, x8, x20
	ldr	x9, [sp, #8]
	stp	x9, xzr, [x8]
LBB0_5:
	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
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%llu%c"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid offset"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.2:                               ; @.str.2
	.asciz	"Device lookup failure"

	.no_dead_strip	_get_mirror
.subsections_via_symbols
