	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function _gdScaleRow
__gdScaleRow:                           ## @_gdScaleRow
	.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	$104, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	decl	%ecx
	je	LBB0_8
## %bb.1:
	movq	%r9, %r14
	movq	(%rdi), %rax
	movl	%r8d, %esi
	movq	(%rax,%rsi,8), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	(%rdx), %rax
	movq	(%rax,%rsi,8), %rax
	movq	%rax, -128(%rbp)                ## 8-byte Spill
	movl	%ecx, %eax
	movq	%rax, -120(%rbp)                ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%r9, -80(%rbp)                  ## 8-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-80(%rbp), %r14                 ## 8-byte Reload
LBB0_7:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	movzbl	%r15b, %edi
	movzbl	%bl, %esi
	movzbl	%r12b, %edx
	movzbl	%al, %ecx
	callq	_gdTrueColorAlpha
	movq	-128(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx,%r13,4)
	incq	%r13
	cmpq	-120(%rbp), %r13                ## 8-byte Folded Reload
	je	LBB0_8
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_5 Depth 2
	movq	(%r14), %rcx
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	shlq	$4, %r13
	movslq	(%rcx,%r13), %rax
	movl	4(%rcx,%r13), %esi
	cmpl	%esi, %eax
	jle	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	xorl	%ebx, %ebx
	xorl	%r15d, %r15d
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	-112(%rbp), %rdx                ## 8-byte Reload
	leaq	(%rdx,%rax,4), %rdx
	movq	%rdx, -104(%rbp)                ## 8-byte Spill
	subl	%eax, %esi
	movq	%rsi, -136(%rbp)                ## 8-byte Spill
	xorl	%r14d, %r14d
	xorl	%r15d, %r15d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	xorl	%r12d, %r12d
	movq	%r13, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_5:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movb	%r12b, -72(%rbp)                ## 1-byte Spill
                                        ## kill: def $al killed $al killed $eax
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movb	%bl, -64(%rbp)                  ## 1-byte Spill
	movl	%r15d, %ebx
	movq	8(%rcx,%r13), %rax
	movsd	(%rax,%r14,8), %xmm0            ## xmm0 = mem[0],zero
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movl	(%r12,%r14,4), %edi
	callq	_gdTrueColorGetRed
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	cvttsd2si	%xmm0, %r15d
	addb	%bl, %r15b
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	movq	(%r13), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rax,%rcx), %rax
	movsd	(%rax,%r14,8), %xmm0            ## xmm0 = mem[0],zero
	movsd	%xmm0, -56(%rbp)                ## 8-byte Spill
	movl	(%r12,%r14,4), %edi
	callq	_gdTrueColorGetGreen
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	-56(%rbp), %xmm0                ## 8-byte Folded Reload
	cvttsd2si	%xmm0, %ebx
	addb	-64(%rbp), %bl                  ## 1-byte Folded Reload
	movq	(%r13), %rax
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	8(%rax,%rcx), %rax
	movsd	(%rax,%r14,8), %xmm0            ## xmm0 = mem[0],zero
	movsd	%xmm0, -64(%rbp)                ## 8-byte Spill
	movl	(%r12,%r14,4), %edi
	callq	_gdTrueColorGetBlue
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	-64(%rbp), %xmm0                ## 8-byte Folded Reload
	cvttsd2si	%xmm0, %r12d
	addb	-72(%rbp), %r12b                ## 1-byte Folded Reload
	movq	(%r13), %rax
	movq	-88(%rbp), %r13                 ## 8-byte Reload
	movq	8(%rax,%r13), %rax
	movsd	(%rax,%r14,8), %xmm0            ## xmm0 = mem[0],zero
	movsd	%xmm0, -72(%rbp)                ## 8-byte Spill
	movq	-104(%rbp), %rax                ## 8-byte Reload
	movl	(%rax,%r14,4), %edi
	callq	_gdTrueColorGetAlpha
	xorps	%xmm0, %xmm0
	cvtsi2sd	%rax, %xmm0
	mulsd	-72(%rbp), %xmm0                ## 8-byte Folded Reload
	cvttsd2si	%xmm0, %eax
	addb	-41(%rbp), %al                  ## 1-byte Folded Reload
	cmpl	%r14d, -136(%rbp)               ## 4-byte Folded Reload
	je	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=2
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	(%rcx), %rcx
	incq	%r14
	jmp	LBB0_5
LBB0_8:
	addq	$104, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	__gdScaleRow
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function _gdScaleRow
__gdScaleRow:                           ; @_gdScaleRow
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	d9, d8, [sp, #64]               ; 16-byte Folded Spill
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset b8, -104
	.cfi_offset b9, -112
	subs	w22, w3, #1
	b.eq	LBB0_9
; %bb.1:
	mov	x19, x5
	mov	x21, #0
	ldr	x8, [x0]
	mov	w9, w4
	lsl	x9, x9, #3
	ldr	x8, [x8, x9]
	stp	x8, x22, [sp, #16]              ; 16-byte Folded Spill
	ldr	x8, [x2]
	ldr	x20, [x8, x9]
	str	x20, [sp, #8]                   ; 8-byte Folded Spill
	str	x5, [sp, #56]                   ; 8-byte Folded Spill
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldp	x22, x21, [sp, #24]             ; 16-byte Folded Reload
	ldr	x19, [sp, #56]                  ; 8-byte Folded Reload
	ldr	x20, [sp, #8]                   ; 8-byte Folded Reload
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	and	w0, w27, #0xff
	and	w1, w26, #0xff
	and	w2, w25, #0xff
	and	w3, w24, #0xff
	bl	_gdTrueColorAlpha
	str	w0, [x20, x21, lsl #2]
	add	x21, x21, #1
	cmp	x21, x22
	b.eq	LBB0_9
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
	ldr	x8, [x19]
	add	x10, x8, x21, lsl #4
	ldp	w9, w10, [x10]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	cmp	w9, w10
	b.le	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w25, #0
	mov	w24, #0
	mov	w26, #0
	mov	w27, #0
	b	LBB0_3
LBB0_6:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x28, #0
	mov	w27, #0
	mov	w26, #0
	mov	w24, #0
	mov	w25, #0
	sub	w10, w10, w9
	str	x10, [sp, #48]                  ; 8-byte Folded Spill
	ldr	x10, [sp, #16]                  ; 8-byte Folded Reload
	add	x9, x10, x9, lsl #2
	stp	x21, x9, [sp, #32]              ; 16-byte Folded Spill
LBB0_7:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	lsl	x23, x21, #4
	add	x8, x8, x23
	ldr	x8, [x8, #8]
	lsl	x21, x28, #3
	ldr	d8, [x8, x21]
	lsl	x22, x28, #2
	ldr	x20, [sp, #40]                  ; 8-byte Folded Reload
	ldr	w0, [x20, x22]
	bl	_gdTrueColorGetRed
	scvtf	d0, x0
	fmul	d0, d8, d0
	fcvtzs	w8, d0
	add	w27, w27, w8
	ldr	x19, [sp, #56]                  ; 8-byte Folded Reload
	ldr	x8, [x19]
	add	x8, x8, x23
	ldr	x8, [x8, #8]
	ldr	d8, [x8, x21]
	ldr	w0, [x20, x22]
	bl	_gdTrueColorGetGreen
	scvtf	d0, x0
	fmul	d0, d8, d0
	fcvtzs	w8, d0
	add	w26, w26, w8
	ldr	x8, [x19]
	add	x8, x8, x23
	ldr	x8, [x8, #8]
	ldr	d8, [x8, x21]
	ldr	w0, [x20, x22]
	bl	_gdTrueColorGetBlue
	scvtf	d0, x0
	fmul	d0, d8, d0
	fcvtzs	w8, d0
	add	w25, w25, w8
	ldr	x8, [x19]
	add	x8, x8, x23
	ldr	x8, [x8, #8]
	ldr	d8, [x8, x21]
	ldr	w0, [x20, x22]
	bl	_gdTrueColorGetAlpha
	scvtf	d0, x0
	fmul	d0, d8, d0
	fcvtzs	w8, d0
	add	w24, w24, w8
	ldr	x8, [sp, #48]                   ; 8-byte Folded Reload
	cmp	w8, w28
	b.eq	LBB0_2
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldr	x8, [sp, #56]                   ; 8-byte Folded Reload
	ldr	x8, [x8]
	add	x28, x28, #1
	ldr	x21, [sp, #32]                  ; 8-byte Folded Reload
	b	LBB0_7
LBB0_9:
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #64]               ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	__gdScaleRow
.subsections_via_symbols
