	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hubp2_enable_triplebuffer      ## -- Begin function hubp2_enable_triplebuffer
	.p2align	4, 0x90
_hubp2_enable_triplebuffer:             ## @hubp2_enable_triplebuffer
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	callq	_TO_DCN20_HUBP
	movl	$0, -28(%rbp)
	movq	_DCSURF_FLIP_CONTROL2@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_SURFACE_TRIPLE_BUFFER_ENABLE@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	leaq	-28(%rbp), %rdx
	callq	_REG_GET
	xorl	%eax, %eax
	cmpl	$1, -28(%rbp)
	sete	%al
	cmpl	%ebx, %eax
	je	LBB0_5
## %bb.1:
	movl	(%r14), %edi
	movl	(%r15), %esi
	testl	%ebx, %ebx
	jne	LBB0_2
## %bb.3:
	movq	_DC_TRIPLEBUFFER_DISABLE@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_DC_TRIPLEBUFFER_ENABLE@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edx
	callq	_REG_UPDATE
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DCSURF_FLIP_CONTROL2,4,2       ## @DCSURF_FLIP_CONTROL2
	.comm	_SURFACE_TRIPLE_BUFFER_ENABLE,4,2 ## @SURFACE_TRIPLE_BUFFER_ENABLE
	.comm	_DC_TRIPLEBUFFER_ENABLE,4,2     ## @DC_TRIPLEBUFFER_ENABLE
	.comm	_DC_TRIPLEBUFFER_DISABLE,4,2    ## @DC_TRIPLEBUFFER_DISABLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hubp2_enable_triplebuffer      ; -- Begin function hubp2_enable_triplebuffer
	.p2align	2
_hubp2_enable_triplebuffer:             ; @hubp2_enable_triplebuffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x1
	bl	_TO_DCN20_HUBP
	str	wzr, [sp, #12]
Lloh0:
	adrp	x21, _DCSURF_FLIP_CONTROL2@GOTPAGE
Lloh1:
	ldr	x21, [x21, _DCSURF_FLIP_CONTROL2@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh2:
	adrp	x20, _SURFACE_TRIPLE_BUFFER_ENABLE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _SURFACE_TRIPLE_BUFFER_ENABLE@GOTPAGEOFF]
	ldr	w1, [x20]
	add	x2, sp, #12
	bl	_REG_GET
	ldr	w8, [sp, #12]
	cmp	w8, #1
	cset	w8, eq
	cmp	w8, w19
	b.eq	LBB0_2
; %bb.1:
	ldr	w0, [x21]
Lloh4:
	adrp	x8, _DC_TRIPLEBUFFER_ENABLE@GOTPAGE
Lloh5:
	ldr	x8, [x8, _DC_TRIPLEBUFFER_ENABLE@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh6:
	adrp	x9, _DC_TRIPLEBUFFER_DISABLE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _DC_TRIPLEBUFFER_DISABLE@GOTPAGEOFF]
	cmp	w19, #0
	csel	x8, x9, x8, eq
	ldr	w2, [x8]
	bl	_REG_UPDATE
LBB0_2:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DCSURF_FLIP_CONTROL2,4,2       ; @DCSURF_FLIP_CONTROL2
	.comm	_SURFACE_TRIPLE_BUFFER_ENABLE,4,2 ; @SURFACE_TRIPLE_BUFFER_ENABLE
	.comm	_DC_TRIPLEBUFFER_ENABLE,4,2     ; @DC_TRIPLEBUFFER_ENABLE
	.comm	_DC_TRIPLEBUFFER_DISABLE,4,2    ; @DC_TRIPLEBUFFER_DISABLE
.subsections_via_symbols
