	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pack_yuv
_pack_yuv:                              ## @pack_yuv
	.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
                                        ## kill: def $ecx killed $ecx def $rcx
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	(%rdi), %r8d
	leal	-1(%r8), %eax
	movq	8(%rdi), %rsi
	movl	(%rsi), %r14d
	movl	4(%rsi), %r10d
	cltd
	idivl	%r14d
	movl	%eax, %r12d
	movq	(%rbx), %r11
	movq	8(%rbx), %r9
	movq	%rcx, %rax
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	cltd
	idivl	%r10d
	movslq	4(%r11), %rcx
	cltq
	imulq	%rax, %rcx
	shlq	$2, %rcx
	addq	8(%r9), %rcx
	movslq	8(%r11), %rdi
	imulq	%rax, %rdi
	shlq	$2, %rdi
	addq	16(%r9), %rdi
	movl	%r8d, %eax
	cltd
	idivl	%r14d
	testl	%edx, %edx
	jne	LBB0_13
## %bb.1:
	movl	16(%r15), %eax
	cltd
	idivl	%r10d
	testl	%edx, %edx
	je	LBB0_2
LBB0_13:
	testl	%r12d, %r12d
	js	LBB0_23
## %bb.14:
	xorl	%eax, %eax
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_15:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_17 Depth 2
                                        ##       Child Loop BB0_19 Depth 3
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	testl	%r10d, %r10d
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_21
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	xorl	%ecx, %ecx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=2
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	incl	%ecx
	cmpl	4(%rsi), %ecx
	jge	LBB0_21
LBB0_17:                                ##   Parent Loop BB0_15 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_19 Depth 3
	cmpl	$0, (%rsi)
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	jle	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%ecx, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_15 Depth=1
                                        ##     Parent Loop BB0_17 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movq	8(%rbx), %rax
	movq	(%rax), %rax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	movl	16(%r15), %esi
	decl	%esi
	movl	-52(%rbp), %edi                 ## 4-byte Reload
	callq	_FFMIN
	movq	(%rbx), %rcx
	movq	%r13, %r12
	movq	%r15, %r13
	movslq	(%rcx), %r15
	imulq	%rax, %r15
	movq	8(%r13), %rax
	movl	(%rax), %edi
	imull	-48(%rbp), %edi                 ## 4-byte Folded Reload
	addl	%r14d, %edi
	movl	(%r13), %esi
	decl	%esi
	callq	_FFMIN
	addq	%r15, %rax
	movq	%r13, %r15
	movq	%r12, %r13
	movq	-96(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %eax
	movl	%eax, (%r12)
	addq	$4, %r13
	incl	%r14d
	movq	8(%r15), %rsi
	cmpl	(%rsi), %r14d
	jl	LBB0_19
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_15 Depth=1
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx), %eax
	movl	%eax, (%r13)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %eax
	movl	%eax, 4(%r13)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	cmpl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_23
## %bb.22:                              ##   in Loop: Header=BB0_15 Depth=1
	incl	%eax
	addq	$8, %r13
	addq	$4, %rdi
	addq	$4, %rcx
	movl	4(%rsi), %r10d
	jmp	LBB0_15
LBB0_2:
	testl	%r12d, %r12d
	js	LBB0_23
## %bb.3:
	xorl	%r14d, %r14d
	movl	%r12d, -44(%rbp)                ## 4-byte Spill
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
                                        ##       Child Loop BB0_8 Depth 3
	movq	%rdi, %r12
	movq	%rcx, %rbx
	testl	%r10d, %r10d
	jle	LBB0_11
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rsi), %edx
	xorl	%r8d, %r8d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_6 Depth=2
	incl	%r8d
	incl	%r15d
	cmpl	%r10d, %r8d
	jge	LBB0_11
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_8 Depth 3
	testl	%edx, %edx
	jle	LBB0_10
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	(%r9), %rdi
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ##     Parent Loop BB0_6 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	imull	%r14d, %edx
	movl	(%r11), %ecx
	imull	%r15d, %ecx
	addl	%edx, %ecx
	addl	%eax, %ecx
	movslq	%ecx, %rcx
	movl	(%rdi,%rcx,4), %ecx
	movl	%ecx, (%r13)
	addq	$4, %r13
	incl	%eax
	movl	(%rsi), %edx
	cmpl	%edx, %eax
	jl	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	4(%rsi), %r10d
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=1
	movl	(%rbx), %eax
	movl	%eax, (%r13)
	movl	(%r12), %eax
	movl	%eax, 4(%r13)
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	je	LBB0_23
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rbx, %rcx
	movq	%r12, %rdi
	incl	%r14d
	addq	$8, %r13
	addq	$4, %rdi
	addq	$4, %rcx
	movl	4(%rsi), %r10d
	jmp	LBB0_4
LBB0_23:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_pack_yuv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pack_yuv
_pack_yuv:                              ; @pack_yuv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w12, [x0]
	ldr	x8, [x0, #8]
	ldp	w13, w11, [x8]
	str	w3, [sp, #28]                   ; 4-byte Folded Spill
	sdiv	w14, w3, w11
	ldp	x10, x9, [x1]
	ldp	w15, w16, [x10, #4]
	mul	w15, w15, w14
	ldp	x17, x0, [x9, #8]
	add	x1, x17, w15, sxtw #2
	sub	w15, w12, #1
	mul	w14, w16, w14
	add	x0, x0, w14, sxtw #2
	sdiv	w14, w12, w13
	msub	w12, w14, w13, w12
	sdiv	w2, w15, w13
	cbnz	w12, LBB0_2
; %bb.1:
	ldr	w12, [x22, #16]
	sdiv	w13, w12, w11
	msub	w12, w13, w11, w12
	cbz	w12, LBB0_12
LBB0_2:
	tbnz	w2, #31, LBB0_22
; %bb.3:
	mov	w28, #0
	str	w2, [sp, #4]                    ; 4-byte Folded Spill
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	cmp	w11, #1
	stp	x0, x1, [sp, #8]                ; 16-byte Folded Spill
	b.lt	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w27, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w27, w27, #1
	ldr	w9, [x8, #4]
	cmp	w27, w9
	b.ge	LBB0_10
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	ldr	w9, [x8]
	cmp	w9, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	w25, #0
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	add	w23, w27, w8
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	x8, [x21, #8]
	ldr	x26, [x8]
	ldr	w8, [x22, #16]
	sub	w1, w8, #1
	mov	x0, x23
	bl	_FFMIN
	mov	x24, x0
	ldr	x8, [x21]
	ldrsw	x19, [x8]
	ldr	x8, [x22, #8]
	ldr	w8, [x8]
	madd	w0, w28, w8, w25
	ldr	w8, [x22]
	sub	w1, w8, #1
	bl	_FFMIN
	madd	x8, x24, x19, x0
	ldr	w8, [x26, x8, lsl #2]
	str	w8, [x20], #4
	add	w25, w25, #1
	ldr	x8, [x22, #8]
	ldr	w9, [x8]
	cmp	w25, w9
	b.lt	LBB0_9
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x0, x1, [sp, #8]                ; 16-byte Folded Reload
	ldr	w9, [x1]
	str	w9, [x20]
	ldr	w9, [x0]
	str	w9, [x20, #4]
	ldr	w9, [sp, #4]                    ; 4-byte Folded Reload
	cmp	w28, w9
	b.eq	LBB0_22
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
	add	w28, w28, #1
	add	x20, x20, #8
	add	x0, x0, #4
	add	x1, x1, #4
	ldr	w11, [x8, #4]
	b	LBB0_4
LBB0_12:
	tbnz	w2, #31, LBB0_22
; %bb.13:
	mov	w12, #0
	cmp	w11, #1
	b.lt	LBB0_20
LBB0_14:
	mov	w13, #0
	ldr	w15, [x8]
	ldr	w14, [sp, #28]                  ; 4-byte Folded Reload
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	add	w13, w13, #1
	add	w14, w14, #1
	cmp	w13, w11
	b.ge	LBB0_20
LBB0_16:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	cmp	w15, #1
	b.lt	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	w11, #0
	ldr	x16, [x9]
LBB0_18:                                ;   Parent Loop BB0_16 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w17, [x10]
	mul	w17, w14, w17
	madd	w15, w12, w15, w17
	add	w15, w11, w15
	ldr	w15, [x16, w15, sxtw #2]
	str	w15, [x20], #4
	add	w11, w11, #1
	ldr	w15, [x8]
	cmp	w11, w15
	b.lt	LBB0_18
; %bb.19:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w11, [x8, #4]
	b	LBB0_15
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x1]
	str	w11, [x20]
	ldr	w11, [x0]
	str	w11, [x20, #4]
	cmp	w12, w2
	b.eq	LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	add	w12, w12, #1
	add	x20, x20, #8
	add	x0, x0, #4
	add	x1, x1, #4
	ldr	w11, [x8, #4]
	cmp	w11, #1
	b.ge	LBB0_14
	b	LBB0_20
LBB0_22:
	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
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_pack_yuv
.subsections_via_symbols
