	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ipath_mmap
_ipath_mmap:                            ## @ipath_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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_port_fp
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	(%r12), %r14d
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r14d
	testl	%r14d, %r14d
	je	LBB0_1
## %bb.3:
	movq	%rbx, %rsi
	movq	64(%rax), %rdx
	movq	_MM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -48(%rbp)                 ## 4-byte Spill
	movl	%r14d, -52(%rbp)                ## 4-byte Spill
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	movq	%r12, %rbx
	movq	8(%r12), %r12
	movq	16(%rbx), %r13
	subq	%r12, %r13
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movl	32(%rdx), %ecx
	movl	%ecx, -68(%rbp)                 ## 4-byte Spill
	movl	(%rax), %ecx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rsi, %rdi
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	_subport_fp
                                        ## kill: def $eax killed $eax def $rax
	leaq	L_.str(%rip), %rsi
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdx
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	movq	%r12, %rcx
	movq	%rbx, %r12
	movq	%r13, %r8
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	-68(%rbp), %r9d                 ## 4-byte Reload
	pushq	%rax
	pushq	-88(%rbp)                       ## 8-byte Folded Reload
	callq	_ipath_cdbg
	addq	$16, %rsp
	movq	%r14, %rdi
	callq	_subport_fp
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_mmap_kvaddr
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %ecx
	sarl	$31, %ecx
	andl	%eax, %ecx
	movl	%ecx, %eax
	jmp	LBB0_29
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_28:
	movl	%ebx, %eax
LBB0_29:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	(%rbx), %r13d
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	imull	4(%rsi), %r13d
	addl	(%rsi), %r13d
	cmpl	$0, 4(%rbx)
	je	LBB0_6
## %bb.7:
	movq	%r14, %rdi
	callq	_subport_fp
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	%r14, %rdi
	callq	_subport_fp
	movl	%eax, %ecx
	decl	%ecx
	movl	8(%rbx), %eax
	xorl	%edx, %edx
	divl	4(%rbx)
	movl	%eax, %r8d
	imull	%eax, %ecx
	jmp	LBB0_10
LBB0_6:
	movl	8(%rbx), %r8d
	movl	12(%rbx), %ecx
	cmpl	%r13d, %r15d
	je	LBB0_12
LBB0_13:
	cmpl	%ecx, %r15d
	jne	LBB0_15
## %bb.14:
	movq	%r12, %rdi
	movq	%rbx, %rdx
	movl	%r15d, %ecx
	callq	_mmap_piobufs
	jmp	LBB0_22
LBB0_15:
	cmpl	12(%rsi), %r15d
	jne	LBB0_17
## %bb.16:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	24(%rsi), %r8
	leaq	L_.str.1(%rip), %r9
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
LBB0_21:
	callq	_ipath_mmap_mem
	jmp	LBB0_22
LBB0_8:
	movl	8(%rbx), %ecx
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	4(%rbx)
	movl	%edx, %r8d
	addl	%eax, %r8d
	subl	%r8d, %ecx
LBB0_10:
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	imull	8(%rsi), %ecx
	addl	12(%rbx), %ecx
	cmpl	%r13d, %r15d
	jne	LBB0_13
LBB0_12:
	movq	%r12, %rdi
	movl	%r15d, %edx
	callq	_mmap_ureg
LBB0_22:
	movl	%eax, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_26:
	movq	$0, 24(%r12)
	testl	%ebx, %ebx
	jns	LBB0_28
## %bb.27:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rdi
	movl	%ebx, %edx
	negl	%edx
	movq	16(%r12), %r8
	subq	8(%r12), %r8
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rcx
	callq	_dev_info
	jmp	LBB0_28
LBB0_17:
	cmpl	16(%rbx), %r15d
	jne	LBB0_19
## %bb.18:
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_mmap_rcvegrbufs
	jmp	LBB0_22
LBB0_19:
	cmpl	56(%rbx), %r15d
	jne	LBB0_23
## %bb.20:
	movl	48(%rbx), %edx
	movq	24(%rbx), %r8
	leaq	L_.str.2(%rip), %r9
	movq	%r12, %rdi
	movq	%rbx, %rsi
	movl	$1, %ecx
	jmp	LBB0_21
LBB0_23:
	cmpl	40(%rbx), %r15d
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jne	LBB0_25
## %bb.24:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	32(%rbx), %r8
	leaq	L_.str.3(%rip), %r9
	movq	%r12, %rdi
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_ipath_mmap_mem
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_25:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_MM,4,2                         ## @MM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pgaddr %llx vm_start=%lx len %lx port %u:%u:%u\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.1:                               ## @.str.1
	.asciz	"pioavail registers"

L_.str.2:                               ## @.str.2
	.asciz	"rcvhdrq"

L_.str.3:                               ## @.str.3
	.asciz	"rcvhdrq tail"

L_.str.4:                               ## @.str.4
	.asciz	"Failure %d on off %llx len %lx\n"

	.no_dead_strip	_ipath_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ipath_mmap
_ipath_mmap:                            ; @ipath_mmap
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x1
	mov	x23, x0
	bl	_port_fp
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w8, [x19]
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w20, w8, w9
	cbz	w20, LBB0_4
; %bb.2:
	mov	x22, x0
	ldr	x21, [x0, #64]
Lloh3:
	adrp	x8, _MM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MM@GOTPAGEOFF]
Lloh5:
	ldr	w24, [x8]
	ldp	x25, x8, [x19, #8]
	sub	x26, x8, x25
	ldr	w27, [x21, #32]
	ldr	w28, [x0]
	mov	x0, x23
	bl	_subport_fp
	mov	x7, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x24
	mov	x2, x20
	mov	x3, x25
	mov	x4, x26
	mov	x5, x27
	mov	x6, x28
	bl	_ipath_cdbg
	mov	x0, x23
	bl	_subport_fp
	mov	x3, x0
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_mmap_kvaddr
	cbz	w0, LBB0_7
; %bb.3:
	cmp	w0, #0
	csel	w0, w0, wzr, lt
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_5:
	mov	x0, x22
LBB0_6:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldp	w8, w9, [x21]
	ldp	w10, w11, [x22]
	madd	w24, w10, w9, w8
	cbz	w11, LBB0_10
; %bb.8:
	mov	x0, x23
	bl	_subport_fp
	cbz	w0, LBB0_12
; %bb.9:
	mov	x0, x23
	bl	_subport_fp
	sub	w8, w0, #1
	ldp	w10, w9, [x22, #4]
	udiv	w4, w9, w10
	ldr	w9, [x22, #12]
	ldr	w10, [x21, #8]
	mul	w8, w4, w8
	madd	w8, w8, w10, w9
	cmp	w20, w24
	b.eq	LBB0_11
	b	LBB0_13
LBB0_10:
	ldp	w4, w8, [x22, #8]
	cmp	w20, w24
	b.ne	LBB0_13
LBB0_11:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_mmap_ureg
	mov	x22, x0
	b	LBB0_26
LBB0_12:
	ldp	w9, w8, [x22, #4]
	udiv	w10, w8, w9
	msub	w9, w10, w9, w8
	ldr	w11, [x22, #12]
	ldr	w12, [x21, #8]
	add	w4, w9, w10
	sub	w8, w8, w4
	madd	w8, w12, w8, w11
	cmp	w20, w24
	b.eq	LBB0_11
LBB0_13:
	cmp	w20, w8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	mov	x3, x20
	bl	_mmap_piobufs
	mov	x22, x0
	b	LBB0_26
LBB0_15:
	ldr	w8, [x21, #12]
	cmp	w20, w8
	b.ne	LBB0_19
; %bb.16:
Lloh11:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	ldr	x4, [x21, #24]
Lloh14:
	adrp	x5, l_.str.1@PAGE
Lloh15:
	add	x5, x5, l_.str.1@PAGEOFF
LBB0_17:
	mov	x0, x19
	mov	x1, x22
	mov	w3, #0
LBB0_18:
	bl	_ipath_mmap_mem
	mov	x22, x0
	b	LBB0_26
LBB0_19:
	ldr	w8, [x22, #16]
	cmp	w20, w8
	b.ne	LBB0_21
; %bb.20:
	mov	x0, x19
	mov	x1, x22
	bl	_mmap_rcvegrbufs
	mov	x22, x0
	b	LBB0_26
LBB0_21:
	ldr	w8, [x22, #56]
	cmp	w20, w8
	b.ne	LBB0_23
; %bb.22:
	ldr	w2, [x22, #48]
	ldr	x4, [x22, #24]
Lloh16:
	adrp	x5, l_.str.2@PAGE
Lloh17:
	add	x5, x5, l_.str.2@PAGEOFF
	mov	x0, x19
	mov	x1, x22
	mov	w3, #1
	b	LBB0_18
LBB0_23:
	ldr	w8, [x22, #40]
	cmp	w20, w8
	b.ne	LBB0_25
; %bb.24:
Lloh18:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	ldr	x4, [x22, #32]
Lloh21:
	adrp	x5, l_.str.3@PAGE
Lloh22:
	add	x5, x5, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_25:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_26:
	str	xzr, [x19, #24]
	tbz	w22, #31, LBB0_5
; %bb.27:
	ldr	x0, [x21, #16]
	neg	w2, w22
	ldp	x9, x8, [x19, #8]
	sub	x4, x8, x9
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x3, x20
	bl	_dev_info
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_MM,4,2                         ; @MM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pgaddr %llx vm_start=%lx len %lx port %u:%u:%u\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.1:                               ; @.str.1
	.asciz	"pioavail registers"

l_.str.2:                               ; @.str.2
	.asciz	"rcvhdrq"

l_.str.3:                               ; @.str.3
	.asciz	"rcvhdrq tail"

l_.str.4:                               ; @.str.4
	.asciz	"Failure %d on off %llx len %lx\n"

	.no_dead_strip	_ipath_mmap
.subsections_via_symbols
