	.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	$0, -48(%rbp)
	movq	$0, -80(%rbp)
	movq	_symbolize_cb@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-48(%rbp), %rdi
	leaq	-80(%rbp), %rsi
	callq	___tsan_init
	movq	-80(%rbp), %rax
	movq	_current_proc@GOTPCREL(%rip), %r13
	movq	%rax, (%r13)
	movq	_go_heap@GOTPCREL(%rip), %r15
	movq	_PROT_READ@GOTPCREL(%rip), %rax
	movq	_PROT_WRITE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movq	_MAP_PRIVATE@GOTPCREL(%rip), %rax
	movq	_MAP_FIXED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	(%r15), %edi
	movq	_MAP_ANON@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	xorl	%r14d, %r14d
	movl	$16384, %esi                    ## imm = 0x4000
	movl	$-1, %r8d
	xorl	%r9d, %r9d
	callq	_mmap
	movq	%rax, %rbx
	movq	_buf0@GOTPCREL(%rip), %rax
	movq	%rbx, (%rax)
	movq	_MAP_FAILED@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r15), %edx
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movl	$1, %r14d
	jmp	LBB0_3
LBB0_2:
	addq	$65535, %rbx                    ## imm = 0xFFFF
	andq	$-65536, %rbx                   ## imm = 0xFFFF0000
	movq	%rbx, %rdi
	movl	$4096, %esi                     ## imm = 0x1000
	callq	___tsan_map_shadow
	movq	-48(%rbp), %rdi
	movq	_barfoo@GOTPCREL(%rip), %r15
	incq	%r15
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	$10, %ecx
	callq	___tsan_malloc
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	___tsan_free
	movq	-48(%rbp), %rdi
	leaq	_main+1(%rip), %rsi
	callq	___tsan_func_enter
	movq	-48(%rbp), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rdx
	movl	$10, %ecx
	callq	___tsan_malloc
	movq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	___tsan_release
	movq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	___tsan_release_merge
	movq	$0, -56(%rbp)
	movq	-48(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdx
	callq	___tsan_go_start
	movq	$0, -64(%rbp)
	movq	-48(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdx
	callq	___tsan_go_start
	movq	-48(%rbp), %rdi
	callq	___tsan_func_exit
	movq	-56(%rbp), %rdi
	movq	_foobar@GOTPCREL(%rip), %r12
	incq	%r12
	movq	%r12, %rsi
	callq	___tsan_func_enter
	movq	-56(%rbp), %rdi
	movq	%r12, %rsi
	callq	___tsan_func_enter
	movq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	___tsan_write
	movq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	callq	___tsan_acquire
	movq	-56(%rbp), %rdi
	callq	___tsan_func_exit
	movq	-56(%rbp), %rdi
	callq	___tsan_func_exit
	movq	-56(%rbp), %rdi
	callq	___tsan_go_end
	movq	$0, -72(%rbp)
	leaq	-72(%rbp), %rdi
	callq	___tsan_proc_create
	movq	-72(%rbp), %rax
	movq	%rax, (%r13)
	movq	-64(%rbp), %rdi
	movq	%r12, %rsi
	callq	___tsan_func_enter
	movq	-64(%rbp), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	___tsan_read
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	___tsan_free
	movq	-64(%rbp), %rdi
	callq	___tsan_func_exit
	movq	-64(%rbp), %rdi
	callq	___tsan_go_end
	movq	-72(%rbp), %rdi
	callq	___tsan_proc_destroy
	movq	-80(%rbp), %rax
	movq	%rax, (%r13)
	xorl	%eax, %eax
	callq	___tsan_fini
LBB0_3:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_symbolize_cb,4,2               ## @symbolize_cb
	.comm	_current_proc,8,3               ## @current_proc
	.comm	_go_heap,4,2                    ## @go_heap
	.comm	_PROT_READ,4,2                  ## @PROT_READ
	.comm	_PROT_WRITE,4,2                 ## @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ## @MAP_PRIVATE
	.comm	_MAP_FIXED,4,2                  ## @MAP_FIXED
	.comm	_MAP_ANON,4,2                   ## @MAP_ANON
	.comm	_buf0,8,3                       ## @buf0
	.comm	_MAP_FAILED,8,3                 ## @MAP_FAILED
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to allocate Go-like heap at %p; errno %d\n"

	.comm	_errno,4,2                      ## @errno
	.comm	_barfoo,4,2                     ## @barfoo
	.comm	_foobar,4,2                     ## @foobar
.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	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
	stp	xzr, xzr, [sp, #32]
Lloh0:
	adrp	x8, _symbolize_cb@GOTPAGE
Lloh1:
	ldr	x8, [x8, _symbolize_cb@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	add	x0, sp, #40
	add	x1, sp, #32
	bl	___tsan_init
	ldr	x8, [sp, #32]
Lloh3:
	adrp	x22, _current_proc@GOTPAGE
Lloh4:
	ldr	x22, [x22, _current_proc@GOTPAGEOFF]
	str	x8, [x22]
Lloh5:
	adrp	x19, _go_heap@GOTPAGE
Lloh6:
	ldr	x19, [x19, _go_heap@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh7:
	adrp	x8, _PROT_READ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PROT_READ@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _PROT_WRITE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _PROT_WRITE@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w2, w9, w8
Lloh13:
	adrp	x8, _MAP_PRIVATE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _MAP_PRIVATE@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _MAP_FIXED@GOTPAGE
Lloh17:
	ldr	x9, [x9, _MAP_FIXED@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _MAP_ANON@GOTPAGE
Lloh20:
	ldr	x9, [x9, _MAP_ANON@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w3, w8, w9
	mov	w1, #16384
	mov	w4, #-1
	mov	w5, #0
	bl	_mmap
Lloh22:
	adrp	x8, _buf0@GOTPAGE
Lloh23:
	ldr	x8, [x8, _buf0@GOTPAGEOFF]
Lloh24:
	str	x0, [x8]
Lloh25:
	adrp	x8, _MAP_FAILED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MAP_FAILED@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
Lloh28:
	adrp	x8, _stderr@GOTPAGE
Lloh29:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
	ldr	w2, [x19]
Lloh31:
	adrp	x8, _errno@GOTPAGE
Lloh32:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh33:
	ldr	w3, [x8]
Lloh34:
	adrp	x1, l_.str@PAGE
Lloh35:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	b	LBB0_3
LBB0_2:
	mov	w8, #65535
	add	x8, x0, x8
	and	x19, x8, #0xffffffffffff0000
	mov	x0, x19
	mov	w1, #4096
	bl	___tsan_map_shadow
	ldr	x0, [sp, #40]
Lloh36:
	adrp	x8, _barfoo@GOTPAGE
Lloh37:
	ldr	x8, [x8, _barfoo@GOTPAGEOFF]
	add	x20, x8, #1
	mov	x1, x20
	mov	x2, x19
	mov	w3, #10
	bl	___tsan_malloc
	mov	x0, x19
	mov	w1, #10
	bl	___tsan_free
	ldr	x0, [sp, #40]
Lloh38:
	adrp	x8, _main@PAGE
Lloh39:
	add	x8, x8, _main@PAGEOFF
	add	x1, x8, #1
	bl	___tsan_func_enter
	ldr	x0, [sp, #40]
	mov	x1, x20
	mov	x2, x19
	mov	w3, #10
	bl	___tsan_malloc
	ldr	x0, [sp, #40]
	mov	x1, x19
	bl	___tsan_release
	ldr	x0, [sp, #40]
	mov	x1, x19
	bl	___tsan_release_merge
	str	xzr, [sp, #24]
	ldr	x0, [sp, #40]
	add	x1, sp, #24
	mov	x2, x20
	bl	___tsan_go_start
	str	xzr, [sp, #16]
	ldr	x0, [sp, #40]
	add	x1, sp, #16
	mov	x2, x20
	bl	___tsan_go_start
	ldr	x0, [sp, #40]
	bl	___tsan_func_exit
	ldr	x0, [sp, #24]
Lloh40:
	adrp	x8, _foobar@GOTPAGE
Lloh41:
	ldr	x8, [x8, _foobar@GOTPAGEOFF]
	add	x21, x8, #1
	mov	x1, x21
	bl	___tsan_func_enter
	ldr	x0, [sp, #24]
	mov	x1, x21
	bl	___tsan_func_enter
	ldr	x0, [sp, #24]
	mov	x1, x19
	mov	x2, x20
	bl	___tsan_write
	ldr	x0, [sp, #24]
	mov	x1, x19
	bl	___tsan_acquire
	ldr	x0, [sp, #24]
	bl	___tsan_func_exit
	ldr	x0, [sp, #24]
	bl	___tsan_func_exit
	ldr	x0, [sp, #24]
	bl	___tsan_go_end
	str	xzr, [sp, #8]
	add	x0, sp, #8
	bl	___tsan_proc_create
	ldp	x8, x0, [sp, #8]
	str	x8, [x22]
	mov	x1, x21
	bl	___tsan_func_enter
	ldr	x0, [sp, #16]
	mov	x1, x19
	mov	x2, x20
	bl	___tsan_read
	mov	x0, x19
	mov	w1, #10
	bl	___tsan_free
	ldr	x0, [sp, #16]
	bl	___tsan_func_exit
	ldr	x0, [sp, #16]
	bl	___tsan_go_end
	ldr	x0, [sp, #8]
	bl	___tsan_proc_destroy
	ldr	x8, [sp, #32]
	str	x8, [x22]
	bl	___tsan_fini
	mov	w0, #0
LBB0_3:
	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
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotStr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_symbolize_cb,4,2               ; @symbolize_cb
	.comm	_current_proc,8,3               ; @current_proc
	.comm	_go_heap,4,2                    ; @go_heap
	.comm	_PROT_READ,4,2                  ; @PROT_READ
	.comm	_PROT_WRITE,4,2                 ; @PROT_WRITE
	.comm	_MAP_PRIVATE,4,2                ; @MAP_PRIVATE
	.comm	_MAP_FIXED,4,2                  ; @MAP_FIXED
	.comm	_MAP_ANON,4,2                   ; @MAP_ANON
	.comm	_buf0,8,3                       ; @buf0
	.comm	_MAP_FAILED,8,3                 ; @MAP_FAILED
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to allocate Go-like heap at %p; errno %d\n"

	.comm	_errno,4,2                      ; @errno
	.comm	_barfoo,4,2                     ; @barfoo
	.comm	_foobar,4,2                     ; @foobar
.subsections_via_symbols
