	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pci_endpoint_test_read
_pci_endpoint_test_read:                ## @pci_endpoint_test_read
	.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
	movq	(%rdi), %r13
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subq	%r13, %rax
	xorl	%r12d, %r12d
	cmpq	%rsi, %rax
	jb	LBB0_12
## %bb.1:
	movq	%rdi, %rbx
	movq	16(%rdi), %r14
	movq	_irq_type@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_IRQ_TYPE_LEGACY@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_3
## %bb.2:
	movq	_IRQ_TYPE_MSIX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_3
## %bb.5:
	movq	%rsi, %r15
	addq	%r13, %rsi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	callq	_dma_alloc_coherent
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	testq	%r13, %r13
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_10
## %bb.8:
	movq	-48(%rbp), %rdi
	movq	%r13, %rsi
	movq	%rax, %r12
	callq	_IS_ALIGNED
	testl	%eax, %eax
	movq	%r12, %rax
	je	LBB0_9
LBB0_10:
	movq	-48(%rbp), %r12
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
LBB0_3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_12
LBB0_9:
	movq	-48(%rbp), %rdi
	movq	%r13, %rsi
	movq	%rax, %r13
	callq	_PTR_ALIGN
	movq	%rax, %r12
	subq	-48(%rbp), %rax
	addq	%rax, %r13
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
LBB0_11:
	movq	_PCI_ENDPOINT_TEST_LOWER_DST_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_lower_32_bits
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_pci_endpoint_test_writel
	movq	_PCI_ENDPOINT_TEST_UPPER_DST_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r12, %rdi
	callq	_upper_32_bits
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_pci_endpoint_test_writel
	movq	_PCI_ENDPOINT_TEST_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_pci_endpoint_test_writel
	movq	_PCI_ENDPOINT_TEST_IRQ_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_irq_type@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pci_endpoint_test_writel
	movq	_PCI_ENDPOINT_TEST_IRQ_NUMBER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	movl	$1, %edx
	callq	_pci_endpoint_test_writel
	movq	_PCI_ENDPOINT_TEST_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_COMMAND_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_pci_endpoint_test_writel
	leaq	8(%rbx), %rdi
	callq	_wait_for_completion
	movl	$-1, %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r15, %rdx
	callq	_crc32_le
	movq	%rax, %r15
	movq	_PCI_ENDPOINT_TEST_CHECKSUM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_pci_endpoint_test_readl
	xorl	%r12d, %r12d
	cmpq	%rax, %r15
	sete	%r12b
	movq	-48(%rbp), %rcx
	movq	%r14, %rdi
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_dma_free_coherent
LBB0_12:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIZE_MAX,8,3                   ## @SIZE_MAX
	.comm	_irq_type,4,2                   ## @irq_type
	.comm	_IRQ_TYPE_LEGACY,4,2            ## @IRQ_TYPE_LEGACY
	.comm	_IRQ_TYPE_MSIX,4,2              ## @IRQ_TYPE_MSIX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid IRQ type option\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"Failed to allocate destination address\n"

	.comm	_PCI_ENDPOINT_TEST_LOWER_DST_ADDR,4,2 ## @PCI_ENDPOINT_TEST_LOWER_DST_ADDR
	.comm	_PCI_ENDPOINT_TEST_UPPER_DST_ADDR,4,2 ## @PCI_ENDPOINT_TEST_UPPER_DST_ADDR
	.comm	_PCI_ENDPOINT_TEST_SIZE,4,2     ## @PCI_ENDPOINT_TEST_SIZE
	.comm	_PCI_ENDPOINT_TEST_IRQ_TYPE,4,2 ## @PCI_ENDPOINT_TEST_IRQ_TYPE
	.comm	_PCI_ENDPOINT_TEST_IRQ_NUMBER,4,2 ## @PCI_ENDPOINT_TEST_IRQ_NUMBER
	.comm	_PCI_ENDPOINT_TEST_COMMAND,4,2  ## @PCI_ENDPOINT_TEST_COMMAND
	.comm	_COMMAND_WRITE,4,2              ## @COMMAND_WRITE
	.comm	_PCI_ENDPOINT_TEST_CHECKSUM,4,2 ## @PCI_ENDPOINT_TEST_CHECKSUM
	.no_dead_strip	_pci_endpoint_test_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pci_endpoint_test_read
_pci_endpoint_test_read:                ; @pci_endpoint_test_read
	.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
	ldr	x24, [x0]
Lloh0:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	sub	x8, x8, x24
	cmp	x8, x1
	b.hs	LBB0_2
; %bb.1:
	mov	w20, #0
	b	LBB0_12
LBB0_2:
	mov	x20, x0
	ldr	x19, [x0, #16]
Lloh3:
	adrp	x27, _irq_type@GOTPAGE
Lloh4:
	ldr	x27, [x27, _irq_type@GOTPAGEOFF]
	ldr	w8, [x27]
Lloh5:
	adrp	x9, _IRQ_TYPE_LEGACY@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IRQ_TYPE_LEGACY@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
Lloh8:
	adrp	x10, _IRQ_TYPE_MSIX@GOTPAGE
Lloh9:
	ldr	x10, [x10, _IRQ_TYPE_MSIX@GOTPAGEOFF]
Lloh10:
	ldr	w10, [x10]
	cmp	w8, w9
	ccmp	w8, w10, #0, ge
	b.le	LBB0_4
; %bb.3:
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_4:
	mov	x21, x1
	add	x22, x24, x1
Lloh13:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh15:
	ldr	w3, [x8]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_dma_alloc_coherent
	cbz	x0, LBB0_8
; %bb.5:
	mov	x23, x0
	cbz	x24, LBB0_7
; %bb.6:
	ldr	x0, [sp, #8]
	mov	x1, x24
	bl	_IS_ALIGNED
	cbz	w0, LBB0_10
LBB0_7:
	ldr	x25, [sp, #8]
	mov	x24, x23
	b	LBB0_11
LBB0_8:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_dev_err
	mov	w20, #0
	b	LBB0_12
LBB0_10:
	ldr	x0, [sp, #8]
	mov	x1, x24
	bl	_PTR_ALIGN
	mov	x25, x0
	ldr	x8, [sp, #8]
	sub	x8, x0, x8
	add	x24, x23, x8
LBB0_11:
Lloh18:
	adrp	x8, _PCI_ENDPOINT_TEST_LOWER_DST_ADDR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_LOWER_DST_ADDR@GOTPAGEOFF]
Lloh20:
	ldr	w26, [x8]
	mov	x0, x25
	bl	_lower_32_bits
	mov	x2, x0
	mov	x0, x20
	mov	x1, x26
	bl	_pci_endpoint_test_writel
Lloh21:
	adrp	x8, _PCI_ENDPOINT_TEST_UPPER_DST_ADDR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_UPPER_DST_ADDR@GOTPAGEOFF]
Lloh23:
	ldr	w26, [x8]
	mov	x0, x25
	bl	_upper_32_bits
	mov	x2, x0
	mov	x0, x20
	mov	x1, x26
	bl	_pci_endpoint_test_writel
Lloh24:
	adrp	x8, _PCI_ENDPOINT_TEST_SIZE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_SIZE@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_pci_endpoint_test_writel
Lloh27:
	adrp	x8, _PCI_ENDPOINT_TEST_IRQ_TYPE@GOTPAGE
Lloh28:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_IRQ_TYPE@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	ldr	w2, [x27]
	mov	x0, x20
	bl	_pci_endpoint_test_writel
Lloh30:
	adrp	x8, _PCI_ENDPOINT_TEST_IRQ_NUMBER@GOTPAGE
Lloh31:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_IRQ_NUMBER@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #1
	bl	_pci_endpoint_test_writel
Lloh33:
	adrp	x8, _PCI_ENDPOINT_TEST_COMMAND@GOTPAGE
Lloh34:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_COMMAND@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
Lloh36:
	adrp	x8, _COMMAND_WRITE@GOTPAGE
Lloh37:
	ldr	x8, [x8, _COMMAND_WRITE@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_pci_endpoint_test_writel
	add	x0, x20, #8
	bl	_wait_for_completion
	mov	w0, #-1
	mov	x1, x24
	mov	x2, x21
	bl	_crc32_le
	mov	x21, x0
Lloh39:
	adrp	x8, _PCI_ENDPOINT_TEST_CHECKSUM@GOTPAGE
Lloh40:
	ldr	x8, [x8, _PCI_ENDPOINT_TEST_CHECKSUM@GOTPAGEOFF]
Lloh41:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_pci_endpoint_test_readl
	cmp	x21, x0
	cset	w20, eq
	ldr	x3, [sp, #8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x23
	bl	_dma_free_coherent
LBB0_12:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_SIZE_MAX,8,3                   ; @SIZE_MAX
	.comm	_irq_type,4,2                   ; @irq_type
	.comm	_IRQ_TYPE_LEGACY,4,2            ; @IRQ_TYPE_LEGACY
	.comm	_IRQ_TYPE_MSIX,4,2              ; @IRQ_TYPE_MSIX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid IRQ type option\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"Failed to allocate destination address\n"

	.comm	_PCI_ENDPOINT_TEST_LOWER_DST_ADDR,4,2 ; @PCI_ENDPOINT_TEST_LOWER_DST_ADDR
	.comm	_PCI_ENDPOINT_TEST_UPPER_DST_ADDR,4,2 ; @PCI_ENDPOINT_TEST_UPPER_DST_ADDR
	.comm	_PCI_ENDPOINT_TEST_SIZE,4,2     ; @PCI_ENDPOINT_TEST_SIZE
	.comm	_PCI_ENDPOINT_TEST_IRQ_TYPE,4,2 ; @PCI_ENDPOINT_TEST_IRQ_TYPE
	.comm	_PCI_ENDPOINT_TEST_IRQ_NUMBER,4,2 ; @PCI_ENDPOINT_TEST_IRQ_NUMBER
	.comm	_PCI_ENDPOINT_TEST_COMMAND,4,2  ; @PCI_ENDPOINT_TEST_COMMAND
	.comm	_COMMAND_WRITE,4,2              ; @COMMAND_WRITE
	.comm	_PCI_ENDPOINT_TEST_CHECKSUM,4,2 ; @PCI_ENDPOINT_TEST_CHECKSUM
	.no_dead_strip	_pci_endpoint_test_read
.subsections_via_symbols
