	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_mad_agent_security_setup    ## -- Begin function ib_mad_agent_security_setup
	.p2align	4, 0x90
_ib_mad_agent_security_setup:           ## @ib_mad_agent_security_setup
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r12
	movq	16(%rdi), %rdi
	movl	12(%r12), %esi
	callq	_rdma_protocol_ib
	testl	%eax, %eax
	je	LBB0_8
## %bb.1:
	leaq	4(%r12), %r14
	movq	%r14, %rdi
	callq	_INIT_LIST_HEAD
	movq	%r12, %rdi
	callq	_security_ib_alloc_security
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_9
## %bb.2:
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_8
## %bb.3:
	movq	_mad_agent_list_lock@GOTPCREL(%rip), %rdi
	callq	_spin_lock
	movl	(%r12), %ebx
	movq	16(%r12), %rdi
	callq	_dev_name
	movl	12(%r12), %edx
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_security_ib_endport_manage_subnet
	testl	%eax, %eax
	je	LBB0_7
## %bb.4:
	movl	%eax, %ebx
	movq	_mad_agent_list_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
	movl	(%r12), %edi
	callq	_security_ib_free_security
	jmp	LBB0_9
LBB0_7:
	movl	8(%r12), %edi
	movl	$1, %esi
	callq	_WRITE_ONCE
	movq	_mad_agent_list@GOTPCREL(%rip), %rsi
	movq	%r14, %rdi
	callq	_list_add
	movq	_mad_agent_list_lock@GOTPCREL(%rip), %rdi
	callq	_spin_unlock
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_QPT_SMI,4,2                 ## @IB_QPT_SMI
	.comm	_mad_agent_list_lock,4,2        ## @mad_agent_list_lock
	.comm	_mad_agent_list,4,2             ## @mad_agent_list
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ib_mad_agent_security_setup    ; -- Begin function ib_mad_agent_security_setup
	.p2align	2
_ib_mad_agent_security_setup:           ; @ib_mad_agent_security_setup
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x21, x1
	mov	x19, x0
	ldr	x0, [x0, #16]
	ldr	w1, [x19, #12]
	bl	_rdma_protocol_ib
	cbz	w0, LBB0_5
; %bb.1:
	add	x20, x19, #4
	mov	x0, x20
	bl	_INIT_LIST_HEAD
	mov	x0, x19
	bl	_security_ib_alloc_security
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.2:
Lloh0:
	adrp	x8, _IB_QPT_SMI@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_QPT_SMI@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_5
; %bb.3:
Lloh3:
	adrp	x0, _mad_agent_list_lock@GOTPAGE
Lloh4:
	ldr	x0, [x0, _mad_agent_list_lock@GOTPAGEOFF]
	bl	_spin_lock
	ldr	w21, [x19]
	ldr	x0, [x19, #16]
	bl	_dev_name
	mov	x1, x0
	ldr	w2, [x19, #12]
	mov	x0, x21
	bl	_security_ib_endport_manage_subnet
	mov	x22, x0
	cbz	w0, LBB0_7
; %bb.4:
Lloh5:
	adrp	x0, _mad_agent_list_lock@GOTPAGE
Lloh6:
	ldr	x0, [x0, _mad_agent_list_lock@GOTPAGEOFF]
	bl	_spin_unlock
	ldr	w0, [x19]
	bl	_security_ib_free_security
	b	LBB0_6
LBB0_5:
	mov	w22, #0
LBB0_6:
	mov	x0, x22
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	ldr	w0, [x19, #8]
	mov	w1, #1
	bl	_WRITE_ONCE
Lloh7:
	adrp	x1, _mad_agent_list@GOTPAGE
Lloh8:
	ldr	x1, [x1, _mad_agent_list@GOTPAGEOFF]
	mov	x0, x20
	bl	_list_add
Lloh9:
	adrp	x0, _mad_agent_list_lock@GOTPAGE
Lloh10:
	ldr	x0, [x0, _mad_agent_list_lock@GOTPAGEOFF]
	bl	_spin_unlock
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_QPT_SMI,4,2                 ; @IB_QPT_SMI
	.comm	_mad_agent_list_lock,4,2        ; @mad_agent_list_lock
	.comm	_mad_agent_list,4,2             ; @mad_agent_list
.subsections_via_symbols
