	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_map_eq_icm               ## -- Begin function mthca_map_eq_icm
	.p2align	4, 0x90
_mthca_map_eq_icm:                      ## @mthca_map_eq_icm
	.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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	%esi, 8(%rdi)
	movq	_GFP_HIGHUSER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_alloc_page
	movl	%eax, (%rbx)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	12(%rbx), %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	movq	_PCI_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %r13
	movl	(%r13), %r8d
	xorl	%r14d, %r14d
	movl	%eax, %esi
	xorl	%edx, %edx
	callq	_pci_map_page
	movl	%eax, 4(%rbx)
	movl	12(%rbx), %edi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%rbx), %edi
	callq	___free_page
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_6
LBB0_4:
	movl	4(%rbx), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_mthca_MAP_ICM_page
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %r15d
	movl	4(%rbx), %esi
	movl	12(%rbx), %edi
	movl	(%r12), %edx
	movl	(%r13), %ecx
	callq	_pci_unmap_page
	movl	(%rbx), %edi
	callq	___free_page
	movl	%r15d, %r14d
LBB0_6:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_HIGHUSER,4,2               ## @GFP_HIGHUSER
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ## @PCI_DMA_BIDIRECTIONAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_map_eq_icm               ; -- Begin function mthca_map_eq_icm
	.p2align	2
_mthca_map_eq_icm:                      ; @mthca_map_eq_icm
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x1
	mov	x19, x0
	str	w1, [x0, #8]
Lloh0:
	adrp	x8, _GFP_HIGHUSER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_HIGHUSER@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_alloc_page
	str	w0, [x19]
	cbz	w0, LBB0_3
; %bb.1:
	mov	x1, x0
	ldr	w0, [x19, #12]
Lloh3:
	adrp	x21, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w3, [x21]
Lloh5:
	adrp	x22, _PCI_DMA_BIDIRECTIONAL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _PCI_DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w4, [x22]
	mov	w2, #0
	bl	_pci_map_page
	mov	x1, x0
	str	w0, [x19, #4]
	ldr	w0, [x19, #12]
	bl	_pci_dma_mapping_error
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x19]
	bl	___free_page
LBB0_3:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	ldr	w1, [x19, #4]
	mov	x0, x19
	mov	x2, x20
	bl	_mthca_MAP_ICM_page
	mov	x20, x0
	cbz	w0, LBB0_4
; %bb.6:
	ldr	w0, [x19, #12]
	ldr	w1, [x19, #4]
	ldr	w2, [x21]
	ldr	w3, [x22]
	bl	_pci_unmap_page
	ldr	w0, [x19]
	bl	___free_page
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_HIGHUSER,4,2               ; @GFP_HIGHUSER
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PCI_DMA_BIDIRECTIONAL,4,2      ; @PCI_DMA_BIDIRECTIONAL
.subsections_via_symbols
