	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageFill                    ## -- Begin function gdImageFill
	.p2align	4, 0x90
_gdImageFill:                           ## @gdImageFill
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r12d
	movl	%edx, %r15d
	movl	%esi, %r13d
	movq	%rdi, %rbx
	cmpl	$0, 16(%rdi)
	jne	LBB0_2
## %bb.1:
	cmpl	%r12d, (%rbx)
	jle	LBB0_16
LBB0_2:
	movl	4(%rbx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	$0, 4(%rbx)
	movq	_gdTiled@GOTPCREL(%rip), %rax
	cmpl	%r12d, (%rax)
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	__gdImageFillTiled
	jmp	LBB0_15
LBB0_4:
	movl	8(%rbx), %r14d
	movl	12(%rbx), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movq	%rbx, %rdi
	movl	%r13d, %esi
	movl	%r15d, %edx
	callq	_gdImageGetPixel
	movl	%r13d, %ecx
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	testl	%r13d, %r13d
	js	LBB0_15
## %bb.5:
	movl	%eax, %r13d
	cmpl	%r12d, %eax
	je	LBB0_15
## %bb.6:
	testl	%r15d, %r15d
	js	LBB0_15
## %bb.7:
	cmpl	-44(%rbp), %r14d                ## 4-byte Folded Reload
	jl	LBB0_15
## %bb.8:
	cmpl	%r15d, -48(%rbp)                ## 4-byte Folded Reload
	jl	LBB0_15
## %bb.9:
	movl	8(%rbx), %eax
	cmpl	$3, %eax
	jg	LBB0_14
LBB0_10:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, %r14d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_10 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	callq	_gdImageGetPixel
	cmpl	%r13d, %eax
	jne	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=2
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	callq	_gdImageSetPixel
	leal	1(%r14), %eax
	movl	8(%rbx), %ecx
	decl	%ecx
	cmpl	%ecx, %r14d
	movl	%eax, %r14d
	jl	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	leal	1(%r15), %eax
	movl	12(%rbx), %ecx
	decl	%ecx
	cmpl	%ecx, %r15d
	movl	%eax, %r15d
	jl	LBB0_10
	jmp	LBB0_15
LBB0_14:
	imull	12(%rbx), %eax
	leal	3(%rax), %esi
	testl	%eax, %eax
	cmovnsl	%eax, %esi
	sarl	$2, %esi
	movl	$4, %edi
	movl	$1, %edx
	callq	_safe_emalloc
	movq	%rax, %r14
	movl	%r15d, %edi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %esi
	movl	%r12d, %edx
	movl	$1, %ecx
	callq	_FILL_PUSH
	incl	%r15d
	movl	%r15d, %edi
	movl	%r12d, %esi
	movl	%r12d, %edx
	movl	$-1, %ecx
	callq	_FILL_PUSH
	movq	%r14, %rdi
	callq	_efree
LBB0_15:
	movl	-52(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, 4(%rbx)
LBB0_16:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_gdTiled,4,2                    ## @gdTiled
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageFill                    ; -- Begin function gdImageFill
	.p2align	2
_gdImageFill:                           ; @gdImageFill
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w8, [x0, #16]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, w22
	b.le	LBB0_16
LBB0_2:
	ldr	w25, [x19, #4]
	str	wzr, [x19, #4]
Lloh0:
	adrp	x8, _gdTiled@GOTPAGE
Lloh1:
	ldr	x8, [x8, _gdTiled@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w22
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	bl	__gdImageFillTiled
	b	LBB0_15
LBB0_4:
	ldp	w26, w24, [x19, #8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	bl	_gdImageGetPixel
	tbnz	w20, #31, LBB0_15
; %bb.5:
	mov	x23, x0
	cmp	w0, w22
	b.eq	LBB0_15
; %bb.6:
	tbnz	w21, #31, LBB0_15
; %bb.7:
	cmp	w26, w20
	b.lt	LBB0_15
; %bb.8:
	cmp	w24, w21
	b.lt	LBB0_15
; %bb.9:
	ldr	w8, [x19, #8]
	cmp	w8, #3
	b.gt	LBB0_14
LBB0_10:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_11 Depth 2
	mov	x24, x20
LBB0_11:                                ;   Parent Loop BB0_10 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x24
	mov	x2, x21
	bl	_gdImageGetPixel
	cmp	w0, w23
	b.ne	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	mov	x0, x19
	mov	x1, x24
	mov	x2, x21
	mov	x3, x22
	bl	_gdImageSetPixel
	add	w8, w24, #1
	ldr	w9, [x19, #8]
	sub	w9, w9, #1
	cmp	w24, w9
	mov	x24, x8
	b.lt	LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_10 Depth=1
	add	w8, w21, #1
	ldr	w9, [x19, #12]
	sub	w9, w9, #1
	cmp	w21, w9
	mov	x21, x8
	b.lt	LBB0_10
	b	LBB0_15
LBB0_14:
	ldr	w9, [x19, #12]
	mul	w8, w9, w8
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w1, w8, #2
	mov	w0, #4
	mov	w2, #1
	bl	_safe_emalloc
	mov	x22, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x20
	mov	w3, #1
	bl	_FILL_PUSH
	add	w0, w21, #1
	mov	x1, x20
	mov	x2, x20
	mov	w3, #-1
	bl	_FILL_PUSH
	mov	x0, x22
	bl	_efree
LBB0_15:
	str	w25, [x19, #4]
LBB0_16:
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_gdTiled,4,2                    ; @gdTiled
.subsections_via_symbols
