	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bnxt_hwrm_ring_grp_alloc
_bnxt_hwrm_ring_grp_alloc:              ## @bnxt_hwrm_ring_grp_alloc
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_BNXT_FLAG_CHIP_P5@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, (%rdi)
	jne	LBB0_10
## %bb.1:
	movq	%rdi, %r12
	leaq	16(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	cmpq	$0, 8(%r12)
	je	LBB0_2
## %bb.3:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -64(%rbp)
	movq	32(%r12), %rax
	movq	40(%r12), %r15
	movq	(%rax,%r13,8), %rax
	movl	(%rax), %r14d
	movq	_HWRM_RING_GRP_ALLOC@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	leaq	-96(%rbp), %rsi
	movl	$-1, %ecx
	movl	$-1, %r8d
	callq	_bnxt_hwrm_cmd_hdr_init
	movq	24(%r12), %rax
	leaq	(,%r14,4), %rcx
	leaq	(%rcx,%rcx,4), %rbx
	movl	16(%rax,%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -72(%rbp)
	movq	24(%r12), %rax
	movl	12(%rax,%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -80(%rbp)
	movq	24(%r12), %rax
	movl	8(%rax,%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -88(%rbp)
	movq	24(%r12), %rax
	movl	4(%rax,%rbx), %edi
	callq	_cpu_to_le16
	movq	%rax, -96(%rbp)
	movq	_HWRM_CMD_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rdi
	leaq	-96(%rbp), %rsi
	movl	$40, %edx
	callq	__hwrm_send_message
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %edi
	callq	_le32_to_cpu
	movq	24(%r12), %rcx
	leaq	(%r14,%r14,4), %rdx
	movl	%eax, (%rcx,%rdx,4)
	incq	%r13
	cmpq	8(%r12), %r13
	jb	LBB0_4
## %bb.7:
	xorl	%ebx, %ebx
	jmp	LBB0_8
LBB0_2:
	xorl	%ebx, %ebx
	jmp	LBB0_9
LBB0_5:
	movl	%eax, %ebx
LBB0_8:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_9:
	movq	%r14, %rdi
	callq	_mutex_unlock
LBB0_10:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ## @BNXT_FLAG_CHIP_P5
	.comm	_HWRM_RING_GRP_ALLOC,4,2        ## @HWRM_RING_GRP_ALLOC
	.comm	_HWRM_CMD_TIMEOUT,4,2           ## @HWRM_CMD_TIMEOUT
	.no_dead_strip	_bnxt_hwrm_ring_grp_alloc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bnxt_hwrm_ring_grp_alloc
_bnxt_hwrm_ring_grp_alloc:              ; @bnxt_hwrm_ring_grp_alloc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _BNXT_FLAG_CHIP_P5@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BNXT_FLAG_CHIP_P5@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_9
LBB0_2:
	mov	x20, x0
	add	x19, x0, #16
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_6
; %bb.3:
	mov	x22, #0
Lloh3:
	adrp	x23, _HWRM_RING_GRP_ALLOC@GOTPAGE
Lloh4:
	ldr	x23, [x23, _HWRM_RING_GRP_ALLOC@GOTPAGEOFF]
Lloh5:
	adrp	x24, _HWRM_CMD_TIMEOUT@GOTPAGE
Lloh6:
	ldr	x24, [x24, _HWRM_CMD_TIMEOUT@GOTPAGEOFF]
	mov	w25, #20
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [sp, #32]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp]
	ldp	x8, x27, [x20, #32]
	ldr	x8, [x8, x22, lsl #3]
	ldr	w26, [x8]
	ldr	w2, [x23]
	mov	x1, sp
	mov	x0, x20
	mov	w3, #-1
	mov	w4, #-1
	bl	_bnxt_hwrm_cmd_hdr_init
	ldr	x8, [x20, #24]
	add	x9, x26, x26, lsl #2
	lsl	x21, x9, #2
	add	x8, x8, x21
	ldr	w0, [x8, #16]
	bl	_cpu_to_le16
	str	x0, [sp, #24]
	ldr	x8, [x20, #24]
	add	x8, x8, x21
	ldr	w0, [x8, #12]
	bl	_cpu_to_le16
	str	x0, [sp, #16]
	ldr	x8, [x20, #24]
	add	x8, x8, x21
	ldr	w0, [x8, #8]
	bl	_cpu_to_le16
	str	x0, [sp, #8]
	ldr	x8, [x20, #24]
	add	x8, x8, x21
	ldr	w0, [x8, #4]
	bl	_cpu_to_le16
	str	x0, [sp]
	ldr	w3, [x24]
	mov	x1, sp
	mov	x0, x20
	mov	w2, #40
	bl	__hwrm_send_message
	cbnz	w0, LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x27]
	bl	_le32_to_cpu
	ldr	x8, [x20, #24]
	mul	x9, x26, x25
	str	w0, [x8, x9]
	add	x22, x22, #1
	ldr	x8, [x20, #8]
	cmp	x22, x8
	b.lo	LBB0_4
LBB0_6:
	mov	w21, #0
	b	LBB0_8
LBB0_7:
	mov	x21, x0
LBB0_8:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_9:
	mov	x0, x21
	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
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_BNXT_FLAG_CHIP_P5,4,2          ; @BNXT_FLAG_CHIP_P5
	.comm	_HWRM_RING_GRP_ALLOC,4,2        ; @HWRM_RING_GRP_ALLOC
	.comm	_HWRM_CMD_TIMEOUT,4,2           ; @HWRM_CMD_TIMEOUT
	.no_dead_strip	_bnxt_hwrm_ring_grp_alloc
.subsections_via_symbols
