	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smb_dev2share                  ## -- Begin function smb_dev2share
	.p2align	4, 0x90
_smb_dev2share:                         ## @smb_dev2share
	.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	%r8, %r12
	movq	%rcx, %r14
	movq	%rdx, %r15
	movl	%edi, %esi
	movq	_curthread@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_cap_read_rights@GOTPCREL(%rip), %rdx
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	callq	_fget
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_1
LBB0_8:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, %r15
	movq	(%rbx), %r14
	movq	-56(%rbp), %rax
	movq	%rax, (%rbx)
	leaq	-48(%rbp), %rdi
	callq	_devfs_get_cdevpriv
	movl	%eax, %r13d
	movq	%r14, (%rbx)
	movq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_fdrop
	testl	%r13d, %r13d
	jne	LBB0_8
## %bb.2:
	cmpq	$0, -48(%rbp)
	movq	%r15, %r14
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	je	LBB0_8
## %bb.3:
	xorl	%eax, %eax
	callq	_SMB_LOCK
	movq	-48(%rbp), %rax
	movq	%rax, (%r12)
	movq	8(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_smb_share_get
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_7
## %bb.6:
	movq	-48(%rbp), %rax
	incl	(%rax)
	movq	%rbx, (%r14)
LBB0_7:
	xorl	%eax, %eax
	callq	_SMB_UNLOCK
	jmp	LBB0_8
LBB0_4:
	xorl	%eax, %eax
	callq	_SMB_UNLOCK
	movq	_ENOTCONN@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_curthread,8,3                  ## @curthread
	.comm	_cap_read_rights,4,2            ## @cap_read_rights
	.comm	_ENOTCONN,4,2                   ## @ENOTCONN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_smb_dev2share                  ; -- Begin function smb_dev2share
	.p2align	2
_smb_dev2share:                         ; @smb_dev2share
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x4
	mov	x19, x3
	mov	x20, x2
	mov	x1, x0
Lloh0:
	adrp	x8, _curthread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _curthread@GOTPAGEOFF]
Lloh2:
	ldr	x23, [x8]
Lloh3:
	adrp	x2, _cap_read_rights@GOTPAGE
Lloh4:
	ldr	x2, [x2, _cap_read_rights@GOTPAGEOFF]
	add	x3, sp, #8
	mov	x0, x23
	bl	_fget
	mov	x22, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x22
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_2:
	ldr	x24, [x23]
	ldr	x8, [sp, #8]
	str	x8, [x23]
	mov	x0, sp
	bl	_devfs_get_cdevpriv
	mov	x22, x0
	str	x24, [x23]
	ldr	x0, [sp, #8]
	mov	x1, x23
	bl	_fdrop
	cbnz	w22, LBB0_1
; %bb.3:
	ldr	x8, [sp]
	cbz	x8, LBB0_1
; %bb.4:
	bl	_SMB_LOCK
	ldr	x8, [sp]
	str	x8, [x21]
	ldr	x21, [x8, #8]
	cbz	x21, LBB0_8
; %bb.5:
	mov	x0, x21
	mov	x1, x20
	bl	_smb_share_get
	mov	x22, x0
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	x8, [sp]
	ldr	w9, [x8]
	add	w9, w9, #1
	str	w9, [x8]
	str	x21, [x19]
LBB0_7:
	bl	_SMB_UNLOCK
	b	LBB0_1
LBB0_8:
	bl	_SMB_UNLOCK
Lloh5:
	adrp	x8, _ENOTCONN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENOTCONN@GOTPAGEOFF]
Lloh7:
	ldr	w22, [x8]
	b	LBB0_1
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_curthread,8,3                  ; @curthread
	.comm	_cap_read_rights,4,2            ; @cap_read_rights
	.comm	_ENOTCONN,4,2                   ; @ENOTCONN
.subsections_via_symbols
