	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vpif_s_std
_vpif_s_std:                            ## @vpif_s_std
	.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	_DM646X_V4L2_STD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, (%rdx)
	je	LBB0_1
## %bb.3:
	movq	(%rsi), %r12
	movq	24(%r12), %r13
	movq	_VPIF_VIDEO_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	leaq	(%rax,%rax,2), %rbx
	cmpq	$0, 16(%r13,%rbx,8)
	je	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_vpif_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movq	%rdx, %r15
	leaq	(,%rbx,8), %r14
	addq	%r13, %r14
	movq	%r14, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_ERESTARTSYS@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movl	(%r15), %eax
	movl	%eax, 16(%r12)
	movq	%r12, %rdi
	callq	_vpif_get_std_info
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdi
	callq	_vpif_err
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movl	8(%r12), %eax
	imull	12(%r12), %eax
	addl	%eax, %eax
	movq	_config_params@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%r12), %rdx
	cmpl	(%rcx,%rdx,4), %eax
	jle	LBB0_11
## %bb.10:
	leaq	L_.str.2(%rip), %rdi
	callq	_vpif_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_16
LBB0_11:
	movl	4(%r13,%rbx,8), %eax
	movl	%eax, 8(%r13,%rbx,8)
	movq	%r12, %rdi
	callq	_vpif_config_format
	movq	_video@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_std_output@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r15), %r8d
	movq	_vpif_obj@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_v4l2_device_call_until_err
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	movq	_core@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_s_std@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%r15), %r8d
	movq	_vpif_obj@GOTPCREL(%rip), %rdi
	movl	$1, %esi
	callq	_v4l2_device_call_until_err
	movl	%eax, %ebx
	testl	%eax, %eax
	jns	LBB0_16
## %bb.14:
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_15
LBB0_12:
	movl	%eax, %ebx
	leaq	L_.str.3(%rip), %rdi
LBB0_15:
	callq	_vpif_err
LBB0_16:
	movq	%r14, %rdi
	callq	_mutex_unlock
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ## @VPIF_VIDEO_INDEX
	.comm	_DM646X_V4L2_STD,4,2            ## @DM646X_V4L2_STD
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"streaming in progress\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_ERESTARTSYS,4,2                ## @ERESTARTSYS
L_.str.1:                               ## @.str.1
	.asciz	"Error getting the standard info\n"

	.comm	_config_params,8,3              ## @config_params
L_.str.2:                               ## @.str.2
	.asciz	"invalid std for this size\n"

	.comm	_vpif_obj,4,2                   ## @vpif_obj
	.comm	_video,4,2                      ## @video
	.comm	_s_std_output,4,2               ## @s_std_output
L_.str.3:                               ## @.str.3
	.asciz	"Failed to set output standard\n"

	.comm	_core,4,2                       ## @core
	.comm	_s_std,4,2                      ## @s_std
L_.str.4:                               ## @.str.4
	.asciz	"Failed to set standard for sub devices\n"

	.no_dead_strip	_vpif_s_std
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vpif_s_std
_vpif_s_std:                            ; @vpif_s_std
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x2]
Lloh0:
	adrp	x9, _DM646X_V4L2_STD@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DM646X_V4L2_STD@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.1:
	ldr	x21, [x1]
	ldr	x22, [x21, #24]
Lloh3:
	adrp	x8, _VPIF_VIDEO_INDEX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _VPIF_VIDEO_INDEX@GOTPAGEOFF]
Lloh5:
	ldr	x23, [x8]
	mov	w8, #24
	madd	x8, x23, x8, x22
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_3
; %bb.2:
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	bl	_vpif_err
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_3:
	mov	x20, x2
	mov	w8, #24
	madd	x19, x23, x8, x22
	mov	x0, x19
	bl	_mutex_lock_interruptible
	cbz	x0, LBB0_5
; %bb.4:
Lloh10:
	adrp	x8, _ERESTARTSYS@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ERESTARTSYS@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	ldr	w8, [x20]
	str	w8, [x21, #16]
	mov	x0, x21
	bl	_vpif_get_std_info
	cbz	x0, LBB0_10
; %bb.6:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_vpif_err
LBB0_7:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_9:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_10:
	ldp	w8, w9, [x21, #8]
Lloh16:
	adrp	x10, _config_params@GOTPAGE
Lloh17:
	ldr	x10, [x10, _config_params@GOTPAGEOFF]
	mul	w8, w8, w9
Lloh18:
	ldr	x9, [x10]
	ldr	x10, [x21]
	ldr	w9, [x9, x10, lsl #2]
	cmp	w9, w8, lsl #1
	b.ge	LBB0_12
; %bb.11:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_vpif_err
Lloh21:
	adrp	x8, _EINVAL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_17
LBB0_12:
	mov	w8, #24
	madd	x8, x23, x8, x22
	ldr	w9, [x8, #4]
	str	w9, [x8, #8]
	mov	x0, x21
	bl	_vpif_config_format
Lloh24:
	adrp	x8, _video@GOTPAGE
Lloh25:
	ldr	x8, [x8, _video@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
Lloh27:
	adrp	x8, _s_std_output@GOTPAGE
Lloh28:
	ldr	x8, [x8, _s_std_output@GOTPAGEOFF]
Lloh29:
	ldr	w3, [x8]
	ldr	w4, [x20]
Lloh30:
	adrp	x0, _vpif_obj@GOTPAGE
Lloh31:
	ldr	x0, [x0, _vpif_obj@GOTPAGEOFF]
	mov	w1, #1
	bl	_v4l2_device_call_until_err
	tbnz	w0, #31, LBB0_15
; %bb.13:
Lloh32:
	adrp	x8, _core@GOTPAGE
Lloh33:
	ldr	x8, [x8, _core@GOTPAGEOFF]
Lloh34:
	ldr	w2, [x8]
Lloh35:
	adrp	x8, _s_std@GOTPAGE
Lloh36:
	ldr	x8, [x8, _s_std@GOTPAGEOFF]
Lloh37:
	ldr	w3, [x8]
	ldr	w4, [x20]
Lloh38:
	adrp	x0, _vpif_obj@GOTPAGE
Lloh39:
	ldr	x0, [x0, _vpif_obj@GOTPAGEOFF]
	mov	w1, #1
	bl	_v4l2_device_call_until_err
	mov	x21, x0
	tbz	w0, #31, LBB0_17
; %bb.14:
Lloh40:
	adrp	x0, l_.str.4@PAGE
Lloh41:
	add	x0, x0, l_.str.4@PAGEOFF
	b	LBB0_16
LBB0_15:
	mov	x21, x0
Lloh42:
	adrp	x0, l_.str.3@PAGE
Lloh43:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_16:
	bl	_vpif_err
LBB0_17:
	mov	x0, x19
	bl	_mutex_unlock
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_VPIF_VIDEO_INDEX,8,3           ; @VPIF_VIDEO_INDEX
	.comm	_DM646X_V4L2_STD,4,2            ; @DM646X_V4L2_STD
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"streaming in progress\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_ERESTARTSYS,4,2                ; @ERESTARTSYS
l_.str.1:                               ; @.str.1
	.asciz	"Error getting the standard info\n"

	.comm	_config_params,8,3              ; @config_params
l_.str.2:                               ; @.str.2
	.asciz	"invalid std for this size\n"

	.comm	_vpif_obj,4,2                   ; @vpif_obj
	.comm	_video,4,2                      ; @video
	.comm	_s_std_output,4,2               ; @s_std_output
l_.str.3:                               ; @.str.3
	.asciz	"Failed to set output standard\n"

	.comm	_core,4,2                       ; @core
	.comm	_s_std,4,2                      ; @s_std
l_.str.4:                               ; @.str.4
	.asciz	"Failed to set standard for sub devices\n"

	.no_dead_strip	_vpif_s_std
.subsections_via_symbols
