	.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, %r13
	movl	%edi, %ebx
	movq	_IH_PAD_BYTES@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%r12d, %r12d
	leaq	L_.str(%rip), %r14
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_getopt
	cmpl	$107, %eax
	jg	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$-1, %eax
	je	LBB0_9
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$105, %eax
	jne	LBB0_1
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_optarg@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$108, %eax
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$111, %eax
	jne	LBB0_1
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_optarg@GOTPCREL(%rip), %rax
	movq	(%rax), %r15
	jmp	LBB0_1
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_optarg@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtol
	testl	%eax, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmovgl	%eax, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_1
LBB0_9:
	testq	%r12, %r12
	je	LBB0_25
## %bb.10:
	testq	%r15, %r15
	je	LBB0_25
## %bb.11:
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_open
	testl	%eax, %eax
	js	LBB0_12
## %bb.14:
	movl	%eax, %r14d
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movq	_O_CREAT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	movl	$420, %edx                      ## imm = 0x1A4
	xorl	%eax, %eax
	callq	_open
	testl	%eax, %eax
	js	LBB0_15
## %bb.16:
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	leaq	-56(%rbp), %rsi
	movl	%r14d, %edi
	callq	_fstat
	testq	%rax, %rax
	movq	-48(%rbp), %r15                 ## 8-byte Reload
	js	LBB0_17
## %bb.18:
	movl	-56(%rbp), %r13d
	leal	(%r15,%r13), %r12d
	movl	%r12d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_26
## %bb.19:
	movq	%rax, %rbx
	movl	%r14d, %edi
	movq	%rax, %rsi
	movl	$8, %edx
	callq	_read
	cmpl	$8, %eax
	jne	LBB0_20
## %bb.21:
	leaq	32(%rbx), %rdi
	xorl	%esi, %esi
	movl	%r15d, %edx
	callq	_memset
	movslq	%r15d, %r15
	leaq	(%rbx,%r15,4), %rsi
	addq	$32, %rsi
	addl	$-8, %r13d
	movl	%r14d, %edi
	movl	%r13d, %edx
	callq	_read
	cmpl	%r13d, %eax
	jne	LBB0_20
## %bb.22:
	addq	$8, %r15
	movq	$0, (%rbx)
	xorl	%edi, %edi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_crc32
	movl	%eax, %edi
	callq	_htonl
	movq	%rax, (%rbx)
	movl	-60(%rbp), %edi                 ## 4-byte Reload
	movq	%rbx, %rsi
	movl	%r12d, %edx
	callq	_write
	cmpl	%r12d, %eax
	jne	LBB0_23
## %bb.24:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.5(%rip), %rsi
	jmp	LBB0_13
LBB0_25:
	movq	(%r13), %rdi
	callq	_usage
	movl	$1, %edi
	callq	_exit
LBB0_12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_13
LBB0_15:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_13
LBB0_17:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.3(%rip), %rsi
	jmp	LBB0_13
LBB0_26:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
LBB0_23:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	L_.str.6(%rip), %rsi
LBB0_13:
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_IH_PAD_BYTES,4,2               ## @IH_PAD_BYTES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i:o:l:"

	.comm	_optarg,8,3                     ## @optarg
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"could not open input file. (errno = %d)\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_O_CREAT,4,2                    ## @O_CREAT
L_.str.2:                               ## @.str.2
	.asciz	"could not open output file. (errno = %d)\n"

L_.str.3:                               ## @.str.3
	.asciz	"could not fstat input file. (errno = %d)\n"

L_.str.4:                               ## @.str.4
	.asciz	"buffer allocation failed\n"

L_.str.5:                               ## @.str.5
	.asciz	"could not read input file (errno = %d).\n"

L_.str.6:                               ## @.str.6
	.asciz	"could not write output file (errnor = %d).\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, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x22, x1
	mov	x23, x0
	mov	x21, #0
	mov	x20, #0
Lloh0:
	adrp	x8, _IH_PAD_BYTES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IH_PAD_BYTES@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x24, l_.str@PAGE
Lloh4:
	add	x24, x24, l_.str@PAGEOFF
Lloh5:
	adrp	x25, _optarg@GOTPAGE
Lloh6:
	ldr	x25, [x25, _optarg@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	bl	_getopt
	cmp	w0, #107
	b.gt	LBB0_5
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #105
	b.ne	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x21, [x25]
	b	LBB0_1
LBB0_5:                                 ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #108
	b.eq	LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_1 Depth=1
	cmp	w0, #111
	b.ne	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x20, [x25]
	b	LBB0_1
LBB0_8:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	x0, [x25]
	mov	x1, #0
	mov	w2, #0
	bl	_strtol
	cmp	w0, #0
	csel	w19, w0, w19, gt
	b	LBB0_1
LBB0_9:
	cbz	x21, LBB0_20
; %bb.10:
	cbz	x20, LBB0_20
; %bb.11:
Lloh7:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_open
	tbnz	w0, #31, LBB0_21
; %bb.12:
	mov	x22, x0
Lloh10:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh11:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh14:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w8, #420
	str	x8, [sp]
	mov	x0, x20
	bl	_open
	tbnz	w0, #31, LBB0_22
; %bb.13:
	mov	x20, x0
	add	x1, sp, #8
	mov	x0, x22
	bl	_fstat
	tbnz	x0, #63, LBB0_23
; %bb.14:
	ldr	w24, [sp, #8]
	add	w21, w24, w19
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_24
; %bb.15:
	mov	x23, x0
	mov	x0, x22
	mov	x1, x23
	mov	w2, #8
	bl	_read
	cmp	w0, #8
	b.ne	LBB0_19
; %bb.16:
	add	x0, x23, #32
	mov	w1, #0
	mov	x2, x19
	bl	_memset
	sxtw	x8, w19
	add	x19, x8, #8
	add	x1, x23, x19, lsl #2
	sub	w24, w24, #8
	mov	x0, x22
	mov	x2, x24
	bl	_read
	cmp	w0, w24
	b.ne	LBB0_19
; %bb.17:
	str	xzr, [x23]
	mov	w0, #0
	mov	x1, x23
	mov	x2, x19
	bl	_crc32
	bl	_htonl
	str	x0, [x23]
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_write
	cmp	w0, w21
	b.ne	LBB0_25
; %bb.18:
	mov	w0, #0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_19:
Lloh16:
	adrp	x8, _stderr@GOTPAGE
Lloh17:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x8, _errno@GOTPAGE
Lloh20:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.5@PAGE
Lloh23:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_26
LBB0_20:
	ldr	x0, [x22]
	bl	_usage
	mov	w0, #1
	bl	_exit
LBB0_21:
Lloh24:
	adrp	x8, _stderr@GOTPAGE
Lloh25:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
Lloh27:
	adrp	x8, _errno@GOTPAGE
Lloh28:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh30:
	adrp	x1, l_.str.1@PAGE
Lloh31:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_26
LBB0_22:
Lloh32:
	adrp	x8, _stderr@GOTPAGE
Lloh33:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
Lloh35:
	adrp	x8, _errno@GOTPAGE
Lloh36:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh38:
	adrp	x1, l_.str.2@PAGE
Lloh39:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_26
LBB0_23:
Lloh40:
	adrp	x8, _stderr@GOTPAGE
Lloh41:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh42:
	ldr	w0, [x8]
Lloh43:
	adrp	x8, _errno@GOTPAGE
Lloh44:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh45:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh46:
	adrp	x1, l_.str.3@PAGE
Lloh47:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_26
LBB0_24:
Lloh48:
	adrp	x8, _stderr@GOTPAGE
Lloh49:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh50:
	ldr	w0, [x8]
Lloh51:
	adrp	x1, l_.str.4@PAGE
Lloh52:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_26
LBB0_25:
Lloh53:
	adrp	x8, _stderr@GOTPAGE
Lloh54:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
Lloh56:
	adrp	x8, _errno@GOTPAGE
Lloh57:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh58:
	ldr	w8, [x8]
	str	x8, [sp]
Lloh59:
	adrp	x1, l_.str.6@PAGE
Lloh60:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_26:
	bl	_fprintf
	mov	w0, #1
	bl	_exit
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpAdd	Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
                                        ; -- End function
	.comm	_IH_PAD_BYTES,4,2               ; @IH_PAD_BYTES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i:o:l:"

	.comm	_optarg,8,3                     ; @optarg
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"could not open input file. (errno = %d)\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_O_CREAT,4,2                    ; @O_CREAT
l_.str.2:                               ; @.str.2
	.asciz	"could not open output file. (errno = %d)\n"

l_.str.3:                               ; @.str.3
	.asciz	"could not fstat input file. (errno = %d)\n"

l_.str.4:                               ; @.str.4
	.asciz	"buffer allocation failed\n"

l_.str.5:                               ; @.str.5
	.asciz	"could not read input file (errno = %d).\n"

l_.str.6:                               ; @.str.6
	.asciz	"could not write output file (errnor = %d).\n"

.subsections_via_symbols
