	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cuse_free_unit_number_by_id    ## -- Begin function cuse_free_unit_number_by_id
	.p2align	4, 0x90
_cuse_free_unit_number_by_id:           ## @cuse_free_unit_number_by_id
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	subq	$16, %rsp
	movl	%edi, %eax
	movl	%edi, -4(%rbp)
	movq	_f_cuse@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	testq	%rdi, %rdi
	js	LBB0_1
## %bb.2:
	movl	%esi, %ecx
	andl	%eax, %ecx
	cmpl	$-1, %ecx
	je	LBB0_4
## %bb.3:
	movq	_CUSE_ID_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %esi
	movzbl	%al, %eax
	orl	%esi, %eax
	movl	%eax, -4(%rbp)
LBB0_4:
	movq	_CUSE_IOCTL_FREE_UNIT_BY_ID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-4(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movq	_CUSE_ERR_NO_MEMORY@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	movq	_CUSE_ERR_INVALID@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %eax
LBB0_7:
	addq	$16, %rsp
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_f_cuse,8,3                     ## @f_cuse
	.comm	_CUSE_ERR_INVALID,4,2           ## @CUSE_ERR_INVALID
	.comm	_CUSE_ID_MASK,4,2               ## @CUSE_ID_MASK
	.comm	_CUSE_IOCTL_FREE_UNIT_BY_ID,4,2 ## @CUSE_IOCTL_FREE_UNIT_BY_ID
	.comm	_CUSE_ERR_NO_MEMORY,4,2         ## @CUSE_ERR_NO_MEMORY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cuse_free_unit_number_by_id    ; -- Begin function cuse_free_unit_number_by_id
	.p2align	2
_cuse_free_unit_number_by_id:           ; @cuse_free_unit_number_by_id
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	mov	x8, x0
	stur	w0, [x29, #-4]
Lloh0:
	adrp	x9, _f_cuse@GOTPAGE
Lloh1:
	ldr	x9, [x9, _f_cuse@GOTPAGEOFF]
Lloh2:
	ldr	x0, [x9]
	tbnz	x0, #63, LBB0_4
; %bb.1:
	and	w9, w1, w8
	cmn	w9, #1
	b.eq	LBB0_3
; %bb.2:
Lloh3:
	adrp	x9, _CUSE_ID_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CUSE_ID_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	and	w9, w9, w1
	and	w8, w8, #0xff
	orr	w8, w9, w8
	stur	w8, [x29, #-4]
LBB0_3:
Lloh6:
	adrp	x8, _CUSE_IOCTL_FREE_UNIT_BY_ID@GOTPAGE
Lloh7:
	ldr	x8, [x8, _CUSE_IOCTL_FREE_UNIT_BY_ID@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	sub	x2, x29, #4
	bl	_ioctl
Lloh9:
	adrp	x8, _CUSE_ERR_NO_MEMORY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CUSE_ERR_NO_MEMORY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w0, wzr, w8, eq
	b	LBB0_5
LBB0_4:
Lloh12:
	adrp	x8, _CUSE_ERR_INVALID@GOTPAGE
Lloh13:
	ldr	x8, [x8, _CUSE_ERR_INVALID@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
LBB0_5:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_f_cuse,8,3                     ; @f_cuse
	.comm	_CUSE_ERR_INVALID,4,2           ; @CUSE_ERR_INVALID
	.comm	_CUSE_ID_MASK,4,2               ; @CUSE_ID_MASK
	.comm	_CUSE_IOCTL_FREE_UNIT_BY_ID,4,2 ; @CUSE_IOCTL_FREE_UNIT_BY_ID
	.comm	_CUSE_ERR_NO_MEMORY,4,2         ; @CUSE_ERR_NO_MEMORY
.subsections_via_symbols
