	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlx4_ib_demux_mad
_mlx4_ib_demux_mad:                     ## @mlx4_ib_demux_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movq	%rcx, %r15
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	callq	_to_mdev
	movq	%rax, %r14
	movq	(%rax), %rdi
	callq	_mlx4_master_func_num
	movl	%eax, %r13d
	movl	%eax, -44(%rbp)
	testb	$-128, (%rbx)
	je	LBB0_3
## %bb.1:
	movl	8(%rbx), %eax
	movl	%eax, -44(%rbp)
	movl	$255, %r13d
	cmpl	$255, %eax
	je	LBB0_3
## %bb.2:
	movl	$0, 8(%rbx)
	movl	%eax, %r13d
LBB0_3:
	movq	_IB_WC_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx)
	je	LBB0_7
## %bb.4:
	movl	(%r15), %edx
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_mlx4_ib_find_real_gid
	movl	%eax, %r13d
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	js	LBB0_5
LBB0_7:
	movl	4(%rbx), %eax
	cmpl	$130, %eax
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_11
## %bb.8:
	cmpl	$129, %eax
	je	LBB0_15
## %bb.9:
	cmpl	$128, %eax
	jne	LBB0_13
## %bb.10:
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	movq	%rbx, %rcx
	callq	_mlx4_ib_demux_sa_handler
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_20
	jmp	LBB0_16
LBB0_5:
	leaq	L_.str(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_mlx4_ib_warn
	jmp	LBB0_6
LBB0_11:
	leaq	-44(%rbp), %rdx
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movq	%rbx, %rcx
	callq	_mlx4_ib_demux_cm_handler
	xorl	%r15d, %r15d
	testl	%eax, %eax
	jne	LBB0_20
## %bb.12:
	movl	-44(%rbp), %r13d
	jmp	LBB0_16
LBB0_15:
	movl	(%rbx), %eax
	movq	_IB_MGMT_METHOD_GET_RESP@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	cmpl	(%rcx), %eax
	je	LBB0_16
	jmp	LBB0_20
LBB0_13:
	movq	(%r14), %rdi
	callq	_mlx4_master_func_num
	cmpl	%eax, %r13d
	jne	LBB0_14
LBB0_16:
	movq	(%r14), %rax
	movl	(%rax), %ecx
	cmpl	%ecx, %r13d
	jge	LBB0_17
## %bb.18:
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	movq	8(%r8), %rax
	movl	(%rax), %ecx
	movq	%rbx, (%rsp)
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	-48(%rbp), %edx                 ## 4-byte Reload
	movq	-64(%rbp), %r9                  ## 8-byte Reload
	callq	_mlx4_ib_send_to_slave
	xorl	%r15d, %r15d
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	-44(%rbp), %esi
	leaq	L_.str.3(%rip), %rdi
	movl	%eax, %edx
	callq	_pr_debug
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_mlx4_ib_warn
LBB0_6:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
LBB0_20:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	4(%rbx), %esi
	leaq	L_.str.1(%rip), %rdi
	movl	%r13d, %edx
	callq	_pr_debug
	xorl	%r15d, %r15d
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_WC_GRH,4,2                  ## @IB_WC_GRH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed matching grh\n"

	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_IB_MGMT_METHOD_GET_RESP,4,2    ## @IB_MGMT_METHOD_GET_RESP
L_.str.1:                               ## @.str.1
	.asciz	"dropping unsupported ingress mad from class:%d for slave:%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"slave id: %d is bigger than allowed:%d\n"

L_.str.3:                               ## @.str.3
	.asciz	"failed sending to slave %d via tunnel qp (%d)\n"

	.no_dead_strip	_mlx4_ib_demux_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_demux_mad
_mlx4_ib_demux_mad:                     ; @mlx4_ib_demux_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	x19, x4
	mov	x20, x3
	mov	x22, x2
	mov	x23, x1
	mov	x21, x0
	bl	_to_mdev
	mov	x24, x0
	ldr	x0, [x0]
	bl	_mlx4_master_func_num
	mov	x25, x0
	str	w0, [sp, #28]
	ldrb	w8, [x19]
	tbz	w8, #7, LBB0_4
; %bb.1:
	ldr	w25, [x19, #8]
	str	w25, [sp, #28]
	cmp	w25, #255
	b.ne	LBB0_3
; %bb.2:
	mov	w25, #255
	b	LBB0_4
LBB0_3:
	str	wzr, [x19, #8]
LBB0_4:
	ldr	w8, [x22]
Lloh0:
	adrp	x9, _IB_WC_GRH@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IB_WC_GRH@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_6
; %bb.5:
	ldr	w2, [x20]
	mov	x0, x21
	mov	x1, x23
	bl	_mlx4_ib_find_real_gid
	mov	x25, x0
	str	w0, [sp, #28]
	tbnz	w0, #31, LBB0_10
LBB0_6:
	ldr	w8, [x19, #4]
	cmp	w8, #130
	b.eq	LBB0_11
; %bb.7:
	cmp	w8, #129
	b.eq	LBB0_13
; %bb.8:
	cmp	w8, #128
	b.ne	LBB0_14
; %bb.9:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x25
	mov	x3, x19
	bl	_mlx4_ib_demux_sa_handler
	cbnz	w0, LBB0_22
	b	LBB0_15
LBB0_10:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_19
LBB0_11:
	add	x2, sp, #28
	mov	x0, x21
	mov	x1, x23
	mov	x3, x19
	bl	_mlx4_ib_demux_cm_handler
	cbnz	w0, LBB0_22
; %bb.12:
	ldr	w25, [sp, #28]
	b	LBB0_15
LBB0_13:
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _IB_MGMT_METHOD_GET_RESP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _IB_MGMT_METHOD_GET_RESP@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.eq	LBB0_15
	b	LBB0_22
LBB0_14:
	ldr	x0, [x24]
	bl	_mlx4_master_func_num
	cmp	w25, w0
	b.ne	LBB0_20
LBB0_15:
	ldr	x8, [x24]
	ldr	w8, [x8]
	cmp	w25, w8
	b.ge	LBB0_18
; %bb.16:
	ldr	x8, [x22, #8]
	ldr	w3, [x8]
	mov	x0, x24
	mov	x1, x25
	mov	x2, x23
	mov	x4, x22
	mov	x5, x20
	mov	x6, x19
	bl	_mlx4_ib_send_to_slave
	cbz	w0, LBB0_23
; %bb.17:
	mov	x2, x0
	ldr	w1, [sp, #28]
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_21
LBB0_18:
	stp	x25, x8, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_19:
	mov	x0, x21
	bl	_mlx4_ib_warn
Lloh12:
	adrp	x8, _ENOENT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_23
LBB0_20:
	ldr	w1, [x19, #4]
Lloh15:
	adrp	x0, l_.str.1@PAGE
Lloh16:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x2, x25
LBB0_21:
	bl	_pr_debug
LBB0_22:
	mov	w0, #0
LBB0_23:
	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 AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_WC_GRH,4,2                  ; @IB_WC_GRH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed matching grh\n"

	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_IB_MGMT_METHOD_GET_RESP,4,2    ; @IB_MGMT_METHOD_GET_RESP
l_.str.1:                               ; @.str.1
	.asciz	"dropping unsupported ingress mad from class:%d for slave:%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"slave id: %d is bigger than allowed:%d\n"

l_.str.3:                               ; @.str.3
	.asciz	"failed sending to slave %d via tunnel qp (%d)\n"

	.no_dead_strip	_mlx4_ib_demux_mad
.subsections_via_symbols
