	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ivtv_cropcap
_ivtv_cropcap:                          ## @ivtv_cropcap
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	(%rdx), %rdi
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_1
## %bb.2:
	movq	8(%rsi), %rcx
	movl	(%rsi), %esi
	leaq	8(%rdx), %r8
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rdx)
	movl	$720, 8(%rdx)                   ## imm = 0x2D0
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	jne	LBB0_4
## %bb.3:
	cmpq	$0, 8(%rcx)
	jmp	LBB0_10
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	popq	%rbp
	retq
LBB0_4:
	movq	_IVTV_DEC_STREAM_TYPE_YUV@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jne	LBB0_9
## %bb.5:
	cmpq	$0, 24(%rcx)
	je	LBB0_7
## %bb.6:
	movl	16(%rcx), %eax
	movl	%eax, (%r8)
	movl	20(%rcx), %esi
	jmp	LBB0_8
LBB0_9:
	cmpq	$0, (%rcx)
LBB0_10:
	sete	%cl
	movl	$480, %eax                      ## imm = 0x1E0
	movl	$576, %esi                      ## imm = 0x240
	cmovel	%eax, %esi
	movl	%esi, 12(%rdx)
	jmp	LBB0_11
LBB0_7:
	cmpq	$0, (%rcx)
	movl	$480, %eax                      ## imm = 0x1E0
	movl	$576, %esi                      ## imm = 0x240
	cmovel	%eax, %esi
LBB0_8:
	movl	%esi, 12(%rdx)
	cmpq	$0, (%rcx)
	sete	%cl
LBB0_11:
	testb	%cl, %cl
	movl	$10, %eax
	movl	$59, %ecx
	cmovnel	%eax, %ecx
	movl	%ecx, 56(%rdx)
	movl	$11, %eax
	movl	$54, %ecx
	cmovnel	%eax, %ecx
	movl	%ecx, 60(%rdx)
	movups	(%r8), %xmm0
	movups	%xmm0, 32(%rdx)
	movq	16(%r8), %rax
	movq	%rax, 48(%rdx)
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,4,2   ## @IVTV_DEC_STREAM_TYPE_YUV
	.no_dead_strip	_ivtv_cropcap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ivtv_cropcap
_ivtv_cropcap:                          ; @ivtv_cropcap
	.cfi_startproc
; %bb.0:
	ldr	x10, [x2]
Lloh0:
	adrp	x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x10, x8
	b.ne	LBB0_3
; %bb.1:
	ldr	x9, [x1, #8]
	ldr	w11, [x1]
	mov	w12, #720
	mov	x8, x2
	str	w12, [x8, #8]!
	stp	xzr, xzr, [x8, #8]
Lloh3:
	adrp	x12, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh4:
	ldr	x12, [x12, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh5:
	ldr	x12, [x12]
	cmp	x10, x12
	b.ne	LBB0_4
; %bb.2:
	ldr	x9, [x9, #8]
	b	LBB0_8
LBB0_3:
Lloh6:
	adrp	x8, _EINVAL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w0, w8
	ret
LBB0_4:
Lloh9:
	adrp	x10, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGE
Lloh10:
	ldr	x10, [x10, _IVTV_DEC_STREAM_TYPE_YUV@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	cmp	w11, w10
	b.ne	LBB0_7
; %bb.5:
	ldr	x10, [x9, #24]
	cbz	x10, LBB0_9
; %bb.6:
	ldp	w11, w10, [x9, #16]
	str	w11, [x8]
	b	LBB0_10
LBB0_7:
	ldr	x9, [x9]
LBB0_8:
	cmp	x9, #0
	cset	w9, eq
	mov	w10, #576
	mov	w11, #480
	csel	w10, w11, w10, eq
	str	w10, [x2, #12]
	b	LBB0_11
LBB0_9:
	ldr	x10, [x9]
	cmp	x10, #0
	mov	w10, #576
	mov	w11, #480
	csel	w10, w11, w10, eq
LBB0_10:
	str	w10, [x2, #12]
	ldr	x9, [x9]
	cmp	x9, #0
	cset	w9, eq
LBB0_11:
	mov	w0, #0
	mov	w10, #59
	mov	w11, #10
	cmp	w9, #0
	csel	w9, w11, w10, ne
	mov	w10, #54
	mov	w11, #11
	csel	w10, w11, w10, ne
	stp	w9, w10, [x2, #56]
	ldr	q0, [x8]
	str	q0, [x2, #32]
	ldr	x8, [x8, #16]
	str	x8, [x2, #48]
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_IVTV_DEC_STREAM_TYPE_YUV,4,2   ; @IVTV_DEC_STREAM_TYPE_YUV
	.no_dead_strip	_ivtv_cropcap
.subsections_via_symbols
