	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_vsc_sem_set_space         ## -- Begin function mlx5_vsc_sem_set_space
	.p2align	4, 0x90
_mlx5_vsc_sem_set_space:                ## @mlx5_vsc_sem_set_space
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	$0, -40(%rbp)
	movq	_MLX5_SEMAPHORE_SPACE_DOMAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_mlx5_vsc_gw_set_space
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_mlx5_core_warn
	jmp	LBB0_12
LBB0_2:
	movq	_MLX5_VSC_LOCK@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_3
## %bb.4:
	movq	_VSC_COUNTER_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rdx
	movq	%r15, %rdi
	callq	_vsc_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movq	-40(%rbp), %rdx
	jmp	LBB0_6
LBB0_3:
	xorl	%edx, %edx
LBB0_6:
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mlx5_vsc_gw_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_mlx5_vsc_gw_read
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_9:
	movq	-48(%rbp), %rax
	xorl	%ebx, %ebx
	cmpq	-40(%rbp), %rax
	je	LBB0_12
## %bb.10:
	movq	_EBUSY@GOTPCREL(%rip), %rax
LBB0_11:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_SEMAPHORE_SPACE_DOMAIN,4,2 ## @MLX5_SEMAPHORE_SPACE_DOMAIN
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to set gw space %d\n"

	.comm	_MLX5_VSC_LOCK,4,2              ## @MLX5_VSC_LOCK
	.comm	_VSC_COUNTER_OFFSET,4,2         ## @VSC_COUNTER_OFFSET
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_vsc_sem_set_space         ; -- Begin function mlx5_vsc_sem_set_space
	.p2align	2
_mlx5_vsc_sem_set_space:                ; @mlx5_vsc_sem_set_space
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	str	xzr, [sp]
Lloh0:
	adrp	x8, _MLX5_SEMAPHORE_SPACE_DOMAIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_SEMAPHORE_SPACE_DOMAIN@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_mlx5_vsc_gw_set_space
	cbz	w0, LBB0_2
; %bb.1:
	mov	x21, x0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_mlx5_core_warn
	b	LBB0_13
LBB0_2:
Lloh5:
	adrp	x8, _MLX5_VSC_LOCK@GOTPAGE
Lloh6:
	ldr	x8, [x8, _MLX5_VSC_LOCK@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_5
; %bb.3:
Lloh8:
	adrp	x8, _VSC_COUNTER_OFFSET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VSC_COUNTER_OFFSET@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	mov	x2, sp
	mov	x0, x19
	bl	_vsc_read
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.4:
	ldr	x2, [sp]
	b	LBB0_6
LBB0_5:
	mov	x2, #0
LBB0_6:
	mov	x0, x19
	mov	x1, x20
	bl	_mlx5_vsc_gw_write
	mov	x21, x0
	cbnz	w0, LBB0_13
; %bb.7:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_mlx5_vsc_gw_read
	cbz	w0, LBB0_9
; %bb.8:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_12
LBB0_9:
	ldp	x9, x8, [sp]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.10:
	mov	w21, #0
	b	LBB0_13
LBB0_11:
Lloh13:
	adrp	x8, _EBUSY@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_13:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_SEMAPHORE_SPACE_DOMAIN,4,2 ; @MLX5_SEMAPHORE_SPACE_DOMAIN
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to set gw space %d\n"

	.comm	_MLX5_VSC_LOCK,4,2              ; @MLX5_VSC_LOCK
	.comm	_VSC_COUNTER_OFFSET,4,2         ; @VSC_COUNTER_OFFSET
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
