	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function add_sprite
_add_sprite:                            ## @add_sprite
	.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	%rsi, -64(%rbp)                 ## 8-byte Spill
	cmpl	$0, (%rcx)
	jle	LBB0_18
## %bb.1:
	movq	%r8, %r15
	movq	%rcx, %r12
	movq	%rdx, %rbx
	movq	%rdi, %r14
	movq	(%r8), %rax
	leaq	-80(%rbp), %r13
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rdi
	cmpb	$45, (%rdi)
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$45, 1(%rdi)
	je	LBB0_18
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	leaq	L_.str(%rip), %rsi
	leaq	-52(%rbp), %rdx
	leaq	-48(%rbp), %rcx
	leaq	-41(%rbp), %r8
	callq	_sscanf
	cmpl	$2, %eax
	jne	LBB0_16
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	-52(%rbp), %ecx
	movl	-48(%rbp), %r8d
	testl	%ecx, %ecx
	js	LBB0_11
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r8d, %r8d
	js	LBB0_11
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %eax
	subl	%ecx, %eax
	jbe	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	4(%r14), %edx
	subl	%r8d, %edx
	jbe	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%eax, (%rbx)
	ja	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	cmpl	%edx, 4(%rbx)
	ja	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_PNG_IMAGE_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -68(%rbp)
	movl	16(%rbx), %edi
	callq	_rewind
	movl	16(%rbx), %esi
	movq	%r13, %rdi
	callq	_png_image_begin_read_from_stdio
	testq	%rax, %rax
	je	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	_PNG_FORMAT_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movl	(%r14), %eax
	movl	-48(%rbp), %ecx
	imull	%eax, %ecx
	addl	-52(%rbp), %ecx
	leal	(%rcx,%rcx,2), %edx
	addq	-64(%rbp), %rdx                 ## 8-byte Folded Reload
	leal	(%rax,%rax,2), %ecx
	movq	%r13, %rdi
	xorl	%esi, %esi
	xorl	%r8d, %r8d
	callq	_png_image_finish_read
	testq	%rax, %rax
	je	LBB0_14
## %bb.17:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	addq	$8, %rax
	movq	%rax, (%r15)
	movl	(%r12), %ecx
	leal	-1(%rcx), %edx
	movl	%edx, (%r12)
	cmpl	$1, %ecx
	jg	LBB0_2
LBB0_18:
	movl	$1, %ebx
	jmp	LBB0_19
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_19
LBB0_14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rdx
	movq	-80(%rbp), %rcx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_15
LBB0_16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rdx
	movq	(%r15), %rax
	movq	(%rax), %rcx
	leaq	L_.str.3(%rip), %rsi
LBB0_15:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_19:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%d,%d%c"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"simpleover: sprite %s @ (%d,%d) outside image\n"

	.comm	_PNG_IMAGE_VERSION,4,2          ## @PNG_IMAGE_VERSION
	.comm	_PNG_FORMAT_RGB,4,2             ## @PNG_FORMAT_RGB
L_.str.2:                               ## @.str.2
	.asciz	"simpleover: add sprite %s: %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"simpleover: --add='%s': invalid position %s\n"

	.no_dead_strip	_add_sprite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function add_sprite
_add_sprite:                            ; @add_sprite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	w8, [x3]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.1:
	mov	x20, x4
	mov	x21, x3
	mov	x19, x2
	mov	x22, x1
	mov	x23, x0
	ldr	x8, [x4]
Lloh0:
	adrp	x24, l_.str@PAGE
Lloh1:
	add	x24, x24, l_.str@PAGEOFF
Lloh2:
	adrp	x25, _PNG_IMAGE_VERSION@GOTPAGE
Lloh3:
	ldr	x25, [x25, _PNG_IMAGE_VERSION@GOTPAGEOFF]
Lloh4:
	adrp	x26, _PNG_FORMAT_RGB@GOTPAGE
Lloh5:
	ldr	x26, [x26, _PNG_FORMAT_RGB@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x8]
	ldrb	w8, [x0]
	cmp	w8, #45
	b.ne	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x0, #1]
	cmp	w8, #45
	b.eq	LBB0_14
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	add	x2, sp, #40
	add	x3, sp, #36
	add	x4, sp, #47
	mov	x1, x24
	bl	_sscanf
	cmp	w0, #2
	b.ne	LBB0_17
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldp	w9, w8, [sp, #36]
	tbnz	w8, #31, LBB0_15
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w9, #31, LBB0_15
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w10, [x23]
	subs	w10, w10, w8
	b.ls	LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w11, [x23, #4]
	subs	w11, w11, w9
	b.ls	LBB0_15
; %bb.9:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w12, [x19]
	cmp	w12, w10
	b.hi	LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w10, [x19, #4]
	cmp	w10, w11
	b.hi	LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	str	w8, [sp, #28]
	ldr	w0, [x19, #16]
	bl	_rewind
	ldr	w1, [x19, #16]
	add	x0, sp, #16
	bl	_png_image_begin_read_from_stdio
	cbz	x0, LBB0_16
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x26]
	str	w8, [sp, #24]
	ldp	w8, w10, [sp, #36]
	ldr	w9, [x23]
	madd	w8, w9, w8, w10
	add	w8, w8, w8, lsl #1
	add	x2, x8, x22
	add	w3, w9, w9, lsl #1
	add	x0, sp, #16
	mov	x1, #0
	mov	x4, #0
	bl	_png_image_finish_read
	cbz	x0, LBB0_16
; %bb.13:                               ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x20]
	add	x8, x8, #8
	str	x8, [x20]
	ldr	w9, [x21]
	subs	w9, w9, #1
	str	w9, [x21]
	b.gt	LBB0_2
LBB0_14:
	mov	w0, #1
	b	LBB0_19
LBB0_15:
Lloh6:
	adrp	x10, _stderr@GOTPAGE
Lloh7:
	ldr	x10, [x10, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x10]
	ldr	x2, [x19, #8]
	stp	x8, x9, [sp]
Lloh9:
	adrp	x1, l_.str.1@PAGE
Lloh10:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_18
LBB0_16:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	x2, [x19, #8]
	ldr	x8, [sp, #16]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_18
LBB0_17:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x2, [x19, #8]
	ldr	x8, [x20]
	ldr	x8, [x8]
	str	x8, [sp]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_18:
	bl	_fprintf
	mov	w0, #0
LBB0_19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%d,%d%c"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"simpleover: sprite %s @ (%d,%d) outside image\n"

	.comm	_PNG_IMAGE_VERSION,4,2          ; @PNG_IMAGE_VERSION
	.comm	_PNG_FORMAT_RGB,4,2             ; @PNG_FORMAT_RGB
l_.str.2:                               ; @.str.2
	.asciz	"simpleover: add sprite %s: %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"simpleover: --add='%s': invalid position %s\n"

	.no_dead_strip	_add_sprite
.subsections_via_symbols
