	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function compress_row
_compress_row:                          ## @compress_row
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	%rdi, %r14
	movl	%esi, %edi
	callq	_gdMalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_memcpy
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.4:
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	xorl	%r14d, %r14d
	movq	%r15, %r13
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	xorl	%r12d, %r12d
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	incq	%r13
	movq	_BMP_RLE_TYPE_RAW@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movl	$1, %r14d
LBB0_21:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%r15d
	cmpl	%ebx, %r15d
	jge	LBB0_22
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$1, %r14d
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	testl	%r14d, %r14d
	je	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_BMP_RLE_TYPE_RLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, -52(%rbp)                ## 4-byte Spill
	cmpl	$127, %r14d
	jle	LBB0_10
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	leaq	-1(%r13), %rsi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_memcmp
	testq	%rax, %rax
	movq	_BMP_RLE_TYPE_RLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmovel	%eax, %r12d
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cmpl	%eax, %r12d
	jne	LBB0_15
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	-1(%r13), %rsi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_12
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	jmp	LBB0_18
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %eax
	cmpl	$127, %r14d
	jg	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	-1(%r13), %rsi
	movq	%r13, %rdi
	movl	$1, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_16
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=1
	incl	%r14d
	incq	%r13
	jmp	LBB0_20
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	%r14d
	incq	%r13
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	jmp	LBB0_21
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %eax
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	%eax, %r12d
	movl	%eax, %esi
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_build_rle_packet
	cltq
	addq	%rax, %rbx
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	decl	%r15d
	xorl	%r14d, %r14d
                                        ## kill: def $eax killed $eax killed $rax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_20:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_21
LBB0_22:
	testl	%r14d, %r14d
	je	LBB0_23
## %bb.24:
	movq	_BMP_RLE_TYPE_RLE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_26
## %bb.25:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	%r14d, %edx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	callq	_build_rle_packet
	addl	%eax, %ebx
LBB0_26:
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	jmp	LBB0_27
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_28
LBB0_3:
	xorl	%ebx, %ebx
	jmp	LBB0_27
LBB0_23:
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_27:
	movq	%r15, %rdi
	callq	_gdFree
LBB0_28:
	movl	%ebx, %eax
	addq	$40, %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
	.no_dead_strip	_compress_row
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function compress_row
_compress_row:                          ; @compress_row
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x1
	mov	x21, x0
	mov	x0, x1
	bl	_gdMalloc
	cbz	x0, LBB0_21
; %bb.1:
	mov	x24, x0
	mov	x1, x21
	mov	x2, x22
	bl	_memcpy
	cmp	w22, #1
	b.lt	LBB0_22
; %bb.2:
	mov	w25, #0
	mov	w27, #0
	mov	w20, #0
	mov	w19, #0
Lloh0:
	adrp	x28, _BMP_RLE_TYPE_RLE@GOTPAGE
Lloh1:
	ldr	x28, [x28, _BMP_RLE_TYPE_RLE@GOTPAGEOFF]
	mov	x23, x24
	str	x24, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x24, x23
	add	x23, x23, #1
Lloh2:
	adrp	x8, _BMP_RLE_TYPE_RAW@GOTPAGE
Lloh3:
	ldr	x8, [x8, _BMP_RLE_TYPE_RAW@GOTPAGEOFF]
Lloh4:
	ldr	w19, [x8]
	mov	w25, #1
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w27, w27, #1
	cmp	w27, w22
	b.ge	LBB0_17
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w25, #1
	b.eq	LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	cbz	w25, LBB0_3
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x28]
	cmp	w19, w8
	b.ne	LBB0_12
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	cmp	w25, #127
	b.le	LBB0_10
	b	LBB0_16
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	sub	x1, x23, #1
	mov	x0, x23
	mov	w2, #1
	bl	_memcmp
	ldr	w8, [x28]
	cmp	x0, #0
	csel	w26, w8, w19, eq
	mov	x19, x8
	cmp	w26, w8
	b.ne	LBB0_13
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x1, x23, #1
	mov	x0, x23
	mov	w2, #1
	bl	_memcmp
	cbnz	x0, LBB0_16
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	add	w25, w25, #1
	add	x23, x23, #1
	b	LBB0_4
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x26, x19
	cmp	w25, #127
	b.gt	LBB0_16
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	sub	x1, x23, #1
	mov	x0, x23
	mov	w2, #1
	bl	_memcmp
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	add	w25, w25, #1
	add	x23, x23, #1
	mov	x19, x26
	b	LBB0_4
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x19, x26
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x25
	mov	x3, x24
	bl	_build_rle_packet
	mov	w25, #0
	add	x21, x21, w0, sxtw
	add	w20, w0, w20
	sub	w27, w27, #1
	b	LBB0_4
LBB0_17:
	cbz	w25, LBB0_20
; %bb.18:
	ldr	w8, [x28]
	cmp	w19, w8
	b.ne	LBB0_20
; %bb.19:
	mov	x0, x21
	mov	x1, x19
	mov	x2, x25
	mov	x3, x24
	bl	_build_rle_packet
	add	w20, w0, w20
LBB0_20:
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
	b	LBB0_23
LBB0_21:
	mov	w20, #-1
	b	LBB0_24
LBB0_22:
	mov	w20, #0
LBB0_23:
	mov	x0, x24
	bl	_gdFree
LBB0_24:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.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
	.no_dead_strip	_compress_row
.subsections_via_symbols
