	.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
	movq	%r8, %r15
	movq	24(%rdi), %rax
	movslq	%edx, %r13
	movq	-8(%rax,%r13,8), %r8
	testq	%r8, %r8
	je	LBB0_2
## %bb.1:
	movl	%ecx, %r12d
	movq	(%r8), %rax
	movq	_DEMUX_PV_STATE_ACTIVE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.4:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%r12d, %eax
	movq	%r9, -120(%rbp)                 ## 8-byte Spill
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	jne	LBB0_7
## %bb.5:
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	movl	16(%rbx), %edi
	callq	_mlx4_master_func_num
	cmpl	%r14d, %eax
	jne	LBB0_24
## %bb.6:
	movq	_IB_QPT_SMI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %r8                  ## 8-byte Reload
LBB0_7:
	movq	24(%rbp), %rsi
	decq	%r13
	movq	24(%r8), %rdi
	cmpl	%r12d, %eax
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	jne	LBB0_9
## %bb.8:
	movq	8(%rbx), %rax
	movslq	%r14d, %rcx
	movq	(%rax,%rcx,8), %rax
	movq	(%rax,%r13,8), %r15
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_10
LBB0_2:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
LBB0_3:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_23:
	movl	%ebx, %eax
	addq	$168, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	addq	$32, %rdi
	movq	8(%rbx), %rax
	movslq	%r14d, %rcx
	movq	(%rax,%rcx,8), %rax
	shlq	$3, %r15
	addq	(%rax,%r13,8), %r15
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_10:
	movq	(%r15), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	24(%rdi), %r12
	movl	(%rsi), %ebx
	movl	$0, (%rsi)
	movq	%rdi, %r13
	movl	16(%r8), %edi
	movq	%r8, %r15
	callq	_ib_create_ah
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_12:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movq	24(%rbp), %rax
	movl	%ebx, (%rax)
	movq	%r14, %rdi
	callq	_to_mah
	movl	%ebx, (%rax)
	movl	$2147483647, %edi               ## imm = 0x7FFFFFFF
	callq	_cpu_to_be32
	movl	%eax, %ebx
	movq	%r14, %rdi
	callq	_to_mah
	andl	%ebx, 4(%rax)
	leaq	16(%r13), %r12
	movq	%r12, %rdi
	callq	_spin_lock
	movl	(%r13), %eax
	movl	%eax, %edx
	subl	4(%r13), %edx
	movq	_MLX4_NUM_TUNNEL_BUFS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	decl	%esi
	cmpl	%esi, %edx
	jge	LBB0_14
## %bb.13:
	incl	%eax
	movl	%eax, (%r13)
	movl	(%rcx), %ebx
	decl	%ebx
	andl	%eax, %ebx
	movq	%r12, %rdi
	callq	_spin_unlock
	jmp	LBB0_17
LBB0_24:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_14:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%r12, %rdi
	callq	_spin_unlock
	testl	%ebx, %ebx
	je	LBB0_16
## %bb.15:
	negl	%ebx
	testl	%ebx, %ebx
	jne	LBB0_22
LBB0_21:
	xorl	%ebx, %ebx
	jmp	LBB0_23
LBB0_16:
	xorl	%ebx, %ebx
LBB0_17:
	movq	8(%r13), %rax
	movl	%ebx, %r12d
	leaq	(%r12,%r12,2), %rcx
	movq	8(%rax,%rcx,8), %rdx
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	16(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_19
## %bb.18:
	callq	_ib_destroy_ah
	movq	8(%r13), %rax
LBB0_19:
	movq	%r12, %rcx
	shlq	$3, %rcx
	leaq	(%rcx,%rcx,2), %rbx
	movq	%r14, 16(%rax,%rbx)
	movl	(%rax,%rbx), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %r15
	movl	(%r15), %ecx
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r13, %r14
	movq	-112(%rbp), %r13                ## 8-byte Reload
	movq	%r13, %rdi
	movl	$4, %edx
	callq	_ib_dma_sync_single_for_cpu
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	32(%rbp), %rsi
	movl	$4, %edx
	callq	_memcpy
	movq	8(%r14), %rax
	movl	(%rax,%rbx), %esi
	movl	(%r15), %ecx
	movq	%r13, %rdi
	movl	$4, %edx
	callq	_ib_dma_sync_single_for_device
	movq	8(%r14), %rax
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movl	(%rax,%rbx), %eax
	movl	%eax, -64(%rbp)
	movl	$4, -72(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movq	%r14, -128(%rbp)
	movl	-60(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -160(%rbp)
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -152(%rbp)
	movq	16(%rbp), %rax
	movq	%rax, -136(%rbp)
	movq	-120(%rbp), %rax                ## 8-byte Reload
	movq	%rax, -144(%rbp)
	movq	$0, -168(%rbp)
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_MLX4_TUN_SET_WRID_QPN
	orl	%r12d, %eax
	movl	%eax, -192(%rbp)
	leaq	-72(%rbp), %rax
	movq	%rax, -176(%rbp)
	movl	$1, -188(%rbp)
	movq	_IB_WR_SEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -180(%rbp)
	movq	_IB_SEND_SIGNALED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -184(%rbp)
	leaq	-192(%rbp), %rsi
	leaq	-200(%rbp), %rdx
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_ib_post_send
	movl	%eax, %ebx
	testl	%ebx, %ebx
	je	LBB0_21
LBB0_22:
	movq	%r14, %rdi
	callq	_ib_destroy_ah
	jmp	LBB0_23
	.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	_EINVAL,4,2                     ## @EINVAL
	.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	x8, [x0, #24]
	sub	w27, w2, #1
	ldr	x28, [x8, w27, sxtw #3]
	cbz	x28, LBB0_7
; %bb.1:
	ldr	x8, [x28]
Lloh0:
	adrp	x9, _DEMUX_PV_STATE_ACTIVE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DEMUX_PV_STATE_ACTIVE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.2:
	mov	x26, x7
	mov	x20, x6
	mov	x23, x4
	mov	x24, x3
	mov	x21, x2
	mov	x25, x1
	mov	x22, x0
	str	x5, [sp, #40]                   ; 8-byte Folded Spill
Lloh3:
	adrp	x19, _IB_QPT_SMI@GOTPAGE
Lloh4:
	ldr	x19, [x19, _IB_QPT_SMI@GOTPAGEOFF]
	ldr	w8, [x19]
	cmp	w8, w3
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x22, #16]
	bl	_mlx4_master_func_num
	cmp	w0, w25
	b.ne	LBB0_15
; %bb.4:
	ldr	w8, [x19]
LBB0_5:
	sxtw	x9, w27
	ldr	x27, [x28, #24]
	cmp	w8, w24
	str	x20, [sp, #32]                  ; 8-byte Folded Spill
	b.ne	LBB0_10
; %bb.6:
	mov	w19, #0
	ldr	x8, [x22, #8]
	ldr	x8, [x8, w25, sxtw #3]
	ldr	x8, [x8, x9, lsl #3]
	b	LBB0_11
LBB0_7:
Lloh5:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w19, w8
LBB0_9:
	mov	x0, x19
	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_10:
	add	x27, x27, #32
	ldr	x8, [x22, #8]
	ldr	x8, [x8, w25, sxtw #3]
	ldr	x8, [x8, x9, lsl #3]
	add	x8, x8, x23, lsl #3
	mov	w19, #1
LBB0_11:
	ldr	x25, [x8]
	ldr	x20, [x27, #24]
	ldr	w24, [x26]
	str	wzr, [x26]
	ldr	w0, [x28, #16]
	mov	x1, x26
	bl	_ib_create_ah
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.12:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_8
LBB0_13:
	stp	x25, x20, [sp, #8]              ; 16-byte Folded Spill
	str	w19, [sp, #28]                  ; 4-byte Folded Spill
	str	w24, [x26]
	mov	x0, x23
	bl	_to_mah
	str	w24, [x0]
	mov	w0, #2147483647
	bl	_cpu_to_be32
	mov	x26, x0
	mov	x0, x23
	bl	_to_mah
	ldr	w8, [x0, #4]
	and	w8, w8, w26
	str	w8, [x0, #4]
	add	x26, x27, #16
	mov	x0, x26
	bl	_spin_lock
	ldp	w8, w10, [x27]
Lloh9:
	adrp	x9, _MLX4_NUM_TUNNEL_BUFS@GOTPAGE
Lloh10:
	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_16
; %bb.14:
	add	w8, w8, #1
	str	w8, [x27]
	ldr	w9, [x9]
	sub	w9, w9, #1
	and	w19, w9, w8
	mov	x0, x26
	bl	_spin_unlock
	b	LBB0_18
LBB0_15:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_16:
Lloh13:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh15:
	ldr	w19, [x8]
	mov	x0, x26
	bl	_spin_unlock
	cbz	w19, LBB0_18
; %bb.17:
	neg	w19, w19
	b	LBB0_21
LBB0_18:
	ldr	x20, [x29, #16]
	ldr	x8, [x27, #8]
	mov	w25, w19
	mov	w9, #24
	umaddl	x9, w19, w9, x8
	ldp	x24, x0, [x9, #8]
	cbz	x0, LBB0_20
; %bb.19:
	bl	_ib_destroy_ah
	ldr	x8, [x27, #8]
LBB0_20:
	add	x9, x25, x25, lsl #1
	lsl	x19, x9, #3
	add	x8, x8, x19
	str	x23, [x8, #16]
	ldr	w1, [x8]
Lloh16:
	adrp	x26, _DMA_TO_DEVICE@GOTPAGE
Lloh17:
	ldr	x26, [x26, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x26]
	mov	x0, x22
	mov	w2, #4
	bl	_ib_dma_sync_single_for_cpu
	mov	x0, x24
	mov	x1, x20
	mov	w2, #4
	bl	_memcpy
	ldr	x8, [x27, #8]
	ldr	w1, [x8, x19]
	ldr	w3, [x26]
	mov	x0, x22
	mov	w2, #4
	bl	_ib_dma_sync_single_for_device
	ldr	x8, [x27, #8]
	ldr	w8, [x8, x19]
	stur	w8, [x29, #-88]
	mov	w8, #4
	stur	w8, [x29, #-96]
	ldr	x8, [x28, #8]
	ldr	w8, [x8]
	stur	w8, [x29, #-92]
	str	w21, [sp, #88]
	ldr	x8, [sp, #32]                   ; 8-byte Folded Reload
	stp	x8, x23, [sp, #112]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	ldr	x8, [sp, #40]                   ; 8-byte Folded Reload
	stp	x9, x8, [sp, #96]
	str	xzr, [sp, #80]
	ldr	w0, [sp, #28]                   ; 4-byte Folded Reload
	bl	_MLX4_TUN_SET_WRID_QPN
	orr	w8, w0, w25
	sub	x9, x29, #96
	str	x9, [sp, #72]
	mov	w9, #1
	stp	w8, w9, [sp, #56]
Lloh18:
	adrp	x8, _IB_WR_SEND@GOTPAGE
Lloh19:
	ldr	x8, [x8, _IB_WR_SEND@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _IB_SEND_SIGNALED@GOTPAGE
Lloh22:
	ldr	x9, [x9, _IB_SEND_SIGNALED@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #64]
	add	x1, sp, #56
	add	x2, sp, #48
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	bl	_ib_post_send
	mov	x19, x0
LBB0_21:
	cbz	w19, LBB0_9
; %bb.22:
	mov	x0, x23
	bl	_ib_destroy_ah
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh16, Lloh17
	.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	_EINVAL,4,2                     ; @EINVAL
	.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
