	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_cp_dispatch_swap          ## -- Begin function r600_cp_dispatch_swap
	.p2align	4, 0x90
_r600_cp_dispatch_swap:                 ## @r600_cp_dispatch_swap
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movq	(%rdi), %rbx
	movq	(%rsi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	movl	(%r13), %eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	(%rbx), %rax
	movq	_RADEON_COLOR_FORMAT_ARGB8888@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%al
	cmpq	$0, 8(%r13)
	movb	%al, -48(%rbp)                  ## 1-byte Spill
	je	LBB0_1
## %bb.2:
	leaq	12(%rbx), %rax
	leaq	8(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	32(%rbx), %r15
	addq	%rdx, %r15
	addq	$24, %rbx
	jmp	LBB0_3
LBB0_1:
	leaq	8(%rbx), %rax
	leaq	12(%rbx), %rcx
	movq	16(%rbx), %rdx
	movq	24(%rbx), %r15
	addq	%rdx, %r15
	addq	$32, %rbx
LBB0_3:
	addq	(%rbx), %rdx
	movl	(%rax), %eax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movl	(%rcx), %eax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	%r14, %rbx
	movq	%r14, %rdi
	movq	%r12, %rsi
	movq	%rdx, %r14
	callq	_r600_prepare_blit_copy
	testq	%rax, %rax
	je	LBB0_4
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_4:
	movq	%r13, -80(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testl	%eax, %eax
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%r15, -96(%rbp)                 ## 8-byte Spill
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	jle	LBB0_7
## %bb.5:
	xorl	%ecx, %ecx
	movb	-48(%rbp), %bl                  ## 1-byte Reload
	movb	%bl, %cl
	addl	%ecx, %ecx
	addl	$2, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	shlq	$4, %rax
	xorl	%r13d, %r13d
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rdx,%r13), %r14d
	movl	4(%rdx,%r13), %ebx
	movl	8(%rdx,%r13), %r12d
	subl	%r14d, %r12d
	movl	12(%rdx,%r13), %r15d
	subl	%ebx, %r15d
	leaq	L_.str.2(%rip), %rdi
	movl	%r14d, %esi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	%r15d, %r8d
	xorl	%eax, %eax
	callq	_DRM_DEBUG
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	movl	%r14d, %ecx
	movl	%ebx, %r8d
	movl	%r14d, %r9d
	pushq	-48(%rbp)                       ## 8-byte Folded Reload
	pushq	-104(%rbp)                      ## 8-byte Folded Reload
	pushq	-112(%rbp)                      ## 8-byte Folded Reload
	pushq	%r15
	pushq	%r12
	pushq	%rbx
	callq	_r600_blit_swap
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	$48, %rsp
	addq	$16, %r13
	cmpq	%r13, %rax
	jne	LBB0_6
LBB0_7:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_r600_done_blit_copy
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	incl	16(%rbx)
	movl	$3, %edi
	callq	_BEGIN_RING
	movl	16(%rbx), %edi
	callq	_R600_FRAME_AGE
	xorl	%eax, %eax
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ADVANCE_RING                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_LOCALS,4,2                ## @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_RADEON_COLOR_FORMAT_ARGB8888,8,3 ## @RADEON_COLOR_FORMAT_ARGB8888
L_.str.1:                               ## @.str.1
	.asciz	"unable to allocate vertex buffer for swap buffer\n"

L_.str.2:                               ## @.str.2
	.asciz	"%d,%d-%d,%d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_cp_dispatch_swap          ; -- Begin function r600_cp_dispatch_swap
	.p2align	2
_r600_cp_dispatch_swap:                 ; @r600_cp_dispatch_swap
	.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
	mov	x21, x1
	mov	x28, x0
	ldr	x22, [x0]
	ldr	x8, [x1]
	ldr	x8, [x8]
	ldr	x19, [x8]
	ldr	w27, [x19]
	ldr	x23, [x19, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _RADEON_COLOR_FORMAT_ARGB8888@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RADEON_COLOR_FORMAT_ARGB8888@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	mov	w8, #2
	mov	w9, #4
	csel	w20, w9, w8, eq
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_2
; %bb.1:
	add	x8, x22, #12
	add	x9, x22, #8
	ldr	x10, [x22, #32]
	ldr	x24, [x22, #16]
	add	x26, x24, x10
	add	x10, x22, #24
	b	LBB0_3
LBB0_2:
	add	x8, x22, #8
	add	x9, x22, #12
	ldp	x24, x10, [x22, #16]
	add	x26, x24, x10
	add	x10, x22, #32
LBB0_3:
	ldr	x25, [x10]
	ldr	w22, [x8]
	ldr	w8, [x9]
	str	w8, [sp, #44]                   ; 4-byte Folded Spill
	mov	x0, x28
	mov	x1, x21
	bl	_r600_prepare_blit_copy
	cbz	x0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	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
	b	_DRM_ERROR
LBB0_5:
	str	x19, [sp, #32]                  ; 8-byte Folded Spill
	cmp	w27, #1
	str	w22, [sp, #40]                  ; 4-byte Folded Spill
	mov	x22, x26
	mov	x26, x20
	mov	x20, x28
	b.lt	LBB0_8
; %bb.6:
	add	x21, x25, x24
	add	x28, x23, #8
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w23, w24, [x28, #-8]
	ldp	w8, w9, [x28], #16
	sub	w25, w8, w23
	sub	w19, w9, w24
	stp	x23, x24, [sp]
	stp	x25, x19, [sp, #16]
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [sp, #44]                   ; 4-byte Folded Reload
	stp	w8, w26, [sp, #8]
	ldr	w8, [sp, #40]                   ; 4-byte Folded Reload
	stp	w19, w8, [sp]
	mov	x0, x20
	mov	x1, x22
	mov	x2, x21
	mov	x3, x23
	mov	x4, x24
	mov	x5, x23
	mov	x6, x24
	mov	x7, x25
	bl	_r600_blit_swap
	subs	x27, x27, #1
	b.ne	LBB0_7
LBB0_8:
	mov	x0, x20
	bl	_r600_done_blit_copy
	ldr	x19, [sp, #32]                  ; 8-byte Folded Reload
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	mov	w0, #3
	bl	_BEGIN_RING
	ldr	w0, [x19, #16]
	bl	_R600_FRAME_AGE
	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
	b	_ADVANCE_RING
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_RADEON_COLOR_FORMAT_ARGB8888,8,3 ; @RADEON_COLOR_FORMAT_ARGB8888
l_.str.1:                               ; @.str.1
	.asciz	"unable to allocate vertex buffer for swap buffer\n"

l_.str.2:                               ; @.str.2
	.asciz	"%d,%d-%d,%d\n"

.subsections_via_symbols
