	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ice_diag_send
_ice_diag_send:                         ## @ice_diag_send
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	(%rdi), %rsi
	callq	_ICE_TX_DESC
	movq	%rax, %r12
	movq	24(%rbx), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	(%rbx), %r13
	movl	16(%rbx), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rsi
	movq	%r14, %rdx
	callq	_dma_map_single
	movl	%eax, %r15d
	movl	16(%rbx), %edi
	movl	%eax, %esi
	callq	_dma_mapping_error
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_3
LBB0_2:
	movl	%r15d, %edi
	callq	_cpu_to_le64
	movq	%rax, 8(%r12)
	movq	_ICE_TX_DESC_CMD_EOP@GOTPCREL(%rip), %rax
	movq	_ICE_TX_DESC_CMD_RS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_ICE_TX_DESC_DTYPE_DATA@GOTPCREL(%rip), %rax
	movq	_ICE_TXD_QW1_CMD_S@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %edx
	orl	(%rax), %edx
	movq	_ICE_TXD_QW1_TX_BUF_SZ_S@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r14d, %edi
	shll	%cl, %edi
	orl	%edx, %edi
	callq	_cpu_to_le64
	movq	%rax, (%r12)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, (%rax,%r13,8)
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_wmb
	movq	(%rbx), %rdi
	incq	%rdi
	cmpq	8(%rbx), %rdi
	cmovaeq	%r12, %rdi
	movq	%rdi, (%rbx)
	movl	20(%rbx), %esi
	callq	_writel_relaxed
	movl	$1000, %edi                     ## imm = 0x3E8
	movl	$2000, %esi                     ## imm = 0x7D0
	callq	_usleep_range
	movl	16(%rbx), %edi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%r15d, %esi
	movq	%r14, %rdx
	callq	_dma_unmap_single
LBB0_3:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ICE_TX_DESC_CMD_EOP,4,2        ## @ICE_TX_DESC_CMD_EOP
	.comm	_ICE_TX_DESC_CMD_RS,4,2         ## @ICE_TX_DESC_CMD_RS
	.comm	_ICE_TX_DESC_DTYPE_DATA,4,2     ## @ICE_TX_DESC_DTYPE_DATA
	.comm	_ICE_TXD_QW1_CMD_S,4,2          ## @ICE_TXD_QW1_CMD_S
	.comm	_ICE_TXD_QW1_OFFSET_S,4,2       ## @ICE_TXD_QW1_OFFSET_S
	.comm	_ICE_TXD_QW1_TX_BUF_SZ_S,4,2    ## @ICE_TXD_QW1_TX_BUF_SZ_S
	.comm	_ICE_TXD_QW1_L2TAG1_S,4,2       ## @ICE_TXD_QW1_L2TAG1_S
	.no_dead_strip	_ice_diag_send
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ice_diag_send
_ice_diag_send:                         ; @ice_diag_send
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x1, [x0]
	bl	_ICE_TX_DESC
	mov	x22, x0
	ldr	x24, [x20, #24]
	ldr	x25, [x20]
	ldr	w0, [x20, #16]
Lloh0:
	adrp	x23, _DMA_TO_DEVICE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _DMA_TO_DEVICE@GOTPAGEOFF]
	ldr	w3, [x23]
	mov	x1, x21
	mov	x2, x19
	bl	_dma_map_single
	mov	x21, x0
	ldr	w0, [x20, #16]
	mov	x1, x21
	bl	_dma_mapping_error
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	x0, x21
	bl	_cpu_to_le64
	str	x0, [x22, #8]
Lloh5:
	adrp	x8, _ICE_TX_DESC_CMD_EOP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ICE_TX_DESC_CMD_EOP@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
Lloh8:
	adrp	x9, _ICE_TX_DESC_CMD_RS@GOTPAGE
Lloh9:
	ldr	x9, [x9, _ICE_TX_DESC_CMD_RS@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _ICE_TX_DESC_DTYPE_DATA@GOTPAGE
Lloh12:
	ldr	x10, [x10, _ICE_TX_DESC_DTYPE_DATA@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh13:
	ldr	w9, [x10]
Lloh14:
	adrp	x10, _ICE_TXD_QW1_CMD_S@GOTPAGE
Lloh15:
	ldr	x10, [x10, _ICE_TXD_QW1_CMD_S@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w8, w8, w9
Lloh17:
	adrp	x9, _ICE_TXD_QW1_TX_BUF_SZ_S@GOTPAGE
Lloh18:
	ldr	x9, [x9, _ICE_TXD_QW1_TX_BUF_SZ_S@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	lsl	w9, w19, w9
	orr	w0, w8, w9
	bl	_cpu_to_le64
	str	x0, [x22]
	str	x22, [x24, x25, lsl #3]
	bl	_wmb
	ldp	x8, x9, [x20]
	add	x10, x8, #1
	cmp	x10, x9
	csinc	x0, xzr, x8, hs
	str	x0, [x20]
	ldr	w1, [x20, #20]
	bl	_writel_relaxed
	mov	w0, #1000
	mov	w1, #2000
	bl	_usleep_range
	ldr	w0, [x20, #16]
	ldr	w3, [x23]
	mov	x1, x21
	mov	x2, x19
	bl	_dma_unmap_single
	mov	w0, #0
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ICE_TX_DESC_CMD_EOP,4,2        ; @ICE_TX_DESC_CMD_EOP
	.comm	_ICE_TX_DESC_CMD_RS,4,2         ; @ICE_TX_DESC_CMD_RS
	.comm	_ICE_TX_DESC_DTYPE_DATA,4,2     ; @ICE_TX_DESC_DTYPE_DATA
	.comm	_ICE_TXD_QW1_CMD_S,4,2          ; @ICE_TXD_QW1_CMD_S
	.comm	_ICE_TXD_QW1_OFFSET_S,4,2       ; @ICE_TXD_QW1_OFFSET_S
	.comm	_ICE_TXD_QW1_TX_BUF_SZ_S,4,2    ; @ICE_TXD_QW1_TX_BUF_SZ_S
	.comm	_ICE_TXD_QW1_L2TAG1_S,4,2       ; @ICE_TXD_QW1_L2TAG1_S
	.no_dead_strip	_ice_diag_send
.subsections_via_symbols
