	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function query_rmp_cmd
_query_rmp_cmd:                         ## @query_rmp_cmd
	.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	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	_query_rmp_out@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_MLX5_ST_SZ_BYTES
	movl	%eax, %r13d
	movq	_query_rmp_in@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_MLX5_ST_SZ_BYTES
	movl	%eax, %r12d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movl	%r13d, %edi
	callq	_kvzalloc
	movq	%rax, %r15
	movl	(%rbx), %esi
	movl	%r12d, %edi
	callq	_kvzalloc
	movq	%rax, %r14
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	testq	%r14, %r14
	je	LBB0_2
## %bb.3:
	movq	_query_rmp_in@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	movq	_opcode@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MLX5_CMD_OP_QUERY_RMP@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rsi
	callq	_MLX5_SET
	movq	(%rbx), %rdi
	movq	_rmpn@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movq	%r14, %rsi
	callq	_MLX5_SET
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	%r14, %rsi
	movl	%r12d, %edx
	movq	%r15, %rcx
	movl	%r13d, %r8d
	callq	_mlx5_cmd_exec
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movq	_query_rmp_out@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_rmp_context@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_MLX5_ADDR_OF
	movq	%rax, %rbx
	movq	_wq@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_ADDR_OF
	movq	%rax, %rdi
	movq	-48(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_get_wq
	movq	_state@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	callq	_MLX5_GET
	movq	_MLX5_RMPC_STATE_RDY@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.5:
	movq	_MLX5_SRQ_FLAG_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r12)
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	%r15, %rdi
	callq	_kvfree
	movq	%r14, %rdi
	callq	_kvfree
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_query_rmp_out,8,3              ## @query_rmp_out
	.comm	_query_rmp_in,8,3               ## @query_rmp_in
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_opcode,4,2                     ## @opcode
	.comm	_MLX5_CMD_OP_QUERY_RMP,4,2      ## @MLX5_CMD_OP_QUERY_RMP
	.comm	_rmpn,4,2                       ## @rmpn
	.comm	_rmp_context,4,2                ## @rmp_context
	.comm	_wq,4,2                         ## @wq
	.comm	_state,4,2                      ## @state
	.comm	_MLX5_RMPC_STATE_RDY,8,3        ## @MLX5_RMPC_STATE_RDY
	.comm	_MLX5_SRQ_FLAG_ERR,4,2          ## @MLX5_SRQ_FLAG_ERR
	.no_dead_strip	_query_rmp_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function query_rmp_cmd
_query_rmp_cmd:                         ; @query_rmp_cmd
	.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	x19, x2
	mov	x24, x1
	mov	x22, x0
Lloh0:
	adrp	x26, _query_rmp_out@GOTPAGE
Lloh1:
	ldr	x26, [x26, _query_rmp_out@GOTPAGEOFF]
	ldr	x0, [x26]
	bl	_MLX5_ST_SZ_BYTES
	mov	x23, x0
Lloh2:
	adrp	x27, _query_rmp_in@GOTPAGE
Lloh3:
	ldr	x27, [x27, _query_rmp_in@GOTPAGEOFF]
	ldr	x0, [x27]
	bl	_MLX5_ST_SZ_BYTES
	mov	x25, x0
Lloh4:
	adrp	x21, _GFP_KERNEL@GOTPAGE
Lloh5:
	ldr	x21, [x21, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x21]
	mov	x0, x23
	bl	_kvzalloc
	mov	x20, x0
	ldr	w1, [x21]
	mov	x0, x25
	bl	_kvzalloc
	mov	x21, x0
	cmp	x20, #0
	ccmp	x0, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_6
LBB0_2:
	ldr	x0, [x27]
Lloh9:
	adrp	x8, _opcode@GOTPAGE
Lloh10:
	ldr	x8, [x8, _opcode@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
Lloh12:
	adrp	x8, _MLX5_CMD_OP_QUERY_RMP@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX5_CMD_OP_QUERY_RMP@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x1, x21
	bl	_MLX5_SET
	ldr	x0, [x27]
Lloh15:
	adrp	x8, _rmpn@GOTPAGE
Lloh16:
	ldr	x8, [x8, _rmpn@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	ldr	w3, [x24]
	mov	x1, x21
	bl	_MLX5_SET
	ldr	w0, [x22]
	mov	x1, x21
	mov	x2, x25
	mov	x3, x20
	mov	x4, x23
	bl	_mlx5_cmd_exec
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	x0, [x26]
Lloh18:
	adrp	x8, _rmp_context@GOTPAGE
Lloh19:
	ldr	x8, [x8, _rmp_context@GOTPAGEOFF]
Lloh20:
	ldr	w2, [x8]
	mov	x1, x20
	bl	_MLX5_ADDR_OF
	mov	x22, x0
Lloh21:
	adrp	x8, _wq@GOTPAGE
Lloh22:
	ldr	x8, [x8, _wq@GOTPAGEOFF]
Lloh23:
	ldr	w2, [x8]
	mov	x1, x0
	bl	_MLX5_ADDR_OF
	mov	x1, x19
	bl	_get_wq
Lloh24:
	adrp	x8, _state@GOTPAGE
Lloh25:
	ldr	x8, [x8, _state@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x1, x22
	bl	_MLX5_GET
Lloh27:
	adrp	x8, _MLX5_RMPC_STATE_RDY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MLX5_RMPC_STATE_RDY@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_5
; %bb.4:
	mov	w22, #0
	b	LBB0_6
LBB0_5:
	mov	w22, #0
Lloh30:
	adrp	x8, _MLX5_SRQ_FLAG_ERR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MLX5_SRQ_FLAG_ERR@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_6:
	mov	x0, x20
	bl	_kvfree
	mov	x0, x21
	bl	_kvfree
	mov	x0, x22
	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
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_query_rmp_out,8,3              ; @query_rmp_out
	.comm	_query_rmp_in,8,3               ; @query_rmp_in
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_opcode,4,2                     ; @opcode
	.comm	_MLX5_CMD_OP_QUERY_RMP,4,2      ; @MLX5_CMD_OP_QUERY_RMP
	.comm	_rmpn,4,2                       ; @rmpn
	.comm	_rmp_context,4,2                ; @rmp_context
	.comm	_wq,4,2                         ; @wq
	.comm	_state,4,2                      ; @state
	.comm	_MLX5_RMPC_STATE_RDY,8,3        ; @MLX5_RMPC_STATE_RDY
	.comm	_MLX5_SRQ_FLAG_ERR,4,2          ; @MLX5_SRQ_FLAG_ERR
	.no_dead_strip	_query_rmp_cmd
.subsections_via_symbols
