	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libopenjpeg_copy_packed12
_libopenjpeg_copy_packed12:             ## @libopenjpeg_copy_packed12
	.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
	movl	(%rdx), %r8d
	movl	$1, %eax
	testl	%r8d, %r8d
	jle	LBB0_25
## %bb.1:
	movq	%rdx, %r9
	movq	8(%rsi), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rdx), %rcx
	movq	(%rsi), %rax
	movl	(%rax), %eax
	cltd
	idivl	%r8d
	leaq	(,%r8,8), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, (%rcx,%rbx)
	jg	LBB0_24
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$24, %rbx
	cmpq	%rbx, %rdx
	jne	LBB0_2
## %bb.4:
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r9), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(,%r8,4), %r11
	xorl	%r15d, %r15d
	movq	%r8, -64(%rbp)                  ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r15
	cmpq	%r8, %r15
	je	LBB0_23
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
                                        ##       Child Loop BB0_9 Depth 3
                                        ##       Child Loop BB0_13 Depth 3
                                        ##     Child Loop BB0_17 Depth 2
                                        ##       Child Loop BB0_19 Depth 3
	cmpl	$0, (%rdi)
	leaq	(%r15,%r15,2), %rdx
	movl	$0, %r14d
	jle	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movq	%rdx, %rsi
	leaq	(%rcx,%rdx,8), %rbx
	movq	8(%rcx,%rdx,8), %r13
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %r12
	movl	(%rcx,%rdx,8), %r9d
	xorl	%r14d, %r14d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	incl	%r14d
	movl	%r10d, %r9d
	cmpl	(%rdi), %r14d
	jge	LBB0_15
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_9 Depth 3
                                        ##       Child Loop BB0_13 Depth 3
	cmpl	$0, 4(%rdi)
	movl	%r9d, %r10d
	movl	$0, %r8d
	jle	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r12), %esi
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	imull	%r14d, %eax
	movl	%r9d, %esi
	imull	%r14d, %esi
	movslq	%esi, %rsi
	leaq	(,%rsi,4), %rsi
	addq	%r13, %rsi
	addl	%r15d, %eax
	cltq
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rax
	xorl	%r8d, %r8d
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rax), %ecx
	sarl	$4, %ecx
	movl	%ecx, (%rsi,%r8,4)
	incq	%r8
	movslq	4(%rdi), %rcx
	addq	%r11, %rax
	cmpq	%rcx, %r8
	jl	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	(%rbx), %r10d
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=2
	cmpl	%r10d, %r8d
	jge	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	%r8d, %eax
	imull	%r14d, %r9d
	movslq	%r9d, %rsi
	leaq	(,%rsi,4), %rsi
	addq	%r13, %rsi
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	-4(%rsi,%rax,4), %ecx
	movl	%ecx, (%rsi,%rax,4)
	incq	%rax
	movslq	(%rbx), %r10
	cmpq	%r10, %rax
	jl	LBB0_13
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	16(%rax,%rdx,8), %r13d
	cmpl	%r13d, %r14d
	movq	-64(%rbp), %r8                  ## 8-byte Reload
	jge	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rdx,8), %rax
	addq	$16, %rax
	movq	8(%rcx,%rdx,8), %r12
	movl	(%rcx,%rdx,8), %ebx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=2
	incl	%r14d
	cmpl	%r13d, %r14d
	jge	LBB0_22
LBB0_17:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_19 Depth 3
	testl	%ebx, %ebx
	jle	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	%ebx, %ecx
	imull	%r14d, %ecx
	movslq	%ecx, %rcx
	leaq	(%r12,%rcx,4), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_19:                                ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_17 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movslq	%ebx, %rbx
	shlq	$2, %rbx
	movq	%rdx, %rsi
	subq	%rbx, %rsi
	movl	(%rsi,%rcx,4), %esi
	movl	%esi, (%rdx,%rcx,4)
	incq	%rcx
	movslq	-16(%rax), %rbx
	cmpq	%rbx, %rcx
	jl	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	(%rax), %r13d
	jmp	LBB0_21
LBB0_24:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
	xorl	%eax, %eax
	jmp	LBB0_25
LBB0_23:
	movl	$1, %eax
LBB0_25:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Error: frame's linesize is too small for the image\n"

	.no_dead_strip	_libopenjpeg_copy_packed12
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libopenjpeg_copy_packed12
_libopenjpeg_copy_packed12:             ; @libopenjpeg_copy_packed12
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	ldr	w8, [x2]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.1:
	ldp	x11, x9, [x1]
	ldr	x9, [x9]
	ldr	x10, [x2, #8]
	ldr	w12, [x11]
	mov	x11, x8
	sdiv	w12, w12, w8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x10]
	cmp	w13, w12
	b.gt	LBB0_25
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x10, x10, #24
	subs	x11, x11, #1
	b.ne	LBB0_2
; %bb.4:
	mov	x10, #0
	ldr	x11, [x2, #8]
	lsl	x12, x8, #2
	mov	w13, #24
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x10, x10, #1
	cmp	x10, x8
	b.eq	LBB0_24
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
                                        ;       Child Loop BB0_11 Depth 3
                                        ;       Child Loop BB0_15 Depth 3
                                        ;     Child Loop BB0_20 Depth 2
                                        ;       Child Loop BB0_22 Depth 3
	ldr	w14, [x0]
	cmp	w14, #1
	b.lt	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w14, #0
	madd	x15, x10, x13, x11
	ldr	x16, [x15, #8]
	ldr	x17, [x1]
	ldr	w2, [x15]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	w14, w14, #1
	ldr	w3, [x0]
	mov	x2, x4
	cmp	w14, w3
	b.ge	LBB0_17
LBB0_9:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_11 Depth 3
                                        ;       Child Loop BB0_15 Depth 3
	ldr	w3, [x0, #4]
	cmp	w3, #1
	b.lt	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x3, #0
	ldr	w4, [x17]
	cmp	w4, #0
	cinc	w4, w4, lt
	asr	w5, w4, #1
	mul	w4, w2, w14
	add	x4, x16, w4, sxtw #2
	madd	w5, w5, w14, w10
	add	x5, x9, w5, sxtw #2
LBB0_11:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w6, [x5]
	asr	w6, w6, #4
	str	w6, [x4, x3, lsl #2]
	add	x3, x3, #1
	ldrsw	x6, [x0, #4]
	add	x5, x5, x12
	cmp	x3, x6
	b.lt	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w4, [x15]
	cmp	w3, w4
	b.ge	LBB0_8
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=2
	mov	w3, #0
	mov	x4, x2
	cmp	w3, w4
	b.ge	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=2
	mov	w3, w3
	mul	w2, w2, w14
	add	x2, x16, w2, sxtw #2
LBB0_15:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x4, x2, x3, lsl #2
	ldur	w5, [x4, #-4]
	str	w5, [x4]
	add	x3, x3, #1
	ldrsw	x4, [x15]
	cmp	x3, x4
	b.lt	LBB0_15
	b	LBB0_8
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w14, #0
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	madd	x15, x10, x13, x11
	ldr	w3, [x15, #16]!
	cmp	w14, w3
	b.ge	LBB0_5
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	madd	x16, x10, x13, x11
	ldr	x17, [x16, #8]
	ldr	w2, [x16]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	add	w14, w14, #1
	cmp	w14, w3
	b.ge	LBB0_5
LBB0_20:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_22 Depth 3
	cmp	w2, #1
	b.lt	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	mov	x3, #0
	mul	w4, w2, w14
	add	x4, x17, w4, sxtw #2
LBB0_22:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_20 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	sub	x2, x4, w2, sxtw #2
	lsl	x5, x3, #2
	ldr	w2, [x2, x5]
	str	w2, [x4, x5]
	add	x3, x3, #1
	ldrsw	x2, [x16]
	cmp	x3, x2
	b.lt	LBB0_22
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=2
	ldr	w3, [x15]
	b	LBB0_19
LBB0_24:
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_25:
Lloh0:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	mov	w0, #0
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Error: frame's linesize is too small for the image\n"

	.no_dead_strip	_libopenjpeg_copy_packed12
.subsections_via_symbols
