	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av7110_set_vidmode             ## -- Begin function av7110_set_vidmode
	.p2align	4, 0x90
_av7110_set_vidmode:                    ## @av7110_set_vidmode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	leaq	L_.str(%rip), %rsi
	movl	$2, %edi
	movq	%r14, %rdx
	callq	_dprintk
	movq	_COMTYPE_ENCODER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_LoadVidCode@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$1, %ecx
	movl	%ebx, %r8d
	xorl	%eax, %eax
	callq	_av7110_fw_cmd
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	cmpl	$0, 8(%r14)
	movl	$0, %eax
	jne	LBB0_3
## %bb.2:
	movq	(%r14), %rax
	movq	_DMX_PES_VIDEO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	_DMX_PES_AUDIO@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	movq	_DMX_PES_TELETEXT@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %ecx
	movq	_DMX_PES_PCR@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rdi
	movl	(%rax,%rdi,4), %r9d
	movq	%r14, %rdi
	xorl	%r8d, %r8d
	callq	_ChangePIDs
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
LBB0_4:
	movq	_COMTYPE_PIDFILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_Scan@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_av7110_fw_cmd                  ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"av7110:%p, \n"

	.comm	_COMTYPE_ENCODER,4,2            ## @COMTYPE_ENCODER
	.comm	_LoadVidCode,4,2                ## @LoadVidCode
	.comm	_DMX_PES_VIDEO,8,3              ## @DMX_PES_VIDEO
	.comm	_DMX_PES_AUDIO,8,3              ## @DMX_PES_AUDIO
	.comm	_DMX_PES_TELETEXT,8,3           ## @DMX_PES_TELETEXT
	.comm	_DMX_PES_PCR,8,3                ## @DMX_PES_PCR
	.comm	_COMTYPE_PIDFILTER,4,2          ## @COMTYPE_PIDFILTER
	.comm	_Scan,4,2                       ## @Scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av7110_set_vidmode             ; -- Begin function av7110_set_vidmode
	.p2align	2
_av7110_set_vidmode:                    ; @av7110_set_vidmode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #2
	mov	x2, x19
	bl	_dprintk
Lloh2:
	adrp	x8, _COMTYPE_ENCODER@GOTPAGE
Lloh3:
	ldr	x8, [x8, _COMTYPE_ENCODER@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
Lloh5:
	adrp	x8, _LoadVidCode@GOTPAGE
Lloh6:
	ldr	x8, [x8, _LoadVidCode@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	str	x20, [sp]
	mov	x0, x19
	mov	w3, #1
	bl	_av7110_fw_cmd
	cbnz	w0, LBB0_4
; %bb.1:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_3
; %bb.2:
	mov	w0, #0
	b	LBB0_4
LBB0_3:
	ldr	x8, [x19]
Lloh8:
	adrp	x9, _DMX_PES_VIDEO@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DMX_PES_VIDEO@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	ldr	w1, [x8, x9, lsl #2]
Lloh11:
	adrp	x9, _DMX_PES_AUDIO@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DMX_PES_AUDIO@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	ldr	w2, [x8, x9, lsl #2]
Lloh14:
	adrp	x9, _DMX_PES_TELETEXT@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DMX_PES_TELETEXT@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	ldr	w3, [x8, x9, lsl #2]
Lloh17:
	adrp	x9, _DMX_PES_PCR@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DMX_PES_PCR@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	ldr	w5, [x8, x9, lsl #2]
	mov	x0, x19
	mov	w4, #0
	bl	_ChangePIDs
	cbz	w0, LBB0_5
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
LBB0_5:
Lloh20:
	adrp	x8, _COMTYPE_PIDFILTER@GOTPAGE
Lloh21:
	ldr	x8, [x8, _COMTYPE_PIDFILTER@GOTPAGEOFF]
Lloh22:
	adrp	x9, _Scan@GOTPAGE
Lloh23:
	ldr	x9, [x9, _Scan@GOTPAGEOFF]
Lloh24:
	ldr	w1, [x8]
Lloh25:
	ldr	w2, [x9]
	mov	x0, x19
	mov	w3, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_av7110_fw_cmd
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh24
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"av7110:%p, \n"

	.comm	_COMTYPE_ENCODER,4,2            ; @COMTYPE_ENCODER
	.comm	_LoadVidCode,4,2                ; @LoadVidCode
	.comm	_DMX_PES_VIDEO,8,3              ; @DMX_PES_VIDEO
	.comm	_DMX_PES_AUDIO,8,3              ; @DMX_PES_AUDIO
	.comm	_DMX_PES_TELETEXT,8,3           ; @DMX_PES_TELETEXT
	.comm	_DMX_PES_PCR,8,3                ; @DMX_PES_PCR
	.comm	_COMTYPE_PIDFILTER,4,2          ; @COMTYPE_PIDFILTER
	.comm	_Scan,4,2                       ; @Scan
.subsections_via_symbols
