	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_fence_note_sync         ## -- Begin function radeon_fence_note_sync
	.p2align	4, 0x90
_radeon_fence_note_sync:                ## @radeon_fence_note_sync
	.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
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.1:
	movslq	(%rdi), %r15
	cmpl	%esi, %r15d
	je	LBB0_7
## %bb.2:
	movq	_RADEON_NUM_RINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	je	LBB0_7
## %bb.3:
	movslq	%esi, %r12
	movq	8(%rdi), %rcx
	movq	(%rcx), %rbx
	movl	%esi, %r13d
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movl	%eax, %ecx
	cmpq	%rcx, %r14
	jae	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r14, %r13
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx,%r12,8), %rax
	movl	(%rax,%r14,4), %edi
	movq	(%rbx,%r15,8), %rax
	movl	(%rax,%r14,4), %esi
	callq	_max
	movq	(%rbx,%r12,8), %rcx
	movl	%eax, (%rcx,%r14,4)
	movq	_RADEON_NUM_RINGS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_6
LBB0_7:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_NUM_RINGS,4,2           ## @RADEON_NUM_RINGS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_fence_note_sync         ; -- Begin function radeon_fence_note_sync
	.p2align	2
_radeon_fence_note_sync:                ; @radeon_fence_note_sync
	.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
                                        ; kill: def $w1 killed $w1 def $x1
	cbz	x0, LBB0_7
; %bb.1:
	ldrsw	x19, [x0]
	cmp	w19, w1
	b.eq	LBB0_7
; %bb.2:
Lloh0:
	adrp	x20, _RADEON_NUM_RINGS@GOTPAGE
Lloh1:
	ldr	x20, [x20, _RADEON_NUM_RINGS@GOTPAGEOFF]
	ldr	w8, [x20]
	cbz	w8, LBB0_7
; %bb.3:
	mov	x21, #0
	sxtw	x9, w1
	ldr	x10, [x0, #8]
	ldr	x22, [x10]
	mov	w23, w1
	lsl	x24, x9, #3
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	cmp	x21, w8, uxtw
	b.hs	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x23, x21
	b.eq	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x22, x24]
	lsl	x25, x21, #2
	ldr	w0, [x8, x25]
	ldr	x8, [x22, x19, lsl #3]
	ldr	w1, [x8, x25]
	bl	_max
	ldr	x8, [x22, x24]
	str	w0, [x8, x25]
	ldr	w8, [x20]
	b	LBB0_4
LBB0_7:
	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
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_NUM_RINGS,4,2           ; @RADEON_NUM_RINGS
.subsections_via_symbols
