	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qlcnic_read_memory_test_agent
_qlcnic_read_memory_test_agent:         ## @qlcnic_read_memory_test_agent
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdi, %r12
	movl	(%rsi), %ebx
	movl	4(%rsi), %r13d
	movl	%r13d, %eax
	orl	%ebx, %eax
	testb	$15, %al
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rdi
	callq	_mutex_lock
	testl	%ebx, %ebx
	jne	LBB0_3
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_qlcnic_ms_read_data@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_qlcnic_ind_rd
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, (%r14)
	movq	(%r15), %rax
	movl	4(%rax), %esi
	movq	%r12, %rdi
	callq	_qlcnic_ind_rd
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%r14)
	movq	(%r15), %rax
	movl	8(%rax), %esi
	movq	%r12, %rdi
	callq	_qlcnic_ind_rd
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 8(%r14)
	movq	(%r15), %rax
	movl	12(%rax), %esi
	movq	%r12, %rdi
	callq	_qlcnic_ind_rd
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 12(%r14)
	addq	$16, %r14
	addl	$16, %r13d
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	addq	$64, %r15
	addl	$-16, %ebx
	je	LBB0_12
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	_QLCNIC_MS_ADDR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	%r13d, %edx
	callq	_qlcnic_ind_wr
	movq	_QLCNIC_MS_ADDR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_qlcnic_ind_wr
	movq	_QLCNIC_MS_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_QLCNIC_TA_START_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_qlcnic_ind_wr
	movq	_MAX_CTL_CHECK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$0, %r15d
	testl	%eax, %eax
	jle	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	_QLCNIC_MS_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_qlcnic_ind_rd
	movq	_TA_CTL_BUSY@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=2
	incl	%r15d
	movq	_MAX_CTL_CHECK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	jl	LBB0_5
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	%eax, %r15d
	jne	LBB0_11
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	_MAX_CTL_CHECK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r15d
	jne	LBB0_11
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_printk_ratelimit
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	movq	8(%r12), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
LBB0_12:
	movq	(%r12), %rdi
	callq	_mutex_unlock
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	jmp	LBB0_13
LBB0_1:
	movq	8(%r12), %rdi
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%ebx, %ecx
	callq	_dev_info
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	xorl	%edx, %edx
	subl	(%rcx), %edx
	movl	%edx, (%r15)
LBB0_13:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unaligned memory addr:0x%x size:0x%x\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_QLCNIC_MS_ADDR_LO,4,2          ## @QLCNIC_MS_ADDR_LO
	.comm	_QLCNIC_MS_ADDR_HI,4,2          ## @QLCNIC_MS_ADDR_HI
	.comm	_QLCNIC_MS_CTRL,4,2             ## @QLCNIC_MS_CTRL
	.comm	_QLCNIC_TA_START_ENABLE,4,2     ## @QLCNIC_TA_START_ENABLE
	.comm	_MAX_CTL_CHECK,4,2              ## @MAX_CTL_CHECK
	.comm	_TA_CTL_BUSY,4,2                ## @TA_CTL_BUSY
L_.str.1:                               ## @.str.1
	.asciz	"failed to read through agent\n"

	.comm	_EIO,4,2                        ## @EIO
	.comm	_qlcnic_ms_read_data,8,3        ## @qlcnic_ms_read_data
	.no_dead_strip	_qlcnic_read_memory_test_agent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qlcnic_read_memory_test_agent
_qlcnic_read_memory_test_agent:         ; @qlcnic_read_memory_test_agent
	.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	x19, x3
	mov	x21, x0
	ldp	w22, w23, [x1]
	orr	w8, w23, w22
	tst	w8, #0xf
	b.ne	LBB0_14
; %bb.1:
	mov	x24, x2
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x0, [x21]
	bl	_mutex_lock
	cbz	w22, LBB0_13
; %bb.2:
Lloh0:
	adrp	x27, _QLCNIC_MS_CTRL@GOTPAGE
Lloh1:
	ldr	x27, [x27, _QLCNIC_MS_CTRL@GOTPAGEOFF]
Lloh2:
	adrp	x20, _MAX_CTL_CHECK@GOTPAGE
Lloh3:
	ldr	x20, [x20, _MAX_CTL_CHECK@GOTPAGEOFF]
Lloh4:
	adrp	x25, _TA_CTL_BUSY@GOTPAGE
Lloh5:
	ldr	x25, [x25, _TA_CTL_BUSY@GOTPAGEOFF]
Lloh6:
	adrp	x26, _qlcnic_ms_read_data@GOTPAGE
Lloh7:
	ldr	x26, [x26, _qlcnic_ms_read_data@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x26]
	ldr	w1, [x8]
	mov	x0, x21
	bl	_qlcnic_ind_rd
	bl	_cpu_to_le32
	str	w0, [x24]
	ldr	x8, [x26]
	ldr	w1, [x8, #4]
	mov	x0, x21
	bl	_qlcnic_ind_rd
	bl	_cpu_to_le32
	str	w0, [x24, #4]
	ldr	x8, [x26]
	ldr	w1, [x8, #8]
	mov	x0, x21
	bl	_qlcnic_ind_rd
	bl	_cpu_to_le32
	str	w0, [x24, #8]
	ldr	x8, [x26]
	ldr	w1, [x8, #12]
	mov	x0, x21
	bl	_qlcnic_ind_rd
	bl	_cpu_to_le32
	str	w0, [x24, #12]
	add	x24, x24, #16
	add	w23, w23, #16
	add	x19, x19, #64
	subs	w22, w22, #16
	b.eq	LBB0_13
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
Lloh8:
	adrp	x8, _QLCNIC_MS_ADDR_LO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _QLCNIC_MS_ADDR_LO@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x23
	bl	_qlcnic_ind_wr
Lloh11:
	adrp	x8, _QLCNIC_MS_ADDR_HI@GOTPAGE
Lloh12:
	ldr	x8, [x8, _QLCNIC_MS_ADDR_HI@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_qlcnic_ind_wr
	ldr	w1, [x27]
Lloh14:
	adrp	x8, _QLCNIC_TA_START_ENABLE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _QLCNIC_TA_START_ENABLE@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x0, x21
	bl	_qlcnic_ind_wr
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w28, #0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w1, [x27]
	mov	x0, x21
	bl	_qlcnic_ind_rd
	ldr	w8, [x25]
	tst	w8, w0
	b.eq	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	add	w28, w28, #1
	ldr	w8, [x20]
	cmp	w28, w8
	b.lt	LBB0_6
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w28, #0
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	cmp	w28, w8
	b.ne	LBB0_3
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x20]
	cmp	w28, w8
	b.ne	LBB0_3
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	bl	_printk_ratelimit
	cbz	x0, LBB0_3
; %bb.12:
	ldr	x0, [x21, #8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
Lloh19:
	adrp	x8, _EIO@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19]
LBB0_13:
	ldr	x0, [x21]
	bl	_mutex_unlock
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	ldr	w0, [x8]
	b	LBB0_15
LBB0_14:
	ldr	x0, [x21, #8]
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	bl	_dev_info
	mov	w0, #0
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w8, w8
	str	w8, [x19]
LBB0_15:
	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 AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unaligned memory addr:0x%x size:0x%x\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_QLCNIC_MS_ADDR_LO,4,2          ; @QLCNIC_MS_ADDR_LO
	.comm	_QLCNIC_MS_ADDR_HI,4,2          ; @QLCNIC_MS_ADDR_HI
	.comm	_QLCNIC_MS_CTRL,4,2             ; @QLCNIC_MS_CTRL
	.comm	_QLCNIC_TA_START_ENABLE,4,2     ; @QLCNIC_TA_START_ENABLE
	.comm	_MAX_CTL_CHECK,4,2              ; @MAX_CTL_CHECK
	.comm	_TA_CTL_BUSY,4,2                ; @TA_CTL_BUSY
l_.str.1:                               ; @.str.1
	.asciz	"failed to read through agent\n"

	.comm	_EIO,4,2                        ; @EIO
	.comm	_qlcnic_ms_read_data,8,3        ; @qlcnic_ms_read_data
	.no_dead_strip	_qlcnic_read_memory_test_agent
.subsections_via_symbols
