	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx5_fpga_tls_setup_stream_cmd
_mlx5_fpga_tls_setup_stream_cmd:        ## @mlx5_fpga_tls_setup_stream_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	leaq	24(%rsi), %rsi
	leaq	8(%rbx), %r15
	movq	8(%rbx), %rax
	movq	%rsi, 8(%rax)
	movq	_MLX5_TLS_COMMAND_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rax)
	movq	_tls_cmd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_command_type@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_CMD_SETUP_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	callq	_MLX5_SET
	leaq	20(%rbx), %r12
	movq	%r12, %rdi
	callq	_init_completion
	leaq	16(%rbx), %r13
	movq	_MLX5_FPGA_CMD_PENDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_atomic_set
	movl	$-1, (%rbx)
	movl	(%r14), %edi
	movq	_mlx5_fpga_tls_setup_completion@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rsi
	callq	_mlx5_fpga_tls_cmd_send
	movq	%r12, %rdi
	callq	_wait_for_completion_killable
	movq	_MLX5_FPGA_CMD_ABANDONED@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_atomic_xchg_acquire
	xorl	%edi, %edi
	movq	_MLX5_FPGA_CMD_PENDING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINTR@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movl	(%rbx), %edi
	callq	_unlikely
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	subl	(%rcx), %ebx
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovel	%ecx, %ebx
	movq	%r15, %rdi
	callq	_mlx5_fpga_tls_put_command_ctx
LBB0_3:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_TLS_COMMAND_SIZE,4,2      ## @MLX5_TLS_COMMAND_SIZE
	.comm	_tls_cmd,4,2                    ## @tls_cmd
	.comm	_command_type,4,2               ## @command_type
	.comm	_CMD_SETUP_STREAM,4,2           ## @CMD_SETUP_STREAM
	.comm	_MLX5_FPGA_CMD_PENDING,4,2      ## @MLX5_FPGA_CMD_PENDING
	.comm	_mlx5_fpga_tls_setup_completion,4,2 ## @mlx5_fpga_tls_setup_completion
	.comm	_MLX5_FPGA_CMD_ABANDONED,4,2    ## @MLX5_FPGA_CMD_ABANDONED
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.no_dead_strip	_mlx5_fpga_tls_setup_stream_cmd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx5_fpga_tls_setup_stream_cmd
_mlx5_fpga_tls_setup_stream_cmd:        ; @mlx5_fpga_tls_setup_stream_cmd
	.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	x20, x1
	mov	x21, x0
	add	x1, x1, #24
	mov	x19, x20
	ldr	x8, [x19, #8]!
Lloh0:
	adrp	x9, _MLX5_TLS_COMMAND_SIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX5_TLS_COMMAND_SIZE@GOTPAGEOFF]
	str	x1, [x8, #8]
Lloh2:
	ldr	w9, [x9]
	str	w9, [x8]
Lloh3:
	adrp	x8, _tls_cmd@GOTPAGE
Lloh4:
	ldr	x8, [x8, _tls_cmd@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _command_type@GOTPAGE
Lloh7:
	ldr	x8, [x8, _command_type@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _CMD_SETUP_STREAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _CMD_SETUP_STREAM@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x8]
	bl	_MLX5_SET
	add	x22, x20, #20
	mov	x0, x22
	bl	_init_completion
	add	x23, x20, #16
Lloh12:
	adrp	x24, _MLX5_FPGA_CMD_PENDING@GOTPAGE
Lloh13:
	ldr	x24, [x24, _MLX5_FPGA_CMD_PENDING@GOTPAGEOFF]
	ldr	w1, [x24]
	mov	x0, x23
	bl	_atomic_set
	mov	w8, #-1
	str	w8, [x20]
	ldr	w0, [x21]
Lloh14:
	adrp	x8, _mlx5_fpga_tls_setup_completion@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mlx5_fpga_tls_setup_completion@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_mlx5_fpga_tls_cmd_send
	mov	x0, x22
	bl	_wait_for_completion_killable
Lloh17:
	adrp	x8, _MLX5_FPGA_CMD_ABANDONED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MLX5_FPGA_CMD_ABANDONED@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x23
	bl	_atomic_xchg_acquire
	ldr	w8, [x24]
	cmp	w0, w8
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh20:
	adrp	x8, _EINTR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINTR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_3
LBB0_2:
	ldr	w0, [x20]
	bl	_unlikely
Lloh23:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh24:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	cmp	x0, #0
	csneg	w20, wzr, w8, eq
	mov	x0, x19
	bl	_mlx5_fpga_tls_put_command_ctx
LBB0_3:
	mov	x0, x20
	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	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_TLS_COMMAND_SIZE,4,2      ; @MLX5_TLS_COMMAND_SIZE
	.comm	_tls_cmd,4,2                    ; @tls_cmd
	.comm	_command_type,4,2               ; @command_type
	.comm	_CMD_SETUP_STREAM,4,2           ; @CMD_SETUP_STREAM
	.comm	_MLX5_FPGA_CMD_PENDING,4,2      ; @MLX5_FPGA_CMD_PENDING
	.comm	_mlx5_fpga_tls_setup_completion,4,2 ; @mlx5_fpga_tls_setup_completion
	.comm	_MLX5_FPGA_CMD_ABANDONED,4,2    ; @MLX5_FPGA_CMD_ABANDONED
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.no_dead_strip	_mlx5_fpga_tls_setup_stream_cmd
.subsections_via_symbols
