	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function image_copy
_image_copy:                            ## @image_copy
	.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
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r14d
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rbx
	movq	24(%rbp), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	16(%rbp), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	%r8d, %edi
	callq	_av_pix_fmt_desc_get
	testq	%rax, %rax
	je	LBB0_13
## %bb.1:
	movq	%rax, %r12
	movl	(%rax), %eax
	movq	_AV_PIX_FMT_FLAG_HWACCEL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_2
LBB0_13:
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	_AV_PIX_FMT_FLAG_PAL@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	jne	LBB0_14
## %bb.3:
	movq	_FF_PSEUDOPAL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_4
LBB0_14:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %esi
	movq	(%r13), %rdx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	callq	*-80(%rbp)                      ## 8-byte Folded Reload
	movl	(%r15), %eax
	movq	8(%rbx), %rdi
	testl	%eax, (%r12)
	je	LBB0_16
## %bb.15:
	movq	8(%r13), %rsi
LBB0_18:
	movl	$1024, %edx                     ## imm = 0x400
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memcpy                         ## TAILCALL
LBB0_16:
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.17:
	movq	8(%r13), %rsi
	testq	%rsi, %rsi
	jne	LBB0_18
	jmp	LBB0_13
LBB0_4:
	cmpl	$0, 4(%r12)
	jle	LBB0_13
## %bb.5:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r12), %rcx
	movq	(%rcx,%rbx,8), %rsi
	incq	%rsi
	movl	%eax, %edi
	callq	_FFMAX
	incq	%rbx
	movslq	4(%r12), %rcx
	cmpq	%rcx, %rbx
	jl	LBB0_6
## %bb.7:
	testl	%eax, %eax
	jle	LBB0_13
## %bb.8:
	movl	%eax, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r15,8), %rdi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r15,4), %esi
	movq	(%rbx,%r15,8), %rdx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax,%r15,4), %ecx
	movl	%r13d, %r8d
	movq	%rbx, %r13
	callq	*-80(%rbp)                      ## 8-byte Folded Reload
	incq	%r15
	cmpq	%r15, -88(%rbp)                 ## 8-byte Folded Reload
	je	LBB0_13
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rbx
	movl	%r14d, %edi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	movl	%r15d, %edx
	callq	_av_image_get_linesize
	testl	%eax, %eax
	js	LBB0_19
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	%eax, %r13d
	leal	-1(%r15), %eax
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	cmpl	$1, %eax
	ja	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%r12), %esi
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_AV_CEIL_RSHIFT
	movl	%eax, %r9d
	jmp	LBB0_12
LBB0_19:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_av_log                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_PIX_FMT_FLAG_HWACCEL,4,2    ## @AV_PIX_FMT_FLAG_HWACCEL
	.comm	_AV_PIX_FMT_FLAG_PAL,4,2        ## @AV_PIX_FMT_FLAG_PAL
	.comm	_FF_PSEUDOPAL,4,2               ## @FF_PSEUDOPAL
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"av_image_get_linesize failed\n"

	.no_dead_strip	_image_copy
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function image_copy
_image_copy:                            ; @image_copy
	.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	x28, x7
	mov	x21, x6
	str	w5, [sp, #12]                   ; 4-byte Folded Spill
	mov	x26, x4
	mov	x25, x3
	mov	x19, x2
	mov	x27, x1
	mov	x22, x0
	mov	x0, x4
	bl	_av_pix_fmt_desc_get
	cbz	x0, LBB0_2
; %bb.1:
	mov	x24, x0
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _AV_PIX_FMT_FLAG_HWACCEL@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_PIX_FMT_FLAG_HWACCEL@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
LBB0_2:
	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
LBB0_3:
Lloh3:
	adrp	x20, _AV_PIX_FMT_FLAG_PAL@GOTPAGE
Lloh4:
	ldr	x20, [x20, _AV_PIX_FMT_FLAG_PAL@GOTPAGEOFF]
	ldr	w9, [x20]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.4:
Lloh5:
	adrp	x9, _FF_PSEUDOPAL@GOTPAGE
Lloh6:
	ldr	x9, [x9, _FF_PSEUDOPAL@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
LBB0_5:
	ldr	x0, [x22]
	ldr	w1, [x27]
	ldr	x2, [x19]
	ldr	w3, [x25]
	ldr	w4, [sp, #12]                   ; 4-byte Folded Reload
	mov	x5, x21
	blr	x28
	ldr	w8, [x24]
	ldr	w9, [x20]
	ldr	x0, [x22, #8]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.6:
	ldr	x1, [x19, #8]
LBB0_7:
	mov	w2, #1024
	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
	b	_memcpy
LBB0_8:
	cbz	x0, LBB0_2
; %bb.9:
	ldr	x1, [x19, #8]
	cbnz	x1, LBB0_7
	b	LBB0_2
LBB0_10:
	ldr	w8, [x24, #4]
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.11:
	mov	x20, #0
	mov	w0, #0
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x24, #16]
	ldr	x8, [x8, x20, lsl #3]
	add	x1, x8, #1
	bl	_FFMAX
	add	x20, x20, #1
	ldrsw	x8, [x24, #4]
	cmp	x20, x8
	b.lt	LBB0_12
; %bb.13:
	cmp	w0, #1
	b.lt	LBB0_2
; %bb.14:
	mov	w20, w0
	mov	w23, #-1
	str	x28, [sp]                       ; 8-byte Folded Spill
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x0, [x22], #8
	ldr	w1, [x27], #4
	ldr	x2, [x19], #8
	ldr	w3, [x25], #4
	mov	x4, x28
	ldr	x28, [sp]                       ; 8-byte Folded Reload
	blr	x28
	add	w23, w23, #1
	subs	x20, x20, #1
	b.eq	LBB0_2
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	w2, w23, #1
	mov	x0, x26
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_av_image_get_linesize
	tbnz	w0, #31, LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	mov	x28, x0
	mov	x5, x21
	cmp	w23, #1
	b.hi	LBB0_15
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	w1, [x24, #8]
	mov	x0, x21
	bl	_AV_CEIL_RSHIFT
	mov	x5, x0
	b	LBB0_15
LBB0_19:
Lloh8:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh9:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x2, l_.str@PAGE
Lloh12:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, #0
	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
	b	_av_log
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_PIX_FMT_FLAG_HWACCEL,4,2    ; @AV_PIX_FMT_FLAG_HWACCEL
	.comm	_AV_PIX_FMT_FLAG_PAL,4,2        ; @AV_PIX_FMT_FLAG_PAL
	.comm	_FF_PSEUDOPAL,4,2               ; @FF_PSEUDOPAL
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"av_image_get_linesize failed\n"

	.no_dead_strip	_image_copy
.subsections_via_symbols
