	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gdImageTileApply
_gdImageTileApply:                      ## @gdImageTileApply
	.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
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movq	48(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_10
## %bb.1:
	movl	%edx, %r14d
	movl	%esi, %ebx
	movq	%r12, %rdi
	callq	_gdImageSX
	movl	%eax, %ecx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, %eax
	cltd
	idivl	%ecx
	movl	%edx, %r13d
	movq	%r12, %rdi
	callq	_gdImageSY
	movl	%eax, %ecx
	movl	%r14d, %r15d
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r14
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_gdImageGetPixel
	movl	%eax, %r13d
	movq	%r12, %rdi
	callq	_gdImageGetTransparent
	testq	%r14, %r14
	je	LBB0_5
## %bb.2:
	cmpl	%eax, %r13d
	movl	%r15d, %r14d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_10
## %bb.3:
	cmpq	$0, 8(%r12)
	jne	LBB0_9
## %bb.4:
	movq	40(%r12), %rax
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %edi
	movq	32(%r12), %rax
	movl	(%rax,%rcx,4), %esi
	movq	16(%r12), %rax
	movq	24(%r12), %rdx
	movl	(%rdx,%rcx,4), %edx
	movl	(%rax,%rcx,4), %ecx
	callq	_gdTrueColorAlpha
	movl	%eax, %r13d
	jmp	LBB0_9
LBB0_5:
	cmpl	%eax, %r13d
	movl	%r15d, %r14d
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jne	LBB0_6
LBB0_10:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 8(%r12)
	je	LBB0_8
## %bb.7:
	movl	%r13d, %edi
	callq	_gdTrueColorGetRed
	movl	%eax, %r12d
	movl	%r13d, %edi
	callq	_gdTrueColorGetGreen
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%r13d, %edi
	callq	_gdTrueColorGetBlue
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_gdTrueColorGetAlpha
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	%ebx, %ecx
	movl	%eax, %r8d
	callq	_gdImageColorResolveAlpha
	movl	%eax, %r13d
	jmp	LBB0_9
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movslq	%r13d, %rcx
	movl	(%rax,%rcx,4), %r13d
LBB0_9:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	movl	%r14d, %edx
	movl	%r13d, %ecx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_gdImageSetPixel                ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_gdImageTileApply
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gdImageTileApply
_gdImageTileApply:                      ; @gdImageTileApply
	.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
	ldr	x23, [x0, #48]
	cbz	x23, LBB0_6
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
	mov	x0, x23
	bl	_gdImageSX
	sdiv	w8, w20, w0
	msub	w22, w8, w0, w20
	mov	x0, x23
	bl	_gdImageSY
	sdiv	w8, w19, w0
	msub	w2, w8, w0, w19
	ldr	x24, [x21, #8]
	mov	x0, x23
	mov	x1, x22
	bl	_gdImageGetPixel
	mov	x22, x0
	mov	x0, x23
	bl	_gdImageGetTransparent
	cmp	w22, w0
	cbz	x24, LBB0_5
; %bb.2:
	b.eq	LBB0_6
; %bb.3:
	ldr	x8, [x23, #8]
	cbnz	x8, LBB0_10
; %bb.4:
	sbfiz	x8, x22, #2, #32
	ldp	x10, x9, [x23, #32]
	ldr	w0, [x9, x8]
	ldr	w1, [x10, x8]
	ldp	x10, x9, [x23, #16]
	ldr	w2, [x9, x8]
	ldr	w3, [x10, x8]
	bl	_gdTrueColorAlpha
	mov	x22, x0
	b	LBB0_10
LBB0_5:
	b.ne	LBB0_7
LBB0_6:
	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
LBB0_7:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_9
; %bb.8:
	mov	x0, x22
	bl	_gdTrueColorGetRed
	mov	x23, x0
	mov	x0, x22
	bl	_gdTrueColorGetGreen
	mov	x24, x0
	mov	x0, x22
	bl	_gdTrueColorGetBlue
	mov	x25, x0
	mov	x0, x22
	bl	_gdTrueColorGetAlpha
	mov	x4, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x24
	mov	x3, x25
	bl	_gdImageColorResolveAlpha
	mov	x22, x0
	b	LBB0_10
LBB0_9:
	ldr	x8, [x21]
	ldr	w22, [x8, w22, sxtw #2]
LBB0_10:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, x22
	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
	b	_gdImageSetPixel
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_gdImageTileApply
.subsections_via_symbols
