	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_fpga_device_stop          ## -- Begin function mlx5_fpga_device_stop
	.p2align	4, 0x90
_mlx5_fpga_device_stop:                 ## @mlx5_fpga_device_stop
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.1:
	movq	%rdi, %r14
	leaq	28(%rbx), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rax
	movq	_MLX5_FPGA_STATUS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.2:
	movq	_MLX5_FPGA_STATUS_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	8(%rbx), %rax
	movq	_MLX5_FPGA_IMAGE_USER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.3:
	movq	_MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mlx5_fpga_ctrl_op
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_mlx5_fpga_err
LBB0_5:
	movq	%rbx, %rdi
	callq	_mlx5_fpga_conn_device_cleanup
	movl	20(%rbx), %edi
	leaq	24(%rbx), %rsi
	callq	_mlx5_eq_notifier_unregister
	movl	20(%rbx), %edi
	addq	$16, %rbx
	movq	%rbx, %rsi
	callq	_mlx5_eq_notifier_unregister
	movq	_shell_caps@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_MLX5_CAP_FPGA
	movq	%r14, %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx5_core_unreserve_gids       ## TAILCALL
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_spin_unlock_irqrestore         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX5_FPGA_STATUS_SUCCESS,8,3   ## @MLX5_FPGA_STATUS_SUCCESS
	.comm	_MLX5_FPGA_STATUS_NONE,8,3      ## @MLX5_FPGA_STATUS_NONE
	.comm	_MLX5_FPGA_IMAGE_USER,8,3       ## @MLX5_FPGA_IMAGE_USER
	.comm	_MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON,4,2 ## @MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to re-set SBU bypass on: %d\n"

	.comm	_shell_caps,4,2                 ## @shell_caps
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_fpga_device_stop          ; -- Begin function mlx5_fpga_device_stop
	.p2align	2
_mlx5_fpga_device_stop:                 ; @mlx5_fpga_device_stop
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x20, [x0]
	cbz	x20, LBB0_6
; %bb.1:
	mov	x19, x0
	add	x21, x20, #28
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x20]
Lloh0:
	adrp	x9, _MLX5_FPGA_STATUS_SUCCESS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX5_FPGA_STATUS_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
Lloh3:
	adrp	x8, _MLX5_FPGA_STATUS_NONE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLX5_FPGA_STATUS_NONE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	str	x8, [x20]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _MLX5_FPGA_IMAGE_USER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLX5_FPGA_IMAGE_USER@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
Lloh9:
	adrp	x8, _MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mlx5_fpga_ctrl_op
	cbz	w0, LBB0_5
; %bb.4:
	mov	x2, x0
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_mlx5_fpga_err
LBB0_5:
	mov	x0, x20
	bl	_mlx5_fpga_conn_device_cleanup
	ldr	w0, [x20, #20]
	add	x1, x20, #24
	bl	_mlx5_eq_notifier_unregister
	ldr	w0, [x20, #20]
	add	x1, x20, #16
	bl	_mlx5_eq_notifier_unregister
Lloh14:
	adrp	x8, _shell_caps@GOTPAGE
Lloh15:
	ldr	x8, [x8, _shell_caps@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_MLX5_CAP_FPGA
	mov	x1, x0
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mlx5_core_unreserve_gids
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_spin_unlock_irqrestore
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX5_FPGA_STATUS_SUCCESS,8,3   ; @MLX5_FPGA_STATUS_SUCCESS
	.comm	_MLX5_FPGA_STATUS_NONE,8,3      ; @MLX5_FPGA_STATUS_NONE
	.comm	_MLX5_FPGA_IMAGE_USER,8,3       ; @MLX5_FPGA_IMAGE_USER
	.comm	_MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON,4,2 ; @MLX5_FPGA_CTRL_OPERATION_SANDBOX_BYPASS_ON
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to re-set SBU bypass on: %d\n"

	.comm	_shell_caps,4,2                 ; @shell_caps
.subsections_via_symbols
