	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_idma_monitor                ## -- Begin function t4_idma_monitor
	.p2align	4, 0x90
_t4_idma_monitor:                       ## @t4_idma_monitor
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, -64(%rbp)                 ## 4-byte Spill
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_SGE_DEBUG_INDEX_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$13, %edx
	callq	_t4_write_reg
	movq	_SGE_DEBUG_DATA_HIGH_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_t4_read_reg
	movl	%eax, %ebx
	movl	%eax, -56(%rbp)
	movq	_SGE_DEBUG_DATA_LOW_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	callq	_t4_read_reg
	movl	%eax, -52(%rbp)
	movb	$1, %dil
	movq	_SGE_IDMA_WARN_THRESH@GOTPCREL(%rip), %r15
	xorl	%r13d, %r13d
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rcx
	movl	(%rcx,%r13,4), %eax
	cmpl	(%r12), %ebx
	jge	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r15), %edx
	imull	%r14d, %edx
	cmpl	%edx, %eax
	jl	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%edi, %ebx
	movl	(%rcx), %edi
	movq	16(%r12), %rcx
	movl	(%rcx,%r13,4), %ecx
	cltd
	idivl	%r14d
	leaq	L_.str(%rip), %rsi
	movl	%r13d, %edx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_dev_warn
	movl	%ebx, %edi
	movq	8(%r12), %rcx
LBB0_4:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	$0, (%rcx,%r13,4)
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%eax, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	addl	%esi, %eax
	movl	%eax, (%rcx,%r13,4)
	movq	24(%r12), %rax
	movl	(%rax,%r13,4), %edx
	subl	%esi, %edx
	movl	%edx, (%rax,%r13,4)
	movl	(%r15), %esi
	imull	%r14d, %esi
	cmpl	%esi, (%rcx,%r13,4)
	jl	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%edx, %edx
	jg	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_SGE_IDMA_WARN_REPEAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	imull	%r14d, %ecx
	movl	%ecx, (%rax,%r13,4)
	movq	_SGE_DEBUG_INDEX_A@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	%edi, -68(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_t4_write_reg
	movq	_SGE_DEBUG_DATA_LOW_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_t4_read_reg
	movl	%eax, %r14d
	leal	(%r13,%r13,8), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	andl	$63, %eax
	movq	32(%r12), %rcx
	movl	%eax, (%rcx,%r13,4)
	movl	(%rbx), %esi
	movq	%r15, %rdi
	movl	$11, %edx
	callq	_t4_write_reg
	movq	_SGE_DEBUG_DATA_LOW_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_t4_read_reg
	movl	%eax, %ebx
	movl	%r13d, %ecx
	shll	$4, %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %eax
	movzwl	%ax, %ecx
	movq	16(%r12), %rax
	movl	%ecx, (%rax,%r13,4)
	movl	(%r15), %edi
	movq	8(%r12), %rax
	movq	32(%r12), %rdx
	movl	(%rdx,%r13,4), %r8d
	movl	(%rax,%r13,4), %eax
	cltd
	idivl	-60(%rbp)                       ## 4-byte Folded Reload
	leaq	L_.str.1(%rip), %rsi
	movl	%r13d, %edx
	movl	%eax, %r9d
	xorl	%eax, %eax
	pushq	%rbx
	pushq	%r14
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	callq	_dev_warn
	addq	$16, %rsp
	movq	32(%r12), %rax
	movl	(%rax,%r13,4), %esi
	movq	%r15, %rdi
	movq	_SGE_IDMA_WARN_THRESH@GOTPCREL(%rip), %r15
	callq	_t4_sge_decode_idma_state
	movl	-68(%rbp), %edi                 ## 4-byte Reload
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	testb	$1, %dil
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	-52(%rbp,%r13,4), %ebx
	movl	$1, %r13d
	xorl	%edi, %edi
	jmp	LBB0_1
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movl	%r14d, (%rcx,%r13,4)
	movq	24(%r12), %rax
	movl	$0, (%rax,%r13,4)
	movl	(%r15), %edx
	imull	%r14d, %edx
	cmpl	%edx, (%rcx,%r13,4)
	jge	LBB0_9
	jmp	LBB0_10
LBB0_12:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_14
## %bb.13:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SGE_DEBUG_INDEX_A,4,2          ## @SGE_DEBUG_INDEX_A
	.comm	_SGE_DEBUG_DATA_HIGH_A,4,2      ## @SGE_DEBUG_DATA_HIGH_A
	.comm	_SGE_DEBUG_DATA_LOW_A,4,2       ## @SGE_DEBUG_DATA_LOW_A
	.comm	_SGE_IDMA_WARN_THRESH,4,2       ## @SGE_IDMA_WARN_THRESH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SGE idma%d, queue %u, resumed after %d seconds\n"

	.comm	_SGE_IDMA_WARN_REPEAT,4,2       ## @SGE_IDMA_WARN_REPEAT
L_.str.1:                               ## @.str.1
	.asciz	"SGE idma%u, queue %u, potentially stuck in state %u for %d seconds (debug0=%#x, debug11=%#x)\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_t4_idma_monitor                ; -- Begin function t4_idma_monitor
	.p2align	2
_t4_idma_monitor:                       ; @t4_idma_monitor
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	str	w3, [sp, #28]                   ; 4-byte Folded Spill
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
Lloh3:
	adrp	x8, _SGE_DEBUG_INDEX_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SGE_DEBUG_INDEX_A@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #13
	bl	_t4_write_reg
Lloh6:
	adrp	x8, _SGE_DEBUG_DATA_HIGH_A@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SGE_DEBUG_DATA_HIGH_A@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_t4_read_reg
	mov	x26, x0
	str	w0, [sp, #32]
Lloh9:
	adrp	x8, _SGE_DEBUG_DATA_LOW_A@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SGE_DEBUG_DATA_LOW_A@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_t4_read_reg
	mov	x24, #0
	str	w0, [sp, #36]
Lloh12:
	adrp	x23, _SGE_IDMA_WARN_THRESH@GOTPAGE
Lloh13:
	ldr	x23, [x23, _SGE_IDMA_WARN_THRESH@GOTPAGEOFF]
	mov	w27, #1
	add	x19, sp, #32
Lloh14:
	adrp	x25, _SGE_DEBUG_INDEX_A@GOTPAGE
Lloh15:
	ldr	x25, [x25, _SGE_DEBUG_INDEX_A@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w10, [x21]
	ldr	x8, [x21, #8]
	ldr	w9, [x8, x24, lsl #2]
	cmp	w26, w10
	b.ge	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w10, [x23]
	mul	w10, w10, w20
	cmp	w9, w10
	b.lt	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x22]
	ldr	x8, [x21, #16]
	ldr	w3, [x8, x24, lsl #2]
	sdiv	w4, w9, w20
Lloh16:
	adrp	x1, l_.str@PAGE
Lloh17:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x24
	bl	_dev_warn
	ldr	x8, [x21, #8]
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	str	wzr, [x8, x24, lsl #2]
	b	LBB0_8
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	lsl	x28, x24, #2
	cbz	w9, LBB0_10
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w11, [sp, #28]                  ; 4-byte Folded Reload
	add	w9, w9, w11
	str	w9, [x8, x28]
	ldr	x9, [x21, #24]
	ldr	w10, [x9, x28]
	sub	w10, w10, w11
	str	w10, [x9, x28]
	ldr	w8, [x8, x28]
	ldr	w11, [x23]
	mul	w11, w11, w20
	cmp	w8, w11
	ccmp	w10, #0, #0, ge
	b.gt	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_1 Depth=1
Lloh18:
	adrp	x8, _SGE_IDMA_WARN_REPEAT@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SGE_IDMA_WARN_REPEAT@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mul	w8, w8, w20
	str	w8, [x9, x28]
	ldr	w1, [x25]
	mov	x0, x22
	mov	w2, #0
	bl	_t4_write_reg
Lloh21:
	adrp	x19, _SGE_DEBUG_DATA_LOW_A@GOTPAGE
Lloh22:
	ldr	x19, [x19, _SGE_DEBUG_DATA_LOW_A@GOTPAGEOFF]
	ldr	w1, [x19]
	mov	x0, x22
	bl	_t4_read_reg
	mov	x26, x0
	add	w8, w24, w24, lsl #3
	asr	w8, w0, w8
	and	w8, w8, #0x3f
	ldr	x9, [x21, #32]
	str	w8, [x9, x28]
	ldr	w1, [x25]
	mov	x0, x22
	mov	w2, #11
	bl	_t4_write_reg
	ldr	w1, [x19]
	add	x19, sp, #32
	mov	x0, x22
	bl	_t4_read_reg
                                        ; kill: def $w0 killed $w0 def $x0
	lsl	w8, w24, #4
	asr	w8, w0, w8
	and	w3, w8, #0xffff
	ldr	x8, [x21, #16]
	str	w3, [x8, x28]
	ldr	w8, [x22]
	ldr	x9, [x21, #32]
	ldr	w4, [x9, x28]
	ldr	x9, [x21, #8]
	ldr	w9, [x9, x28]
	sdiv	w9, w9, w20
	stp	x26, x0, [sp, #8]
	str	x9, [sp]
	mov	x0, x8
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x24
	bl	_dev_warn
	ldr	x8, [x21, #32]
	ldr	w1, [x8, x28]
	mov	x0, x22
	bl	_t4_sge_decode_idma_state
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	tbz	w27, #0, LBB0_11
; %bb.9:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w27, #0
	add	x8, x19, x24, lsl #2
	ldr	w26, [x8, #4]
	mov	w24, #1
	b	LBB0_1
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	str	w20, [x8, x28]
	ldr	x9, [x21, #24]
	str	wzr, [x9, x28]
	ldr	w10, [x23]
	ldr	w8, [x8, x28]
	mul	w10, w10, w20
	cmp	w8, w10
	b.ge	LBB0_7
	b	LBB0_8
LBB0_11:
	ldr	x8, [sp, #40]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_13
; %bb.12:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_13:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SGE_DEBUG_INDEX_A,4,2          ; @SGE_DEBUG_INDEX_A
	.comm	_SGE_DEBUG_DATA_HIGH_A,4,2      ; @SGE_DEBUG_DATA_HIGH_A
	.comm	_SGE_DEBUG_DATA_LOW_A,4,2       ; @SGE_DEBUG_DATA_LOW_A
	.comm	_SGE_IDMA_WARN_THRESH,4,2       ; @SGE_IDMA_WARN_THRESH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SGE idma%d, queue %u, resumed after %d seconds\n"

	.comm	_SGE_IDMA_WARN_REPEAT,4,2       ; @SGE_IDMA_WARN_REPEAT
l_.str.1:                               ; @.str.1
	.asciz	"SGE idma%u, queue %u, potentially stuck in state %u for %d seconds (debug0=%#x, debug11=%#x)\n"

.subsections_via_symbols
