	.file	"extr_pd-video.c_pd_video_checkmode.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	pd_video_checkmode, @function
pd_video_checkmode:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	sub	rsp, 16
	.cfi_def_cfa_offset 48
	mov	edi, DWORD PTR TASK_INTERRUPTIBLE[rip]
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 8[rsp], rax
	xor	eax, eax
	call	set_current_state@PLT
	mov	eax, DWORD PTR HZ[rip]
	mov	edi, eax
	shr	edi, 31
	add	edi, eax
	sar	edi
	call	schedule_timeout@PLT
	cmp	QWORD PTR 8[rbp], 0
	mov	edx, DWORD PTR BULK_ALTERNATE_IFACE[rip]
	je	.L3
	mov	edx, DWORD PTR ISO_3K_BULK_ALTERNATE_IFACE[rip]
.L3:
	mov	edi, DWORD PTR 16[rbp]
	xor	esi, esi
	call	usb_set_interface@PLT
	test	eax, eax
	js	.L1
	mov	esi, DWORD PTR TLG_MODE_ANALOG_TV[rip]
	mov	rdi, rbp
	lea	r12, 4[rsp]
	call	set_tuner_mode@PLT
	mov	edx, DWORD PTR TLG_SIG_SRC_ANTENNA[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR SGNL_SRC_SEL[rip]
	mov	ebx, eax
	call	send_set_req@PLT
	mov	edx, DWORD PTR TLG_TUNE_VSTD_PAL_D[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR VIDEO_STD_SEL[rip]
	or	ebx, eax
	call	send_set_req@PLT
	mov	edx, DWORD PTR TLG_TUNER_VID_FORMAT_YUV[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR VIDEO_STREAM_FMT_SEL[rip]
	or	ebx, eax
	call	send_set_req@PLT
	mov	edx, DWORD PTR TLG_TUNE_VID_RES_720[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR VIDEO_ROSOLU_SEL[rip]
	or	ebx, eax
	call	send_set_req@PLT
	mov	edx, DWORD PTR TUNER_FREQ_MIN[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR TUNE_FREQ_SELECT[rip]
	or	ebx, eax
	call	send_set_req@PLT
	mov	rcx, r12
	mov	edx, 1
	mov	rdi, rbp
	mov	esi, DWORD PTR VBI_DATA_SEL[rip]
	or	ebx, eax
	call	send_set_req@PLT
	mov	edi, DWORD PTR 0[rbp]
	or	ebx, eax
	call	get_audio_std@PLT
	mov	esi, DWORD PTR TUNER_AUD_ANA_STD[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	edx, eax
	call	send_set_req@PLT
	mov	edx, DWORD PTR TLG_TUNE_TVAUDIO_MODE_STEREO[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR TUNER_AUD_MODE[rip]
	or	ebx, eax
	call	send_set_req@PLT
	mov	edx, DWORD PTR ATV_AUDIO_RATE_48K[rip]
	mov	rcx, r12
	mov	rdi, rbp
	mov	esi, DWORD PTR AUDIO_SAMPLE_RATE_SEL[rip]
	or	ebx, eax
	call	send_set_req@PLT
	or	eax, ebx
.L4:
	endbr64
.L1:
	mov	rcx, QWORD PTR 8[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L8
	add	rsp, 16
	.cfi_remember_state
	.cfi_def_cfa_offset 32
	pop	rbx
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	pd_video_checkmode, .-pd_video_checkmode
	.comm	VIDEO_STREAM_FMT_SEL,4,4
	.comm	VIDEO_STD_SEL,4,4
	.comm	VIDEO_ROSOLU_SEL,4,4
	.comm	VBI_DATA_SEL,4,4
	.comm	TUNE_FREQ_SELECT,4,4
	.comm	TUNER_FREQ_MIN,4,4
	.comm	TUNER_AUD_MODE,4,4
	.comm	TUNER_AUD_ANA_STD,4,4
	.comm	TLG_TUNE_VSTD_PAL_D,4,4
	.comm	TLG_TUNE_VID_RES_720,4,4
	.comm	TLG_TUNE_TVAUDIO_MODE_STEREO,4,4
	.comm	TLG_TUNER_VID_FORMAT_YUV,4,4
	.comm	TLG_SIG_SRC_ANTENNA,4,4
	.comm	TLG_MODE_ANALOG_TV,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	SGNL_SRC_SEL,4,4
	.comm	ISO_3K_BULK_ALTERNATE_IFACE,4,4
	.comm	HZ,4,4
	.comm	BULK_ALTERNATE_IFACE,4,4
	.comm	AUDIO_SAMPLE_RATE_SEL,4,4
	.comm	ATV_AUDIO_RATE_48K,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_pd-video.c_pd_video_checkmode.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	pd_video_checkmode, %function
pd_video_checkmode:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, lr}
	mov	r5, r0
	ldr	r3, .L9
	ldr	r2, .L9+4
	sub	sp, sp, #12
	ldr	r0, [r3]
	ldr	r2, [r2]
	str	r2, [sp, #4]
	mov	r2,#0
	bl	set_current_state
	ldr	r3, .L9+8
	ldr	r0, [r3]
	add	r0, r0, r0, lsr #31
	asr	r0, r0, #1
	bl	schedule_timeout
	ldr	r3, [r5, #4]
	mov	r1, #0
	cmp	r3, #0
	ldrne	r3, .L9+12
	ldreq	r3, .L9+16
	ldr	r0, [r5, #8]
	ldr	r2, [r3]
	bl	usb_set_interface
	cmp	r0, #0
	blt	.L1
	ldr	r3, .L9+20
	mov	r0, r5
	ldr	r1, [r3]
	bl	set_tuner_mode
	ldr	r3, .L9+24
	ldr	r2, .L9+28
	ldr	r1, [r3]
	mov	r4, r0
	mov	r3, sp
	ldr	r2, [r2]
	mov	r0, r5
	bl	send_set_req
	mov	ip, r0
	ldr	r2, .L9+32
	ldr	r1, .L9+36
	mov	r3, sp
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r5
	orr	r4, r4, ip
	bl	send_set_req
	mov	ip, r0
	ldr	r2, .L9+40
	ldr	r1, .L9+44
	mov	r3, sp
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r5
	orr	r4, r4, ip
	bl	send_set_req
	mov	ip, r0
	ldr	r2, .L9+48
	ldr	r1, .L9+52
	mov	r3, sp
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r5
	orr	r4, r4, ip
	bl	send_set_req
	mov	ip, r0
	ldr	r2, .L9+56
	ldr	r1, .L9+60
	mov	r3, sp
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r5
	orr	r4, r4, ip
	bl	send_set_req
	mov	ip, r0
	ldr	r2, .L9+64
	mov	r3, sp
	ldr	r1, [r2]
	mov	r0, r5
	mov	r2, #1
	orr	r4, r4, ip
	bl	send_set_req
	mov	r3, r0
	ldr	r0, [r5]
	orr	r4, r4, r3
	bl	get_audio_std
	ldr	r1, .L9+68
	mov	r2, r0
	mov	r3, sp
	ldr	r1, [r1]
	mov	r0, r5
	bl	send_set_req
	mov	ip, r0
	ldr	r2, .L9+72
	ldr	r1, .L9+76
	mov	r3, sp
	ldr	r2, [r2]
	ldr	r1, [r1]
	mov	r0, r5
	orr	r4, r4, ip
	bl	send_set_req
	mov	ip, r0
	ldr	r2, .L9+80
	ldr	r1, .L9+84
	mov	r3, sp
	mov	r0, r5
	ldr	r2, [r2]
	ldr	r1, [r1]
	orr	r4, r4, ip
	bl	send_set_req
	orr	r0, r4, r0
.L4:
.L1:
	ldr	r3, .L9+4
	ldr	r2, [r3]
	ldr	r3, [sp, #4]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L8
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, pc}
.L8:
	bl	__stack_chk_fail
.L10:
	.align	2
.L9:
	.word	TASK_INTERRUPTIBLE
	.word	.LC0
	.word	HZ
	.word	ISO_3K_BULK_ALTERNATE_IFACE
	.word	BULK_ALTERNATE_IFACE
	.word	TLG_MODE_ANALOG_TV
	.word	SGNL_SRC_SEL
	.word	TLG_SIG_SRC_ANTENNA
	.word	TLG_TUNE_VSTD_PAL_D
	.word	VIDEO_STD_SEL
	.word	TLG_TUNER_VID_FORMAT_YUV
	.word	VIDEO_STREAM_FMT_SEL
	.word	TLG_TUNE_VID_RES_720
	.word	VIDEO_ROSOLU_SEL
	.word	TUNER_FREQ_MIN
	.word	TUNE_FREQ_SELECT
	.word	VBI_DATA_SEL
	.word	TUNER_AUD_ANA_STD
	.word	TLG_TUNE_TVAUDIO_MODE_STEREO
	.word	TUNER_AUD_MODE
	.word	ATV_AUDIO_RATE_48K
	.word	AUDIO_SAMPLE_RATE_SEL
	.size	pd_video_checkmode, .-pd_video_checkmode
	.comm	VIDEO_STREAM_FMT_SEL,4,4
	.comm	VIDEO_STD_SEL,4,4
	.comm	VIDEO_ROSOLU_SEL,4,4
	.comm	VBI_DATA_SEL,4,4
	.comm	TUNE_FREQ_SELECT,4,4
	.comm	TUNER_FREQ_MIN,4,4
	.comm	TUNER_AUD_MODE,4,4
	.comm	TUNER_AUD_ANA_STD,4,4
	.comm	TLG_TUNE_VSTD_PAL_D,4,4
	.comm	TLG_TUNE_VID_RES_720,4,4
	.comm	TLG_TUNE_TVAUDIO_MODE_STEREO,4,4
	.comm	TLG_TUNER_VID_FORMAT_YUV,4,4
	.comm	TLG_SIG_SRC_ANTENNA,4,4
	.comm	TLG_MODE_ANALOG_TV,4,4
	.comm	TASK_INTERRUPTIBLE,4,4
	.comm	SGNL_SRC_SEL,4,4
	.comm	ISO_3K_BULK_ALTERNATE_IFACE,4,4
	.comm	HZ,4,4
	.comm	BULK_ALTERNATE_IFACE,4,4
	.comm	AUDIO_SAMPLE_RATE_SEL,4,4
	.comm	ATV_AUDIO_RATE_48K,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
