	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ICCVID_DecompressBegin
_ICCVID_DecompressBegin:                ## @ICCVID_DecompressBegin
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rdx
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	movq	%r14, %rcx
	xorl	%eax, %eax
	callq	_TRACE
	movq	_ICERR_BADPARAM@GOTPCREL(%rip), %rax
	testq	%rbx, %rbx
	je	LBB0_11
## %bb.1:
	movq	(%rbx), %rcx
	movq	_ICCVID_MAGIC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_11
## %bb.2:
	movl	8(%r14), %r15d
	movl	%r15d, 8(%rbx)
	cmpl	$16, %r15d
	jne	LBB0_8
## %bb.3:
	movq	16(%r14), %rax
	movq	_BI_BITFIELDS@GOTPCREL(%rip), %rcx
	movl	$15, %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.4:
	movl	(%r14), %edi
	movl	$31744, %esi                    ## imm = 0x7C00
	movl	$992, %edx                      ## imm = 0x3E0
	movl	$31, %ecx
	callq	_ICCVID_CheckMask
	testq	%rax, %rax
	jne	LBB0_7
## %bb.5:
	movl	(%r14), %edi
	movl	$63488, %esi                    ## imm = 0xF800
	movl	$2016, %edx                     ## imm = 0x7E0
	movl	$31, %ecx
	callq	_ICCVID_CheckMask
	movl	$16, %r15d
	testq	%rax, %rax
	je	LBB0_6
LBB0_7:
	movl	%r15d, 8(%rbx)
LBB0_8:
	leaq	L_.str.2(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_TRACE
	movq	16(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_free_cvinfo
LBB0_10:
	xorl	%eax, %eax
	callq	_decode_cinepak_init
	movq	%rax, 16(%rbx)
	movq	_ICERR_OK@GOTPCREL(%rip), %rax
LBB0_11:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
	movq	_ICERR_UNSUPPORTED@GOTPCREL(%rip), %rax
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ICM_DECOMPRESS_BEGIN %p %p %p\n"

	.comm	_ICCVID_MAGIC,8,3               ## @ICCVID_MAGIC
	.comm	_ICERR_BADPARAM,4,2             ## @ICERR_BADPARAM
	.comm	_BI_BITFIELDS,8,3               ## @BI_BITFIELDS
L_.str.1:                               ## @.str.1
	.asciz	"unsupported output bit field(s) for 16-bit colors\n"

	.comm	_ICERR_UNSUPPORTED,4,2          ## @ICERR_UNSUPPORTED
L_.str.2:                               ## @.str.2
	.asciz	"bit_per_pixel = %d\n"

	.comm	_ICERR_OK,4,2                   ## @ICERR_OK
	.no_dead_strip	_ICCVID_DecompressBegin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ICCVID_DecompressBegin
_ICCVID_DecompressBegin:                ; @ICCVID_DecompressBegin
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x2
	mov	x19, x0
	stp	x1, x2, [sp, #8]
	str	x0, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_TRACE
	cbz	x19, LBB0_10
; %bb.1:
	ldr	x8, [x19]
Lloh2:
	adrp	x9, _ICCVID_MAGIC@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ICCVID_MAGIC@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.2:
	ldr	w8, [x20, #8]
	str	w8, [x19, #8]
	cmp	w8, #16
	b.ne	LBB0_7
; %bb.3:
	ldr	x8, [x20, #16]
Lloh5:
	adrp	x9, _BI_BITFIELDS@GOTPAGE
Lloh6:
	ldr	x9, [x9, _BI_BITFIELDS@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	ldr	w0, [x20]
	mov	w1, #31744
	mov	w2, #992
	mov	w3, #31
	bl	_ICCVID_CheckMask
	cbz	x0, LBB0_12
LBB0_5:
	mov	w8, #15
LBB0_6:
	str	w8, [x19, #8]
LBB0_7:
	str	x8, [sp]
Lloh8:
	adrp	x0, l_.str.2@PAGE
Lloh9:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
	ldr	x0, [x19, #16]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_free_cvinfo
LBB0_9:
	bl	_decode_cinepak_init
	str	x0, [x19, #16]
Lloh10:
	adrp	x8, _ICERR_OK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ICERR_OK@GOTPAGEOFF]
	b	LBB0_11
LBB0_10:
Lloh12:
	adrp	x8, _ICERR_BADPARAM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ICERR_BADPARAM@GOTPAGEOFF]
LBB0_11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_12:
	ldr	w0, [x20]
	mov	w1, #63488
	mov	w2, #2016
	mov	w3, #31
	bl	_ICCVID_CheckMask
	cbz	x0, LBB0_14
; %bb.13:
	mov	w8, #16
	b	LBB0_6
LBB0_14:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
Lloh16:
	adrp	x8, _ICERR_UNSUPPORTED@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ICERR_UNSUPPORTED@GOTPAGEOFF]
	b	LBB0_11
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ICM_DECOMPRESS_BEGIN %p %p %p\n"

	.comm	_ICCVID_MAGIC,8,3               ; @ICCVID_MAGIC
	.comm	_ICERR_BADPARAM,4,2             ; @ICERR_BADPARAM
	.comm	_BI_BITFIELDS,8,3               ; @BI_BITFIELDS
l_.str.1:                               ; @.str.1
	.asciz	"unsupported output bit field(s) for 16-bit colors\n"

	.comm	_ICERR_UNSUPPORTED,4,2          ; @ICERR_UNSUPPORTED
l_.str.2:                               ; @.str.2
	.asciz	"bit_per_pixel = %d\n"

	.comm	_ICERR_OK,4,2                   ; @ICERR_OK
	.no_dead_strip	_ICCVID_DecompressBegin
.subsections_via_symbols
