	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageFillToBorder            ## -- Begin function gdImageFillToBorder
	.p2align	4, 0x90
_gdImageFillToBorder:                   ## @gdImageFillToBorder
	.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	%r8d, %eax
	orl	%ecx, %eax
	js	LBB0_35
## %bb.1:
	movl	%r8d, %r14d
	movl	%ecx, %r13d
	movq	%rdi, %r12
	cmpl	$0, 16(%rdi)
	jne	LBB0_4
## %bb.2:
	movl	(%r12), %eax
	cmpl	%r14d, %eax
	jle	LBB0_35
## %bb.3:
	cmpl	%r13d, %eax
	jle	LBB0_35
LBB0_4:
	movl	4(%r12), %eax
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movl	8(%r12), %eax
	movl	$0, 4(%r12)
	leal	-1(%rax), %ecx
	xorl	%edi, %edi
	testl	%esi, %esi
	movl	$0, %ebx
	cmovgl	%esi, %ebx
	cmpl	%esi, %eax
	cmovlel	%ecx, %ebx
	movl	12(%r12), %eax
	leal	-1(%rax), %ecx
	testl	%edx, %edx
	cmovgl	%edx, %edi
	cmpl	%edx, %eax
	cmovlel	%ecx, %edi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	testl	%ebx, %ebx
	js	LBB0_34
## %bb.5:
	movq	%r12, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edx
	callq	_gdImageGetPixel
	movl	$-1, %r15d
	cmpl	%r13d, %eax
	je	LBB0_11
## %bb.6:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	%eax, %r15d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	movl	%r14d, %ecx
	callq	_gdImageSetPixel
	testl	%r15d, %r15d
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_8 Depth=1
	decl	%r15d
	movq	%r12, %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_gdImageGetPixel
	cmpl	%r13d, %eax
	jne	LBB0_8
## %bb.10:
	incl	%r15d
LBB0_11:
	cmpl	$-1, %r15d
	jne	LBB0_12
	jmp	LBB0_34
LBB0_9:
	xorl	%r15d, %r15d
LBB0_12:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leal	1(%rax), %ebx
	cmpl	8(%r12), %ebx
	movl	%r14d, -60(%rbp)                ## 4-byte Spill
	jge	LBB0_13
## %bb.14:
	movq	%r12, %rdi
	movl	%ebx, %esi
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	%r14d, %edx
	callq	_gdImageGetPixel
	cmpl	%r13d, %eax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_16 Depth=1
                                        ## kill: def $ebx killed $ebx def $rbx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	callq	_gdImageSetPixel
	movq	%rbx, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	incl	%ebx
	cmpl	8(%r12), %ebx
	jge	LBB0_18
## %bb.15:                              ##   in Loop: Header=BB0_16 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	jmp	LBB0_16
LBB0_13:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
LBB0_18:
	movl	%r13d, -64(%rbp)                ## 4-byte Spill
	testl	%r14d, %r14d
	jle	LBB0_26
## %bb.19:
	cmpl	-48(%rbp), %r15d                ## 4-byte Folded Reload
	jg	LBB0_26
## %bb.20:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leal	-1(%rax), %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	movl	$1, %ebx
	movl	%r15d, %r13d
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_21 Depth=1
	movzbl	%al, %ebx
LBB0_25:                                ##   in Loop: Header=BB0_21 Depth=1
	incl	%r13d
	cmpl	%r13d, -72(%rbp)                ## 4-byte Folded Reload
	je	LBB0_26
LBB0_21:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	callq	_gdImageGetPixel
	cmpl	-64(%rbp), %eax                 ## 4-byte Folded Reload
	sete	%cl
	cmpl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	sete	%al
	orb	%cl, %al
	testl	%ebx, %ebx
	je	LBB0_24
## %bb.22:                              ##   in Loop: Header=BB0_21 Depth=1
	movl	$1, %ebx
	testb	%al, %al
	jne	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_21 Depth=1
	movq	%r12, %rdi
	movl	%r13d, %esi
	movl	%r14d, %edx
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	movl	-60(%rbp), %r8d                 ## 4-byte Reload
	callq	_gdImageFillToBorder
	xorl	%ebx, %ebx
	jmp	LBB0_25
LBB0_26:
	movl	12(%r12), %eax
	decl	%eax
	cmpl	%eax, -56(%rbp)                 ## 4-byte Folded Reload
	movl	-60(%rbp), %r14d                ## 4-byte Reload
	movl	-64(%rbp), %r13d                ## 4-byte Reload
	jge	LBB0_34
## %bb.27:
	cmpl	-48(%rbp), %r15d                ## 4-byte Folded Reload
	jg	LBB0_34
## %bb.28:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	incl	%eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	$1, %ebx
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_29 Depth=1
	movzbl	%al, %ebx
LBB0_33:                                ##   in Loop: Header=BB0_29 Depth=1
	incl	%r15d
	cmpl	%r15d, -48(%rbp)                ## 4-byte Folded Reload
	je	LBB0_34
LBB0_29:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_gdImageGetPixel
	cmpl	%r13d, %eax
	sete	%cl
	cmpl	%r14d, %eax
	sete	%al
	orb	%cl, %al
	testl	%ebx, %ebx
	je	LBB0_32
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	$1, %ebx
	testb	%al, %al
	jne	LBB0_33
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	movl	%r13d, %ecx
	movl	%r14d, %r8d
	callq	_gdImageFillToBorder
	xorl	%ebx, %ebx
	jmp	LBB0_33
LBB0_34:
	movl	-68(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%r12)
LBB0_35:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageFillToBorder            ; -- Begin function gdImageFillToBorder
	.p2align	2
_gdImageFillToBorder:                   ; @gdImageFillToBorder
	.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
	orr	w8, w4, w3
	tbnz	w8, #31, LBB0_25
; %bb.1:
	mov	x19, x4
	mov	x20, x3
	mov	x21, x0
	ldr	w8, [x0, #16]
	cbnz	w8, LBB0_3
; %bb.2:
	ldr	w8, [x21]
	cmp	w8, w19
	ccmp	w8, w20, #4, gt
	b.le	LBB0_25
LBB0_3:
	ldp	w26, w8, [x21, #4]
	str	wzr, [x21, #4]
	sub	w9, w8, #1
	cmp	w1, #0
	csel	w10, w1, wzr, gt
	cmp	w8, w1
	csel	w23, w10, w9, gt
	ldr	w8, [x21, #12]
	sub	w9, w8, #1
	cmp	w2, #0
	csel	w10, w2, wzr, gt
	cmp	w8, w2
	csel	w24, w10, w9, gt
	tbnz	w23, #31, LBB0_24
; %bb.4:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	bl	_gdImageGetPixel
	cmp	w0, w20
	b.ne	LBB0_6
; %bb.5:
	mov	w22, #-1
	cmn	w22, #1
	b.ne	LBB0_11
	b	LBB0_24
LBB0_6:
	mov	x22, x23
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	mov	x3, x19
	bl	_gdImageSetPixel
	cmp	w22, #0
	b.le	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	sub	w22, w22, #1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	bl	_gdImageGetPixel
	cmp	w0, w20
	b.ne	LBB0_7
; %bb.9:
	add	w22, w22, #1
	cmn	w22, #1
	b.ne	LBB0_11
	b	LBB0_24
LBB0_10:
	mov	w22, #0
LBB0_11:
	add	w25, w23, #1
	ldr	w8, [x21, #8]
	cmp	w25, w8
	str	w26, [sp, #12]                  ; 4-byte Folded Spill
	b.ge	LBB0_14
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x25
	mov	x2, x24
	bl	_gdImageGetPixel
	cmp	w0, w20
	b.eq	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x23, x25
	mov	x0, x21
	mov	x1, x25
	mov	x2, x24
	mov	x3, x19
	bl	_gdImageSetPixel
	add	w25, w25, #1
	ldr	w8, [x21, #8]
	cmp	w25, w8
	b.lt	LBB0_12
LBB0_14:
	subs	w25, w24, #1
	b.lt	LBB0_23
; %bb.15:
	cmp	w22, w23
	b.gt	LBB0_23
; %bb.16:
	add	w28, w23, #1
	mov	w27, #1
	mov	x26, x22
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x27, x8
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	w26, w26, #1
	cmp	w28, w26
	b.eq	LBB0_23
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x26
	mov	x2, x25
	bl	_gdImageGetPixel
	cmp	w0, w20
	ccmp	w0, w19, #4, ne
	cset	w8, eq
	cbz	w27, LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	tbz	w8, #0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	w27, #1
	b	LBB0_18
LBB0_22:                                ;   in Loop: Header=BB0_19 Depth=1
	mov	x0, x21
	mov	x1, x26
	mov	x2, x25
	mov	x3, x20
	mov	x4, x19
	bl	_gdImageFillToBorder
	mov	w27, #0
	b	LBB0_18
LBB0_23:
	ldr	w8, [x21, #12]
	sub	w8, w8, #1
	cmp	w24, w8
	ccmp	w22, w23, #0, lt
	ldr	w26, [sp, #12]                  ; 4-byte Folded Reload
	b.le	LBB0_26
LBB0_24:
	str	w26, [x21, #4]
LBB0_25:
	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
LBB0_26:
	add	w24, w24, #1
	add	w23, w23, #1
	mov	w25, #1
	b	LBB0_29
LBB0_27:                                ;   in Loop: Header=BB0_29 Depth=1
	mov	x25, x8
LBB0_28:                                ;   in Loop: Header=BB0_29 Depth=1
	add	w22, w22, #1
	cmp	w23, w22
	b.eq	LBB0_24
LBB0_29:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	bl	_gdImageGetPixel
	cmp	w0, w20
	ccmp	w0, w19, #4, ne
	cset	w8, eq
	cbz	w25, LBB0_27
; %bb.30:                               ;   in Loop: Header=BB0_29 Depth=1
	tbz	w8, #0, LBB0_32
; %bb.31:                               ;   in Loop: Header=BB0_29 Depth=1
	mov	w25, #1
	b	LBB0_28
LBB0_32:                                ;   in Loop: Header=BB0_29 Depth=1
	mov	x0, x21
	mov	x1, x22
	mov	x2, x24
	mov	x3, x20
	mov	x4, x19
	bl	_gdImageFillToBorder
	mov	w25, #0
	b	LBB0_28
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
