	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_frame_apply_cropping        ## -- Begin function av_frame_apply_cropping
	.p2align	4, 0x90
_av_frame_apply_cropping:               ## @av_frame_apply_cropping
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %rcx
	testq	%rcx, %rcx
	jle	LBB0_2
## %bb.1:
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	testq	%rax, %rax
	jle	LBB0_2
## %bb.5:
	movl	%esi, %r15d
	movl	16(%r14), %edx
	movl	20(%r14), %esi
	movq	_INT_MAX@GOTPCREL(%rip), %r13
	movslq	(%r13), %rdi
	movl	%edi, %ebx
	subl	%esi, %ebx
	cmpl	%ebx, %edx
	jge	LBB0_9
## %bb.6:
	movq	24(%r14), %r8
	movq	32(%r14), %r9
	subq	%r9, %rdi
	cmpq	%rdi, %r8
	jge	LBB0_9
## %bb.7:
	addl	%edx, %esi
	movslq	%esi, %rdx
	cmpq	%rdx, %rcx
	jle	LBB0_9
## %bb.8:
	addq	%r8, %r9
	cmpq	%rax, %r9
	jge	LBB0_9
## %bb.11:
	movl	48(%r14), %edi
	callq	_av_pix_fmt_desc_get
	testq	%rax, %rax
	je	LBB0_12
## %bb.13:
	movq	%rax, %rbx
	movq	_AV_PIX_FMT_FLAG_BITSTREAM@GOTPCREL(%rip), %rax
	movq	_AV_PIX_FMT_FLAG_HWACCEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	testl	%ecx, (%rbx)
	je	LBB0_15
## %bb.14:
	movslq	20(%r14), %rax
	movdqu	(%r14), %xmm0
	movq	32(%r14), %xmm1                 ## xmm1 = mem[0],zero
	movq	%rax, %xmm2
	punpcklqdq	%xmm1, %xmm2            ## xmm2 = xmm2[0],xmm1[0]
	psubq	%xmm2, %xmm0
	movdqu	%xmm0, (%r14)
	movl	$0, 20(%r14)
	movq	$0, 32(%r14)
	jmp	LBB0_32
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_9:
	movq	_ERANGE@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.4:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_15:
	leaq	16(%r14), %r12
	leaq	-80(%rbp), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_calc_cropping_offsets
	movq	_AV_FRAME_CROP_UNALIGNED@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_16
LBB0_28:
	movq	40(%r14), %rax
	movq	(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_31
## %bb.29:
	xorl	%edx, %edx
LBB0_30:                                ## =>This Inner Loop Header: Depth=1
	addq	-80(%rbp,%rdx), %rcx
	movq	%rcx, (%rax,%rdx)
	movq	8(%rax,%rdx), %rcx
	addq	$8, %rdx
	testq	%rcx, %rcx
	jne	LBB0_30
LBB0_31:
	movslq	16(%r14), %rax
	movslq	20(%r14), %rcx
	addq	%rax, %rcx
	movq	32(%r14), %rax
	addq	24(%r14), %rax
	movdqu	(%r14), %xmm0
	movq	%rax, %xmm1
	movq	%rcx, %xmm2
	punpcklqdq	%xmm1, %xmm2            ## xmm2 = xmm2[0],xmm1[0]
	psubq	%xmm2, %xmm0
	movdqu	%xmm0, (%r14)
	pxor	%xmm0, %xmm0
	movdqu	%xmm0, (%r12)
	movq	$0, 16(%r12)
LBB0_32:
	xorl	%eax, %eax
	jmp	LBB0_33
LBB0_16:
	movq	%r12, -96(%rbp)                 ## 8-byte Spill
	movslq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.17:
	callq	_ff_ctz
	movl	%eax, -84(%rbp)                 ## 4-byte Spill
	movl	(%r13), %r12d
	jmp	LBB0_19
LBB0_18:
	movl	(%r13), %r12d
	movl	%r12d, -84(%rbp)                ## 4-byte Spill
LBB0_19:
	movq	40(%r14), %rax
	cmpq	$0, (%rax)
	je	LBB0_25
## %bb.20:
	xorl	%r15d, %r15d
	jmp	LBB0_21
LBB0_22:                                ##   in Loop: Header=BB0_21 Depth=1
	callq	_ff_ctz
	movl	%eax, %edi
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	movl	%r12d, %esi
	callq	_FFMIN
	movl	%eax, %r12d
	movq	40(%r14), %rax
	cmpq	$0, 8(%rax,%r15)
	leaq	8(%r15), %r15
	je	LBB0_25
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	-80(%rbp,%r15), %rdi
	testq	%rdi, %rdi
	jne	LBB0_22
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	(%r13), %edi
	jmp	LBB0_24
LBB0_25:
	movl	-84(%rbp), %ecx                 ## 4-byte Reload
	subl	%r12d, %ecx
	jge	LBB0_26
LBB0_12:
	movq	_AVERROR_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_33:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_10
## %bb.34:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	cmpl	$4, %r12d
	movq	-96(%rbp), %r12                 ## 8-byte Reload
	jg	LBB0_28
## %bb.27:
	addb	$5, %cl
	movl	16(%r14), %eax
	shrl	%cl, %eax
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %eax
	movl	%eax, 16(%r14)
	leaq	-80(%rbp), %rdi
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_calc_cropping_offsets
	jmp	LBB0_28
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_ERANGE,4,2                     ## @ERANGE
	.comm	_AVERROR_BUG,4,2                ## @AVERROR_BUG
	.comm	_AV_PIX_FMT_FLAG_BITSTREAM,4,2  ## @AV_PIX_FMT_FLAG_BITSTREAM
	.comm	_AV_PIX_FMT_FLAG_HWACCEL,4,2    ## @AV_PIX_FMT_FLAG_HWACCEL
	.comm	_AV_FRAME_CROP_UNALIGNED,4,2    ## @AV_FRAME_CROP_UNALIGNED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_frame_apply_cropping        ; -- Begin function av_frame_apply_cropping
	.p2align	2
_av_frame_apply_cropping:               ; @av_frame_apply_cropping
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	ldr	x8, [x0]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x9, [x0, #8]
	cmp	x9, #0
	b.le	LBB0_6
; %bb.2:
	mov	x23, x19
	ldp	w10, w11, [x23, #16]!
Lloh3:
	adrp	x24, _INT_MAX@GOTPAGE
Lloh4:
	ldr	x24, [x24, _INT_MAX@GOTPAGEOFF]
	ldrsw	x12, [x24]
	sub	w13, w12, w11
	cmp	w10, w13
	b.ge	LBB0_5
; %bb.3:
	ldp	x13, x14, [x19, #24]
	sub	x12, x12, x14
	cmp	x13, x12
	b.ge	LBB0_5
; %bb.4:
	add	w10, w11, w10
	add	x11, x14, x13
	cmp	x8, w10, sxtw
	ccmp	x11, x9, #0, gt
	b.lt	LBB0_9
LBB0_5:
Lloh5:
	adrp	x8, _ERANGE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ERANGE@GOTPAGEOFF]
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_7:
	ldr	w0, [x8]
	ldr	x8, [sp, #40]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_32
; %bb.8:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_AVERROR
LBB0_9:
	mov	x21, x1
	ldr	w0, [x19, #48]
	bl	_av_pix_fmt_desc_get
	cbz	x0, LBB0_27
; %bb.10:
	mov	x20, x0
	ldr	w8, [x0]
Lloh12:
	adrp	x9, _AV_PIX_FMT_FLAG_BITSTREAM@GOTPAGE
Lloh13:
	ldr	x9, [x9, _AV_PIX_FMT_FLAG_BITSTREAM@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _AV_PIX_FMT_FLAG_HWACCEL@GOTPAGE
Lloh16:
	ldr	x10, [x10, _AV_PIX_FMT_FLAG_HWACCEL@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w9, w8
	b.eq	LBB0_12
; %bb.11:
	mov	w0, #0
	ldrsw	x8, [x19, #20]
	ldp	x9, x10, [x19]
	sub	x8, x9, x8
	ldr	x9, [x19, #32]
	sub	x9, x10, x9
	stp	x8, x9, [x19]
	str	wzr, [x19, #20]
	str	xzr, [x19, #32]
	b	LBB0_28
LBB0_12:
	add	x0, sp, #8
	mov	x1, x19
	mov	x2, x20
	bl	_calc_cropping_offsets
Lloh18:
	adrp	x8, _AV_FRAME_CROP_UNALIGNED@GOTPAGE
Lloh19:
	ldr	x8, [x8, _AV_FRAME_CROP_UNALIGNED@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w21
	b.eq	LBB0_17
LBB0_13:
	ldr	x9, [x19, #40]
	ldr	x8, [x9]
	cbz	x8, LBB0_16
; %bb.14:
	add	x9, x9, #8
	add	x10, sp, #8
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x10], #8
	add	x8, x11, x8
	stur	x8, [x9, #-8]
	ldr	x8, [x9], #8
	cbnz	x8, LBB0_15
LBB0_16:
	mov	w0, #0
	ldpsw	x8, x9, [x19, #16]
	ldp	x10, x11, [x19]
	add	x8, x9, x8
	sub	x8, x10, x8
	ldp	x9, x10, [x19, #24]
	add	x9, x10, x9
	sub	x9, x11, x9
	stp	x8, x9, [x19]
	stp	xzr, xzr, [x23, #8]
	str	xzr, [x23]
	b	LBB0_28
LBB0_17:
	ldrsw	x0, [x23]
	cbz	w0, LBB0_19
; %bb.18:
	bl	_ff_ctz
	mov	x22, x0
	ldr	w21, [x24]
	b	LBB0_20
LBB0_19:
	ldr	w21, [x24]
	mov	x22, x21
LBB0_20:
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	cbz	x8, LBB0_26
; %bb.21:
	mov	x25, #0
	add	x26, sp, #8
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	bl	_ff_ctz
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	mov	x1, x21
	bl	_FFMIN
	mov	x21, x0
	ldr	x8, [x19, #40]
	add	x8, x8, x25
	ldr	x8, [x8, #8]
	add	x25, x25, #8
	cbz	x8, LBB0_26
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x26, x25]
	cbnz	x0, LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	w0, [x24]
	b	LBB0_23
LBB0_26:
	subs	w8, w22, w21
	b.ge	LBB0_30
LBB0_27:
Lloh21:
	adrp	x8, _AVERROR_BUG@GOTPAGE
Lloh22:
	ldr	x8, [x8, _AVERROR_BUG@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
LBB0_28:
	ldr	x8, [sp, #40]
Lloh24:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh25:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_32
; %bb.29:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_30:
	cmp	w21, #4
	b.gt	LBB0_13
; %bb.31:
	add	w8, w8, #5
	mov	w9, #-1
	lsl	w8, w9, w8
	ldr	w9, [x19, #16]
	and	w8, w9, w8
	str	w8, [x19, #16]
	add	x0, sp, #8
	mov	x1, x19
	mov	x2, x20
	bl	_calc_cropping_offsets
	b	LBB0_13
LBB0_32:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_ERANGE,4,2                     ; @ERANGE
	.comm	_AVERROR_BUG,4,2                ; @AVERROR_BUG
	.comm	_AV_PIX_FMT_FLAG_BITSTREAM,4,2  ; @AV_PIX_FMT_FLAG_BITSTREAM
	.comm	_AV_PIX_FMT_FLAG_HWACCEL,4,2    ; @AV_PIX_FMT_FLAG_HWACCEL
	.comm	_AV_FRAME_CROP_UNALIGNED,4,2    ; @AV_FRAME_CROP_UNALIGNED
.subsections_via_symbols
