	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libopenjpeg_copy_packed8
_libopenjpeg_copy_packed8:              ## @libopenjpeg_copy_packed8
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdx), %ecx
	movl	$1, %eax
	testl	%ecx, %ecx
	jle	LBB0_25
## %bb.1:
	movq	%rdx, %r9
	movq	8(%rdx), %r8
	movq	(%rsi), %rax
	movl	(%rax), %eax
	cltd
	idivl	%ecx
	leaq	(,%rcx,8), %rdx
	leaq	(%rdx,%rdx,2), %rdx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, (%r8,%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	8(%r9), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leaq	(,%rcx,4), %r9
	xorl	%r14d, %r14d
	movq	%rcx, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	incq	%r14
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	cmpq	%rcx, %r14
	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	(%r14,%r14,2), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	$0, %r10d
	jle	LBB0_15
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %r11
	movq	8(%rax,%rcx,8), %r12
	movq	(%rsi), %r15
	movl	(%rax,%rcx,8), %r13d
	xorl	%r10d, %r10d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=2
	incl	%r10d
	movl	%r8d, %r13d
	cmpl	(%rdi), %r10d
	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	%r13d, %r8d
	movl	$0, %ecx
	jle	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movq	8(%rsi), %rcx
	movl	(%r15), %edx
	imull	%r10d, %edx
	movl	%r13d, %eax
	imull	%r10d, %eax
	cltq
	leaq	(%r12,%rax,4), %rax
	addl	%r14d, %edx
	movslq	%edx, %rdx
	shlq	$2, %rdx
	addq	(%rcx), %rdx
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ##     Parent Loop BB0_7 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	(%rdx), %ebx
	movl	%ebx, (%rax,%rcx,4)
	incq	%rcx
	movslq	4(%rdi), %rbx
	addq	%r9, %rdx
	cmpq	%rbx, %rcx
	jl	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	(%r11), %r8d
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=2
	cmpl	%r8d, %ecx
	jge	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=2
	movl	%ecx, %eax
	imull	%r10d, %r13d
	movslq	%r13d, %rcx
	leaq	(%r12,%rcx,4), %rcx
	.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(%rcx,%rax,4), %edx
	movl	%edx, (%rcx,%rax,4)
	incq	%rax
	movslq	(%r11), %r8
	cmpq	%r8, %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
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movl	16(%rax,%rcx,8), %r12d
	cmpl	%r12d, %r10d
	jge	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %r8
	addq	$16, %r8
	movq	8(%rax,%rcx,8), %r15
	movl	(%rax,%rcx,8), %ebx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=2
	incl	%r10d
	cmpl	%r12d, %r10d
	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, %eax
	imull	%r10d, %eax
	cltq
	leaq	(%r15,%rax,4), %rcx
	xorl	%edx, %edx
	.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	%rcx, %rax
	subq	%rbx, %rax
	movl	(%rax,%rdx,4), %eax
	movl	%eax, (%rcx,%rdx,4)
	incq	%rdx
	movslq	-16(%r8), %rbx
	cmpq	%rbx, %rdx
	jl	LBB0_19
## %bb.20:                              ##   in Loop: Header=BB0_17 Depth=2
	movl	(%r8), %r12d
	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	$24, %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_packed8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function libopenjpeg_copy_packed8
_libopenjpeg_copy_packed8:              ; @libopenjpeg_copy_packed8
	.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:
	ldr	x9, [x2, #8]
	ldr	x10, [x1]
	ldr	w11, [x10]
	mov	x10, x8
	sdiv	w11, w11, w8
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w12, [x9]
	cmp	w12, w11
	b.gt	LBB0_25
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x9, x9, #24
	subs	x10, x10, #1
	b.ne	LBB0_2
; %bb.4:
	mov	x9, #0
	ldr	x10, [x2, #8]
	lsl	x11, x8, #2
	mov	w12, #24
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	add	x9, x9, #1
	cmp	x9, 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	w13, [x0]
	cmp	w13, #1
	b.lt	LBB0_16
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w13, #0
	madd	x14, x9, x12, x10
	ldr	x15, [x14, #8]
	ldr	x16, [x1]
	ldr	w2, [x14]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=2
	add	w13, w13, #1
	ldr	w17, [x0]
	cmp	w13, w17
	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]
	mul	w17, w2, w13
	cmp	w3, #1
	b.lt	LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	mov	x3, #0
	ldr	w4, [x16]
	ldr	x2, [x1, #8]
	ldr	x5, [x2]
	add	x2, x15, w17, sxtw #2
	madd	w4, w4, w13, w9
	add	x4, x5, w4, sxtw #2
LBB0_11:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldr	w5, [x4]
	str	w5, [x2, x3, lsl #2]
	add	x3, x3, #1
	ldrsw	x5, [x0, #4]
	add	x4, x4, x11
	cmp	x3, x5
	b.lt	LBB0_11
; %bb.12:                               ;   in Loop: Header=BB0_9 Depth=2
	ldr	w2, [x14]
	cmp	w3, w2
	b.ge	LBB0_8
	b	LBB0_14
LBB0_13:                                ;   in Loop: Header=BB0_9 Depth=2
	mov	w3, #0
	cmp	w3, w2
	b.ge	LBB0_8
LBB0_14:                                ;   in Loop: Header=BB0_9 Depth=2
	mov	w3, w3
	add	x17, x15, w17, sxtw #2
LBB0_15:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_9 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	add	x2, x17, x3, lsl #2
	ldur	w4, [x2, #-4]
	str	w4, [x2]
	add	x3, x3, #1
	ldrsw	x2, [x14]
	cmp	x3, x2
	b.lt	LBB0_15
	b	LBB0_8
LBB0_16:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	w13, #0
LBB0_17:                                ;   in Loop: Header=BB0_6 Depth=1
	madd	x14, x9, x12, x10
	ldr	w2, [x14, #16]!
	cmp	w13, w2
	b.ge	LBB0_5
; %bb.18:                               ;   in Loop: Header=BB0_6 Depth=1
	madd	x15, x9, x12, x10
	ldr	x16, [x15, #8]
	ldr	w17, [x15]
	b	LBB0_20
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=2
	add	w13, w13, #1
	cmp	w13, w2
	b.ge	LBB0_5
LBB0_20:                                ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_22 Depth 3
	cmp	w17, #1
	b.lt	LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=2
	mov	x2, #0
	mul	w3, w17, w13
	add	x3, x16, w3, sxtw #2
LBB0_22:                                ;   Parent Loop BB0_6 Depth=1
                                        ;     Parent Loop BB0_20 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	sub	x17, x3, w17, sxtw #2
	lsl	x4, x2, #2
	ldr	w17, [x17, x4]
	str	w17, [x3, x4]
	add	x2, x2, #1
	ldrsw	x17, [x15]
	cmp	x2, x17
	b.lt	LBB0_22
; %bb.23:                               ;   in Loop: Header=BB0_20 Depth=2
	ldr	w2, [x14]
	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_packed8
.subsections_via_symbols
