	.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	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$1, %edi
	je	LBB0_10
## %bb.1:
	movq	8(%rsi), %rdi
	movq	_filebase@GOTPCREL(%rip), %r14
	movq	_O_APPEND@GOTPCREL(%rip), %rax
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rdi, (%r14)
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movl	$420, %edx                      ## imm = 0x1A4
	callq	_open
	movl	%eax, -36(%rbp)
	testl	%eax, %eax
	js	LBB0_2
## %bb.3:
	movl	$4, %edi
	callq	_pthread_setconcurrency
	testq	%rax, %rax
	jne	LBB0_11
## %bb.4:
	movq	_mover@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-40(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_pthread_create
	movq	_cleaner@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_pthread_create
	movq	_writer@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-36(%rbp), %rcx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_pthread_create
	movq	_TRUE@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_9
## %bb.5:
	leaq	-32(%rbp), %rbx
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_6 Depth=1
	movl	$1, %edi
	callq	_sleep
	cmpq	$0, (%r15)
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rdi
	movq	%rbx, %rsi
	callq	_stat
	testl	%eax, %eax
	jne	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movl	-32(%rbp), %esi
	leal	-3(%rsi), %eax
	cmpl	$-3, %eax
	ja	LBB0_8
## %bb.12:
	leaq	L_.str.3(%rip), %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_printf
	xorl	%edi, %edi
	callq	_exit
LBB0_2:
	callq	_main.cold.1
LBB0_9:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	(%rsi), %rsi
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	movl	$-1, %edi
	callq	_exit
LBB0_11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_fprintf
	movl	$-1, %edi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function main.cold.1
_main.cold.1:                           ## @main.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	pushq	$-1
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Usage: %s <filebase>\n"

	.comm	_filebase,8,3                   ## @filebase
	.comm	_O_APPEND,4,2                   ## @O_APPEND
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_CREAT,4,2                    ## @O_CREAT
L_.str.1:                               ## @.str.1
	.asciz	"creating test file"

	.comm	_stderr,4,2                     ## @stderr
L_.str.2:                               ## @.str.2
	.asciz	"failed to set concurrency\n"

	.comm	_mover,4,2                      ## @mover
	.comm	_cleaner,4,2                    ## @cleaner
	.comm	_writer,4,2                     ## @writer
	.comm	_TRUE,8,3                       ## @TRUE
L_.str.3:                               ## @.str.3
	.asciz	"st.st_nlink = %d, exiting\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:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	cmp	w0, #1
	b.eq	LBB0_10
; %bb.1:
	ldr	x0, [x1, #8]
Lloh0:
	adrp	x19, _filebase@GOTPAGE
Lloh1:
	ldr	x19, [x19, _filebase@GOTPAGEOFF]
	str	x0, [x19]
Lloh2:
	adrp	x8, _O_APPEND@GOTPAGE
Lloh3:
	ldr	x8, [x8, _O_APPEND@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _O_CREAT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _O_CREAT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	orr	w1, w8, w9
	mov	w2, #420
	bl	_open
	stur	w0, [x29, #-20]
	tbnz	w0, #31, LBB0_11
; %bb.2:
	mov	w0, #4
	bl	_pthread_setconcurrency
	cbnz	x0, LBB0_12
; %bb.3:
Lloh11:
	adrp	x8, _mover@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mover@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	add	x0, sp, #24
	mov	x1, #0
	mov	x3, #0
	bl	_pthread_create
Lloh14:
	adrp	x8, _cleaner@GOTPAGE
Lloh15:
	ldr	x8, [x8, _cleaner@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	add	x0, sp, #24
	mov	x1, #0
	mov	x3, #0
	bl	_pthread_create
Lloh17:
	adrp	x8, _writer@GOTPAGE
Lloh18:
	ldr	x8, [x8, _writer@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	add	x0, sp, #24
	sub	x3, x29, #20
	mov	x1, #0
	bl	_pthread_create
Lloh20:
	adrp	x20, _TRUE@GOTPAGE
Lloh21:
	ldr	x20, [x20, _TRUE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	w0, #1
	bl	_sleep
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x19]
	add	x1, sp, #16
	bl	_stat
	cbnz	w0, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #16]
	sub	w9, w8, #3
	cmn	w9, #3
	b.hi	LBB0_4
; %bb.8:
	str	x8, [sp]
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_printf
	mov	w0, #0
	bl	_exit
LBB0_9:
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
LBB0_10:
	ldr	x8, [x1]
	str	x8, [sp]
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf
	mov	w0, #-1
	bl	_exit
LBB0_11:
	bl	_main.cold.1
LBB0_12:
Lloh26:
	adrp	x8, _stderr@GOTPAGE
Lloh27:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh28:
	ldr	w0, [x8]
Lloh29:
	adrp	x1, l_.str.2@PAGE
Lloh30:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	mov	w0, #-1
	bl	_exit
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function main.cold.1
_main.cold.1:                           ; @main.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh31:
	adrp	x0, l_.str.1@PAGE
Lloh32:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	mov	w0, #-1
	bl	_exit
	.loh AdrpAdd	Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Usage: %s <filebase>\n"

	.comm	_filebase,8,3                   ; @filebase
	.comm	_O_APPEND,4,2                   ; @O_APPEND
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_CREAT,4,2                    ; @O_CREAT
l_.str.1:                               ; @.str.1
	.asciz	"creating test file"

	.comm	_stderr,4,2                     ; @stderr
l_.str.2:                               ; @.str.2
	.asciz	"failed to set concurrency\n"

	.comm	_mover,4,2                      ; @mover
	.comm	_cleaner,4,2                    ; @cleaner
	.comm	_writer,4,2                     ; @writer
	.comm	_TRUE,8,3                       ; @TRUE
l_.str.3:                               ; @.str.3
	.asciz	"st.st_nlink = %d, exiting\n"

.subsections_via_symbols
