	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cuse_vmalloc                   ## -- Begin function cuse_vmalloc
	.p2align	4, 0x90
_cuse_vmalloc:                          ## @cuse_vmalloc
	.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	_f_cuse@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	js	LBB0_1
## %bb.2:
	movl	%edi, %ebx
	leaq	-48(%rbp), %rdi
	xorl	%r13d, %r13d
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	testl	%ebx, %ebx
	jle	LBB0_14
## %bb.3:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_howmany
	movl	%eax, -48(%rbp)
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_CUSE_LOCK
	movq	_CUSE_ALLOC_UNIT_MAX@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	je	LBB0_13
## %bb.4:
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	xorl	%r13d, %r13d
	movq	_a_cuse@GOTPCREL(%rip), %rbx
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	movl	%eax, %ecx
	addq	$16, %r14
	cmpq	%rcx, %r15
	je	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rcx
	cmpq	$0, 8(%rcx,%r14)
	jne	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	$1, 8(%rcx,%r14)
	movq	(%rbx), %rax
	movl	$0, (%rax,%r14)
	xorl	%eax, %eax
	callq	_CUSE_UNLOCK
	movl	%r15d, -44(%rbp)
	movq	_f_cuse@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_CUSE_IOCTL_ALLOC_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_ioctl
	testl	%eax, %eax
	je	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_CUSE_LOCK
	movq	(%rbx), %rax
	movq	$0, 8(%rax,%r14)
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %eax
	jmp	LBB0_9
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_14
LBB0_10:
	movl	%r15d, %r12d
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	-48(%rbp), %esi
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	imull	%r9d, %esi
	movq	_MAP_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_f_cuse@GOTPCREL(%rip), %r14
	movq	(%r14), %r8
	movq	_CUSE_ALLOC_PAGES_MAX@GOTPCREL(%rip), %rax
	imull	%r15d, %r9d
	imull	(%rax), %r9d
	xorl	%edi, %edi
	callq	_mmap
	movq	%rax, %r13
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r13
	je	LBB0_11
## %bb.12:
	xorl	%eax, %eax
	callq	_CUSE_LOCK
	movq	(%rbx), %rax
	shlq	$4, %r12
	movq	%r13, 8(%rax,%r12)
	movq	(%rbx), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax,%r12)
	jmp	LBB0_13
LBB0_11:
	movq	(%r14), %rdi
	movq	_CUSE_IOCTL_FREE_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	callq	_ioctl
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_CUSE_LOCK
	movq	(%rbx), %rax
	shlq	$4, %r12
	movq	$0, 8(%rax,%r12)
LBB0_13:
	xorl	%eax, %eax
	callq	_CUSE_UNLOCK
LBB0_14:
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_f_cuse,8,3                     ## @f_cuse
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_CUSE_ALLOC_UNIT_MAX,4,2        ## @CUSE_ALLOC_UNIT_MAX
	.comm	_a_cuse,8,3                     ## @a_cuse
	.comm	_CUSE_IOCTL_ALLOC_MEMORY,4,2    ## @CUSE_IOCTL_ALLOC_MEMORY
	.comm	_errno,8,3                      ## @errno
	.comm	_EBUSY,8,3                      ## @EBUSY
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ## @MAP_SHARED
	.comm	_CUSE_ALLOC_PAGES_MAX,4,2       ## @CUSE_ALLOC_PAGES_MAX
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_CUSE_IOCTL_FREE_MEMORY,4,2     ## @CUSE_IOCTL_FREE_MEMORY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cuse_vmalloc                   ; -- Begin function cuse_vmalloc
	.p2align	2
_cuse_vmalloc:                          ; @cuse_vmalloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
Lloh0:
	adrp	x21, _f_cuse@GOTPAGE
Lloh1:
	ldr	x21, [x21, _f_cuse@GOTPAGEOFF]
	ldr	x8, [x21]
	tbnz	x8, #63, LBB0_9
; %bb.1:
	mov	x19, x0
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	cmp	w19, #1
	b.lt	LBB0_9
; %bb.2:
Lloh2:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_howmany
	str	w0, [sp, #8]
	bl	_CUSE_LOCK
Lloh5:
	adrp	x24, _CUSE_ALLOC_UNIT_MAX@GOTPAGE
Lloh6:
	ldr	x24, [x24, _CUSE_ALLOC_UNIT_MAX@GOTPAGEOFF]
	ldr	w8, [x24]
	cbz	w8, LBB0_10
; %bb.3:
	mov	x25, #0
	mov	x23, #0
Lloh7:
	adrp	x22, _a_cuse@GOTPAGE
Lloh8:
	ldr	x22, [x22, _a_cuse@GOTPAGEOFF]
	mov	w26, #1
Lloh9:
	adrp	x27, _CUSE_IOCTL_ALLOC_MEMORY@GOTPAGE
Lloh10:
	ldr	x27, [x27, _CUSE_IOCTL_ALLOC_MEMORY@GOTPAGEOFF]
Lloh11:
	adrp	x28, _errno@GOTPAGE
Lloh12:
	ldr	x28, [x28, _errno@GOTPAGEOFF]
Lloh13:
	adrp	x20, _EBUSY@GOTPAGE
Lloh14:
	ldr	x20, [x20, _EBUSY@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	add	x25, x25, #16
	cmp	x23, w8, uxtw
	b.eq	LBB0_10
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x22]
	add	x9, x9, x25
	ldr	x10, [x9, #8]
	cbnz	x10, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	str	x26, [x9, #8]
	ldr	x8, [x22]
	str	wzr, [x8, x25]
	bl	_CUSE_UNLOCK
	str	w23, [sp, #12]
	ldr	x0, [x21]
	ldr	w1, [x27]
	add	x2, sp, #8
	bl	_ioctl
	cbz	w0, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_CUSE_LOCK
	ldr	x8, [x22]
	add	x8, x8, x25
	str	xzr, [x8, #8]
	ldr	x8, [x28]
	ldr	x9, [x20]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x24]
	b	LBB0_4
LBB0_9:
	mov	x20, #0
	b	LBB0_12
LBB0_10:
	mov	x20, #0
LBB0_11:
	bl	_CUSE_UNLOCK
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_13:
	and	x24, x23, #0xffffffff
	ldr	w8, [sp, #8]
Lloh15:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	mul	w1, w9, w8
Lloh18:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh20:
	adrp	x10, _PROT_WRITE@GOTPAGE
Lloh21:
	ldr	x10, [x10, _PROT_WRITE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	ldr	w10, [x10]
	orr	w2, w10, w8
Lloh24:
	adrp	x8, _MAP_SHARED@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MAP_SHARED@GOTPAGEOFF]
Lloh26:
	ldr	w3, [x8]
	ldr	x4, [x21]
Lloh27:
	adrp	x8, _CUSE_ALLOC_PAGES_MAX@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CUSE_ALLOC_PAGES_MAX@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	mul	w9, w9, w23
	mul	w5, w9, w8
	mov	x0, #0
	bl	_mmap
Lloh30:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh32:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_15
; %bb.14:
	mov	x20, x0
	bl	_CUSE_LOCK
	ldr	x8, [x22]
	lsl	x9, x24, #4
	add	x8, x8, x9
	str	x20, [x8, #8]
	ldr	x8, [x22]
	str	w19, [x8, x9]
	b	LBB0_11
LBB0_15:
	ldr	x0, [x21]
Lloh33:
	adrp	x8, _CUSE_IOCTL_FREE_MEMORY@GOTPAGE
Lloh34:
	ldr	x8, [x8, _CUSE_IOCTL_FREE_MEMORY@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	add	x2, sp, #8
	bl	_ioctl
	bl	_CUSE_LOCK
	mov	x20, #0
	ldr	x8, [x22]
	add	x8, x8, x24, lsl #4
	str	xzr, [x8, #8]
	b	LBB0_11
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh22
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_f_cuse,8,3                     ; @f_cuse
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_CUSE_ALLOC_UNIT_MAX,4,2        ; @CUSE_ALLOC_UNIT_MAX
	.comm	_a_cuse,8,3                     ; @a_cuse
	.comm	_CUSE_IOCTL_ALLOC_MEMORY,4,2    ; @CUSE_IOCTL_ALLOC_MEMORY
	.comm	_errno,8,3                      ; @errno
	.comm	_EBUSY,8,3                      ; @EBUSY
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_SHARED,4,2                 ; @MAP_SHARED
	.comm	_CUSE_ALLOC_PAGES_MAX,4,2       ; @CUSE_ALLOC_PAGES_MAX
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_CUSE_IOCTL_FREE_MEMORY,4,2     ; @CUSE_IOCTL_FREE_MEMORY
.subsections_via_symbols
