	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ks0127_status
_ks0127_status:                         ## @ks0127_status
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	_V4L2_IN_ST_NO_SIGNAL@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%rdx, %rax
	testq	%rdx, %rdx
	jne	LBB0_2
## %bb.1:
	movq	_V4L2_STD_ALL@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %ebx
	movq	_KS_STAT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ks0127_read
	movl	%eax, %ecx
	shll	$26, %ecx
	sarl	$31, %ecx
	andl	%r12d, %ecx
	testb	$1, %al
	jne	LBB0_4
## %bb.3:
	movq	_V4L2_IN_ST_NO_COLOR@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	movq	_V4L2_STD_UNKNOWN@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	testq	%r15, %r15
	jne	LBB0_9
	jmp	LBB0_13
LBB0_4:
	testb	$8, %al
	jne	LBB0_5
## %bb.6:
	movq	_V4L2_STD_NTSC@GOTPCREL(%rip), %rdx
	jmp	LBB0_7
LBB0_5:
	movq	_V4L2_STD_PAL@GOTPCREL(%rip), %rdx
LBB0_7:
	andl	(%rdx), %ebx
	testq	%r15, %r15
	je	LBB0_13
LBB0_9:
	testb	$16, %al
	jne	LBB0_10
## %bb.11:
	movq	_V4L2_STD_625_50@GOTPCREL(%rip), %rax
	jmp	LBB0_12
LBB0_10:
	movq	_V4L2_STD_525_60@GOTPCREL(%rip), %rax
LBB0_12:
	andl	(%rax), %ebx
	movl	%ebx, (%r15)
LBB0_13:
	testq	%r14, %r14
	je	LBB0_15
## %bb.14:
	movl	%ecx, (%r14)
LBB0_15:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ## @V4L2_IN_ST_NO_SIGNAL
	.comm	_V4L2_STD_ALL,4,2               ## @V4L2_STD_ALL
	.comm	_KS_STAT,4,2                    ## @KS_STAT
	.comm	_V4L2_IN_ST_NO_COLOR,4,2        ## @V4L2_IN_ST_NO_COLOR
	.comm	_V4L2_STD_UNKNOWN,4,2           ## @V4L2_STD_UNKNOWN
	.comm	_V4L2_STD_PAL,4,2               ## @V4L2_STD_PAL
	.comm	_V4L2_STD_NTSC,4,2              ## @V4L2_STD_NTSC
	.comm	_V4L2_STD_525_60,4,2            ## @V4L2_STD_525_60
	.comm	_V4L2_STD_625_50,4,2            ## @V4L2_STD_625_50
	.no_dead_strip	_ks0127_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ks0127_status
_ks0127_status:                         ; @ks0127_status
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x2
	mov	x19, x1
Lloh0:
	adrp	x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_IN_ST_NO_SIGNAL@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
Lloh3:
	adrp	x8, _V4L2_STD_ALL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _V4L2_STD_ALL@GOTPAGEOFF]
	cmp	x2, #0
	csel	x8, x8, x2, eq
	ldr	w21, [x8]
Lloh5:
	adrp	x8, _KS_STAT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _KS_STAT@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_ks0127_read
	lsl	w8, w0, #26
	and	w8, w22, w8, asr #31
	tbnz	w0, #0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x9, _V4L2_IN_ST_NO_COLOR@GOTPAGE
Lloh9:
	ldr	x9, [x9, _V4L2_IN_ST_NO_COLOR@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh11:
	adrp	x9, _V4L2_STD_UNKNOWN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _V4L2_STD_UNKNOWN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	cbnz	x20, LBB0_6
	b	LBB0_7
LBB0_2:
	tbnz	w0, #3, LBB0_4
; %bb.3:
Lloh14:
	adrp	x9, _V4L2_STD_NTSC@GOTPAGE
Lloh15:
	ldr	x9, [x9, _V4L2_STD_NTSC@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh16:
	adrp	x9, _V4L2_STD_PAL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _V4L2_STD_PAL@GOTPAGEOFF]
LBB0_5:
	ldr	w9, [x9]
	and	w9, w9, w21
	cbz	x20, LBB0_7
LBB0_6:
Lloh18:
	adrp	x10, _V4L2_STD_625_50@GOTPAGE
Lloh19:
	ldr	x10, [x10, _V4L2_STD_625_50@GOTPAGEOFF]
Lloh20:
	adrp	x11, _V4L2_STD_525_60@GOTPAGE
Lloh21:
	ldr	x11, [x11, _V4L2_STD_525_60@GOTPAGEOFF]
	tst	w0, #0x10
	csel	x10, x10, x11, eq
	ldr	w10, [x10]
	and	w9, w10, w9
	str	w9, [x20]
LBB0_7:
	cbz	x19, LBB0_9
; %bb.8:
	str	w8, [x19]
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_IN_ST_NO_SIGNAL,4,2       ; @V4L2_IN_ST_NO_SIGNAL
	.comm	_V4L2_STD_ALL,4,2               ; @V4L2_STD_ALL
	.comm	_KS_STAT,4,2                    ; @KS_STAT
	.comm	_V4L2_IN_ST_NO_COLOR,4,2        ; @V4L2_IN_ST_NO_COLOR
	.comm	_V4L2_STD_UNKNOWN,4,2           ; @V4L2_STD_UNKNOWN
	.comm	_V4L2_STD_PAL,4,2               ; @V4L2_STD_PAL
	.comm	_V4L2_STD_NTSC,4,2              ; @V4L2_STD_NTSC
	.comm	_V4L2_STD_525_60,4,2            ; @V4L2_STD_525_60
	.comm	_V4L2_STD_625_50,4,2            ; @V4L2_STD_625_50
	.no_dead_strip	_ks0127_status
.subsections_via_symbols
