	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_siw_mmap                       ## -- Begin function siw_mmap
	.p2align	4, 0x90
_siw_mmap:                              ## @siw_mmap
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	callq	_to_siw_ctx
	movq	%rax, %r13
	movl	12(%r12), %eax
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	decl	%ecx
	testl	%eax, %ecx
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_warn
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	(%r12), %r15
	movl	8(%r12), %r14d
	subl	%eax, %r14d
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_siw_get_uobj
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_remap_vmalloc_range
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r12d
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_pr_warn
	movl	%r12d, %ebx
	jmp	LBB0_6
LBB0_3:
	movq	(%r13), %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdx
	movl	%r14d, %ecx
	callq	_siw_dbg
	jmp	LBB0_6
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"siw: mmap not page aligned\n"

L_.str.1:                               ## @.str.1
	.asciz	"mmap lookup failed: %lu, %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"remap_vmalloc_range failed: %lu, %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_siw_mmap                       ; -- Begin function siw_mmap
	.p2align	2
_siw_mmap:                              ; @siw_mmap
	.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	x20, x1
	bl	_to_siw_ctx
	ldr	w8, [x20, #12]
Lloh0:
	adrp	x9, _EINVAL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	neg	w19, w9
Lloh3:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sub	w9, w9, #1
	tst	w9, w8
	b.eq	LBB0_4
; %bb.1:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
LBB0_2:
	bl	_pr_warn
LBB0_3:
	mov	x0, x19
	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_4:
	mov	x23, x0
	ldr	x21, [x20]
	ldr	w9, [x20, #8]
	sub	w22, w9, w8
	mov	x1, x21
	mov	x2, x22
	bl	_siw_get_uobj
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w1, [x0]
	mov	x0, x20
	mov	w2, #0
	bl	_remap_vmalloc_range
	mov	x19, x0
	cbz	w0, LBB0_3
; %bb.6:
	stp	x21, x22, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_2
LBB0_7:
	ldr	x0, [x23]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x21
	mov	x3, x22
	bl	_siw_dbg
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"siw: mmap not page aligned\n"

l_.str.1:                               ; @.str.1
	.asciz	"mmap lookup failed: %lu, %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"remap_vmalloc_range failed: %lu, %u\n"

.subsections_via_symbols
