	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ofwfb_mmap
_ofwfb_mmap:                            ## @ofwfb_mmap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %r9d
	testl	%r9d, %r9d
	jle	LBB0_8
## %bb.1:
	movq	16(%rdi), %r11
	leaq	(,%r9,4), %rax
	leaq	(%rax,%rax,2), %r10
	xorl	%eax, %eax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$12, %rax
	cmpq	%rax, %r10
	je	LBB0_8
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r11,%rax), %ecx
	cmpl	%esi, %ecx
	jg	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addl	4(%r11,%rax), %ecx
	cmpl	%esi, %ecx
	jle	LBB0_7
## %bb.4:
	movq	_OFW_PCI_PHYS_HI_PREFETCHABLE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 8(%r11,%rax)
	je	LBB0_6
## %bb.5:
	movq	_VM_MEMATTR_WRITE_COMBINING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r8)
	jmp	LBB0_6
LBB0_8:
	movq	_ofwfb_ignore_mmap_checks@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_6
## %bb.9:
	movl	8(%rdi), %eax
	imull	4(%rdi), %eax
	cmpl	%esi, %eax
	jle	LBB0_11
## %bb.10:
	addl	12(%rdi), %esi
LBB0_6:
	movl	%esi, (%rdx)
	xorl	%eax, %eax
	popq	%rbp
	retq
LBB0_11:
	testq	%r9, %r9
	je	LBB0_12
## %bb.13:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OFW_PCI_PHYS_HI_PREFETCHABLE,4,2 ## @OFW_PCI_PHYS_HI_PREFETCHABLE
	.comm	_VM_MEMATTR_WRITE_COMBINING,4,2 ## @VM_MEMATTR_WRITE_COMBINING
	.comm	_ofwfb_ignore_mmap_checks,8,3   ## @ofwfb_ignore_mmap_checks
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_ofwfb_mmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ofwfb_mmap
_ofwfb_mmap:                            ; @ofwfb_mmap
	.cfi_startproc
; %bb.0:
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	ldr	x9, [x0, #16]
	add	x9, x9, #8
	mov	x10, x8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x9, x9, #12
	subs	x10, x10, #1
	b.eq	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldur	w11, [x9, #-8]
	cmp	w11, w1
	b.gt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	w12, [x9, #-4]
	add	w11, w12, w11
	cmp	w11, w1
	b.le	LBB0_2
; %bb.5:
	ldr	w8, [x9]
Lloh0:
	adrp	x9, _OFW_PCI_PHYS_HI_PREFETCHABLE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OFW_PCI_PHYS_HI_PREFETCHABLE@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
Lloh3:
	adrp	x8, _VM_MEMATTR_WRITE_COMBINING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VM_MEMATTR_WRITE_COMBINING@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x4]
	b	LBB0_8
LBB0_7:
Lloh6:
	adrp	x9, _ofwfb_ignore_mmap_checks@GOTPAGE
Lloh7:
	ldr	x9, [x9, _ofwfb_ignore_mmap_checks@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cbz	x9, LBB0_9
LBB0_8:
	str	w1, [x2]
	mov	w0, #0
	ret
LBB0_9:
	ldp	w9, w10, [x0, #4]
	mul	w9, w10, w9
	cmp	w9, w1
	b.le	LBB0_11
; %bb.10:
	ldr	w9, [x0, #12]
	add	w9, w9, w1
	str	w9, [x2]
	mov	w0, #0
	ret
LBB0_11:
	cbz	w8, LBB0_13
; %bb.12:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ret
LBB0_13:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_OFW_PCI_PHYS_HI_PREFETCHABLE,4,2 ; @OFW_PCI_PHYS_HI_PREFETCHABLE
	.comm	_VM_MEMATTR_WRITE_COMBINING,4,2 ; @VM_MEMATTR_WRITE_COMBINING
	.comm	_ofwfb_ignore_mmap_checks,8,3   ; @ofwfb_ignore_mmap_checks
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_ofwfb_mmap
.subsections_via_symbols
