	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mptsas_sas_phy_pg0
_mptsas_sas_phy_pg0:                    ## @mptsas_sas_phy_pg0
	.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	%rsi, %r14
	movq	%rdi, %r12
	movq	_MPI_SASPHY0_PAGEVERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movl	$0, -128(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -112(%rbp)
	movq	$0, -96(%rbp)
	movq	_MPI_CONFIG_PAGETYPE_EXTENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -120(%rbp)
	movq	_MPI_CONFIG_EXTPAGETYPE_SAS_PHY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -124(%rbp)
	leaq	-128(%rbp), %rax
	movq	%rax, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	_SAS_CONFIG_PAGE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movl	$-1, -80(%rbp)
	addq	%rcx, %rdx
	movq	%rdx, -72(%rbp)
	movq	_MPI_CONFIG_ACTION_PAGE_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	leaq	-80(%rbp), %rsi
	callq	_mpt_config
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_11
## %bb.1:
	movl	-128(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_2
## %bb.4:
	movl	(%r12), %edi
	shll	$2, %esi
	leaq	-36(%rbp), %rdx
	callq	_pci_alloc_consistent
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	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	%r12, %rdi
	callq	_mpt_config
	movl	%eax, %ebx
	movq	_MPI_IOCSTATUS_CONFIG_INVALID_PAGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_8
## %bb.7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_11
LBB0_8:
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.9:
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_mptsas_print_phy_pg0
	movl	12(%r15), %eax
	movl	%eax, 20(%r14)
	movl	8(%r15), %eax
	movl	%eax, 16(%r14)
	movl	4(%r15), %edi
	callq	_le16_to_cpu
	movq	%rax, 8(%r14)
	movl	(%r15), %edi
	callq	_le16_to_cpu
	movq	%rax, (%r14)
	xorl	%ebx, %ebx
LBB0_10:
	movl	(%r12), %edi
	movl	-128(%rbp), %esi
	shll	$2, %esi
	movl	-36(%rbp), %ecx
	movq	%r15, %rdx
	callq	_pci_free_consistent
LBB0_11:
	movl	%ebx, %eax
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MPI_SASPHY0_PAGEVERSION,4,2    ## @MPI_SASPHY0_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	_SAS_CONFIG_PAGE_TIMEOUT,4,2    ## @SAS_CONFIG_PAGE_TIMEOUT
	.comm	_MPI_CONFIG_ACTION_PAGE_HEADER,4,2 ## @MPI_CONFIG_ACTION_PAGE_HEADER
	.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
	.comm	_MPI_IOCSTATUS_CONFIG_INVALID_PAGE,4,2 ## @MPI_IOCSTATUS_CONFIG_INVALID_PAGE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.no_dead_strip	_mptsas_sas_phy_pg0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mptsas_sas_phy_pg0
_mptsas_sas_phy_pg0:                    ; @mptsas_sas_phy_pg0
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _MPI_SASPHY0_PAGEVERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPI_SASPHY0_PAGEVERSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #88]
	stp	xzr, xzr, [sp, #72]
	str	xzr, [sp, #64]
Lloh3:
	adrp	x8, _MPI_CONFIG_PAGETYPE_EXTENDED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MPI_CONFIG_PAGETYPE_EXTENDED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #56]
Lloh6:
	adrp	x8, _MPI_CONFIG_EXTPAGETYPE_SAS_PHY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MPI_CONFIG_EXTPAGETYPE_SAS_PHY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	wzr, w8, [sp, #48]
	add	x8, sp, #48
	stp	xzr, x8, [sp, #32]
Lloh9:
	adrp	x8, _SAS_CONFIG_PAGE_TIMEOUT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SAS_CONFIG_PAGE_TIMEOUT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	mov	w8, #-1
	add	x9, x3, x2
	str	x9, [sp, #16]
Lloh12:
	adrp	x9, _MPI_CONFIG_ACTION_PAGE_HEADER@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MPI_CONFIG_ACTION_PAGE_HEADER@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
	add	x1, sp, #8
	bl	_mpt_config
	mov	x22, x0
	cbnz	w0, LBB0_11
; %bb.1:
	ldr	w8, [sp, #48]
	cbz	w8, LBB0_5
; %bb.2:
	ldr	w0, [x19]
	lsl	w1, w8, #2
	add	x2, sp, #4
	bl	_pci_alloc_consistent
	cbz	x0, LBB0_6
; %bb.3:
	mov	x21, x0
	ldr	w8, [sp, #4]
Lloh15:
	adrp	x9, _MPI_CONFIG_ACTION_PAGE_READ_CURRENT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _MPI_CONFIG_ACTION_PAGE_READ_CURRENT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w8, w9, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	bl	_mpt_config
Lloh18:
	adrp	x8, _MPI_IOCSTATUS_CONFIG_INVALID_PAGE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _MPI_IOCSTATUS_CONFIG_INVALID_PAGE@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.4:
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_10
LBB0_5:
Lloh24:
	adrp	x8, _ENXIO@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_11
LBB0_8:
	mov	x22, x0
	cbnz	w0, LBB0_10
; %bb.9:
	mov	x0, x19
	mov	x1, x21
	bl	_mptsas_print_phy_pg0
	ldr	d0, [x21, #8]
	str	d0, [x20, #16]
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
	str	x0, [x20, #8]
	ldr	w0, [x21]
	bl	_le16_to_cpu
	str	x0, [x20]
LBB0_10:
	ldr	w0, [x19]
	ldr	w8, [sp, #48]
	lsl	w1, w8, #2
	ldr	w3, [sp, #4]
	mov	x2, x21
	bl	_pci_free_consistent
LBB0_11:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MPI_SASPHY0_PAGEVERSION,4,2    ; @MPI_SASPHY0_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	_SAS_CONFIG_PAGE_TIMEOUT,4,2    ; @SAS_CONFIG_PAGE_TIMEOUT
	.comm	_MPI_CONFIG_ACTION_PAGE_HEADER,4,2 ; @MPI_CONFIG_ACTION_PAGE_HEADER
	.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
	.comm	_MPI_IOCSTATUS_CONFIG_INVALID_PAGE,4,2 ; @MPI_IOCSTATUS_CONFIG_INVALID_PAGE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.no_dead_strip	_mptsas_sas_phy_pg0
.subsections_via_symbols
