	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xwd_encode_frame
_xwd_encode_frame:                      ## @xwd_encode_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	$1128, %rsp                     ## imm = 0x468
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movq	%rdx, -1088(%rbp)               ## 8-byte Spill
	movq	%rsi, %r15
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	(%rdi), %ebx
	movl	%ebx, %edi
	callq	_av_pix_fmt_desc_get
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_av_get_bits_per_pixel
	movq	_AV_PIX_FMT_FLAG_BE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%r10d, %r10d
	testl	%ecx, (%r12)
	setne	%dl
	leal	-128(%rbx), %ecx
	cmpl	$20, %ecx
	ja	LBB0_9
## %bb.1:
	movq	%r14, -1168(%rbp)               ## 8-byte Spill
	movb	%dl, %r10b
	movl	$24, -1076(%rbp)                ## 4-byte Folded Spill
	movl	$32, %esi
	movq	_XWD_TRUE_COLOR@GOTPCREL(%rip), %r8
	movl	$16711680, %edi                 ## imm = 0xFF0000
	xorl	%r12d, %r12d
	movl	$255, %r11d
	movl	$65280, %r9d                    ## imm = 0xFF00
	leaq	LJTI0_0(%rip), %rdx
	movslq	(%rdx,%rcx,4), %rcx
	addq	%rdx, %rcx
	xorl	%edx, %edx
	xorl	%r14d, %r14d
	jmpq	*%rcx
LBB0_6:
	movl	$8, %esi
	movl	$256, %r14d                     ## imm = 0x100
	movb	$1, %dl
	movq	_XWD_PSEUDO_COLOR@GOTPCREL(%rip), %r8
	xorl	%r9d, %r9d
	xorl	%r11d, %r11d
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	movl	$8, -1076(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_12
LBB0_11:
	cmpl	$148, %ebx
	sete	%cl
	leal	-147(%rbx), %edx
	cmpl	$2, %edx
	movl	$1, %edx
	cmovbl	%edx, %r10d
	cmpl	$128, %ebx
	sete	%dl
	orb	%cl, %dl
	movl	$16711680, %edi                 ## imm = 0xFF0000
	movl	$255, %ecx
	movl	$255, %r11d
	cmovnel	%edi, %r11d
	cmovnel	%ecx, %edi
	movl	$24, %eax
	movl	$32, %esi
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	xorl	%r14d, %r14d
	movl	$32, -1076(%rbp)                ## 4-byte Folded Spill
	jmp	LBB0_12
LBB0_3:
	leal	-141(%rbx), %ecx
	cmpl	$2, %ecx
	movl	$63488, %ecx                    ## imm = 0xF800
	movl	$31, %edi
	movl	$31, %r11d
	cmovbl	%ecx, %r11d
	cmovael	%ecx, %edi
	movl	$16, %esi
	xorl	%r12d, %r12d
	movl	$2016, %r9d                     ## imm = 0x7E0
	jmp	LBB0_4
LBB0_5:
	leal	-143(%rbx), %ecx
	cmpl	$2, %ecx
	movl	$31744, %ecx                    ## imm = 0x7C00
	movl	$31, %edi
	movl	$31, %r11d
	cmovbl	%ecx, %r11d
	cmovael	%ecx, %edi
	movl	$16, %esi
	xorl	%r12d, %r12d
	movl	$992, %r9d                      ## imm = 0x3E0
LBB0_4:
	xorl	%edx, %edx
	xorl	%r14d, %r14d
	movl	$16, -1076(%rbp)                ## 4-byte Folded Spill
LBB0_12:
	movl	%esi, -1104(%rbp)               ## 4-byte Spill
	movl	%r12d, -1112(%rbp)              ## 4-byte Spill
	movl	%eax, -1116(%rbp)               ## 4-byte Spill
	movl	%edi, -1120(%rbp)               ## 4-byte Spill
	movl	%r11d, -1124(%rbp)              ## 4-byte Spill
	movl	%r9d, -1128(%rbp)               ## 4-byte Spill
	movl	%edx, -1132(%rbp)               ## 4-byte Spill
	movl	%r10d, -1136(%rbp)              ## 4-byte Spill
	movq	%rbx, -1160(%rbp)               ## 8-byte Spill
	movl	(%r8), %eax
	movl	%eax, -1108(%rbp)               ## 4-byte Spill
	movl	4(%r13), %edi
	imull	-1076(%rbp), %edi               ## 4-byte Folded Reload
	callq	_FFALIGN
                                        ## kill: def $eax killed $eax def $rax
	leal	7(%rax), %r12d
	testl	%eax, %eax
	cmovnsl	%eax, %r12d
	movq	_XWD_HEADER_SIZE@GOTPCREL(%rip), %rax
	movq	_WINDOW_NAME_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	addl	(%rax), %ebx
	sarl	$3, %r12d
	movq	_XWD_CMAP_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	%r14d, %eax
	addl	%ebx, %eax
	movl	8(%r13), %edx
	imull	%r12d, %edx
	addl	%eax, %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	xorl	%ecx, %ecx
	callq	_ff_alloc_packet2
	testl	%eax, %eax
	js	LBB0_23
## %bb.13:
	movq	%r15, -1144(%rbp)               ## 8-byte Spill
	movq	(%r15), %rax
	movq	%rax, -1096(%rbp)
	movq	-1088(%rbp), %rcx               ## 8-byte Reload
	movl	$1, (%rcx)
	movq	_AV_PICTURE_TYPE_I@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 24(%rcx)
	leaq	-1096(%rbp), %r15
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_bytestream_put_be32
	movq	_XWD_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_bytestream_put_be32
	movq	_XWD_Z_PIXMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1116(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movl	4(%r13), %esi
	movq	%r15, %rdi
	callq	_bytestream_put_be32
	movl	8(%r13), %esi
	movq	%r15, %rdi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1136(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	$32, %esi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1112(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1104(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1076(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	%r12d, %esi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1108(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1120(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1128(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	-1124(%rbp), %esi               ## 4-byte Reload
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	$8, %esi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_bytestream_put_be32
	movl	4(%r13), %esi
	movq	%r15, %rdi
	callq	_bytestream_put_be32
	movl	8(%r13), %esi
	movq	%r15, %rdi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_be32
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_be32
	movq	_WINDOW_NAME@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	_WINDOW_NAME_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	callq	_bytestream_put_buffer
	movq	-1160(%rbp), %rsi               ## 8-byte Reload
	cmpl	$136, %esi
	movq	%r13, -1152(%rbp)               ## 8-byte Spill
	movl	%r12d, -1100(%rbp)              ## 4-byte Spill
	jne	LBB0_15
## %bb.14:
	movq	-1088(%rbp), %rax               ## 8-byte Reload
	movq	8(%rax), %rax
	movq	8(%rax), %rsi
	leaq	-1072(%rbp), %rdi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_memcpy
	cmpb	$0, -1132(%rbp)                 ## 1-byte Folded Reload
	jne	LBB0_17
	jmp	LBB0_19
LBB0_15:
	leaq	-1072(%rbp), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_avpriv_set_systematic_pal2
	cmpb	$0, -1132(%rbp)                 ## 1-byte Folded Reload
	je	LBB0_19
LBB0_17:
	cmpl	$2, %r14d
	movl	$1, %r13d
	cmovael	%r14d, %r13d
	xorl	%ebx, %ebx
	leaq	-1096(%rbp), %r15
	.p2align	4, 0x90
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	movl	-1072(%rbp,%rbx,4), %r12d
	movl	%r12d, %r14d
	andl	$65280, %r14d                   ## imm = 0xFF00
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_bytestream_put_be32
	movl	%r12d, %esi
	shrl	$8, %esi
	andl	$65280, %esi                    ## imm = 0xFF00
	movq	%r15, %rdi
	callq	_bytestream_put_be16
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_bytestream_put_be16
	shll	$8, %r12d
	movzwl	%r12w, %esi
	movq	%r15, %rdi
	callq	_bytestream_put_be16
	movq	%r15, %rdi
	movl	$7, %esi
	callq	_bytestream_put_byte
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_bytestream_put_byte
	incq	%rbx
	cmpq	%rbx, %r13
	jne	LBB0_18
LBB0_19:
	movq	-1152(%rbp), %r14               ## 8-byte Reload
	cmpl	$0, 8(%r14)
	movq	-1088(%rbp), %r13               ## 8-byte Reload
	movl	-1100(%rbp), %r15d              ## 4-byte Reload
	jle	LBB0_22
## %bb.20:
	movq	8(%r13), %rax
	movq	(%rax), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	leaq	-1096(%rbp), %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_bytestream_put_buffer
	movq	16(%r13), %rax
	movslq	(%rax), %rax
	leaq	(%r12,%rax,4), %r12
	incl	%ebx
	cmpl	8(%r14), %ebx
	jl	LBB0_21
LBB0_22:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-1144(%rbp), %rcx               ## 8-byte Reload
	orl	%eax, 8(%rcx)
	movq	-1168(%rbp), %rax               ## 8-byte Reload
	movl	$1, (%rax)
	xorl	%eax, %eax
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_25
## %bb.24:
	addq	$1128, %rsp                     ## imm = 0x468
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r13, %rdi
	callq	_av_log
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.10:
	addq	$1128, %rsp                     ## imm = 0x468
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_2:
	movl	$1, %r10d
	xorl	%r12d, %r12d
	xorl	%edx, %edx
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_8:
	movl	$8, %esi
	movq	_XWD_STATIC_GRAY@GOTPCREL(%rip), %r8
	movl	$1, %r12d
	xorl	%r9d, %r9d
	xorl	%r11d, %r11d
	xorl	%edi, %edi
	movl	$1, %r10d
	xorl	%edx, %edx
	xorl	%r14d, %r14d
	movl	$1, -1076(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_12
LBB0_7:
	movl	$8, %esi
	movq	_XWD_STATIC_GRAY@GOTPCREL(%rip), %r8
	xorl	%r9d, %r9d
	xorl	%r11d, %r11d
	xorl	%r12d, %r12d
	xorl	%edi, %edi
	xorl	%edx, %edx
	xorl	%r14d, %r14d
	movl	$8, -1076(%rbp)                 ## 4-byte Folded Spill
	jmp	LBB0_12
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_11, LBB0_11-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_3, LBB0_3-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
LJTI0_0:
	.long	L0_0_set_11
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_8
	.long	L0_0_set_7
	.long	L0_0_set_11
	.long	L0_0_set_6
	.long	L0_0_set_3
	.long	L0_0_set_3
	.long	L0_0_set_5
	.long	L0_0_set_5
	.long	L0_0_set_6
	.long	L0_0_set_12
	.long	L0_0_set_11
	.long	L0_0_set_11
	.end_data_region
                                        ## -- End function
	.comm	_AV_PIX_FMT_FLAG_BE,4,2         ## @AV_PIX_FMT_FLAG_BE
	.comm	_XWD_TRUE_COLOR,4,2             ## @XWD_TRUE_COLOR
	.comm	_XWD_PSEUDO_COLOR,4,2           ## @XWD_PSEUDO_COLOR
	.comm	_XWD_STATIC_GRAY,4,2            ## @XWD_STATIC_GRAY
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unsupported pixel format\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_XWD_HEADER_SIZE,4,2            ## @XWD_HEADER_SIZE
	.comm	_WINDOW_NAME_SIZE,4,2           ## @WINDOW_NAME_SIZE
	.comm	_XWD_CMAP_SIZE,4,2              ## @XWD_CMAP_SIZE
	.comm	_AV_PICTURE_TYPE_I,4,2          ## @AV_PICTURE_TYPE_I
	.comm	_XWD_VERSION,4,2                ## @XWD_VERSION
	.comm	_XWD_Z_PIXMAP,4,2               ## @XWD_Z_PIXMAP
	.comm	_WINDOW_NAME,8,3                ## @WINDOW_NAME
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_xwd_encode_frame
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xwd_encode_frame
_xwd_encode_frame:                      ; @xwd_encode_frame
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #1104
	mov	x20, x3
	mov	x22, x2
	mov	x24, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	ldr	w26, [x0]
	mov	x0, x26
	bl	_av_pix_fmt_desc_get
	mov	x19, x0
	bl	_av_get_bits_per_pixel
Lloh3:
	adrp	x8, _AV_PIX_FMT_FLAG_BE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AV_PIX_FMT_FLAG_BE@GOTPAGEOFF]
	ldr	w9, [x19]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w9
	cset	w28, ne
	sub	w9, w26, #128
	cmp	w9, #20
	b.hi	LBB0_20
; %bb.1:
	str	x24, [sp, #48]                  ; 8-byte Folded Spill
	str	x20, [sp, #16]                  ; 8-byte Folded Spill
	mov	w16, #0
	mov	w13, #0
	mov	w23, #0
	mov	w25, #24
	mov	w1, #32
Lloh6:
	adrp	x8, _XWD_TRUE_COLOR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XWD_TRUE_COLOR@GOTPAGEOFF]
	mov	w15, #16711680
	mov	w14, #255
	mov	w17, #65280
Lloh8:
	adrp	x10, lJTI0_0@PAGE
Lloh9:
	add	x10, x10, lJTI0_0@PAGEOFF
	adr	x11, LBB0_2
	ldrh	w12, [x10, x9, lsl #1]
	add	x11, x11, x12, lsl #2
	br	x11
LBB0_2:
	mov	w17, #0
	mov	w14, #0
	mov	w16, #0
	mov	w15, #0
	mov	w1, #8
	mov	w23, #256
	mov	w13, #1
Lloh10:
	adrp	x8, _XWD_PSEUDO_COLOR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _XWD_PSEUDO_COLOR@GOTPAGEOFF]
	mov	w25, #8
	b	LBB0_7
LBB0_3:
	mov	w16, #0
	mov	w13, #0
	mov	w23, #0
	sub	w8, w26, #147
	cmp	w8, #2
	csinc	w28, w28, wzr, hs
	cmp	w26, #148
	mov	w8, #128
	ccmp	w26, w8, #4, ne
	mov	w8, #255
	mov	w9, #16711680
	csel	w14, w9, w8, eq
	csel	w15, w8, w9, eq
	mov	w0, #24
	mov	w1, #32
Lloh12:
	adrp	x8, _XWD_TRUE_COLOR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _XWD_TRUE_COLOR@GOTPAGEOFF]
	mov	w17, #65280
	mov	w25, #32
	b	LBB0_7
LBB0_4:
	mov	w16, #0
	mov	w13, #0
	mov	w23, #0
	sub	w8, w26, #141
	mov	w9, #31
	mov	w10, #63488
	cmp	w8, #2
	csel	w14, w10, w9, lo
	csel	w15, w9, w10, lo
	mov	w1, #16
Lloh14:
	adrp	x8, _XWD_TRUE_COLOR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _XWD_TRUE_COLOR@GOTPAGEOFF]
	mov	w17, #2016
	b	LBB0_6
LBB0_5:
	mov	w16, #0
	mov	w13, #0
	mov	w23, #0
	sub	w8, w26, #143
	mov	w9, #31
	mov	w10, #31744
	cmp	w8, #2
	csel	w14, w10, w9, lo
	csel	w15, w9, w10, lo
	mov	w1, #16
Lloh16:
	adrp	x8, _XWD_TRUE_COLOR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _XWD_TRUE_COLOR@GOTPAGEOFF]
	mov	w17, #992
LBB0_6:
	mov	w25, #16
LBB0_7:
	stp	w17, w16, [sp, #28]             ; 8-byte Folded Spill
	mov	x24, x0
	stp	w15, w14, [sp, #36]             ; 8-byte Folded Spill
	str	w26, [sp, #44]                  ; 4-byte Folded Spill
	str	w13, [sp, #12]                  ; 4-byte Folded Spill
	ldr	w8, [x8]
	str	w8, [sp, #24]                   ; 4-byte Folded Spill
	ldr	w8, [x21, #4]
	mul	w0, w8, w25
	mov	x26, x1
	bl	_FFALIGN
	add	w8, w0, #7
	cmp	w0, #0
	csel	w8, w8, w0, lt
Lloh18:
	adrp	x9, _XWD_HEADER_SIZE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _XWD_HEADER_SIZE@GOTPAGEOFF]
	asr	w19, w8, #3
Lloh20:
	ldr	w8, [x9]
Lloh21:
	adrp	x9, _WINDOW_NAME_SIZE@GOTPAGE
Lloh22:
	ldr	x9, [x9, _WINDOW_NAME_SIZE@GOTPAGEOFF]
Lloh23:
	ldr	w9, [x9]
	add	w27, w9, w8
Lloh24:
	adrp	x8, _XWD_CMAP_SIZE@GOTPAGE
Lloh25:
	ldr	x8, [x8, _XWD_CMAP_SIZE@GOTPAGEOFF]
Lloh26:
	ldr	w8, [x8]
	madd	w8, w8, w23, w27
	ldr	w9, [x21, #8]
	madd	w2, w9, w19, w8
	mov	x0, x21
	ldr	x20, [sp, #48]                  ; 8-byte Folded Reload
	mov	x1, x20
	mov	w3, #0
	bl	_ff_alloc_packet2
	tbnz	w0, #31, LBB0_18
; %bb.8:
	ldr	x8, [x20]
	str	x8, [sp, #56]
	mov	w8, #1
	str	w8, [x22]
Lloh27:
	adrp	x8, _AV_PICTURE_TYPE_I@GOTPAGE
Lloh28:
	ldr	x8, [x8, _AV_PICTURE_TYPE_I@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	w8, [x22, #24]
	add	x0, sp, #56
	mov	x1, x27
	bl	_bytestream_put_be32
Lloh30:
	adrp	x8, _XWD_VERSION@GOTPAGE
Lloh31:
	ldr	x8, [x8, _XWD_VERSION@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	add	x0, sp, #56
	bl	_bytestream_put_be32
Lloh33:
	adrp	x8, _XWD_Z_PIXMAP@GOTPAGE
Lloh34:
	ldr	x8, [x8, _XWD_Z_PIXMAP@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x8]
	add	x0, sp, #56
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	x1, x24
	bl	_bytestream_put_be32
	ldr	w1, [x21, #4]
	add	x0, sp, #56
	bl	_bytestream_put_be32
	ldr	w1, [x21, #8]
	add	x0, sp, #56
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	w1, #0
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	x1, x28
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	w1, #32
	bl	_bytestream_put_be32
	add	x0, sp, #56
	ldr	w1, [sp, #32]                   ; 4-byte Folded Reload
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	x1, x26
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	x1, x25
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	x1, x19
	bl	_bytestream_put_be32
	add	x0, sp, #56
	ldr	w1, [sp, #24]                   ; 4-byte Folded Reload
	bl	_bytestream_put_be32
	add	x0, sp, #56
	ldr	w1, [sp, #36]                   ; 4-byte Folded Reload
	bl	_bytestream_put_be32
	add	x0, sp, #56
	ldr	w1, [sp, #28]                   ; 4-byte Folded Reload
	bl	_bytestream_put_be32
	add	x0, sp, #56
	ldr	w1, [sp, #40]                   ; 4-byte Folded Reload
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	w1, #8
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	x1, x23
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	x1, x23
	bl	_bytestream_put_be32
	ldr	w1, [x21, #4]
	add	x0, sp, #56
	bl	_bytestream_put_be32
	ldr	w1, [x21, #8]
	add	x0, sp, #56
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	w1, #0
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	w1, #0
	bl	_bytestream_put_be32
	add	x0, sp, #56
	mov	w1, #0
	bl	_bytestream_put_be32
Lloh36:
	adrp	x8, _WINDOW_NAME@GOTPAGE
Lloh37:
	ldr	x8, [x8, _WINDOW_NAME@GOTPAGEOFF]
Lloh38:
	ldr	x1, [x8]
Lloh39:
	adrp	x8, _WINDOW_NAME_SIZE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _WINDOW_NAME_SIZE@GOTPAGEOFF]
Lloh41:
	ldr	w2, [x8]
	add	x0, sp, #56
	bl	_bytestream_put_buffer
	ldr	w1, [sp, #44]                   ; 4-byte Folded Reload
	cmp	w1, #136
	b.ne	LBB0_10
; %bb.9:
	ldr	x8, [x22, #8]
	ldr	x1, [x8, #8]
	add	x0, sp, #64
	mov	w2, #1024
	bl	_memcpy
	b	LBB0_11
LBB0_10:
	add	x0, sp, #64
	bl	_avpriv_set_systematic_pal2
LBB0_11:
	ldr	x27, [sp, #16]                  ; 8-byte Folded Reload
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_14
; %bb.12:
	mov	x20, #0
	cmp	w23, #1
	csinc	w24, w23, wzr, hi
	add	x25, sp, #64
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w26, [x25, x20, lsl #2]
	and	w23, w26, #0xff00
	add	x0, sp, #56
	mov	x1, x20
	bl	_bytestream_put_be32
	lsr	w8, w26, #8
	and	w1, w8, #0xff00
	add	x0, sp, #56
	bl	_bytestream_put_be16
	add	x0, sp, #56
	mov	x1, x23
	bl	_bytestream_put_be16
	ubfiz	w1, w26, #8, #8
	add	x0, sp, #56
	bl	_bytestream_put_be16
	add	x0, sp, #56
	mov	w1, #7
	bl	_bytestream_put_byte
	add	x0, sp, #56
	mov	w1, #0
	bl	_bytestream_put_byte
	add	x20, x20, #1
	cmp	x24, x20
	b.ne	LBB0_13
LBB0_14:
	ldr	w8, [x21, #8]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.15:
	mov	w23, #0
	ldr	x8, [x22, #8]
	ldr	x20, [x8]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #56
	mov	x1, x20
	mov	x2, x19
	bl	_bytestream_put_buffer
	ldr	x8, [x22, #16]
	ldrsw	x8, [x8]
	add	x20, x20, x8, lsl #2
	add	w23, w23, #1
	ldr	w8, [x21, #8]
	cmp	w23, w8
	b.lt	LBB0_16
LBB0_17:
	mov	w0, #0
Lloh42:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh43:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	ldr	x10, [sp, #48]                  ; 8-byte Folded Reload
	ldr	w9, [x10, #8]
	orr	w8, w9, w8
	str	w8, [x10, #8]
	mov	w8, #1
	str	w8, [x27]
LBB0_18:
	ldur	x8, [x29, #-96]
Lloh45:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh46:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh47:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.19:
	add	sp, sp, #1104
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_20:
Lloh48:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh49:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh50:
	ldr	w1, [x8]
Lloh51:
	adrp	x2, l_.str@PAGE
Lloh52:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x21
	bl	_av_log
Lloh53:
	adrp	x8, _EINVAL@GOTPAGE
Lloh54:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
	ldur	x8, [x29, #-96]
Lloh56:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh57:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh58:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.21:
	add	sp, sp, #1104
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_AVERROR
LBB0_22:
	mov	w16, #0
	mov	w13, #0
	mov	w23, #0
	mov	w25, #24
	mov	w1, #32
Lloh59:
	adrp	x8, _XWD_TRUE_COLOR@GOTPAGE
Lloh60:
	ldr	x8, [x8, _XWD_TRUE_COLOR@GOTPAGEOFF]
	mov	w28, #1
	mov	w15, #16711680
	mov	w14, #255
	mov	w17, #65280
	b	LBB0_7
LBB0_23:
	mov	w17, #0
	mov	w14, #0
	mov	w15, #0
	mov	w13, #0
	mov	w23, #0
	mov	w1, #8
Lloh61:
	adrp	x8, _XWD_STATIC_GRAY@GOTPAGE
Lloh62:
	ldr	x8, [x8, _XWD_STATIC_GRAY@GOTPAGEOFF]
	mov	w16, #1
	mov	w28, #1
	mov	w25, #1
	b	LBB0_7
LBB0_24:
	mov	w17, #0
	mov	w14, #0
	mov	w16, #0
	mov	w15, #0
	mov	w13, #0
	mov	w23, #0
	mov	w1, #8
Lloh63:
	adrp	x8, _XWD_STATIC_GRAY@GOTPAGE
Lloh64:
	ldr	x8, [x8, _XWD_STATIC_GRAY@GOTPAGEOFF]
	mov	w25, #8
	b	LBB0_7
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGot	Lloh59, Lloh60
	.loh AdrpLdrGot	Lloh61, Lloh62
	.loh AdrpLdrGot	Lloh63, Lloh64
	.cfi_endproc
	.section	__TEXT,__const
	.p2align	1
lJTI0_0:
	.short	(LBB0_3-LBB0_2)>>2
	.short	(LBB0_2-LBB0_2)>>2
	.short	(LBB0_4-LBB0_2)>>2
	.short	(LBB0_4-LBB0_2)>>2
	.short	(LBB0_5-LBB0_2)>>2
	.short	(LBB0_5-LBB0_2)>>2
	.short	(LBB0_2-LBB0_2)>>2
	.short	(LBB0_22-LBB0_2)>>2
	.short	(LBB0_2-LBB0_2)>>2
	.short	(LBB0_23-LBB0_2)>>2
	.short	(LBB0_24-LBB0_2)>>2
	.short	(LBB0_3-LBB0_2)>>2
	.short	(LBB0_2-LBB0_2)>>2
	.short	(LBB0_4-LBB0_2)>>2
	.short	(LBB0_4-LBB0_2)>>2
	.short	(LBB0_5-LBB0_2)>>2
	.short	(LBB0_5-LBB0_2)>>2
	.short	(LBB0_2-LBB0_2)>>2
	.short	(LBB0_7-LBB0_2)>>2
	.short	(LBB0_3-LBB0_2)>>2
	.short	(LBB0_3-LBB0_2)>>2
                                        ; -- End function
	.comm	_AV_PIX_FMT_FLAG_BE,4,2         ; @AV_PIX_FMT_FLAG_BE
	.comm	_XWD_TRUE_COLOR,4,2             ; @XWD_TRUE_COLOR
	.comm	_XWD_PSEUDO_COLOR,4,2           ; @XWD_PSEUDO_COLOR
	.comm	_XWD_STATIC_GRAY,4,2            ; @XWD_STATIC_GRAY
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unsupported pixel format\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_XWD_HEADER_SIZE,4,2            ; @XWD_HEADER_SIZE
	.comm	_WINDOW_NAME_SIZE,4,2           ; @WINDOW_NAME_SIZE
	.comm	_XWD_CMAP_SIZE,4,2              ; @XWD_CMAP_SIZE
	.comm	_AV_PICTURE_TYPE_I,4,2          ; @AV_PICTURE_TYPE_I
	.comm	_XWD_VERSION,4,2                ; @XWD_VERSION
	.comm	_XWD_Z_PIXMAP,4,2               ; @XWD_Z_PIXMAP
	.comm	_WINDOW_NAME,8,3                ; @WINDOW_NAME
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_xwd_encode_frame
.subsections_via_symbols
