	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bttv_crop_adjust
_bttv_crop_adjust:                      ## @bttv_crop_adjust
	.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
	movl	%ecx, %r15d
	movl	%edx, %ebx
	movq	%rsi, %r14
	movq	%rdi, %r12
	movl	%r8d, %edi
	callq	_V4L2_FIELD_HAS_BOTH
	testl	%eax, %eax
	sete	%cl
	movl	%r15d, %r13d
	shll	%cl, %r13d
	cmpl	%ebx, (%r12)
	jle	LBB0_2
## %bb.1:
	shll	$4, %ebx
	movl	%ebx, 16(%r12)
	jmp	LBB0_5
LBB0_2:
	cmpl	%ebx, 4(%r12)
	jge	LBB0_5
## %bb.3:
	movl	%ebx, 16(%r12)
	movl	(%r14), %edi
	subl	%ebx, %edi
	addl	4(%r14), %edi
	movq	_MAX_HDELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	cmpl	%eax, 20(%r12)
	jle	LBB0_5
## %bb.4:
	movl	%eax, 20(%r12)
LBB0_5:
	cmpl	%r15d, 8(%r12)
	jle	LBB0_7
## %bb.6:
	shll	$4, %r15d
	movl	%r15d, 24(%r12)
	jmp	LBB0_10
LBB0_7:
	cmpl	12(%r12), %r13d
	jle	LBB0_10
## %bb.8:
	incl	%r13d
	andl	$-2, %r13d
	movl	%r13d, 24(%r12)
	movl	8(%r14), %eax
	subl	%r13d, %eax
	addl	12(%r14), %eax
	cmpl	%eax, 28(%r12)
	jle	LBB0_10
## %bb.9:
	movl	%eax, 28(%r12)
LBB0_10:
	movq	%r12, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_bttv_crop_calc_limits          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_HDELAY,8,3                 ## @MAX_HDELAY
	.no_dead_strip	_bttv_crop_adjust
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bttv_crop_adjust
_bttv_crop_adjust:                      ; @bttv_crop_adjust
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x20, x1
	mov	x19, x0
	mov	x0, x4
	bl	_V4L2_FIELD_HAS_BOTH
	cmp	w0, #0
	cset	w23, eq
	ldr	w8, [x19]
	cmp	w8, w22
	b.le	LBB0_2
; %bb.1:
	lsl	w8, w22, #4
	str	w8, [x19, #16]
	b	LBB0_5
LBB0_2:
	ldr	w8, [x19, #4]
	cmp	w8, w22
	b.ge	LBB0_5
; %bb.3:
	str	w22, [x19, #16]
	ldp	w8, w9, [x20]
	sub	w8, w8, w22
	add	w0, w8, w9
Lloh0:
	adrp	x8, _MAX_HDELAY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_HDELAY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_min
	ldr	w8, [x19, #20]
	cmp	w8, w0
	b.le	LBB0_5
; %bb.4:
	str	w0, [x19, #20]
LBB0_5:
	ldr	w8, [x19, #8]
	cmp	w8, w21
	b.le	LBB0_7
; %bb.6:
	lsl	w8, w21, #4
	str	w8, [x19, #24]
	b	LBB0_10
LBB0_7:
	lsl	w8, w21, w23
	ldr	w9, [x19, #12]
	cmp	w8, w9
	b.le	LBB0_10
; %bb.8:
	add	w8, w8, #1
	and	w8, w8, #0xfffffffe
	str	w8, [x19, #24]
	ldp	w9, w10, [x20, #8]
	sub	w8, w9, w8
	add	w8, w8, w10
	ldr	w9, [x19, #28]
	cmp	w9, w8
	b.le	LBB0_10
; %bb.9:
	str	w8, [x19, #28]
LBB0_10:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_bttv_crop_calc_limits
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_HDELAY,8,3                 ; @MAX_HDELAY
	.no_dead_strip	_bttv_crop_adjust
.subsections_via_symbols
