	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mptsas_get_linkerrors
_mptsas_get_linkerrors:                 ## @mptsas_get_linkerrors
	.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	%r12
	pushq	%rbx
	subq	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	callq	_phy_to_ioc
	movq	%rax, %r14
	movq	%r15, %rdi
	callq	_scsi_is_sas_phy_local
	testl	%eax, %eax
	je	LBB0_1
## %bb.3:
	movq	_MPI_SASPHY1_PAGEVERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movabsq	$4294967296, %rax               ## imm = 0x100000000
	movq	%rax, -120(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -104(%rbp)
	movq	_MPI_CONFIG_PAGETYPE_EXTENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -108(%rbp)
	movq	_MPI_CONFIG_EXTPAGETYPE_SAS_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -112(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, -48(%rbp)
	movl	$-1, -80(%rbp)
	movl	32(%r15), %eax
	movl	%eax, -56(%rbp)
	movq	_MPI_CONFIG_ACTION_PAGE_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	$0, -64(%rbp)
	movq	_SAS_CONFIG_PAGE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mpt_config
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.4:
	movl	-120(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_5
## %bb.6:
	movl	(%r14), %edi
	shll	$2, %esi
	leaq	-36(%rbp), %rdx
	callq	_pci_alloc_consistent
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movl	-36(%rbp), %eax
	movl	%eax, -80(%rbp)
	movq	_MPI_CONFIG_ACTION_PAGE_READ_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	leaq	-80(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mpt_config
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_10
## %bb.9:
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_mptsas_print_phy_pg1
	movl	12(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 24(%r15)
	movl	8(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 16(%r15)
	movl	4(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, 8(%r15)
	movl	(%r12), %edi
	callq	_le32_to_cpu
	movq	%rax, (%r15)
LBB0_10:
	movl	(%r14), %edi
	movl	-120(%rbp), %esi
	shll	$2, %esi
	movl	-36(%rbp), %ecx
	movq	%r12, %rdx
	callq	_pci_free_consistent
	jmp	LBB0_11
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_11:
	movl	%ebx, %eax
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MPI_SASPHY1_PAGEVERSION,4,2    ## @MPI_SASPHY1_PAGEVERSION
	.comm	_MPI_CONFIG_PAGETYPE_EXTENDED,4,2 ## @MPI_CONFIG_PAGETYPE_EXTENDED
	.comm	_MPI_CONFIG_EXTPAGETYPE_SAS_PHY,4,2 ## @MPI_CONFIG_EXTPAGETYPE_SAS_PHY
	.comm	_MPI_CONFIG_ACTION_PAGE_HEADER,4,2 ## @MPI_CONFIG_ACTION_PAGE_HEADER
	.comm	_SAS_CONFIG_PAGE_TIMEOUT,4,2    ## @SAS_CONFIG_PAGE_TIMEOUT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MPI_CONFIG_ACTION_PAGE_READ_CURRENT,4,2 ## @MPI_CONFIG_ACTION_PAGE_READ_CURRENT
	.no_dead_strip	_mptsas_get_linkerrors
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function mptsas_get_linkerrors
lCPI0_0:
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_mptsas_get_linkerrors:                 ; @mptsas_get_linkerrors
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x0
	bl	_phy_to_ioc
	mov	x20, x0
	mov	x0, x19
	bl	_scsi_is_sas_phy_local
	cbz	w0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _MPI_SASPHY1_PAGEVERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPI_SASPHY1_PAGEVERSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #88]
Lloh3:
	adrp	x8, lCPI0_0@PAGE
Lloh4:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [sp, #56]
	stp	xzr, xzr, [sp, #72]
Lloh5:
	adrp	x8, _MPI_CONFIG_PAGETYPE_EXTENDED@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MPI_CONFIG_PAGETYPE_EXTENDED@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _MPI_CONFIG_EXTPAGETYPE_SAS_PHY@GOTPAGE
Lloh9:
	ldr	x9, [x9, _MPI_CONFIG_EXTPAGETYPE_SAS_PHY@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #64]
	add	x8, sp, #56
	str	x8, [sp, #48]
	mov	w8, #-1
	ldr	w9, [x19, #32]
	str	w9, [sp, #40]
Lloh11:
	adrp	x9, _MPI_CONFIG_ACTION_PAGE_HEADER@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MPI_CONFIG_ACTION_PAGE_HEADER@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #16]
	str	xzr, [sp, #32]
Lloh14:
	adrp	x8, _SAS_CONFIG_PAGE_TIMEOUT@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SAS_CONFIG_PAGE_TIMEOUT@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	add	x1, sp, #16
	mov	x0, x20
	bl	_mpt_config
	mov	x21, x0
	cbnz	w0, LBB0_9
; %bb.2:
	ldr	w8, [sp, #56]
	cbz	w8, LBB0_10
; %bb.3:
	ldr	w0, [x20]
	lsl	w1, w8, #2
	add	x2, sp, #12
	bl	_pci_alloc_consistent
	cbz	x0, LBB0_11
; %bb.4:
	mov	x22, x0
	ldr	w8, [sp, #12]
Lloh17:
	adrp	x9, _MPI_CONFIG_ACTION_PAGE_READ_CURRENT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MPI_CONFIG_ACTION_PAGE_READ_CURRENT@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #16]
	add	x1, sp, #16
	mov	x0, x20
	bl	_mpt_config
	mov	x21, x0
	cbnz	w0, LBB0_6
; %bb.5:
	mov	x0, x20
	mov	x1, x22
	bl	_mptsas_print_phy_pg1
	ldr	w0, [x22, #12]
	bl	_le32_to_cpu
	str	x0, [x19, #24]
	ldr	w0, [x22, #8]
	bl	_le32_to_cpu
	str	x0, [x19, #16]
	ldr	w0, [x22, #4]
	bl	_le32_to_cpu
	str	x0, [x19, #8]
	ldr	w0, [x22]
	bl	_le32_to_cpu
	str	x0, [x19]
LBB0_6:
	ldr	w0, [x20]
	ldr	w8, [sp, #56]
	lsl	w1, w8, #2
	ldr	w3, [sp, #12]
	mov	x2, x22
	bl	_pci_free_consistent
	b	LBB0_9
LBB0_7:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_10:
Lloh22:
	adrp	x8, _ENXIO@GOTPAGE
Lloh23:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_11:
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdrp	Lloh3, Lloh5
	.loh AdrpLdr	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MPI_SASPHY1_PAGEVERSION,4,2    ; @MPI_SASPHY1_PAGEVERSION
	.comm	_MPI_CONFIG_PAGETYPE_EXTENDED,4,2 ; @MPI_CONFIG_PAGETYPE_EXTENDED
	.comm	_MPI_CONFIG_EXTPAGETYPE_SAS_PHY,4,2 ; @MPI_CONFIG_EXTPAGETYPE_SAS_PHY
	.comm	_MPI_CONFIG_ACTION_PAGE_HEADER,4,2 ; @MPI_CONFIG_ACTION_PAGE_HEADER
	.comm	_SAS_CONFIG_PAGE_TIMEOUT,4,2    ; @SAS_CONFIG_PAGE_TIMEOUT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MPI_CONFIG_ACTION_PAGE_READ_CURRENT,4,2 ; @MPI_CONFIG_ACTION_PAGE_READ_CURRENT
	.no_dead_strip	_mptsas_get_linkerrors
.subsections_via_symbols
