	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	(%rsi), %rax
	movq	_progname@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	cmpq	$0, (%rax)
	jne	LBB0_3
LBB0_2:
	leaq	L_.str(%rip), %rax
	movq	%rax, (%rcx)
LBB0_3:
	cmpl	$2, %edi
	movl	%edi, -48(%rbp)                 ## 4-byte Spill
	jl	LBB0_4
## %bb.28:
	movl	%edi, %eax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	$1, %r13d
	movl	$1, -60(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_29
	.p2align	4, 0x90
LBB0_35:                                ##   in Loop: Header=BB0_29 Depth=1
	movslq	%r13d, %r12
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r12,8), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_fopen
	movq	%rax, %rcx
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_36
LBB0_57:                                ##   in Loop: Header=BB0_29 Depth=1
	incl	%r13d
	cmpl	%ebx, %r13d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jge	LBB0_58
LBB0_29:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_46 Depth 2
	movslq	%r13d, %rax
	movq	(%rbx,%rax,8), %r12
	movb	(%r12), %al
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	cmpb	$45, %al
	jne	LBB0_58
## %bb.30:                              ##   in Loop: Header=BB0_29 Depth=1
	incq	%r12
	movq	%r12, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$1, %edx
	callq	_keymatch
	testq	%rax, %rax
	je	LBB0_32
## %bb.31:                              ##   in Loop: Header=BB0_29 Depth=1
	movl	$0, -60(%rbp)                   ## 4-byte Folded Spill
LBB0_56:                                ##   in Loop: Header=BB0_29 Depth=1
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	jmp	LBB0_57
	.p2align	4, 0x90
LBB0_32:                                ##   in Loop: Header=BB0_29 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edx
	callq	_keymatch
	testq	%rax, %rax
	je	LBB0_37
## %bb.33:                              ##   in Loop: Header=BB0_29 Depth=1
	incl	%r13d
	movl	-48(%rbp), %ebx                 ## 4-byte Reload
	cmpl	%ebx, %r13d
	jl	LBB0_35
## %bb.34:                              ##   in Loop: Header=BB0_29 Depth=1
	xorl	%eax, %eax
	callq	_usage
	jmp	LBB0_35
LBB0_37:                                ##   in Loop: Header=BB0_29 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %edx
	callq	_keymatch
	testq	%rax, %rax
	je	LBB0_55
## %bb.38:                              ##   in Loop: Header=BB0_29 Depth=1
	incl	%r13d
	cmpl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	jl	LBB0_40
## %bb.39:                              ##   in Loop: Header=BB0_29 Depth=1
	xorl	%eax, %eax
	callq	_usage
LBB0_40:                                ##   in Loop: Header=BB0_29 Depth=1
	movslq	%r13d, %r12
	movq	(%rbx,%r12,8), %r15
	cmpb	$34, (%r15)
	jne	LBB0_53
## %bb.41:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	_MAX_COM_LENGTH@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	callq	_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_43
## %bb.42:                              ##   in Loop: Header=BB0_29 Depth=1
	leaq	L_.str.6(%rip), %rdi
	callq	_ERREXIT
LBB0_43:                                ##   in Loop: Header=BB0_29 Depth=1
	movq	(%rbx,%r12,8), %rbx
	incq	%rbx
	movq	%rbx, %rdi
	callq	_strlen
	movq	(%r14), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_44
## %bb.45:                              ##   in Loop: Header=BB0_29 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_strcpy
	.p2align	4, 0x90
LBB0_46:                                ##   Parent Loop BB0_29 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	incq	%r12
	movq	%r15, %rdi
	callq	_strlen
	testl	%eax, %eax
	je	LBB0_49
## %bb.47:                              ##   in Loop: Header=BB0_46 Depth=2
	decl	%eax
	cmpb	$34, (%r15,%rax)
	je	LBB0_48
LBB0_49:                                ##   in Loop: Header=BB0_46 Depth=2
	cmpq	-88(%rbp), %r12                 ## 8-byte Folded Reload
	jl	LBB0_51
## %bb.50:                              ##   in Loop: Header=BB0_46 Depth=2
	leaq	L_.str.8(%rip), %rdi
	callq	_ERREXIT
LBB0_51:                                ##   in Loop: Header=BB0_46 Depth=2
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, %rbx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	(%r14,%r12,8), %rdi
	callq	_strlen
	addq	%rbx, %rax
	incq	%rax
	movq	_MAX_COM_LENGTH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmpq	%rdx, %rax
	jae	LBB0_44
## %bb.52:                              ##   in Loop: Header=BB0_46 Depth=2
	movq	%r15, %rdi
	leaq	L_.str.9(%rip), %rsi
	callq	_strcat
	movq	(%r14,%r12,8), %rsi
	movq	%r15, %rdi
	callq	_strcat
	incl	%r13d
	jmp	LBB0_46
LBB0_55:                                ##   in Loop: Header=BB0_29 Depth=1
	xorl	%eax, %eax
	callq	_usage
	jmp	LBB0_56
LBB0_53:                                ##   in Loop: Header=BB0_29 Depth=1
	movq	%r15, %rdi
	callq	_strlen
	movq	_MAX_COM_LENGTH@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	cmpq	%rdx, %rax
	jb	LBB0_54
	jmp	LBB0_44
LBB0_48:                                ##   in Loop: Header=BB0_29 Depth=1
	movb	$0, (%r15,%rax)
LBB0_54:                                ##   in Loop: Header=BB0_29 Depth=1
	movq	%r15, %rdi
	callq	_strlen
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	jmp	LBB0_56
LBB0_4:
	xorl	%ecx, %ecx
	movl	$1, %r13d
	xorl	%r12d, %r12d
	movl	$1, -60(%rbp)                   ## 4-byte Folded Spill
	xorl	%eax, %eax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	xorl	%r15d, %r15d
LBB0_5:
	testq	%r15, %r15
	sete	%r14b
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_9
## %bb.6:
	testb	%cl, %cl
	jne	LBB0_9
## %bb.7:
	testb	%r12b, %r12b
	jne	LBB0_9
## %bb.8:
	xorl	%eax, %eax
	callq	_usage
LBB0_9:
	testb	%r12b, %r12b
	movl	%r14d, %r12d
	je	LBB0_10
LBB0_61:
	movslq	%r13d, %r14
	movq	(%rbx,%r14,8), %rdi
	movq	_READ_BINARY@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	callq	_fopen
	movq	_infile@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	jne	LBB0_11
## %bb.62:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_progname@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	(%rbx,%r14,8), %rcx
LBB0_63:
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_64
LBB0_58:
	cmpb	$45, -41(%rbp)                  ## 1-byte Folded Reload
	setne	%r12b
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	setne	%cl
	testq	%r15, %r15
	je	LBB0_5
## %bb.59:
	testq	%rax, %rax
	je	LBB0_5
## %bb.60:
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_usage
	movb	$1, %al
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	cmpb	$45, -41(%rbp)                  ## 1-byte Folded Reload
	jne	LBB0_61
LBB0_10:
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_infile@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	movl	-48(%rbp), %eax                 ## 4-byte Reload
LBB0_11:
	decl	%eax
	cmpl	%eax, %r13d
	jge	LBB0_13
## %bb.12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_progname@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	leaq	L_.str.10(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	xorl	%eax, %eax
	callq	_usage
LBB0_13:
	movq	_stdout@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_outfile@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testb	%r12b, %r12b
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_24
## %bb.14:
	movq	_MAX_COM_LENGTH@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_malloc
	movq	%rax, %r15
	testq	%rax, %rax
	jne	LBB0_16
## %bb.15:
	leaq	L_.str.6(%rip), %rdi
	callq	_ERREXIT
LBB0_16:
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	jne	LBB0_18
## %bb.17:
	movq	_stdin@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
LBB0_18:
	movq	%r14, %rdi
	callq	_getc
	movq	_EOF@GOTPCREL(%rip), %r13
	xorl	%ebx, %ebx
	cmpl	(%r13), %eax
	je	LBB0_22
## %bb.19:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edx
	cmpq	%rdx, %rbx
	jae	LBB0_44
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	movb	%al, (%r15,%rbx)
	incq	%rbx
	movq	%r14, %rdi
	callq	_getc
	cmpl	(%r13), %eax
	jne	LBB0_20
LBB0_22:
	cmpb	$0, -56(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_24
## %bb.23:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_fclose
LBB0_24:
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	callq	_scan_JPEG_header
	movl	%eax, %r14d
	testl	%ebx, %ebx
	je	LBB0_27
## %bb.25:
	movq	_M_COM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_write_marker
	leal	2(%rbx), %edi
	callq	_write_2_bytes
	movl	%ebx, %r12d
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movsbl	(%r15,%rbx), %edi
	callq	_write_1_byte
	incq	%rbx
	cmpl	%ebx, %r12d
	jne	LBB0_26
LBB0_27:
	movl	%r14d, %edi
	callq	_write_marker
	xorl	%eax, %eax
	callq	_copy_rest_of_file
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_44:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.7(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_64:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_exit
LBB0_36:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_progname@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax,%r12,8), %rcx
	jmp	LBB0_63
	.cfi_endproc
                                        ## -- End function
	.comm	_progname,8,3                   ## @progname
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"wrjpgcom"

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

L_.str.2:                               ## @.str.2
	.asciz	"cfile"

L_.str.3:                               ## @.str.3
	.asciz	"r"

	.comm	_stderr,4,2                     ## @stderr
L_.str.4:                               ## @.str.4
	.asciz	"%s: can't open %s\n"

	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.5:                               ## @.str.5
	.asciz	"comment"

	.comm	_MAX_COM_LENGTH,8,3             ## @MAX_COM_LENGTH
L_.str.6:                               ## @.str.6
	.asciz	"Insufficient memory"

L_.str.7:                               ## @.str.7
	.asciz	"Comment text may not exceed %u bytes\n"

L_.str.8:                               ## @.str.8
	.asciz	"Missing ending quote mark"

L_.str.9:                               ## @.str.9
	.asciz	" "

	.comm	_READ_BINARY,8,3                ## @READ_BINARY
	.comm	_infile,8,3                     ## @infile
	.comm	_stdin,8,3                      ## @stdin
L_.str.10:                              ## @.str.10
	.asciz	"%s: only one input file\n"

	.comm	_stdout,8,3                     ## @stdout
	.comm	_outfile,8,3                    ## @outfile
	.comm	_EOF,4,2                        ## @EOF
	.comm	_M_COM,4,2                      ## @M_COM
	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.comm	_WRITE_BINARY,8,3               ## @WRITE_BINARY
.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, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x1
	mov	x22, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x20, _progname@GOTPAGE
Lloh1:
	ldr	x20, [x20, _progname@GOTPAGEOFF]
	str	x8, [x20]
	cbz	x8, LBB0_2
; %bb.1:
	ldr	x8, [x8]
	cbnz	x8, LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, l_.str@PAGE
Lloh3:
	add	x8, x8, l_.str@PAGEOFF
	str	x8, [x20]
LBB0_3:
	cmp	w22, #2
	b.lt	LBB0_31
; %bb.4:
	mov	w24, #0
	str	xzr, [sp, #16]                  ; 8-byte Folded Spill
	mov	x19, #0
	mov	w21, w22
Lloh4:
	adrp	x27, _MAX_COM_LENGTH@GOTPAGE
Lloh5:
	ldr	x27, [x27, _MAX_COM_LENGTH@GOTPAGEOFF]
Lloh6:
	adrp	x28, l_.str.9@PAGE
Lloh7:
	add	x28, x28, l_.str.9@PAGEOFF
	mov	w25, #1
	mov	w8, #1
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	str	wzr, [sp, #28]                  ; 4-byte Folded Spill
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w25, w25, #1
	cmp	w25, w22
	b.ge	LBB0_54
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_21 Depth 2
	ldr	x8, [x23, w25, sxtw #3]
	ldrb	w20, [x8]
	cmp	w20, #45
	b.ne	LBB0_54
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x26, x8, #1
	mov	x0, x26
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #1
	bl	_keymatch
	cbnz	x0, LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x26
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #2
	bl	_keymatch
	cbz	x0, LBB0_13
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	sxtw	x8, w25
	add	x25, x8, #1
	cmp	w25, w22
	b.lt	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_usage
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x23, x25, lsl #3]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_fopen
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	cbnz	x0, LBB0_6
	b	LBB0_66
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x26
Lloh14:
	adrp	x1, l_.str.5@PAGE
Lloh15:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w2, #1
	bl	_keymatch
	cbz	x0, LBB0_27
; %bb.14:                               ;   in Loop: Header=BB0_7 Depth=1
	add	w25, w25, #1
	cmp	w25, w22
	b.lt	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_7 Depth=1
	bl	_usage
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x19, [x23, w25, sxtw #3]
	ldrb	w8, [x19]
	cmp	w8, #34
	b.ne	LBB0_28
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x27]
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh16:
	adrp	x0, l_.str.6@PAGE
Lloh17:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_ERREXIT
LBB0_19:                                ;   in Loop: Header=BB0_7 Depth=1
	sxtw	x26, w25
	ldr	x8, [x23, x26, lsl #3]
	add	x24, x8, #1
	mov	x0, x24
	bl	_strlen
	ldr	x8, [x27]
	cmp	x0, x8
	b.hs	LBB0_53
; %bb.20:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x24
	bl	_strcpy
LBB0_21:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x26, x26, #1
	mov	x0, x19
	bl	_strlen
	cbz	w0, LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_21 Depth=2
	sub	w8, w0, #1
	ldrb	w9, [x19, x8]
	cmp	w9, #34
	b.eq	LBB0_29
LBB0_23:                                ;   in Loop: Header=BB0_21 Depth=2
	cmp	x26, x21
	b.lt	LBB0_25
; %bb.24:                               ;   in Loop: Header=BB0_21 Depth=2
Lloh18:
	adrp	x0, l_.str.8@PAGE
Lloh19:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_ERREXIT
LBB0_25:                                ;   in Loop: Header=BB0_21 Depth=2
	mov	x0, x19
	bl	_strlen
	mov	x24, x0
	ldr	x0, [x23, x26, lsl #3]
	bl	_strlen
	add	x8, x24, x0
	add	x9, x8, #1
	ldr	x8, [x27]
	cmp	x9, x8
	b.hs	LBB0_53
; %bb.26:                               ;   in Loop: Header=BB0_21 Depth=2
	mov	x0, x19
	mov	x1, x28
	bl	_strcat
	ldr	x1, [x23, x26, lsl #3]
	mov	x0, x19
	bl	_strcat
	add	w25, w25, #1
	b	LBB0_21
LBB0_27:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_usage
	b	LBB0_6
LBB0_28:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_strlen
	ldr	x8, [x27]
	cmp	x0, x8
	b.lo	LBB0_30
	b	LBB0_53
LBB0_29:                                ;   in Loop: Header=BB0_7 Depth=1
	strb	wzr, [x19, x8]
LBB0_30:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_strlen
	mov	x24, x0
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	b	LBB0_6
LBB0_31:
	mov	w21, #0
	mov	w27, #0
	mov	w24, #0
	mov	x8, #0
	mov	x19, #0
	mov	w25, #1
	mov	w28, #1
LBB0_32:
	str	x8, [sp, #16]                   ; 8-byte Folded Spill
	cmp	x19, #0
	cset	w26, eq
	cbnz	x19, LBB0_39
; %bb.33:
	tbnz	w21, #0, LBB0_39
; %bb.34:
	tbnz	w27, #0, LBB0_39
; %bb.35:
	bl	_usage
	tbz	w27, #0, LBB0_40
LBB0_36:
	ldr	x0, [x23, w25, sxtw #3]
Lloh20:
	adrp	x8, _READ_BINARY@GOTPAGE
Lloh21:
	ldr	x8, [x8, _READ_BINARY@GOTPAGEOFF]
Lloh22:
	ldr	x1, [x8]
	bl	_fopen
Lloh23:
	adrp	x8, _infile@GOTPAGE
Lloh24:
	ldr	x8, [x8, _infile@GOTPAGEOFF]
Lloh25:
	str	x0, [x8]
	cbnz	x0, LBB0_41
; %bb.37:
                                        ; kill: def $w25 killed $w25 killed $x25 def $x25
	sxtw	x8, w25
Lloh26:
	adrp	x9, _stderr@GOTPAGE
Lloh27:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x9]
	ldr	x9, [x20]
	ldr	x8, [x23, x8, lsl #3]
	stp	x9, x8, [sp]
LBB0_38:
Lloh29:
	adrp	x1, l_.str.4@PAGE
Lloh30:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_63
LBB0_39:
	cbnz	w27, LBB0_36
LBB0_40:
Lloh31:
	adrp	x8, _stdin@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
Lloh34:
	adrp	x9, _infile@GOTPAGE
Lloh35:
	ldr	x9, [x9, _infile@GOTPAGEOFF]
Lloh36:
	str	x8, [x9]
LBB0_41:
	sub	w8, w22, #1
	cmp	w25, w8
	b.ge	LBB0_43
; %bb.42:
Lloh37:
	adrp	x8, _stderr@GOTPAGE
Lloh38:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	ldr	x8, [x20]
	str	x8, [sp]
Lloh40:
	adrp	x1, l_.str.10@PAGE
Lloh41:
	add	x1, x1, l_.str.10@PAGEOFF
	bl	_fprintf
	bl	_usage
LBB0_43:
Lloh42:
	adrp	x8, _stdout@GOTPAGE
Lloh43:
	ldr	x8, [x8, _stdout@GOTPAGEOFF]
Lloh44:
	ldr	x8, [x8]
Lloh45:
	adrp	x9, _outfile@GOTPAGE
Lloh46:
	ldr	x9, [x9, _outfile@GOTPAGEOFF]
Lloh47:
	str	x8, [x9]
	cbz	w26, LBB0_49
; %bb.44:
Lloh48:
	adrp	x20, _MAX_COM_LENGTH@GOTPAGE
Lloh49:
	ldr	x20, [x20, _MAX_COM_LENGTH@GOTPAGEOFF]
	ldr	x0, [x20]
	bl	_malloc
	mov	x19, x0
	cbnz	x0, LBB0_46
; %bb.45:
Lloh50:
	adrp	x0, l_.str.6@PAGE
Lloh51:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_ERREXIT
LBB0_46:
Lloh52:
	adrp	x8, _stdin@GOTPAGE
Lloh53:
	ldr	x8, [x8, _stdin@GOTPAGEOFF]
Lloh54:
	ldr	x8, [x8]
	cmp	w21, #0
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	csel	x22, x9, x8, ne
	mov	x0, x22
	bl	_getc
Lloh55:
	adrp	x23, _EOF@GOTPAGE
Lloh56:
	ldr	x23, [x23, _EOF@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w0, w8
	b.ne	LBB0_57
; %bb.47:
	mov	w24, #0
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	cbz	w21, LBB0_49
LBB0_48:
	bl	_fclose
LBB0_49:
	mov	x0, x28
	bl	_scan_JPEG_header
	mov	x20, x0
	cbz	w24, LBB0_52
; %bb.50:
Lloh57:
	adrp	x8, _M_COM@GOTPAGE
Lloh58:
	ldr	x8, [x8, _M_COM@GOTPAGEOFF]
Lloh59:
	ldr	w0, [x8]
	bl	_write_marker
	add	w0, w24, #2
	bl	_write_2_bytes
LBB0_51:                                ; =>This Inner Loop Header: Depth=1
	ldrsb	w0, [x19], #1
	bl	_write_1_byte
	subs	w24, w24, #1
	b.ne	LBB0_51
LBB0_52:
	mov	x0, x20
	bl	_write_marker
	bl	_copy_rest_of_file
Lloh60:
	adrp	x8, _EXIT_SUCCESS@GOTPAGE
Lloh61:
	ldr	x8, [x8, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh62:
	ldr	w0, [x8]
	bl	_exit
LBB0_53:
Lloh63:
	adrp	x9, _stderr@GOTPAGE
Lloh64:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh65:
	ldr	w0, [x9]
	str	x8, [sp]
	b	LBB0_62
LBB0_54:
	cmp	w20, #45
	cset	w27, ne
	ldr	x8, [sp, #16]                   ; 8-byte Folded Reload
	cmp	x8, #0
	cset	w21, ne
	cbz	x19, LBB0_64
; %bb.55:
	ldr	w28, [sp, #28]                  ; 4-byte Folded Reload
	cbz	x8, LBB0_65
; %bb.56:
	bl	_usage
	mov	w26, #0
	mov	w21, #1
	cmp	w20, #45
Lloh66:
	adrp	x20, _progname@GOTPAGE
Lloh67:
	ldr	x20, [x20, _progname@GOTPAGEOFF]
	b.ne	LBB0_36
	b	LBB0_40
LBB0_57:
	mov	x8, #0
LBB0_58:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x20]
	cmp	x8, x9
	b.hs	LBB0_61
; %bb.59:                               ;   in Loop: Header=BB0_58 Depth=1
	add	x24, x8, #1
	strb	w0, [x19, x8]
	mov	x0, x22
	bl	_getc
	ldr	w9, [x23]
	mov	x8, x24
	cmp	w0, w9
	b.ne	LBB0_58
; %bb.60:
                                        ; kill: def $w24 killed $w24 killed $x24 def $x24
	ldr	x0, [sp, #16]                   ; 8-byte Folded Reload
	cbnz	w21, LBB0_48
	b	LBB0_49
LBB0_61:
Lloh68:
	adrp	x8, _stderr@GOTPAGE
Lloh69:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh70:
	ldr	w0, [x8]
	str	x9, [sp]
LBB0_62:
Lloh71:
	adrp	x1, l_.str.7@PAGE
Lloh72:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_63:
	bl	_fprintf
Lloh73:
	adrp	x8, _EXIT_FAILURE@GOTPAGE
Lloh74:
	ldr	x8, [x8, _EXIT_FAILURE@GOTPAGEOFF]
Lloh75:
	ldr	w0, [x8]
	bl	_exit
LBB0_64:
	ldr	w28, [sp, #28]                  ; 4-byte Folded Reload
LBB0_65:
Lloh76:
	adrp	x20, _progname@GOTPAGE
Lloh77:
	ldr	x20, [x20, _progname@GOTPAGEOFF]
	b	LBB0_32
LBB0_66:
Lloh78:
	adrp	x8, _stderr@GOTPAGE
Lloh79:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh80:
	ldr	w0, [x8]
Lloh81:
	adrp	x8, _progname@GOTPAGE
Lloh82:
	ldr	x8, [x8, _progname@GOTPAGEOFF]
Lloh83:
	ldr	x8, [x8]
	ldr	x9, [x23, x25, lsl #3]
	stp	x8, x9, [sp]
	b	LBB0_38
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotStr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotStr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGot	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpLdrGot	Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpLdrGotLdr	Lloh60, Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.loh AdrpLdrGot	Lloh66, Lloh67
	.loh AdrpLdrGotLdr	Lloh68, Lloh69, Lloh70
	.loh AdrpAdd	Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGotLdr	Lloh81, Lloh82, Lloh83
	.loh AdrpLdrGotLdr	Lloh78, Lloh79, Lloh80
	.cfi_endproc
                                        ; -- End function
	.comm	_progname,8,3                   ; @progname
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"wrjpgcom"

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

l_.str.2:                               ; @.str.2
	.asciz	"cfile"

l_.str.3:                               ; @.str.3
	.asciz	"r"

	.comm	_stderr,4,2                     ; @stderr
l_.str.4:                               ; @.str.4
	.asciz	"%s: can't open %s\n"

	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.5:                               ; @.str.5
	.asciz	"comment"

	.comm	_MAX_COM_LENGTH,8,3             ; @MAX_COM_LENGTH
l_.str.6:                               ; @.str.6
	.asciz	"Insufficient memory"

l_.str.7:                               ; @.str.7
	.asciz	"Comment text may not exceed %u bytes\n"

l_.str.8:                               ; @.str.8
	.asciz	"Missing ending quote mark"

l_.str.9:                               ; @.str.9
	.asciz	" "

	.comm	_READ_BINARY,8,3                ; @READ_BINARY
	.comm	_infile,8,3                     ; @infile
	.comm	_stdin,8,3                      ; @stdin
l_.str.10:                              ; @.str.10
	.asciz	"%s: only one input file\n"

	.comm	_stdout,8,3                     ; @stdout
	.comm	_outfile,8,3                    ; @outfile
	.comm	_EOF,4,2                        ; @EOF
	.comm	_M_COM,4,2                      ; @M_COM
	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.comm	_WRITE_BINARY,8,3               ; @WRITE_BINARY
.subsections_via_symbols
