	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_fence_wait_seq_timeout
_radeon_fence_wait_seq_timeout:         ## @radeon_fence_wait_seq_timeout
	.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	%rcx, %r15
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r13
	callq	_radeon_fence_any_seq_signaled
	testq	%rax, %rax
	je	LBB0_1
LBB0_18:
	movq	%r15, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	_RADEON_NUM_RINGS@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_6
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14,%rbx,4), %edx
	testl	%edx, %edx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	(%r13), %edi
	movl	%ebx, %esi
	callq	_trace_radeon_fence_wait_begin
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_radeon_irq_kms_sw_irq_get
	movl	(%r12), %eax
	jmp	LBB0_5
LBB0_6:
	movl	16(%r13), %ebx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_radeon_fence_any_seq_signaled
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.7:
	movl	$1, %esi
	testq	%rax, %rax
	jne	LBB0_9
## %bb.8:
	xorl	%esi, %esi
	cmpq	$0, 8(%r13)
	setne	%sil
LBB0_9:
	movl	%ebx, %edi
	movq	%r15, %rdx
	callq	_wait_event_interruptible_timeout
	jmp	LBB0_13
LBB0_10:
	movl	$1, %esi
	testq	%rax, %rax
	jne	LBB0_12
## %bb.11:
	xorl	%esi, %esi
	cmpq	$0, 8(%r13)
	setne	%sil
LBB0_12:
	movl	%ebx, %edi
	movq	%r15, %rdx
	callq	_wait_event_timeout
LBB0_13:
	movq	_EDEADLK@GOTPCREL(%rip), %rcx
	xorl	%r15d, %r15d
	subq	(%rcx), %r15
	cmpq	$0, 8(%r13)
	cmoveq	%rax, %r15
	movl	(%r12), %eax
	testl	%eax, %eax
	jle	LBB0_18
## %bb.14:
	xorl	%ebx, %ebx
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_18
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%r14,%rbx,4)
	je	LBB0_17
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_radeon_irq_kms_sw_irq_put
	movl	(%r13), %edi
	movl	(%r14,%rbx,4), %edx
	movl	%ebx, %esi
	callq	_trace_radeon_fence_wait_end
	movl	(%r12), %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_NUM_RINGS,4,2           ## @RADEON_NUM_RINGS
	.comm	_EDEADLK,8,3                    ## @EDEADLK
	.no_dead_strip	_radeon_fence_wait_seq_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_fence_wait_seq_timeout
_radeon_fence_wait_seq_timeout:         ; @radeon_fence_wait_seq_timeout
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x19, x1
	mov	x20, x0
	bl	_radeon_fence_any_seq_signaled
	cbz	x0, LBB0_2
LBB0_1:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
Lloh0:
	adrp	x24, _RADEON_NUM_RINGS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _RADEON_NUM_RINGS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.3:
	mov	x23, #0
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x23, x23, #1
	cmp	x23, w8, sxtw
	b.ge	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w2, [x19, x23, lsl #2]
	cbz	w2, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x20]
	mov	x1, x23
	bl	_trace_radeon_fence_wait_begin
	mov	x0, x20
	mov	x1, x23
	bl	_radeon_irq_kms_sw_irq_get
	ldr	w8, [x24]
	b	LBB0_4
LBB0_7:
	ldr	w23, [x20, #16]
	mov	x0, x20
	mov	x1, x19
	bl	_radeon_fence_any_seq_signaled
	cbz	w22, LBB0_10
; %bb.8:
	cbz	x0, LBB0_12
; %bb.9:
	mov	w1, #1
	b	LBB0_13
LBB0_10:
	cbz	x0, LBB0_14
; %bb.11:
	mov	w1, #1
	b	LBB0_15
LBB0_12:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w1, ne
LBB0_13:
	mov	x0, x23
	mov	x2, x21
	bl	_wait_event_interruptible_timeout
	b	LBB0_16
LBB0_14:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w1, ne
LBB0_15:
	mov	x0, x23
	mov	x2, x21
	bl	_wait_event_timeout
LBB0_16:
Lloh2:
	adrp	x8, _EDEADLK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EDEADLK@GOTPAGEOFF]
	ldr	x9, [x20, #8]
Lloh4:
	ldr	x8, [x8]
	cmp	x9, #0
	csneg	x21, x0, x8, eq
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_1
; %bb.17:
	mov	x22, #0
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_1
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x19, x22, lsl #2]
	cbz	w9, LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_radeon_irq_kms_sw_irq_put
	ldr	w0, [x20]
	ldr	w2, [x19, x22, lsl #2]
	mov	x1, x22
	bl	_trace_radeon_fence_wait_end
	ldr	w8, [x24]
	b	LBB0_18
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_NUM_RINGS,4,2           ; @RADEON_NUM_RINGS
	.comm	_EDEADLK,8,3                    ; @EDEADLK
	.no_dead_strip	_radeon_fence_wait_seq_timeout
.subsections_via_symbols
