	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_crdump_collect            ## -- Begin function mlx5_crdump_collect
	.p2align	4, 0x90
_mlx5_crdump_collect:                   ## @mlx5_crdump_collect
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	callq	_mlx5_crdump_enabled
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_mlx5_vsc_gw_lock
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_mlx5_core_warn
	jmp	LBB0_10
LBB0_1:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_10
LBB0_4:
	movq	_MLX5_SEMAPHORE_SW_RESET@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	_MLX5_VSC_LOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mlx5_vsc_sem_set_space
	testl	%eax, %eax
	je	LBB0_6
## %bb.5:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_mlx5_core_warn
	jmp	LBB0_9
LBB0_6:
	movq	_MLX5_VSC_SPACE_SCAN_CRSPACE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_mlx5_vsc_gw_set_space
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mlx5_crdump_fill
	movl	%eax, %ebx
LBB0_8:
	movl	(%r12), %esi
	movq	_MLX5_VSC_UNLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_mlx5_vsc_sem_set_space
LBB0_9:
	movq	%r14, %rdi
	callq	_mlx5_vsc_gw_unlock
LBB0_10:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENODEV,4,2                     ## @ENODEV
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"crdump: failed to lock vsc gw err %d\n"

	.comm	_MLX5_SEMAPHORE_SW_RESET,4,2    ## @MLX5_SEMAPHORE_SW_RESET
	.comm	_MLX5_VSC_LOCK,4,2              ## @MLX5_VSC_LOCK
L_.str.1:                               ## @.str.1
	.asciz	"Failed to lock SW reset semaphore\n"

	.comm	_MLX5_VSC_SPACE_SCAN_CRSPACE,4,2 ## @MLX5_VSC_SPACE_SCAN_CRSPACE
	.comm	_MLX5_VSC_UNLOCK,4,2            ## @MLX5_VSC_UNLOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_crdump_collect            ; -- Begin function mlx5_crdump_collect
	.p2align	2
_mlx5_crdump_collect:                   ; @mlx5_crdump_collect
	.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	x21, x1
	mov	x19, x0
	bl	_mlx5_crdump_enabled
	cbz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_mlx5_vsc_gw_lock
	cbz	w0, LBB0_4
; %bb.2:
	mov	x20, x0
	str	x20, [sp]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_mlx5_core_warn
	b	LBB0_10
LBB0_3:
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_10
LBB0_4:
Lloh5:
	adrp	x22, _MLX5_SEMAPHORE_SW_RESET@GOTPAGE
Lloh6:
	ldr	x22, [x22, _MLX5_SEMAPHORE_SW_RESET@GOTPAGEOFF]
	ldr	w1, [x22]
Lloh7:
	adrp	x8, _MLX5_VSC_LOCK@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MLX5_VSC_LOCK@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mlx5_vsc_sem_set_space
	cbz	w0, LBB0_6
; %bb.5:
	mov	x20, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx5_core_warn
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x8, _MLX5_VSC_SPACE_SCAN_CRSPACE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MLX5_VSC_SPACE_SCAN_CRSPACE@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_mlx5_vsc_gw_set_space
	mov	x20, x0
	cbnz	w0, LBB0_8
; %bb.7:
	mov	x0, x19
	mov	x1, x21
	bl	_mlx5_crdump_fill
	mov	x20, x0
LBB0_8:
	ldr	w1, [x22]
Lloh15:
	adrp	x8, _MLX5_VSC_UNLOCK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MLX5_VSC_UNLOCK@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_mlx5_vsc_sem_set_space
LBB0_9:
	mov	x0, x19
	bl	_mlx5_vsc_gw_unlock
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_ENODEV,4,2                     ; @ENODEV
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"crdump: failed to lock vsc gw err %d\n"

	.comm	_MLX5_SEMAPHORE_SW_RESET,4,2    ; @MLX5_SEMAPHORE_SW_RESET
	.comm	_MLX5_VSC_LOCK,4,2              ; @MLX5_VSC_LOCK
l_.str.1:                               ; @.str.1
	.asciz	"Failed to lock SW reset semaphore\n"

	.comm	_MLX5_VSC_SPACE_SCAN_CRSPACE,4,2 ; @MLX5_VSC_SPACE_SCAN_CRSPACE
	.comm	_MLX5_VSC_UNLOCK,4,2            ; @MLX5_VSC_UNLOCK
.subsections_via_symbols
