	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_mad_agent
_find_mad_agent:                        ## @find_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movq	%rsi, %rdi
	callq	_ib_response_mad
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movl	20(%rbx), %edi
	callq	_be64_to_cpu
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_rcu_read_lock
	movq	_ib_mad_clients@GOTPCREL(%rip), %rdi
	callq	_xa_load
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movq	%rax, %rbx
	leaq	4(%rax), %rdi
	callq	_atomic_inc_not_zero
	xorl	%r12d, %r12d
	testl	%eax, %eax
	cmovneq	%rbx, %r12
LBB0_3:
	xorl	%eax, %eax
	callq	_rcu_read_unlock
	testq	%r12, %r12
	jne	LBB0_13
	jmp	LBB0_15
LBB0_4:
	leaq	16(%r15), %r14
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	(%rbx), %rax
	movq	_MAX_MGMT_VERSION@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jae	LBB0_11
## %bb.5:
	movl	16(%rbx), %edi
	callq	_is_vendor_class
	movq	24(%r15), %rcx
	movq	(%rbx), %rdx
	shlq	$4, %rdx
	testl	%eax, %eax
	je	LBB0_17
## %bb.6:
	movq	(%rcx,%rdx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.7:
	movq	(%rax), %r12
	movl	16(%rbx), %edi
	callq	_vendor_class_index
	movq	(%r12,%rax,8), %r12
	testq	%r12, %r12
	je	LBB0_11
## %bb.8:
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_find_vendor_oui
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.9:
	movq	(%r12), %rcx
	cltq
	movq	(%rcx,%rax,8), %rax
	testq	%rax, %rax
	jne	LBB0_20
	jmp	LBB0_11
LBB0_17:
	movq	8(%rcx,%rdx), %r13
	testq	%r13, %r13
	je	LBB0_11
## %bb.18:
	movl	16(%rbx), %edi
	callq	_convert_mgmt_class
	movq	%rax, %r12
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cmpq	%rax, %r12
	jae	LBB0_11
## %bb.19:
	movq	(%r13), %r12
	movl	16(%rbx), %edi
	callq	_convert_mgmt_class
	movq	(%r12,%rax,8), %rax
	testq	%rax, %rax
	je	LBB0_11
LBB0_20:
	movq	(%rax), %rax
	movq	_IB_MGMT_METHOD_RESP@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	notq	%rcx
	andq	8(%rbx), %rcx
	movq	(%rax,%rcx,8), %r12
	testq	%r12, %r12
	je	LBB0_11
## %bb.21:
	leaq	4(%r12), %rdi
	callq	_atomic_inc
	jmp	LBB0_12
LBB0_11:
	xorl	%r12d, %r12d
LBB0_12:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	testq	%r12, %r12
	je	LBB0_15
LBB0_13:
	cmpl	$0, (%r12)
	jne	LBB0_16
## %bb.14:
	movq	8(%r15), %rdi
	movl	(%r15), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	callq	_dev_notice
	movq	%r12, %rdi
	callq	_deref_mad_agent
LBB0_15:
	xorl	%r12d, %r12d
LBB0_16:
	movq	%r12, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ib_mad_clients,4,2             ## @ib_mad_clients
	.comm	_MAX_MGMT_VERSION,8,3           ## @MAX_MGMT_VERSION
	.comm	_IB_MGMT_METHOD_RESP,8,3        ## @IB_MGMT_METHOD_RESP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"No receive handler for client %p on port %d\n"

	.no_dead_strip	_find_mad_agent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_mad_agent
_find_mad_agent:                        ; @find_mad_agent
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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	x19, x0
	mov	x0, x1
	bl	_ib_response_mad
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w0, [x21, #20]
	bl	_be64_to_cpu
	bl	_rcu_read_lock
Lloh0:
	adrp	x0, _ib_mad_clients@GOTPAGE
Lloh1:
	ldr	x0, [x0, _ib_mad_clients@GOTPAGEOFF]
	bl	_xa_load
	cbz	x0, LBB0_9
; %bb.2:
	mov	x20, x0
	add	x0, x0, #4
	bl	_atomic_inc_not_zero
	cmp	w0, #0
	csel	x21, xzr, x20, eq
	bl	_rcu_read_unlock
	b	LBB0_17
LBB0_3:
	add	x20, x19, #16
	mov	x0, x20
	bl	_spin_lock_irqsave
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _MAX_MGMT_VERSION@GOTPAGE
Lloh3:
	ldr	x9, [x9, _MAX_MGMT_VERSION@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.hs	LBB0_15
; %bb.4:
	ldr	w0, [x21, #16]
	bl	_is_vendor_class
	ldr	x8, [x19, #24]
	ldr	x9, [x21]
	cbz	w0, LBB0_10
; %bb.5:
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	cbz	x8, LBB0_15
; %bb.6:
	ldr	x22, [x8]
	ldr	w0, [x21, #16]
	bl	_vendor_class_index
	ldr	x22, [x22, x0, lsl #3]
	cbz	x22, LBB0_15
; %bb.7:
	ldr	w1, [x21]
	mov	x0, x22
	bl	_find_vendor_oui
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.8:
	ldr	x8, [x22]
	ldr	x8, [x8, w0, sxtw #3]
	cbnz	x8, LBB0_13
	b	LBB0_15
LBB0_9:
	mov	x21, #0
	bl	_rcu_read_unlock
	b	LBB0_17
LBB0_10:
	add	x8, x8, x9, lsl #4
	ldr	x23, [x8, #8]
	cbz	x23, LBB0_15
; %bb.11:
	ldr	w0, [x21, #16]
	bl	_convert_mgmt_class
	mov	x22, x0
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	x22, x0
	b.hs	LBB0_15
; %bb.12:
	ldr	x22, [x23]
	ldr	w0, [x21, #16]
	bl	_convert_mgmt_class
	ldr	x8, [x22, x0, lsl #3]
	cbz	x8, LBB0_15
LBB0_13:
	ldr	x8, [x8]
	ldr	x9, [x21, #8]
Lloh5:
	adrp	x10, _IB_MGMT_METHOD_RESP@GOTPAGE
Lloh6:
	ldr	x10, [x10, _IB_MGMT_METHOD_RESP@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	bic	x9, x9, x10
	ldr	x21, [x8, x9, lsl #3]
	cbz	x21, LBB0_16
; %bb.14:
	add	x0, x21, #4
	bl	_atomic_inc
	b	LBB0_16
LBB0_15:
	mov	x21, #0
LBB0_16:
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_17:
	cbz	x21, LBB0_20
; %bb.18:
	ldr	w8, [x21]
	cbnz	w8, LBB0_20
; %bb.19:
	ldr	x0, [x19, #8]
	ldr	w3, [x19]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_notice
	mov	x0, x21
	bl	_deref_mad_agent
	mov	x21, #0
LBB0_20:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_ib_mad_clients,4,2             ; @ib_mad_clients
	.comm	_MAX_MGMT_VERSION,8,3           ; @MAX_MGMT_VERSION
	.comm	_IB_MGMT_METHOD_RESP,8,3        ; @IB_MGMT_METHOD_RESP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"No receive handler for client %p on port %d\n"

	.no_dead_strip	_find_mad_agent
.subsections_via_symbols
