	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$3, %edi
	jne	LBB0_10
## %bb.1:
	movq	%rsi, %r15
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	_PNG_IMAGE_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -28(%rbp)
	movq	8(%r15), %rsi
	movq	%rbx, %rdi
	callq	_png_image_begin_read_from_file
	testq	%rax, %rax
	je	LBB0_9
## %bb.2:
	movq	_PNG_FORMAT_RGBA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -32(%rbp)
	movq	-40(%rbp), %rdi
	movq	-32(%rbp), %rsi
	callq	_PNG_IMAGE_SIZE
	movq	%rax, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:
	movq	%rax, %r14
	xorl	%ebx, %ebx
	leaq	-40(%rbp), %rdi
	xorl	%esi, %esi
	movq	%rax, %rdx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	callq	_png_image_finish_read
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	16(%r15), %rsi
	leaq	-40(%rbp), %rdi
	xorl	%edx, %edx
	movq	%r14, %rcx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_png_image_write_to_file
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r15), %rdx
	movq	-40(%rbp), %rcx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %ebx
LBB0_6:
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_12
LBB0_10:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_11
LBB0_9:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r15), %rdx
	movq	-40(%rbp), %rcx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_11
LBB0_8:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	-40(%rbp), %rdi
	movq	-32(%rbp), %rsi
	callq	_PNG_IMAGE_SIZE
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_11
LBB0_7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r15), %rdx
	movq	-40(%rbp), %rcx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	leaq	-40(%rbp), %rdi
	callq	_png_image_free
LBB0_11:
	movl	$1, %ebx
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PNG_IMAGE_VERSION,4,2          ## @PNG_IMAGE_VERSION
	.comm	_PNG_FORMAT_RGBA,4,2            ## @PNG_FORMAT_RGBA
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pngtopng: write %s: %s\n"

L_.str.1:                               ## @.str.1
	.asciz	"pngtopng: read %s: %s\n"

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

L_.str.3:                               ## @.str.3
	.asciz	"pngtopng: %s: %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"pngtopng: usage: pngtopng input-file output-file\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, #80
	.cfi_def_cfa_offset 80
	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
	cmp	w0, #3
	b.ne	LBB0_7
; %bb.1:
	mov	x19, x1
	add	x0, sp, #16
	mov	w1, #0
	mov	w2, #16
	bl	_memset
Lloh0:
	adrp	x8, _PNG_IMAGE_VERSION@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PNG_IMAGE_VERSION@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #28]
	ldr	x1, [x19, #8]
	add	x0, sp, #16
	bl	_png_image_begin_read_from_file
	cbz	x0, LBB0_8
; %bb.2:
Lloh3:
	adrp	x8, _PNG_FORMAT_RGBA@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PNG_FORMAT_RGBA@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [sp, #24]
	ldp	x0, x1, [sp, #16]
	bl	_PNG_IMAGE_SIZE
	bl	_malloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
	add	x0, sp, #16
	mov	x1, #0
	mov	x2, x20
	mov	w3, #0
	mov	x4, #0
	bl	_png_image_finish_read
	cbz	x0, LBB0_13
; %bb.4:
	ldr	x1, [x19, #16]
	add	x0, sp, #16
	mov	w2, #0
	mov	x3, x20
	mov	w4, #0
	mov	x5, #0
	bl	_png_image_write_to_file
	mov	w21, #0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh6:
	adrp	x8, _stderr@GOTPAGE
Lloh7:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	ldr	x8, [x19, #16]
	ldr	x9, [sp, #16]
	stp	x8, x9, [sp]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w21, #1
LBB0_6:
	mov	x0, x20
	bl	_free
	b	LBB0_12
LBB0_7:
Lloh11:
	adrp	x8, _stderr@GOTPAGE
Lloh12:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
Lloh14:
	adrp	x1, l_.str.4@PAGE
Lloh15:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_10
LBB0_8:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	ldr	x9, [sp, #16]
	stp	x8, x9, [sp]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh21:
	adrp	x8, _stderr@GOTPAGE
Lloh22:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh23:
	ldr	w19, [x8]
	ldp	x0, x1, [sp, #16]
	bl	_PNG_IMAGE_SIZE
	str	x0, [sp]
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
LBB0_10:
	bl	_fprintf
LBB0_11:
	mov	w21, #1
LBB0_12:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_13:
Lloh26:
	adrp	x8, _stderr@GOTPAGE
Lloh27:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	ldr	x9, [sp, #16]
	stp	x8, x9, [sp]
Lloh29:
	adrp	x1, l_.str.1@PAGE
Lloh30:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	add	x0, sp, #16
	bl	_png_image_free
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.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
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_PNG_IMAGE_VERSION,4,2          ; @PNG_IMAGE_VERSION
	.comm	_PNG_FORMAT_RGBA,4,2            ; @PNG_FORMAT_RGBA
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pngtopng: write %s: %s\n"

l_.str.1:                               ; @.str.1
	.asciz	"pngtopng: read %s: %s\n"

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

l_.str.3:                               ; @.str.3
	.asciz	"pngtopng: %s: %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"pngtopng: usage: pngtopng input-file output-file\n"

.subsections_via_symbols
