	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cat                            ## -- Begin function cat
	.p2align	4, 0x90
_cat:                                   ## @cat
	.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	$1032, %rsp                     ## imm = 0x408
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_open
	movl	%eax, %r15d
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_2:
	leaq	-1072(%rbp), %rsi
	movl	%r15d, %edi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	movq	_STDERR_FILENO@GOTPCREL(%rip), %r13
	leaq	-1072(%rbp), %rbx
	leaq	L_.str.1(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_4 Depth=1
	movl	%r15d, %edi
	movq	%rbx, %rsi
	movl	$1024, %edx                     ## imm = 0x400
	callq	_read
	testl	%eax, %eax
	jle	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %edi
	movq	%rbx, %rsi
	movl	%eax, %edx
	callq	_write
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_err
	jmp	LBB0_6
LBB0_7:
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	leaq	L_.str(%rip), %rsi
	movl	$1, %edi
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_err
LBB0_9:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.11:
	movl	%r15d, %edi
	addq	$1032, %rsp                     ## imm = 0x408
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_close                          ## TAILCALL
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_STDERR_FILENO,4,2              ## @STDERR_FILENO
L_.str.1:                               ## @.str.1
	.asciz	"write to stderr"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cat                            ; -- Begin function cat
	.p2align	2
_cat:                                   ; @cat
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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 w27, -56
	.cfi_offset w28, -64
	sub	sp, sp, #1040
	mov	x20, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_open
	mov	x19, x0
	tbz	w0, #31, LBB0_2
; %bb.1:
	str	x20, [sp]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_2:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1024
	bl	_read
	mov	x2, x0
	cmp	w0, #1
	b.lt	LBB0_7
; %bb.3:
Lloh8:
	adrp	x22, _STDERR_FILENO@GOTPAGE
Lloh9:
	ldr	x22, [x22, _STDERR_FILENO@GOTPAGEOFF]
Lloh10:
	adrp	x21, l_.str.1@PAGE
Lloh11:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #1024
	bl	_read
	mov	x2, x0
	cmp	w0, #0
	b.le	LBB0_7
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x22]
	add	x1, sp, #8
	bl	_write
	cmn	w0, #1
	b.ne	LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	mov	x1, x21
	bl	_err
	b	LBB0_4
LBB0_7:
	cbz	w2, LBB0_9
; %bb.8:
	str	x20, [sp]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #1
	bl	_err
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh14:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh15:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	mov	x0, x19
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #64             ; 16-byte Folded Reload
	b	_close
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_STDERR_FILENO,4,2              ; @STDERR_FILENO
l_.str.1:                               ; @.str.1
	.asciz	"write to stderr"

.subsections_via_symbols
