	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cdxl_decode_ham8
_cdxl_decode_ham8:                      ## @cdxl_decode_ham8
	.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	$312, %rsp                      ## imm = 0x138
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r14
	movq	(%rdi), %rbx
	movq	%rsi, -336(%rbp)                ## 8-byte Spill
	movq	(%rsi), %rax
	movq	(%rax), %rax
	movq	%rax, -328(%rbp)                ## 8-byte Spill
	leaq	-304(%rbp), %rsi
	callq	_import_palette
	movl	(%r14), %esi
	movq	(%r15), %rdx
	movq	%r15, %rdi
	callq	_import_format
	movq	%r14, -320(%rbp)                ## 8-byte Spill
	movl	4(%r14), %ecx
	testl	%ecx, %ecx
	jle	LBB0_15
## %bb.1:
	movq	-320(%rbp), %rax                ## 8-byte Reload
	movl	(%rax), %eax
	xorl	%edi, %edi
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-320(%rbp), %rcx                ## 8-byte Reload
	movl	4(%rcx), %ecx
	movq	-344(%rbp), %rdi                ## 8-byte Reload
LBB0_14:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	-336(%rbp), %rdx                ## 8-byte Reload
	movq	8(%rdx), %rdx
	movslq	(%rdx), %rdx
	movq	-328(%rbp), %rsi                ## 8-byte Reload
	leaq	(%rsi,%rdx,4), %rsi
	movq	%rsi, -328(%rbp)                ## 8-byte Spill
	incl	%edi
	cmpl	%ecx, %edi
	jge	LBB0_15
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	testl	%eax, %eax
	jle	LBB0_14
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rdi, -344(%rbp)                ## 8-byte Spill
	movl	-304(%rbp), %r14d
	movzbl	%r14b, %eax
	movq	%rax, -312(%rbp)                ## 8-byte Spill
	movl	%r14d, %r15d
	andl	$65280, %r15d                   ## imm = 0xFF00
	andl	$16711680, %r14d                ## imm = 0xFF0000
	xorl	%r12d, %r12d
	xorl	%r13d, %r13d
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	shll	$10, %eax
	andl	$768, %r8d                      ## imm = 0x300
	orl	%eax, %r8d
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	-312(%rbp), %rdx                ## 8-byte Reload
LBB0_12:                                ##   in Loop: Header=BB0_4 Depth=2
	addq	$4, %rbx
	movl	%r12d, %eax
	movq	-328(%rbp), %rcx                ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	%rdx, -312(%rbp)                ## 8-byte Spill
	movl	%edx, %esi
	movl	%r8d, %r15d
	orl	%r8d, %esi
	movl	%r9d, %r14d
	orl	%r9d, %esi
	callq	_AV_WL24
	incq	%r13
	movq	-320(%rbp), %rax                ## 8-byte Reload
	movslq	(%rax), %rax
	addq	$3, %r12
	cmpq	%rax, %r13
	jge	LBB0_13
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rbx), %eax
	movl	%eax, %ecx
	sarl	$6, %ecx
	cmpl	$3, %ecx
	ja	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	andl	$63, %eax
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	movl	%r15d, %r8d
	movl	%r14d, %r9d
	jmpq	*%rcx
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	movl	-304(%rbp,%rax,4), %eax
	movl	%eax, %r8d
	movzbl	%al, %edx
	movl	%eax, %r9d
	andl	$16711680, %r9d                 ## imm = 0xFF0000
	andl	$65280, %r8d                    ## imm = 0xFF00
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	-312(%rbp), %rdx                ## 8-byte Reload
	andl	$3, %edx
	leal	(%rdx,%rax,4), %edx
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=2
	shll	$18, %eax
	andl	$196608, %r9d                   ## imm = 0x30000
	orl	%eax, %r9d
	jmp	LBB0_11
LBB0_5:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	-312(%rbp), %rdx                ## 8-byte Reload
	movl	%r15d, %r8d
	movl	%r14d, %r9d
	jmp	LBB0_12
LBB0_15:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.16:
	addq	$312, %rsp                      ## imm = 0x138
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
LJTI0_0:
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_10
	.end_data_region
                                        ## -- End function
	.no_dead_strip	_cdxl_decode_ham8
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cdxl_decode_ham8
_cdxl_decode_ham8:                      ; @cdxl_decode_ham8
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #384
	.cfi_def_cfa_offset 384
	stp	x28, x27, [sp, #288]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #304]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #320]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #336]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #352]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #368]            ; 16-byte Folded Spill
	add	x29, sp, #368
	.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	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldp	x22, x21, [x0]
	str	x1, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x8, [x1]
	ldr	x23, [x8]
	add	x1, sp, #16
	bl	_import_palette
	ldr	w1, [x21]
	ldr	x2, [x20]
	mov	x0, x20
	bl	_import_format
	ldr	w9, [x21, #4]
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.1:
	mov	w20, #0
	ldr	w8, [x21]
Lloh3:
	adrp	x25, lJTI0_0@PAGE
Lloh4:
	add	x25, x25, lJTI0_0@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x21, #4]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x10, [sp, #8]                   ; 8-byte Folded Reload
	ldr	x10, [x10, #8]
	ldrsw	x10, [x10]
	add	x23, x23, x10, lsl #2
	add	w20, w20, #1
	cmp	w20, w9
	b.ge	LBB0_13
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x26, #0
	mov	x27, #0
	ldr	w8, [sp, #16]
	and	w19, w8, #0xff
	and	w24, w8, #0xff00
	and	w28, w8, #0xff0000
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=2
	and	w24, w24, #0x300
	bfi	w24, w8, #10, #6
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	x0, x23, w26, uxtw #2
	orr	w8, w19, w24
	orr	w1, w8, w28
	bl	_AV_WL24
	add	x27, x27, #1
	ldrsw	x8, [x21]
	add	x26, x26, #3
	cmp	x27, x8
	b.ge	LBB0_2
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w8, [x22], #4
	asr	w9, w8, #6
	cmp	w9, #3
	b.hi	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	and	x8, x8, #0x3f
	adr	x10, LBB0_6
	ldrb	w11, [x25, x9]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_10:                                ;   in Loop: Header=BB0_8 Depth=2
	add	x9, sp, #16
	ldr	w8, [x9, x8, lsl #2]
	and	w28, w8, #0xff0000
	and	w24, w8, #0xff00
	and	w19, w8, #0xff
	b	LBB0_7
LBB0_11:                                ;   in Loop: Header=BB0_8 Depth=2
	and	w19, w19, #0x3
	bfi	w19, w8, #2, #6
	b	LBB0_7
LBB0_12:                                ;   in Loop: Header=BB0_8 Depth=2
	and	w28, w28, #0x30000
	bfi	w28, w8, #18, #6
	b	LBB0_7
LBB0_13:
	ldur	x8, [x29, #-96]
Lloh5:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh6:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	ldp	x29, x30, [sp, #368]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #352]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #336]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #320]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #304]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #288]            ; 16-byte Folded Reload
	add	sp, sp, #384
	ret
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_10-LBB0_6)>>2
	.byte	(LBB0_11-LBB0_6)>>2
	.byte	(LBB0_12-LBB0_6)>>2
	.byte	(LBB0_6-LBB0_6)>>2
                                        ; -- End function
	.no_dead_strip	_cdxl_decode_ham8
.subsections_via_symbols
