	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function saa7134_s_crop
_saa7134_s_crop:                        ## @saa7134_s_crop
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %rbx
	movq	(%rsi), %r14
	movq	(%rdx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_4
## %bb.1:
	movq	_V4L2_BUF_TYPE_VIDEO_OVERLAY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_4:
	cmpq	$0, 8(%r15)
	js	LBB0_2
## %bb.5:
	cmpq	$0, 16(%r15)
	js	LBB0_2
## %bb.6:
	movq	_RESOURCE_OVERLAY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_res_locked
	testq	%rax, %rax
	jne	LBB0_7
## %bb.8:
	movq	(%rbx), %rdi
	movq	_RESOURCE_VIDEO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_res_locked
	testq	%rax, %rax
	je	LBB0_9
LBB0_7:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_3
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_3:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	24(%r15), %rdx
	movq	32(%r14), %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_11
## %bb.10:
	movq	%rcx, 24(%r15)
	movq	%rcx, %rdx
LBB0_11:
	leaq	8(%r15), %rax
	movq	40(%r14), %rsi
	leaq	(%rsi,%rcx), %rdi
	cmpq	%rdi, %rdx
	jle	LBB0_13
## %bb.12:
	movq	%rdi, 24(%r15)
	movq	%rdi, %rdx
LBB0_13:
	subq	%rdx, %rcx
	addq	%rsi, %rcx
	cmpq	%rcx, (%rax)
	jle	LBB0_15
## %bb.14:
	movq	%rcx, (%rax)
LBB0_15:
	movq	32(%r15), %rdx
	movq	48(%r14), %rcx
	cmpq	%rcx, %rdx
	jge	LBB0_17
## %bb.16:
	movq	%rcx, 32(%r15)
	movq	%rcx, %rdx
LBB0_17:
	movq	56(%r14), %rsi
	leaq	(%rsi,%rcx), %rdi
	cmpq	%rdi, %rdx
	jle	LBB0_19
## %bb.18:
	movq	%rdi, 32(%r15)
	movq	%rdi, %rdx
LBB0_19:
	subq	%rdx, %rcx
	addq	%rsi, %rcx
	cmpq	%rcx, 16(%r15)
	jle	LBB0_21
## %bb.20:
	movq	%rcx, 16(%r15)
LBB0_21:
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movups	%xmm1, 16(%r14)
	movups	%xmm0, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ## @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_TYPE_VIDEO_OVERLAY,8,3 ## @V4L2_BUF_TYPE_VIDEO_OVERLAY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_RESOURCE_OVERLAY,4,2           ## @RESOURCE_OVERLAY
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_RESOURCE_VIDEO,4,2             ## @RESOURCE_VIDEO
	.no_dead_strip	_saa7134_s_crop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function saa7134_s_crop
_saa7134_s_crop:                        ; @saa7134_s_crop
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x2]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_CAPTURE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
Lloh3:
	adrp	x10, _V4L2_BUF_TYPE_VIDEO_OVERLAY@GOTPAGE
Lloh4:
	ldr	x10, [x10, _V4L2_BUF_TYPE_VIDEO_OVERLAY@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x22, x2
	ldr	x8, [x22, #8]!
	tbnz	x8, #63, LBB0_6
; %bb.2:
	ldr	x8, [x19, #16]
	tbnz	x8, #63, LBB0_6
; %bb.3:
	mov	x21, x1
	ldr	x20, [x1]
Lloh6:
	adrp	x8, _RESOURCE_OVERLAY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RESOURCE_OVERLAY@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_res_locked
	cbnz	x0, LBB0_5
; %bb.4:
	ldr	x0, [x21]
Lloh9:
	adrp	x8, _RESOURCE_VIDEO@GOTPAGE
Lloh10:
	ldr	x8, [x8, _RESOURCE_VIDEO@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_res_locked
	cbz	x0, LBB0_9
LBB0_5:
Lloh12:
	adrp	x8, _EBUSY@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_9:
	ldr	x9, [x19, #24]
	ldr	x8, [x20, #32]
	cmp	x9, x8
	b.ge	LBB0_11
; %bb.10:
	str	x8, [x19, #24]
	mov	x9, x8
LBB0_11:
	ldr	x10, [x20, #40]
	add	x11, x10, x8
	cmp	x9, x11
	b.le	LBB0_13
; %bb.12:
	str	x11, [x19, #24]
	mov	x9, x11
LBB0_13:
	ldr	x11, [x22]
	sub	x8, x8, x9
	add	x8, x8, x10
	cmp	x11, x8
	b.le	LBB0_15
; %bb.14:
	str	x8, [x22]
LBB0_15:
	ldr	x9, [x19, #32]
	ldr	x8, [x20, #48]
	cmp	x9, x8
	b.ge	LBB0_17
; %bb.16:
	str	x8, [x19, #32]
	mov	x9, x8
LBB0_17:
	ldr	x10, [x20, #56]
	add	x11, x10, x8
	cmp	x9, x11
	b.le	LBB0_19
; %bb.18:
	str	x11, [x19, #32]
	mov	x9, x11
LBB0_19:
	ldr	x11, [x19, #16]
	sub	x8, x8, x9
	add	x8, x8, x10
	cmp	x11, x8
	b.le	LBB0_21
; %bb.20:
	str	x8, [x19, #16]
LBB0_21:
	mov	w0, #0
	ldp	q0, q1, [x22]
	stp	q0, q1, [x20]
	b	LBB0_8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_CAPTURE,8,3 ; @V4L2_BUF_TYPE_VIDEO_CAPTURE
	.comm	_V4L2_BUF_TYPE_VIDEO_OVERLAY,8,3 ; @V4L2_BUF_TYPE_VIDEO_OVERLAY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_RESOURCE_OVERLAY,4,2           ; @RESOURCE_OVERLAY
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_RESOURCE_VIDEO,4,2             ; @RESOURCE_VIDEO
	.no_dead_strip	_saa7134_s_crop
.subsections_via_symbols
