	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function via_hook_segment
_via_hook_segment:                      ## @via_hook_segment
	.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	%ecx, %r12d
	movl	%edx, %ebx
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r15
	movq	(%rdi), %r14
	xorl	%eax, %eax
	callq	_via_flush_write_combine
	movq	%r15, %rdi
	callq	_via_get_dma
	cltq
	movl	-1(%rax), %eax
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	movl	%ebx, (%r14)
	xorl	%eax, %eax
	callq	_via_flush_write_combine
	movl	(%r14), %eax
	movq	8(%r15), %rax
	movl	(%rax), %ebx
	subl	16(%r15), %r14d
	addl	24(%r15), %r14d
	movl	40(%r15), %eax
	leal	(%rax,%r14), %r13d
	addl	$4, %r13d
	movq	%r15, %rdi
	callq	_via_get_dma
	decl	%eax
	cltq
	movq	%rax, (%r15)
	addl	28(%r15), %ebx
	cmpl	%ebx, %r13d
	jne	LBB0_5
## %bb.1:
	movl	$-10000001, %ebx                ## imm = 0xFF67697F
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	$1052, %edi                     ## imm = 0x41C
	callq	_VIA_READ
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r15), %rax
	movl	28(%r15), %ecx
	addl	(%rax), %ecx
	cmpl	%ecx, %r13d
	je	LBB0_2
LBB0_5:
	movl	$1052, %edi                     ## imm = 0x41C
	callq	_VIA_READ
	movl	%eax, %r14d
	andl	$-2147483648, %r14d             ## imm = 0x80000000
	testl	%r12d, %r12d
	jne	LBB0_12
## %bb.6:
	testl	%r14d, %r14d
	je	LBB0_12
## %bb.7:
	movq	8(%r15), %rax
	movl	(%rax), %edx
	movl	28(%r15), %ecx
	movl	%r13d, %edi
	subl	%edx, %edi
	subl	%ecx, %edi
	movl	32(%r15), %esi
	leal	-1(%rsi), %eax
	andl	%edi, %eax
	je	LBB0_10
## %bb.8:
	sarl	%esi
	cmpl	%esi, %eax
	jge	LBB0_10
## %bb.9:
	leaq	L_.str(%rip), %rdi
	movl	%r13d, %esi
                                        ## kill: def $edx killed $edx killed $rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	callq	_DRM_ERROR
	jmp	LBB0_12
LBB0_10:
	testl	%eax, %eax
	jne	LBB0_12
## %bb.11:
	movq	_VIA_REG_TRANSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_HC_ParaType_PreCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	shll	$16, %esi
	callq	_VIA_WRITE
	movq	_VIA_REG_TRANSPACE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_VIA_WRITE
	movl	(%rbx), %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_VIA_WRITE
	movl	(%rbx), %edi
	callq	_VIA_READ
LBB0_12:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Paused at incorrect address. 0x%08x, 0x%08x 0x%08x\n"

	.comm	_VIA_REG_TRANSET,4,2            ## @VIA_REG_TRANSET
	.comm	_HC_ParaType_PreCR,4,2          ## @HC_ParaType_PreCR
	.comm	_VIA_REG_TRANSPACE,4,2          ## @VIA_REG_TRANSPACE
	.no_dead_strip	_via_hook_segment
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function via_hook_segment
_via_hook_segment:                      ; @via_hook_segment
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x22, x3
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	ldr	x23, [x0]
	bl	_via_flush_write_combine
	mov	x0, x21
	bl	_via_get_dma
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x8, w0
	ldur	wzr, [x8, #-1]
	str	w19, [x23]
	bl	_via_flush_write_combine
	ldr	wzr, [x23]
	ldr	x8, [x21, #8]
	ldr	w24, [x8]
	ldr	w8, [x21, #16]
	ldr	w9, [x21, #24]
	sub	w8, w23, w8
	add	w8, w8, w9
	ldr	w9, [x21, #40]
	add	w8, w8, w9
	add	w23, w8, #4
	mov	x0, x21
	bl	_via_get_dma
	sub	w8, w0, #1
	sxtw	x8, w8
	str	x8, [x21]
	ldr	w8, [x21, #28]
	add	w8, w8, w24
	cmp	w23, w8
	b.ne	LBB0_5
; %bb.1:
	mov	w24, #27007
	movk	w24, #65383, lsl #16
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	adds	w24, w24, #1
	b.hs	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w0, #1052
	bl	_VIA_READ
	tbnz	w0, #31, LBB0_5
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x21, #8]
	ldr	w8, [x8]
	ldr	w9, [x21, #28]
	add	w8, w9, w8
	cmp	w23, w8
	b.eq	LBB0_2
LBB0_5:
	mov	w0, #1052
	bl	_VIA_READ
	and	w24, w0, #0x80000000
	cbnz	w22, LBB0_11
; %bb.6:
	cbz	w24, LBB0_11
; %bb.7:
	ldr	x8, [x21, #8]
	ldr	w2, [x8]
	ldp	w3, w9, [x21, #28]
	add	w8, w2, w3
	sub	w8, w23, w8
	sub	w10, w9, #1
	and	w8, w10, w8
	asr	w9, w9, #1
	cmp	w8, #0
	ccmp	w8, w9, #0, ne
	b.lt	LBB0_10
; %bb.8:
	cbnz	w8, LBB0_11
; %bb.9:
Lloh0:
	adrp	x8, _VIA_REG_TRANSET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VIA_REG_TRANSET@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _HC_ParaType_PreCR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HC_ParaType_PreCR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	lsl	w1, w8, #16
	bl	_VIA_WRITE
Lloh6:
	adrp	x21, _VIA_REG_TRANSPACE@GOTPAGE
Lloh7:
	ldr	x21, [x21, _VIA_REG_TRANSPACE@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	x1, x20
	bl	_VIA_WRITE
	ldr	w0, [x21]
	mov	x1, x19
	bl	_VIA_WRITE
	ldr	w0, [x21]
	bl	_VIA_READ
	b	LBB0_11
LBB0_10:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x23
	bl	_DRM_ERROR
LBB0_11:
	mov	x0, x24
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Paused at incorrect address. 0x%08x, 0x%08x 0x%08x\n"

	.comm	_VIA_REG_TRANSET,4,2            ; @VIA_REG_TRANSET
	.comm	_HC_ParaType_PreCR,4,2          ; @HC_ParaType_PreCR
	.comm	_VIA_REG_TRANSPACE,4,2          ; @VIA_REG_TRANSPACE
	.no_dead_strip	_via_hook_segment
.subsections_via_symbols
