	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageSetBrush                ## -- Begin function gdImageSetBrush
	.p2align	4, 0x90
_gdImageSetBrush:                       ## @gdImageSetBrush
	.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	%rsi, 16(%rdi)
	cmpl	$0, 8(%rdi)
	jne	LBB0_5
## %bb.1:
	movq	%rsi, %r15
	cmpl	$0, 8(%rsi)
	jne	LBB0_5
## %bb.2:
	movq	%rdi, %r14
	movq	%r15, %rdi
	callq	_gdImageColorsTotal
	testl	%eax, %eax
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_gdImageRed
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_gdImageGreen
	movl	%eax, %r13d
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_gdImageBlue
	movl	%eax, %r12d
	movq	%r15, %rdi
	movl	%ebx, %esi
	callq	_gdImageAlpha
	movq	%r14, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%r13d, %edx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_gdImageColorResolveAlpha
	movq	(%r14), %rcx
	movl	%eax, (%rcx,%rbx,4)
	incq	%rbx
	movq	%r15, %rdi
	callq	_gdImageColorsTotal
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	addq	$8, %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	_gdImageSetBrush                ; -- Begin function gdImageSetBrush
	.p2align	2
_gdImageSetBrush:                       ; @gdImageSetBrush
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	str	x1, [x0, #16]
	ldr	w8, [x0, #8]
	cbnz	w8, LBB0_5
; %bb.1:
	mov	x19, x1
	ldr	w8, [x1, #8]
	cbnz	w8, LBB0_5
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	bl	_gdImageColorsTotal
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.3:
	mov	x21, #0
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	x1, x21
	bl	_gdImageRed
	mov	x22, x0
	mov	x0, x19
	mov	x1, x21
	bl	_gdImageGreen
	mov	x23, x0
	mov	x0, x19
	mov	x1, x21
	bl	_gdImageBlue
	mov	x24, x0
	mov	x0, x19
	mov	x1, x21
	bl	_gdImageAlpha
	mov	x4, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	mov	x3, x24
	bl	_gdImageColorResolveAlpha
	ldr	x8, [x20]
	str	w0, [x8, x21, lsl #2]
	add	x21, x21, #1
	mov	x0, x19
	bl	_gdImageColorsTotal
	cmp	x21, w0, sxtw
	b.lt	LBB0_4
LBB0_5:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
