	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_register_mad_snoop          ## -- Begin function ib_register_mad_snoop
	.p2align	4, 0x90
_ib_register_mad_snoop:                 ## @ib_register_mad_snoop
	.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	%r9, %r12
	movq	%r8, %r15
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movq	16(%rbp), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movl	%ecx, %edi
	callq	_is_snooping_sends
	testq	%r15, %r15
	jne	LBB0_2
## %bb.1:
	testq	%rax, %rax
	jne	LBB0_4
LBB0_2:
	movl	%ebx, %edi
	callq	_is_snooping_recvs
	testq	%r12, %r12
	jne	LBB0_6
## %bb.3:
	testq	%rax, %rax
	jne	LBB0_4
LBB0_6:
	movl	%r14d, %edi
	callq	_get_spl_qp_index
	cmpl	$-1, %eax
	je	LBB0_4
## %bb.7:
	movl	%eax, %r14d
	movq	%r13, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_ib_get_mad_port
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movl	%r14d, -48(%rbp)                ## 4-byte Spill
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$72, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:
	movq	%rax, %r14
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	-48(%rbp), %rdx                 ## 4-byte Folded Reload
	leaq	(%rax,%rdx,4), %rcx
	movq	%rcx, 64(%r14)
	movq	%r13, 40(%r14)
	movq	%r12, 32(%r14)
	movq	%r15, 24(%r14)
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 16(%r14)
	movl	(%rax,%rdx,4), %eax
	shlq	$2, %rdx
	movq	%rdx, %r15
	movl	%eax, 12(%r14)
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 8(%r14)
	movl	%ebx, (%r14)
	leaq	56(%r14), %rdi
	callq	_init_completion
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	(%rax), %r15
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_register_snoop_agent
	movl	%eax, 52(%r14)
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	leaq	8(%r14), %rbx
	addq	$48, %r14
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_atomic_set
	jmp	LBB0_14
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_5:
	xorl	%edi, %edi
	subl	(%rax), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_8:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_10:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_12:
	movl	%eax, %edi
	callq	_ERR_PTR
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_kfree
LBB0_14:
	movq	%rbx, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_register_mad_snoop          ; -- Begin function ib_register_mad_snoop
	.p2align	2
_ib_register_mad_snoop:                 ; @ib_register_mad_snoop
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x6
	mov	x22, x5
	mov	x21, x4
	mov	x19, x3
	mov	x25, x2
	mov	x24, x1
	mov	x23, x0
	mov	x0, x3
	bl	_is_snooping_sends
	cbnz	x21, LBB0_2
; %bb.1:
	cbnz	x0, LBB0_9
LBB0_2:
	mov	x0, x19
	bl	_is_snooping_recvs
	cbnz	x22, LBB0_4
; %bb.3:
	cbnz	x0, LBB0_9
LBB0_4:
	mov	x0, x25
	bl	_get_spl_qp_index
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.5:
	mov	x27, x0
	mov	x0, x23
	mov	x1, x24
	bl	_ib_get_mad_port
	cbz	x0, LBB0_11
; %bb.6:
	mov	x26, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #72
	bl	_kzalloc
	cbz	x0, LBB0_12
; %bb.7:
	mov	x25, x0
	ldr	x8, [x26]
	sbfiz	x28, x27, #2, #32
	add	x9, x8, x28
	str	x9, [x0, #64]
	mov	x27, x0
	str	w24, [x27, #8]!
	stp	x22, x23, [x0, #32]
	stp	x20, x21, [x0, #16]
	ldr	w8, [x8, x28]
	str	w8, [x0, #12]
	str	w19, [x0], #56
	bl	_init_completion
	ldr	x8, [x26]
	add	x0, x8, x28
	mov	x1, x25
	bl	_register_snoop_agent
	str	w0, [x25, #52]
	tbnz	w0, #31, LBB0_13
; %bb.8:
	add	x0, x25, #48
	mov	w1, #1
	bl	_atomic_set
	mov	x0, x27
	b	LBB0_14
LBB0_9:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_10:
	ldr	w8, [x8]
	neg	w0, w8
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_11:
Lloh5:
	adrp	x8, _ENODEV@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
	b	LBB0_10
LBB0_12:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_10
LBB0_13:
	bl	_ERR_PTR
	mov	x19, x0
	mov	x0, x25
	bl	_kfree
	mov	x0, x19
LBB0_14:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
