	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mptsas_sas_expander_pg0
_mptsas_sas_expander_pg0:               ## @mptsas_sas_expander_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$120, %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	%rdx, %rbx
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_MPI_SASEXPANDER0_PAGEVERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -112(%rbp)
	movl	$0, -152(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -136(%rbp)
	movq	$0, -120(%rbp)
	movq	_MPI_CONFIG_PAGETYPE_EXTENDED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -144(%rbp)
	movq	_MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -148(%rbp)
	leaq	-152(%rbp), %rax
	movq	%rax, -72(%rbp)
	movl	$-1, -104(%rbp)
	addq	%r15, %rbx
	movq	%rbx, -80(%rbp)
	movq	_MPI_CONFIG_ACTION_PAGE_HEADER@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)
	movq	$0, -88(%rbp)
	movq	_SAS_CONFIG_PAGE_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -96(%rbp)
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	leaq	-104(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mpt_config
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.1:
	movl	-152(%rbp), %esi
	testl	%esi, %esi
	je	LBB0_2
## %bb.4:
	movl	(%r14), %edi
	shll	$2, %esi
	leaq	-44(%rbp), %rdx
	callq	_pci_alloc_consistent
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %rbx
	movl	-44(%rbp), %eax
	movl	%eax, -104(%rbp)
	movq	_MPI_CONFIG_ACTION_PAGE_READ_CURRENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)
	leaq	-104(%rbp), %rsi
	movq	%r14, %rdi
	callq	_mpt_config
	movl	%eax, %r13d
	movq	_MPI_IOCSTATUS_CONFIG_INVALID_PAGE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r13d
	jne	LBB0_9
## %bb.7:
	movq	_ENODEV@GOTPCREL(%rip), %rax
LBB0_8:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_17
LBB0_2:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_18
LBB0_9:
	testl	%r13d, %r13d
	je	LBB0_10
LBB0_17:
	movl	(%r14), %edi
	movl	-152(%rbp), %esi
	shll	$2, %esi
	movl	-44(%rbp), %ecx
	movq	%rbx, %rdx
	callq	_pci_free_consistent
LBB0_18:
	movl	%r13d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movl	(%rbx), %eax
	testl	%eax, %eax
	movl	$1, %edi
	cmovnel	%eax, %edi
	movl	%edi, (%r12)
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$4, %esi
	callq	_kcalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rbx, %rsi
	addq	$12, %rsi
	leaq	-48(%rbp), %rdi
	movl	$4, %edx
	callq	_memcpy
	cmpl	$0, (%r12)
	jle	LBB0_13
## %bb.14:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r12), %rcx
	xorl	%r13d, %r13d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, 24(%rcx,%rbx)
	movl	8(%r14), %edi
	callq	_le16_to_cpu
	movq	8(%r12), %rcx
	movq	%rax, 16(%rcx,%rbx)
	movl	-48(%rbp), %edi
	callq	_le64_to_cpu
	movq	8(%r12), %rcx
	movl	%eax, 8(%rcx,%rbx)
	movl	4(%r14), %edi
	callq	_le16_to_cpu
	movq	8(%r12), %rcx
	movq	%rax, (%rcx,%rbx)
	incq	%r15
	movslq	(%r12), %rax
	addq	$32, %rbx
	cmpq	%rax, %r15
	jl	LBB0_15
## %bb.16:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_13:
	xorl	%r13d, %r13d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_MPI_SASEXPANDER0_PAGEVERSION,4,2 ## @MPI_SASEXPANDER0_PAGEVERSION
	.comm	_MPI_CONFIG_PAGETYPE_EXTENDED,4,2 ## @MPI_CONFIG_PAGETYPE_EXTENDED
	.comm	_MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER,4,2 ## @MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER
	.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
	.comm	_MPI_IOCSTATUS_CONFIG_INVALID_PAGE,4,2 ## @MPI_IOCSTATUS_CONFIG_INVALID_PAGE
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_mptsas_sas_expander_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_expander_pg0
_mptsas_sas_expander_pg0:               ; @mptsas_sas_expander_pg0
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _MPI_SASEXPANDER0_PAGEVERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MPI_SASEXPANDER0_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_EXPANDER@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	wzr, w8, [sp, #48]
	add	x8, sp, #48
	str	x8, [sp, #40]
	mov	w8, #-1
	add	x9, x21, x22
Lloh9:
	adrp	x10, _MPI_CONFIG_ACTION_PAGE_HEADER@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MPI_CONFIG_ACTION_PAGE_HEADER@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	stp	w8, w10, [sp, #8]
	stp	xzr, x9, [sp, #24]
Lloh12:
	adrp	x8, _SAS_CONFIG_PAGE_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAS_CONFIG_PAGE_TIMEOUT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [sp, #16]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	add	x1, sp, #8
	mov	x0, x19
	bl	_mpt_config
	mov	x22, x0
	cbnz	w0, LBB0_16
; %bb.1:
	ldr	w8, [sp, #48]
	cbz	w8, LBB0_6
; %bb.2:
	ldr	w0, [x19]
	lsl	w1, w8, #2
	add	x2, sp, #4
	bl	_pci_alloc_consistent
	cbz	x0, LBB0_7
; %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_9
; %bb.4:
Lloh21:
	adrp	x8, _ENODEV@GOTPAGE
Lloh22:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_15
LBB0_6:
Lloh23:
	adrp	x8, _ENXIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_16
LBB0_9:
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.10:
	ldr	w8, [x21]
	cmp	w8, #0
	csinc	w0, w8, wzr, ne
	str	w0, [x20]
Lloh27:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh28:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	w1, #4
	bl	_kcalloc
	str	x0, [x20, #8]
	cbz	x0, LBB0_17
; %bb.11:
	add	x1, x21, #12
	mov	x0, sp
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x22, #0
	mov	x23, #0
	ldr	x8, [x20, #8]
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	x8, x8, x22
	str	x20, [x8, #24]
	ldr	w0, [x21, #8]
	bl	_le16_to_cpu
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	str	x0, [x8, #16]
	ldr	w0, [sp]
	bl	_le64_to_cpu
	ldr	x8, [x20, #8]
	add	x8, x8, x22
	str	w0, [x8, #8]
	ldr	w0, [x21, #4]
	bl	_le16_to_cpu
	ldr	x8, [x20, #8]
	str	x0, [x8, x22]
	add	x23, x23, #1
	ldrsw	x9, [x20]
	add	x22, x22, #32
	cmp	x23, x9
	b.lt	LBB0_13
LBB0_14:
	mov	w22, #0
LBB0_15:
	ldr	w0, [x19]
	ldr	w8, [sp, #48]
	lsl	w1, w8, #2
	ldr	w3, [sp, #4]
	mov	x2, x21
	bl	_pci_free_consistent
LBB0_16:
	mov	x0, x22
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_17:
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_5
	.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 AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MPI_SASEXPANDER0_PAGEVERSION,4,2 ; @MPI_SASEXPANDER0_PAGEVERSION
	.comm	_MPI_CONFIG_PAGETYPE_EXTENDED,4,2 ; @MPI_CONFIG_PAGETYPE_EXTENDED
	.comm	_MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER,4,2 ; @MPI_CONFIG_EXTPAGETYPE_SAS_EXPANDER
	.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
	.comm	_MPI_IOCSTATUS_CONFIG_INVALID_PAGE,4,2 ; @MPI_IOCSTATUS_CONFIG_INVALID_PAGE
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_mptsas_sas_expander_pg0
.subsections_via_symbols
