	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_register_mad_agent          ## -- Begin function ib_register_mad_agent
	.p2align	4, 0x90
_ib_register_mad_agent:                 ## @ib_register_mad_agent
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -88(%rbp)                  ## 8-byte Spill
	movq	%r8, %r15
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	%edx, %r12d
	movq	%rsi, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movl	32(%rbp), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	24(%rbp), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	16(%rbp), %r14
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r12d, %edi
	callq	_get_spl_qp_index
	cmpl	$-1, %eax
	je	LBB0_5
## %bb.1:
	movl	%eax, %r13d
	testq	%r15, %r15
	je	LBB0_6
## %bb.2:
	movq	_IB_MGMT_RMPP_VERSION@GOTPCREL(%rip), %rax
	cmpq	%r15, (%rax)
	je	LBB0_6
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
LBB0_4:
	xorl	%eax, %eax
	callq	_dev_notice
	jmp	LBB0_19
LBB0_5:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	jmp	LBB0_18
LBB0_6:
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rcx, %rcx
	je	LBB0_14
## %bb.7:
	movl	(%rcx), %edx
	movq	_MAX_MGMT_VERSION@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jge	LBB0_17
## %bb.8:
	testq	%r14, %r14
	je	LBB0_22
## %bb.9:
	movq	8(%rcx), %rdx
	movq	_MAX_MGMT_CLASS@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jge	LBB0_23
## %bb.10:
	testq	%rdx, %rdx
	je	LBB0_32
## %bb.11:
	movq	%rdx, %rdi
	callq	_is_vendor_class
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_24
## %bb.12:
	movl	152(%rcx), %edi
	callq	_is_vendor_oui
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, %eax
	jne	LBB0_24
## %bb.13:
	movq	8(%rcx), %rdx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_28
LBB0_14:
	cmpq	$0, -88(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_19
## %bb.15:
	movq	_IB_MAD_USER_RMPP@GOTPCREL(%rip), %rax
	movl	-68(%rbp), %ecx                 ## 4-byte Reload
	testl	%ecx, (%rax)
	jne	LBB0_19
LBB0_36:
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_ib_get_mad_port
	testq	%rax, %rax
	je	LBB0_42
## %bb.37:
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	16(%rax), %rax
	movslq	%r13d, %r12
	cmpq	$0, (%rax,%r12,8)
	je	LBB0_43
## %bb.38:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	$160, %edi
	callq	_kzalloc
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_46
## %bb.39:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	testq	%rdi, %rdi
	je	LBB0_47
## %bb.40:
	movl	(%r13), %edx
	movl	$160, %esi
	callq	_kmemdup
	testq	%rax, %rax
	jne	LBB0_48
## %bb.41:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	jmp	LBB0_61
LBB0_17:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
LBB0_18:
	xorl	%eax, %eax
	callq	_dev_notice
LBB0_19:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_20:
	movq	%rbx, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_33
LBB0_23:
	movq	_IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	jne	LBB0_27
LBB0_24:
	movl	8(%rcx), %edi
	callq	_ib_is_mad_class_rmpp
	testq	%r15, %r15
	je	LBB0_29
## %bb.25:
	testl	%eax, %eax
	jne	LBB0_29
## %bb.26:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdx
	leaq	L_.str.7(%rip), %rsi
	jmp	LBB0_28
LBB0_27:
	leaq	L_.str.4(%rip), %rsi
LBB0_28:
	movq	%rbx, %rdi
	jmp	LBB0_4
LBB0_29:
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rsi
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdx
	movq	_IB_MGMT_CLASS_SUBN_LID_ROUTED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	sete	%cl
	movq	_IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	sete	%al
	orb	%cl, %al
	cmpl	%r12d, (%rsi)
	jne	LBB0_34
## %bb.30:
	testb	%al, %al
	jne	LBB0_36
## %bb.31:
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_28
LBB0_42:
	leaq	L_.str.10(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_notice
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_44
LBB0_32:
	leaq	L_.str.5(%rip), %rsi
LBB0_33:
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_notice
	jmp	LBB0_19
LBB0_43:
	leaq	L_.str.11(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_notice
	movq	_EPROTONOSUPPORT@GOTPCREL(%rip), %rax
LBB0_44:
	subl	(%rax), %r14d
	movl	%r14d, %edi
LBB0_45:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_34:
	testb	%al, %al
	je	LBB0_36
## %bb.35:
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_28
LBB0_46:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_45
LBB0_47:
	xorl	%eax, %eax
LBB0_48:
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	movq	16(%rdx), %rsi
	leaq	(%rsi,%r12,8), %rcx
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	movq	%rcx, 144(%r13)
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movq	%rax, 136(%r13)
	movq	%r15, 80(%r13)
	movq	%rbx, 72(%r13)
	movq	%r14, 64(%r13)
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 56(%r13)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	%rax, 48(%r13)
	movq	(%rsi,%r12,8), %rax
	movq	%rdx, %r12
	movq	%rax, 40(%r13)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 32(%r13)
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 16(%r13)
	leaq	128(%r13), %rdi
	callq	_spin_lock_init
	leaq	124(%r13), %rdi
	callq	_INIT_LIST_HEAD
	leaq	120(%r13), %rdi
	callq	_INIT_LIST_HEAD
	leaq	116(%r13), %rdi
	callq	_INIT_LIST_HEAD
	leaq	112(%r13), %rdi
	callq	_INIT_LIST_HEAD
	leaq	108(%r13), %rdi
	movq	_timeout_sends@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_DELAYED_WORK
	leaq	104(%r13), %rdi
	callq	_INIT_LIST_HEAD
	leaq	100(%r13), %rdi
	movq	_local_completions@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_INIT_WORK
	leaq	96(%r13), %rdi
	movl	$1, %esi
	callq	_atomic_set
	leaq	92(%r13), %rdi
	callq	_init_completion
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	_ib_mad_client_id@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	incq	%rcx
	movq	%rcx, (%rax)
	movq	%rcx, 24(%r13)
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	testq	%r13, %r13
	je	LBB0_62
## %bb.49:
	movl	8(%r13), %edi
	callq	_convert_mgmt_class
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_is_vendor_class
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	8(%r12), %rcx
	movslq	(%rsi), %rdx
	shlq	$4, %rdx
	testq	%rax, %rax
	je	LBB0_54
## %bb.50:
	movq	(%rcx,%rdx), %r15
	testq	%r15, %r15
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_53
## %bb.51:
	movq	%r14, %rdi
	callq	_vendor_class_index
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	(%r15), %rcx
	movq	(%rcx,%rax,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_53
## %bb.52:
	callq	_is_vendor_method_in_use
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_60
LBB0_53:
	movq	%rsi, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_add_oui_reg_req
	jmp	LBB0_58
LBB0_54:
	movq	8(%rcx,%rdx), %rax
	testq	%rax, %rax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_57
## %bb.55:
	movq	(%rax), %rax
	movq	(%rax,%r14,8), %rax
	movq	%rax, -120(%rbp)
	testq	%rax, %rax
	je	LBB0_57
## %bb.56:
	leaq	-120(%rbp), %rdi
	callq	_method_in_use
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	testq	%rax, %rax
	jne	LBB0_60
LBB0_57:
	movq	%rsi, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_add_nonoui_reg_req
LBB0_58:
	testl	%eax, %eax
	je	LBB0_62
## %bb.59:
	movl	%eax, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
LBB0_60:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
LBB0_61:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	jmp	LBB0_20
LBB0_62:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	leaq	16(%rdi), %rbx
	addq	$88, %rdi
	movq	%r12, %rsi
	addq	$4, %rsi
	callq	_list_add_tail
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ib_register_mad_agent: invalid QP Type %d\n"

	.comm	_IB_MGMT_RMPP_VERSION,8,3       ## @IB_MGMT_RMPP_VERSION
L_.str.1:                               ## @.str.1
	.asciz	"ib_register_mad_agent: invalid RMPP Version %u\n"

	.comm	_MAX_MGMT_VERSION,4,2           ## @MAX_MGMT_VERSION
L_.str.2:                               ## @.str.2
	.asciz	"ib_register_mad_agent: invalid Class Version %u\n"

L_.str.3:                               ## @.str.3
	.asciz	"ib_register_mad_agent: no recv_handler\n"

	.comm	_MAX_MGMT_CLASS,8,3             ## @MAX_MGMT_CLASS
	.comm	_IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE,8,3 ## @IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE
L_.str.4:                               ## @.str.4
	.asciz	"ib_register_mad_agent: Invalid Mgmt Class 0x%x\n"

L_.str.5:                               ## @.str.5
	.asciz	"ib_register_mad_agent: Invalid Mgmt Class 0\n"

L_.str.6:                               ## @.str.6
	.asciz	"ib_register_mad_agent: No OUI specified for class 0x%x\n"

L_.str.7:                               ## @.str.7
	.asciz	"ib_register_mad_agent: RMPP version for non-RMPP class 0x%x\n"

	.comm	_IB_QPT_SMI,4,2                 ## @IB_QPT_SMI
	.comm	_IB_MGMT_CLASS_SUBN_LID_ROUTED,8,3 ## @IB_MGMT_CLASS_SUBN_LID_ROUTED
L_.str.8:                               ## @.str.8
	.asciz	"ib_register_mad_agent: Invalid SM QP type: class 0x%x\n"

L_.str.9:                               ## @.str.9
	.asciz	"ib_register_mad_agent: Invalid GS QP type: class 0x%x\n"

	.comm	_IB_MAD_USER_RMPP,4,2           ## @IB_MAD_USER_RMPP
L_.str.10:                              ## @.str.10
	.asciz	"ib_register_mad_agent: Invalid port\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.11:                              ## @.str.11
	.asciz	"ib_register_mad_agent: QP %d not supported\n"

	.comm	_EPROTONOSUPPORT,4,2            ## @EPROTONOSUPPORT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_timeout_sends,4,2              ## @timeout_sends
	.comm	_local_completions,4,2          ## @local_completions
	.comm	_ib_mad_client_id,8,3           ## @ib_mad_client_id
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_register_mad_agent          ; -- Begin function ib_register_mad_agent
	.p2align	2
_ib_register_mad_agent:                 ; @ib_register_mad_agent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x25, x7
	mov	x28, x6
	mov	x27, x5
	mov	x24, x4
	str	x3, [sp, #32]                   ; 8-byte Folded Spill
	mov	x21, x2
	mov	x26, x1
	mov	x23, x0
	ldr	w19, [x29, #16]
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x20, x0
	mov	x0, x21
	bl	_get_spl_qp_index
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.1:
	mov	x22, x0
	cbz	x24, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _IB_MGMT_RMPP_VERSION@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IB_MGMT_RMPP_VERSION@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x8, x24
	b.eq	LBB0_5
; %bb.3:
	str	x24, [sp]
Lloh6:
	adrp	x1, l_.str.1@PAGE
Lloh7:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_36
LBB0_4:
	str	x21, [sp]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_36
LBB0_5:
	ldr	x10, [sp, #32]                  ; 8-byte Folded Reload
	cbz	x10, LBB0_13
; %bb.6:
	ldr	w8, [x10]
Lloh10:
	adrp	x9, _MAX_MGMT_VERSION@GOTPAGE
Lloh11:
	ldr	x9, [x9, _MAX_MGMT_VERSION@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_21
; %bb.7:
	cbz	x28, LBB0_22
; %bb.8:
	ldr	x0, [x10, #8]
Lloh13:
	adrp	x8, _MAX_MGMT_CLASS@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAX_MGMT_CLASS@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ge	LBB0_23
; %bb.9:
	cbz	x0, LBB0_32
; %bb.10:
	bl	_is_vendor_class
	ldr	x10, [sp, #32]                  ; 8-byte Folded Reload
	cbz	x0, LBB0_24
; %bb.11:
	ldr	w0, [x10, #152]
	bl	_is_vendor_oui
	ldr	x10, [sp, #32]                  ; 8-byte Folded Reload
	cbnz	w0, LBB0_24
; %bb.12:
	ldr	x8, [x10, #8]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.6@PAGE
Lloh17:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_36
LBB0_13:
	cbz	x27, LBB0_37
; %bb.14:
Lloh18:
	adrp	x8, _IB_MAD_USER_RMPP@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IB_MAD_USER_RMPP@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w19
	b.ne	LBB0_37
LBB0_15:
	mov	x0, x23
	mov	x1, x26
	bl	_ib_get_mad_port
	cbz	x0, LBB0_31
; %bb.16:
	mov	x21, x0
	ldr	x8, [x0, #16]
	ldr	x8, [x8, w22, sxtw #3]
	cbz	x8, LBB0_33
; %bb.17:
Lloh21:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	w0, #160
	bl	_kzalloc
	str	x0, [sp, #24]                   ; 8-byte Folded Spill
	cbz	x0, LBB0_38
; %bb.18:
	ldr	x0, [sp, #32]                   ; 8-byte Folded Reload
	cbz	x0, LBB0_40
; %bb.19:
Lloh24:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	mov	w1, #160
	bl	_kmemdup
	mov	x11, x0
	cbnz	x0, LBB0_41
; %bb.20:
Lloh27:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh28:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	neg	w0, w8
	bl	_ERR_PTR
	mov	x20, x0
	b	LBB0_54
LBB0_21:
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.2@PAGE
Lloh31:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_36
LBB0_22:
Lloh32:
	adrp	x1, l_.str.3@PAGE
Lloh33:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_36
LBB0_23:
Lloh34:
	adrp	x8, _IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_27
LBB0_24:
	ldr	w0, [x10, #8]
	bl	_ib_is_mad_class_rmpp
	cbz	x24, LBB0_28
; %bb.25:
	cbnz	w0, LBB0_28
; %bb.26:
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x8, [x8, #8]
	str	x8, [sp]
Lloh37:
	adrp	x1, l_.str.7@PAGE
Lloh38:
	add	x1, x1, l_.str.7@PAGEOFF
	b	LBB0_36
LBB0_27:
	str	x0, [sp]
Lloh39:
	adrp	x1, l_.str.4@PAGE
Lloh40:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_36
LBB0_28:
Lloh41:
	adrp	x8, _IB_QPT_SMI@GOTPAGE
Lloh42:
	ldr	x8, [x8, _IB_QPT_SMI@GOTPAGEOFF]
Lloh43:
	ldr	w10, [x8]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x8, [x8, #8]
Lloh44:
	adrp	x9, _IB_MGMT_CLASS_SUBN_LID_ROUTED@GOTPAGE
Lloh45:
	ldr	x9, [x9, _IB_MGMT_CLASS_SUBN_LID_ROUTED@GOTPAGEOFF]
Lloh46:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh47:
	adrp	x9, _IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE@GOTPAGE
Lloh48:
	ldr	x9, [x9, _IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w9, eq
	cmp	w10, w21
	b.ne	LBB0_34
; %bb.29:
	tbnz	w9, #0, LBB0_15
; %bb.30:
	str	x8, [sp]
Lloh50:
	adrp	x1, l_.str.8@PAGE
Lloh51:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_36
LBB0_31:
Lloh52:
	adrp	x1, l_.str.10@PAGE
Lloh53:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x23
	bl	_dev_notice
Lloh54:
	adrp	x8, _ENODEV@GOTPAGE
Lloh55:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_39
LBB0_32:
Lloh56:
	adrp	x1, l_.str.5@PAGE
Lloh57:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_36
LBB0_33:
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	str	x22, [sp]
Lloh58:
	adrp	x1, l_.str.11@PAGE
Lloh59:
	add	x1, x1, l_.str.11@PAGEOFF
	mov	x0, x23
	bl	_dev_notice
Lloh60:
	adrp	x8, _EPROTONOSUPPORT@GOTPAGE
Lloh61:
	ldr	x8, [x8, _EPROTONOSUPPORT@GOTPAGEOFF]
	b	LBB0_39
LBB0_34:
	cbz	w9, LBB0_15
; %bb.35:
	str	x8, [sp]
Lloh62:
	adrp	x1, l_.str.9@PAGE
Lloh63:
	add	x1, x1, l_.str.9@PAGEOFF
LBB0_36:
	mov	x0, x23
	bl	_dev_notice
LBB0_37:
	mov	x0, x20
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_38:
Lloh64:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh65:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_39:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	b	_ERR_PTR
LBB0_40:
	mov	x11, #0
LBB0_41:
	sxtw	x8, w22
	ldr	x9, [x21, #16]
	lsl	x8, x8, #3
	add	x10, x9, x8
	ldr	x22, [sp, #24]                  ; 8-byte Folded Reload
	str	w19, [x22, #16]!
	stp	x11, x10, [x22, #120]
	str	x11, [sp, #16]                  ; 8-byte Folded Spill
	stp	x23, x24, [x22, #56]
	stp	x27, x28, [x22, #40]
	str	x25, [x22, #32]
	ldr	x8, [x9, x8]
	stp	x26, x8, [x22, #16]
	add	x0, x22, #112
	bl	_spin_lock_init
	add	x0, x22, #108
	bl	_INIT_LIST_HEAD
	add	x0, x22, #104
	bl	_INIT_LIST_HEAD
	add	x0, x22, #100
	bl	_INIT_LIST_HEAD
	add	x0, x22, #96
	bl	_INIT_LIST_HEAD
	add	x0, x22, #92
Lloh66:
	adrp	x8, _timeout_sends@GOTPAGE
Lloh67:
	ldr	x8, [x8, _timeout_sends@GOTPAGEOFF]
Lloh68:
	ldr	w1, [x8]
	bl	_INIT_DELAYED_WORK
	add	x0, x22, #88
	bl	_INIT_LIST_HEAD
	add	x0, x22, #84
Lloh69:
	adrp	x8, _local_completions@GOTPAGE
Lloh70:
	ldr	x8, [x8, _local_completions@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
	bl	_INIT_WORK
	add	x0, x22, #80
	mov	w1, #1
	bl	_atomic_set
	add	x0, x22, #76
	bl	_init_completion
	mov	x0, x21
	bl	_spin_lock_irqsave
Lloh72:
	adrp	x8, _ib_mad_client_id@GOTPAGE
Lloh73:
	ldr	x8, [x8, _ib_mad_client_id@GOTPAGEOFF]
	ldr	x9, [x8]
	add	x9, x9, #1
	str	x9, [x8]
	str	x9, [x22, #8]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	cbz	x8, LBB0_55
; %bb.42:
	ldr	w0, [x8, #8]
	bl	_convert_mgmt_class
	mov	x23, x0
	bl	_is_vendor_class
	ldr	x1, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x8, [x21, #8]
	ldrsw	x9, [x1]
	cbz	x0, LBB0_47
; %bb.43:
	lsl	x9, x9, #4
	ldr	x19, [x8, x9]
	cbz	x19, LBB0_46
; %bb.44:
	mov	x0, x23
	bl	_vendor_class_index
	ldr	x1, [sp, #32]                   ; 8-byte Folded Reload
	ldr	x8, [x19]
	ldr	x0, [x8, x0, lsl #3]
	cbz	x0, LBB0_46
; %bb.45:
	bl	_is_vendor_method_in_use
	ldr	x1, [sp, #32]                   ; 8-byte Folded Reload
	cbnz	x0, LBB0_53
LBB0_46:
	mov	x0, x1
	ldr	x1, [sp, #24]                   ; 8-byte Folded Reload
	bl	_add_oui_reg_req
	b	LBB0_51
LBB0_47:
	add	x8, x8, x9, lsl #4
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_50
; %bb.48:
	ldr	x8, [x8]
	ldr	x8, [x8, x23, lsl #3]
	str	x8, [sp, #40]
	cbz	x8, LBB0_50
; %bb.49:
	add	x0, sp, #40
	bl	_method_in_use
	ldr	x1, [sp, #32]                   ; 8-byte Folded Reload
	cbnz	x0, LBB0_53
LBB0_50:
	mov	x0, x1
	ldr	x1, [sp, #24]                   ; 8-byte Folded Reload
	mov	x2, x23
	bl	_add_nonoui_reg_req
LBB0_51:
	cbz	w0, LBB0_55
; %bb.52:
	bl	_ERR_PTR
	mov	x20, x0
LBB0_53:
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_kfree
LBB0_54:
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	bl	_kfree
	b	LBB0_37
LBB0_55:
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	add	x0, x8, #88
	add	x1, x21, #4
	bl	_list_add_tail
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x20, x22
	b	LBB0_37
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpAdd	Lloh56, Lloh57
	.loh AdrpLdrGot	Lloh60, Lloh61
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpAdd	Lloh62, Lloh63
	.loh AdrpLdrGot	Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh72, Lloh73
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpLdrGotLdr	Lloh66, Lloh67, Lloh68
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ib_register_mad_agent: invalid QP Type %d\n"

	.comm	_IB_MGMT_RMPP_VERSION,8,3       ; @IB_MGMT_RMPP_VERSION
l_.str.1:                               ; @.str.1
	.asciz	"ib_register_mad_agent: invalid RMPP Version %u\n"

	.comm	_MAX_MGMT_VERSION,4,2           ; @MAX_MGMT_VERSION
l_.str.2:                               ; @.str.2
	.asciz	"ib_register_mad_agent: invalid Class Version %u\n"

l_.str.3:                               ; @.str.3
	.asciz	"ib_register_mad_agent: no recv_handler\n"

	.comm	_MAX_MGMT_CLASS,8,3             ; @MAX_MGMT_CLASS
	.comm	_IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE,8,3 ; @IB_MGMT_CLASS_SUBN_DIRECTED_ROUTE
l_.str.4:                               ; @.str.4
	.asciz	"ib_register_mad_agent: Invalid Mgmt Class 0x%x\n"

l_.str.5:                               ; @.str.5
	.asciz	"ib_register_mad_agent: Invalid Mgmt Class 0\n"

l_.str.6:                               ; @.str.6
	.asciz	"ib_register_mad_agent: No OUI specified for class 0x%x\n"

l_.str.7:                               ; @.str.7
	.asciz	"ib_register_mad_agent: RMPP version for non-RMPP class 0x%x\n"

	.comm	_IB_QPT_SMI,4,2                 ; @IB_QPT_SMI
	.comm	_IB_MGMT_CLASS_SUBN_LID_ROUTED,8,3 ; @IB_MGMT_CLASS_SUBN_LID_ROUTED
l_.str.8:                               ; @.str.8
	.asciz	"ib_register_mad_agent: Invalid SM QP type: class 0x%x\n"

l_.str.9:                               ; @.str.9
	.asciz	"ib_register_mad_agent: Invalid GS QP type: class 0x%x\n"

	.comm	_IB_MAD_USER_RMPP,4,2           ; @IB_MAD_USER_RMPP
l_.str.10:                              ; @.str.10
	.asciz	"ib_register_mad_agent: Invalid port\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.11:                              ; @.str.11
	.asciz	"ib_register_mad_agent: QP %d not supported\n"

	.comm	_EPROTONOSUPPORT,4,2            ; @EPROTONOSUPPORT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_timeout_sends,4,2              ; @timeout_sends
	.comm	_local_completions,4,2          ; @local_completions
	.comm	_ib_mad_client_id,8,3           ; @ib_mad_client_id
.subsections_via_symbols
