	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_map_page                   ## -- Begin function qib_map_page
	.p2align	4, 0x90
_qib_map_page:                          ## @qib_map_page
	.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	%rdx, %r14
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%r13d, %r13d
	xorl	%edx, %edx
	callq	_pci_map_page
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
	jmp	LBB0_5
LBB0_2:
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rcx
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	testq	%rbx, %rbx
	jne	LBB0_4
## %bb.3:
	movq	%rax, %rbx
	movl	(%rax), %edx
	movl	(%rcx), %ecx
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_pci_unmap_page
	movl	(%rbx), %ecx
	movq	_PCI_DMA_FROMDEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r15, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_pci_map_page
	movq	%rax, %rbx
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	jne	LBB0_1
LBB0_4:
	movq	%rbx, (%r14)
	xorl	%r13d, %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ## @PCI_DMA_FROMDEVICE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qib_map_page                   ; -- Begin function qib_map_page
	.p2align	2
_qib_map_page:                          ; @qib_map_page
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w3, [x23]
Lloh2:
	adrp	x24, _PCI_DMA_FROMDEVICE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _PCI_DMA_FROMDEVICE@GOTPAGEOFF]
	ldr	w4, [x24]
	mov	w2, #0
	bl	_pci_map_page
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	bl	_pci_dma_mapping_error
	cbz	x0, LBB0_2
LBB0_1:
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_2:
	cbnz	x22, LBB0_4
; %bb.3:
	ldr	w2, [x23]
	ldr	w3, [x24]
	mov	x0, x20
	mov	x1, #0
	bl	_pci_unmap_page
	ldr	w3, [x23]
	ldr	w4, [x24]
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_pci_map_page
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	bl	_pci_dma_mapping_error
	cbnz	x0, LBB0_1
LBB0_4:
	mov	w0, #0
	str	x22, [x19]
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PCI_DMA_FROMDEVICE,4,2         ; @PCI_DMA_FROMDEVICE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
