	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_hwrm_get_rings
_bnxt_hwrm_get_rings:                   ## @bnxt_hwrm_get_rings
	.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
	movq	48(%rdi), %r13
	movq	$0, -56(%rbp)
	xorl	%r15d, %r15d
	cmpl	$67073, (%rdi)                  ## imm = 0x10601
	jl	LBB0_13
## %bb.1:
	movq	%rdi, %rbx
	movq	_HWRM_FUNC_QCFG@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-56(%rbp), %r15
	movq	%r15, %rsi
	movl	$-1, %ecx
	movl	$-1, %r8d
	callq	_bnxt_hwrm_cmd_hdr_init
	movl	$65535, %edi                    ## imm = 0xFFFF
	callq	_cpu_to_le16
	movl	%eax, -56(%rbp)
	leaq	8(%rbx), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movl	$8, %edx
	callq	__hwrm_send_message
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.2:
	movl	24(%r13), %edi
	callq	_le16_to_cpu
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	callq	_BNXT_NEW_RM
	xorl	%r15d, %r15d
	testq	%rax, %rax
	je	LBB0_12
## %bb.3:
	movl	20(%r13), %edi
	callq	_le16_to_cpu
	movl	%eax, 20(%rbx)
	movl	16(%r13), %edi
	callq	_le32_to_cpu
	movl	%eax, 24(%rbx)
	movl	12(%r13), %edi
	callq	_le16_to_cpu
	movq	%rax, 40(%rbx)
	movl	8(%r13), %edi
	callq	_le16_to_cpu
	movq	%rax, %r12
	movl	4(%r13), %edi
	callq	_le16_to_cpu
	movl	%r12d, 28(%rbx)
	movl	4(%rbx), %edx
	movq	_BNXT_FLAG_CHIP_P5@GOTPCREL(%rip), %rcx
	testl	%edx, (%rcx)
	je	LBB0_11
## %bb.4:
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	20(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	16(%rbx), %ecx
	movl	%ecx, -48(%rbp)
	movq	_BNXT_FLAG_AGG_RINGS@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_6
## %bb.5:
	sarl	%eax
	movl	%eax, -44(%rbp)
LBB0_6:
	addl	%ecx, %eax
	cmpl	%r12d, %eax
	jle	LBB0_10
## %bb.7:
	leaq	-44(%rbp), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, %rdi
	movl	%r12d, %ecx
	xorl	%r8d, %r8d
	callq	_bnxt_trim_rings
	movq	_BNXT_FLAG_AGG_RINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	-44(%rbp), %eax
	testl	%ecx, 4(%rbx)
	je	LBB0_9
## %bb.8:
	addl	%eax, %eax
	movl	%eax, -44(%rbp)
LBB0_9:
	movl	%eax, 20(%rbx)
	movl	-48(%rbp), %eax
	movl	%eax, 16(%rbx)
LBB0_10:
	movl	(%r13), %edi
	callq	_le16_to_cpu
	movl	%eax, 28(%rbx)
	movl	-44(%rbp), %eax
	movl	%eax, 24(%rbx)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
LBB0_11:
	movl	%r12d, 32(%rbx)
	movl	%eax, 36(%rbx)
LBB0_12:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_13:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HWRM_FUNC_QCFG,4,2             ## @HWRM_FUNC_QCFG
	.comm	_HWRM_CMD_TIMEOUT,4,2           ## @HWRM_CMD_TIMEOUT
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ## @BNXT_FLAG_CHIP_P5
	.comm	_BNXT_FLAG_AGG_RINGS,4,2        ## @BNXT_FLAG_AGG_RINGS
	.no_dead_strip	_bnxt_hwrm_get_rings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_hwrm_get_rings
_bnxt_hwrm_get_rings:                   ; @bnxt_hwrm_get_rings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	ldr	x24, [x0, #48]
	str	xzr, [sp, #8]
	ldr	w8, [x0]
	mov	w9, #1537
	movk	w9, #1, lsl #16
	cmp	w8, w9
	b.ge	LBB0_2
; %bb.1:
	mov	w23, #0
	b	LBB0_15
LBB0_2:
	mov	x19, x0
Lloh0:
	adrp	x8, _HWRM_FUNC_QCFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _HWRM_FUNC_QCFG@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x1, sp, #8
	mov	w3, #-1
	mov	w4, #-1
	bl	_bnxt_hwrm_cmd_hdr_init
	mov	w0, #65535
	bl	_cpu_to_le16
	str	w0, [sp, #8]
	add	x20, x19, #8
	mov	x0, x20
	bl	_mutex_lock
Lloh3:
	adrp	x8, _HWRM_CMD_TIMEOUT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HWRM_CMD_TIMEOUT@GOTPAGEOFF]
Lloh5:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	bl	__hwrm_send_message
	mov	x23, x0
	cbnz	w0, LBB0_14
; %bb.3:
	ldr	w0, [x24, #24]
	bl	_le16_to_cpu
	str	w0, [x19, #16]
	mov	x0, x19
	bl	_BNXT_NEW_RM
	cbz	x0, LBB0_13
; %bb.4:
	ldr	w0, [x24, #20]
	bl	_le16_to_cpu
	str	w0, [x19, #20]
	ldr	w0, [x24, #16]
	bl	_le32_to_cpu
	str	w0, [x19, #24]
	ldr	w0, [x24, #12]
	bl	_le16_to_cpu
	str	x0, [x19, #40]
	ldr	w0, [x24, #8]
	bl	_le16_to_cpu
	mov	x21, x0
	ldr	w0, [x24, #4]
	bl	_le16_to_cpu
	mov	x22, x0
	str	w21, [x19, #28]
	ldr	w10, [x19, #4]
Lloh6:
	adrp	x8, _BNXT_FLAG_CHIP_P5@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BNXT_FLAG_CHIP_P5@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_12
; %bb.5:
	ldp	w9, w8, [x19, #16]
	stp	w9, w8, [sp]
Lloh9:
	adrp	x23, _BNXT_FLAG_AGG_RINGS@GOTPAGE
Lloh10:
	ldr	x23, [x23, _BNXT_FLAG_AGG_RINGS@GOTPAGEOFF]
	ldr	w11, [x23]
	tst	w11, w10
	b.eq	LBB0_7
; %bb.6:
	asr	w8, w8, #1
	str	w8, [sp, #4]
LBB0_7:
	add	w8, w8, w9
	cmp	w8, w21
	b.le	LBB0_11
; %bb.8:
	add	x1, sp, #4
	mov	x2, sp
	mov	x0, x19
	mov	x3, x21
	mov	w4, #0
	bl	_bnxt_trim_rings
	ldr	w9, [x19, #4]
	ldr	w10, [x23]
	ldr	w8, [sp, #4]
	tst	w10, w9
	b.eq	LBB0_10
; %bb.9:
	lsl	w8, w8, #1
	str	w8, [sp, #4]
LBB0_10:
	ldr	w9, [sp]
	stp	w9, w8, [x19, #16]
LBB0_11:
	ldr	w0, [x24]
	bl	_le16_to_cpu
	ldr	w8, [sp, #4]
	stp	w8, w0, [x19, #24]
LBB0_12:
	mov	w23, #0
	stp	w21, w22, [x19, #32]
	b	LBB0_14
LBB0_13:
	mov	w23, #0
LBB0_14:
	mov	x0, x20
	bl	_mutex_unlock
LBB0_15:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_HWRM_FUNC_QCFG,4,2             ; @HWRM_FUNC_QCFG
	.comm	_HWRM_CMD_TIMEOUT,4,2           ; @HWRM_CMD_TIMEOUT
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ; @BNXT_FLAG_CHIP_P5
	.comm	_BNXT_FLAG_AGG_RINGS,4,2        ; @BNXT_FLAG_AGG_RINGS
	.no_dead_strip	_bnxt_hwrm_get_rings
.subsections_via_symbols
