	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function build_rle_packet
_build_rle_packet:                      ## @build_rle_packet
	.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
	movq	%rcx, %r15
	movl	%edx, %r14d
	leal	-129(%r14), %ecx
	xorl	%eax, %eax
	cmpl	$-128, %ecx
	jb	LBB0_12
## %bb.1:
	movq	%rdi, %r12
	cmpl	$2, %r14d
	ja	LBB0_6
## %bb.2:
	movq	_BMP_RLE_TYPE_RAW@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_6
## %bb.3:
	movl	%r14d, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_memset
	leaq	1(%r15), %r13
	leaq	1(%r12), %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_memcpy
	addq	$2, %r12
	movq	%r13, %r15
	decl	%ebx
	jne	LBB0_4
## %bb.5:
	addl	%r14d, %r14d
	jmp	LBB0_11
LBB0_6:
	movq	_BMP_RLE_TYPE_RLE@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_memset
	incq	%r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	$1, %edx
	callq	_memcpy
	movl	$2, %eax
	jmp	LBB0_12
LBB0_8:
	movq	_BMP_RLE_COMMAND@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$1, %edx
	callq	_memset
	leaq	1(%r12), %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	callq	_memset
	addq	$2, %r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_memcpy
	testb	$1, %r14b
	jne	LBB0_10
## %bb.9:
	addl	$2, %r14d
	jmp	LBB0_11
LBB0_10:
	movl	%r14d, %eax
	addq	%rax, %r12
	movq	%r12, %rdi
	xorl	%esi, %esi
	movl	$1, %edx
	callq	_memset
	addl	$3, %r14d
LBB0_11:
	movl	%r14d, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_BMP_RLE_TYPE_RAW,4,2           ## @BMP_RLE_TYPE_RAW
	.comm	_BMP_RLE_TYPE_RLE,4,2           ## @BMP_RLE_TYPE_RLE
	.comm	_BMP_RLE_COMMAND,4,2            ## @BMP_RLE_COMMAND
	.no_dead_strip	_build_rle_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function build_rle_packet
_build_rle_packet:                      ; @build_rle_packet
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	sub	w8, w2, #129
	cmn	w8, #128
	b.hs	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_12
LBB0_2:
	mov	x20, x3
	mov	x19, x2
	mov	x21, x0
	cmp	w2, #2
	b.hi	LBB0_7
; %bb.3:
Lloh0:
	adrp	x8, _BMP_RLE_TYPE_RAW@GOTPAGE
Lloh1:
	ldr	x8, [x8, _BMP_RLE_TYPE_RAW@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_7
; %bb.4:
	mov	x0, x21
	mov	w1, #1
	mov	w2, #1
	bl	_memset
	add	x0, x21, #1
	mov	x1, x20
	mov	w2, #1
	bl	_memcpy
	cmp	w19, #1
	b.eq	LBB0_6
; %bb.5:
	add	x0, x21, #2
	add	x20, x20, #1
	mov	w1, #1
	mov	w2, #1
	bl	_memset
	add	x0, x21, #3
	mov	x1, x20
	mov	w2, #1
	bl	_memcpy
LBB0_6:
	lsl	w0, w19, #1
	b	LBB0_12
LBB0_7:
Lloh3:
	adrp	x8, _BMP_RLE_TYPE_RLE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _BMP_RLE_TYPE_RLE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_9
; %bb.8:
	mov	x0, x21
	mov	x1, x19
	mov	w2, #1
	bl	_memset
	add	x0, x21, #1
	mov	x1, x20
	mov	w2, #1
	bl	_memcpy
	mov	w0, #2
	b	LBB0_12
LBB0_9:
Lloh6:
	adrp	x8, _BMP_RLE_COMMAND@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BMP_RLE_COMMAND@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #1
	bl	_memset
	add	x0, x21, #1
	mov	x1, x19
	mov	w2, #1
	bl	_memset
	add	x21, x21, #2
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	bl	_memcpy
	tbnz	w19, #0, LBB0_11
; %bb.10:
	add	w0, w19, #2
	b	LBB0_12
LBB0_11:
	add	x0, x21, w19, uxtw
	mov	w1, #0
	mov	w2, #1
	bl	_memset
	add	w0, w19, #3
LBB0_12:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_BMP_RLE_TYPE_RAW,4,2           ; @BMP_RLE_TYPE_RAW
	.comm	_BMP_RLE_TYPE_RLE,4,2           ; @BMP_RLE_TYPE_RLE
	.comm	_BMP_RLE_COMMAND,4,2            ; @BMP_RLE_COMMAND
	.no_dead_strip	_build_rle_packet
.subsections_via_symbols
