	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_cmd_invoke
_mlx5_cmd_invoke:                       ## @mlx5_cmd_invoke
	.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
	movl	%r9d, %r15d
	movl	48(%rbp), %r9d
	movl	40(%rbp), %eax
	movq	32(%rbp), %rbx
	movl	24(%rbp), %r14d
	movq	16(%rbp), %r10
	testl	%r15d, %r15d
	je	LBB0_3
## %bb.1:
	testl	%r14d, %r14d
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_16:
	movl	%r13d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movq	%rsi, %rbx
	movl	%r15d, %r9d
	pushq	%r14
	pushq	%r10
	callq	_alloc_cmd
	addq	$16, %rsp
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.17:
	movq	%r12, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_4:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movl	-72(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 36(%r12)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r12)
	testl	%r15d, %r15d
	jne	LBB0_6
## %bb.5:
	leaq	32(%r12), %rdi
	callq	_init_completion
LBB0_6:
	leaq	28(%r12), %rdi
	movq	_cb_timeout_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	movq	%r12, %r13
	addq	$24, %r13
	movq	_cmd_work_handler@GOTPCREL(%rip), %rsi
	movq	%r13, %rdi
	callq	_INIT_WORK
	testl	%r14d, %r14d
	je	LBB0_13
## %bb.7:
	movq	%r13, %rdi
	callq	_cmd_work_handler
	jmp	LBB0_8
LBB0_13:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	movq	%r13, %rsi
	callq	_queue_work
	testl	%eax, %eax
	je	LBB0_14
LBB0_8:
	xorl	%r13d, %r13d
	testl	%r15d, %r15d
	jne	LBB0_16
## %bb.9:
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_wait_func
	movl	%eax, %r13d
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	movl	%r13d, %ecx
	addl	(%rax), %ecx
	je	LBB0_16
## %bb.10:
	movq	16(%r12), %r14
	subq	8(%r12), %r14
	movq	_mbox_in@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	_opcode@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_MLX5_GET
	movq	%rax, %rbx
	movq	(%r15), %rdi
	callq	_ARRAY_SIZE
	movq	%rbx, %rdi
	cmpq	%rax, %rbx
	jae	LBB0_12
## %bb.11:
	movq	(%r15), %rbx
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	leaq	(%rdi,%rdi,2), %r14
	leaq	(%rbx,%r14,4), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_spin_lock_irq
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addl	%eax, 8(%rbx,%r14,4)
	incl	4(%rbx,%r14,4)
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_irq
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_12:
	movq	_MLX5_CMD_TIME@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %ebx
	shll	%cl, %ebx
	callq	_mlx5_command_str
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	%eax, %ecx
	movq	%r14, %r8
	callq	_mlx5_core_dbg_mask
	movl	4(%r12), %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	jmp	LBB0_15
LBB0_14:
	leaq	L_.str(%rip), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mlx5_core_warn
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_15:
	movq	%r12, %rdi
	callq	_free_cmd
	jmp	LBB0_16
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_cb_timeout_handler,4,2         ## @cb_timeout_handler
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to queue work\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_mbox_in,4,2                    ## @mbox_in
	.comm	_opcode,4,2                     ## @opcode
	.comm	_MLX5_CMD_TIME,4,2              ## @MLX5_CMD_TIME
L_.str.1:                               ## @.str.1
	.asciz	"fw exec time for %s is %lld nsec\n"

	.no_dead_strip	_mlx5_cmd_invoke
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_cmd_invoke
_mlx5_cmd_invoke:                       ; @mlx5_cmd_invoke
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x23, x7
	mov	x21, x5
	mov	x22, x1
	mov	x20, x0
	ldp	w26, w24, [x29, #24]
	ldr	x25, [x29, #16]
	cbz	w5, LBB0_4
; %bb.1:
	cbz	w23, LBB0_4
; %bb.2:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
	mov	x0, x20
	mov	x1, x22
	mov	x5, x21
	mov	x7, x23
	bl	_alloc_cmd
	mov	x19, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
LBB0_6:
	str	w26, [x19, #36]
	str	w24, [x19]
	cbnz	w21, LBB0_8
; %bb.7:
	add	x0, x19, #32
	bl	_init_completion
LBB0_8:
	add	x0, x19, #28
Lloh3:
	adrp	x8, _cb_timeout_handler@GOTPAGE
Lloh4:
	ldr	x8, [x8, _cb_timeout_handler@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	add	x24, x19, #24
Lloh6:
	adrp	x1, _cmd_work_handler@GOTPAGE
Lloh7:
	ldr	x1, [x1, _cmd_work_handler@GOTPAGEOFF]
	mov	x0, x24
	bl	_INIT_WORK
	cbz	w23, LBB0_10
; %bb.9:
	mov	x0, x24
	bl	_cmd_work_handler
	b	LBB0_11
LBB0_10:
	ldr	w0, [x20, #8]
	mov	x1, x24
	bl	_queue_work
	cbz	w0, LBB0_17
LBB0_11:
	cbz	w21, LBB0_13
; %bb.12:
	mov	w21, #0
	b	LBB0_3
LBB0_13:
	mov	x0, x20
	mov	x1, x19
	bl	_wait_func
	mov	x21, x0
Lloh8:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	cmn	w0, w8
	b.eq	LBB0_3
; %bb.14:
	ldp	x9, x8, [x19, #8]
Lloh11:
	adrp	x10, _mbox_in@GOTPAGE
Lloh12:
	ldr	x10, [x10, _mbox_in@GOTPAGEOFF]
	sub	x23, x8, x9
Lloh13:
	ldr	w0, [x10]
	ldr	w1, [x22]
Lloh14:
	adrp	x8, _opcode@GOTPAGE
Lloh15:
	ldr	x8, [x8, _opcode@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	bl	_MLX5_GET
	mov	x22, x0
	ldr	x0, [x20]
	bl	_ARRAY_SIZE
	cmp	x22, x0
	b.hs	LBB0_16
; %bb.15:
	ldr	x8, [x20]
	mov	w9, #12
	madd	x24, x22, x9, x8
	mov	x0, x24
	bl	_spin_lock_irq
	ldp	w9, w8, [x24, #4]
	add	w8, w8, w23
	add	w9, w9, #1
	stp	w9, w8, [x24, #4]
	mov	x0, x24
	bl	_spin_unlock_irq
LBB0_16:
Lloh17:
	adrp	x8, _MLX5_CMD_TIME@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLX5_CMD_TIME@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w24, w9, w8
	mov	x0, x22
	bl	_mlx5_command_str
	mov	x3, x0
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	mov	x1, x24
	mov	x4, x23
	bl	_mlx5_core_dbg_mask
	ldr	w8, [x19, #4]
	str	w8, [x25]
	b	LBB0_18
LBB0_17:
Lloh22:
	adrp	x1, l_.str@PAGE
Lloh23:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx5_core_warn
Lloh24:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh25:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_18:
	mov	x0, x19
	bl	_free_cmd
	b	LBB0_3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_cb_timeout_handler,4,2         ; @cb_timeout_handler
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to queue work\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_mbox_in,4,2                    ; @mbox_in
	.comm	_opcode,4,2                     ; @opcode
	.comm	_MLX5_CMD_TIME,4,2              ; @MLX5_CMD_TIME
l_.str.1:                               ; @.str.1
	.asciz	"fw exec time for %s is %lld nsec\n"

	.no_dead_strip	_mlx5_cmd_invoke
.subsections_via_symbols
