	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i40iw_hwreg_mr
_i40iw_hwreg_mr:                        ## @i40iw_hwreg_mr
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	24(%rsi), %edi
	callq	_to_iwpd
	movq	%rax, %r13
	leaq	4(%r14), %rdi
	movl	$1, %esi
	callq	_i40iw_get_cqp_request
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %rdi
	addq	$24, %rdi
	xorl	%esi, %esi
	movl	$56, %edx
	callq	_memset
	movq	40(%r15), %rax
	movq	%rax, 72(%rbx)
	movslq	(%r15), %rax
	movq	_I40IW_CQPSQ_STAG_IDX_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%eax, %edx
	sarl	%cl, %edx
	movl	%edx, 24(%rbx)
	movq	%rax, 64(%rbx)
	movl	20(%r15), %eax
	movl	%eax, 56(%rbx)
	movl	%r12d, 52(%rbx)
	movl	(%r13), %eax
	movl	%eax, 48(%rbx)
	movq	_I40IW_ADDR_TYPE_VA_BASED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 44(%rbx)
	movl	16(%r15), %eax
	movl	%eax, 40(%rbx)
	cmpq	$0, 32(%r15)
	je	LBB0_6
## %bb.3:
	movq	48(%r15), %rax
	movq	_I40IW_LEVEL_1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.4:
	movl	60(%r15), %eax
	movl	%eax, 36(%rbx)
	movl	$1, 28(%rbx)
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_6:
	movq	8(%r15), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	jmp	LBB0_7
LBB0_5:
	movl	56(%r15), %eax
	movl	%eax, 36(%rbx)
	movl	$3, 28(%rbx)
LBB0_7:
	movq	_OP_MR_REG_NON_SHARED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 80(%rbx)
	movl	$1, (%rbx)
	movq	%r14, 16(%rbx)
	movq	%rbx, 8(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_i40iw_handle_cqp_op
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	leaq	L_.str(%rip), %rdi
	callq	_i40iw_pr_err
	jmp	LBB0_10
LBB0_8:
	xorl	%ebx, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_I40IW_CQPSQ_STAG_IDX_SHIFT,4,2 ## @I40IW_CQPSQ_STAG_IDX_SHIFT
	.comm	_I40IW_ADDR_TYPE_VA_BASED,4,2   ## @I40IW_ADDR_TYPE_VA_BASED
	.comm	_I40IW_LEVEL_1,8,3              ## @I40IW_LEVEL_1
	.comm	_OP_MR_REG_NON_SHARED,4,2       ## @OP_MR_REG_NON_SHARED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CQP-OP MR Reg fail"

	.no_dead_strip	_i40iw_hwreg_mr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i40iw_hwreg_mr
_i40iw_hwreg_mr:                        ; @i40iw_hwreg_mr
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x1, #24]
	bl	_to_iwpd
	mov	x23, x0
	add	x0, x19, #4
	mov	w1, #1
	bl	_i40iw_get_cqp_request
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	add	x0, x0, #24
	mov	w1, #0
	mov	w2, #56
	bl	_memset
	ldrsw	x8, [x21]
Lloh0:
	adrp	x9, _I40IW_CQPSQ_STAG_IDX_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _I40IW_CQPSQ_STAG_IDX_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	asr	w9, w8, w9
	str	w9, [x20, #24]
	ldp	x10, x9, [x21, #32]
	stp	x8, x9, [x20, #64]
	ldp	w9, w8, [x21, #16]
	str	w8, [x20, #56]
	ldr	w8, [x23]
	stp	w8, w22, [x20, #48]
Lloh3:
	adrp	x8, _I40IW_ADDR_TYPE_VA_BASED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _I40IW_ADDR_TYPE_VA_BASED@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	stp	w9, w8, [x20, #40]
	cbz	x10, LBB0_5
; %bb.2:
	ldr	x8, [x21, #48]
Lloh6:
	adrp	x9, _I40IW_LEVEL_1@GOTPAGE
Lloh7:
	ldr	x9, [x9, _I40IW_LEVEL_1@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x21, #60]
	str	w8, [x20, #36]
	mov	w8, #1
	b	LBB0_7
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_11
LBB0_5:
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	str	w8, [x20, #32]
	b	LBB0_8
LBB0_6:
	ldr	w8, [x21, #56]
	str	w8, [x20, #36]
	mov	w8, #3
LBB0_7:
	str	w8, [x20, #28]
LBB0_8:
Lloh12:
	adrp	x8, _OP_MR_REG_NON_SHARED@GOTPAGE
Lloh13:
	ldr	x8, [x8, _OP_MR_REG_NON_SHARED@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x20, #80]
	mov	w8, #1
	str	w8, [x20]
	stp	x20, x19, [x20, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_i40iw_handle_cqp_op
	cbz	w0, LBB0_10
; %bb.9:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w19, w8
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	bl	_i40iw_pr_err
	b	LBB0_11
LBB0_10:
	mov	w19, #0
LBB0_11:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_I40IW_CQPSQ_STAG_IDX_SHIFT,4,2 ; @I40IW_CQPSQ_STAG_IDX_SHIFT
	.comm	_I40IW_ADDR_TYPE_VA_BASED,4,2   ; @I40IW_ADDR_TYPE_VA_BASED
	.comm	_I40IW_LEVEL_1,8,3              ; @I40IW_LEVEL_1
	.comm	_OP_MR_REG_NON_SHARED,4,2       ; @OP_MR_REG_NON_SHARED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CQP-OP MR Reg fail"

	.no_dead_strip	_i40iw_hwreg_mr
.subsections_via_symbols
