	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_enable_vblank           ## -- Begin function radeon_enable_vblank
	.p2align	4, 0x90
_radeon_enable_vblank:                  ## @radeon_enable_vblank
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdi), %rax
	movq	_RADEON_FAMILY_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	(%rax), %ecx
	movq	_CHIP_RS600@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jge	LBB0_4
## %bb.1:
	cmpl	$1, %esi
	je	LBB0_8
## %bb.2:
	testl	%esi, %esi
	jne	LBB0_7
## %bb.3:
	movq	_RADEON_CRTC_VBLANK_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_4:
	cmpl	$1, %esi
	je	LBB0_10
## %bb.5:
	testl	%esi, %esi
	jne	LBB0_7
## %bb.6:
	movq	_R500_D1MODE_INT_MASK@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_7:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_8:
	movq	_RADEON_CRTC2_VBLANK_MASK@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_radeon_irq_set_state
	jmp	LBB0_12
LBB0_10:
	movq	_R500_D2MODE_INT_MASK@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %esi
	movl	$1, %edx
	callq	_r500_vbl_irq_set_state
LBB0_12:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_FAMILY_MASK,4,2         ## @RADEON_FAMILY_MASK
	.comm	_CHIP_RS600,4,2                 ## @CHIP_RS600
	.comm	_R500_D1MODE_INT_MASK,4,2       ## @R500_D1MODE_INT_MASK
	.comm	_R500_D2MODE_INT_MASK,4,2       ## @R500_D2MODE_INT_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"tried to enable vblank on non-existent crtc %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RADEON_CRTC_VBLANK_MASK,4,2    ## @RADEON_CRTC_VBLANK_MASK
	.comm	_RADEON_CRTC2_VBLANK_MASK,4,2   ## @RADEON_CRTC2_VBLANK_MASK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_radeon_enable_vblank           ; -- Begin function radeon_enable_vblank
	.p2align	2
_radeon_enable_vblank:                  ; @radeon_enable_vblank
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	x8, [x0]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _RADEON_FAMILY_MASK@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RADEON_FAMILY_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh3:
	adrp	x9, _CHIP_RS600@GOTPAGE
Lloh4:
	ldr	x9, [x9, _CHIP_RS600@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ge	LBB0_4
; %bb.1:
	cmp	w1, #1
	b.eq	LBB0_8
; %bb.2:
	cbnz	w1, LBB0_7
; %bb.3:
Lloh6:
	adrp	x8, _RADEON_CRTC_VBLANK_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RADEON_CRTC_VBLANK_MASK@GOTPAGEOFF]
	b	LBB0_9
LBB0_4:
	cmp	w1, #1
	b.eq	LBB0_10
; %bb.5:
	cbnz	w1, LBB0_7
; %bb.6:
Lloh8:
	adrp	x8, _R500_D1MODE_INT_MASK@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R500_D1MODE_INT_MASK@GOTPAGEOFF]
	b	LBB0_11
LBB0_7:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh15:
	adrp	x8, _RADEON_CRTC2_VBLANK_MASK@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RADEON_CRTC2_VBLANK_MASK@GOTPAGEOFF]
LBB0_9:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_radeon_irq_set_state
	b	LBB0_12
LBB0_10:
Lloh17:
	adrp	x8, _R500_D2MODE_INT_MASK@GOTPAGE
Lloh18:
	ldr	x8, [x8, _R500_D2MODE_INT_MASK@GOTPAGEOFF]
LBB0_11:
	ldr	w1, [x8]
	mov	w2, #1
	bl	_r500_vbl_irq_set_state
LBB0_12:
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_FAMILY_MASK,4,2         ; @RADEON_FAMILY_MASK
	.comm	_CHIP_RS600,4,2                 ; @CHIP_RS600
	.comm	_R500_D1MODE_INT_MASK,4,2       ; @R500_D1MODE_INT_MASK
	.comm	_R500_D2MODE_INT_MASK,4,2       ; @R500_D2MODE_INT_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"tried to enable vblank on non-existent crtc %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RADEON_CRTC_VBLANK_MASK,4,2    ; @RADEON_CRTC_VBLANK_MASK
	.comm	_RADEON_CRTC2_VBLANK_MASK,4,2   ; @RADEON_CRTC2_VBLANK_MASK
.subsections_via_symbols
