	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_one_shm
_read_one_shm:                          ## @read_one_shm
	.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
	pushq	%rax
	movl	$4104, %eax                     ## imm = 0x1008
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.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	_shm_open
	movl	%eax, %r15d
	cmpl	$-1, %eax
	je	LBB0_12
## %bb.1:
	leaq	-4144(%rbp), %r12
	movq	_stdout@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_read
	movq	%rax, %rbx
	testq	%rax, %rax
	jle	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %ecx
	movq	%r12, %rdi
	movl	$1, %esi
	movq	%rbx, %rdx
	callq	_fwrite
	cmpq	%rbx, %rax
	jl	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	cmpq	$4096, %rbx                     ## imm = 0x1000
	je	LBB0_2
LBB0_6:
	xorl	%r12d, %r12d
	cmpq	$4096, %rbx                     ## imm = 0x1000
	jb	LBB0_10
## %bb.7:
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_8
LBB0_12:
	leaq	L_.str(%rip), %rdi
LBB0_8:
	movq	%r14, %rsi
	callq	_warn
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	callq	_warnx
LBB0_9:
	movl	$1, %r12d
LBB0_10:
	movl	%r15d, %edi
	callq	_close
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_13
## %bb.11:
	movl	%r12d, %eax
	addq	$4104, %rsp                     ## imm = 0x1008
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"open %s"

	.comm	_stdout,4,2                     ## @stdout
L_.str.1:                               ## @.str.1
	.asciz	"short write to stdout"

L_.str.2:                               ## @.str.2
	.asciz	"read from %s"

	.no_dead_strip	_read_one_shm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_one_shm
_read_one_shm:                          ; @read_one_shm
	.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
	mov	w9, #4112
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #16
	mov	x20, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh5:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_shm_open
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_7
; %bb.1:
Lloh8:
	adrp	x22, _stdout@GOTPAGE
Lloh9:
	ldr	x22, [x22, _stdout@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #4096
	bl	_read
	mov	x21, x0
	cmp	x0, #1
	b.lt	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w3, [x22]
	add	x0, sp, #8
	mov	w1, #1
	mov	x2, x21
	bl	_fwrite
	cmp	x0, x21
	b.lt	LBB0_10
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	cmp	x21, #1, lsl #12                ; =4096
	b.eq	LBB0_2
LBB0_5:
	cmp	x21, #1, lsl #12                ; =4096
	b.hs	LBB0_8
; %bb.6:
	mov	w20, #0
	b	LBB0_12
LBB0_7:
Lloh10:
	adrp	x0, l_.str@PAGE
Lloh11:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
LBB0_9:
	mov	x1, x20
	bl	_warn
	b	LBB0_11
LBB0_10:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_warnx
LBB0_11:
	mov	w20, #1
LBB0_12:
	mov	x0, x19
	bl	_close
	ldur	x8, [x29, #-56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_14
; %bb.13:
	mov	x0, x20
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #16
	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
	ret
LBB0_14:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"open %s"

	.comm	_stdout,4,2                     ; @stdout
l_.str.1:                               ; @.str.1
	.asciz	"short write to stdout"

l_.str.2:                               ; @.str.2
	.asciz	"read from %s"

	.no_dead_strip	_read_one_shm
.subsections_via_symbols
