	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function libopenjpeg_copy_to_packed8
_libopenjpeg_copy_to_packed8:           ## @libopenjpeg_copy_to_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.1:
	movq	16(%rdi), %rcx
	movq	(%rcx), %r8
	movq	8(%rdi), %r9
	movl	4(%rdi), %r11d
	xorl	%r10d, %r10d
	movl	%r11d, %edx
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%rdi), %eax
	movl	%r11d, %edx
LBB0_10:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r10d
	cmpl	%eax, %r10d
	jge	LBB0_11
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
                                        ##       Child Loop BB0_6 Depth 3
	testl	%edx, %edx
	jle	LBB0_10
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movslq	(%r9), %rax
	movslq	%r10d, %rcx
	imulq	%rax, %rcx
	leaq	(%r8,%rcx,4), %r12
	imull	%r10d, %edx
	movslq	%edx, %r15
	movl	(%rsi), %ebx
	xorl	%r14d, %r14d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	incl	%r14d
	incq	%r15
	cmpl	%r11d, %r14d
	jge	LBB0_9
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Loop Header: Depth=2
                                        ##       Child Loop BB0_6 Depth 3
	testl	%ebx, %ebx
	jle	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	8(%rsi), %rax
	addq	$8, %rax
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_2 Depth=1
                                        ##     Parent Loop BB0_4 Depth=2
                                        ## =>    This Inner Loop Header: Depth=3
	movl	-8(%rax), %ebx
	shll	$7, %ebx
	movq	(%rax), %rcx
	addl	(%rcx,%r15,8), %ebx
	movl	%ebx, (%r12)
	addq	$4, %r12
	incq	%rdx
	movslq	(%rsi), %rbx
	addq	$16, %rax
	cmpq	%rbx, %rdx
	jl	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	4(%rdi), %r11d
	jmp	LBB0_8
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_libopenjpeg_copy_to_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_to_packed8
_libopenjpeg_copy_to_packed8:           ; @libopenjpeg_copy_to_packed8
	.cfi_startproc
; %bb.0:
	ldr	w12, [x0]
	cmp	w12, #1
	b.lt	LBB0_11
; %bb.1:
	mov	w8, #0
	ldp	x9, x10, [x0, #8]
	ldr	x10, [x10]
	ldr	w11, [x0, #4]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w12, [x0]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w8, w8, #1
	cmp	w8, w12
	b.ge	LBB0_11
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;       Child Loop BB0_9 Depth 3
	cmp	w11, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w12, #0
	ldr	w13, [x9]
	mul	w13, w13, w8
	add	x13, x10, w13, sxtw #2
	mul	w14, w11, w8
	sxtw	x14, w14
	ldr	w15, [x1]
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=2
	add	w12, w12, #1
	add	x14, x14, #1
	cmp	w12, w11
	b.ge	LBB0_2
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Loop Header: Depth=2
                                        ;       Child Loop BB0_9 Depth 3
	cmp	w15, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	mov	x11, #0
	ldr	x15, [x1, #8]
	add	x16, x15, #8
LBB0_9:                                 ;   Parent Loop BB0_4 Depth=1
                                        ;     Parent Loop BB0_7 Depth=2
                                        ; =>    This Inner Loop Header: Depth=3
	ldur	w15, [x16, #-8]
	ldr	x17, [x16], #16
	ldr	x17, [x17, x14, lsl #3]
	add	w15, w17, w15, lsl #7
	str	w15, [x13], #4
	add	x11, x11, #1
	ldrsw	x15, [x1]
	cmp	x11, x15
	b.lt	LBB0_9
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=2
	ldr	w11, [x0, #4]
	b	LBB0_6
LBB0_11:
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_libopenjpeg_copy_to_packed8
.subsections_via_symbols
