	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function GIFEncode
_GIFEncode:                             ## @GIFEncode
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, %r12d
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movl	%ecx, %ebx
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %r13d
	leaq	-96(%rbp), %rdi
	xorl	%esi, %esi
	movl	$48, %edx
	callq	_memset
	movl	%ebx, -96(%rbp)
	movl	$1, -92(%rbp)
	movl	%r15d, -88(%rbp)
	movl	%r14d, -84(%rbp)
	movslq	%r15d, %r15
	movslq	%r14d, %r14
	movq	%r14, %rax
	imulq	%r15, %rax
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	testl	%r12d, %r12d
	leaq	L_.str(%rip), %rcx
	leaq	L_.str.1(%rip), %rdi
	cmovsq	%rcx, %rdi
	movq	%rax, -80(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -72(%rbp)
	movq	$0, -56(%rbp)
	movl	$6, %esi
	movl	%r13d, %edx
	callq	_gdPutBuf
	movl	%r15d, %edi
	movl	%r13d, %esi
	callq	_gifPutWord
	movl	%r14d, %edi
	movl	%r13d, %esi
	callq	_gifPutWord
	movl	16(%rbp), %ebx
	leal	-1(%rbx), %eax
	movl	%eax, %ecx
	shll	$5, %ecx
	orl	%eax, %ecx
	orb	$-128, %cl
	movsbl	%cl, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movsbl	-44(%rbp), %edi                 ## 1-byte Folded Reload
	movl	%r13d, %esi
	callq	_gdPutC
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	cmpl	$31, %ebx
	je	LBB0_3
## %bb.1:
	movq	32(%rbp), %r15
	movq	24(%rbp), %r12
	movl	$1, %eax
	movl	$1, %ebx
	movl	16(%rbp), %ecx
                                        ## kill: def $cl killed $cl killed $rcx
	shll	%cl, %ebx
	cmpl	$2, %ebx
	cmovll	%eax, %ebx
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movsbl	(%r12,%r14,4), %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movsbl	(%r15,%r14,4), %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movq	40(%rbp), %rax
	movsbl	(%rax,%r14,4), %edi
	movl	%r13d, %esi
	callq	_gdPutC
	incq	%r14
	cmpq	%r14, %rbx
	jne	LBB0_2
LBB0_3:
	movl	48(%rbp), %r12d
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	js	LBB0_5
## %bb.4:
	movl	$33, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movl	$-7, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movl	$4, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movl	$1, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movsbl	%bl, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_gdPutC
LBB0_5:
	movl	$44, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_gifPutWord
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_gifPutWord
	movl	-88(%rbp), %edi
	movl	%r13d, %esi
	callq	_gifPutWord
	movl	-84(%rbp), %edi
	movl	%r13d, %esi
	callq	_gifPutWord
	xorl	%edi, %edi
	cmpl	$0, -96(%rbp)
	setne	%dil
	shll	$6, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movl	16(%rbp), %eax
	cmpl	$3, %eax
	movl	$2, %r14d
	cmovgel	%eax, %r14d
	movsbl	%r14b, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	incl	%r14d
	leaq	-96(%rbp), %rcx
	movl	%r14d, %edi
	movl	%r13d, %esi
	movl	%r12d, %edx
	callq	_compress
	xorl	%edi, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	movl	$59, %edi
	movl	%r13d, %esi
	callq	_gdPutC
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"GIF87a"

L_.str.1:                               ## @.str.1
	.asciz	"GIF89a"

	.no_dead_strip	_GIFEncode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function GIFEncode
_GIFEncode:                             ; @GIFEncode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x23, x7
	mov	x21, x6
	mov	x22, x5
	mov	x24, x4
	mov	x25, x3
	mov	x26, x2
	mov	x27, x1
	mov	x19, x0
	ldr	w20, [x29, #32]
	mov	x0, sp
	mov	w1, #0
	mov	w2, #48
	bl	_memset
	mov	w28, #1
	stp	w25, w28, [sp]
	stp	w27, w26, [sp, #8]
	smull	x8, w26, w27
Lloh0:
	adrp	x9, l_.str.1@PAGE
Lloh1:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh2:
	adrp	x10, l_.str@PAGE
Lloh3:
	add	x10, x10, l_.str@PAGEOFF
	cmp	w22, #0
	csel	x0, x10, x9, lt
	stp	x8, xzr, [sp, #16]
	stp	xzr, xzr, [sp, #32]
	mov	w1, #6
	mov	x2, x19
	bl	_gdPutBuf
	mov	x0, x27
	mov	x1, x19
	bl	_gifPutWord
	mov	x0, x26
	mov	x1, x19
	bl	_gifPutWord
	sub	w8, w21, #1
	orr	w8, w8, w8, lsl #5
	orr	w0, w8, #0xffffff80
	mov	x1, x19
	bl	_gdPutC
	sxtb	w0, w24
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #0
	mov	x1, x19
	bl	_gdPutC
	cmp	w21, #31
	b.eq	LBB0_3
; %bb.1:
	ldp	x25, x24, [x29, #16]
	lsl	w8, w28, w21
	cmp	w8, #1
	csinc	w26, w8, wzr, gt
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x23], #4
	mov	x1, x19
	bl	_gdPutC
	ldrsb	w0, [x25], #4
	mov	x1, x19
	bl	_gdPutC
	ldrsb	w0, [x24], #4
	mov	x1, x19
	bl	_gdPutC
	subs	x26, x26, #1
	b.ne	LBB0_2
LBB0_3:
	tbnz	w22, #31, LBB0_5
; %bb.4:
	mov	w0, #33
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #-7
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #4
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #1
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #0
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #0
	mov	x1, x19
	bl	_gdPutC
	sxtb	w0, w22
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #0
	mov	x1, x19
	bl	_gdPutC
LBB0_5:
	mov	w0, #44
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #0
	mov	x1, x19
	bl	_gifPutWord
	mov	w0, #0
	mov	x1, x19
	bl	_gifPutWord
	ldr	w0, [sp, #8]
	mov	x1, x19
	bl	_gifPutWord
	ldr	w0, [sp, #12]
	mov	x1, x19
	bl	_gifPutWord
	ldr	w8, [sp]
	cmp	w8, #0
	cset	w8, ne
	lsl	w0, w8, #6
	mov	x1, x19
	bl	_gdPutC
	mov	w8, #2
	cmp	w21, #2
	csel	w21, w21, w8, gt
	sxtb	w0, w21
	mov	x1, x19
	bl	_gdPutC
	add	w0, w21, #1
	mov	x3, sp
	mov	x1, x19
	mov	x2, x20
	bl	_compress
	mov	w0, #0
	mov	x1, x19
	bl	_gdPutC
	mov	w0, #59
	mov	x1, x19
	bl	_gdPutC
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"GIF87a"

l_.str.1:                               ; @.str.1
	.asciz	"GIF89a"

	.no_dead_strip	_GIFEncode
.subsections_via_symbols
