	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function srpt_unregister_mad_agent
_srpt_unregister_mad_agent:             ## @srpt_unregister_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	_IB_PORT_DEVICE_MGMT_SUP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	(%rdi), %rax
	cmpl	$0, (%rax)
	jle	LBB0_7
## %bb.1:
	movq	%rdi, %r14
	movl	$1, %r13d
	movl	$8, %ebx
	leaq	-48(%rbp), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	1(%r13), %rax
	movq	(%r14), %rcx
	movslq	(%rcx), %rcx
	addq	$16, %rbx
	cmpq	%rcx, %r13
	movq	%rax, %r13
	jge	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %r12
	movl	-8(%r12,%rbx), %eax
	xorl	%edi, %edi
	cmpq	%rax, %r13
	setne	%dil
	callq	_WARN_ON
	movq	(%r14), %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	movq	%r15, %rcx
	callq	_ib_modify_port
	testq	%rax, %rax
	jns	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_pr_err
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r12,%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	callq	_ib_unregister_mad_agent
	movq	$0, (%r12,%rbx)
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_PORT_DEVICE_MGMT_SUP,4,2    ## @IB_PORT_DEVICE_MGMT_SUP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"disabling MAD processing failed.\n"

	.no_dead_strip	_srpt_unregister_mad_agent
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function srpt_unregister_mad_agent
_srpt_unregister_mad_agent:             ; @srpt_unregister_mad_agent
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
Lloh0:
	adrp	x8, _IB_PORT_DEVICE_MGMT_SUP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_PORT_DEVICE_MGMT_SUP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	ldr	x8, [x0]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
	mov	x22, #0
	mov	w20, #1
Lloh3:
	adrp	x21, l_.str@PAGE
Lloh4:
	add	x21, x21, l_.str@PAGEOFF
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x20, #1
	ldr	x9, [x19]
	ldrsw	x9, [x9]
	add	x22, x22, #16
	cmp	x20, x9
	mov	x20, x8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x23, [x19, #8]
	ldr	w8, [x23, x22]
	cmp	x20, x8
	cset	w0, ne
	bl	_WARN_ON
	ldr	x0, [x19]
	add	x3, sp, #8
	mov	x1, x20
	mov	w2, #0
	bl	_ib_modify_port
	tbz	x0, #63, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x21
	bl	_pr_err
LBB0_5:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x23, x23, x22
	ldr	x0, [x23, #8]
	cbz	x0, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	bl	_ib_unregister_mad_agent
	str	xzr, [x23, #8]
	b	LBB0_2
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_PORT_DEVICE_MGMT_SUP,4,2    ; @IB_PORT_DEVICE_MGMT_SUP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"disabling MAD processing failed.\n"

	.no_dead_strip	_srpt_unregister_mad_agent
.subsections_via_symbols
