	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function myri10ge_dma_test
_myri10ge_dma_test:                     ## @myri10ge_dma_test
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_alloc_page
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	16(%r15), %rdi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	xorl	%ebx, %ebx
	movq	%r13, %rsi
	xorl	%edx, %edx
	callq	_pci_map_page
	movl	%eax, %r12d
	movq	16(%r15), %rdi
	movl	%eax, %esi
	callq	_pci_dma_mapping_error
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	___free_page
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_4:
	movl	(%r15), %ebx
	movl	%r12d, %edi
	callq	_MYRI10GE_LOWPART_TO_U32
	movl	%eax, -72(%rbp)
	movl	%r12d, %edi
	callq	_MYRI10GE_HIGHPART_TO_U32
	movq	%rax, -64(%rbp)
	movl	%r14d, %esi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	%ebx, %r14d
	shll	$16, %r14d
	movl	%r14d, -68(%rbp)
	leaq	-72(%rbp), %rdx
	movq	%r15, %rdi
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	xorl	%ecx, %ecx
	callq	_myri10ge_send_cmd
	testl	%eax, %eax
	je	LBB0_7
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rax
	jmp	LBB0_6
LBB0_7:
	movl	-72(%rbp), %eax
	movzwl	%ax, %ecx
	sarl	$16, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	leal	(%rbx,%rbx), %edx
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
	imull	%edx, %eax
	cltd
	idivl	%ecx
	movl	%eax, 4(%r15)
	movl	%r12d, %edi
	callq	_MYRI10GE_LOWPART_TO_U32
	movl	%eax, -72(%rbp)
	movl	%r12d, %edi
	callq	_MYRI10GE_HIGHPART_TO_U32
	movq	%rax, -64(%rbp)
	movl	%ebx, -68(%rbp)
	leaq	-72(%rbp), %rdx
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	xorl	%ecx, %ecx
	callq	_myri10ge_send_cmd
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rax
LBB0_6:
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	-44(%rbp), %r14d                ## 4-byte Reload
LBB0_12:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movq	_DMA_BIDIRECTIONAL@GOTPCREL(%rip), %rcx
	movq	16(%r15), %rdi
	movl	(%rax), %edx
	movl	(%rcx), %ecx
	movl	%r12d, %esi
	callq	_pci_unmap_page
	movq	%r13, %rdi
	callq	_put_page
	testl	%ebx, %ebx
	je	LBB0_15
## %bb.13:
	movq	_MXGEFW_CMD_UNALIGNED_TEST@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	je	LBB0_15
## %bb.14:
	movq	16(%r15), %rdi
	leaq	L_.str.4(%rip), %rsi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movl	%ebx, %ecx
	callq	_dev_warn
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	-72(%rbp), %eax
	movzwl	%ax, %ecx
	sarl	$16, %eax
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	imull	%eax, %edx
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%eax, 8(%r15)
	movl	%r12d, %edi
	callq	_MYRI10GE_LOWPART_TO_U32
	movl	%eax, -72(%rbp)
	movl	%r12d, %edi
	callq	_MYRI10GE_HIGHPART_TO_U32
	movq	%rax, -64(%rbp)
	addl	-56(%rbp), %r14d                ## 4-byte Folded Reload
	movl	%r14d, -68(%rbp)
	leaq	-72(%rbp), %rdx
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	callq	_myri10ge_send_cmd
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.3(%rip), %rcx
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %ebx
	jmp	LBB0_12
LBB0_11:
	movl	-72(%rbp), %eax
	movzwl	%ax, %ecx
	sarl	$16, %eax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	imull	%eax, %edx
	shll	$2, %edx
	movl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%eax, 12(%r15)
	leaq	L_.str(%rip), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	" "

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ## @DMA_BIDIRECTIONAL
L_.str.1:                               ## @.str.1
	.asciz	"read"

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

L_.str.3:                               ## @.str.3
	.asciz	"read/write"

	.comm	_MXGEFW_CMD_UNALIGNED_TEST,4,2  ## @MXGEFW_CMD_UNALIGNED_TEST
L_.str.4:                               ## @.str.4
	.asciz	"DMA %s benchmark failed: %d\n"

	.no_dead_strip	_myri10ge_dma_test
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function myri10ge_dma_test
_myri10ge_dma_test:                     ; @myri10ge_dma_test
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_alloc_page
	cbz	x0, LBB0_3
; %bb.1:
	mov	x21, x0
	ldr	x0, [x19, #16]
Lloh3:
	adrp	x25, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x25, [x25, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w3, [x25]
Lloh5:
	adrp	x26, _DMA_BIDIRECTIONAL@GOTPAGE
Lloh6:
	ldr	x26, [x26, _DMA_BIDIRECTIONAL@GOTPAGEOFF]
	ldr	w4, [x26]
	mov	x1, x21
	mov	w2, #0
	bl	_pci_map_page
	mov	x22, x0
	ldr	x0, [x19, #16]
	mov	x1, x22
	bl	_pci_dma_mapping_error
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.2:
	mov	x0, x21
	bl	___free_page
LBB0_3:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	ldr	w24, [x19]
	mov	x0, x22
	bl	_MYRI10GE_LOWPART_TO_U32
	str	w0, [sp]
	mov	x0, x22
	bl	_MYRI10GE_HIGHPART_TO_U32
	str	x0, [sp, #8]
	lsl	w8, w24, #16
	str	w8, [sp, #4]
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_myri10ge_send_cmd
	cbz	w0, LBB0_7
; %bb.6:
	mov	x23, x0
Lloh10:
	adrp	x24, l_.str.1@PAGE
Lloh11:
	add	x24, x24, l_.str.1@PAGEOFF
	b	LBB0_12
LBB0_7:
	ldr	w8, [sp]
	asr	w9, w8, #16
	lsl	w27, w24, #1
	mul	w9, w27, w9
	and	w8, w8, #0xffff
	sdiv	w8, w9, w8
	str	w8, [x19, #4]
	mov	x0, x22
	bl	_MYRI10GE_LOWPART_TO_U32
	str	w0, [sp]
	mov	x0, x22
	bl	_MYRI10GE_HIGHPART_TO_U32
	str	x0, [sp, #8]
	str	w24, [sp, #4]
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_myri10ge_send_cmd
	cbz	w0, LBB0_9
; %bb.8:
	mov	x23, x0
Lloh12:
	adrp	x24, l_.str.2@PAGE
Lloh13:
	add	x24, x24, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_9:
	ldr	w8, [sp]
	asr	w9, w8, #16
	mul	w9, w27, w9
	and	w8, w8, #0xffff
	sdiv	w8, w9, w8
	str	w8, [x19, #8]
	mov	x0, x22
	bl	_MYRI10GE_LOWPART_TO_U32
	str	w0, [sp]
	mov	x0, x22
	bl	_MYRI10GE_HIGHPART_TO_U32
	str	x0, [sp, #8]
	add	w8, w24, w24, lsl #16
	str	w8, [sp, #4]
	mov	x2, sp
	mov	x0, x19
	mov	x1, x20
	mov	w3, #0
	bl	_myri10ge_send_cmd
	mov	x23, x0
	cbz	w0, LBB0_11
; %bb.10:
Lloh14:
	adrp	x24, l_.str.3@PAGE
Lloh15:
	add	x24, x24, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_11:
	ldr	w8, [sp]
	asr	w9, w8, #16
	mul	w9, w24, w9
	lsl	w9, w9, #2
	and	w8, w8, #0xffff
	sdiv	w8, w9, w8
	str	w8, [x19, #12]
Lloh16:
	adrp	x24, l_.str@PAGE
Lloh17:
	add	x24, x24, l_.str@PAGEOFF
LBB0_12:
	ldr	x0, [x19, #16]
	ldr	w2, [x25]
	ldr	w3, [x26]
	mov	x1, x22
	bl	_pci_unmap_page
	mov	x0, x21
	bl	_put_page
	cbz	w23, LBB0_4
; %bb.13:
Lloh18:
	adrp	x8, _MXGEFW_CMD_UNALIGNED_TEST@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MXGEFW_CMD_UNALIGNED_TEST@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w8, w20
	b.eq	LBB0_4
; %bb.14:
	ldr	x0, [x19, #16]
Lloh21:
	adrp	x1, l_.str.4@PAGE
Lloh22:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x24
	mov	x3, x23
	bl	_dev_warn
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	" "

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_BIDIRECTIONAL,4,2          ; @DMA_BIDIRECTIONAL
l_.str.1:                               ; @.str.1
	.asciz	"read"

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

l_.str.3:                               ; @.str.3
	.asciz	"read/write"

	.comm	_MXGEFW_CMD_UNALIGNED_TEST,4,2  ; @MXGEFW_CMD_UNALIGNED_TEST
l_.str.4:                               ; @.str.4
	.asciz	"DMA %s benchmark failed: %d\n"

	.no_dead_strip	_myri10ge_dma_test
.subsections_via_symbols
