	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function venc_try_fmt_common
_venc_try_fmt_common:                   ## @venc_try_fmt_common
	.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	%rsi, %rbx
	movq	%rdi, %r15
	movq	56(%rsi), %r12
	movl	16(%r12), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	52(%rbx), %edi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	movl	(%rbx), %edx
	movl	32(%rbx), %esi
	movq	%r15, %rdi
	callq	_find_format
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_6
## %bb.1:
	movl	(%rbx), %edx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_3
## %bb.2:
	movq	_V4L2_PIX_FMT_H264@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_3:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %edx
	jne	LBB0_15
## %bb.4:
	movq	_V4L2_PIX_FMT_NV12@GOTPCREL(%rip), %rax
LBB0_5:
	movl	(%rax), %esi
	movl	%esi, 32(%rbx)
	movq	%r15, %rdi
	callq	_find_format
	movq	%rax, %r14
LBB0_6:
	movq	%r12, -48(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %r12
	movq	%r15, %rdi
	callq	_frame_width_min
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_frame_width_max
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_clamp
	movq	%rax, 16(%rbx)
	movq	24(%rbx), %r12
	movq	%r15, %rdi
	callq	_frame_height_min
	movl	%eax, %r13d
	movq	%r15, %rdi
	callq	_frame_height_max
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%eax, %edx
	callq	_clamp
	movq	%rax, 24(%rbx)
	movl	(%rbx), %ecx
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %r12
	cmpl	(%r12), %ecx
	jne	LBB0_8
## %bb.7:
	movq	%rax, %rdi
	movl	$32, %esi
	callq	_ALIGN
	movq	%rax, 24(%rbx)
LBB0_8:
	movq	16(%rbx), %rdi
	movl	$2, %esi
	callq	_ALIGN
	movq	%rax, 16(%rbx)
	movq	24(%rbx), %rdi
	movl	$2, %esi
	callq	_ALIGN
	movq	%rax, 24(%rbx)
	movq	8(%rbx), %rcx
	movq	_V4L2_FIELD_ANY@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_10
## %bb.9:
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rbx)
LBB0_10:
	movl	(%r14), %ecx
	movl	%ecx, 48(%rbx)
	movq	$0, 40(%rbx)
	movl	32(%rbx), %edi
	movq	16(%rbx), %rsi
	movq	%rax, %rdx
	callq	_venus_helper_get_framesz
	movl	%eax, %r15d
	movq	8(%r13), %rdi
	movq	_SZ_4K@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ALIGN
	movq	%rax, %rdi
	movl	%r15d, %esi
	callq	_max
	movq	%rax, 8(%r13)
	movl	(%rbx), %eax
	cmpl	(%r12), %eax
	jne	LBB0_11
## %bb.12:
	movq	16(%rbx), %rdi
	movl	$128, %esi
	callq	_ALIGN
	jmp	LBB0_13
LBB0_11:
	xorl	%eax, %eax
LBB0_13:
	movq	%rax, (%r13)
LBB0_14:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	xorl	%r14d, %r14d
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_V4L2_PIX_FMT_H264,4,2          ## @V4L2_PIX_FMT_H264
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_PIX_FMT_NV12,4,2          ## @V4L2_PIX_FMT_NV12
	.comm	_V4L2_FIELD_ANY,8,3             ## @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_NONE,8,3            ## @V4L2_FIELD_NONE
	.comm	_SZ_4K,4,2                      ## @SZ_4K
	.no_dead_strip	_venc_try_fmt_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function venc_try_fmt_common
_venc_try_fmt_common:                   ; @venc_try_fmt_common
	.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, x1
	mov	x21, x0
	ldr	x24, [x1, #56]
	ldr	w0, [x24, #16]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w0, [x19, #52]
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	ldr	w1, [x19, #32]
	ldr	w2, [x19]
	mov	x0, x21
	bl	_find_format
	mov	x20, x0
Lloh0:
	adrp	x25, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh1:
	ldr	x25, [x25, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
	cbnz	x0, LBB0_6
; %bb.1:
	ldr	w2, [x19]
Lloh2:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w2, w8
	b.ne	LBB0_3
; %bb.2:
Lloh5:
	adrp	x8, _V4L2_PIX_FMT_H264@GOTPAGE
Lloh6:
	ldr	x8, [x8, _V4L2_PIX_FMT_H264@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:
	ldr	w8, [x25]
	cmp	w2, w8
	b.ne	LBB0_14
; %bb.4:
Lloh7:
	adrp	x8, _V4L2_PIX_FMT_NV12@GOTPAGE
Lloh8:
	ldr	x8, [x8, _V4L2_PIX_FMT_NV12@GOTPAGEOFF]
LBB0_5:
	ldr	w1, [x8]
	str	w1, [x19, #32]
	mov	x0, x21
	bl	_find_format
	mov	x20, x0
LBB0_6:
	ldr	x22, [x19, #16]
	mov	x0, x21
	bl	_frame_width_min
	mov	x23, x0
	mov	x0, x21
	bl	_frame_width_max
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_clamp
	str	x0, [x19, #16]
	ldr	x22, [x19, #24]
	mov	x0, x21
	bl	_frame_height_min
	mov	x23, x0
	mov	x0, x21
	bl	_frame_height_max
	mov	x2, x0
	mov	x0, x22
	mov	x1, x23
	bl	_clamp
	str	x0, [x19, #24]
	ldr	w8, [x19]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_8
; %bb.7:
	mov	w1, #32
	bl	_ALIGN
	str	x0, [x19, #24]
LBB0_8:
	ldr	x0, [x19, #16]
	mov	w1, #2
	bl	_ALIGN
	str	x0, [x19, #16]
	ldr	x0, [x19, #24]
	mov	w1, #2
	bl	_ALIGN
	mov	x2, x0
	str	x0, [x19, #24]
	ldr	x8, [x19, #8]
Lloh9:
	adrp	x9, _V4L2_FIELD_ANY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_FIELD_ANY@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
Lloh12:
	adrp	x8, _V4L2_FIELD_NONE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh14:
	ldr	x8, [x8]
	str	x8, [x19, #8]
LBB0_10:
	ldr	w8, [x20]
	str	w8, [x19, #48]
	str	xzr, [x19, #40]
	ldr	w0, [x19, #32]
	ldr	x1, [x19, #16]
	bl	_venus_helper_get_framesz
	mov	x21, x0
	ldr	x0, [x24, #8]
Lloh15:
	adrp	x8, _SZ_4K@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SZ_4K@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_ALIGN
	mov	x1, x21
	bl	_max
	mov	x8, x0
	mov	x0, #0
	str	x8, [x24, #8]
	ldr	w8, [x19]
	ldr	w9, [x25]
	cmp	w8, w9
	b.ne	LBB0_12
; %bb.11:
	ldr	x0, [x19, #16]
	mov	w1, #128
	bl	_ALIGN
LBB0_12:
	str	x0, [x24]
LBB0_13:
	mov	x0, x20
	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
LBB0_14:
	mov	x20, #0
	b	LBB0_13
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
	.comm	_V4L2_PIX_FMT_H264,4,2          ; @V4L2_PIX_FMT_H264
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_PIX_FMT_NV12,4,2          ; @V4L2_PIX_FMT_NV12
	.comm	_V4L2_FIELD_ANY,8,3             ; @V4L2_FIELD_ANY
	.comm	_V4L2_FIELD_NONE,8,3            ; @V4L2_FIELD_NONE
	.comm	_SZ_4K,4,2                      ; @SZ_4K
	.no_dead_strip	_venc_try_fmt_common
.subsections_via_symbols
