	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_cropping_offsets
_calc_cropping_offsets:                 ## @calc_cropping_offsets
	.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
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	24(%rsi), %r8
	cmpq	$0, (%r8)
	je	LBB0_13
## %bb.1:
	movq	_AV_PIX_FMT_FLAG_PAL@GOTPCREL(%rip), %rax
	movq	_FF_PSEUDOPAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	orl	(%rax), %r10d
	andl	8(%rdx), %r10d
	xorl	%r11d, %r11d
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	leal	-1(%r11), %eax
	movl	$0, %r9d
	movl	$0, %ecx
	cmpl	$1, %eax
	ja	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdx), %r9d
	movl	4(%rdx), %ecx
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	testl	%r10d, %r10d
	je	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$1, %r11
	je	LBB0_11
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	12(%rdx), %r15d
	testl	%r15d, %r15d
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	16(%rdx), %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r14,%rbx,8), %eax
	cmpq	%rax, %r11
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_8
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rsi), %r15d
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r15d
	movq	8(%rsi), %rcx
	imull	(%rcx,%r11,4), %r15d
	movl	16(%rsi), %eax
	movl	%r9d, %ecx
	sarl	%cl, %eax
	imull	4(%r14,%rbx,8), %eax
	addl	%r15d, %eax
	cltq
	movq	%rax, (%rdi,%r11,8)
	cmpq	$0, 8(%r8,%r11,8)
	leaq	1(%r11), %r11
	jne	LBB0_2
	jmp	LBB0_13
LBB0_10:
	movq	_AVERROR_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_14
LBB0_11:
	movq	$0, 8(%rdi)
LBB0_13:
	xorl	%eax, %eax
LBB0_14:
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_FLAG_PAL,4,2        ## @AV_PIX_FMT_FLAG_PAL
	.comm	_FF_PSEUDOPAL,4,2               ## @FF_PSEUDOPAL
	.comm	_AVERROR_BUG,4,2                ## @AVERROR_BUG
	.no_dead_strip	_calc_cropping_offsets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_cropping_offsets
_calc_cropping_offsets:                 ; @calc_cropping_offsets
	.cfi_startproc
; %bb.0:
	ldr	x8, [x1, #24]
	ldr	x9, [x8]
	cbz	x9, LBB0_11
; %bb.1:
	mov	x9, #0
	ldr	w10, [x2, #8]
Lloh0:
	adrp	x11, _AV_PIX_FMT_FLAG_PAL@GOTPAGE
Lloh1:
	ldr	x11, [x11, _AV_PIX_FMT_FLAG_PAL@GOTPAGEOFF]
Lloh2:
	ldr	w11, [x11]
Lloh3:
	adrp	x12, _FF_PSEUDOPAL@GOTPAGE
Lloh4:
	ldr	x12, [x12, _FF_PSEUDOPAL@GOTPAGEOFF]
Lloh5:
	ldr	w12, [x12]
	orr	w11, w12, w11
	and	w10, w11, w10
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	sub	w11, w9, #1
	cmp	w11, #1
	b.hi	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w11, w12, [x2]
	cbnz	w10, LBB0_5
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	w11, #0
	mov	w12, #0
	cbz	w10, LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmp	x9, #1
	b.eq	LBB0_13
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w14, [x2, #12]
	cmp	w14, #1
	b.lt	LBB0_12
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x13, [x2, #16]
	add	x13, x13, #4
LBB0_8:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldur	w15, [x13, #-4]
	cmp	x9, x15
	b.eq	LBB0_10
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	add	x13, x13, #8
	subs	x14, x14, #1
	b.ne	LBB0_8
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w14, [x1]
	ldr	x15, [x1, #8]
	ldr	w15, [x15, x9, lsl #2]
	asr	w12, w14, w12
	mul	w12, w15, w12
	ldr	w14, [x1, #16]
	asr	w11, w14, w11
	ldr	w13, [x13]
	madd	w11, w11, w13, w12
	sxtw	x11, w11
	str	x11, [x0, x9, lsl #3]
	add	x9, x9, #1
	ldr	x11, [x8, x9, lsl #3]
	cbnz	x11, LBB0_2
LBB0_11:
	mov	w0, #0
	ret
LBB0_12:
Lloh6:
	adrp	x8, _AVERROR_BUG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AVERROR_BUG@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ret
LBB0_13:
	str	xzr, [x0, #8]
	mov	w0, #0
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_FLAG_PAL,4,2        ; @AV_PIX_FMT_FLAG_PAL
	.comm	_FF_PSEUDOPAL,4,2               ; @FF_PSEUDOPAL
	.comm	_AVERROR_BUG,4,2                ; @AVERROR_BUG
	.no_dead_strip	_calc_cropping_offsets
.subsections_via_symbols
