	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function reset_lb_on_vblank
_reset_lb_on_vblank:                    ## @reset_lb_on_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
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_TO_DCE110_COMPRESSOR
	movq	_reg_offsets@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rcx,%rbx,4), %ecx
	movl	%ecx, (%rax)
	movl	(%r15), %ebx
	movq	_mmCRTC_STATUS_POSITION@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_DCP_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dm_read_reg
	movq	%rax, %r14
	movl	(%r15), %ebx
	movl	(%r12), %edi
	callq	_DCP_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dm_read_reg
	cmpq	%rax, %r14
	jne	LBB0_1
## %bb.6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%r15), %ebx
	movq	_mmLB_SYNC_RESET_SEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_DCP_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dm_read_reg
	movq	%rax, %r14
	movq	_LB_SYNC_RESET_SEL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movq	%rax, %rdi
	movl	$3, %esi
	movl	%ecx, %edx
	callq	_set_reg_field_value
	movl	(%rbx), %edx
	movq	_LB_SYNC_RESET_SEL2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movl	$1, %esi
	callq	_set_reg_field_value
	movl	(%r15), %ebx
	movl	(%r12), %edi
	callq	_DCP_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_dm_write_reg
	movl	(%r15), %ebx
	movq	_mmCRTC_STATUS_FRAME_COUNT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_DCP_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dm_read_reg
	movq	%rax, %r14
	movq	$-10000, %r13                   ## imm = 0xD8F0
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %ebx
	movl	(%r12), %edi
	callq	_DCP_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dm_read_reg
	cmpq	%rax, %r14
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$10, %edi
	callq	_udelay
	incq	%r13
	jne	LBB0_2
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_dm_error
LBB0_5:
	movl	(%r15), %ebx
	movq	_mmLB_SYNC_RESET_SEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_DCP_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_dm_read_reg
	movq	%rax, %rbx
	movq	_LB_SYNC_RESET_SEL@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	%rax, %rdi
	movl	$2, %esi
	movl	%ecx, %edx
	callq	_set_reg_field_value
	movl	(%r14), %edx
	movq	_LB_SYNC_RESET_SEL2@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_set_reg_field_value
	movl	(%r15), %r14d
	movl	(%r12), %edi
	callq	_DCP_REG
	movl	%r14d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dm_write_reg                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_reg_offsets,8,3                ## @reg_offsets
	.comm	_mmCRTC_STATUS_POSITION,4,2     ## @mmCRTC_STATUS_POSITION
	.comm	_mmLB_SYNC_RESET_SEL,4,2        ## @mmLB_SYNC_RESET_SEL
	.comm	_LB_SYNC_RESET_SEL,4,2          ## @LB_SYNC_RESET_SEL
	.comm	_LB_SYNC_RESET_SEL2,4,2         ## @LB_SYNC_RESET_SEL2
	.comm	_mmCRTC_STATUS_FRAME_COUNT,4,2  ## @mmCRTC_STATUS_FRAME_COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Frame count did not increase for 100ms.\n"

	.no_dead_strip	_reset_lb_on_vblank
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function reset_lb_on_vblank
_reset_lb_on_vblank:                    ; @reset_lb_on_vblank
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x1
	mov	x19, x0
	bl	_TO_DCE110_COMPRESSOR
Lloh0:
	adrp	x8, _reg_offsets@GOTPAGE
Lloh1:
	ldr	x8, [x8, _reg_offsets@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	ldr	w8, [x8, x20, lsl #2]
	str	w8, [x0]
	ldr	w20, [x19]
Lloh3:
	adrp	x22, _mmCRTC_STATUS_POSITION@GOTPAGE
Lloh4:
	ldr	x22, [x22, _mmCRTC_STATUS_POSITION@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_DCP_REG
	mov	x1, x0
	mov	x0, x20
	bl	_dm_read_reg
	mov	x20, x0
	ldr	w21, [x19]
	ldr	w0, [x22]
	bl	_DCP_REG
	mov	x1, x0
	mov	x0, x21
	bl	_dm_read_reg
	cmp	x20, x0
	b.ne	LBB0_2
; %bb.1:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_2:
	ldr	w20, [x19]
Lloh5:
	adrp	x22, _mmLB_SYNC_RESET_SEL@GOTPAGE
Lloh6:
	ldr	x22, [x22, _mmLB_SYNC_RESET_SEL@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_DCP_REG
	mov	x1, x0
	mov	x0, x20
	bl	_dm_read_reg
	mov	x20, x0
Lloh7:
	adrp	x23, _LB_SYNC_RESET_SEL@GOTPAGE
Lloh8:
	ldr	x23, [x23, _LB_SYNC_RESET_SEL@GOTPAGEOFF]
	ldr	w2, [x23]
	mov	w1, #3
	mov	x3, x2
	bl	_set_reg_field_value
	ldr	w2, [x23]
Lloh9:
	adrp	x24, _LB_SYNC_RESET_SEL2@GOTPAGE
Lloh10:
	ldr	x24, [x24, _LB_SYNC_RESET_SEL2@GOTPAGEOFF]
	ldr	w3, [x24]
	mov	x0, x20
	mov	w1, #1
	bl	_set_reg_field_value
	ldr	w21, [x19]
	ldr	w0, [x22]
	bl	_DCP_REG
	mov	x1, x0
	mov	x0, x21
	mov	x2, x20
	bl	_dm_write_reg
	ldr	w20, [x19]
Lloh11:
	adrp	x25, _mmCRTC_STATUS_FRAME_COUNT@GOTPAGE
Lloh12:
	ldr	x25, [x25, _mmCRTC_STATUS_FRAME_COUNT@GOTPAGEOFF]
	ldr	w0, [x25]
	bl	_DCP_REG
	mov	x1, x0
	mov	x0, x20
	bl	_dm_read_reg
	mov	x20, x0
	mov	x26, #-10000
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w21, [x19]
	ldr	w0, [x25]
	bl	_DCP_REG
	mov	x1, x0
	mov	x0, x21
	bl	_dm_read_reg
	cmp	x20, x0
	b.ne	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #10
	bl	_udelay
	adds	x26, x26, #1
	b.lo	LBB0_3
; %bb.5:
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dm_error
LBB0_6:
	ldr	w20, [x19]
	ldr	w0, [x22]
	bl	_DCP_REG
	mov	x1, x0
	mov	x0, x20
	bl	_dm_read_reg
	mov	x20, x0
	ldr	w2, [x23]
	mov	w1, #2
	mov	x3, x2
	bl	_set_reg_field_value
	ldr	w2, [x23]
	ldr	w3, [x24]
	mov	x0, x20
	mov	w1, #0
	bl	_set_reg_field_value
	ldr	w19, [x19]
	ldr	w0, [x22]
	bl	_DCP_REG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_dm_write_reg
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_reg_offsets,8,3                ; @reg_offsets
	.comm	_mmCRTC_STATUS_POSITION,4,2     ; @mmCRTC_STATUS_POSITION
	.comm	_mmLB_SYNC_RESET_SEL,4,2        ; @mmLB_SYNC_RESET_SEL
	.comm	_LB_SYNC_RESET_SEL,4,2          ; @LB_SYNC_RESET_SEL
	.comm	_LB_SYNC_RESET_SEL2,4,2         ; @LB_SYNC_RESET_SEL2
	.comm	_mmCRTC_STATUS_FRAME_COUNT,4,2  ; @mmCRTC_STATUS_FRAME_COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Frame count did not increase for 100ms.\n"

	.no_dead_strip	_reset_lb_on_vblank
.subsections_via_symbols
