	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$2, %edi
	jl	LBB0_18
## %bb.1:
	movq	%rsi, %r12
	movl	%edi, %ebx
	jne	LBB0_3
## %bb.2:
	movl	$2, %r13d
	xorl	%r14d, %r14d
	jmp	LBB0_4
LBB0_18:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_19
LBB0_3:
	movq	16(%r12), %rax
	xorl	%r14d, %r14d
	xorl	%r13d, %r13d
	cmpb	$45, (%rax)
	sete	%r13b
	cmovneq	%rax, %r14
	xorl	$3, %r13d
LBB0_4:
	movq	_PNG_IMAGE_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movq	$0, -56(%rbp)
	movq	8(%r12), %rsi
	leaq	-72(%rbp), %rdi
	callq	_png_image_begin_read_from_file
	testq	%rax, %rax
	je	LBB0_17
## %bb.5:
	movq	_PNG_FORMAT_RGB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -64(%rbp)
	movups	-72(%rbp), %xmm0
	movups	-56(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_PNG_IMAGE_SIZE
	movq	%rax, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_16
## %bb.6:
	movq	%rax, %r15
	movl	l___const.main.background+8(%rip), %eax
	movl	%eax, -80(%rbp)
	movq	l___const.main.background(%rip), %rax
	movq	%rax, -88(%rbp)
	leaq	-72(%rbp), %rdi
	leaq	-88(%rbp), %rsi
	movq	%r15, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_png_image_finish_read
	testq	%rax, %rax
	je	LBB0_13
## %bb.7:
	subl	%r13d, %ebx
	movl	%r13d, %eax
	leaq	(%r12,%rax,8), %rcx
	leaq	-72(%rbp), %rdi
	movq	%r15, %rsi
	movl	%ebx, %edx
	callq	_simpleover_process
	movl	$1, %ebx
	testq	%rax, %rax
	je	LBB0_15
## %bb.8:
	testq	%r14, %r14
	je	LBB0_10
## %bb.9:
	xorl	%ebx, %ebx
	leaq	-72(%rbp), %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_png_image_write_to_file
	testq	%rax, %rax
	jne	LBB0_15
	jmp	LBB0_12
LBB0_17:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rdx
	movq	-72(%rbp), %rcx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_19
LBB0_16:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movups	-72(%rbp), %xmm0
	movups	-56(%rbp), %xmm1
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_PNG_IMAGE_SIZE
	leaq	L_.str.3(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	leaq	-72(%rbp), %rdi
	callq	_png_image_free
LBB0_19:
	movl	$1, %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r12), %rdx
	movq	-72(%rbp), %rcx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_14
LBB0_10:
	movq	_stdout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%ebx, %ebx
	leaq	-72(%rbp), %rdi
	xorl	%edx, %edx
	movq	%r15, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_png_image_write_to_stdio
	testq	%rax, %rax
	jne	LBB0_15
## %bb.11:
	leaq	L_.str.1(%rip), %r14
LBB0_12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	-72(%rbp), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdx
LBB0_14:
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %ebx
LBB0_15:
	movq	%r15, %rdi
	callq	_free
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_IMAGE_VERSION,4,2          ## @PNG_IMAGE_VERSION
	.comm	_PNG_FORMAT_RGB,4,2             ## @PNG_FORMAT_RGB
	.section	__TEXT,__const
	.p2align	2                               ## @__const.main.background
l___const.main.background:
	.long	0                               ## 0x0
	.long	255                             ## 0xff
	.long	0                               ## 0x0

	.comm	_stdout,4,2                     ## @stdout
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"simpleover: write %s: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"stdout"

L_.str.2:                               ## @.str.2
	.asciz	"simpleover: read %s: %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"simpleover: out of memory: %lu bytes\n"

L_.str.4:                               ## @.str.4
	.asciz	"simpleover: %s: %s\n"

L_.str.5:                               ## @.str.5
	.asciz	"simpleover: usage: simpleover background.png [output.png]\n  Output 'background.png' as a 24-bit RGB PNG file in 'output.png'\n   or, if not given, stdout.  'background.png' will be composited\n   on fully saturated green.\n\n  Optionally, before output, process additional PNG files:\n\n   --sprite=width,height,name {[--at=x,y] {sprite.png}}\n    Produce a transparent sprite of size (width,height) and with\n     name 'name'.\n    For each sprite.png composite it using a Porter-Duff 'Over'\n     operation at offset (x,y) in the sprite (defaulting to (0,0)).\n     Input PNGs will be truncated to the area of the sprite.\n\n   --add='name' {x,y}\n    Optionally, before output, composite a sprite, 'name', which\n     must have been previously produced using --sprite, at each\n     offset (x,y) in the output image.  Each sprite must fit\n     completely within the output image.\n\n  PNG files are processed in the order they occur on the command\n  line and thus the first PNG processed appears as the bottommost\n  in the output image.\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	cmp	w0, #2
	b.lt	LBB0_3
; %bb.1:
	mov	x21, x1
	mov	x22, x0
	mov	w23, #2
	cmp	w0, #2
	b.ne	LBB0_4
; %bb.2:
	mov	x20, #0
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str.5@PAGE
Lloh4:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_12
LBB0_4:
	ldr	x8, [x21, #16]
	ldrb	w9, [x8]
	cmp	w9, #45
	cinc	w23, w23, ne
	csel	x20, xzr, x8, eq
LBB0_5:
Lloh5:
	adrp	x8, _PNG_IMAGE_VERSION@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PNG_IMAGE_VERSION@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [sp, #72]
	str	xzr, [sp, #64]
	ldr	x1, [x21, #8]
	add	x0, sp, #48
	bl	_png_image_begin_read_from_file
	cbz	x0, LBB0_11
; %bb.6:
Lloh8:
	adrp	x8, _PNG_FORMAT_RGB@GOTPAGE
Lloh9:
	ldr	x8, [x8, _PNG_FORMAT_RGB@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [sp, #56]
	ldp	q0, q1, [sp, #48]
	stp	q0, q1, [sp, #16]
	add	x0, sp, #16
	bl	_PNG_IMAGE_SIZE
	bl	_malloc
	cbz	x0, LBB0_15
; %bb.7:
	mov	x19, x0
Lloh11:
	adrp	x8, l___const.main.background@PAGE
Lloh12:
	add	x8, x8, l___const.main.background@PAGEOFF
	ldr	x9, [x8]
	str	x9, [sp, #16]
	ldr	w8, [x8, #8]
	str	w8, [sp, #24]
	add	x0, sp, #48
	add	x1, sp, #16
	mov	x2, x19
	mov	w3, #0
	mov	x4, #0
	bl	_png_image_finish_read
	cbz	x0, LBB0_16
; %bb.8:
	sub	w2, w22, w23
	add	x3, x21, w23, uxtw #3
	add	x0, sp, #48
	mov	x1, x19
	bl	_simpleover_process
	cbz	x0, LBB0_21
; %bb.9:
	cbz	x20, LBB0_17
; %bb.10:
	add	x0, sp, #48
	mov	x1, x20
	mov	w2, #0
	mov	x3, x19
	mov	w4, #0
	mov	x5, #0
	bl	_png_image_write_to_file
	mov	w21, #0
	cbnz	x0, LBB0_22
	b	LBB0_19
LBB0_11:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	x8, [x21, #8]
	ldr	x9, [sp, #48]
	stp	x8, x9, [sp]
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_12:
	bl	_fprintf
LBB0_13:
	mov	w21, #1
LBB0_14:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_15:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w19, [x8]
	ldp	q0, q1, [sp, #48]
	stp	q0, q1, [sp, #16]
	add	x0, sp, #16
	bl	_PNG_IMAGE_SIZE
	str	x0, [sp]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_fprintf
	add	x0, sp, #48
	bl	_png_image_free
	b	LBB0_13
LBB0_16:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	ldr	x8, [x21, #8]
	ldr	x9, [sp, #48]
	stp	x8, x9, [sp]
Lloh26:
	adrp	x1, l_.str.2@PAGE
Lloh27:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_20
LBB0_17:
Lloh28:
	adrp	x8, _stdout@GOTPAGE
Lloh29:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	add	x0, sp, #48
	mov	w2, #0
	mov	x3, x19
	mov	w4, #0
	mov	x5, #0
	bl	_png_image_write_to_stdio
	mov	w21, #0
	cbnz	x0, LBB0_22
; %bb.18:
Lloh31:
	adrp	x20, l_.str.1@PAGE
Lloh32:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_19:
Lloh33:
	adrp	x8, _stderr@GOTPAGE
Lloh34:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
	ldr	x8, [sp, #48]
	stp	x20, x8, [sp]
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
LBB0_20:
	bl	_fprintf
LBB0_21:
	mov	w21, #1
LBB0_22:
	mov	x0, x19
	bl	_free
	b	LBB0_14
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_IMAGE_VERSION,4,2          ; @PNG_IMAGE_VERSION
	.comm	_PNG_FORMAT_RGB,4,2             ; @PNG_FORMAT_RGB
	.section	__TEXT,__const
	.p2align	2                               ; @__const.main.background
l___const.main.background:
	.long	0                               ; 0x0
	.long	255                             ; 0xff
	.long	0                               ; 0x0

	.comm	_stdout,4,2                     ; @stdout
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"simpleover: write %s: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"stdout"

l_.str.2:                               ; @.str.2
	.asciz	"simpleover: read %s: %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"simpleover: out of memory: %lu bytes\n"

l_.str.4:                               ; @.str.4
	.asciz	"simpleover: %s: %s\n"

l_.str.5:                               ; @.str.5
	.asciz	"simpleover: usage: simpleover background.png [output.png]\n  Output 'background.png' as a 24-bit RGB PNG file in 'output.png'\n   or, if not given, stdout.  'background.png' will be composited\n   on fully saturated green.\n\n  Optionally, before output, process additional PNG files:\n\n   --sprite=width,height,name {[--at=x,y] {sprite.png}}\n    Produce a transparent sprite of size (width,height) and with\n     name 'name'.\n    For each sprite.png composite it using a Porter-Duff 'Over'\n     operation at offset (x,y) in the sprite (defaulting to (0,0)).\n     Input PNGs will be truncated to the area of the sprite.\n\n   --add='name' {x,y}\n    Optionally, before output, composite a sprite, 'name', which\n     must have been previously produced using --sprite, at each\n     offset (x,y) in the output image.  Each sprite must fit\n     completely within the output image.\n\n  PNG files are processed in the order they occur on the command\n  line and thus the first PNG processed appears as the bottommost\n  in the output image.\n"

.subsections_via_symbols
