	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_MAD_IFC                  ## -- Begin function mthca_MAD_IFC
	.p2align	4, 0x90
_mthca_MAD_IFC:                         ## @mthca_MAD_IFC
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -112(%rbp)                 ## 8-byte Spill
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	24(%rbp), %r13
	movq	16(%rbp), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_mthca_alloc_mailbox
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%r15, %rdi
	jmp	LBB0_2
LBB0_3:
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	movq	%rbx, -104(%rbp)                ## 8-byte Spill
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	(%r15), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_mthca_alloc_mailbox
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mthca_free_mailbox
	movq	%r13, %rdi
LBB0_2:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_5:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	setne	%al
	movq	%r12, %rdi
	movq	-88(%rbp), %r12                 ## 8-byte Reload
	testq	%r12, %r12
	sete	%cl
	orb	%al, %cl
	movzbl	%cl, %r13d
	leal	2(%r13), %r15d
	testq	%r12, %r12
	cmovel	%r15d, %r13d
	movq	%rdi, %r14
	movq	-104(%rbp), %rsi                ## 8-byte Reload
	movl	$256, %edx                      ## imm = 0x100
	callq	_memcpy
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	cmovnel	%r15d, %r13d
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	testq	%r12, %r12
	je	LBB0_6
## %bb.7:
	leaq	256(%r14), %rdi
	xorl	%esi, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_memset
	movq	24(%r12), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_MTHCA_PUT
	movl	(%r12), %esi
	movq	%r14, %rdi
	movl	$264, %edx                      ## imm = 0x108
	callq	_MTHCA_PUT
	movl	4(%r12), %esi
	shll	$4, %esi
	movq	%r14, %rdi
	movl	$268, %edx                      ## imm = 0x10C
	callq	_MTHCA_PUT
	movq	_IB_WC_GRH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	andl	12(%r12), %eax
	setne	%sil
	shll	$7, %esi
	orl	8(%r12), %esi
	movq	%r14, %rdi
	movl	$269, %edx                      ## imm = 0x10D
	callq	_MTHCA_PUT
	movl	20(%r12), %edi
	callq	_ib_lid_cpu16
	movq	%r14, %rdi
	movl	%eax, %esi
	movl	$270, %edx                      ## imm = 0x10E
	callq	_MTHCA_PUT
	movl	16(%r12), %esi
	movq	%r14, %rdi
	movl	$274, %edx                      ## imm = 0x112
	callq	_MTHCA_PUT
	movq	-112(%rbp), %rsi                ## 8-byte Reload
	testq	%rsi, %rsi
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_9
## %bb.8:
	addq	$320, %r14                      ## imm = 0x140
	movq	%r14, %rdi
	movl	$40, %edx
	callq	_memcpy
LBB0_9:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	orl	$4, %r14d
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movl	20(%rax), %edi
	callq	_ib_lid_cpu16
	shll	$16, %eax
	movl	%ebx, %ecx
	orl	%eax, %ecx
	movl	%r14d, %r15d
	jmp	LBB0_10
LBB0_6:
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movl	%ebx, %ecx
LBB0_10:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	movq	-96(%rbp), %r14                 ## 8-byte Reload
	movl	8(%r14), %esi
	movl	8(%r12), %edx
	movq	_CMD_MAD_IFC@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	_CMD_TIME_CLASS_C@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rsp)
	movq	%rbx, %rdi
	movl	%r15d, %r8d
	callq	_mthca_cmd_box
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	(%r12), %rsi
	movq	%r13, %rdi
	movl	$256, %edx                      ## imm = 0x100
	callq	_memcpy
LBB0_12:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_mthca_free_mailbox
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	_mthca_free_mailbox
	movl	%r15d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_IB_WC_GRH,4,2                  ## @IB_WC_GRH
	.comm	_CMD_MAD_IFC,4,2                ## @CMD_MAD_IFC
	.comm	_CMD_TIME_CLASS_C,4,2           ## @CMD_TIME_CLASS_C
	.comm	_MAD_IFC_GRH_OFFSET,4,2         ## @MAD_IFC_GRH_OFFSET
	.comm	_MAD_IFC_G_PATH_OFFSET,4,2      ## @MAD_IFC_G_PATH_OFFSET
	.comm	_MAD_IFC_MY_QPN_OFFSET,4,2      ## @MAD_IFC_MY_QPN_OFFSET
	.comm	_MAD_IFC_PKEY_OFFSET,4,2        ## @MAD_IFC_PKEY_OFFSET
	.comm	_MAD_IFC_RLID_OFFSET,4,2        ## @MAD_IFC_RLID_OFFSET
	.comm	_MAD_IFC_RQPN_OFFSET,4,2        ## @MAD_IFC_RQPN_OFFSET
	.comm	_MAD_IFC_SL_OFFSET,4,2          ## @MAD_IFC_SL_OFFSET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mthca_MAD_IFC                  ; -- Begin function mthca_MAD_IFC
	.p2align	2
_mthca_MAD_IFC:                         ; @mthca_MAD_IFC
	.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
	mov	x26, x7
	mov	x28, x6
	mov	x25, x5
	mov	x24, x4
	mov	x23, x3
	mov	x27, x2
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x22, [x22, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_mthca_alloc_mailbox
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	b	LBB0_4
LBB0_2:
	str	x26, [sp, #8]                   ; 8-byte Folded Spill
	ldr	x26, [x21]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_mthca_alloc_mailbox
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x19
	mov	x1, x21
	bl	_mthca_free_mailbox
	mov	x0, x22
LBB0_4:
	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
	b	_PTR_ERR
LBB0_5:
	mov	x0, x26
	mov	x1, x28
	mov	w2, #256
	bl	_memcpy
	cmp	w20, #0
	cset	w8, ne
	cmp	x24, #0
	cset	w9, eq
	orr	w8, w8, w9
	ccmp	w27, #0, #0, ne
	orr	w20, w8, #0x2
	csel	w27, w8, w20, eq
	cbz	x24, LBB0_9
; %bb.6:
	add	x0, x26, #256
	mov	w1, #0
	mov	w2, #256
	bl	_memset
	ldr	x8, [x24, #24]
	ldr	w1, [x8]
	mov	x0, x26
	mov	w2, #256
	bl	_MTHCA_PUT
	ldr	w1, [x24]
	mov	x0, x26
	mov	w2, #264
	bl	_MTHCA_PUT
	ldr	w8, [x24, #4]
	lsl	w1, w8, #4
	mov	x0, x26
	mov	w2, #268
	bl	_MTHCA_PUT
	ldp	w8, w9, [x24, #8]
Lloh2:
	adrp	x10, _IB_WC_GRH@GOTPAGE
Lloh3:
	ldr	x10, [x10, _IB_WC_GRH@GOTPAGEOFF]
Lloh4:
	ldr	w10, [x10]
	tst	w10, w9
	cset	w9, ne
	orr	w1, w8, w9, lsl #7
	mov	x0, x26
	mov	w2, #269
	bl	_MTHCA_PUT
	ldr	w0, [x24, #20]
	bl	_ib_lid_cpu16
	mov	x1, x0
	mov	x0, x26
	mov	w2, #270
	bl	_MTHCA_PUT
	ldr	w1, [x24, #16]
	mov	x0, x26
	mov	w2, #274
	bl	_MTHCA_PUT
	cbz	x25, LBB0_8
; %bb.7:
	add	x0, x26, #320
	mov	x1, x25
	mov	w2, #40
	bl	_memcpy
LBB0_8:
	orr	w20, w27, #0x4
	ldr	w0, [x24, #20]
	bl	_ib_lid_cpu16
	orr	w23, w23, w0, lsl #16
LBB0_9:
	ldr	w1, [x21, #8]
	ldr	w2, [x22, #8]
Lloh5:
	adrp	x8, _CMD_MAD_IFC@GOTPAGE
Lloh6:
	ldr	x8, [x8, _CMD_MAD_IFC@GOTPAGEOFF]
Lloh7:
	ldr	w5, [x8]
Lloh8:
	adrp	x8, _CMD_TIME_CLASS_C@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CMD_TIME_CLASS_C@GOTPAGEOFF]
Lloh10:
	ldr	w6, [x8]
	mov	x0, x19
	mov	x3, x23
	mov	x4, x20
	bl	_mthca_cmd_box
	mov	x20, x0
	ldr	x0, [sp, #8]                    ; 8-byte Folded Reload
	cbnz	w20, LBB0_11
; %bb.10:
	ldr	x1, [x22]
	mov	w2, #256
	bl	_memcpy
LBB0_11:
	mov	x0, x19
	mov	x1, x21
	bl	_mthca_free_mailbox
	mov	x0, x19
	mov	x1, x22
	bl	_mthca_free_mailbox
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_IB_WC_GRH,4,2                  ; @IB_WC_GRH
	.comm	_CMD_MAD_IFC,4,2                ; @CMD_MAD_IFC
	.comm	_CMD_TIME_CLASS_C,4,2           ; @CMD_TIME_CLASS_C
	.comm	_MAD_IFC_GRH_OFFSET,4,2         ; @MAD_IFC_GRH_OFFSET
	.comm	_MAD_IFC_G_PATH_OFFSET,4,2      ; @MAD_IFC_G_PATH_OFFSET
	.comm	_MAD_IFC_MY_QPN_OFFSET,4,2      ; @MAD_IFC_MY_QPN_OFFSET
	.comm	_MAD_IFC_PKEY_OFFSET,4,2        ; @MAD_IFC_PKEY_OFFSET
	.comm	_MAD_IFC_RLID_OFFSET,4,2        ; @MAD_IFC_RLID_OFFSET
	.comm	_MAD_IFC_RQPN_OFFSET,4,2        ; @MAD_IFC_RQPN_OFFSET
	.comm	_MAD_IFC_SL_OFFSET,4,2          ; @MAD_IFC_SL_OFFSET
.subsections_via_symbols
