	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_calculate_bounding_box      ## -- Begin function ff_calculate_bounding_box
	.p2align	4, 0x90
_ff_calculate_bounding_box:             ## @ff_calculate_bounding_box
	.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
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $r8d killed $r8d def $r8
                                        ## kill: def $ecx killed $ecx def $rcx
	xorl	%eax, %eax
	movslq	%edx, %r10
	movl	%ecx, %r13d
	movl	$0, %r11d
	testl	%ecx, %ecx
	jle	LBB0_6
## %bb.1:
	movl	%r8d, %r14d
	leaq	(,%r10,4), %r12
	xorl	%r11d, %r11d
	movq	%rsi, %r15
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_2:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%r11
	addq	$4, %r15
	cmpq	%r13, %r11
	je	LBB0_21
LBB0_3:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	%r14, %rdx
	movq	%r15, %rbx
	testl	%r8d, %r8d
	jle	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_3 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r9d, (%rbx)
	jg	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	addq	%r12, %rbx
	decq	%rdx
	jne	LBB0_4
	jmp	LBB0_2
LBB0_6:
	cmpl	%ecx, %r11d
	je	LBB0_35
## %bb.7:
	jge	LBB0_13
## %bb.8:
	movslq	%ecx, %rdx
	movslq	%r11d, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	%r8d, %r12d
	leaq	(%rsi,%rdx,4), %r15
	addq	$-4, %r15
	decq	%rdx
	leaq	(,%r10,4), %rbx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	leaq	-1(%r14), %rdx
	addq	$-4, %r15
	cmpq	-48(%rbp), %r14                 ## 8-byte Folded Reload
	jle	LBB0_23
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movq	%rdx, %r14
	movq	%r12, %rdx
	movq	%r15, %rax
	testl	%r8d, %r8d
	jle	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r9d, (%rax)
	jg	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	addq	%rbx, %rax
	decq	%rdx
	jne	LBB0_11
	jmp	LBB0_9
LBB0_13:
	leal	-1(%rcx), %r14d
LBB0_14:
	testl	%r8d, %r8d
	jle	LBB0_24
LBB0_15:
	leaq	(,%r10,4), %r15
	xorl	%ebx, %ebx
	movq	%rsi, %rdx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_17 Depth=1
	incl	%ebx
	addq	%r15, %rdx
	cmpl	%r8d, %ebx
	je	LBB0_22
LBB0_17:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_19 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_16
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_17 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r9d, (%rdx,%rax,4)
	jg	LBB0_25
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=2
	incq	%rax
	cmpq	%rax, %r13
	jne	LBB0_19
	jmp	LBB0_16
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_35
LBB0_22:
	leal	-1(%r8), %eax
	jmp	LBB0_34
LBB0_23:
	movl	%edx, %r14d
	testl	%r8d, %r8d
	jg	LBB0_15
LBB0_24:
	xorl	%ebx, %ebx
LBB0_25:
	leal	-1(%r8), %eax
	cmpl	%r8d, %ebx
	jge	LBB0_33
## %bb.26:
	movl	%eax, %edx
	imull	%r10d, %edx
	movslq	%edx, %rdx
	leaq	(%rsi,%rdx,4), %rsi
	leal	-1(%rbx), %r15d
	shlq	$2, %r10
	negq	%r10
	jmp	LBB0_28
	.p2align	4, 0x90
LBB0_27:                                ##   in Loop: Header=BB0_28 Depth=1
	leal	-1(%rax), %edx
	addq	%r10, %rsi
	cmpl	%ebx, %eax
	movl	%edx, %eax
	jle	LBB0_36
LBB0_28:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_30 Depth 2
	testl	%ecx, %ecx
	jle	LBB0_27
## %bb.29:                              ##   in Loop: Header=BB0_28 Depth=1
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_30:                                ##   Parent Loop BB0_28 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpl	%r9d, (%rsi,%rdx,4)
	jg	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_30 Depth=2
	incq	%rdx
	cmpq	%rdx, %r13
	jne	LBB0_30
	jmp	LBB0_27
LBB0_33:
	movl	%ebx, %r8d
LBB0_34:
	movl	%r11d, (%rdi)
	movl	%r8d, 4(%rdi)
	movl	%r14d, 8(%rdi)
	movl	%eax, 12(%rdi)
	movl	$1, %eax
LBB0_35:
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_36:
	movl	%ebx, %r8d
	movl	%r15d, %eax
	jmp	LBB0_34
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ff_calculate_bounding_box      ; -- Begin function ff_calculate_bounding_box
	.p2align	2
_ff_calculate_bounding_box:             ; @ff_calculate_bounding_box
	.cfi_startproc
; %bb.0:
                                        ; kill: def $w3 killed $w3 def $x3
                                        ; kill: def $w2 killed $w2 def $x2
	mov	w10, w3
	subs	w9, w3, #1
	b.lt	LBB0_6
; %bb.1:
	mov	x8, #0
	sbfiz	x11, x2, #2, #32
	mov	x12, x1
	mov	w13, w4
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x8, x8, #1
	add	x12, x12, #4
	cmp	x8, x10
	b.eq	LBB0_8
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_4 Depth 2
	mov	x14, x13
	mov	x15, x12
	cmp	w4, #1
	b.lt	LBB0_2
LBB0_4:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w16, [x15]
	cmp	w16, w5
	b.gt	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=2
	add	x15, x15, x11
	subs	x14, x14, #1
	b.ne	LBB0_4
	b	LBB0_2
LBB0_6:
	mov	w8, #0
LBB0_7:
	cmp	w8, w3
	b.ne	LBB0_9
LBB0_8:
	mov	w0, #0
	ret
LBB0_9:
	b.ge	LBB0_16
; %bb.10:
	sxtw	x9, w3
	mov	x11, x8
	sxtw	x11, w11
	sub	x15, x9, #1
	mov	w12, w4
	mov	x9, x2
	sbfiz	x13, x9, #2, #32
	add	x14, x1, x15, lsl #2
	b	LBB0_12
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	sub	x15, x9, #1
	sub	x14, x14, #4
	cmp	x9, x11
	b.le	LBB0_15
LBB0_12:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_13 Depth 2
	mov	x9, x15
	mov	x15, x12
	mov	x16, x14
	cmp	w4, #1
	b.lt	LBB0_11
LBB0_13:                                ;   Parent Loop BB0_12 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w17, [x16]
	cmp	w17, w5
	b.gt	LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	add	x16, x16, x13
	subs	x15, x15, #1
	b.ne	LBB0_13
	b	LBB0_11
LBB0_15:
	mov	x9, x15
LBB0_16:
	mov	w12, #0
	subs	w11, w4, #1
	b.lt	LBB0_23
; %bb.17:
	mov	x13, x2
	sbfiz	x13, x13, #2, #32
	lsl	x14, x10, #2
	mov	x15, x1
	b	LBB0_19
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	w12, w12, #1
	add	x15, x15, x13
	cmp	w12, w4
	b.eq	LBB0_31
LBB0_19:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	cmp	w3, #1
	b.lt	LBB0_18
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x16, #0
LBB0_21:                                ;   Parent Loop BB0_19 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w17, [x15, x16]
	cmp	w17, w5
	b.gt	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	add	x16, x16, #4
	cmp	x14, x16
	b.ne	LBB0_21
	b	LBB0_18
LBB0_23:
	cmp	w12, w4
	b.ge	LBB0_30
; %bb.24:
	mov	x15, #0
	mul	w13, w11, w2
	add	x14, x1, w13, sxtw #2
	sub	w13, w12, #1
	sub	x15, x15, w2, sxtw #2
	lsl	x10, x10, #2
	b	LBB0_26
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=1
	sub	w16, w11, #1
	add	x14, x14, x15
	cmp	w11, w12
	mov	x11, x16
	b.le	LBB0_32
LBB0_26:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_28 Depth 2
	cmp	w3, #1
	b.lt	LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=1
	mov	x16, #0
LBB0_28:                                ;   Parent Loop BB0_26 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w17, [x14, x16]
	cmp	w17, w5
	b.gt	LBB0_30
; %bb.29:                               ;   in Loop: Header=BB0_28 Depth=2
	add	x16, x16, #4
	cmp	x10, x16
	b.ne	LBB0_28
	b	LBB0_25
LBB0_30:
	mov	x4, x12
LBB0_31:
	stp	w8, w4, [x0]
	mov	w8, #1
	stp	w9, w11, [x0, #8]
	mov	x0, x8
	ret
LBB0_32:
	mov	x4, x12
	mov	x11, x13
	b	LBB0_31
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
