	.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, %r13
	movl	%edi, %ebx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	cmpl	$2, %ebx
	jg	LBB0_2
## %bb.1:
	movq	(%r13), %rdx
	leaq	L_.str(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_LOG_INFO
	movl	$1, %ebx
	jmp	LBB0_23
LBB0_2:
	movq	8(%r13), %rdi
	movq	_VC_CONTAINER_IO_MODE_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_vc_container_io_open
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	16(%r13), %rdi
	movq	_VC_CONTAINER_IO_MODE_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_vc_container_io_open
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%rax, %r15
	movl	$1, %edi
	callq	_nb_set_nonblocking_input
	movq	_VC_CONTAINER_SUCCESS@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_7 Depth=1
	movb	-49(%rbp), %al                  ## 1-byte Reload
	movb	%al, %r14b
	andl	%r14d, %ebx
	je	LBB0_17
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_vc_container_io_read
	testq	%rax, %rax
	je	LBB0_25
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %r14
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leaq	(%r12,%rbx), %rsi
	movq	%r14, %rdx
	subq	%rbx, %rdx
	movq	%r15, %rdi
	callq	_vc_container_io_write
	movq	(%r15), %rdx
	movq	(%r13), %rcx
	cmpq	%rcx, %rdx
	jne	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	addq	%rax, %rbx
	cmpq	%rbx, %r14
	ja	LBB0_9
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ebx, %ebx
	cmpq	%rcx, %rdx
	sete	%bl
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_25:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r13), %rcx
	movl	$1, %ebx
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%r14d, %r14d
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rcx, (%rax)
	sete	-49(%rbp)                       ## 1-byte Folded Spill
	xorl	%eax, %eax
	callq	_nb_char_available
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_nb_get_char
	movsbl	%al, %eax
	cmpl	$27, %eax
	ja	LBB0_14
## %bb.26:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$201326608, %ecx                ## imm = 0xC000010
	btl	%eax, %ecx
	jb	LBB0_17
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$81, %eax
	je	LBB0_17
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$113, %eax
	jne	LBB0_16
LBB0_17:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	movq	(%r13), %rax
	cmpq	%rax, %rdx
	je	LBB0_20
## %bb.18:
	movq	_VC_CONTAINER_ERROR_EOS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rdx
	je	LBB0_20
## %bb.19:
	leaq	L_.str.3(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_LOG_INFO
	movq	(%r13), %rax
LBB0_20:
	movq	(%r15), %rdx
	cmpq	%rax, %rdx
	je	LBB0_22
## %bb.21:
	leaq	L_.str.4(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_LOG_INFO
LBB0_22:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_vc_container_io_close
	movq	%r15, %rdi
	callq	_vc_container_io_close
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_nb_set_nonblocking_input
	jmp	LBB0_23
LBB0_3:
	movq	8(%r13), %rdx
	movl	-56(%rbp), %ecx
	leaq	L_.str.1(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_LOG_INFO
	movl	$2, %ebx
	jmp	LBB0_23
LBB0_5:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_vc_container_io_close
	movq	16(%r13), %rdx
	movl	-56(%rbp), %ecx
	leaq	L_.str.2(%rip), %rsi
	xorl	%edi, %edi
	xorl	%eax, %eax
	callq	_LOG_INFO
	movl	$3, %ebx
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.24:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BUFFER_SIZE,4,2            ## @MAX_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Usage:\n%s <read URI> <write URI>\n"

	.comm	_VC_CONTAINER_IO_MODE_READ,4,2  ## @VC_CONTAINER_IO_MODE_READ
L_.str.1:                               ## @.str.1
	.asciz	"Opening <%s> for read failed: %d\n"

	.comm	_VC_CONTAINER_IO_MODE_WRITE,4,2 ## @VC_CONTAINER_IO_MODE_WRITE
L_.str.2:                               ## @.str.2
	.asciz	"Opening <%s> for write failed: %d\n"

	.comm	_VC_CONTAINER_SUCCESS,8,3       ## @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_EOS,8,3     ## @VC_CONTAINER_ERROR_EOS
L_.str.3:                               ## @.str.3
	.asciz	"Read failed: %d\n"

L_.str.4:                               ## @.str.4
	.asciz	"Write failed: %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:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x23, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_BUFFER_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_BUFFER_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
	mov	x9, x21
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x21, #15
	and	x9, x9, #0x1fffffff0
	sub	x22, x8, x9
	mov	sp, x22
	cmp	w0, #2
	b.gt	LBB0_2
; %bb.1:
	ldr	x2, [x23]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, #0
	bl	_LOG_INFO
	mov	w0, #1
	b	LBB0_23
LBB0_2:
	ldr	x0, [x23, #8]
Lloh10:
	adrp	x8, _VC_CONTAINER_IO_MODE_READ@GOTPAGE
Lloh11:
	ldr	x8, [x8, _VC_CONTAINER_IO_MODE_READ@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	sub	x2, x29, #92
	bl	_vc_container_io_open
	cbz	x0, LBB0_21
; %bb.3:
	mov	x19, x0
	ldr	x0, [x23, #16]
Lloh13:
	adrp	x8, _VC_CONTAINER_IO_MODE_WRITE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _VC_CONTAINER_IO_MODE_WRITE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	sub	x2, x29, #92
	bl	_vc_container_io_open
	cbz	x0, LBB0_22
; %bb.4:
	mov	x20, x0
	mov	w25, #1
	mov	w0, #1
	bl	_nb_set_nonblocking_input
Lloh16:
	adrp	x24, _VC_CONTAINER_SUCCESS@GOTPAGE
Lloh17:
	ldr	x24, [x24, _VC_CONTAINER_SUCCESS@GOTPAGEOFF]
	mov	w26, #16
	movk	w26, #3072, lsl #16
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	and	w8, w23, w27
	cbz	w8, LBB0_16
LBB0_6:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	mov	x0, x19
	mov	x1, x22
	mov	x2, x21
	bl	_vc_container_io_read
	cbz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	mov	x27, #0
LBB0_8:                                 ;   Parent Loop BB0_6 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	add	x1, x22, x27
	sub	x2, x23, x27
	mov	x0, x20
	bl	_vc_container_io_write
	add	x27, x0, x27
	ldr	x9, [x20]
	ldr	x8, [x24]
	cmp	x9, x8
	ccmp	x23, x27, #0, eq
	b.hi	LBB0_8
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	x9, x8
	cset	w23, eq
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x8, [x24]
	mov	w23, #1
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x9, [x19]
	cmp	x9, x8
	cset	w27, eq
	bl	_nb_char_available
	cbz	x0, LBB0_5
; %bb.12:                               ;   in Loop: Header=BB0_6 Depth=1
	bl	_nb_get_char
	cmp	w0, #27
	b.hi	LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_6 Depth=1
	lsl	w8, w25, w0
	tst	w8, w26
	b.ne	LBB0_16
LBB0_14:                                ;   in Loop: Header=BB0_6 Depth=1
	cmp	w0, #81
	b.eq	LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_6 Depth=1
	cmp	w0, #113
	b.ne	LBB0_5
LBB0_16:
	ldr	x2, [x19]
	ldr	x8, [x24]
Lloh18:
	adrp	x9, _VC_CONTAINER_ERROR_EOS@GOTPAGE
Lloh19:
	ldr	x9, [x9, _VC_CONTAINER_ERROR_EOS@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x2, x8
	ccmp	x2, x9, #4, ne
	b.eq	LBB0_18
; %bb.17:
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, #0
	bl	_LOG_INFO
	ldr	x8, [x24]
LBB0_18:
	ldr	x2, [x20]
	cmp	x2, x8
	b.eq	LBB0_20
; %bb.19:
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, #0
	bl	_LOG_INFO
LBB0_20:
	mov	x0, x19
	bl	_vc_container_io_close
	mov	x0, x20
	bl	_vc_container_io_close
	mov	w0, #0
	bl	_nb_set_nonblocking_input
	mov	w0, #0
	b	LBB0_23
LBB0_21:
	ldr	x2, [x23, #8]
	ldur	w8, [x29, #-92]
	str	x8, [sp, #-16]!
Lloh25:
	adrp	x1, l_.str.1@PAGE
Lloh26:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_LOG_INFO
	add	sp, sp, #16
	mov	w0, #2
	b	LBB0_23
LBB0_22:
	mov	x0, x19
	bl	_vc_container_io_close
	ldr	x2, [x23, #16]
	ldur	w8, [x29, #-92]
	str	x8, [sp, #-16]!
Lloh27:
	adrp	x1, l_.str.2@PAGE
Lloh28:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, #0
	bl	_LOG_INFO
	add	sp, sp, #16
	mov	w0, #3
LBB0_23:
	ldur	x8, [x29, #-88]
Lloh29:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh30:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_25:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BUFFER_SIZE,4,2            ; @MAX_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Usage:\n%s <read URI> <write URI>\n"

	.comm	_VC_CONTAINER_IO_MODE_READ,4,2  ; @VC_CONTAINER_IO_MODE_READ
l_.str.1:                               ; @.str.1
	.asciz	"Opening <%s> for read failed: %d\n"

	.comm	_VC_CONTAINER_IO_MODE_WRITE,4,2 ; @VC_CONTAINER_IO_MODE_WRITE
l_.str.2:                               ; @.str.2
	.asciz	"Opening <%s> for write failed: %d\n"

	.comm	_VC_CONTAINER_SUCCESS,8,3       ; @VC_CONTAINER_SUCCESS
	.comm	_VC_CONTAINER_ERROR_EOS,8,3     ; @VC_CONTAINER_ERROR_EOS
l_.str.3:                               ; @.str.3
	.asciz	"Read failed: %d\n"

l_.str.4:                               ; @.str.4
	.asciz	"Write failed: %d\n"

.subsections_via_symbols
