	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function testimage
_testimage:                             ## @testimage
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r15
	callq	_checkopaque
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movaps	%xmm0, -128(%rbp)
	movaps	%xmm1, -112(%rbp)
	movq	32(%r15), %rax
	movq	%rax, -96(%rbp)
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	%ebx, -128(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -88(%rbp)
	movq	$0, -72(%rbp)
	movups	%xmm0, 16(%r15)
	movq	$0, 32(%r15)
	movq	8(%r15), %rax
	movq	$0, (%rax)
	leaq	-192(%rbp), %rdi
	callq	_newimage
	movq	_FORMAT_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.2:
	xorl	%r13d, %r13d
	movl	$1, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	%eax, %r14d
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	movq	_FORMAT_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %eax
	cmpl	%eax, %r13d
	jge	LBB0_16
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %r12d
	sarl	%r12d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %esi
	callq	_format_isset
	testq	%rax, %rax
	je	LBB0_15
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testb	$1, %r13b
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_PNG_FORMAT_FLAG_ALPHA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r12d, %eax
	leaq	-128(%rbp), %r14
	je	LBB0_7
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r13d
	xorl	%ebx, %ebx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	xorl	%ebx, %ebx
	leaq	-128(%rbp), %r14
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r14, %rdi
	callq	_resetimage
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, -128(%rbp)
	movq	%r14, %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	callq	_read_file
	testl	%eax, %eax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	movq	%rbx, %rcx
	callq	_compare_two_images
	testl	%eax, %eax
	jne	LBB0_14
	jmp	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	testl	%eax, 4(%r15)
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	-60(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_random_color
	movq	_PNG_FORMAT_FLAG_COLORMAP@GOTPCREL(%rip), %rax
	testl	%r12d, (%rax)
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_PNG_FORMAT_FLAG_LINEAR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	cmpl	$1, %eax
	adcl	$0, %r13d
	jmp	LBB0_11
LBB0_1:
	movl	$1, %r14d
	jmp	LBB0_16
LBB0_13:
	xorl	%r14d, %r14d
LBB0_16:
	leaq	-192(%rbp), %rdi
	callq	_freeimage
	leaq	-128(%rbp), %rdi
	callq	_freeimage
	movl	%r14d, %eax
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FORMAT_COUNT,4,2               ## @FORMAT_COUNT
	.comm	_PNG_FORMAT_FLAG_ALPHA,4,2      ## @PNG_FORMAT_FLAG_ALPHA
	.comm	_PNG_FORMAT_FLAG_COLORMAP,4,2   ## @PNG_FORMAT_FLAG_COLORMAP
	.comm	_PNG_FORMAT_FLAG_LINEAR,4,2     ## @PNG_FORMAT_FLAG_LINEAR
	.no_dead_strip	_testimage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function testimage
_testimage:                             ; @testimage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #240
	.cfi_def_cfa_offset 240
	stp	x28, x27, [sp, #144]            ; 16-byte Folded Spill
	stp	x26, x25, [sp, #160]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #176]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #192]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #208]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #224]            ; 16-byte Folded Spill
	add	x29, sp, #224
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_checkopaque
	ldp	q0, q1, [x21]
	stp	q0, q1, [sp, #80]
	ldr	x8, [x21, #32]
	str	w20, [sp, #80]
	stp	x8, xzr, [sp, #112]
	stp	xzr, xzr, [sp, #128]
	stp	xzr, xzr, [x21, #16]
	str	xzr, [x21, #32]
	ldr	x8, [x21, #8]
	str	xzr, [x8]
	add	x0, sp, #16
	bl	_newimage
Lloh0:
	adrp	x24, _FORMAT_COUNT@GOTPAGE
Lloh1:
	ldr	x24, [x24, _FORMAT_COUNT@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.1:
	mov	w25, #0
	mov	w23, #1
Lloh2:
	adrp	x26, _PNG_FORMAT_FLAG_ALPHA@GOTPAGE
Lloh3:
	ldr	x26, [x26, _PNG_FORMAT_FLAG_ALPHA@GOTPAGEOFF]
Lloh4:
	adrp	x27, _PNG_FORMAT_FLAG_COLORMAP@GOTPAGE
Lloh5:
	ldr	x27, [x27, _PNG_FORMAT_FLAG_COLORMAP@GOTPAGEOFF]
Lloh6:
	adrp	x28, _PNG_FORMAT_FLAG_LINEAR@GOTPAGE
Lloh7:
	ldr	x28, [x28, _PNG_FORMAT_FLAG_LINEAR@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, x0
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w25, w25, #1
	ldr	w8, [x24]
	cmp	w25, w8, lsl #1
	b.ge	LBB0_16
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	asr	w22, w25, #1
	mov	x0, x19
	mov	x1, x22
	bl	_format_isset
	cbz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	tbnz	w25, #0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	tst	w8, w22
	b.eq	LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, #0
	add	w25, w25, #1
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x23, #0
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x0, sp, #80
	bl	_resetimage
	str	w20, [sp, #80]
	add	x0, sp, #80
	mov	x1, x22
	mov	x2, x23
	bl	_read_file
	cbz	w0, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x1, sp, #80
	mov	x0, x21
	mov	w2, #0
	mov	x3, x23
	bl	_compare_two_images
	cbnz	w0, LBB0_2
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w9, [x21, #4]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.12:                               ;   in Loop: Header=BB0_4 Depth=1
	add	x23, sp, #12
	add	x0, sp, #12
	bl	_random_color
	ldr	w8, [x27]
	tst	w8, w22
	b.eq	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x28]
	tst	w8, w22
	cinc	w25, w25, eq
	add	x23, sp, #12
	b	LBB0_9
LBB0_14:
	mov	w23, #1
	b	LBB0_16
LBB0_15:
	mov	w23, #0
LBB0_16:
	add	x0, sp, #16
	bl	_freeimage
	add	x0, sp, #80
	bl	_freeimage
	mov	x0, x23
	ldp	x29, x30, [sp, #224]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #208]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #192]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #176]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #160]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #240
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_FORMAT_COUNT,4,2               ; @FORMAT_COUNT
	.comm	_PNG_FORMAT_FLAG_ALPHA,4,2      ; @PNG_FORMAT_FLAG_ALPHA
	.comm	_PNG_FORMAT_FLAG_COLORMAP,4,2   ; @PNG_FORMAT_FLAG_COLORMAP
	.comm	_PNG_FORMAT_FLAG_LINEAR,4,2     ; @PNG_FORMAT_FLAG_LINEAR
	.no_dead_strip	_testimage
.subsections_via_symbols
