	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function blit_gif_frame
_blit_gif_frame:                        ## @blit_gif_frame
	.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
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r13
	leaq	-56(%rbp), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-44(%rbp), %r8
	movq	%rbx, %rdi
	callq	_get_gif_frame_rect
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_18
## %bb.1:
	movq	_GUID_WICPixelFormat32bppBGRA@GOTPCREL(%rip), %rdi
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rsi
	callq	_WICConvertBitmapSource
	movl	%eax, %r15d
	movl	%eax, %edi
	callq	_FAILED
	testq	%rax, %rax
	jne	LBB0_18
## %bb.2:
	movl	-48(%rbp), %edi
	imull	-44(%rbp), %edi
	shll	$2, %edi
	callq	_heap_alloc_zero
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r12
	movq	-64(%rbp), %rdi
	movl	-48(%rbp), %edx
	shll	$2, %edx
	movl	-44(%rbp), %ecx
	imull	%edx, %ecx
	xorl	%esi, %esi
	movq	%rax, %r8
	callq	_IWICBitmapSource_CopyPixels
	movl	%eax, %r15d
	movq	-64(%rbp), %rdi
	callq	_IWICBitmapSource_Release
	movl	%r15d, %edi
	callq	_FAILED
	testq	%rax, %rax
	je	LBB0_5
LBB0_17:
	movq	%r12, %rdi
	callq	_heap_free
	jmp	LBB0_18
LBB0_3:
	movq	_E_OUTOFMEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_18:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	-44(%rbp), %ecx
	testl	%ecx, %ecx
	jle	LBB0_17
## %bb.6:
	xorl	%r8d, %r8d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	-44(%rbp), %ecx
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	incl	%r8d
	cmpl	%ecx, %r8d
	jge	LBB0_17
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	movl	-52(%rbp), %eax
	addl	%r8d, %eax
	cmpl	(%r13), %eax
	jge	LBB0_17
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movl	-48(%rbp), %edi
	testl	%edi, %edi
	jle	LBB0_16
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	leal	(,%r8,4), %r9d
	xorl	%ecx, %ecx
	xorl	%esi, %esi
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=2
	shll	$2, %ebx
	movslq	%ebx, %rdx
	addq	16(%r13), %rdx
	movslq	-52(%rbp), %rdi
	movslq	%r8d, %rbx
	addq	%rdi, %rbx
	movslq	8(%r13), %rdi
	imulq	%rbx, %rdi
	movl	%eax, (%rdi,%rdx)
	movl	-48(%rbp), %edi
LBB0_14:                                ##   in Loop: Header=BB0_10 Depth=2
	incq	%rsi
	movslq	%edi, %rax
	addq	$4, %rcx
	cmpq	%rax, %rsi
	jge	LBB0_15
LBB0_10:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	-56(%rbp), %ebx
	addq	%rsi, %rbx
	cmpl	4(%r13), %ebx
	jge	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	movl	%r9d, %eax
	imull	%edi, %eax
	movl	%ecx, %edx
	andl	$-4, %edx
	cltq
	leaq	(%r12,%rax,4), %rax
	movl	(%rax,%rdx,4), %eax
	testq	%r14, %r14
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=2
	cmpl	$16777216, %eax                 ## imm = 0x1000000
	jb	LBB0_14
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_GUID_WICPixelFormat32bppBGRA,4,2 ## @GUID_WICPixelFormat32bppBGRA
	.comm	_E_OUTOFMEMORY,4,2              ## @E_OUTOFMEMORY
	.no_dead_strip	_blit_gif_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function blit_gif_frame
_blit_gif_frame:                        ; @blit_gif_frame
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x2
	mov	x22, x1
	mov	x20, x0
	add	x1, sp, #28
	add	x2, sp, #24
	add	x3, sp, #20
	add	x4, sp, #16
	mov	x0, x22
	bl	_get_gif_frame_rect
	mov	x21, x0
	bl	_FAILED
	cbnz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x0, _GUID_WICPixelFormat32bppBGRA@GOTPAGE
Lloh1:
	ldr	x0, [x0, _GUID_WICPixelFormat32bppBGRA@GOTPAGEOFF]
	add	x2, sp, #8
	mov	x1, x22
	bl	_WICConvertBitmapSource
	mov	x21, x0
	bl	_FAILED
	cbnz	x0, LBB0_6
; %bb.2:
	ldp	w9, w8, [sp, #16]
	mul	w8, w8, w9
	lsl	w0, w8, #2
	bl	_heap_alloc_zero
	cbz	x0, LBB0_5
; %bb.3:
	mov	x22, x0
	ldr	x0, [sp, #8]
	ldr	w8, [sp, #20]
	lsl	w2, w8, #2
	ldr	w8, [sp, #16]
	mul	w3, w2, w8
	mov	x1, #0
	mov	x4, x22
	bl	_IWICBitmapSource_CopyPixels
	mov	x21, x0
	ldr	x0, [sp, #8]
	bl	_IWICBitmapSource_Release
	mov	x0, x21
	bl	_FAILED
	cbz	x0, LBB0_7
LBB0_4:
	mov	x0, x22
	bl	_heap_free
	b	LBB0_6
LBB0_5:
Lloh2:
	adrp	x8, _E_OUTOFMEMORY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _E_OUTOFMEMORY@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
LBB0_6:
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_7:
	ldr	w9, [sp, #16]
	cmp	w9, #1
	b.lt	LBB0_4
; %bb.8:
	mov	w8, #0
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	ldr	w9, [sp, #16]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	w8, w8, #1
	cmp	w8, w9
	b.ge	LBB0_4
LBB0_11:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_16 Depth 2
	ldr	w10, [sp, #24]
	ldr	w11, [x20]
	add	w10, w10, w8
	cmp	w10, w11
	b.ge	LBB0_4
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	ldr	w12, [sp, #20]
	cmp	w12, #1
	b.lt	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x9, #0
	mov	x10, #0
	lsl	w11, w8, #2
	b	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_16 Depth=2
	ldr	x12, [x20, #16]
	lsl	w13, w13, #2
	add	x12, x12, w13, sxtw
	ldrsw	x13, [sp, #24]
	add	x13, x13, w8, sxtw
	ldrsw	x15, [x20, #8]
	mul	x13, x13, x15
	str	w14, [x12, x13]
	ldr	w12, [sp, #20]
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=2
	add	x10, x10, #1
	add	x9, x9, #4
	cmp	x10, w12, sxtw
	b.ge	LBB0_9
LBB0_16:                                ;   Parent Loop BB0_11 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w13, [sp, #28]
	ldr	w14, [x20, #4]
	add	x13, x10, x13
	cmp	w13, w14
	b.ge	LBB0_9
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=2
	mul	w14, w11, w12
	add	x14, x22, w14, sxtw #2
	and	x15, x9, #0xfffffffc
	ldr	w14, [x14, x15, lsl #2]
	cbnz	x19, LBB0_14
; %bb.18:                               ;   in Loop: Header=BB0_16 Depth=2
	lsr	w15, w14, #24
	cbz	w15, LBB0_15
	b	LBB0_14
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_GUID_WICPixelFormat32bppBGRA,4,2 ; @GUID_WICPixelFormat32bppBGRA
	.comm	_E_OUTOFMEMORY,4,2              ; @E_OUTOFMEMORY
	.no_dead_strip	_blit_gif_frame
.subsections_via_symbols
