	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movl	%edi, %ebx
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rsi), %rdi
	callq	_basename
	movq	_progname@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	leaq	L_.str(%rip), %r15
	movq	_optarg@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_1:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rax
	movq	_ofname@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_getopt
	cmpl	$104, %eax
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$111, %eax
	je	LBB0_1
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$105, %eax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r13), %rax
	movq	_ifname@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_usage
	jmp	LBB0_2
LBB0_8:                                 ##   in Loop: Header=BB0_2 Depth=1
	cmpl	$-1, %eax
	je	LBB0_10
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %edi
	callq	_usage
	jmp	LBB0_2
LBB0_10:
	movq	_ifname@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.11:
	movq	_ofname@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	je	LBB0_15
## %bb.12:
	leaq	-48(%rbp), %rsi
	callq	_stat
	testl	%eax, %eax
	je	LBB0_16
## %bb.13:
	movq	(%rbx), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_ERRS
	jmp	LBB0_25
LBB0_14:
	leaq	L_.str.1(%rip), %rdi
	callq	_ERR
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	jmp	LBB0_25
LBB0_15:
	leaq	L_.str.2(%rip), %rdi
	callq	_ERR
	jmp	LBB0_25
LBB0_16:
	movl	-48(%rbp), %r13d
	movl	%r13d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_22
## %bb.17:
	movq	%rax, %r14
	movq	(%rbx), %rdi
	leaq	L_.str.5(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_23
## %bb.18:
	movq	_errno@GOTPCREL(%rip), %r12
	movq	$0, (%r12)
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	$1, %edx
	movq	%rax, %rbx
	movq	%rax, %rcx
	callq	_fread
	cmpq	$0, (%r12)
	je	LBB0_26
## %bb.19:
	movq	_ifname@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.7(%rip), %rdi
LBB0_20:
	callq	_ERRS
LBB0_21:
	movq	%rbx, %rdi
	callq	_fclose
	jmp	LBB0_24
LBB0_22:
	leaq	L_.str.4(%rip), %rdi
	callq	_ERR
	jmp	LBB0_25
LBB0_23:
	movq	(%rbx), %rsi
	leaq	L_.str.6(%rip), %rdi
	callq	_ERRS
LBB0_24:
	movq	%r14, %rdi
	callq	_free
LBB0_25:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_26:
	movq	%r14, %rdi
	movl	%r13d, %esi
	callq	_crc32buf
	movl	%eax, %edi
	callq	_HOST_TO_LE32
	movl	%eax, (%r14)
	movq	_ofname@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	L_.str.8(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_29
## %bb.27:
	movq	$0, (%r12)
	movq	%r14, %rdi
	movl	%r13d, %esi
	movl	$1, %edx
	movq	%rax, %rcx
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	callq	_fwrite
	cmpq	$0, (%r12)
	je	LBB0_30
## %bb.28:
	movq	_ofname@GOTPCREL(%rip), %r12
	movq	(%r12), %rsi
	leaq	L_.str.10(%rip), %rdi
	callq	_ERRS
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %r13
	jmp	LBB0_31
LBB0_29:
	movq	_ofname@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	leaq	L_.str.9(%rip), %rdi
	jmp	LBB0_20
LBB0_30:
	movq	_EXIT_SUCCESS@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_fflush
	movq	_ofname@GOTPCREL(%rip), %r12
LBB0_31:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_fclose
	cmpl	(%r13), %r15d
	je	LBB0_21
## %bb.32:
	movq	(%r12), %rdi
	callq	_unlink
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
	.comm	_progname,4,2                   ## @progname
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i:o:h"

	.comm	_optarg,8,3                     ## @optarg
	.comm	_ifname,8,3                     ## @ifname
	.comm	_ofname,8,3                     ## @ofname
	.comm	_EXIT_SUCCESS,4,2               ## @EXIT_SUCCESS
L_.str.1:                               ## @.str.1
	.asciz	"no input file specified"

L_.str.2:                               ## @.str.2
	.asciz	"no output file specified"

L_.str.3:                               ## @.str.3
	.asciz	"stat failed on %s"

L_.str.4:                               ## @.str.4
	.asciz	"no memory for buffer\n"

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

L_.str.6:                               ## @.str.6
	.asciz	"could not open \"%s\" for reading"

	.comm	_errno,8,3                      ## @errno
L_.str.7:                               ## @.str.7
	.asciz	"unable to read from file %s"

L_.str.8:                               ## @.str.8
	.asciz	"w"

L_.str.9:                               ## @.str.9
	.asciz	"could not open \"%s\" for writing"

L_.str.10:                              ## @.str.10
	.asciz	"unable to write to file %s"

.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x26, _EXIT_FAILURE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _EXIT_FAILURE@GOTPAGEOFF]
	ldr	w19, [x26]
	ldr	x0, [x1]
	bl	_basename
Lloh2:
	adrp	x8, _progname@GOTPAGE
Lloh3:
	ldr	x8, [x8, _progname@GOTPAGEOFF]
Lloh4:
	str	w0, [x8]
Lloh5:
	adrp	x22, l_.str@PAGE
Lloh6:
	add	x22, x22, l_.str@PAGEOFF
Lloh7:
	adrp	x25, _EXIT_SUCCESS@GOTPAGE
Lloh8:
	ldr	x25, [x25, _EXIT_SUCCESS@GOTPAGEOFF]
Lloh9:
	adrp	x27, _optarg@GOTPAGE
Lloh10:
	ldr	x27, [x27, _optarg@GOTPAGEOFF]
Lloh11:
	adrp	x24, _ofname@GOTPAGE
Lloh12:
	ldr	x24, [x24, _ofname@GOTPAGEOFF]
Lloh13:
	adrp	x23, _ifname@GOTPAGE
Lloh14:
	ldr	x23, [x23, _ifname@GOTPAGEOFF]
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x27]
	str	x8, [x24]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_getopt
	cmp	w0, #104
	b.le	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #111
	b.eq	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	w0, #105
	b.ne	LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x27]
	str	x8, [x23]
	b	LBB0_2
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x25]
	bl	_usage
	b	LBB0_2
LBB0_8:                                 ;   in Loop: Header=BB0_2 Depth=1
	cmn	w0, #1
	b.eq	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x26]
	bl	_usage
	b	LBB0_2
LBB0_10:
	ldr	x0, [x23]
	cbz	x0, LBB0_14
; %bb.11:
	ldr	x8, [x24]
	cbz	x8, LBB0_15
; %bb.12:
	add	x1, sp, #8
	bl	_stat
	cbz	w0, LBB0_16
; %bb.13:
	ldr	x1, [x23]
Lloh15:
	adrp	x0, l_.str.3@PAGE
Lloh16:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_ERRS
	b	LBB0_25
LBB0_14:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_ERR
	b	LBB0_25
LBB0_15:
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_ERR
	b	LBB0_25
LBB0_16:
	ldr	w22, [sp, #8]
	mov	x0, x22
	bl	_malloc
	cbz	x0, LBB0_22
; %bb.17:
	mov	x20, x0
	ldr	x0, [x23]
Lloh21:
	adrp	x1, l_.str.5@PAGE
Lloh22:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_23
; %bb.18:
	mov	x21, x0
Lloh23:
	adrp	x26, _errno@GOTPAGE
Lloh24:
	ldr	x26, [x26, _errno@GOTPAGEOFF]
	str	xzr, [x26]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #1
	mov	x3, x21
	bl	_fread
	ldr	x8, [x26]
	cbz	x8, LBB0_26
; %bb.19:
	ldr	x1, [x23]
Lloh25:
	adrp	x0, l_.str.7@PAGE
Lloh26:
	add	x0, x0, l_.str.7@PAGEOFF
LBB0_20:
	bl	_ERRS
LBB0_21:
	mov	x0, x21
	bl	_fclose
	b	LBB0_24
LBB0_22:
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_ERR
	b	LBB0_25
LBB0_23:
	ldr	x1, [x23]
Lloh29:
	adrp	x0, l_.str.6@PAGE
Lloh30:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_ERRS
LBB0_24:
	mov	x0, x20
	bl	_free
LBB0_25:
	mov	x0, x19
	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_26:
	mov	x0, x20
	mov	x1, x22
	bl	_crc32buf
	bl	_HOST_TO_LE32
	str	w0, [x20]
	ldr	x0, [x24]
Lloh31:
	adrp	x1, l_.str.8@PAGE
Lloh32:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_29
; %bb.27:
	mov	x23, x0
	str	xzr, [x26]
	mov	x0, x20
	mov	x1, x22
	mov	w2, #1
	mov	x3, x23
	bl	_fwrite
	ldr	x8, [x26]
	cbz	x8, LBB0_30
; %bb.28:
	ldr	x1, [x24]
Lloh33:
	adrp	x0, l_.str.10@PAGE
Lloh34:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_ERRS
	b	LBB0_31
LBB0_29:
	ldr	x1, [x24]
Lloh35:
	adrp	x0, l_.str.9@PAGE
Lloh36:
	add	x0, x0, l_.str.9@PAGEOFF
	b	LBB0_20
LBB0_30:
	ldr	w19, [x25]
	mov	x0, x23
	bl	_fflush
LBB0_31:
	mov	x0, x23
	bl	_fclose
	ldr	w8, [x25]
	cmp	w19, w8
	b.eq	LBB0_21
; %bb.32:
	ldr	x0, [x24]
	bl	_unlink
	b	LBB0_21
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotStr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
	.comm	_progname,4,2                   ; @progname
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i:o:h"

	.comm	_optarg,8,3                     ; @optarg
	.comm	_ifname,8,3                     ; @ifname
	.comm	_ofname,8,3                     ; @ofname
	.comm	_EXIT_SUCCESS,4,2               ; @EXIT_SUCCESS
l_.str.1:                               ; @.str.1
	.asciz	"no input file specified"

l_.str.2:                               ; @.str.2
	.asciz	"no output file specified"

l_.str.3:                               ; @.str.3
	.asciz	"stat failed on %s"

l_.str.4:                               ; @.str.4
	.asciz	"no memory for buffer\n"

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

l_.str.6:                               ; @.str.6
	.asciz	"could not open \"%s\" for reading"

	.comm	_errno,8,3                      ; @errno
l_.str.7:                               ; @.str.7
	.asciz	"unable to read from file %s"

l_.str.8:                               ; @.str.8
	.asciz	"w"

l_.str.9:                               ; @.str.9
	.asciz	"could not open \"%s\" for writing"

l_.str.10:                              ; @.str.10
	.asciz	"unable to write to file %s"

.subsections_via_symbols
