	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ib_mad_port_open
_ib_mad_port_open:                      ## @ib_mad_port_open
	.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
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_rdma_max_mad_size
	movq	_IB_MGMT_MAD_SIZE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	callq	_WARN_ON
	testq	%rax, %rax
	jne	LBB0_1
## %bb.3:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_rdma_cap_opa_mad
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_rdma_max_mad_size
	movq	_OPA_MGMT_MAD_SIZE@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setl	%dil
	jmp	LBB0_6
LBB0_4:
	xorl	%edi, %edi
LBB0_6:
	callq	_WARN_ON
	testq	%rax, %rax
	je	LBB0_7
LBB0_1:
	movq	_EFAULT@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_28
## %bb.27:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$48, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%rax, %r14
	movq	%r15, 32(%rax)
	movl	%r12d, (%rax)
	leaq	44(%rax), %rdi
	callq	_spin_lock_init
	leaq	40(%r14), %rdi
	callq	_INIT_LIST_HEAD
	movq	8(%r14), %rsi
	movq	%r14, %rdi
	callq	_init_mad_qp
	movq	8(%r14), %rsi
	addq	$4, %rsi
	movq	%r14, %rdi
	callq	_init_mad_qp
	movq	_mad_sendq_size@GOTPCREL(%rip), %rax
	movq	_mad_recvq_size@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	addl	(%rax), %ebx
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_rdma_cap_ib_smi
	movl	%eax, %r13d
	testl	%eax, %eax
	setne	%cl
	shll	%cl, %ebx
	movq	32(%r14), %rdi
	movq	_IB_POLL_WORKQUEUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rsi
	movl	%ebx, %edx
	xorl	%ecx, %ecx
	callq	_ib_alloc_cq
	movl	%eax, 16(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	16(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_25
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_11:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_ib_alloc_pd
	movl	%eax, 20(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movl	20(%r14), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_24
LBB0_13:
	testl	%r13d, %r13d
	je	LBB0_15
## %bb.14:
	movq	8(%r14), %rdi
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_create_mad_qp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
LBB0_15:
	movq	8(%r14), %rdi
	addq	$4, %rdi
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_create_mad_qp
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_22
## %bb.16:
	leaq	L_.str.3(%rip), %rdx
	leaq	-58(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$10, %esi
	movl	%r12d, %ecx
	callq	_snprintf
	movq	_WQ_MEM_RECLAIM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_alloc_ordered_workqueue
	movl	%eax, 24(%r14)
	testl	%eax, %eax
	je	LBB0_17
## %bb.18:
	movq	_ib_mad_port_list_lock@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %r12
	addq	$28, %r12
	movq	_ib_mad_port_list@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	callq	_list_add_tail
	movq	%rbx, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	callq	_ib_mad_port_start
	testl	%eax, %eax
	je	LBB0_19
## %bb.20:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_dev_err
	movq	_ib_mad_port_list_lock@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	callq	_list_del_init
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movl	24(%r14), %edi
	callq	_destroy_workqueue
	jmp	LBB0_21
LBB0_17:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_21:
	movq	8(%r14), %rdi
	addq	$4, %rdi
	callq	_destroy_mad_qp
LBB0_22:
	movq	8(%r14), %rdi
	callq	_destroy_mad_qp
LBB0_23:
	movl	20(%r14), %edi
	callq	_ib_dealloc_pd
LBB0_24:
	movl	16(%r14), %edi
	callq	_ib_free_cq
	movq	8(%r14), %rdi
	addq	$4, %rdi
	callq	_cleanup_recv_queue
	movq	8(%r14), %rdi
	callq	_cleanup_recv_queue
LBB0_25:
	movq	%r14, %rdi
	callq	_kfree
	jmp	LBB0_26
LBB0_19:
	xorl	%ebx, %ebx
	jmp	LBB0_26
LBB0_28:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_MGMT_MAD_SIZE,8,3           ## @IB_MGMT_MAD_SIZE
	.comm	_EFAULT,4,2                     ## @EFAULT
	.comm	_OPA_MGMT_MAD_SIZE,8,3          ## @OPA_MGMT_MAD_SIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No memory for ib_mad_port_private\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_mad_sendq_size,4,2             ## @mad_sendq_size
	.comm	_mad_recvq_size,4,2             ## @mad_recvq_size
	.comm	_IB_POLL_WORKQUEUE,4,2          ## @IB_POLL_WORKQUEUE
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't create ib_mad CQ\n"

L_.str.2:                               ## @.str.2
	.asciz	"Couldn't create ib_mad PD\n"

	.comm	_IB_QPT_SMI,4,2                 ## @IB_QPT_SMI
	.comm	_IB_QPT_GSI,4,2                 ## @IB_QPT_GSI
L_.str.3:                               ## @.str.3
	.asciz	"ib_mad%d"

	.comm	_WQ_MEM_RECLAIM,4,2             ## @WQ_MEM_RECLAIM
	.comm	_ib_mad_port_list_lock,4,2      ## @ib_mad_port_list_lock
	.comm	_ib_mad_port_list,4,2           ## @ib_mad_port_list
L_.str.4:                               ## @.str.4
	.asciz	"Couldn't start port\n"

	.no_dead_strip	_ib_mad_port_open
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ib_mad_port_open
_ib_mad_port_open:                      ; @ib_mad_port_open
	.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	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	bl	_rdma_max_mad_size
Lloh3:
	adrp	x8, _IB_MGMT_MAD_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_MGMT_MAD_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, lt
	bl	_WARN_ON
	cbnz	x0, LBB0_4
; %bb.1:
	mov	x0, x20
	mov	x1, x21
	bl	_rdma_cap_opa_mad
	cbz	x0, LBB0_3
; %bb.2:
	mov	x0, x20
	mov	x1, x21
	bl	_rdma_max_mad_size
Lloh6:
	adrp	x8, _OPA_MGMT_MAD_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _OPA_MGMT_MAD_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w0, lt
LBB0_3:
	bl	_WARN_ON
	cbz	x0, LBB0_8
LBB0_4:
Lloh9:
	adrp	x8, _EFAULT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_6:
	ldr	x8, [sp, #24]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_26
; %bb.7:
	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
	add	sp, sp, #96
	ret
LBB0_8:
Lloh14:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w0, #48
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.9:
	mov	x19, x0
	str	x20, [x0, #32]
	str	w21, [x0], #44
	bl	_spin_lock_init
	add	x0, x19, #40
	bl	_INIT_LIST_HEAD
	ldr	x1, [x19, #8]
	mov	x0, x19
	bl	_init_mad_qp
	ldr	x8, [x19, #8]
	add	x1, x8, #4
	mov	x0, x19
	bl	_init_mad_qp
Lloh17:
	adrp	x8, _mad_sendq_size@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mad_sendq_size@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _mad_recvq_size@GOTPAGE
Lloh21:
	ldr	x9, [x9, _mad_recvq_size@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	add	w23, w9, w8
	mov	x0, x20
	mov	x1, x21
	bl	_rdma_cap_ib_smi
	mov	x22, x0
	cmp	w0, #0
	cset	w8, ne
	lsl	w2, w23, w8
	ldr	x0, [x19, #32]
Lloh23:
	adrp	x8, _IB_POLL_WORKQUEUE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _IB_POLL_WORKQUEUE@GOTPAGEOFF]
Lloh25:
	ldr	w4, [x8]
	mov	x1, x19
	mov	w3, #0
	bl	_ib_alloc_cq
	str	w0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.10:
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #16]
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_25
LBB0_11:
Lloh28:
	adrp	x1, l_.str@PAGE
Lloh29:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh30:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh31:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_5
LBB0_12:
	mov	x0, x20
	mov	w1, #0
	bl	_ib_alloc_pd
	str	w0, [x19, #20]
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.13:
Lloh32:
	adrp	x1, l_.str.2@PAGE
Lloh33:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w0, [x19, #20]
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_24
LBB0_14:
	cbz	w22, LBB0_16
; %bb.15:
	ldr	x0, [x19, #8]
Lloh34:
	adrp	x8, _IB_QPT_SMI@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IB_QPT_SMI@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
	bl	_create_mad_qp
	mov	x22, x0
	cbnz	w0, LBB0_23
LBB0_16:
	ldr	x8, [x19, #8]
	add	x0, x8, #4
Lloh37:
	adrp	x8, _IB_QPT_GSI@GOTPAGE
Lloh38:
	ldr	x8, [x8, _IB_QPT_GSI@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
	bl	_create_mad_qp
	mov	x22, x0
	cbnz	w0, LBB0_22
; %bb.17:
Lloh40:
	adrp	x2, l_.str.3@PAGE
Lloh41:
	add	x2, x2, l_.str.3@PAGEOFF
	add	x0, sp, #14
	mov	w1, #10
	mov	x3, x21
	bl	_snprintf
Lloh42:
	adrp	x8, _WQ_MEM_RECLAIM@GOTPAGE
Lloh43:
	ldr	x8, [x8, _WQ_MEM_RECLAIM@GOTPAGEOFF]
Lloh44:
	ldr	w1, [x8]
	add	x0, sp, #14
	bl	_alloc_ordered_workqueue
	str	w0, [x19, #24]
	cbz	w0, LBB0_20
; %bb.18:
Lloh45:
	adrp	x22, _ib_mad_port_list_lock@GOTPAGE
Lloh46:
	ldr	x22, [x22, _ib_mad_port_list_lock@GOTPAGEOFF]
	mov	x0, x22
	bl	_spin_lock_irqsave
	add	x21, x19, #28
Lloh47:
	adrp	x1, _ib_mad_port_list@GOTPAGE
Lloh48:
	ldr	x1, [x1, _ib_mad_port_list@GOTPAGEOFF]
	mov	x0, x21
	bl	_list_add_tail
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	bl	_ib_mad_port_start
	mov	x22, x0
	cbz	w0, LBB0_6
; %bb.19:
Lloh49:
	adrp	x1, l_.str.4@PAGE
Lloh50:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_err
Lloh51:
	adrp	x20, _ib_mad_port_list_lock@GOTPAGE
Lloh52:
	ldr	x20, [x20, _ib_mad_port_list_lock@GOTPAGEOFF]
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x21
	bl	_list_del_init
	mov	x0, x20
	bl	_spin_unlock_irqrestore
	ldr	w0, [x19, #24]
	bl	_destroy_workqueue
	b	LBB0_21
LBB0_20:
Lloh53:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh54:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_21:
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	bl	_destroy_mad_qp
LBB0_22:
	ldr	x0, [x19, #8]
	bl	_destroy_mad_qp
LBB0_23:
	ldr	w0, [x19, #20]
	bl	_ib_dealloc_pd
LBB0_24:
	ldr	w0, [x19, #16]
	bl	_ib_free_cq
	ldr	x8, [x19, #8]
	add	x0, x8, #4
	bl	_cleanup_recv_queue
	ldr	x0, [x19, #8]
	bl	_cleanup_recv_queue
LBB0_25:
	mov	x0, x19
	bl	_kfree
	b	LBB0_6
LBB0_26:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_MGMT_MAD_SIZE,8,3           ; @IB_MGMT_MAD_SIZE
	.comm	_EFAULT,4,2                     ; @EFAULT
	.comm	_OPA_MGMT_MAD_SIZE,8,3          ; @OPA_MGMT_MAD_SIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No memory for ib_mad_port_private\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_mad_sendq_size,4,2             ; @mad_sendq_size
	.comm	_mad_recvq_size,4,2             ; @mad_recvq_size
	.comm	_IB_POLL_WORKQUEUE,4,2          ; @IB_POLL_WORKQUEUE
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't create ib_mad CQ\n"

l_.str.2:                               ; @.str.2
	.asciz	"Couldn't create ib_mad PD\n"

	.comm	_IB_QPT_SMI,4,2                 ; @IB_QPT_SMI
	.comm	_IB_QPT_GSI,4,2                 ; @IB_QPT_GSI
l_.str.3:                               ; @.str.3
	.asciz	"ib_mad%d"

	.comm	_WQ_MEM_RECLAIM,4,2             ; @WQ_MEM_RECLAIM
	.comm	_ib_mad_port_list_lock,4,2      ; @ib_mad_port_list_lock
	.comm	_ib_mad_port_list,4,2           ; @ib_mad_port_list
l_.str.4:                               ; @.str.4
	.asciz	"Couldn't start port\n"

	.no_dead_strip	_ib_mad_port_open
.subsections_via_symbols
