	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cobalt_try_fmt_vid_out
_cobalt_try_fmt_vid_out:                ## @cobalt_try_fmt_vid_out
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdx, %rbx
	movl	(%rdx), %eax
	movl	$176, %esi
	movl	$144, %edx
	cmpl	$176, %eax
	jl	LBB0_3
## %bb.1:
	movl	4(%rbx), %ecx
	cmpl	$144, %ecx
	jl	LBB0_3
## %bb.2:
	cmpl	$1921, %eax                     ## imm = 0x781
	setae	%sil
	cmpl	$1081, %ecx                     ## imm = 0x439
	setae	%dl
	orb	%sil, %dl
	andl	$-4, %eax
	andl	$-2, %ecx
	testb	%dl, %dl
	movl	$1920, %esi                     ## imm = 0x780
	cmovel	%eax, %esi
	movl	$1080, %edx                     ## imm = 0x438
	cmovel	%ecx, %edx
LBB0_3:
	movl	%esi, (%rbx)
	movl	%edx, 4(%rbx)
	movl	12(%rbx), %edi
	andl	$-4, %edi
	cmpl	$129, 8(%rbx)
	jne	LBB0_4
## %bb.5:
	movq	_COBALT_BYTES_PER_PIXEL_RGB32@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	callq	_max
	movl	%eax, 12(%rbx)
	jmp	LBB0_6
LBB0_4:
	movq	_COBALT_BYTES_PER_PIXEL_YUYV@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	callq	_max
	movl	%eax, 12(%rbx)
	movl	$128, 8(%rbx)
LBB0_6:
	imull	4(%rbx), %eax
	movl	%eax, 16(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_COBALT_BYTES_PER_PIXEL_YUYV,4,2 ## @COBALT_BYTES_PER_PIXEL_YUYV
	.comm	_COBALT_BYTES_PER_PIXEL_RGB32,4,2 ## @COBALT_BYTES_PER_PIXEL_RGB32
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.no_dead_strip	_cobalt_try_fmt_vid_out
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cobalt_try_fmt_vid_out
_cobalt_try_fmt_vid_out:                ; @cobalt_try_fmt_vid_out
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x2
	ldr	w8, [x2]
	cmp	w8, #176
	b.lt	LBB0_2
; %bb.1:
	ldr	w9, [x19, #4]
	cmp	w9, #144
	b.ge	LBB0_3
LBB0_2:
	mov	w8, #176
	mov	w9, #144
	b	LBB0_4
LBB0_3:
	cmp	w8, #1920
	mov	w10, #1080
	ccmp	w9, w10, #2, ls
	cset	w11, hi
	and	w8, w8, #0xfffffffc
	mov	w12, #1920
	cmp	w11, #0
	csel	w8, w12, w8, ne
	and	w9, w9, #0xfffffffe
	csel	w9, w10, w9, ne
LBB0_4:
	stp	w8, w9, [x19]
	ldp	w9, w10, [x19, #8]
	and	w0, w10, #0xfffffffc
	cmp	w9, #129
	b.ne	LBB0_6
; %bb.5:
Lloh0:
	adrp	x9, _COBALT_BYTES_PER_PIXEL_RGB32@GOTPAGE
Lloh1:
	ldr	x9, [x9, _COBALT_BYTES_PER_PIXEL_RGB32@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	mul	w1, w9, w8
	bl	_max
	str	w0, [x19, #12]
                                        ; kill: def $w0 killed $w0 killed $x0 def $x0
	b	LBB0_7
LBB0_6:
Lloh3:
	adrp	x9, _COBALT_BYTES_PER_PIXEL_YUYV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _COBALT_BYTES_PER_PIXEL_YUYV@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	mul	w1, w9, w8
	bl	_max
	mov	w8, #128
	stp	w8, w0, [x19, #8]
LBB0_7:
	ldr	w8, [x19, #4]
	mul	w8, w8, w0
Lloh6:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	stp	w8, w9, [x19, #16]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_COBALT_BYTES_PER_PIXEL_YUYV,4,2 ; @COBALT_BYTES_PER_PIXEL_YUYV
	.comm	_COBALT_BYTES_PER_PIXEL_RGB32,4,2 ; @COBALT_BYTES_PER_PIXEL_RGB32
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.no_dead_strip	_cobalt_try_fmt_vid_out
.subsections_via_symbols
