	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pd_video_checkmode
_pd_video_checkmode:                    ## @pd_video_checkmode
	.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	%rdi, %r12
	movq	_TASK_INTERRUPTIBLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_set_current_state
	movq	_HZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	callq	_schedule_timeout
	movl	16(%r12), %edi
	cmpq	$0, 8(%r12)
	jne	LBB0_1
## %bb.2:
	movq	_BULK_ALTERNATE_IFACE@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_ISO_3K_BULK_ALTERNATE_IFACE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edx
	xorl	%esi, %esi
	callq	_usb_set_interface
	testl	%eax, %eax
	js	LBB0_5
## %bb.4:
	movq	_TLG_MODE_ANALOG_TV@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_set_tuner_mode
	movl	%eax, %ebx
	movq	_SGNL_SRC_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLG_SIG_SRC_ANTENNA@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %r14
	movq	%r12, %rdi
	movq	%r14, %rcx
	callq	_send_set_req
	movl	%eax, %r15d
	orl	%ebx, %r15d
	movq	_VIDEO_STD_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLG_TUNE_VSTD_PAL_D@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rcx
	callq	_send_set_req
	movl	%eax, %r13d
	movq	_VIDEO_STREAM_FMT_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLG_TUNER_VID_FORMAT_YUV@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rcx
	movq	%r14, %rbx
	callq	_send_set_req
	movl	%eax, %r14d
	orl	%r13d, %r14d
	orl	%r15d, %r14d
	movq	_VIDEO_ROSOLU_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLG_TUNE_VID_RES_720@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%rbx, %rcx
	callq	_send_set_req
	movl	%eax, %r15d
	movq	_TUNE_FREQ_SELECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TUNER_FREQ_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%rbx, %rcx
	movq	%rbx, %r13
	callq	_send_set_req
	movl	%eax, %ebx
	orl	%r15d, %ebx
	movq	_VBI_DATA_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	movq	%r13, %rcx
	callq	_send_set_req
	movl	%eax, %r15d
	orl	%ebx, %r15d
	orl	%r14d, %r15d
	movl	(%r12), %edi
	callq	_get_audio_std
	movq	_TUNER_AUD_ANA_STD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r12, %rdi
	movl	%eax, %edx
	movq	%r13, %rcx
	callq	_send_set_req
	movl	%eax, %r14d
	movq	_TUNER_AUD_MODE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_TLG_TUNE_TVAUDIO_MODE_STEREO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rcx
	callq	_send_set_req
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movq	_AUDIO_SAMPLE_RATE_SEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_ATV_AUDIO_RATE_48K@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rcx
	callq	_send_set_req
	orl	%ebx, %eax
	orl	%r15d, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TASK_INTERRUPTIBLE,4,2         ## @TASK_INTERRUPTIBLE
	.comm	_HZ,4,2                         ## @HZ
	.comm	_ISO_3K_BULK_ALTERNATE_IFACE,4,2 ## @ISO_3K_BULK_ALTERNATE_IFACE
	.comm	_BULK_ALTERNATE_IFACE,4,2       ## @BULK_ALTERNATE_IFACE
	.comm	_TLG_MODE_ANALOG_TV,4,2         ## @TLG_MODE_ANALOG_TV
	.comm	_SGNL_SRC_SEL,4,2               ## @SGNL_SRC_SEL
	.comm	_TLG_SIG_SRC_ANTENNA,4,2        ## @TLG_SIG_SRC_ANTENNA
	.comm	_VIDEO_STD_SEL,4,2              ## @VIDEO_STD_SEL
	.comm	_TLG_TUNE_VSTD_PAL_D,4,2        ## @TLG_TUNE_VSTD_PAL_D
	.comm	_VIDEO_STREAM_FMT_SEL,4,2       ## @VIDEO_STREAM_FMT_SEL
	.comm	_TLG_TUNER_VID_FORMAT_YUV,4,2   ## @TLG_TUNER_VID_FORMAT_YUV
	.comm	_VIDEO_ROSOLU_SEL,4,2           ## @VIDEO_ROSOLU_SEL
	.comm	_TLG_TUNE_VID_RES_720,4,2       ## @TLG_TUNE_VID_RES_720
	.comm	_TUNE_FREQ_SELECT,4,2           ## @TUNE_FREQ_SELECT
	.comm	_TUNER_FREQ_MIN,4,2             ## @TUNER_FREQ_MIN
	.comm	_VBI_DATA_SEL,4,2               ## @VBI_DATA_SEL
	.comm	_TUNER_AUD_ANA_STD,4,2          ## @TUNER_AUD_ANA_STD
	.comm	_TUNER_AUD_MODE,4,2             ## @TUNER_AUD_MODE
	.comm	_TLG_TUNE_TVAUDIO_MODE_STEREO,4,2 ## @TLG_TUNE_TVAUDIO_MODE_STEREO
	.comm	_AUDIO_SAMPLE_RATE_SEL,4,2      ## @AUDIO_SAMPLE_RATE_SEL
	.comm	_ATV_AUDIO_RATE_48K,4,2         ## @ATV_AUDIO_RATE_48K
	.no_dead_strip	_pd_video_checkmode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pd_video_checkmode
_pd_video_checkmode:                    ; @pd_video_checkmode
	.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	x19, x0
Lloh0:
	adrp	x8, _TASK_INTERRUPTIBLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TASK_INTERRUPTIBLE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_set_current_state
Lloh3:
	adrp	x8, _HZ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w0, w8, #1
	bl	_schedule_timeout
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x8, _ISO_3K_BULK_ALTERNATE_IFACE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ISO_3K_BULK_ALTERNATE_IFACE@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh8:
	adrp	x10, _BULK_ALTERNATE_IFACE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _BULK_ALTERNATE_IFACE@GOTPAGEOFF]
	cmp	x9, #0
	csel	x8, x10, x8, eq
	ldr	w2, [x8]
	mov	w1, #0
	bl	_usb_set_interface
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh10:
	adrp	x8, _TLG_MODE_ANALOG_TV@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TLG_MODE_ANALOG_TV@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_set_tuner_mode
	mov	x20, x0
Lloh13:
	adrp	x8, _SGNL_SRC_SEL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SGNL_SRC_SEL@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
Lloh16:
	adrp	x8, _TLG_SIG_SRC_ANTENNA@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TLG_SIG_SRC_ANTENNA@GOTPAGEOFF]
Lloh18:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	orr	w20, w0, w20
Lloh19:
	adrp	x8, _VIDEO_STD_SEL@GOTPAGE
Lloh20:
	ldr	x8, [x8, _VIDEO_STD_SEL@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
Lloh22:
	adrp	x8, _TLG_TUNE_VSTD_PAL_D@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TLG_TUNE_VSTD_PAL_D@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	orr	w20, w20, w0
Lloh25:
	adrp	x8, _VIDEO_STREAM_FMT_SEL@GOTPAGE
Lloh26:
	ldr	x8, [x8, _VIDEO_STREAM_FMT_SEL@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x8, _TLG_TUNER_VID_FORMAT_YUV@GOTPAGE
Lloh29:
	ldr	x8, [x8, _TLG_TUNER_VID_FORMAT_YUV@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	orr	w20, w20, w0
Lloh31:
	adrp	x8, _VIDEO_ROSOLU_SEL@GOTPAGE
Lloh32:
	ldr	x8, [x8, _VIDEO_ROSOLU_SEL@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
Lloh34:
	adrp	x8, _TLG_TUNE_VID_RES_720@GOTPAGE
Lloh35:
	ldr	x8, [x8, _TLG_TUNE_VID_RES_720@GOTPAGEOFF]
Lloh36:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	orr	w20, w20, w0
Lloh37:
	adrp	x8, _TUNE_FREQ_SELECT@GOTPAGE
Lloh38:
	ldr	x8, [x8, _TUNE_FREQ_SELECT@GOTPAGEOFF]
Lloh39:
	ldr	w1, [x8]
Lloh40:
	adrp	x8, _TUNER_FREQ_MIN@GOTPAGE
Lloh41:
	ldr	x8, [x8, _TUNER_FREQ_MIN@GOTPAGEOFF]
Lloh42:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	orr	w20, w20, w0
Lloh43:
	adrp	x8, _VBI_DATA_SEL@GOTPAGE
Lloh44:
	ldr	x8, [x8, _VBI_DATA_SEL@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	mov	w2, #1
	bl	_send_set_req
	orr	w20, w20, w0
	ldr	w0, [x19]
	bl	_get_audio_std
	mov	x2, x0
Lloh46:
	adrp	x8, _TUNER_AUD_ANA_STD@GOTPAGE
Lloh47:
	ldr	x8, [x8, _TUNER_AUD_ANA_STD@GOTPAGEOFF]
Lloh48:
	ldr	w1, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	orr	w20, w20, w0
Lloh49:
	adrp	x8, _TUNER_AUD_MODE@GOTPAGE
Lloh50:
	ldr	x8, [x8, _TUNER_AUD_MODE@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
Lloh52:
	adrp	x8, _TLG_TUNE_TVAUDIO_MODE_STEREO@GOTPAGE
Lloh53:
	ldr	x8, [x8, _TLG_TUNE_TVAUDIO_MODE_STEREO@GOTPAGEOFF]
Lloh54:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	orr	w20, w20, w0
Lloh55:
	adrp	x8, _AUDIO_SAMPLE_RATE_SEL@GOTPAGE
Lloh56:
	ldr	x8, [x8, _AUDIO_SAMPLE_RATE_SEL@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
Lloh58:
	adrp	x8, _ATV_AUDIO_RATE_48K@GOTPAGE
Lloh59:
	ldr	x8, [x8, _ATV_AUDIO_RATE_48K@GOTPAGEOFF]
Lloh60:
	ldr	w2, [x8]
	add	x3, sp, #12
	mov	x0, x19
	bl	_send_set_req
	orr	w0, w20, w0
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_TASK_INTERRUPTIBLE,4,2         ; @TASK_INTERRUPTIBLE
	.comm	_HZ,4,2                         ; @HZ
	.comm	_ISO_3K_BULK_ALTERNATE_IFACE,4,2 ; @ISO_3K_BULK_ALTERNATE_IFACE
	.comm	_BULK_ALTERNATE_IFACE,4,2       ; @BULK_ALTERNATE_IFACE
	.comm	_TLG_MODE_ANALOG_TV,4,2         ; @TLG_MODE_ANALOG_TV
	.comm	_SGNL_SRC_SEL,4,2               ; @SGNL_SRC_SEL
	.comm	_TLG_SIG_SRC_ANTENNA,4,2        ; @TLG_SIG_SRC_ANTENNA
	.comm	_VIDEO_STD_SEL,4,2              ; @VIDEO_STD_SEL
	.comm	_TLG_TUNE_VSTD_PAL_D,4,2        ; @TLG_TUNE_VSTD_PAL_D
	.comm	_VIDEO_STREAM_FMT_SEL,4,2       ; @VIDEO_STREAM_FMT_SEL
	.comm	_TLG_TUNER_VID_FORMAT_YUV,4,2   ; @TLG_TUNER_VID_FORMAT_YUV
	.comm	_VIDEO_ROSOLU_SEL,4,2           ; @VIDEO_ROSOLU_SEL
	.comm	_TLG_TUNE_VID_RES_720,4,2       ; @TLG_TUNE_VID_RES_720
	.comm	_TUNE_FREQ_SELECT,4,2           ; @TUNE_FREQ_SELECT
	.comm	_TUNER_FREQ_MIN,4,2             ; @TUNER_FREQ_MIN
	.comm	_VBI_DATA_SEL,4,2               ; @VBI_DATA_SEL
	.comm	_TUNER_AUD_ANA_STD,4,2          ; @TUNER_AUD_ANA_STD
	.comm	_TUNER_AUD_MODE,4,2             ; @TUNER_AUD_MODE
	.comm	_TLG_TUNE_TVAUDIO_MODE_STEREO,4,2 ; @TLG_TUNE_TVAUDIO_MODE_STEREO
	.comm	_AUDIO_SAMPLE_RATE_SEL,4,2      ; @AUDIO_SAMPLE_RATE_SEL
	.comm	_ATV_AUDIO_RATE_48K,4,2         ; @ATV_AUDIO_RATE_48K
	.no_dead_strip	_pd_video_checkmode
.subsections_via_symbols
