	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	movq	_FALSE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	cmpl	$2, %edi
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	jl	LBB0_1
## %bb.2:
	movl	%edi, %r13d
	movl	$1, %r12d
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_3
LBB0_15:                                ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movq	%rax, %r15
	testq	%rax, %rax
	je	LBB0_16
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
	cmpl	%r13d, %r12d
	jge	LBB0_25
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movslq	%r12d, %r14
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rdi
	cmpb	$45, (%rdi)
	jne	LBB0_14
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movsbl	1(%rdi), %eax
	cmpl	$103, %eax
	jg	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$97, %eax
	jne	LBB0_6
## %bb.11:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax,%r14,8), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movq	%rax, %rcx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=1
	incl	%r12d
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	_stdin@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	je	LBB0_15
## %bb.18:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_stdout@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_21
## %bb.19:                              ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str.5(%rip), %rsi
	callq	_fopen
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_24
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	cmpl	$105, %eax
	jne	LBB0_9
## %bb.23:                              ##   in Loop: Header=BB0_3 Depth=1
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_24
LBB0_1:
	xorl	%eax, %eax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
LBB0_25:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdx
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %r8
	callq	_pnm2png
	movq	_FALSE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_29
## %bb.26:
	movq	%r15, %rdi
	callq	_fclose
	movq	%rbx, %rdi
	callq	_fclose
	testq	%r12, %r12
	je	LBB0_28
## %bb.27:
	movq	%r14, %rdi
	callq	_fclose
LBB0_28:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpl	$63, %eax
	je	LBB0_10
LBB0_7:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rdx
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_22
LBB0_9:
	cmpl	$104, %eax
	jne	LBB0_7
LBB0_10:
	xorl	%eax, %eax
	callq	_usage
	xorl	%edi, %edi
	callq	_exit
LBB0_21:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	leaq	L_.str.7(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_22:
	xorl	%eax, %eax
	callq	_usage
	movl	$1, %edi
	callq	_exit
LBB0_20:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rdx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_17
LBB0_13:
	incq	%r14
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rdx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_17
LBB0_16:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r14,8), %rdx
	leaq	L_.str.4(%rip), %rsi
LBB0_17:
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_29:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	(%rbx), %edi
	leaq	L_.str.8(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_stdin,8,3                      ## @stdin
	.comm	_stdout,8,3                     ## @stdout
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_TRUE,8,3                       ## @TRUE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"rb"

	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"PNM2PNG\n"

L_.str.2:                               ## @.str.2
	.asciz	"Error:  alpha-channel file %s does not exist\n"

L_.str.3:                               ## @.str.3
	.asciz	"Error:  unknown option %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"Error:  file %s does not exist\n"

L_.str.5:                               ## @.str.5
	.asciz	"wb"

L_.str.6:                               ## @.str.6
	.asciz	"Error:  can not create PNG-file %s\n"

L_.str.7:                               ## @.str.7
	.asciz	"Error:  too many parameters\n"

L_.str.8:                               ## @.str.8
	.asciz	"Error:  unsuccessful converting to PNG-image\n"

	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.comm	_STDIN,4,2                      ## @STDIN
	.comm	_STDOUT,4,2                     ## @STDOUT
.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, #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
Lloh0:
	adrp	x28, _stdin@GOTPAGE
Lloh1:
	ldr	x28, [x28, _stdin@GOTPAGEOFF]
Lloh2:
	adrp	x8, _stdout@GOTPAGE
Lloh3:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
	ldr	x21, [x28]
Lloh4:
	ldr	x20, [x8]
Lloh5:
	adrp	x8, _FALSE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh7:
	ldr	x23, [x8]
	cmp	w0, #2
	b.lt	LBB0_14
; %bb.1:
	mov	x19, x1
	mov	x25, x0
	mov	x22, #0
	mov	w26, #1
	mov	x24, x23
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	mov	x21, x0
	cbz	x0, LBB0_27
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	w26, w26, #1
	cmp	w26, w25
	b.ge	LBB0_15
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	sxtw	x27, w26
	ldr	x0, [x19, w26, sxtw #3]
	ldrb	w8, [x0]
	cmp	w8, #45
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldrsb	w8, [x0, #1]
	cmp	w8, #103
	b.gt	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #97
	b.ne	LBB0_19
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
Lloh10:
	adrp	x8, _TRUE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh12:
	ldr	x24, [x8]
	add	x26, x27, #1
	ldr	x0, [x19, x26, lsl #3]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_26
; %bb.8:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x22, x0
                                        ; kill: def $w26 killed $w26 killed $x26 def $x26
	b	LBB0_3
LBB0_9:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x28]
	cmp	x21, x8
	b.eq	LBB0_2
; %bb.10:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh15:
	adrp	x8, _stdout@GOTPAGE
Lloh16:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_23
; %bb.11:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fopen
	mov	x20, x0
	cbnz	x0, LBB0_3
	b	LBB0_25
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	cmp	w8, #105
	b.ne	LBB0_21
; %bb.13:                               ;   in Loop: Header=BB0_4 Depth=1
Lloh20:
	adrp	x8, _TRUE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh22:
	ldr	x23, [x8]
	b	LBB0_3
LBB0_14:
	mov	x22, #0
	mov	x24, x23
LBB0_15:
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	mov	x3, x23
	mov	x4, x24
	bl	_pnm2png
Lloh23:
	adrp	x8, _FALSE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_28
; %bb.16:
	mov	x0, x21
	bl	_fclose
	mov	x0, x20
	bl	_fclose
	cbz	x24, LBB0_18
; %bb.17:
	mov	x0, x22
	bl	_fclose
LBB0_18:
	mov	w0, #0
	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
LBB0_19:
	cmp	w8, #63
	b.eq	LBB0_22
LBB0_20:
Lloh26:
	adrp	x20, _stderr@GOTPAGE
Lloh27:
	ldr	x20, [x20, _stderr@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh28:
	adrp	x1, l_.str.1@PAGE
Lloh29:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x20]
	ldr	x8, [x19, x27, lsl #3]
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.3@PAGE
Lloh31:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_24
LBB0_21:
	cmp	w8, #104
	b.ne	LBB0_20
LBB0_22:
	bl	_usage
	mov	w0, #0
	bl	_exit
LBB0_23:
Lloh32:
	adrp	x19, _stderr@GOTPAGE
Lloh33:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh34:
	adrp	x1, l_.str.1@PAGE
Lloh35:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x19]
Lloh36:
	adrp	x1, l_.str.7@PAGE
Lloh37:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_24:
	bl	_fprintf
	bl	_usage
	mov	w0, #1
	bl	_exit
LBB0_25:
Lloh38:
	adrp	x20, _stderr@GOTPAGE
Lloh39:
	ldr	x20, [x20, _stderr@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh40:
	adrp	x1, l_.str.1@PAGE
Lloh41:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x20]
	ldr	x8, [x19, x27, lsl #3]
	str	x8, [sp]
Lloh42:
	adrp	x1, l_.str.6@PAGE
Lloh43:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_29
LBB0_26:
Lloh44:
	adrp	x20, _stderr@GOTPAGE
Lloh45:
	ldr	x20, [x20, _stderr@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh46:
	adrp	x1, l_.str.1@PAGE
Lloh47:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x20]
	ldr	x8, [x19, x26, lsl #3]
	str	x8, [sp]
Lloh48:
	adrp	x1, l_.str.2@PAGE
Lloh49:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_29
LBB0_27:
Lloh50:
	adrp	x20, _stderr@GOTPAGE
Lloh51:
	ldr	x20, [x20, _stderr@GOTPAGEOFF]
	ldr	w0, [x20]
Lloh52:
	adrp	x1, l_.str.1@PAGE
Lloh53:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x20]
	ldr	x8, [x19, x27, lsl #3]
	str	x8, [sp]
Lloh54:
	adrp	x1, l_.str.4@PAGE
Lloh55:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_29
LBB0_28:
Lloh56:
	adrp	x19, _stderr@GOTPAGE
Lloh57:
	ldr	x19, [x19, _stderr@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh58:
	adrp	x1, l_.str.1@PAGE
Lloh59:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	ldr	w0, [x19]
Lloh60:
	adrp	x1, l_.str.8@PAGE
Lloh61:
	add	x1, x1, l_.str.8@PAGEOFF
LBB0_29:
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGot	Lloh50, Lloh51
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpAdd	Lloh58, Lloh59
	.loh AdrpLdrGot	Lloh56, Lloh57
	.cfi_endproc
                                        ; -- End function
	.comm	_stdin,8,3                      ; @stdin
	.comm	_stdout,8,3                     ; @stdout
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_TRUE,8,3                       ; @TRUE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"rb"

	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"PNM2PNG\n"

l_.str.2:                               ; @.str.2
	.asciz	"Error:  alpha-channel file %s does not exist\n"

l_.str.3:                               ; @.str.3
	.asciz	"Error:  unknown option %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"Error:  file %s does not exist\n"

l_.str.5:                               ; @.str.5
	.asciz	"wb"

l_.str.6:                               ; @.str.6
	.asciz	"Error:  can not create PNG-file %s\n"

l_.str.7:                               ; @.str.7
	.asciz	"Error:  too many parameters\n"

l_.str.8:                               ; @.str.8
	.asciz	"Error:  unsuccessful converting to PNG-image\n"

	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.comm	_STDIN,4,2                      ; @STDIN
	.comm	_STDOUT,4,2                     ; @STDOUT
.subsections_via_symbols
