	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_multiplex_mad
_mlx4_ib_multiplex_mad:                 ## @mlx4_ib_multiplex_mad
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_to_mdev
	movq	%rax, %rbx
	movq	16(%r15), %r14
	movl	(%r12), %edi
	callq	_MLX4_TUN_WRID_QPN
	movq	%rax, %r13
	movl	4(%r12), %edx
	movq	(%rbx), %rdi
	movl	(%rdi), %eax
	cmpl	%eax, %edx
	jl	LBB0_4
## %bb.1:
	movq	_MLX4_MFUNC_MAX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	leal	(%rax,%rcx,8), %ecx
	cmpl	%ecx, %edx
	jge	LBB0_4
## %bb.2:
	testb	$4, %dl
	jne	LBB0_4
## %bb.3:
	movl	%edx, %ecx
	andl	$1, %ecx
	movl	4(%r15), %esi
	decl	%esi
	cmpl	%esi, %ecx
	jne	LBB0_4
## %bb.6:
	movl	%edx, %ecx
	andl	$-8, %ecx
	subl	%eax, %ecx
	leal	7(%rcx), %eax
	testl	%ecx, %ecx
	cmovnsl	%ecx, %eax
	sarl	$3, %eax
	cmpl	(%r15), %eax
	jne	LBB0_7
## %bb.8:
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	(%r12), %rax
	movq	_MLX4_NUM_TUNNEL_BUFS@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rbx
	decq	%rbx
	andq	%rax, %rbx
	movq	(%r14,%r13,8), %rax
	shlq	$4, %rbx
	movq	8(%rax,%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	callq	_mlx4_master_func_num
	cmpl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_11
## %bb.9:
	movl	4(%r12), %edx
	testb	$2, %dl
	jne	LBB0_11
## %bb.10:
	movl	8(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_5
LBB0_4:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
LBB0_5:
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_ib_warn                   ## TAILCALL
LBB0_7:
	movl	8(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_11:
	movl	8(%r15), %edi
	movq	(%r14,%r13,8), %rax
	movl	(%rax,%rbx), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	$28, %edx
	callq	_ib_dma_sync_single_for_cpu
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	(%rbx), %eax
	leal	-128(%rax), %ecx
	cmpl	$6, %ecx
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	ja	LBB0_14
## %bb.12:
	movl	8(%rbx), %edx
	testl	%edx, %edx
	je	LBB0_13
## %bb.31:
	movl	8(%r15), %edi
	movl	4(%rbx), %ecx
	leaq	L_.str.3(%rip), %rsi
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_ib_warn                   ## TAILCALL
LBB0_13:
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 8(%rbx)
LBB0_14:
	movl	4(%rbx), %ecx
	cmpl	$137, %ecx
	je	LBB0_19
## %bb.15:
	cmpl	$136, %ecx
	je	LBB0_22
## %bb.16:
	cmpl	$135, %ecx
	jne	LBB0_20
## %bb.17:
	movl	4(%r15), %esi
	movl	8(%r15), %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %rcx
	callq	_mlx4_ib_multiplex_sa_handler
	jmp	LBB0_18
LBB0_19:
	movl	4(%r15), %esi
	movl	8(%r15), %edi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	%rbx, %rcx
	callq	_mlx4_ib_multiplex_cm_handler
LBB0_18:
	testl	%eax, %eax
	jne	LBB0_30
	jmp	LBB0_23
LBB0_22:
	orl	$2, %eax
	cmpl	$134, %eax
	je	LBB0_23
	jmp	LBB0_30
LBB0_20:
	movq	(%r14), %rdi
	callq	_mlx4_master_func_num
	cmpl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_21
LBB0_23:
	leaq	-68(%rbp), %rdi
	leaq	24(%rbx), %rsi
	movl	$4, %edx
	callq	_memcpy
	movl	8(%r15), %eax
	movl	%eax, -72(%rbp)
	leaq	-72(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_mlx4_ib_query_ah
	movq	_IB_AH_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -56(%rbp)
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	je	LBB0_26
## %bb.24:
	movl	-52(%rbp), %ecx
	cmpl	%edx, %ecx
	jne	LBB0_25
LBB0_26:
	movl	4(%r15), %r15d
	movl	4(%r12), %esi
	movq	%r14, %rdi
	callq	_is_proxy_qp0
	testq	%rax, %rax
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	jne	LBB0_27
## %bb.28:
	movq	_IB_QPT_GSI@GOTPCREL(%rip), %rax
	jmp	LBB0_29
LBB0_27:
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rax
LBB0_29:
	movl	(%rax), %r12d
	movl	20(%rbx), %edi
	callq	_be16_to_cpu
	movl	%eax, %r15d
	movl	16(%rbx), %edi
	callq	_be32_to_cpu
	movl	%eax, %r13d
	movl	12(%rbx), %edi
	callq	_be32_to_cpu
                                        ## kill: def $eax killed $eax def $rax
	subq	$8, %rsp
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	movl	%r13d, %r9d
	pushq	%rbx
	leaq	-56(%rbp), %rbx
	pushq	%rbx
	pushq	%rax
	callq	_mlx4_ib_send_to_wire
	addq	$32, %rsp
	jmp	LBB0_30
LBB0_25:
	movl	8(%r15), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_mlx4_ib_warn
LBB0_30:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	movl	8(%r15), %edi
	movl	4(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlx4_ib_warn                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MLX4_NUM_TUNNEL_BUFS,4,2       ## @MLX4_NUM_TUNNEL_BUFS
	.comm	_MLX4_MFUNC_MAX,4,2             ## @MLX4_MFUNC_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't multiplex bad sqp:%d\n"

L_.str.1:                               ## @.str.1
	.asciz	"can't multiplex bad sqp:%d: belongs to another slave\n"

L_.str.2:                               ## @.str.2
	.asciz	"can't multiplex bad sqp:%d: non-master trying to send QP0 packets\n"

	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
L_.str.3:                               ## @.str.3
	.asciz	"egress mad has non-null tid msb:%d class:%d slave:%d\n"

L_.str.4:                               ## @.str.4
	.asciz	"dropping unsupported egress mad from class:%d for slave:%d\n"

	.comm	_IB_AH_GRH,4,2                  ## @IB_AH_GRH
L_.str.5:                               ## @.str.5
	.asciz	"slave:%d accessed invalid sgid_index:%d\n"

	.comm	_IB_QPT_SMI,4,2                 ## @IB_QPT_SMI
	.comm	_IB_QPT_GSI,4,2                 ## @IB_QPT_GSI
	.no_dead_strip	_mlx4_ib_multiplex_mad
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlx4_ib_multiplex_mad
_mlx4_ib_multiplex_mad:                 ; @mlx4_ib_multiplex_mad
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x22, x1
	mov	x21, x0
	ldr	w0, [x0, #8]
	bl	_to_mdev
	mov	x19, x0
	ldr	x25, [x21, #16]
	ldr	w0, [x22]
	bl	_MLX4_TUN_WRID_QPN
	mov	x24, x0
	ldr	w2, [x22, #4]
	ldr	x0, [x19]
	ldr	w8, [x0]
	cmp	w2, w8
	b.lt	LBB0_8
; %bb.1:
Lloh0:
	adrp	x9, _MLX4_MFUNC_MAX@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLX4_MFUNC_MAX@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	add	w9, w8, w9, lsl #3
	cmp	w2, w9
	b.ge	LBB0_8
; %bb.2:
	tbnz	w2, #2, LBB0_8
; %bb.3:
	and	w9, w2, #0x1
	ldr	w10, [x21, #4]
	sub	w10, w10, #1
	cmp	w9, w10
	b.ne	LBB0_8
; %bb.4:
	and	w9, w2, #0xfffffff8
	sub	w8, w9, w8
	add	w9, w8, #7
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w20, w8, #3
	ldr	w8, [x21]
	cmp	w20, w8
	b.ne	LBB0_10
; %bb.5:
	ldr	w8, [x22]
Lloh3:
	adrp	x9, _MLX4_NUM_TUNNEL_BUFS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MLX4_NUM_TUNNEL_BUFS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	sub	w9, w9, #1
	and	w26, w9, w8
	ldr	x8, [x25, x24, lsl #3]
	add	x8, x8, w26, sxtw #4
	ldr	x23, [x8, #8]
	bl	_mlx4_master_func_num
	cmp	w20, w0
	b.eq	LBB0_11
; %bb.6:
	ldr	w2, [x22, #4]
	tbnz	w2, #1, LBB0_11
; %bb.7:
	ldr	w0, [x21, #8]
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
	ldr	w0, [x21, #8]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
LBB0_9:
	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
	add	sp, sp, #112
	b	_mlx4_ib_warn
LBB0_10:
	ldr	w0, [x21, #8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_11:
	sxtw	x8, w26
	ldr	w0, [x21, #8]
	ldr	x9, [x25, x24, lsl #3]
	lsl	x8, x8, #4
	ldr	w1, [x9, x8]
Lloh12:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	w2, #28
	bl	_ib_dma_sync_single_for_cpu
	ldr	w8, [x23]
	sub	w9, w8, #128
	cmp	w9, #6
	b.hi	LBB0_15
; %bb.12:
	ldr	w2, [x23, #8]
	cbz	w2, LBB0_14
; %bb.13:
	ldr	w0, [x21, #8]
	ldr	w8, [x23, #4]
	stp	x8, x20, [sp]
Lloh15:
	adrp	x1, l_.str.3@PAGE
Lloh16:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_27
LBB0_14:
	str	w20, [x23, #8]
LBB0_15:
	ldr	w9, [x23, #4]
	cmp	w9, #137
	b.eq	LBB0_19
; %bb.16:
	cmp	w9, #136
	b.eq	LBB0_20
; %bb.17:
	cmp	w9, #135
	b.ne	LBB0_21
; %bb.18:
	ldp	w1, w0, [x21, #4]
	mov	x2, x20
	mov	x3, x23
	bl	_mlx4_ib_multiplex_sa_handler
	cbnz	w0, LBB0_28
	b	LBB0_22
LBB0_19:
	ldp	w1, w0, [x21, #4]
	mov	x2, x20
	mov	x3, x23
	bl	_mlx4_ib_multiplex_cm_handler
	cbnz	w0, LBB0_28
	b	LBB0_22
LBB0_20:
	orr	w8, w8, #0x2
	cmp	w8, #134
	b.eq	LBB0_22
	b	LBB0_28
LBB0_21:
	ldr	x0, [x19]
	bl	_mlx4_master_func_num
	cmp	w20, w0
	b.ne	LBB0_26
LBB0_22:
	add	x8, sp, #24
	orr	x0, x8, #0x4
	add	x1, x23, #24
	mov	w2, #4
	bl	_memcpy
	ldr	w8, [x21, #8]
	str	w8, [sp, #24]
	add	x0, sp, #24
	add	x1, sp, #16
	bl	_mlx4_ib_query_ah
	ldr	w8, [sp, #16]
Lloh17:
	adrp	x9, _IB_AH_GRH@GOTPAGE
Lloh18:
	ldr	x9, [x9, _IB_AH_GRH@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_24
; %bb.23:
	ldr	w8, [sp, #20]
	cmp	w8, w20
	b.ne	LBB0_25
LBB0_24:
	ldr	w21, [x21, #4]
	ldr	w1, [x22, #4]
	mov	x0, x19
	mov	x2, x20
	bl	_is_proxy_qp0
Lloh20:
	adrp	x8, _IB_QPT_SMI@GOTPAGE
Lloh21:
	ldr	x8, [x8, _IB_QPT_SMI@GOTPAGEOFF]
Lloh22:
	adrp	x9, _IB_QPT_GSI@GOTPAGE
Lloh23:
	ldr	x9, [x9, _IB_QPT_GSI@GOTPAGEOFF]
	cmp	x0, #0
	csel	x8, x9, x8, eq
	ldr	w22, [x8]
	ldr	w0, [x23, #20]
	bl	_be16_to_cpu
	mov	x24, x0
	ldr	w0, [x23, #16]
	bl	_be32_to_cpu
	mov	x25, x0
	ldr	w0, [x23, #12]
	bl	_be32_to_cpu
	mov	x6, x0
	str	x23, [sp]
	add	x7, sp, #16
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	mov	x4, x24
	mov	x5, x25
	bl	_mlx4_ib_send_to_wire
	b	LBB0_28
LBB0_25:
	ldr	w0, [x21, #8]
	str	x8, [sp]
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x20
	b	LBB0_27
LBB0_26:
	ldr	w0, [x21, #8]
	ldr	w2, [x23, #4]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	str	x20, [sp]
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_27:
	bl	_mlx4_ib_warn
LBB0_28:
	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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_MLX4_NUM_TUNNEL_BUFS,4,2       ; @MLX4_NUM_TUNNEL_BUFS
	.comm	_MLX4_MFUNC_MAX,4,2             ; @MLX4_MFUNC_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't multiplex bad sqp:%d\n"

l_.str.1:                               ; @.str.1
	.asciz	"can't multiplex bad sqp:%d: belongs to another slave\n"

l_.str.2:                               ; @.str.2
	.asciz	"can't multiplex bad sqp:%d: non-master trying to send QP0 packets\n"

	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
l_.str.3:                               ; @.str.3
	.asciz	"egress mad has non-null tid msb:%d class:%d slave:%d\n"

l_.str.4:                               ; @.str.4
	.asciz	"dropping unsupported egress mad from class:%d for slave:%d\n"

	.comm	_IB_AH_GRH,4,2                  ; @IB_AH_GRH
l_.str.5:                               ; @.str.5
	.asciz	"slave:%d accessed invalid sgid_index:%d\n"

	.comm	_IB_QPT_SMI,4,2                 ; @IB_QPT_SMI
	.comm	_IB_QPT_GSI,4,2                 ; @IB_QPT_GSI
	.no_dead_strip	_mlx4_ib_multiplex_mad
.subsections_via_symbols
