	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tw686x_querystd
_tw686x_querystd:                       ## @tw686x_querystd
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	callq	_video_drvdata
	movq	%rax, %rbx
	movq	16(%rax), %r15
	leaq	8(%rax), %rdi
	callq	_vb2_is_streaming
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	jmp	LBB0_8
LBB0_2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_SDT@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r15, %rdi
	callq	_reg_read
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r15, %rdi
	movl	$7, %edx
	callq	_reg_write
	movq	_SDT_EN@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r15, %rdi
	movl	$255, %edx
	callq	_reg_write
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	$500, %edi                      ## imm = 0x1F4
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	addq	%r14, %r12
	movq	%r12, %rdi
	callq	_time_is_after_jiffies
	xorl	%r13d, %r13d
	movl	$0, %r14d
	testq	%rax, %rax
	je	LBB0_6
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	_SDT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r15, %rdi
	callq	_reg_read
	movl	%eax, %r14d
	movl	$7, %edi
	callq	_BIT
	testl	%r14d, %eax
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$100, %edi
	callq	_msleep
	movq	%r12, %rdi
	callq	_time_is_after_jiffies
	testq	%rax, %rax
	jne	LBB0_4
LBB0_6:
	movq	_SDT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rbx), %rcx
	movl	(%rax,%rcx,4), %esi
	movq	%r15, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_reg_write
	movl	$7, %edi
	callq	_BIT
	testl	%r14d, %eax
	jne	LBB0_8
## %bb.7:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	$0, (%rax)
LBB0_8:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_SDT,8,3                        ## @SDT
	.comm	_SDT_EN,8,3                     ## @SDT_EN
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_V4L2_STD_NTSC_443,4,2          ## @V4L2_STD_NTSC_443
	.comm	_V4L2_STD_PAL_M,4,2             ## @V4L2_STD_PAL_M
	.comm	_V4L2_STD_PAL_60,4,2            ## @V4L2_STD_PAL_60
	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.comm	_V4L2_STD_PAL_Nc,4,2            ## @V4L2_STD_PAL_Nc
	.comm	_V4L2_STD_SECAM,4,2             ## @V4L2_STD_SECAM
	.no_dead_strip	_tw686x_querystd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tw686x_querystd
_tw686x_querystd:                       ; @tw686x_querystd
	.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	x19, x2
	bl	_video_drvdata
	mov	x21, x0
	ldr	x20, [x0, #16]
	add	x0, x0, #8
	bl	_vb2_is_streaming
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_2:
Lloh3:
	adrp	x25, _SDT@GOTPAGE
Lloh4:
	ldr	x25, [x25, _SDT@GOTPAGEOFF]
	ldr	x8, [x25]
	ldr	x9, [x21]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_reg_read
	mov	x22, x0
	ldr	x8, [x25]
	ldr	x9, [x21]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	mov	w2, #7
	bl	_reg_write
Lloh5:
	adrp	x8, _SDT_EN@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SDT_EN@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x21]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	mov	w2, #255
	bl	_reg_write
Lloh8:
	adrp	x8, _jiffies@GOTPAGE
Lloh9:
	ldr	x8, [x8, _jiffies@GOTPAGEOFF]
Lloh10:
	ldr	x23, [x8]
	mov	w0, #500
	bl	_msecs_to_jiffies
	add	x24, x0, x23
	mov	x0, x24
	bl	_time_is_after_jiffies
	cbz	x0, LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x25]
	ldr	x9, [x21]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	bl	_reg_read
	mov	x23, x0
	mov	w0, #7
	bl	_BIT
	tst	w0, w23
	b.eq	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #100
	bl	_msleep
	mov	x0, x24
	bl	_time_is_after_jiffies
	cbnz	x0, LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
	ldr	x8, [x25]
	ldr	x9, [x21]
	ldr	w1, [x8, x9, lsl #2]
	mov	x0, x20
	mov	x2, x22
	bl	_reg_write
	mov	w0, #7
	bl	_BIT
	tst	w0, w23
	b.eq	LBB0_8
; %bb.7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
	mov	w0, #0
	str	wzr, [x19]
LBB0_9:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_SDT,8,3                        ; @SDT
	.comm	_SDT_EN,8,3                     ; @SDT_EN
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_V4L2_STD_NTSC_443,4,2          ; @V4L2_STD_NTSC_443
	.comm	_V4L2_STD_PAL_M,4,2             ; @V4L2_STD_PAL_M
	.comm	_V4L2_STD_PAL_60,4,2            ; @V4L2_STD_PAL_60
	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.comm	_V4L2_STD_PAL_Nc,4,2            ; @V4L2_STD_PAL_Nc
	.comm	_V4L2_STD_SECAM,4,2             ; @V4L2_STD_SECAM
	.no_dead_strip	_tw686x_querystd
.subsections_via_symbols
