	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_pci_fw_area_init
_mlxsw_pci_fw_area_init:                ## @mlxsw_pci_fw_area_init
	.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
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	$12, %esi
	callq	_kcalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	%ebx, (%r12)
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	callq	_mlxsw_cmd_mbox_zero
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.4:
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	shlq	$2, %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	xorl	%r14d, %r14d
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %r12
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	incl	%eax
	addq	$12, %r15
	cmpq	%r15, -64(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rax
	movq	8(%r12), %r12
	movq	_MLXSW_PCI_PAGE_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	(%r12,%r15), %rbx
	movl	%esi, 8(%r12,%r15)
	movq	%rax, %r13
	movl	16(%rax), %edi
	movq	%rbx, %rdx
	callq	_pci_alloc_consistent
	movl	%eax, 4(%r12,%r15)
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	(%rbx), %edx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_mlxsw_cmd_mbox_map_fa_pa_set
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%edx, %edx
	callq	_mlxsw_cmd_mbox_map_fa_log2size_set
	incl	%r14d
	movq	_MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jne	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %r12
	movl	20(%r13), %edi
	movq	%rbx, %rsi
	movl	%r14d, %edx
	callq	_mlxsw_cmd_map_fa
	testl	%eax, %eax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_mlxsw_cmd_mbox_zero
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_19
LBB0_3:
	xorl	%r13d, %r13d
	jmp	LBB0_19
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movq	%r13, %r12
	jmp	LBB0_15
LBB0_13:
	xorl	%r13d, %r13d
	testl	%r14d, %r14d
	je	LBB0_19
## %bb.14:
	movl	20(%r12), %edi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r14d, %edx
	callq	_mlxsw_cmd_map_fa
	movl	%eax, %r14d
	testl	%eax, %eax
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jne	LBB0_15
	jmp	LBB0_19
LBB0_10:
	movl	%eax, %r14d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_15:
	testl	%eax, %eax
	jle	LBB0_18
## %bb.16:
	movl	%eax, %eax
	leaq	1(%rax), %r15
	leaq	(%rax,%rax,2), %rax
	leaq	-4(,%rax,4), %rbx
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movl	16(%r12), %edi
	movl	(%rax,%rbx), %esi
	movl	-8(%rax,%rbx), %ecx
	movl	-4(%rax,%rbx), %edx
	callq	_pci_free_consistent
	decq	%r15
	addq	$-12, %rbx
	cmpq	$1, %r15
	ja	LBB0_17
LBB0_18:
	movq	8(%r12), %rdi
	callq	_kfree
	movl	%r14d, %r13d
LBB0_19:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLXSW_PCI_PAGE_SIZE,4,2        ## @MLXSW_PCI_PAGE_SIZE
	.comm	_MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX,4,2 ## @MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX
	.no_dead_strip	_mlxsw_pci_fw_area_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_pci_fw_area_init
_mlxsw_pci_fw_area_init:                ; @mlxsw_pci_fw_area_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x22
	mov	w1, #12
	bl	_kcalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_8
; %bb.1:
	str	w22, [x19]
	mov	x0, x20
	bl	_mlxsw_cmd_mbox_zero
	cmp	w22, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x23, #0
	mov	w21, #0
	mov	w25, #4
Lloh3:
	adrp	x26, _MLXSW_PCI_PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x26, [x26, _MLXSW_PCI_PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	adrp	x27, _MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX@GOTPAGE
Lloh6:
	ldr	x27, [x27, _MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX@GOTPAGEOFF]
	mov	w24, w22
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_mlxsw_cmd_mbox_zero
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	add	x25, x25, #12
	cmp	x24, x23
	b.eq	LBB0_16
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w1, [x26]
	add	x28, x8, x25
	str	w1, [x28, #4]
	ldr	w0, [x19, #16]
	sub	x22, x28, #4
	mov	x2, x22
	bl	_pci_alloc_consistent
	str	w0, [x28]
	cbz	w0, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w2, [x22]
	mov	x0, x20
	mov	x1, x21
	bl	_mlxsw_cmd_mbox_map_fa_pa_set
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	bl	_mlxsw_cmd_mbox_map_fa_log2size_set
	add	w21, w21, #1
	ldr	w8, [x27]
	cmp	w21, w8
	b.ne	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x19, #20]
	mov	x1, x20
	mov	x2, x21
	bl	_mlxsw_cmd_map_fa
	mov	x21, x0
	cbz	w0, LBB0_3
	b	LBB0_11
LBB0_8:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_15
LBB0_9:
	mov	w21, #0
	b	LBB0_15
LBB0_10:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_11:
	cmp	w23, #1
	b.lt	LBB0_14
LBB0_12:
	mov	w8, w23
	add	x20, x8, #1
	add	x8, x8, w23, uxtw #1
	lsl	x22, x8, #2
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	w0, [x19, #16]
	add	x8, x8, x22
	ldp	w2, w1, [x8, #-8]
	ldur	w3, [x8, #-12]
	bl	_pci_free_consistent
	sub	x20, x20, #1
	sub	x22, x22, #12
	cmp	x20, #1
	b.hi	LBB0_13
LBB0_14:
	ldr	x0, [x19, #8]
	bl	_kfree
LBB0_15:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_16:
	cbz	w21, LBB0_15
; %bb.17:
	ldr	w0, [x19, #20]
	mov	x1, x20
	mov	x2, x21
	bl	_mlxsw_cmd_map_fa
	mov	x21, x0
	cbz	w0, LBB0_15
; %bb.18:
	mov	x23, x24
	cmp	w23, #1
	b.ge	LBB0_12
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLXSW_PCI_PAGE_SIZE,4,2        ; @MLXSW_PCI_PAGE_SIZE
	.comm	_MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX,4,2 ; @MLXSW_CMD_MAP_FA_VPM_ENTRIES_MAX
	.no_dead_strip	_mlxsw_pci_fw_area_init
.subsections_via_symbols
