	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_vsc_gw_set_space          ## -- Begin function mlx5_vsc_gw_set_space
	.p2align	4, 0x90
_mlx5_vsc_gw_set_space:                 ## @mlx5_vsc_gw_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	%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	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	$0, -48(%rbp)
	callq	_mlx5_vsc_accessible
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	testq	%r14, %r14
	je	LBB0_4
## %bb.3:
	movq	$0, (%r14)
LBB0_4:
	movq	_VSC_CTRL_OFFSET@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_vsc_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.5:
	movq	-48(%rbp), %rdi
	movq	_VSC_SPACE_BIT_OFFS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_VSC_SPACE_BIT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r12d, %esi
	callq	_MLX5_MERGE
	movq	%rax, -48(%rbp)
	movl	(%r13), %esi
	movq	%r15, %rdi
	movq	%rax, %rdx
	callq	_vsc_write
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.6:
	movl	(%r13), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_vsc_read
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_13
## %bb.7:
	movq	-48(%rbp), %rdi
	movq	_VSC_STATUS_BIT_OFFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VSC_STATUS_BIT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_MLX5_EXTRACT
	testq	%rax, %rax
	je	LBB0_1
## %bb.8:
	xorl	%ebx, %ebx
	testq	%r14, %r14
	je	LBB0_13
## %bb.9:
	movq	-48(%rbp), %rdi
	movq	_VSC_SIZE_VLD_BIT_OFFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VSC_SIZE_VLD_BIT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_MLX5_EXTRACT
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:
	movq	_VSC_ADDR_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rdx
	movq	%r15, %rdi
	callq	_vsc_read
	testl	%eax, %eax
	je	LBB0_12
## %bb.11:
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_mlx5_core_warn
	movl	%r12d, %ebx
	jmp	LBB0_13
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	movq	-48(%rbp), %rdi
	movq	_VSC_ADDR_BIT_OFFS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_VSC_ADDR_BIT_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_MLX5_EXTRACT
	movq	%rax, (%r14)
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_VSC_CTRL_OFFSET,4,2            ## @VSC_CTRL_OFFSET
	.comm	_VSC_SPACE_BIT_OFFS,4,2         ## @VSC_SPACE_BIT_OFFS
	.comm	_VSC_SPACE_BIT_LEN,4,2          ## @VSC_SPACE_BIT_LEN
	.comm	_VSC_STATUS_BIT_OFFS,4,2        ## @VSC_STATUS_BIT_OFFS
	.comm	_VSC_STATUS_BIT_LEN,4,2         ## @VSC_STATUS_BIT_LEN
	.comm	_VSC_SIZE_VLD_BIT_OFFS,4,2      ## @VSC_SIZE_VLD_BIT_OFFS
	.comm	_VSC_SIZE_VLD_BIT_LEN,4,2       ## @VSC_SIZE_VLD_BIT_LEN
	.comm	_VSC_ADDR_OFFSET,4,2            ## @VSC_ADDR_OFFSET
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get max space size\n"

	.comm	_VSC_ADDR_BIT_OFFS,4,2          ## @VSC_ADDR_BIT_OFFS
	.comm	_VSC_ADDR_BIT_LEN,4,2           ## @VSC_ADDR_BIT_LEN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_vsc_gw_set_space          ; -- Begin function mlx5_vsc_gw_set_space
	.p2align	2
_mlx5_vsc_gw_set_space:                 ; @mlx5_vsc_gw_set_space
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	str	xzr, [sp, #8]
	bl	_mlx5_vsc_accessible
	cbz	w0, LBB0_11
; %bb.1:
	cbz	x19, LBB0_3
; %bb.2:
	str	xzr, [x19]
LBB0_3:
Lloh0:
	adrp	x23, _VSC_CTRL_OFFSET@GOTPAGE
Lloh1:
	ldr	x23, [x23, _VSC_CTRL_OFFSET@GOTPAGEOFF]
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x20
	bl	_vsc_read
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.4:
	ldr	x0, [sp, #8]
Lloh2:
	adrp	x8, _VSC_SPACE_BIT_OFFS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VSC_SPACE_BIT_OFFS@GOTPAGEOFF]
Lloh4:
	ldr	w2, [x8]
Lloh5:
	adrp	x8, _VSC_SPACE_BIT_LEN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _VSC_SPACE_BIT_LEN@GOTPAGEOFF]
Lloh7:
	ldr	w3, [x8]
	mov	x1, x22
	bl	_MLX5_MERGE
	mov	x2, x0
	str	x0, [sp, #8]
	ldr	w1, [x23]
	mov	x0, x20
	bl	_vsc_write
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.5:
	ldr	w1, [x23]
	add	x2, sp, #8
	mov	x0, x20
	bl	_vsc_read
	mov	x21, x0
	cbnz	w0, LBB0_12
; %bb.6:
	ldr	x0, [sp, #8]
Lloh8:
	adrp	x8, _VSC_STATUS_BIT_OFFS@GOTPAGE
Lloh9:
	ldr	x8, [x8, _VSC_STATUS_BIT_OFFS@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _VSC_STATUS_BIT_LEN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _VSC_STATUS_BIT_LEN@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	bl	_MLX5_EXTRACT
	cbz	x0, LBB0_11
; %bb.7:
	cbz	x19, LBB0_13
; %bb.8:
	ldr	x0, [sp, #8]
Lloh14:
	adrp	x8, _VSC_SIZE_VLD_BIT_OFFS@GOTPAGE
Lloh15:
	ldr	x8, [x8, _VSC_SIZE_VLD_BIT_OFFS@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _VSC_SIZE_VLD_BIT_LEN@GOTPAGE
Lloh18:
	ldr	x8, [x8, _VSC_SIZE_VLD_BIT_LEN@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	bl	_MLX5_EXTRACT
	cbz	x0, LBB0_13
; %bb.9:
Lloh20:
	adrp	x8, _VSC_ADDR_OFFSET@GOTPAGE
Lloh21:
	ldr	x8, [x8, _VSC_ADDR_OFFSET@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
	add	x2, sp, #8
	mov	x0, x20
	bl	_vsc_read
	mov	x21, x0
	cbz	w0, LBB0_14
; %bb.10:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx5_core_warn
	b	LBB0_12
LBB0_11:
Lloh25:
	adrp	x8, _EINVAL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
	mov	w21, #0
	b	LBB0_12
LBB0_14:
	ldr	x0, [sp, #8]
Lloh28:
	adrp	x8, _VSC_ADDR_BIT_OFFS@GOTPAGE
Lloh29:
	ldr	x8, [x8, _VSC_ADDR_BIT_OFFS@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
Lloh31:
	adrp	x8, _VSC_ADDR_BIT_LEN@GOTPAGE
Lloh32:
	ldr	x8, [x8, _VSC_ADDR_BIT_LEN@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
	bl	_MLX5_EXTRACT
	str	x0, [x19]
	b	LBB0_12
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_VSC_CTRL_OFFSET,4,2            ; @VSC_CTRL_OFFSET
	.comm	_VSC_SPACE_BIT_OFFS,4,2         ; @VSC_SPACE_BIT_OFFS
	.comm	_VSC_SPACE_BIT_LEN,4,2          ; @VSC_SPACE_BIT_LEN
	.comm	_VSC_STATUS_BIT_OFFS,4,2        ; @VSC_STATUS_BIT_OFFS
	.comm	_VSC_STATUS_BIT_LEN,4,2         ; @VSC_STATUS_BIT_LEN
	.comm	_VSC_SIZE_VLD_BIT_OFFS,4,2      ; @VSC_SIZE_VLD_BIT_OFFS
	.comm	_VSC_SIZE_VLD_BIT_LEN,4,2       ; @VSC_SIZE_VLD_BIT_LEN
	.comm	_VSC_ADDR_OFFSET,4,2            ; @VSC_ADDR_OFFSET
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get max space size\n"

	.comm	_VSC_ADDR_BIT_OFFS,4,2          ; @VSC_ADDR_BIT_OFFS
	.comm	_VSC_ADDR_BIT_LEN,4,2           ; @VSC_ADDR_BIT_LEN
.subsections_via_symbols
