	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_write_image_line2           ## -- Begin function av_write_image_line2
	.p2align	4, 0x90
_av_write_image_line2:                  ## @av_write_image_line2
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movl	24(%rbp), %r13d
	movslq	16(%rbp), %rax
	movq	8(%rcx), %rdi
	leaq	(%rax,%rax,4), %rbx
	movslq	(%rdi,%rbx,4), %rax
	movl	4(%rdi,%rbx,4), %r11d
	movslq	8(%rdi,%rbx,4), %r14
	movl	(%rcx), %r15d
	movslq	12(%rdi,%rbx,4), %r10
	movq	_AV_PIX_FMT_FLAG_BITSTREAM@GOTPCREL(%rip), %rcx
	testl	%r15d, (%rcx)
	je	LBB0_8
## %bb.1:
	movl	%r11d, %edi
	testl	%r13d, %r13d
	movl	32(%rbp), %r11d
	je	LBB0_26
## %bb.2:
	movq	%r14, %rbx
	imull	%ebx, %r8d
	addl	%r10d, %r8d
	movl	%r8d, %ecx
	andl	$7, %ecx
	addl	%ecx, %edi
	movl	$8, %ecx
	subl	%edi, %ecx
	movslq	(%rdx,%rax,4), %rdx
	movslq	%r9d, %rdi
	imulq	%rdx, %rdi
	shlq	$2, %rdi
	addq	(%rsi,%rax,8), %rdi
	sarl	$3, %r8d
	movslq	%r8d, %rax
	leaq	(%rdi,%rax,4), %rsi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	cmpl	$4, %r11d
	sete	%r8b
	setne	%r9b
	testb	$1, %r13b
	movq	%r14, %rdx
	jne	LBB0_4
## %bb.3:
	movq	%rdx, %r15
	movl	%r13d, %edi
	movq	%r12, %rbx
	jmp	LBB0_5
LBB0_8:
	movl	%r15d, -48(%rbp)                ## 4-byte Spill
	movl	16(%rdi,%rbx,4), %edi
	movslq	(%rdx,%rax,4), %rcx
	movslq	%r9d, %rdx
	imulq	%rcx, %rdx
	shlq	$2, %rdx
	addq	(%rsi,%rax,8), %rdx
	imull	%r14d, %r8d
	movslq	%r8d, %rax
	leaq	(%rdx,%rax,4), %rax
	leaq	(%rax,%r10,4), %r15
	movl	%edi, -44(%rbp)                 ## 4-byte Spill
	addl	%edi, %r11d
	cmpl	$9, %r11d
	jge	LBB0_9
## %bb.14:
	testl	%r13d, %r13d
	movl	32(%rbp), %r11d
	je	LBB0_26
## %bb.15:
	movq	%r14, %r10
	movq	_AV_PIX_FMT_FLAG_BE@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	testl	%esi, (%rax)
	setne	%cl
	leaq	(%r15,%rcx,4), %rax
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	cmpl	$4, %r11d
	sete	%r8b
	setne	%r9b
	testb	$1, %r13b
	jne	LBB0_17
## %bb.16:
	movl	%r13d, %edi
	movq	%r12, %rbx
	jmp	LBB0_18
LBB0_4:
	movl	(%r12), %eax
	shll	%cl, %eax
	leal	-1(%r13), %edi
	orl	%eax, (%rsi)
	leaq	(%r12,%r9,4), %rbx
	leaq	(%r12,%r8,4), %r12
	movq	%rdx, %r15
	subl	%edx, %ecx
	movl	%ecx, %eax
	sarl	$3, %eax
	negl	%eax
	cltq
	leaq	(%rsi,%rax,4), %rsi
	andl	$7, %ecx
LBB0_5:
	cmpl	$1, %r13d
	movl	32(%rbp), %r14d
	je	LBB0_26
## %bb.6:
	leaq	(,%r8,8), %r10
	shlq	$2, %r8
	leaq	(,%r9,8), %r11
	shlq	$2, %r9
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r9), %rax
	leaq	(%r12,%r8), %rdx
	cmpl	$4, %r14d
	cmoveq	%rdx, %rax
	movq	%rbx, %rdx
	cmoveq	%r12, %rdx
	movl	(%rdx), %edx
	shll	%cl, %edx
	orl	%edx, (%rsi)
	subl	%r15d, %ecx
	movl	%ecx, %edx
	sarl	$3, %edx
	negl	%edx
	andl	$7, %ecx
	movl	(%rax), %eax
	shll	%cl, %eax
	movslq	%edx, %rdx
	orl	%eax, (%rsi,%rdx,4)
	leaq	(%rsi,%rdx,4), %rax
	subl	%r15d, %ecx
	movl	%ecx, %edx
	sarl	$3, %edx
	negl	%edx
	movslq	%edx, %rdx
	leaq	(%rax,%rdx,4), %rsi
	andl	$7, %ecx
	addq	%r10, %r12
	addq	%r11, %rbx
	addl	$-2, %edi
	jne	LBB0_7
	jmp	LBB0_26
LBB0_9:
	movl	%r11d, -52(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	movl	32(%rbp), %r11d
	je	LBB0_26
## %bb.10:
	movq	%r14, %rax
	xorl	%ecx, %ecx
	xorl	%edx, %edx
	cmpl	$4, %r11d
	sete	%cl
	setne	%dl
	shlq	$2, %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	shlq	$2, %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	shlq	$2, %rax
	movq	%r12, %r14
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_11
LBB0_24:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	callq	_AV_RL32
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_AV_WL32
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_11 Depth=1
	addq	-72(%rbp), %r14                 ## 8-byte Folded Reload
	addq	-64(%rbp), %r12                 ## 8-byte Folded Reload
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %r15
	testl	%r13d, %r13d
	movl	32(%rbp), %r11d
	je	LBB0_26
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	decl	%r13d
	cmpl	$4, %r11d
	movq	%r12, %rax
	cmoveq	%r14, %rax
	movl	(%rax), %ebx
	movq	_AV_PIX_FMT_FLAG_BE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$16, -52(%rbp)                  ## 4-byte Folded Reload
	ja	LBB0_22
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_21
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	callq	_AV_RB16
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_AV_WB16
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_11 Depth=1
	testl	%eax, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_24
## %bb.23:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	callq	_AV_RB32
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_AV_WB32
	jmp	LBB0_25
LBB0_21:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r15, %rdi
	callq	_AV_RL16
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	orl	%eax, %ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_AV_WL16
	jmp	LBB0_25
LBB0_17:
	leal	-1(%r13), %edi
	leaq	(%r12,%r9,4), %rbx
	movl	(%r12), %edx
	leaq	(%r12,%r8,4), %r12
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	orl	%edx, (%rax)
	leaq	(%rax,%r10,4), %rax
LBB0_18:
	cmpl	$1, %r13d
	movl	32(%rbp), %r15d
	je	LBB0_26
## %bb.19:
	movq	%r10, %r13
	leaq	(,%r8,8), %r10
	shlq	$2, %r8
	leaq	(,%r9,8), %r11
	shlq	$2, %r9
	leaq	(,%r13,8), %r14
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	leaq	(%rbx,%r9), %rsi
	leaq	(%r12,%r8), %rcx
	cmpl	$4, %r15d
	cmoveq	%rcx, %rsi
	movq	%rbx, %rcx
	cmoveq	%r12, %rcx
	movl	(%rcx), %edx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	shll	%cl, %edx
	orl	%edx, (%rax)
	movl	(%rsi), %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %edx
	orl	%edx, (%rax,%r13,4)
	addq	%r10, %r12
	addq	%r11, %rbx
	addq	%r14, %rax
	addl	$-2, %edi
	jne	LBB0_20
LBB0_26:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_FLAG_BITSTREAM,4,2  ## @AV_PIX_FMT_FLAG_BITSTREAM
	.comm	_AV_PIX_FMT_FLAG_BE,4,2         ## @AV_PIX_FMT_FLAG_BE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_av_write_image_line2           ; -- Begin function av_write_image_line2
	.p2align	2
_av_write_image_line2:                  ; @av_write_image_line2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x19, x7
	mov	x20, x0
	ldr	w22, [x29, #16]
	ldr	x8, [x3, #8]
	mov	w9, #20
	smaddl	x12, w6, w9, x8
	ldp	w10, w9, [x12]
                                        ; kill: def $w10 killed $w10 def $x10
	sxtw	x10, w10
	ldpsw	x8, x11, [x12, #8]
	ldr	w24, [x3]
Lloh0:
	adrp	x13, _AV_PIX_FMT_FLAG_BITSTREAM@GOTPAGE
Lloh1:
	ldr	x13, [x13, _AV_PIX_FMT_FLAG_BITSTREAM@GOTPAGEOFF]
Lloh2:
	ldr	w13, [x13]
	tst	w13, w24
	b.eq	LBB0_4
; %bb.1:
	cbz	w19, LBB0_18
; %bb.2:
	madd	w11, w8, w4, w11
	and	w12, w11, #0x7
	mov	w13, #8
	add	w9, w9, w12
	sub	w9, w13, w9
	ldr	x12, [x1, x10, lsl #3]
	ldr	w10, [x2, x10, lsl #2]
	mul	w10, w10, w5
	add	x10, x12, w10, sxtw #2
	asr	w11, w11, #3
	add	x10, x10, w11, sxtw #2
	cmp	w22, #4
	cset	w11, eq
	cset	w12, ne
	lsl	x11, x11, #2
	lsl	x12, x12, #2
	mov	x13, x20
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w22, #4
	csel	x14, x13, x20, eq
	ldr	w14, [x14]
	lsl	w14, w14, w9
	ldr	w15, [x10]
	orr	w14, w15, w14
	str	w14, [x10]
	sub	w9, w9, w8
	neg	w14, w9, asr #3
	add	x10, x10, w14, sxtw #2
	and	w9, w9, #0x7
	add	x13, x13, x11
	add	x20, x20, x12
	sub	w19, w19, #1
	cbnz	w19, LBB0_3
	b	LBB0_18
LBB0_4:
	ldr	w23, [x12, #16]
	ldr	x12, [x1, x10, lsl #3]
	ldr	w10, [x2, x10, lsl #2]
	mul	w10, w10, w5
	add	x10, x12, w10, sxtw #2
	mul	w12, w8, w4
	add	x10, x10, w12, sxtw #2
	add	x21, x10, x11, lsl #2
	add	w25, w23, w9
	cmp	w25, #9
	b.ge	LBB0_8
; %bb.5:
	cbz	w19, LBB0_18
; %bb.6:
Lloh3:
	adrp	x9, _AV_PIX_FMT_FLAG_BE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _AV_PIX_FMT_FLAG_BE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w24
	cset	w9, ne
	add	x9, x21, w9, uxtw #2
	cmp	w22, #4
	cset	w10, eq
	lsl	x10, x10, #2
	cset	w11, ne
	lsl	x11, x11, #2
	lsl	x8, x8, #2
	mov	x12, x20
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w22, #4
	csel	x13, x12, x20, eq
	ldr	w13, [x13]
	lsl	w13, w13, w23
	ldr	w14, [x9]
	orr	w13, w14, w13
	str	w13, [x9]
	add	x12, x12, x10
	add	x20, x20, x11
	add	x9, x9, x8
	sub	w19, w19, #1
	cbnz	w19, LBB0_7
	b	LBB0_18
LBB0_8:
	cbz	w19, LBB0_18
; %bb.9:
	cmp	w22, #4
	cset	w9, eq
	cset	w10, ne
	lsl	x11, x9, #2
	lsl	x9, x10, #2
	stp	x9, x11, [sp]                   ; 16-byte Folded Spill
	lsl	x28, x8, #2
	mov	x26, x20
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	bl	_AV_RL32
	lsl	w8, w27, w23
	orr	w1, w0, w8
	mov	x0, x21
	bl	_AV_WL32
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	add	x26, x26, x8
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	add	x20, x20, x8
	add	x21, x21, x28
	cbz	w19, LBB0_18
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	sub	w19, w19, #1
	cmp	w22, #4
	csel	x8, x26, x20, eq
	ldr	w27, [x8]
Lloh6:
	adrp	x8, _AV_PIX_FMT_FLAG_BE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AV_PIX_FMT_FLAG_BE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	and	w8, w8, w24
	mov	x0, x21
	cmp	w25, #16
	b.hi	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cbz	w8, LBB0_17
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_AV_RB16
	lsl	w8, w27, w23
	orr	w1, w0, w8
	mov	x0, x21
	bl	_AV_WB16
	b	LBB0_11
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	cbz	w8, LBB0_10
; %bb.16:                               ;   in Loop: Header=BB0_12 Depth=1
	bl	_AV_RB32
	lsl	w8, w27, w23
	orr	w1, w0, w8
	mov	x0, x21
	bl	_AV_WB32
	b	LBB0_11
LBB0_17:                                ;   in Loop: Header=BB0_12 Depth=1
	bl	_AV_RL16
	lsl	w8, w27, w23
	orr	w1, w0, w8
	mov	x0, x21
	bl	_AV_WL16
	b	LBB0_11
LBB0_18:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_FLAG_BITSTREAM,4,2  ; @AV_PIX_FMT_FLAG_BITSTREAM
	.comm	_AV_PIX_FMT_FLAG_BE,4,2         ; @AV_PIX_FMT_FLAG_BE
.subsections_via_symbols
