	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function mlx4_ib_mad_init
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_mlx4_ib_mad_init
	.p2align	4, 0x90
_mlx4_ib_mad_init:                      ## @mlx4_ib_mad_init
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jle	LBB0_17
## %bb.1:
	movq	%rdi, %r15
	leaq	16(%rdi), %rbx
	xorl	%r12d, %r12d
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	xorl	%ebx, %ebx
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movq	%rbx, 8(%rax)
	movslq	(%r15), %rax
	movq	%r14, %r12
	cmpq	%rax, %r14
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	jge	LBB0_17
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	1(%r12), %r14
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_rdma_port_get_link_layer
	movl	%eax, %r13d
	movq	_IB_LINK_LAYER_INFINIBAND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r13d
	jne	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_send_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movl	$0, 16(%rsp)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ib_register_mad_agent
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	jne	LBB0_4
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%r12,8), %rax
	movq	%rbx, (%rax)
	movq	_IB_LINK_LAYER_INFINIBAND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	cmpl	%eax, %r13d
	jne	LBB0_14
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%r12,8), %rcx
	movq	$0, (%rcx)
	cmpl	%eax, %r13d
	jne	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_send_handler@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%rsp)
	movl	$0, 16(%rsp)
	movq	%rbx, %rdi
	movl	%r14d, %esi
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_ib_register_mad_agent
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_16
LBB0_4:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %r14d
	cmpl	$0, (%r15)
	jle	LBB0_18
## %bb.5:
	xorl	%ebx, %ebx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=1
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_18
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	callq	_ib_unregister_mad_agent
	movq	8(%r15), %rax
	movq	(%rax,%rbx,8), %rax
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=1
	callq	_ib_unregister_mad_agent
	jmp	LBB0_10
LBB0_17:
	xorl	%r14d, %r14d
LBB0_18:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_LINK_LAYER_INFINIBAND,4,2   ## @IB_LINK_LAYER_INFINIBAND
	.comm	_IB_QPT_GSI,4,2                 ## @IB_QPT_GSI
	.comm	_IB_QPT_SMI,4,2                 ## @IB_QPT_SMI
	.comm	_send_handler,4,2               ## @send_handler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_mad_init               ; -- Begin function mlx4_ib_mad_init
	.p2align	2
_mlx4_ib_mad_init:                      ; @mlx4_ib_mad_init
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_16
; %bb.1:
	mov	x19, x0
	mov	x24, #0
	add	x20, x0, #16
Lloh0:
	adrp	x25, _IB_LINK_LAYER_INFINIBAND@GOTPAGE
Lloh1:
	ldr	x25, [x25, _IB_LINK_LAYER_INFINIBAND@GOTPAGEOFF]
Lloh2:
	adrp	x26, _IB_QPT_SMI@GOTPAGE
Lloh3:
	ldr	x26, [x26, _IB_QPT_SMI@GOTPAGEOFF]
Lloh4:
	adrp	x27, _send_handler@GOTPAGE
Lloh5:
	ldr	x27, [x27, _send_handler@GOTPAGEOFF]
Lloh6:
	adrp	x28, _IB_QPT_GSI@GOTPAGE
Lloh7:
	ldr	x28, [x28, _IB_QPT_GSI@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, #0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x24, lsl #3]
	str	x23, [x8, #8]
	ldrsw	x8, [x19]
	mov	x24, x21
	cmp	x21, x8
	b.ge	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	add	x21, x24, #1
	mov	x0, x20
	mov	x1, x21
	bl	_rdma_port_get_link_layer
	mov	x22, x0
	ldr	w8, [x25]
	cmp	w0, w8
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w2, [x26]
	ldr	w5, [x27]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x21
	mov	x3, #0
	mov	w4, #0
	mov	x6, #0
	mov	x7, #0
	bl	_ib_register_mad_agent
	mov	x23, x0
	bl	_IS_ERR
	cbnz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x24, lsl #3]
	str	x23, [x8]
	ldr	w8, [x25]
	cmp	w22, w8
	b.ne	LBB0_2
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x24, lsl #3]
	str	xzr, [x9]
	cmp	w22, w8
	b.ne	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w2, [x28]
	ldr	w5, [x27]
	str	wzr, [sp]
	mov	x0, x20
	mov	x1, x21
	mov	x3, #0
	mov	w4, #0
	mov	x6, #0
	mov	x7, #0
	bl	_ib_register_mad_agent
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
LBB0_9:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x20, x0
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.10:
	mov	x21, #0
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.ge	LBB0_17
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
	ldr	x0, [x8]
	cbz	x0, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_ib_unregister_mad_agent
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x21, lsl #3]
LBB0_14:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x0, [x8, #8]
	cbz	x0, LBB0_11
; %bb.15:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_ib_unregister_mad_agent
	b	LBB0_11
LBB0_16:
	mov	w20, #0
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_LINK_LAYER_INFINIBAND,4,2   ; @IB_LINK_LAYER_INFINIBAND
	.comm	_IB_QPT_GSI,4,2                 ; @IB_QPT_GSI
	.comm	_IB_QPT_SMI,4,2                 ; @IB_QPT_SMI
	.comm	_send_handler,4,2               ; @send_handler
.subsections_via_symbols
