	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_g_selection
_ivtv_g_selection:                      ## @ivtv_g_selection
	.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
	movq	%rsi, %rdi
	callq	_fh2id
	movq	8(%rax), %rcx
	movq	(%rbx), %rdx
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_3
## %bb.1:
	movl	8(%rbx), %eax
	andl	$-2, %eax
	cmpl	$128, %eax
	jne	LBB0_16
## %bb.2:
	movq	$0, 24(%rbx)
	movl	$720, 16(%rbx)                  ## imm = 0x2D0
	cmpl	$0, 40(%rcx)
	movl	$480, %eax                      ## imm = 0x1E0
	movl	$576, %ecx                      ## imm = 0x240
	cmovel	%eax, %ecx
	movl	%ecx, 20(%rbx)
	xorl	%eax, %eax
	jmp	LBB0_17
LBB0_3:
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jne	LBB0_16
## %bb.4:
	movq	_V4L2_CAP_VIDEO_OUTPUT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, (%rcx)
	je	LBB0_16
## %bb.5:
	movl	(%rax), %esi
	movl	8(%rbx), %eax
	leal	-130(%rax), %edx
	cmpl	$2, %edx
	jae	LBB0_6
## %bb.11:
	cmpl	$0, 4(%rcx)
	movl	$480, %eax                      ## imm = 0x1E0
	movl	$576, %edx                      ## imm = 0x240
	cmovel	%eax, %edx
	movq	_IVTV_DEC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rdi
	xorl	%eax, %eax
	cmpl	(%rdi), %esi
	jne	LBB0_12
## %bb.13:
	cmpl	$0, 52(%rcx)
	movl	$0, %esi
	je	LBB0_15
## %bb.14:
	movl	44(%rcx), %esi
	movl	48(%rcx), %edx
	jmp	LBB0_15
LBB0_6:
	cmpl	$132, %eax
	jne	LBB0_16
## %bb.7:
	movq	_IVTV_DEC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rax
	addq	$12, %rbx
	cmpl	(%rax), %esi
	jne	LBB0_10
## %bb.8:
	movups	56(%rcx), %xmm0
	movups	72(%rcx), %xmm1
	jmp	LBB0_9
LBB0_16:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
LBB0_12:
	xorl	%esi, %esi
LBB0_15:
	movl	$0, 12(%rbx)
	movl	%esi, 16(%rbx)
	movl	%edx, 20(%rbx)
	movups	l___const.ivtv_g_selection.r+12(%rip), %xmm0
	movups	%xmm0, 24(%rbx)
	movl	l___const.ivtv_g_selection.r+28(%rip), %ecx
	movl	%ecx, 40(%rbx)
	jmp	LBB0_17
LBB0_10:
	movups	8(%rcx), %xmm0
	movups	24(%rcx), %xmm1
LBB0_9:
	movups	%xmm1, 16(%rbx)
	movups	%xmm0, (%rbx)
	xorl	%eax, %eax
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	2                               ## @__const.ivtv_g_selection.r
l___const.ivtv_g_selection.r:
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	720                             ## 0x2d0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0
	.long	0                               ## 0x0

	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_V4L2_CAP_VIDEO_OUTPUT,4,2      ## @V4L2_CAP_VIDEO_OUTPUT
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,4,2   ## @IVTV_DEC_STREAM_TYPE_YUV
	.no_dead_strip	_ivtv_g_selection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_g_selection
_ivtv_g_selection:                      ; @ivtv_g_selection
	.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
	mov	x0, x1
	bl	_fh2id
	ldr	x8, [x0, #8]
	ldr	x9, [x19]
Lloh0:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.1:
	ldr	w9, [x19, #8]
	and	w9, w9, #0xfffffffe
	cmp	w9, #128
	b.ne	LBB0_12
; %bb.2:
	mov	w0, #0
	str	xzr, [x19, #24]
	mov	w9, #720
	ldr	w8, [x8, #40]
	mov	w10, #576
	mov	w11, #480
	cmp	w8, #0
	csel	w8, w11, w10, eq
	stp	w9, w8, [x19, #16]
	b	LBB0_13
LBB0_3:
Lloh3:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_12
; %bb.4:
	ldr	w9, [x8]
Lloh6:
	adrp	x10, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGE
Lloh7:
	ldr	x10, [x10, _V4L2_CAP_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_12
; %bb.5:
	ldr	w10, [x0]
	ldr	w9, [x19, #8]
	sub	w11, w9, #130
	cmp	w11, #2
	b.hs	LBB0_9
; %bb.6:
	ldr	w9, [x8, #4]
	mov	w11, #576
	mov	w12, #480
	cmp	w9, #0
	csel	w9, w12, w11, eq
Lloh9:
	adrp	x11, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGE
Lloh10:
	ldr	x11, [x11, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh11:
	ldr	w11, [x11]
	cmp	w10, w11
	b.ne	LBB0_14
; %bb.7:
	ldr	w10, [x8, #52]
	cbz	w10, LBB0_15
; %bb.8:
	ldp	w10, w9, [x8, #44]
	b	LBB0_15
LBB0_9:
	cmp	w9, #132
	b.ne	LBB0_12
; %bb.10:
Lloh12:
	adrp	x9, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x9]
	add	x9, x19, #12
	cmp	w10, w11
	b.ne	LBB0_16
; %bb.11:
	mov	w0, #0
	ldur	q0, [x8, #56]
	ldur	q1, [x8, #72]
	b	LBB0_17
LBB0_12:
Lloh15:
	adrp	x8, _EINVAL@GOTPAGE
Lloh16:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_13:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_14:
	mov	w10, #0
LBB0_15:
	mov	w0, #0
	stp	wzr, w10, [x19, #12]
	str	w9, [x19, #20]
Lloh18:
	adrp	x8, l___const.ivtv_g_selection.r@PAGE+12
Lloh19:
	add	x8, x8, l___const.ivtv_g_selection.r@PAGEOFF+12
	ldr	q0, [x8]
	ldr	w8, [x8, #16]
	str	w8, [x19, #40]
	stur	q0, [x19, #24]
	b	LBB0_13
LBB0_16:
	mov	w0, #0
	ldur	q0, [x8, #8]
	ldur	q1, [x8, #24]
LBB0_17:
	stp	q0, q1, [x9]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @__const.ivtv_g_selection.r
l___const.ivtv_g_selection.r:
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	720                             ; 0x2d0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0
	.long	0                               ; 0x0

	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_V4L2_CAP_VIDEO_OUTPUT,4,2      ; @V4L2_CAP_VIDEO_OUTPUT
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,4,2   ; @IVTV_DEC_STREAM_TYPE_YUV
	.no_dead_strip	_ivtv_g_selection
.subsections_via_symbols
