	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_qplib_enable_rcfw_channel ## -- Begin function bnxt_qplib_enable_rcfw_channel
	.p2align	4, 0x90
_bnxt_qplib_enable_rcfw_channel:        ## @bnxt_qplib_enable_rcfw_channel
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -56(%rbp)                  ## 8-byte Spill
	movl	%r8d, %r14d
	movl	%ecx, %r12d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	$0, 112(%rsi)
	movq	_FIRMWARE_FIRST_FLAG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$108, %rsi
	callq	_set_bit
	movl	(%r15), %edi
	callq	_BITS_TO_LONGS
	movl	%eax, %ebx
	shll	$3, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kzalloc
	movl	%eax, 104(%r15)
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	%ebx, 4(%r15)
	movq	_RCFW_COMM_PCI_BAR_REGION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 8(%r15)
	movq	%r13, %rdi
	callq	_pci_resource_start
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	_RCFW_COMM_BASE_OFFSET@GOTPCREL(%rip), %rcx
	addq	(%rcx), %rax
	movq	_RCFW_COMM_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rax, %rdi
	callq	_ioremap_nocache
	movq	%rax, 32(%r15)
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	testl	%r14d, %r14d
	jne	LBB0_6
## %bb.7:
	movq	_RCFW_PF_COMM_PROD_OFFSET@GOTPCREL(%rip), %rax
	jmp	LBB0_8
LBB0_4:
	movq	56(%r15), %rdi
	movl	8(%r15), %edx
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	jmp	LBB0_1
LBB0_6:
	movq	_RCFW_VF_COMM_PROD_OFFSET@GOTPCREL(%rip), %rax
LBB0_8:
	movl	(%rax), %eax
	movl	%eax, 100(%r15)
	movq	_RCFW_COMM_TRIG_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 96(%r15)
	movq	_RCFW_COMM_CONS_PCI_BAR_REGION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%esi, 12(%r15)
	movq	%r13, %rdi
	callq	_pci_resource_start
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_10
## %bb.9:
	movq	56(%r15), %rdi
	movl	12(%r15), %edx
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
LBB0_10:
	movslq	%r12d, %rax
	addq	%rax, %rbx
	movq	%rbx, %rdi
	movl	$8, %esi
	callq	_ioremap_nocache
	movq	%rax, 88(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 72(%r15)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:
	movq	%rax, 16(%r15)
LBB0_14:
	leaq	64(%r15), %rdi
	callq	_init_waitqueue_head
	movq	%r15, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	$1, %edx
	callq	_bnxt_qplib_rcfw_start_irq
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	%eax, %ebx
	movq	56(%r15), %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	movq	%r15, %rdi
	callq	_bnxt_qplib_disable_rcfw_channel
	jmp	LBB0_17
LBB0_11:
	movq	56(%r15), %rdi
	movl	12(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_err
	movq	32(%r15), %rdi
	callq	_iounmap
	movq	$0, 32(%r15)
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	48(%r15), %rax
	movq	_PBL_LVL_0@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rax
	movl	(%rax), %edi
	callq	_cpu_to_le64
	movl	%eax, -64(%rbp)
	movq	_CMDQ_INIT_CMDQ_SIZE_SFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	(%r15), %eax
	movl	40(%r15), %edi
	shll	%cl, %eax
	movq	_CMDQ_INIT_CMDQ_SIZE_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %eax
	movq	_CMDQ_INIT_CMDQ_LVL_SFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edi
	movq	_CMDQ_INIT_CMDQ_LVL_MASK@GOTPCREL(%rip), %rcx
	andl	(%rcx), %edi
	orl	%eax, %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movl	24(%r15), %edi
	callq	_cpu_to_le16
	movq	%rax, -80(%rbp)
	movq	32(%r15), %rdi
	leaq	-80(%rbp), %rsi
	movl	$6, %edx
	callq	___iowrite32_copy
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_FIRMWARE_FIRST_FLAG,4,2        ## @FIRMWARE_FIRST_FLAG
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RCFW_COMM_PCI_BAR_REGION,4,2   ## @RCFW_COMM_PCI_BAR_REGION
	.comm	_RCFW_COMM_BASE_OFFSET,8,3      ## @RCFW_COMM_BASE_OFFSET
	.comm	_RCFW_COMM_SIZE,4,2             ## @RCFW_COMM_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CMDQ BAR region %d mapping failed\n"

	.comm	_RCFW_VF_COMM_PROD_OFFSET,4,2   ## @RCFW_VF_COMM_PROD_OFFSET
	.comm	_RCFW_PF_COMM_PROD_OFFSET,4,2   ## @RCFW_PF_COMM_PROD_OFFSET
	.comm	_RCFW_COMM_TRIG_OFFSET,4,2      ## @RCFW_COMM_TRIG_OFFSET
	.comm	_RCFW_COMM_CONS_PCI_BAR_REGION,4,2 ## @RCFW_COMM_CONS_PCI_BAR_REGION
L_.str.1:                               ## @.str.1
	.asciz	"CREQ BAR region %d resc start is 0!\n"

L_.str.2:                               ## @.str.2
	.asciz	"CREQ BAR region %d mapping failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"Failed to request IRQ for CREQ rc = 0x%x\n"

	.comm	_PBL_LVL_0,8,3                  ## @PBL_LVL_0
	.comm	_CMDQ_INIT_CMDQ_SIZE_SFT,4,2    ## @CMDQ_INIT_CMDQ_SIZE_SFT
	.comm	_CMDQ_INIT_CMDQ_SIZE_MASK,4,2   ## @CMDQ_INIT_CMDQ_SIZE_MASK
	.comm	_CMDQ_INIT_CMDQ_LVL_SFT,4,2     ## @CMDQ_INIT_CMDQ_LVL_SFT
	.comm	_CMDQ_INIT_CMDQ_LVL_MASK,4,2    ## @CMDQ_INIT_CMDQ_LVL_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bnxt_qplib_enable_rcfw_channel ; -- Begin function bnxt_qplib_enable_rcfw_channel
	.p2align	2
_bnxt_qplib_enable_rcfw_channel:        ; @bnxt_qplib_enable_rcfw_channel
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x21, x5
	mov	x24, x4
	mov	x22, x3
	mov	x20, x2
	mov	x19, x1
	mov	x23, x0
	str	xzr, [x1, #112]
Lloh0:
	adrp	x8, _FIRMWARE_FIRST_FLAG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIRMWARE_FIRST_FLAG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	add	x1, x1, #108
	bl	_set_bit
	ldr	w0, [x19]
	bl	_BITS_TO_LONGS
	lsl	w25, w0, #3
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x25
	bl	_kzalloc
	str	w0, [x19, #104]
	cbz	w0, LBB0_12
; %bb.1:
Lloh6:
	adrp	x8, _RCFW_COMM_PCI_BAR_REGION@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RCFW_COMM_PCI_BAR_REGION@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	stp	w25, w1, [x19, #4]
	mov	x0, x23
	bl	_pci_resource_start
	cbz	x0, LBB0_12
; %bb.2:
Lloh9:
	adrp	x8, _RCFW_COMM_BASE_OFFSET@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RCFW_COMM_BASE_OFFSET@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	add	x0, x8, x0
Lloh12:
	adrp	x8, _RCFW_COMM_SIZE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RCFW_COMM_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_ioremap_nocache
	str	x0, [x19, #32]
	cbz	x0, LBB0_10
; %bb.3:
Lloh15:
	adrp	x8, _RCFW_VF_COMM_PROD_OFFSET@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RCFW_VF_COMM_PROD_OFFSET@GOTPAGEOFF]
Lloh17:
	adrp	x9, _RCFW_PF_COMM_PROD_OFFSET@GOTPAGE
Lloh18:
	ldr	x9, [x9, _RCFW_PF_COMM_PROD_OFFSET@GOTPAGEOFF]
	cmp	w24, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
Lloh19:
	adrp	x9, _RCFW_COMM_TRIG_OFFSET@GOTPAGE
Lloh20:
	ldr	x9, [x9, _RCFW_COMM_TRIG_OFFSET@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [x19, #96]
Lloh22:
	adrp	x8, _RCFW_COMM_CONS_PCI_BAR_REGION@GOTPAGE
Lloh23:
	ldr	x8, [x8, _RCFW_COMM_CONS_PCI_BAR_REGION@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
	str	w1, [x19, #12]
	mov	x0, x23
	bl	_pci_resource_start
	mov	x23, x0
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x19, #56]
	ldr	w2, [x19, #12]
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
LBB0_5:
	add	x0, x23, w22, sxtw
	mov	w1, #8
	bl	_ioremap_nocache
	str	x0, [x19, #88]
	cbz	x0, LBB0_11
; %bb.6:
	stp	xzr, xzr, [x19, #72]
	cbz	x21, LBB0_8
; %bb.7:
	str	x21, [x19, #16]
LBB0_8:
	add	x0, x19, #64
	bl	_init_waitqueue_head
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	bl	_bnxt_qplib_rcfw_start_irq
	mov	x20, x0
	cbz	w0, LBB0_14
; %bb.9:
	ldr	x0, [x19, #56]
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x20
	bl	_dev_err
	mov	x0, x19
	bl	_bnxt_qplib_disable_rcfw_channel
	b	LBB0_13
LBB0_10:
	ldr	x0, [x19, #56]
	ldr	w2, [x19, #8]
Lloh29:
	adrp	x1, l_.str@PAGE
Lloh30:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	b	LBB0_12
LBB0_11:
	ldr	x0, [x19, #56]
	ldr	w2, [x19, #12]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_err
	ldr	x0, [x19, #32]
	bl	_iounmap
	str	xzr, [x19, #32]
LBB0_12:
Lloh33:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh34:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_13:
	mov	x0, x20
	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
	add	sp, sp, #112
	ret
LBB0_14:
	ldr	x8, [x19, #48]
Lloh36:
	adrp	x9, _PBL_LVL_0@GOTPAGE
Lloh37:
	ldr	x9, [x9, _PBL_LVL_0@GOTPAGEOFF]
Lloh38:
	ldr	x9, [x9]
	ldr	x8, [x8, x9, lsl #3]
	ldr	w0, [x8]
	bl	_cpu_to_le64
	str	w0, [sp, #24]
	ldr	w8, [x19]
Lloh39:
	adrp	x9, _CMDQ_INIT_CMDQ_SIZE_SFT@GOTPAGE
Lloh40:
	ldr	x9, [x9, _CMDQ_INIT_CMDQ_SIZE_SFT@GOTPAGEOFF]
Lloh41:
	ldr	w9, [x9]
	lsl	w8, w8, w9
Lloh42:
	adrp	x9, _CMDQ_INIT_CMDQ_SIZE_MASK@GOTPAGE
Lloh43:
	ldr	x9, [x9, _CMDQ_INIT_CMDQ_SIZE_MASK@GOTPAGEOFF]
Lloh44:
	ldr	w9, [x9]
	and	w8, w8, w9
	ldr	w9, [x19, #40]
Lloh45:
	adrp	x10, _CMDQ_INIT_CMDQ_LVL_SFT@GOTPAGE
Lloh46:
	ldr	x10, [x10, _CMDQ_INIT_CMDQ_LVL_SFT@GOTPAGEOFF]
Lloh47:
	ldr	w10, [x10]
	lsl	w9, w9, w10
Lloh48:
	adrp	x10, _CMDQ_INIT_CMDQ_LVL_MASK@GOTPAGE
Lloh49:
	ldr	x10, [x10, _CMDQ_INIT_CMDQ_LVL_MASK@GOTPAGEOFF]
Lloh50:
	ldr	w10, [x10]
	and	w9, w9, w10
	orr	w0, w9, w8
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	ldr	w0, [x19, #24]
	bl	_cpu_to_le16
	str	x0, [sp, #8]
	ldr	x0, [x19, #32]
	add	x1, sp, #8
	mov	w2, #6
	bl	___iowrite32_copy
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_FIRMWARE_FIRST_FLAG,4,2        ; @FIRMWARE_FIRST_FLAG
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RCFW_COMM_PCI_BAR_REGION,4,2   ; @RCFW_COMM_PCI_BAR_REGION
	.comm	_RCFW_COMM_BASE_OFFSET,8,3      ; @RCFW_COMM_BASE_OFFSET
	.comm	_RCFW_COMM_SIZE,4,2             ; @RCFW_COMM_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CMDQ BAR region %d mapping failed\n"

	.comm	_RCFW_VF_COMM_PROD_OFFSET,4,2   ; @RCFW_VF_COMM_PROD_OFFSET
	.comm	_RCFW_PF_COMM_PROD_OFFSET,4,2   ; @RCFW_PF_COMM_PROD_OFFSET
	.comm	_RCFW_COMM_TRIG_OFFSET,4,2      ; @RCFW_COMM_TRIG_OFFSET
	.comm	_RCFW_COMM_CONS_PCI_BAR_REGION,4,2 ; @RCFW_COMM_CONS_PCI_BAR_REGION
l_.str.1:                               ; @.str.1
	.asciz	"CREQ BAR region %d resc start is 0!\n"

l_.str.2:                               ; @.str.2
	.asciz	"CREQ BAR region %d mapping failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"Failed to request IRQ for CREQ rc = 0x%x\n"

	.comm	_PBL_LVL_0,8,3                  ; @PBL_LVL_0
	.comm	_CMDQ_INIT_CMDQ_SIZE_SFT,4,2    ; @CMDQ_INIT_CMDQ_SIZE_SFT
	.comm	_CMDQ_INIT_CMDQ_SIZE_MASK,4,2   ; @CMDQ_INIT_CMDQ_SIZE_MASK
	.comm	_CMDQ_INIT_CMDQ_LVL_SFT,4,2     ; @CMDQ_INIT_CMDQ_LVL_SFT
	.comm	_CMDQ_INIT_CMDQ_LVL_MASK,4,2    ; @CMDQ_INIT_CMDQ_LVL_MASK
.subsections_via_symbols
