	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mem_ioctl_no_mmu
_mem_ioctl_no_mmu:                      ## @mem_ioctl_no_mmu
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rax
	movq	(%rdi), %rdi
	movq	8(%rax), %rax
	movl	$0, -20(%rbp)
	movl	$0, -24(%rbp)
	movl	(%rsi), %ecx
	addl	$-128, %ecx
	cmpl	$3, %ecx
	ja	LBB0_10
## %bb.1:
	movq	%rsi, %r14
	xorl	%ebx, %ebx
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	jmpq	*%rcx
LBB0_6:
	movq	_HL_MEM_USERPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r14)
	je	LBB0_8
## %bb.7:
	movl	8(%r14), %eax
	movl	%eax, -20(%rbp)
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_10:
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENOTTY@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_5:
	movl	12(%r14), %esi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_free_device_memory             ## TAILCALL
LBB0_2:
	cmpl	$0, 16(%r14)
	je	LBB0_3
## %bb.4:
	movq	_HL_MEM_CONTIGUOUS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r14)
	leaq	-24(%rbp), %rdx
	movq	%r14, %rsi
	callq	_alloc_device_memory
	movl	%eax, %ebx
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	-24(%rbp), %eax
	movl	%eax, 4(%r14)
	jmp	LBB0_12
LBB0_8:
	leaq	-20(%rbp), %rdx
	movq	%r14, %rsi
	callq	_get_paddr_from_handle
	movl	%eax, %ebx
LBB0_9:
	movq	%r14, %rdi
	xorl	%esi, %esi
	movl	$20, %edx
	callq	_memset
	movl	-20(%rbp), %eax
	movl	%eax, (%r14)
	jmp	LBB0_12
LBB0_3:
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
LJTI0_0:
	.long	L0_0_set_12
	.long	L0_0_set_6
	.long	L0_0_set_5
	.long	L0_0_set_2
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc size must be larger than 0\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HL_MEM_CONTIGUOUS,4,2          ## @HL_MEM_CONTIGUOUS
	.comm	_HL_MEM_USERPTR,4,2             ## @HL_MEM_USERPTR
L_.str.1:                               ## @.str.1
	.asciz	"Unknown opcode for memory IOCTL\n"

	.comm	_ENOTTY,4,2                     ## @ENOTTY
	.no_dead_strip	_mem_ioctl_no_mmu
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mem_ioctl_no_mmu
_mem_ioctl_no_mmu:                      ; @mem_ioctl_no_mmu
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldp	x0, x8, [x0]
	str	xzr, [sp, #8]
	ldr	w9, [x1]
	sub	w9, w9, #128
	cmp	w9, #3
	b.hi	LBB0_4
; %bb.1:
	mov	x19, x1
	mov	w20, #0
Lloh0:
	adrp	x10, lJTI0_0@PAGE
Lloh1:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrb	w12, [x10, x9]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	ldr	w8, [x19, #4]
Lloh2:
	adrp	x9, _HL_MEM_USERPTR@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HL_MEM_USERPTR@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.3:
	mov	w20, #0
	ldr	w8, [x19, #8]
	str	w8, [sp, #12]
	b	LBB0_9
LBB0_4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh7:
	adrp	x8, _ENOTTY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOTTY@GOTPAGEOFF]
	b	LBB0_11
LBB0_5:
	ldr	w1, [x19, #12]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_free_device_memory
LBB0_6:
	ldr	w9, [x19, #16]
	cbz	w9, LBB0_10
; %bb.7:
Lloh9:
	adrp	x8, _HL_MEM_CONTIGUOUS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HL_MEM_CONTIGUOUS@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	add	x2, sp, #8
	mov	x1, x19
	bl	_alloc_device_memory
	mov	x20, x0
	mov	x0, x19
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	w8, [sp, #8]
	str	w8, [x19, #4]
	b	LBB0_12
LBB0_8:
	add	x2, sp, #12
	mov	x1, x19
	bl	_get_paddr_from_handle
	mov	x20, x0
LBB0_9:
	mov	x0, x19
	mov	w1, #0
	mov	w2, #20
	bl	_memset
	ldr	w8, [sp, #12]
	str	w8, [x19]
	b	LBB0_12
LBB0_10:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_12-LBB0_2)>>2
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_5-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc size must be larger than 0\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HL_MEM_CONTIGUOUS,4,2          ; @HL_MEM_CONTIGUOUS
	.comm	_HL_MEM_USERPTR,4,2             ; @HL_MEM_USERPTR
l_.str.1:                               ; @.str.1
	.asciz	"Unknown opcode for memory IOCTL\n"

	.comm	_ENOTTY,4,2                     ; @ENOTTY
	.no_dead_strip	_mem_ioctl_no_mmu
.subsections_via_symbols
