	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function Thread_Examples
_Thread_Examples:                       ## @Thread_Examples
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	_Thread_Examples.examples(%rip), %rax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	4                               ## @Thread_Examples.examples
_Thread_Examples.examples:
	.quad	L_.str
	.quad	L_.str.1
	.quad	L_.str.2
	.quad	L_.str.3
	.space	16

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Usage"

L_.str.1:                               ## @.str.1
	.asciz	"var set_value(var args) {\n  assign(get(args, $I(0)), $I(1));\n  return NULL;\n}\n\nvar i = $I(0);\n\nvar x = new(Thread, $(Function, set_value));\ncall(x, i);\njoin(x);\n\nshow(i); /* 1 */\n"

L_.str.2:                               ## @.str.2
	.asciz	"Exclusive Resource"

L_.str.3:                               ## @.str.3
	.asciz	"var increment(var args) {\n  var mut = get(args, $I(0));\n  var tot = get(args, $I(1));\n  lock(mut);\n  assign(tot, $I(c_int(tot)+1));\n  unlock(mut);\n  return NULL;\n}\n\nvar mutex = new(Mutex);\nvar total = $I(0);\n\nvar threads = new(Array, Box,\n  new(Thread, $(Function, increment)),\n  new(Thread, $(Function, increment)),\n  new(Thread, $(Function, increment)));\n\nshow(total); /* 0 */\n\nforeach (t in threads) {\n  call(deref(t), mutex, total);\n}\n\nforeach (t in threads) {\n  join(deref(t));\n}\n\nshow(total); /* 3 */\n"

	.no_dead_strip	_Thread_Examples
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function Thread_Examples
_Thread_Examples:                       ; @Thread_Examples
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x0, _Thread_Examples.examples@PAGE
Lloh1:
	add	x0, x0, _Thread_Examples.examples@PAGEOFF
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	3                               ; @Thread_Examples.examples
_Thread_Examples.examples:
	.quad	l_.str
	.quad	l_.str.1
	.quad	l_.str.2
	.quad	l_.str.3
	.space	16

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Usage"

l_.str.1:                               ; @.str.1
	.asciz	"var set_value(var args) {\n  assign(get(args, $I(0)), $I(1));\n  return NULL;\n}\n\nvar i = $I(0);\n\nvar x = new(Thread, $(Function, set_value));\ncall(x, i);\njoin(x);\n\nshow(i); /* 1 */\n"

l_.str.2:                               ; @.str.2
	.asciz	"Exclusive Resource"

l_.str.3:                               ; @.str.3
	.asciz	"var increment(var args) {\n  var mut = get(args, $I(0));\n  var tot = get(args, $I(1));\n  lock(mut);\n  assign(tot, $I(c_int(tot)+1));\n  unlock(mut);\n  return NULL;\n}\n\nvar mutex = new(Mutex);\nvar total = $I(0);\n\nvar threads = new(Array, Box,\n  new(Thread, $(Function, increment)),\n  new(Thread, $(Function, increment)),\n  new(Thread, $(Function, increment)));\n\nshow(total); /* 0 */\n\nforeach (t in threads) {\n  call(deref(t), mutex, total);\n}\n\nforeach (t in threads) {\n  join(deref(t));\n}\n\nshow(total); /* 3 */\n"

	.no_dead_strip	_Thread_Examples
.subsections_via_symbols
