	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_frame_wic
_decode_frame_wic:                      ## @decode_frame_wic
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, -152(%rbp)                ## 8-byte Spill
	movl	%edx, %r13d
	movl	%esi, %r12d
	movq	%rdi, %rbx
	movq	_Ok@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	$0, -64(%rbp)
	movq	_WICBitmapPaletteTypeFixedHalftone256@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)                ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movq	%rbx, %rsi
	movq	%r8, %rcx
	xorl	%eax, %eax
	callq	_TRACE
	leaq	-124(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_IWICBitmapDecoder_GetFrameCount
	leaq	-88(%rbp), %rdx
	movq	%rbx, -144(%rbp)                ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r13d, -104(%rbp)               ## 4-byte Spill
	movl	%r13d, %esi
	callq	_IWICBitmapDecoder_GetFrame
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	-88(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	callq	_IWICBitmapFrameDecode_GetPixelFormat
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	xorl	%r14d, %r14d
	testl	%r12d, %r12d
	movq	_Ok@GOTPCREL(%rip), %rbx
	je	LBB0_6
LBB0_3:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	cmpq	$0, -64(%rbp)
	jne	LBB0_15
LBB0_14:
	movq	-88(%rbp), %rsi
	movq	_GUID_WICPixelFormat32bppBGRA@GOTPCREL(%rip), %rdi
	leaq	-64(%rbp), %rdx
	callq	_WICConvertBitmapSource
	movq	%rax, %r13
	movq	_PixelFormat32bppARGB@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_15:
	leaq	-44(%rbp), %rdi
	callq	_wine_dbgstr_guid
	movslq	%eax, %rsi
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_TRACE
	jmp	LBB0_16
LBB0_4:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_47
LBB0_5:
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	_Ok@GOTPCREL(%rip), %rbx
LBB0_16:
	movq	%r13, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_37
## %bb.17:
	movq	-64(%rbp), %rdi
	leaq	-108(%rbp), %rsi
	leaq	-68(%rbp), %rdx
	callq	_IWICBitmapSource_GetSize
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_19
## %bb.18:
	movl	-108(%rbp), %edi
	movl	-68(%rbp), %esi
	leaq	-56(%rbp), %r9
	xorl	%edx, %edx
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	callq	_GdipCreateBitmapFromScan0
	movq	%rax, %r12
LBB0_19:
	movq	%r13, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_36
## %bb.20:
	cmpq	(%rbx), %r12
	jne	LBB0_36
## %bb.21:
	movq	-56(%rbp), %rdi
	movq	_ImageLockModeWrite@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-168(%rbp), %r8
	xorl	%esi, %esi
	movl	%r14d, %ecx
	callq	_GdipBitmapLockBits
	movq	%rax, %r12
	cmpq	(%rbx), %rax
	jne	LBB0_27
## %bb.22:
	movq	$0, -176(%rbp)
	movl	-108(%rbp), %eax
	movl	%eax, -192(%rbp)
	movl	$1, -188(%rbp)
	cmpl	$0, -68(%rbp)
	jle	LBB0_26
## %bb.23:
	xorl	%ebx, %ebx
	leaq	-192(%rbp), %r14
	.p2align	4, 0x90
LBB0_24:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, -184(%rbp)
	movq	-64(%rbp), %rdi
	movl	-168(%rbp), %eax
	movl	%eax, %ecx
	negl	%ecx
	cmovsl	%eax, %ecx
	imull	%ebx, %eax
	movslq	%eax, %r8
	shlq	$2, %r8
	addq	-160(%rbp), %r8
	movq	%r14, %rsi
	movl	%ecx, %edx
	callq	_IWICBitmapSource_CopyPixels
	movq	%rax, %r13
	movq	%rax, %rdi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_26
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=1
	incl	%ebx
	cmpl	-68(%rbp), %ebx
	jl	LBB0_24
LBB0_26:
	movq	-56(%rbp), %rdi
	leaq	-168(%rbp), %rsi
	callq	_GdipBitmapUnlockBits
	movq	_Ok@GOTPCREL(%rip), %rbx
LBB0_27:
	movq	%r13, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_30
## %bb.28:
	cmpq	(%rbx), %r12
	jne	LBB0_30
## %bb.29:
	movq	-56(%rbp), %rax
	movq	%rax, (%r15)
	jmp	LBB0_31
LBB0_6:
	movq	_pixel_formats@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movq	8(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.7:
	movq	%r15, -136(%rbp)                ## 8-byte Spill
	movl	$24, %r15d
	xorl	%ebx, %ebx
	leaq	-44(%rbp), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_IsEqualGUID
	testq	%rax, %rax
	jne	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	movq	(%r12), %rax
	movq	(%rax,%r15), %rsi
	addq	$16, %r15
	testq	%rsi, %rsi
	jne	LBB0_8
## %bb.10:
	xorl	%r14d, %r14d
	jmp	LBB0_13
LBB0_30:
	movq	$0, (%r15)
	movq	-56(%rbp), %rdi
	callq	_GdipDisposeImage
LBB0_31:
	movq	%r13, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_36
## %bb.32:
	cmpq	(%rbx), %r12
	jne	LBB0_36
## %bb.33:
	movq	-64(%rbp), %rdi
	leaq	-96(%rbp), %rsi
	leaq	-120(%rbp), %rdx
	callq	_IWICBitmapSource_GetResolution
	movq	%rax, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_35
## %bb.34:
	movsd	-96(%rbp), %xmm0                ## xmm0 = mem[0],zero
	movq	-56(%rbp), %rax
	movsd	%xmm0, (%rax)
	movsd	-120(%rbp), %xmm0               ## xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rax)
LBB0_35:
	movq	_S_OK@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
LBB0_36:
	movq	-64(%rbp), %rdi
	callq	_IWICBitmapSource_Release
LBB0_37:
	movq	%r13, %rdi
	callq	_SUCCEEDED
	testq	%rax, %rax
	je	LBB0_40
## %bb.38:
	movq	-56(%rbp), %rdi
	movq	$0, 48(%rdi)
	movq	-152(%rbp), %rax                ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_41
## %bb.39:
	movq	-144(%rbp), %rsi                ## 8-byte Reload
	movl	-104(%rbp), %edx                ## 4-byte Reload
	callq	*%rax
	jmp	LBB0_46
LBB0_40:
	xorl	%r14d, %r14d
	jmp	LBB0_48
LBB0_41:
	movq	-88(%rbp), %rdi
	movq	_IID_IWICMetadataBlockReader@GOTPCREL(%rip), %rsi
	leaq	-96(%rbp), %rdx
	callq	_IWICBitmapFrameDecode_QueryInterface
	movq	_S_OK@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	jne	LBB0_46
## %bb.42:
	movl	$0, -120(%rbp)
	movq	-96(%rbp), %rdi
	leaq	-120(%rbp), %rsi
	callq	_IWICMetadataBlockReader_GetCount
	cmpq	(%rbx), %rax
	jne	LBB0_45
## %bb.43:
	cmpl	$0, -120(%rbp)
	je	LBB0_45
## %bb.44:
	movq	-96(%rbp), %rdi
	movq	-56(%rbp), %rdx
	addq	$48, %rdx
	xorl	%esi, %esi
	callq	_IWICMetadataBlockReader_GetReaderByIndex
LBB0_45:
	movq	-96(%rbp), %rdi
	callq	_IWICMetadataBlockReader_Release
LBB0_46:
	movq	-88(%rbp), %rdi
	movl	-100(%rbp), %esi                ## 4-byte Reload
	callq	_get_palette
	movq	%rax, %r14
	movq	-88(%rbp), %rdi
	callq	_IWICBitmapFrameDecode_Release
LBB0_47:
	movq	_Ok@GOTPCREL(%rip), %rbx
LBB0_48:
	movq	%r13, %rdi
	callq	_FAILED
	movq	(%rbx), %rcx
	testq	%rax, %rax
	je	LBB0_51
## %bb.49:
	cmpq	%rcx, %r12
	jne	LBB0_51
## %bb.50:
	movq	%r13, %rdi
	callq	_hresult_to_status
	movq	%rax, %r12
	movq	(%rbx), %rcx
LBB0_51:
	cmpq	%rcx, %r12
	jne	LBB0_63
## %bb.52:
	movq	_ImageFlagsReadOnly@GOTPCREL(%rip), %rax
	movq	_ImageFlagsHasRealPixelSize@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movq	_ImageFlagsHasRealDPI@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movq	-56(%rbp), %rax
	orl	%ecx, 16(%rax)
	movq	_GUID_WICPixelFormat2bppGray@GOTPCREL(%rip), %rsi
	leaq	-44(%rbp), %rdi
	callq	_IsEqualGUID
	movq	_ImageFlagsColorSpaceGRAY@GOTPCREL(%rip), %rbx
	testq	%rax, %rax
	jne	LBB0_58
## %bb.53:
	movq	_GUID_WICPixelFormat4bppGray@GOTPCREL(%rip), %rsi
	leaq	-44(%rbp), %rdi
	callq	_IsEqualGUID
	testq	%rax, %rax
	jne	LBB0_58
## %bb.54:
	movq	_GUID_WICPixelFormat8bppGray@GOTPCREL(%rip), %rsi
	leaq	-44(%rbp), %rdi
	callq	_IsEqualGUID
	testq	%rax, %rax
	jne	LBB0_58
## %bb.55:
	movq	_GUID_WICPixelFormat16bppGray@GOTPCREL(%rip), %rsi
	leaq	-44(%rbp), %rdi
	callq	_IsEqualGUID
	testq	%rax, %rax
	jne	LBB0_57
## %bb.56:
	movq	_ImageFlagsColorSpaceRGB@GOTPCREL(%rip), %rbx
	jmp	LBB0_58
LBB0_12:
	movl	%ebx, %ebx
	movq	-88(%rbp), %rdi
	movq	%rdi, -64(%rbp)
	callq	_IWICBitmapSource_AddRef
	movq	(%r12), %rax
	shlq	$4, %rbx
	movl	(%rax,%rbx), %ecx
	movl	%ecx, -100(%rbp)                ## 4-byte Spill
	movl	4(%rax,%rbx), %r14d
LBB0_13:
	movq	-136(%rbp), %r15                ## 8-byte Reload
	movq	-80(%rbp), %r12                 ## 8-byte Reload
	movq	_Ok@GOTPCREL(%rip), %rbx
	cmpq	$0, -64(%rbp)
	jne	LBB0_15
	jmp	LBB0_14
LBB0_57:
	movq	_ImageFlagsColorSpaceGRAY@GOTPCREL(%rip), %rbx
LBB0_58:
	movl	(%rbx), %eax
	movq	-56(%rbp), %rcx
	orl	%eax, 16(%rcx)
	movl	-124(%rbp), %eax
	movl	%eax, 20(%rcx)
	movl	-104(%rbp), %eax                ## 4-byte Reload
	movl	%eax, 24(%rcx)
	movq	-144(%rbp), %rdi                ## 8-byte Reload
	movq	%rdi, 40(%rcx)
	callq	_IWICBitmapDecoder_AddRef
	testq	%r14, %r14
	je	LBB0_60
## %bb.59:
	movq	-56(%rbp), %rax
	movq	32(%rax), %rdi
	callq	_heap_free
	movq	-56(%rbp), %rax
	movq	%r14, 32(%rax)
	jmp	LBB0_62
LBB0_60:
	movq	_GUID_WICPixelFormatBlackWhite@GOTPCREL(%rip), %rsi
	leaq	-44(%rbp), %rdi
	callq	_IsEqualGUID
	testq	%rax, %rax
	je	LBB0_62
## %bb.61:
	movq	-56(%rbp), %rax
	movq	32(%rax), %rax
	movq	$0, (%rax)
LBB0_62:
	movq	(%r15), %rsi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_TRACE
LBB0_63:
	movq	%r12, %rax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Ok,8,3                         ## @Ok
	.comm	_WICBitmapPaletteTypeFixedHalftone256,4,2 ## @WICBitmapPaletteTypeFixedHalftone256
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%p,%u,%p\n"

	.comm	_pixel_formats,8,3              ## @pixel_formats
	.comm	_GUID_WICPixelFormat32bppBGRA,4,2 ## @GUID_WICPixelFormat32bppBGRA
	.comm	_PixelFormat32bppARGB,4,2       ## @PixelFormat32bppARGB
L_.str.1:                               ## @.str.1
	.asciz	"%s => %#x\n"

	.comm	_ImageLockModeWrite,4,2         ## @ImageLockModeWrite
	.comm	_S_OK,8,3                       ## @S_OK
	.comm	_IID_IWICMetadataBlockReader,4,2 ## @IID_IWICMetadataBlockReader
	.comm	_ImageFlagsReadOnly,4,2         ## @ImageFlagsReadOnly
	.comm	_ImageFlagsHasRealPixelSize,4,2 ## @ImageFlagsHasRealPixelSize
	.comm	_ImageFlagsHasRealDPI,4,2       ## @ImageFlagsHasRealDPI
	.comm	_GUID_WICPixelFormat2bppGray,4,2 ## @GUID_WICPixelFormat2bppGray
	.comm	_GUID_WICPixelFormat4bppGray,4,2 ## @GUID_WICPixelFormat4bppGray
	.comm	_GUID_WICPixelFormat8bppGray,4,2 ## @GUID_WICPixelFormat8bppGray
	.comm	_GUID_WICPixelFormat16bppGray,4,2 ## @GUID_WICPixelFormat16bppGray
	.comm	_ImageFlagsColorSpaceGRAY,4,2   ## @ImageFlagsColorSpaceGRAY
	.comm	_ImageFlagsColorSpaceRGB,4,2    ## @ImageFlagsColorSpaceRGB
	.comm	_GUID_WICPixelFormatBlackWhite,4,2 ## @GUID_WICPixelFormatBlackWhite
L_.str.2:                               ## @.str.2
	.asciz	"=> %p\n"

	.no_dead_strip	_decode_frame_wic
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_frame_wic
_decode_frame_wic:                      ; @decode_frame_wic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x28, x27, [sp, #128]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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	x19, x4
	mov	x24, x3
	mov	x22, x2
	mov	x26, x1
	mov	x21, x0
	str	xzr, [sp, #104]
Lloh0:
	adrp	x27, _Ok@GOTPAGE
Lloh1:
	ldr	x27, [x27, _Ok@GOTPAGEOFF]
	ldr	x20, [x27]
Lloh2:
	adrp	x8, _WICBitmapPaletteTypeFixedHalftone256@GOTPAGE
Lloh3:
	ldr	x8, [x8, _WICBitmapPaletteTypeFixedHalftone256@GOTPAGEOFF]
Lloh4:
	ldr	w28, [x8]
	stp	x22, x4, [sp]
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_TRACE
	add	x1, sp, #80
	mov	x0, x21
	bl	_IWICBitmapDecoder_GetFrameCount
	sub	x2, x29, #96
	mov	x0, x21
	mov	x1, x22
	bl	_IWICBitmapDecoder_GetFrame
	mov	x25, x0
	bl	_SUCCEEDED
	cbz	x0, LBB0_35
; %bb.1:
	ldur	x0, [x29, #-96]
	add	x1, sp, #92
	bl	_IWICBitmapFrameDecode_GetPixelFormat
	mov	x25, x0
	bl	_SUCCEEDED
	cbz	x0, LBB0_7
; %bb.2:
	cbz	w26, LBB0_21
LBB0_3:
	mov	w26, #0
LBB0_4:
	ldr	x8, [sp, #104]
	cbnz	x8, LBB0_6
; %bb.5:
	ldur	x1, [x29, #-96]
Lloh7:
	adrp	x0, _GUID_WICPixelFormat32bppBGRA@GOTPAGE
Lloh8:
	ldr	x0, [x0, _GUID_WICPixelFormat32bppBGRA@GOTPAGEOFF]
	add	x2, sp, #104
	bl	_WICConvertBitmapSource
	mov	x25, x0
Lloh9:
	adrp	x8, _PixelFormat32bppARGB@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PixelFormat32bppARGB@GOTPAGEOFF]
Lloh11:
	ldr	w26, [x8]
LBB0_6:
	add	x0, sp, #92
	bl	_wine_dbgstr_guid
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x1, w0
	str	x26, [sp]
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_TRACE
	b	LBB0_8
LBB0_7:
	mov	w26, #0
LBB0_8:
	mov	x0, x25
	bl	_SUCCEEDED
	cbz	x0, LBB0_32
; %bb.9:
	ldr	x0, [sp, #104]
	add	x1, sp, #88
	add	x2, sp, #84
	bl	_IWICBitmapSource_GetSize
	mov	x25, x0
	bl	_SUCCEEDED
	cbz	x0, LBB0_11
; %bb.10:
	ldp	w1, w0, [sp, #84]
	sub	x5, x29, #88
	mov	w2, #0
	mov	x3, x26
	mov	x4, #0
	bl	_GdipCreateBitmapFromScan0
	mov	x20, x0
LBB0_11:
	mov	x0, x25
	bl	_SUCCEEDED
	cbz	x0, LBB0_31
; %bb.12:
	ldr	x8, [x27]
	cmp	x20, x8
	b.ne	LBB0_31
; %bb.13:
	ldur	x0, [x29, #-88]
Lloh14:
	adrp	x8, _ImageLockModeWrite@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ImageLockModeWrite@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x4, sp, #64
	mov	x1, #0
	mov	x3, x26
	bl	_GdipBitmapLockBits
	mov	x20, x0
	ldr	x8, [x27]
	cmp	x0, x8
	b.ne	LBB0_19
; %bb.14:
	str	xzr, [sp, #56]
	ldr	w8, [sp, #88]
	mov	w9, #1
	stp	w8, w9, [sp, #40]
	ldr	w8, [sp, #84]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.15:
	mov	w26, #0
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	str	w26, [sp, #48]
	ldr	x0, [sp, #104]
	ldr	w8, [sp, #64]
	cmp	w8, #0
	cneg	w2, w8, mi
	ldr	x9, [sp, #72]
	mul	w8, w8, w26
	add	x4, x9, w8, sxtw #2
	add	x1, sp, #40
	mov	x3, x2
	bl	_IWICBitmapSource_CopyPixels
	mov	x25, x0
	bl	_FAILED
	cbnz	x0, LBB0_18
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	add	w26, w26, #1
	ldr	w8, [sp, #84]
	cmp	w26, w8
	b.lt	LBB0_16
LBB0_18:
	ldur	x0, [x29, #-88]
	add	x1, sp, #64
	bl	_GdipBitmapUnlockBits
LBB0_19:
	mov	x0, x25
	bl	_SUCCEEDED
	ldr	x8, [x27]
	cmp	x0, #0
	ccmp	x20, x8, #0, ne
	b.eq	LBB0_26
; %bb.20:
	str	xzr, [x19]
	ldur	x0, [x29, #-88]
	bl	_GdipDisposeImage
	b	LBB0_27
LBB0_21:
Lloh17:
	adrp	x26, _pixel_formats@GOTPAGE
Lloh18:
	ldr	x26, [x26, _pixel_formats@GOTPAGEOFF]
	ldr	x8, [x26]
	ldr	x1, [x8, #8]
	cbz	x1, LBB0_3
; %bb.22:
	str	w28, [sp, #28]                  ; 4-byte Folded Spill
	mov	x28, #0
	mov	w23, #24
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #92
	bl	_IsEqualGUID
	cbnz	x0, LBB0_57
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	add	x28, x28, #1
	ldr	x8, [x26]
	ldr	x1, [x8, x23]
	add	x23, x23, #16
	cbnz	x1, LBB0_23
; %bb.25:
	mov	w26, #0
	ldr	w28, [sp, #28]                  ; 4-byte Folded Reload
	b	LBB0_4
LBB0_26:
	ldur	x8, [x29, #-88]
	str	x8, [x19]
LBB0_27:
	mov	x0, x25
	bl	_SUCCEEDED
	ldr	x8, [x27]
	cmp	x0, #0
	ccmp	x20, x8, #0, ne
	b.ne	LBB0_31
; %bb.28:
	ldr	x0, [sp, #104]
	add	x1, sp, #96
	add	x2, sp, #32
	bl	_IWICBitmapSource_GetResolution
	bl	_SUCCEEDED
	cbz	x0, LBB0_30
; %bb.29:
	ldr	d0, [sp, #96]
	ldur	x8, [x29, #-88]
	str	d0, [x8]
	ldr	d0, [sp, #32]
	str	d0, [x8, #8]
LBB0_30:
Lloh19:
	adrp	x8, _S_OK@GOTPAGE
Lloh20:
	ldr	x8, [x8, _S_OK@GOTPAGEOFF]
Lloh21:
	ldr	x25, [x8]
LBB0_31:
	ldr	x0, [sp, #104]
	bl	_IWICBitmapSource_Release
LBB0_32:
	mov	x0, x25
	bl	_SUCCEEDED
	cbz	x0, LBB0_35
; %bb.33:
	ldur	x0, [x29, #-88]
	str	xzr, [x0, #48]
	cbz	x24, LBB0_36
; %bb.34:
	mov	x1, x21
	mov	x2, x22
	blr	x24
	b	LBB0_41
LBB0_35:
	mov	x23, #0
	b	LBB0_42
LBB0_36:
	ldur	x0, [x29, #-96]
Lloh22:
	adrp	x1, _IID_IWICMetadataBlockReader@GOTPAGE
Lloh23:
	ldr	x1, [x1, _IID_IWICMetadataBlockReader@GOTPAGEOFF]
	add	x2, sp, #96
	bl	_IWICBitmapFrameDecode_QueryInterface
Lloh24:
	adrp	x23, _S_OK@GOTPAGE
Lloh25:
	ldr	x23, [x23, _S_OK@GOTPAGEOFF]
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_41
; %bb.37:
	str	wzr, [sp, #32]
	ldr	x0, [sp, #96]
	add	x1, sp, #32
	bl	_IWICMetadataBlockReader_GetCount
	ldr	x8, [x23]
	cmp	x0, x8
	b.ne	LBB0_40
; %bb.38:
	ldr	w8, [sp, #32]
	cbz	w8, LBB0_40
; %bb.39:
	ldr	x0, [sp, #96]
	ldur	x8, [x29, #-88]
	add	x2, x8, #48
	mov	w1, #0
	bl	_IWICMetadataBlockReader_GetReaderByIndex
LBB0_40:
	ldr	x0, [sp, #96]
	bl	_IWICMetadataBlockReader_Release
LBB0_41:
	ldur	x0, [x29, #-96]
	mov	x1, x28
	bl	_get_palette
	mov	x23, x0
	ldur	x0, [x29, #-96]
	bl	_IWICBitmapFrameDecode_Release
LBB0_42:
	mov	x0, x25
	bl	_FAILED
	ldr	x8, [x27]
	cbz	x0, LBB0_45
; %bb.43:
	cmp	x20, x8
	b.ne	LBB0_45
; %bb.44:
	mov	x0, x25
	bl	_hresult_to_status
	mov	x20, x0
	ldr	x8, [x27]
LBB0_45:
	cmp	x20, x8
	b.ne	LBB0_54
; %bb.46:
Lloh26:
	adrp	x8, _ImageFlagsReadOnly@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ImageFlagsReadOnly@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _ImageFlagsHasRealPixelSize@GOTPAGE
Lloh30:
	ldr	x9, [x9, _ImageFlagsHasRealPixelSize@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh32:
	adrp	x9, _ImageFlagsHasRealDPI@GOTPAGE
Lloh33:
	ldr	x9, [x9, _ImageFlagsHasRealDPI@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldur	x9, [x29, #-88]
	ldr	w10, [x9, #16]
	orr	w8, w8, w10
	str	w8, [x9, #16]
Lloh35:
	adrp	x1, _GUID_WICPixelFormat2bppGray@GOTPAGE
Lloh36:
	ldr	x1, [x1, _GUID_WICPixelFormat2bppGray@GOTPAGEOFF]
	add	x0, sp, #92
	bl	_IsEqualGUID
	cbnz	x0, LBB0_48
; %bb.47:
Lloh37:
	adrp	x1, _GUID_WICPixelFormat4bppGray@GOTPAGE
Lloh38:
	ldr	x1, [x1, _GUID_WICPixelFormat4bppGray@GOTPAGEOFF]
	add	x0, sp, #92
	bl	_IsEqualGUID
	cbz	x0, LBB0_55
LBB0_48:
Lloh39:
	adrp	x24, _ImageFlagsColorSpaceGRAY@GOTPAGE
Lloh40:
	ldr	x24, [x24, _ImageFlagsColorSpaceGRAY@GOTPAGEOFF]
LBB0_49:
	ldr	w8, [x24]
	ldur	x9, [x29, #-88]
	ldr	w10, [x9, #16]
	orr	w8, w10, w8
	ldr	w10, [sp, #80]
	stp	w8, w10, [x9, #16]
	str	w22, [x9, #24]
	str	x21, [x9, #40]
	mov	x0, x21
	bl	_IWICBitmapDecoder_AddRef
	cbz	x23, LBB0_51
; %bb.50:
	ldur	x8, [x29, #-88]
	ldr	x0, [x8, #32]
	bl	_heap_free
	ldur	x8, [x29, #-88]
	str	x23, [x8, #32]
	b	LBB0_53
LBB0_51:
Lloh41:
	adrp	x1, _GUID_WICPixelFormatBlackWhite@GOTPAGE
Lloh42:
	ldr	x1, [x1, _GUID_WICPixelFormatBlackWhite@GOTPAGEOFF]
	add	x0, sp, #92
	bl	_IsEqualGUID
	cbz	x0, LBB0_53
; %bb.52:
	ldur	x8, [x29, #-88]
	ldr	x8, [x8, #32]
	str	xzr, [x8]
LBB0_53:
	ldr	x1, [x19]
Lloh43:
	adrp	x0, l_.str.2@PAGE
Lloh44:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_TRACE
LBB0_54:
	mov	x0, x20
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #128]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_55:
Lloh45:
	adrp	x1, _GUID_WICPixelFormat8bppGray@GOTPAGE
Lloh46:
	ldr	x1, [x1, _GUID_WICPixelFormat8bppGray@GOTPAGEOFF]
	add	x0, sp, #92
	bl	_IsEqualGUID
Lloh47:
	adrp	x24, _ImageFlagsColorSpaceGRAY@GOTPAGE
Lloh48:
	ldr	x24, [x24, _ImageFlagsColorSpaceGRAY@GOTPAGEOFF]
	cbnz	x0, LBB0_49
; %bb.56:
Lloh49:
	adrp	x1, _GUID_WICPixelFormat16bppGray@GOTPAGE
Lloh50:
	ldr	x1, [x1, _GUID_WICPixelFormat16bppGray@GOTPAGEOFF]
	add	x0, sp, #92
	bl	_IsEqualGUID
Lloh51:
	adrp	x8, _ImageFlagsColorSpaceRGB@GOTPAGE
Lloh52:
	ldr	x8, [x8, _ImageFlagsColorSpaceRGB@GOTPAGEOFF]
	cmp	x0, #0
	csel	x24, x8, x24, eq
	b	LBB0_49
LBB0_57:
	ldur	x0, [x29, #-96]
	str	x0, [sp, #104]
	bl	_IWICBitmapSource_AddRef
	ldr	x8, [x26]
	add	x8, x8, w28, uxtw #4
	ldp	w28, w26, [x8]
	b	LBB0_4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGot	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
	.comm	_Ok,8,3                         ; @Ok
	.comm	_WICBitmapPaletteTypeFixedHalftone256,4,2 ; @WICBitmapPaletteTypeFixedHalftone256
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%p,%u,%p\n"

	.comm	_pixel_formats,8,3              ; @pixel_formats
	.comm	_GUID_WICPixelFormat32bppBGRA,4,2 ; @GUID_WICPixelFormat32bppBGRA
	.comm	_PixelFormat32bppARGB,4,2       ; @PixelFormat32bppARGB
l_.str.1:                               ; @.str.1
	.asciz	"%s => %#x\n"

	.comm	_ImageLockModeWrite,4,2         ; @ImageLockModeWrite
	.comm	_S_OK,8,3                       ; @S_OK
	.comm	_IID_IWICMetadataBlockReader,4,2 ; @IID_IWICMetadataBlockReader
	.comm	_ImageFlagsReadOnly,4,2         ; @ImageFlagsReadOnly
	.comm	_ImageFlagsHasRealPixelSize,4,2 ; @ImageFlagsHasRealPixelSize
	.comm	_ImageFlagsHasRealDPI,4,2       ; @ImageFlagsHasRealDPI
	.comm	_GUID_WICPixelFormat2bppGray,4,2 ; @GUID_WICPixelFormat2bppGray
	.comm	_GUID_WICPixelFormat4bppGray,4,2 ; @GUID_WICPixelFormat4bppGray
	.comm	_GUID_WICPixelFormat8bppGray,4,2 ; @GUID_WICPixelFormat8bppGray
	.comm	_GUID_WICPixelFormat16bppGray,4,2 ; @GUID_WICPixelFormat16bppGray
	.comm	_ImageFlagsColorSpaceGRAY,4,2   ; @ImageFlagsColorSpaceGRAY
	.comm	_ImageFlagsColorSpaceRGB,4,2    ; @ImageFlagsColorSpaceRGB
	.comm	_GUID_WICPixelFormatBlackWhite,4,2 ; @GUID_WICPixelFormatBlackWhite
l_.str.2:                               ; @.str.2
	.asciz	"=> %p\n"

	.no_dead_strip	_decode_frame_wic
.subsections_via_symbols
