	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function write_xmt_margin
_write_xmt_margin:                      ## @write_xmt_margin
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_CCE_PCIE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_read_csr
	movl	%eax, %ebx
	movq	(%r15), %rax
	movq	(%rax), %rax
	movq	_PCI_DEVICE_ID_INTEL1@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	_MARGIN_GEN1_GEN2_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %r12d
	sarl	%cl, %r12d
	movq	_MARGIN_GEN1_GEN2_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r12d
	movq	_MARGIN_G1_G2_OVERWRITE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %r13d
	sarl	%cl, %r13d
	movq	_MARGIN_G1_G2_OVERWRITE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r13d
	movq	_LANE_DELAY_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %r14d
	sarl	%cl, %r14d
	movq	_LANE_DELAY_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %r14d
	movq	_LANE_BUNDLE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	sarl	%cl, %ebx
	movq	_LANE_BUNDLE_MASK@GOTPCREL(%rip), %rax
	andl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_is_ax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	xorl	%ebx, %ebx
	movl	$15, %r14d
	movl	$1, %r13d
	movl	$5, %r12d
LBB0_3:
	movq	_MARGIN_GEN1_GEN2_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%r12d, %eax
	shll	%cl, %eax
	movq	_MARGIN_G1_G2_OVERWRITE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	%r13d, %edx
	shll	%cl, %edx
	movq	_MARGIN_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %r12d
	orl	%eax, %edx
	movq	_MARGIN_OVERWRITE_ENABLE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r13d
	orl	%r12d, %r13d
	movq	_LANE_DELAY_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r14d
	movq	_LANE_BUNDLE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %ebx
	orl	%edx, %r13d
	orl	%r14d, %ebx
	orl	%r13d, %ebx
	movq	_CCE_PCIE_CTRL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	movl	%ebx, %edx
	callq	_write_csr
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movq	%r14, %rdx
	movl	%ebx, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dd_dev_dbg                     ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CCE_PCIE_CTRL,4,2              ## @CCE_PCIE_CTRL
	.comm	_PCI_DEVICE_ID_INTEL1,8,3       ## @PCI_DEVICE_ID_INTEL1
	.comm	_MARGIN_GEN1_GEN2_SHIFT,4,2     ## @MARGIN_GEN1_GEN2_SHIFT
	.comm	_MARGIN_GEN1_GEN2_MASK,4,2      ## @MARGIN_GEN1_GEN2_MASK
	.comm	_MARGIN_G1_G2_OVERWRITE_SHIFT,4,2 ## @MARGIN_G1_G2_OVERWRITE_SHIFT
	.comm	_MARGIN_G1_G2_OVERWRITE_MASK,4,2 ## @MARGIN_G1_G2_OVERWRITE_MASK
	.comm	_LANE_DELAY_SHIFT,4,2           ## @LANE_DELAY_SHIFT
	.comm	_LANE_DELAY_MASK,4,2            ## @LANE_DELAY_MASK
	.comm	_LANE_BUNDLE_SHIFT,4,2          ## @LANE_BUNDLE_SHIFT
	.comm	_LANE_BUNDLE_MASK,4,2           ## @LANE_BUNDLE_MASK
	.comm	_MARGIN_SHIFT,4,2               ## @MARGIN_SHIFT
	.comm	_MARGIN_OVERWRITE_ENABLE_SHIFT,4,2 ## @MARGIN_OVERWRITE_ENABLE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: program XMT margin, CcePcieCtrl 0x%llx\n"

	.no_dead_strip	_write_xmt_margin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function write_xmt_margin
_write_xmt_margin:                      ; @write_xmt_margin
	.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	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _CCE_PCIE_CTRL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CCE_PCIE_CTRL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_read_csr
	mov	x21, x0
	ldr	x8, [x20]
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _PCI_DEVICE_ID_INTEL1@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PCI_DEVICE_ID_INTEL1@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.1:
	str	x19, [sp, #8]                   ; 8-byte Folded Spill
Lloh6:
	adrp	x8, _MARGIN_GEN1_GEN2_SHIFT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MARGIN_GEN1_GEN2_SHIFT@GOTPAGEOFF]
Lloh8:
	ldr	w26, [x8]
Lloh9:
	adrp	x8, _MARGIN_GEN1_GEN2_MASK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MARGIN_GEN1_GEN2_MASK@GOTPAGEOFF]
Lloh11:
	ldr	w19, [x8]
Lloh12:
	adrp	x8, _MARGIN_G1_G2_OVERWRITE_SHIFT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MARGIN_G1_G2_OVERWRITE_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w24, [x8]
Lloh15:
	adrp	x8, _MARGIN_G1_G2_OVERWRITE_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MARGIN_G1_G2_OVERWRITE_MASK@GOTPAGEOFF]
Lloh17:
	ldr	w22, [x8]
Lloh18:
	adrp	x8, _LANE_DELAY_SHIFT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _LANE_DELAY_SHIFT@GOTPAGEOFF]
Lloh20:
	ldr	w28, [x8]
Lloh21:
	adrp	x8, _LANE_DELAY_MASK@GOTPAGE
Lloh22:
	ldr	x8, [x8, _LANE_DELAY_MASK@GOTPAGEOFF]
Lloh23:
	ldr	w25, [x8]
Lloh24:
	adrp	x8, _LANE_BUNDLE_SHIFT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _LANE_BUNDLE_SHIFT@GOTPAGEOFF]
Lloh26:
	ldr	w27, [x8]
Lloh27:
	adrp	x8, _LANE_BUNDLE_MASK@GOTPAGE
Lloh28:
	ldr	x8, [x8, _LANE_BUNDLE_MASK@GOTPAGEOFF]
Lloh29:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_is_ax
	cbz	x0, LBB0_3
; %bb.2:
	mov	w8, #0
	mov	w9, #15
	mov	w10, #1
	mov	w11, #5
	b	LBB0_4
LBB0_3:
	asr	w8, w21, w26
	and	w11, w8, w19
	asr	w8, w21, w24
	and	w10, w8, w22
	asr	w8, w21, w28
	and	w9, w8, w25
	asr	w8, w21, w27
	and	w8, w8, w23
LBB0_4:
Lloh30:
	adrp	x12, _MARGIN_GEN1_GEN2_SHIFT@GOTPAGE
Lloh31:
	ldr	x12, [x12, _MARGIN_GEN1_GEN2_SHIFT@GOTPAGEOFF]
Lloh32:
	ldr	w12, [x12]
	lsl	w12, w11, w12
Lloh33:
	adrp	x13, _MARGIN_G1_G2_OVERWRITE_SHIFT@GOTPAGE
Lloh34:
	ldr	x13, [x13, _MARGIN_G1_G2_OVERWRITE_SHIFT@GOTPAGEOFF]
Lloh35:
	ldr	w13, [x13]
	lsl	w13, w10, w13
	orr	w12, w13, w12
Lloh36:
	adrp	x13, _MARGIN_SHIFT@GOTPAGE
Lloh37:
	ldr	x13, [x13, _MARGIN_SHIFT@GOTPAGEOFF]
Lloh38:
	ldr	w13, [x13]
	lsl	w11, w11, w13
	orr	w11, w12, w11
Lloh39:
	adrp	x12, _MARGIN_OVERWRITE_ENABLE_SHIFT@GOTPAGE
Lloh40:
	ldr	x12, [x12, _MARGIN_OVERWRITE_ENABLE_SHIFT@GOTPAGEOFF]
Lloh41:
	ldr	w12, [x12]
	lsl	w10, w10, w12
	orr	w10, w11, w10
Lloh42:
	adrp	x11, _LANE_DELAY_SHIFT@GOTPAGE
Lloh43:
	ldr	x11, [x11, _LANE_DELAY_SHIFT@GOTPAGEOFF]
Lloh44:
	ldr	w11, [x11]
	lsl	w9, w9, w11
	orr	w9, w10, w9
Lloh45:
	adrp	x10, _LANE_BUNDLE_SHIFT@GOTPAGE
Lloh46:
	ldr	x10, [x10, _LANE_BUNDLE_SHIFT@GOTPAGEOFF]
Lloh47:
	ldr	w10, [x10]
	lsl	w8, w8, w10
	orr	w21, w9, w8
Lloh48:
	adrp	x8, _CCE_PCIE_CTRL@GOTPAGE
Lloh49:
	ldr	x8, [x8, _CCE_PCIE_CTRL@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
	mov	x0, x20
	mov	x2, x21
	bl	_write_csr
	ldr	x19, [sp, #8]                   ; 8-byte Folded Reload
LBB0_5:
Lloh51:
	adrp	x1, l_.str@PAGE
Lloh52:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	mov	x3, x21
	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	_dd_dev_dbg
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh51, Lloh52
	.cfi_endproc
                                        ; -- End function
	.comm	_CCE_PCIE_CTRL,4,2              ; @CCE_PCIE_CTRL
	.comm	_PCI_DEVICE_ID_INTEL1,8,3       ; @PCI_DEVICE_ID_INTEL1
	.comm	_MARGIN_GEN1_GEN2_SHIFT,4,2     ; @MARGIN_GEN1_GEN2_SHIFT
	.comm	_MARGIN_GEN1_GEN2_MASK,4,2      ; @MARGIN_GEN1_GEN2_MASK
	.comm	_MARGIN_G1_G2_OVERWRITE_SHIFT,4,2 ; @MARGIN_G1_G2_OVERWRITE_SHIFT
	.comm	_MARGIN_G1_G2_OVERWRITE_MASK,4,2 ; @MARGIN_G1_G2_OVERWRITE_MASK
	.comm	_LANE_DELAY_SHIFT,4,2           ; @LANE_DELAY_SHIFT
	.comm	_LANE_DELAY_MASK,4,2            ; @LANE_DELAY_MASK
	.comm	_LANE_BUNDLE_SHIFT,4,2          ; @LANE_BUNDLE_SHIFT
	.comm	_LANE_BUNDLE_MASK,4,2           ; @LANE_BUNDLE_MASK
	.comm	_MARGIN_SHIFT,4,2               ; @MARGIN_SHIFT
	.comm	_MARGIN_OVERWRITE_ENABLE_SHIFT,4,2 ; @MARGIN_OVERWRITE_ENABLE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: program XMT margin, CcePcieCtrl 0x%llx\n"

	.no_dead_strip	_write_xmt_margin
.subsections_via_symbols
