	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_send_to_wire           ## -- Begin function mlx4_ib_send_to_wire
	.p2align	4, 0x90
_mlx4_ib_send_to_wire:                  ## @mlx4_ib_send_to_wire
	.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	$168, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	16(%rdi), %rdx
	movslq	%r12d, %rax
	movq	-8(%rdx,%rax,8), %r14
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movq	%rdi, %r15
	movq	(%r14), %rdx
	movq	_DEMUX_PV_STATE_ACTIVE@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rdx
	jne	LBB0_2
## %bb.4:
	movq	%r9, %r13
	decq	%rax
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rdx
	movq	16(%r14), %rbx
	cmpl	%ecx, (%rdx)
	jne	LBB0_6
## %bb.5:
	movq	8(%r15), %rcx
	movslq	%esi, %rdx
	movq	(%rcx,%rdx,8), %rcx
	movq	(%rcx,%rax,8), %r8
	movl	$0, -48(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_7
LBB0_2:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_20:
	movl	%r13d, %eax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	addq	$32, %rbx
	movq	8(%r15), %rcx
	movslq	%esi, %rdx
	movq	(%rcx,%rdx,8), %rcx
	shlq	$3, %r8
	addq	(%rcx,%rax,8), %r8
	movl	$1, -48(%rbp)                   ## 4-byte Folded Spill
LBB0_7:
	movq	(%r8), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	24(%rbx), %rax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	movq	8(%r14), %rax
	movl	4(%rax), %edi
	movq	_ib_ah@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rdma_zalloc_drv_obj
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:
	movq	%r13, -104(%rbp)                ## 8-byte Spill
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %r13
	movq	8(%r14), %rdx
	movl	4(%rdx), %ecx
	movl	%ecx, 8(%rax)
	movq	%rdx, (%rax)
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_rdma_ah_retrieve_grh
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	32(%rbp), %rcx
	movq	40(%rbp), %r8
	callq	_mlx4_ib_create_ah_slave
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.10:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	leaq	16(%rbx), %r13
	movq	%r13, %rdi
	callq	_spin_lock
	movl	(%rbx), %eax
	movl	%eax, %edx
	subl	4(%rbx), %edx
	movq	_MLX4_NUM_TUNNEL_BUFS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	decl	%esi
	cmpl	%esi, %edx
	jge	LBB0_12
## %bb.11:
	incl	%eax
	movl	%eax, (%rbx)
	movl	(%rcx), %ecx
	decl	%ecx
	andl	%eax, %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	callq	_spin_unlock
	jmp	LBB0_15
LBB0_8:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_12:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movq	%r13, %rbx
	movl	(%rax), %r13d
	movq	%rbx, %rdi
	callq	_spin_unlock
	testl	%r13d, %r13d
	je	LBB0_14
## %bb.13:
	negl	%r13d
	jmp	LBB0_18
LBB0_14:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
LBB0_15:
	movq	8(%rbx), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,8), %rcx
	leaq	(%rcx,%rcx,2), %r13
	movq	(%rax,%r13), %rdi
	movq	16(%rax,%r13), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	callq	_kfree
	movq	8(%rbx), %rax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, (%rax,%r13)
	movl	8(%rax,%r13), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_ib_dma_sync_single_for_cpu
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	48(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	8(%rbx), %rax
	movl	8(%rax,%r13), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	movq	%rbx, %r15
	movl	$4, %edx
	callq	_ib_dma_sync_single_for_device
	movq	8(%rbx), %rax
	movl	8(%rax,%r13), %eax
	movl	%eax, -80(%rbp)
	movl	$4, -88(%rbp)
	movq	8(%r14), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -128(%rbp)
	movl	%r12d, -192(%rbp)
	movq	-112(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -184(%rbp)
	movq	16(%rbp), %rax
	movq	%rax, -136(%rbp)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -144(%rbp)
	leaq	-176(%rbp), %rbx
	movq	$0, -152(%rbp)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_MLX4_TUN_SET_WRID_QPN
	orl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movl	%eax, -176(%rbp)
	leaq	-88(%rbp), %rax
	movq	%rax, -160(%rbp)
	movl	$1, -172(%rbp)
	movq	_IB_WR_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -164(%rbp)
	movq	_IB_SEND_SIGNALED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -168(%rbp)
	leaq	-200(%rbp), %rdx
	movq	-120(%rbp), %rdi                ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_ib_post_send
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movl	%eax, %r13d
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	callq	_spin_lock
	incl	4(%r15)
	movq	%rbx, %rdi
	callq	_spin_unlock
	movq	8(%r15), %rax
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rcx,2), %rcx
	movq	$0, (%rax,%rcx,8)
LBB0_18:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
LBB0_19:
	movq	%rbx, %rdi
	callq	_kfree
	jmp	LBB0_20
LBB0_16:
	xorl	%r13d, %r13d
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_DEMUX_PV_STATE_ACTIVE,8,3      ## @DEMUX_PV_STATE_ACTIVE
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_IB_QPT_SMI,4,2                 ## @IB_QPT_SMI
	.comm	_ib_ah,4,2                      ## @ib_ah
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_MLX4_NUM_TUNNEL_BUFS,4,2       ## @MLX4_NUM_TUNNEL_BUFS
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_IB_WR_SEND,4,2                 ## @IB_WR_SEND
	.comm	_IB_SEND_SIGNALED,4,2           ## @IB_SEND_SIGNALED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlx4_ib_send_to_wire           ; -- Begin function mlx4_ib_send_to_wire
	.p2align	2
_mlx4_ib_send_to_wire:                  ; @mlx4_ib_send_to_wire
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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	x9, [x0, #16]
	sub	w8, w2, #1
	ldr	x25, [x9, w8, sxtw #3]
	cbz	x25, LBB0_4
; %bb.1:
	ldr	x9, [x25]
Lloh0:
	adrp	x10, _DEMUX_PV_STATE_ACTIVE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _DEMUX_PV_STATE_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_4
; %bb.2:
	mov	x26, x7
	mov	x20, x6
	mov	x19, x5
	mov	x21, x2
	mov	x23, x0
	sxtw	x8, w8
Lloh3:
	adrp	x9, _IB_QPT_SMI@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IB_QPT_SMI@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	ldr	x24, [x25, #16]
	cmp	w9, w3
	b.ne	LBB0_7
; %bb.3:
	mov	w27, #0
	ldr	x9, [x23, #8]
	ldr	x9, [x9, w1, sxtw #3]
	ldr	x8, [x9, x8, lsl #3]
	b	LBB0_8
LBB0_4:
Lloh6:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w27, w8
LBB0_6:
	mov	x0, x27
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
LBB0_7:
	add	x24, x24, #32
	ldr	x9, [x23, #8]
	ldr	x9, [x9, w1, sxtw #3]
	ldr	x8, [x9, x8, lsl #3]
	add	x8, x8, x4, lsl #3
	mov	w27, #1
LBB0_8:
	ldr	x8, [x8]
	str	x8, [sp, #40]                   ; 8-byte Folded Spill
	ldr	x28, [x24, #24]
	ldr	x8, [x25, #8]
	ldr	w0, [x8, #4]
Lloh8:
	adrp	x8, _ib_ah@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ib_ah@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	bl	_rdma_zalloc_drv_obj
	cbz	x0, LBB0_12
; %bb.9:
	mov	x22, x0
	str	x28, [sp, #24]                  ; 8-byte Folded Spill
	str	w27, [sp, #36]                  ; 4-byte Folded Spill
	ldp	x28, x27, [x29, #16]
	ldr	x8, [x25, #8]
	ldr	w9, [x8, #4]
	str	w9, [x0, #8]
	str	x8, [x0]
	mov	x0, x26
	bl	_rdma_ah_retrieve_grh
	ldr	w2, [x0]
	mov	x0, x22
	mov	x1, x26
	mov	x3, x28
	mov	x4, x27
	bl	_mlx4_ib_create_ah_slave
	mov	x27, x0
	cbnz	w0, LBB0_18
; %bb.10:
	add	x27, x24, #16
	mov	x0, x27
	bl	_spin_lock
	ldp	w8, w10, [x24]
Lloh11:
	adrp	x9, _MLX4_NUM_TUNNEL_BUFS@GOTPAGE
Lloh12:
	ldr	x9, [x9, _MLX4_NUM_TUNNEL_BUFS@GOTPAGEOFF]
	ldr	w11, [x9]
	sub	w11, w11, #1
	sub	w10, w8, w10
	cmp	w10, w11
	b.ge	LBB0_13
; %bb.11:
	add	w8, w8, #1
	str	w8, [x24]
	ldr	w9, [x9]
	sub	w9, w9, #1
	and	w26, w9, w8
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	mov	x0, x27
	bl	_spin_unlock
	b	LBB0_16
LBB0_12:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_5
LBB0_13:
Lloh15:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh17:
	ldr	w26, [x8]
	mov	x0, x27
	bl	_spin_unlock
	cbz	w26, LBB0_15
; %bb.14:
	neg	w27, w26
	b	LBB0_18
LBB0_15:
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
LBB0_16:
	ldr	x8, [x29, #32]
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	ldr	x8, [x24, #8]
	mov	w9, w26
	str	x9, [sp]                        ; 8-byte Folded Spill
	add	x9, x9, w26, uxtw #1
	lsl	x27, x9, #3
	add	x8, x8, x27
	ldr	x28, [x8, #16]
	ldr	x0, [x8]
	bl	_kfree
	ldr	x8, [x24, #8]
	add	x8, x8, x27
	str	x22, [x8]
	ldr	w1, [x8, #8]
Lloh18:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh19:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh20:
	ldr	w3, [x8]
	mov	x0, x23
	mov	w2, #4
	bl	_ib_dma_sync_single_for_cpu
	mov	x0, x28
	ldr	x1, [sp, #16]                   ; 8-byte Folded Reload
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x24, #8]
	add	x8, x8, x27
	ldr	w1, [x8, #8]
Lloh21:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
	mov	x0, x23
	mov	w2, #4
	bl	_ib_dma_sync_single_for_device
	ldr	x8, [x24, #8]
	add	x8, x8, x27
	ldr	w8, [x8, #8]
	stur	w8, [x29, #-88]
	mov	w8, #4
	stur	w8, [x29, #-96]
	ldr	x8, [x25, #8]
	ldr	w8, [x8]
	stur	w8, [x29, #-92]
	stp	x20, x22, [sp, #112]
	str	w21, [sp, #56]
	stp	xzr, x19, [sp, #96]
	add	x8, sp, #56
	add	x19, x8, #16
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	str	x8, [sp, #64]
	ldr	w0, [sp, #36]                   ; 4-byte Folded Reload
	bl	_MLX4_TUN_SET_WRID_QPN
	orr	w8, w0, w26
	sub	x9, x29, #96
	str	x9, [sp, #88]
	mov	w9, #1
	stp	w8, w9, [sp, #72]
Lloh24:
	adrp	x8, _IB_WR_SEND@GOTPAGE
Lloh25:
	ldr	x8, [x8, _IB_WR_SEND@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
Lloh27:
	adrp	x9, _IB_SEND_SIGNALED@GOTPAGE
Lloh28:
	ldr	x9, [x9, _IB_SEND_SIGNALED@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #80]
	add	x2, sp, #48
	ldr	x0, [sp, #24]                   ; 8-byte Folded Reload
	mov	x1, x19
	bl	_ib_post_send
	mov	x27, x0
	cbz	w0, LBB0_6
; %bb.17:
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
	mov	x0, x19
	bl	_spin_lock
	ldr	w8, [x24, #4]
	add	w8, w8, #1
	str	w8, [x24, #4]
	mov	x0, x19
	bl	_spin_unlock
	ldr	x8, [x24, #8]
	mov	w9, #24
	ldr	x10, [sp]                       ; 8-byte Folded Reload
	mul	x9, x10, x9
	str	xzr, [x8, x9]
LBB0_18:
	mov	x0, x22
	bl	_kfree
	b	LBB0_6
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DEMUX_PV_STATE_ACTIVE,8,3      ; @DEMUX_PV_STATE_ACTIVE
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_IB_QPT_SMI,4,2                 ; @IB_QPT_SMI
	.comm	_ib_ah,4,2                      ; @ib_ah
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_MLX4_NUM_TUNNEL_BUFS,4,2       ; @MLX4_NUM_TUNNEL_BUFS
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_IB_WR_SEND,4,2                 ; @IB_WR_SEND
	.comm	_IB_SEND_SIGNALED,4,2           ; @IB_SEND_SIGNALED
.subsections_via_symbols
