	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qedr_add
_qedr_add:                              ## @qedr_add
	.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	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	_qedr_dev@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_ibdev@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ib_alloc_device
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	movq	_QEDR_MSG_INIT@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rax, %rdi
	callq	_DP_DEBUG
	movq	%r14, 64(%rbx)
	movq	%r15, 56(%rbx)
	movq	%r12, 48(%rbx)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_qed_get_rdma_ops
	movq	_qed_ops@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, 16(%rbx)
	leaq	-56(%rbp), %rsi
	movq	%r12, %rdi
	callq	*(%rax)
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.3:
	movl	-48(%rbp), %eax
	movl	%eax, 40(%rbx)
	movl	-52(%rbp), %eax
	movl	%eax, 36(%rbx)
	movl	-56(%rbp), %eax
	movl	%eax, 32(%rbx)
	movq	%rbx, %rdi
	callq	_IS_IWARP
	testq	%rax, %rax
	je	LBB0_13
## %bb.4:
	movq	%rbx, %rdi
	callq	_QEDR_IS_CMT
	testq	%rax, %rax
	je	LBB0_13
## %bb.5:
	movq	16(%rbx), %rax
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	*8(%rax)
	testl	%eax, %eax
	je	LBB0_13
## %bb.6:
	movl	%eax, %r15d
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_9
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
	jmp	LBB0_11
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
LBB0_9:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_10:
	movq	%rbx, %rdi
	callq	_ib_dealloc_device
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_DP_ERR
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	16(%rbx), %rax
	movq	32(%rax), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	movl	%eax, 28(%rbx)
	movq	16(%rbx), %rax
	movq	%r12, %rdi
	callq	*24(%rax)
	movl	%eax, 24(%rbx)
	movq	16(%rbx), %rax
	movq	%r12, %rdi
	callq	*16(%rax)
	movl	%eax, 12(%rbx)
	testl	%eax, %eax
	je	LBB0_21
## %bb.14:
	movq	_QEDR_WQ_MULTIPLIER_DFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_qedr_pci_set_atomic
	movq	%rbx, %rdi
	callq	_qedr_alloc_resources
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_10
## %bb.15:
	movq	%rbx, %rdi
	callq	_qedr_init_hw
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.16:
	movq	%rbx, %rdi
	callq	_qedr_setup_irqs
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.17:
	movq	%rbx, %rdi
	callq	_qedr_register_device
	testl	%eax, %eax
	je	LBB0_22
## %bb.18:
	movl	%eax, %r15d
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	%rbx, %rdi
	callq	_qedr_sync_free_irqs
LBB0_19:
	movq	%rbx, %rdi
	callq	_qedr_stop_hw
LBB0_20:
	movq	%rbx, %rdi
	callq	_qedr_free_resources
	jmp	LBB0_10
LBB0_21:
	leaq	L_.str.4(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_DP_ERR
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_10
LBB0_22:
	movq	_QEDR_ENET_STATE_BIT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%rbx, %rsi
	addq	$4, %rsi
	callq	_test_and_set_bit
	testl	%eax, %eax
	jne	LBB0_24
## %bb.23:
	movq	_QEDR_PORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_IB_EVENT_PORT_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_qedr_ib_dispatch_event
LBB0_24:
	movl	(%r13), %esi
	leaq	L_.str.6(%rip), %rdx
	movq	%rbx, %rdi
	callq	_DP_DEBUG
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_qedr_dev,4,2                   ## @qedr_dev
	.comm	_ibdev,4,2                      ## @ibdev
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Unable to allocate ib device\n"

	.comm	_QEDR_MSG_INIT,4,2              ## @QEDR_MSG_INIT
L_.str.1:                               ## @.str.1
	.asciz	"qedr add device called\n"

	.comm	_qed_ops,8,3                    ## @qed_ops
L_.str.2:                               ## @.str.2
	.asciz	"Failed to get qed roce operations\n"

L_.str.3:                               ## @.str.3
	.asciz	"iWARP is disabled over a 100g device Enabling it may impact L2 performance. To enable it run devlink dev param set <dev> name iwarp_cmt value true cmode runtime\n"

L_.str.4:                               ## @.str.4
	.asciz	"Failed. At least one CNQ is required.\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_QEDR_WQ_MULTIPLIER_DFT,4,2     ## @QEDR_WQ_MULTIPLIER_DFT
L_.str.5:                               ## @.str.5
	.asciz	"Unable to allocate register device\n"

	.comm	_QEDR_ENET_STATE_BIT,4,2        ## @QEDR_ENET_STATE_BIT
	.comm	_QEDR_PORT,4,2                  ## @QEDR_PORT
	.comm	_IB_EVENT_PORT_ACTIVE,4,2       ## @IB_EVENT_PORT_ACTIVE
L_.str.6:                               ## @.str.6
	.asciz	"qedr driver loaded successfully\n"

L_.str.7:                               ## @.str.7
	.asciz	"qedr driver load failed rc=%d\n"

	.no_dead_strip	_qedr_add
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qedr_add
_qedr_add:                              ; @qedr_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x22, x2
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _qedr_dev@GOTPAGE
Lloh1:
	ldr	x8, [x8, _qedr_dev@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _ibdev@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ibdev@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_ib_alloc_device
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
Lloh6:
	adrp	x23, _QEDR_MSG_INIT@GOTPAGE
Lloh7:
	ldr	x23, [x23, _QEDR_MSG_INIT@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh8:
	adrp	x2, l_.str.1@PAGE
Lloh9:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_DP_DEBUG
	stp	x22, x20, [x19, #56]
	str	x21, [x19, #48]
	bl	_qed_get_rdma_ops
Lloh10:
	adrp	x8, _qed_ops@GOTPAGE
Lloh11:
	ldr	x8, [x8, _qed_ops@GOTPAGEOFF]
Lloh12:
	str	x0, [x8]
	cbz	x0, LBB0_8
; %bb.2:
	str	x0, [x19, #16]
	ldr	x8, [x0]
	add	x1, sp, #16
	mov	x0, x21
	blr	x8
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.3:
	ldr	w8, [sp, #24]
	str	w8, [x19, #40]
	ldr	d0, [sp, #16]
	str	d0, [x19, #32]
	mov	x0, x19
	bl	_IS_IWARP
	cbz	x0, LBB0_11
; %bb.4:
	mov	x0, x19
	bl	_QEDR_IS_CMT
	cbz	x0, LBB0_11
; %bb.5:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	mov	x0, x21
	mov	w1, #0
	blr	x8
	cbz	w0, LBB0_11
; %bb.6:
	mov	x22, x0
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	b	LBB0_9
LBB0_7:
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_10
LBB0_8:
Lloh17:
	adrp	x1, l_.str.2@PAGE
Lloh18:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	mov	w22, #0
LBB0_9:
	mov	x0, x19
	bl	_ib_dealloc_device
	str	x22, [sp]
Lloh19:
	adrp	x1, l_.str.7@PAGE
Lloh20:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #96
	ret
LBB0_11:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #32]
	ldr	x8, [x8]
	mov	x0, x21
	blr	x8
	str	w0, [x19, #28]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #24]
	mov	x0, x21
	blr	x8
	str	w0, [x19, #24]
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #16]
	mov	x0, x21
	blr	x8
	str	w0, [x19, #12]
	cbz	w0, LBB0_19
; %bb.12:
Lloh21:
	adrp	x8, _QEDR_WQ_MULTIPLIER_DFT@GOTPAGE
Lloh22:
	ldr	x8, [x8, _QEDR_WQ_MULTIPLIER_DFT@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	bl	_qedr_pci_set_atomic
	mov	x0, x19
	bl	_qedr_alloc_resources
	mov	x22, x0
	cbnz	w0, LBB0_9
; %bb.13:
	mov	x0, x19
	bl	_qedr_init_hw
	mov	x22, x0
	cbnz	w0, LBB0_18
; %bb.14:
	mov	x0, x19
	bl	_qedr_setup_irqs
	mov	x22, x0
	cbnz	w0, LBB0_17
; %bb.15:
	mov	x0, x19
	bl	_qedr_register_device
	cbz	w0, LBB0_20
; %bb.16:
	mov	x22, x0
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
	mov	x0, x19
	bl	_qedr_sync_free_irqs
LBB0_17:
	mov	x0, x19
	bl	_qedr_stop_hw
LBB0_18:
	mov	x0, x19
	bl	_qedr_free_resources
	b	LBB0_9
LBB0_19:
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_DP_ERR
Lloh28:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh29:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_9
LBB0_20:
Lloh31:
	adrp	x8, _QEDR_ENET_STATE_BIT@GOTPAGE
Lloh32:
	ldr	x8, [x8, _QEDR_ENET_STATE_BIT@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	add	x1, x19, #4
	bl	_test_and_set_bit
	cbnz	w0, LBB0_22
; %bb.21:
Lloh34:
	adrp	x8, _QEDR_PORT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _QEDR_PORT@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
Lloh37:
	adrp	x8, _IB_EVENT_PORT_ACTIVE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _IB_EVENT_PORT_ACTIVE@GOTPAGEOFF]
Lloh39:
	ldr	w2, [x8]
	mov	x0, x19
	bl	_qedr_ib_dispatch_event
LBB0_22:
	ldr	w1, [x23]
Lloh40:
	adrp	x2, l_.str.6@PAGE
Lloh41:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_DP_DEBUG
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.cfi_endproc
                                        ; -- End function
	.comm	_qedr_dev,4,2                   ; @qedr_dev
	.comm	_ibdev,4,2                      ; @ibdev
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Unable to allocate ib device\n"

	.comm	_QEDR_MSG_INIT,4,2              ; @QEDR_MSG_INIT
l_.str.1:                               ; @.str.1
	.asciz	"qedr add device called\n"

	.comm	_qed_ops,8,3                    ; @qed_ops
l_.str.2:                               ; @.str.2
	.asciz	"Failed to get qed roce operations\n"

l_.str.3:                               ; @.str.3
	.asciz	"iWARP is disabled over a 100g device Enabling it may impact L2 performance. To enable it run devlink dev param set <dev> name iwarp_cmt value true cmode runtime\n"

l_.str.4:                               ; @.str.4
	.asciz	"Failed. At least one CNQ is required.\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_QEDR_WQ_MULTIPLIER_DFT,4,2     ; @QEDR_WQ_MULTIPLIER_DFT
l_.str.5:                               ; @.str.5
	.asciz	"Unable to allocate register device\n"

	.comm	_QEDR_ENET_STATE_BIT,4,2        ; @QEDR_ENET_STATE_BIT
	.comm	_QEDR_PORT,4,2                  ; @QEDR_PORT
	.comm	_IB_EVENT_PORT_ACTIVE,4,2       ; @IB_EVENT_PORT_ACTIVE
l_.str.6:                               ; @.str.6
	.asciz	"qedr driver loaded successfully\n"

l_.str.7:                               ; @.str.7
	.asciz	"qedr driver load failed rc=%d\n"

	.no_dead_strip	_qedr_add
.subsections_via_symbols
