	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _gdImageGifCtx
__gdImageGifCtx:                        ## @_gdImageGifCtx
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	(%rdi), %r14d
	xorl	%r12d, %r12d
	cmpq	$0, 32(%rdi)
	je	LBB0_2
## %bb.1:
	movl	$1, %r13d
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$256, %edx                      ## imm = 0x100
	callq	_gdImageCreatePaletteFromTrueColor
	movq	%rax, %rbx
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_5
LBB0_2:
	movl	28(%rbx), %edi
	callq	_colorstobpp
                                        ## kill: def $eax killed $eax def $rax
	movl	24(%rbx), %esi
	movl	20(%rbx), %edx
	movl	16(%rbx), %r9d
	movl	12(%rbx), %r10d
	movl	4(%rbx), %r11d
	movl	8(%rbx), %r13d
	subq	$8, %rsp
	movl	%r15d, %edi
	movl	%r14d, %ecx
	xorl	%r8d, %r8d
	pushq	%rbx
	pushq	%r11
	pushq	%r13
	pushq	%r10
	pushq	%rax
	callq	_GIFEncode
	addq	$48, %rsp
	testq	%r12, %r12
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_gdImageDestroy
LBB0_4:
	xorl	%r13d, %r13d
LBB0_5:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	__gdImageGifCtx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _gdImageGifCtx
__gdImageGifCtx:                        ; @_gdImageGifCtx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x22, x0
	ldr	w19, [x0]
	ldr	x8, [x0, #32]
	cbz	x8, LBB0_2
; %bb.1:
	mov	w23, #1
	mov	x0, x22
	mov	w1, #1
	mov	w2, #256
	bl	_gdImageCreatePaletteFromTrueColor
	mov	x22, x0
	mov	x21, x0
	cbnz	x0, LBB0_3
	b	LBB0_6
LBB0_2:
	mov	x21, #0
LBB0_3:
	ldr	w0, [x22, #28]
	bl	_colorstobpp
	mov	x6, x0
	ldp	w2, w1, [x22, #20]
	ldp	w7, w5, [x22, #12]
	ldp	w9, w8, [x22, #4]
	str	x22, [sp, #8]
	stp	w8, w9, [sp]
	mov	x0, x20
	mov	x3, x19
	mov	w4, #0
	bl	_GIFEncode
	cbz	x21, LBB0_5
; %bb.4:
	mov	x0, x21
	bl	_gdImageDestroy
LBB0_5:
	mov	w23, #0
LBB0_6:
	mov	x0, x23
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	__gdImageGifCtx
.subsections_via_symbols
