	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_fpga_device_start         ## -- Begin function mlx5_fpga_device_start
	.p2align	4, 0x90
_mlx5_fpga_device_start:                ## @mlx5_fpga_device_start
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	%r12, %rdi
	callq	_mlx5_fpga_device_load_check
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	movq	24(%r12), %rdi
	callq	_mlx5_fpga_caps
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_4
LBB0_12:
	leaq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	testl	%r13d, %r13d
	jne	LBB0_13
## %bb.14:
	movq	_MLX5_FPGA_STATUS_SUCCESS@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_1:
	xorl	%r13d, %r13d
	jmp	LBB0_16
LBB0_13:
	movq	_MLX5_FPGA_STATUS_FAILURE@GOTPCREL(%rip), %rax
LBB0_15:
	movl	(%rax), %eax
	movl	%eax, 12(%r12)
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
LBB0_16:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	24(%r12), %rdi
	movq	_fpga_device@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_FPGA
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_mlx5_fpga_device_name
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	(%r12), %rdi
	callq	_mlx5_fpga_image_name
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	24(%r12), %rdi
	movq	_image_version@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_FPGA
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	24(%r12), %rdi
	movq	_ieee_vendor_id@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_FPGA
	movq	%rax, %r13
	movq	24(%r12), %rdi
	movq	_sandbox_product_id@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_FPGA
	movq	%rax, %r15
	movq	24(%r12), %rdi
	movq	_sandbox_product_version@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLX5_CAP_FPGA
	subq	$8, %rsp
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %rcx
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	pushq	%rax
	pushq	%r15
	pushq	%r13
	callq	_mlx5_fpga_info
	addq	$32, %rsp
	movq	_shell_caps@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_MLX5_CAP_FPGA
	movq	%rax, %r15
	testl	%r15d, %r15d
	je	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_mlx5_core_reserve_gids
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.7:
	leaq	32(%r12), %r13
	movq	_fpga_err_event@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FPGA_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_MLX5_NB_INIT
	leaq	16(%r12), %rbx
	movq	_fpga_qp_err_event@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FPGA_QP_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_MLX5_NB_INIT
	movq	24(%r12), %rdi
	movq	%r13, %rsi
	callq	_mlx5_eq_notifier_register
	movq	24(%r12), %rdi
	movq	%rbx, %rsi
	callq	_mlx5_eq_notifier_register
	movq	%r12, %rdi
	callq	_mlx5_fpga_conn_device_init
	movq	%r13, %rsi
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_8
LBB0_11:
	movq	24(%r12), %rdi
	callq	_mlx5_eq_notifier_unregister
	movq	24(%r12), %rdi
	movq	%rbx, %rsi
	callq	_mlx5_eq_notifier_unregister
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_mlx5_core_unreserve_gids
	jmp	LBB0_12
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_mlx5_fpga_err
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_12
LBB0_8:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	(%r12), %rax
	movq	_MLX5_FPGA_IMAGE_USER@GOTPCREL(%rip), %rcx
	xorl	%r13d, %r13d
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.9:
	movq	%rsi, %rbx
	movq	%r12, %rdi
	callq	_mlx5_fpga_device_brb
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movq	%r12, %rdi
	movl	%eax, %r13d
	callq	_mlx5_fpga_conn_device_cleanup
	movq	%rbx, %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.comm	_fpga_device,4,2                ## @fpga_device
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s:%u; %s image, version %u; SBU %06x:%04x version %d\n"

	.comm	_image_version,4,2              ## @image_version
	.comm	_ieee_vendor_id,4,2             ## @ieee_vendor_id
	.comm	_sandbox_product_id,4,2         ## @sandbox_product_id
	.comm	_sandbox_product_version,4,2    ## @sandbox_product_version
	.comm	_shell_caps,4,2                 ## @shell_caps
L_.str.1:                               ## @.str.1
	.asciz	"FPGA reports 0 QPs in SHELL_CAPS\n"

	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_fpga_err_event,4,2             ## @fpga_err_event
	.comm	_FPGA_ERROR,4,2                 ## @FPGA_ERROR
	.comm	_fpga_qp_err_event,4,2          ## @fpga_qp_err_event
	.comm	_FPGA_QP_ERROR,4,2              ## @FPGA_QP_ERROR
	.comm	_MLX5_FPGA_IMAGE_USER,8,3       ## @MLX5_FPGA_IMAGE_USER
	.comm	_MLX5_FPGA_STATUS_FAILURE,4,2   ## @MLX5_FPGA_STATUS_FAILURE
	.comm	_MLX5_FPGA_STATUS_SUCCESS,4,2   ## @MLX5_FPGA_STATUS_SUCCESS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx5_fpga_device_start         ; -- Begin function mlx5_fpga_device_start
	.p2align	2
_mlx5_fpga_device_start:                ; @mlx5_fpga_device_start
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x19, [x0]
	cbz	x19, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_mlx5_fpga_device_load_check
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.2:
	ldr	x0, [x19, #24]
	bl	_mlx5_fpga_caps
	mov	x22, x0
	cbz	w0, LBB0_6
LBB0_3:
	add	x20, x19, #8
	mov	x0, x20
	bl	_spin_lock_irqsave
Lloh0:
	adrp	x8, _MLX5_FPGA_STATUS_FAILURE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLX5_FPGA_STATUS_FAILURE@GOTPAGEOFF]
Lloh2:
	adrp	x9, _MLX5_FPGA_STATUS_SUCCESS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MLX5_FPGA_STATUS_SUCCESS@GOTPAGEOFF]
	cmp	w22, #0
	csel	x8, x9, x8, eq
	ldr	w8, [x8]
	str	w8, [x19, #12]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	b	LBB0_5
LBB0_4:
	mov	w22, #0
LBB0_5:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	ldr	x0, [x19, #24]
Lloh4:
	adrp	x8, _fpga_device@GOTPAGE
Lloh5:
	ldr	x8, [x8, _fpga_device@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	bl	_MLX5_CAP_FPGA
	mov	x21, x0
	bl	_mlx5_fpga_device_name
	mov	x22, x0
	ldr	x0, [x19]
	bl	_mlx5_fpga_image_name
	mov	x23, x0
	ldr	x0, [x19, #24]
Lloh7:
	adrp	x8, _image_version@GOTPAGE
Lloh8:
	ldr	x8, [x8, _image_version@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	bl	_MLX5_CAP_FPGA
	mov	x24, x0
	ldr	x0, [x19, #24]
Lloh10:
	adrp	x8, _ieee_vendor_id@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ieee_vendor_id@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_MLX5_CAP_FPGA
	mov	x25, x0
	ldr	x0, [x19, #24]
Lloh13:
	adrp	x8, _sandbox_product_id@GOTPAGE
Lloh14:
	ldr	x8, [x8, _sandbox_product_id@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_MLX5_CAP_FPGA
	mov	x26, x0
	ldr	x0, [x19, #24]
Lloh16:
	adrp	x8, _sandbox_product_version@GOTPAGE
Lloh17:
	ldr	x8, [x8, _sandbox_product_version@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	bl	_MLX5_CAP_FPGA
	str	x0, [sp]
Lloh19:
	adrp	x1, l_.str@PAGE
Lloh20:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	mov	x4, x23
	mov	x5, x24
	mov	x6, x25
	mov	x7, x26
	bl	_mlx5_fpga_info
Lloh21:
	adrp	x8, _shell_caps@GOTPAGE
Lloh22:
	ldr	x8, [x8, _shell_caps@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_MLX5_CAP_FPGA
	mov	x21, x0
	cbz	w21, LBB0_10
; %bb.7:
	mov	x0, x20
	mov	x1, x21
	bl	_mlx5_core_reserve_gids
	mov	x22, x0
	cbnz	w0, LBB0_3
; %bb.8:
	add	x23, x19, #32
Lloh24:
	adrp	x8, _fpga_err_event@GOTPAGE
Lloh25:
	ldr	x8, [x8, _fpga_err_event@GOTPAGEOFF]
Lloh26:
	ldr	w1, [x8]
Lloh27:
	adrp	x8, _FPGA_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FPGA_ERROR@GOTPAGEOFF]
Lloh29:
	ldr	w2, [x8]
	mov	x0, x23
	bl	_MLX5_NB_INIT
	add	x24, x19, #16
Lloh30:
	adrp	x8, _fpga_qp_err_event@GOTPAGE
Lloh31:
	ldr	x8, [x8, _fpga_qp_err_event@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x8, _FPGA_QP_ERROR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _FPGA_QP_ERROR@GOTPAGEOFF]
Lloh35:
	ldr	w2, [x8]
	mov	x0, x24
	bl	_MLX5_NB_INIT
	ldr	x0, [x19, #24]
	mov	x1, x23
	bl	_mlx5_eq_notifier_register
	ldr	x0, [x19, #24]
	mov	x1, x24
	bl	_mlx5_eq_notifier_register
	mov	x0, x19
	bl	_mlx5_fpga_conn_device_init
	mov	x22, x0
	cbz	w0, LBB0_11
LBB0_9:
	ldr	x0, [x19, #24]
	mov	x1, x23
	bl	_mlx5_eq_notifier_unregister
	ldr	x0, [x19, #24]
	mov	x1, x24
	bl	_mlx5_eq_notifier_unregister
	mov	x0, x20
	mov	x1, x21
	bl	_mlx5_core_unreserve_gids
	b	LBB0_3
LBB0_10:
Lloh36:
	adrp	x1, l_.str.1@PAGE
Lloh37:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_mlx5_fpga_err
Lloh38:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
Lloh40:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_3
LBB0_11:
	ldr	x8, [x19]
Lloh41:
	adrp	x9, _MLX5_FPGA_IMAGE_USER@GOTPAGE
Lloh42:
	ldr	x9, [x9, _MLX5_FPGA_IMAGE_USER@GOTPAGEOFF]
Lloh43:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_mlx5_fpga_device_brb
	mov	x22, x0
	cbz	w0, LBB0_3
; %bb.13:
	mov	x0, x19
	bl	_mlx5_fpga_conn_device_cleanup
	b	LBB0_9
LBB0_14:
	mov	w22, #0
	b	LBB0_3
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_fpga_device,4,2                ; @fpga_device
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s:%u; %s image, version %u; SBU %06x:%04x version %d\n"

	.comm	_image_version,4,2              ; @image_version
	.comm	_ieee_vendor_id,4,2             ; @ieee_vendor_id
	.comm	_sandbox_product_id,4,2         ; @sandbox_product_id
	.comm	_sandbox_product_version,4,2    ; @sandbox_product_version
	.comm	_shell_caps,4,2                 ; @shell_caps
l_.str.1:                               ; @.str.1
	.asciz	"FPGA reports 0 QPs in SHELL_CAPS\n"

	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_fpga_err_event,4,2             ; @fpga_err_event
	.comm	_FPGA_ERROR,4,2                 ; @FPGA_ERROR
	.comm	_fpga_qp_err_event,4,2          ; @fpga_qp_err_event
	.comm	_FPGA_QP_ERROR,4,2              ; @FPGA_QP_ERROR
	.comm	_MLX5_FPGA_IMAGE_USER,8,3       ; @MLX5_FPGA_IMAGE_USER
	.comm	_MLX5_FPGA_STATUS_FAILURE,4,2   ; @MLX5_FPGA_STATUS_FAILURE
	.comm	_MLX5_FPGA_STATUS_SUCCESS,4,2   ; @MLX5_FPGA_STATUS_SUCCESS
.subsections_via_symbols
