	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mac100_dma_diagnostic_fr
_mac100_dma_diagnostic_fr:              ## @mac100_dma_diagnostic_fr
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_DMA_MISSED_FRAME_CTR@GOTPCREL(%rip), %rax
	addq	(%rax), %rdx
	movq	%rdx, %rdi
	callq	_readl
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movq	_DMA_MISSED_FRAME_OVE@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_3
## %bb.2:
	movl	(%r15), %eax
	movl	$2048, %ecx                     ## imm = 0x800
	movl	$2048, %edx                     ## imm = 0x800
	jmp	LBB0_4
LBB0_3:
	movq	_DMA_MISSED_FRAME_OVE_CNTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	sarl	$17, %eax
	movl	(%r15), %ecx
	movl	%eax, %edx
LBB0_4:
	addl	%eax, %ecx
	movl	%ecx, (%r15)
	addl	%edx, (%r14)
	movq	_DMA_MISSED_FRAME_OVE_M@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ebx, %eax
	movq	_DMA_MISSED_FRAME_M_CNTR@GOTPCREL(%rip), %rcx
	andl	(%rcx), %ebx
	testl	%eax, %eax
	movl	$65535, %eax                    ## imm = 0xFFFF
	cmovel	%ebx, %eax
	addl	%eax, 4(%r15)
	addl	%eax, 4(%r14)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_MISSED_FRAME_CTR,8,3       ## @DMA_MISSED_FRAME_CTR
	.comm	_DMA_MISSED_FRAME_OVE,4,2       ## @DMA_MISSED_FRAME_OVE
	.comm	_DMA_MISSED_FRAME_OVE_CNTR,4,2  ## @DMA_MISSED_FRAME_OVE_CNTR
	.comm	_DMA_MISSED_FRAME_OVE_M,4,2     ## @DMA_MISSED_FRAME_OVE_M
	.comm	_DMA_MISSED_FRAME_M_CNTR,4,2    ## @DMA_MISSED_FRAME_M_CNTR
	.no_dead_strip	_mac100_dma_diagnostic_fr
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mac100_dma_diagnostic_fr
_mac100_dma_diagnostic_fr:              ; @mac100_dma_diagnostic_fr
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _DMA_MISSED_FRAME_CTR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_MISSED_FRAME_CTR@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	add	x0, x8, x2
	bl	_readl
	mov	x21, x0
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _DMA_MISSED_FRAME_OVE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DMA_MISSED_FRAME_OVE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_3
; %bb.2:
	ldr	w9, [x20]
	mov	w10, #2048
	mov	w8, #2048
	b	LBB0_4
LBB0_3:
Lloh6:
	adrp	x8, _DMA_MISSED_FRAME_OVE_CNTR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_MISSED_FRAME_OVE_CNTR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w21
	asr	w9, w8, #17
	ldr	w10, [x20]
	mov	x8, x9
LBB0_4:
	add	w9, w9, w10
	str	w9, [x20]
	ldp	w9, w10, [x19]
	add	w8, w9, w8
	str	w8, [x19]
Lloh9:
	adrp	x8, _DMA_MISSED_FRAME_OVE_M@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DMA_MISSED_FRAME_OVE_M@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _DMA_MISSED_FRAME_M_CNTR@GOTPAGE
Lloh13:
	ldr	x9, [x9, _DMA_MISSED_FRAME_M_CNTR@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	and	w9, w9, w21
	tst	w8, w21
	mov	w8, #65535
	csel	w8, w9, w8, eq
	ldr	w9, [x20, #4]
	add	w9, w9, w8
	str	w9, [x20, #4]
	add	w8, w10, w8
	str	w8, [x19, #4]
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_MISSED_FRAME_CTR,8,3       ; @DMA_MISSED_FRAME_CTR
	.comm	_DMA_MISSED_FRAME_OVE,4,2       ; @DMA_MISSED_FRAME_OVE
	.comm	_DMA_MISSED_FRAME_OVE_CNTR,4,2  ; @DMA_MISSED_FRAME_OVE_CNTR
	.comm	_DMA_MISSED_FRAME_OVE_M,4,2     ; @DMA_MISSED_FRAME_OVE_M
	.comm	_DMA_MISSED_FRAME_M_CNTR,4,2    ; @DMA_MISSED_FRAME_M_CNTR
	.no_dead_strip	_mac100_dma_diagnostic_fr
.subsections_via_symbols
