	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdImageRotate180               ## -- Begin function gdImageRotate180
	.p2align	4, 0x90
_gdImageRotate180:                      ## @gdImageRotate180
	.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
	movq	%rdi, %r12
	cmpq	$0, 16(%rdi)
	jne	LBB0_1
## %bb.2:
	movq	_gdImageGetPixel@GOTPCREL(%rip), %r15
	jmp	LBB0_3
LBB0_1:
	movq	_gdImageGetTrueColorPixel@GOTPCREL(%rip), %r15
LBB0_3:
	movl	(%r12), %edi
	movl	4(%r12), %esi
	callq	_gdImageCreateTrueColor
	testq	%rax, %rax
	je	LBB0_14
## %bb.4:
	movl	8(%rax), %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	$0, 8(%rax)
	movl	12(%r12), %ecx
	movl	%ecx, 12(%rax)
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	movq	%r12, %rsi
	callq	_gdImagePaletteCopy
	movl	4(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_13
## %bb.5:
	movl	(%r12), %eax
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	4(%r12), %ecx
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	incl	%edx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	cmpl	%ecx, %edx
	jge	LBB0_13
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	testl	%eax, %eax
	jle	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	notl	%eax
	movl	%eax, -72(%rbp)                 ## 4-byte Spill
	xorl	%ebx, %ebx
	movl	$-1, %r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=2
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	(%rdi), %esi
	addl	%r14d, %esi
	movl	4(%rdi), %edx
	addl	-72(%rbp), %edx                 ## 4-byte Folded Reload
	movl	%r13d, %ecx
	callq	_gdImageSetPixel
	incl	%ebx
	movl	(%r12), %eax
	decl	%r14d
	cmpl	%eax, %ebx
	jge	LBB0_11
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	*%r15
	movl	%eax, %r13d
	cmpq	$0, 16(%r12)
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_gdImageRed
	movl	%eax, -68(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_gdImageGreen
	movl	%eax, -64(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_gdImageBlue
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_gdImageAlpha
	movl	-68(%rbp), %edi                 ## 4-byte Reload
	movl	-64(%rbp), %esi                 ## 4-byte Reload
	movl	%r15d, %edx
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	movl	%eax, %ecx
	callq	_gdTrueColorAlpha
	movl	%eax, %r13d
	jmp	LBB0_10
LBB0_13:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, 8(%rax)
LBB0_14:
	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	_gdImageRotate180               ; -- Begin function gdImageRotate180
	.p2align	2
_gdImageRotate180:                      ; @gdImageRotate180
	.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
	mov	x19, x0
	ldr	x8, [x0, #16]
Lloh0:
	adrp	x9, _gdImageGetTrueColorPixel@GOTPAGE
Lloh1:
	ldr	x9, [x9, _gdImageGetTrueColorPixel@GOTPAGEOFF]
Lloh2:
	adrp	x10, _gdImageGetPixel@GOTPAGE
Lloh3:
	ldr	x10, [x10, _gdImageGetPixel@GOTPAGEOFF]
	cmp	x8, #0
	csel	x24, x10, x9, eq
	ldr	w0, [x0]
	ldr	w1, [x19, #4]
	bl	_gdImageCreateTrueColor
	mov	x20, x0
	cbz	x0, LBB0_11
; %bb.1:
	ldr	w8, [x20, #8]
	str	w8, [sp, #4]                    ; 4-byte Folded Spill
	ldr	w8, [x19, #12]
	stp	wzr, w8, [x20, #8]
	mov	x0, x20
	mov	x1, x19
	bl	_gdImagePaletteCopy
	ldr	w9, [x19, #4]
	cmp	w9, #1
	b.lt	LBB0_10
; %bb.2:
	mov	w28, #0
	ldr	w8, [x19]
	str	x24, [sp, #8]                   ; 8-byte Folded Spill
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w9, [x19, #4]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	w28, w28, #1
	cmp	w28, w9
	b.ge	LBB0_10
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w22, #0
	mvn	w25, w28
	mov	w27, #-1
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	ldp	w8, w9, [x20]
	add	w1, w27, w8
	add	w2, w9, w25
	mov	x0, x20
	mov	x3, x23
	bl	_gdImageSetPixel
	add	w22, w22, #1
	ldr	w8, [x19]
	sub	w27, w27, #1
	cmp	w22, w8
	b.ge	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x22
	mov	x2, x28
	blr	x24
	mov	x23, x0
	ldr	x8, [x19, #16]
	cbnz	x8, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	mov	x0, x19
	mov	x1, x23
	bl	_gdImageRed
	mov	x24, x0
	mov	x0, x19
	mov	x1, x23
	bl	_gdImageGreen
	mov	x21, x25
	mov	x25, x0
	mov	x0, x19
	mov	x1, x23
	bl	_gdImageBlue
	mov	x26, x0
	mov	x0, x19
	mov	x1, x23
	bl	_gdImageAlpha
	mov	x3, x0
	mov	x0, x24
	ldr	x24, [sp, #8]                   ; 8-byte Folded Reload
	mov	x1, x25
	mov	x25, x21
	mov	x2, x26
	bl	_gdTrueColorAlpha
	mov	x23, x0
	b	LBB0_7
LBB0_10:
	ldr	w8, [sp, #4]                    ; 4-byte Folded Reload
	str	w8, [x20, #8]
LBB0_11:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
