	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_enable_vblank              ## -- Begin function psb_enable_vblank
	.p2align	4, 0x90
_psb_enable_vblank:                     ## @psb_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
	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
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	(%rdi), %r14
	movl	%esi, %edi
	callq	_mid_pipeconf
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_IS_MFLD
	testq	%rax, %rax
	je	LBB0_1
## %bb.13:
	movq	%rbx, %rdi
	movl	%r15d, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mdfld_enable_te                ## TAILCALL
LBB0_1:
	xorl	%r13d, %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gma_power_begin
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	movl	%r12d, %edi
	callq	_REG_READ
	movl	%eax, %r13d
	movq	%rbx, %rdi
	callq	_gma_power_end
LBB0_3:
	movq	_PIPEACONF_ENABLE@GOTPCREL(%rip), %rax
	testl	%r13d, (%rax)
	je	LBB0_4
## %bb.5:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	testl	%r15d, %r15d
	je	LBB0_8
## %bb.6:
	cmpl	$1, %r15d
	jne	LBB0_7
## %bb.9:
	movq	__PSB_VSYNC_PIPEB_FLAG@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_8:
	movq	__PSB_VSYNC_PIPEA_FLAG@GOTPCREL(%rip), %rax
LBB0_10:
	movl	4(%r14), %edi
	orl	(%rax), %edi
	movl	%edi, 4(%r14)
	jmp	LBB0_11
LBB0_7:
	movl	4(%r14), %edi
LBB0_11:
	notl	%edi
	movq	_PSB_INT_MASK_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PSB_WVDC32
	movl	4(%r14), %edi
	movq	_PSB_INT_ENABLE_R@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_PSB_WVDC32
	movq	_PIPE_VBLANK_INTERRUPT_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_psb_enable_pipestat
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIPEACONF_ENABLE,4,2           ## @PIPEACONF_ENABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	__PSB_VSYNC_PIPEA_FLAG,4,2      ## @_PSB_VSYNC_PIPEA_FLAG
	.comm	__PSB_VSYNC_PIPEB_FLAG,4,2      ## @_PSB_VSYNC_PIPEB_FLAG
	.comm	_PSB_INT_MASK_R,4,2             ## @PSB_INT_MASK_R
	.comm	_PSB_INT_ENABLE_R,4,2           ## @PSB_INT_ENABLE_R
	.comm	_PIPE_VBLANK_INTERRUPT_ENABLE,4,2 ## @PIPE_VBLANK_INTERRUPT_ENABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_psb_enable_vblank              ; -- Begin function psb_enable_vblank
	.p2align	2
_psb_enable_vblank:                     ; @psb_enable_vblank
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x21, x0
	ldr	x19, [x0]
	mov	x0, x1
	bl	_mid_pipeconf
	mov	x22, x0
	mov	x0, x21
	bl	_IS_MFLD
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x21
	mov	x1, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_mdfld_enable_te
LBB0_2:
	mov	x0, x21
	mov	w1, #0
	bl	_gma_power_begin
	cbz	x0, LBB0_4
; %bb.3:
	mov	x0, x22
	bl	_REG_READ
	mov	x22, x0
	mov	x0, x21
	bl	_gma_power_end
	b	LBB0_5
LBB0_4:
	mov	w22, #0
LBB0_5:
Lloh0:
	adrp	x8, _PIPEACONF_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PIPEACONF_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.6:
	mov	x0, x19
	bl	_spin_lock_irqsave
	cbz	w20, LBB0_10
; %bb.7:
	cmp	w20, #1
	b.ne	LBB0_12
; %bb.8:
Lloh3:
	adrp	x8, __PSB_VSYNC_PIPEB_FLAG@GOTPAGE
Lloh4:
	ldr	x8, [x8, __PSB_VSYNC_PIPEB_FLAG@GOTPAGEOFF]
	b	LBB0_11
LBB0_9:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_10:
Lloh8:
	adrp	x8, __PSB_VSYNC_PIPEA_FLAG@GOTPAGE
Lloh9:
	ldr	x8, [x8, __PSB_VSYNC_PIPEA_FLAG@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_13
LBB0_12:
	ldr	w8, [x19, #4]
LBB0_13:
	mvn	w0, w8
Lloh10:
	adrp	x8, _PSB_INT_MASK_R@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PSB_INT_MASK_R@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_PSB_WVDC32
	ldr	w0, [x19, #4]
Lloh13:
	adrp	x8, _PSB_INT_ENABLE_R@GOTPAGE
Lloh14:
	ldr	x8, [x8, _PSB_INT_ENABLE_R@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	bl	_PSB_WVDC32
Lloh16:
	adrp	x8, _PIPE_VBLANK_INTERRUPT_ENABLE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _PIPE_VBLANK_INTERRUPT_ENABLE@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x20
	bl	_psb_enable_pipestat
	mov	x0, x19
	bl	_spin_unlock_irqrestore
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PIPEACONF_ENABLE,4,2           ; @PIPEACONF_ENABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	__PSB_VSYNC_PIPEA_FLAG,4,2      ; @_PSB_VSYNC_PIPEA_FLAG
	.comm	__PSB_VSYNC_PIPEB_FLAG,4,2      ; @_PSB_VSYNC_PIPEB_FLAG
	.comm	_PSB_INT_MASK_R,4,2             ; @PSB_INT_MASK_R
	.comm	_PSB_INT_ENABLE_R,4,2           ; @PSB_INT_ENABLE_R
	.comm	_PIPE_VBLANK_INTERRUPT_ENABLE,4,2 ; @PIPE_VBLANK_INTERRUPT_ENABLE
.subsections_via_symbols
