	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	$1, %edi
	callq	_pthread_setconcurrency
	movq	_NLOOPS@GOTPCREL(%rip), %rax
	leaq	L_str(%rip), %rdi
	cmpl	$0, (%rax)
	jle	LBB0_1
## %bb.4:
	movq	_stop@GOTPCREL(%rip), %r13
	movq	_wake@GOTPCREL(%rip), %r14
	movq	_m@GOTPCREL(%rip), %rbx
	xorl	%r15d, %r15d
	movl	$1, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	$0, (%r13)
	movl	$0, (%r14)
	movq	_thr_routine@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-44(%rbp), %rdi
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_pthread_create
	movl	$1, %edi
	callq	_sleep
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	%rbx, %rdi
	callq	_pthread_mutex_lock
	movl	$1, (%r14)
	movq	_cv@GOTPCREL(%rip), %rdi
	callq	_pthread_cond_signal
	movl	-44(%rbp), %edi
	callq	_pthread_cancel
	movq	%rbx, %rdi
	callq	_pthread_mutex_unlock
	movl	$1, (%r13)
	movq	$0, -56(%rbp)
	movl	-44(%rbp), %edi
	leaq	-56(%rbp), %rsi
	callq	_pthread_join
	movq	-56(%rbp), %rax
	movq	_PTHREAD_CANCELED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_5 Depth=1
	incl	%r15d
	movq	_NLOOPS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jl	LBB0_5
## %bb.3:
	xorl	%r12d, %r12d
	leaq	L_str(%rip), %rdi
	jmp	LBB0_7
LBB0_1:
	xorl	%r12d, %r12d
	jmp	LBB0_7
LBB0_6:
	leaq	L_str.3(%rip), %rdi
LBB0_7:
	callq	_puts
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NLOOPS,4,2                     ## @NLOOPS
	.comm	_stop,4,2                       ## @stop
	.comm	_wake,4,2                       ## @wake
	.comm	_thr_routine,4,2                ## @thr_routine
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"trying: %d\n"

	.comm	_m,4,2                          ## @m
	.comm	_cv,4,2                         ## @cv
	.comm	_PTHREAD_CANCELED,8,3           ## @PTHREAD_CANCELED
L_str:                                  ## @str
	.asciz	"OK"

L_str.3:                                ## @str.3
	.asciz	"the condition variable implementation does not\nconform to SUSv3, a thread unblocked from\ncondition variable still can be canceled."

.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, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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 w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	w0, #1
	bl	_pthread_setconcurrency
Lloh0:
	adrp	x24, _NLOOPS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _NLOOPS@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	w25, #0
Lloh2:
	adrp	x26, _stop@GOTPAGE
Lloh3:
	ldr	x26, [x26, _stop@GOTPAGEOFF]
Lloh4:
	adrp	x27, _wake@GOTPAGE
Lloh5:
	ldr	x27, [x27, _wake@GOTPAGEOFF]
Lloh6:
	adrp	x28, _thr_routine@GOTPAGE
Lloh7:
	ldr	x28, [x28, _thr_routine@GOTPAGEOFF]
Lloh8:
	adrp	x20, l_.str@PAGE
Lloh9:
	add	x20, x20, l_.str@PAGEOFF
Lloh10:
	adrp	x21, _m@GOTPAGE
Lloh11:
	ldr	x21, [x21, _m@GOTPAGEOFF]
Lloh12:
	adrp	x22, _cv@GOTPAGE
Lloh13:
	ldr	x22, [x22, _cv@GOTPAGEOFF]
Lloh14:
	adrp	x19, _PTHREAD_CANCELED@GOTPAGE
Lloh15:
	ldr	x19, [x19, _PTHREAD_CANCELED@GOTPAGEOFF]
	mov	w23, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	wzr, [x26]
	str	wzr, [x27]
	ldr	w2, [x28]
	add	x0, sp, #28
	mov	x1, #0
	mov	x3, #0
	bl	_pthread_create
	mov	w0, #1
	bl	_sleep
	str	x25, [sp]
	mov	x0, x20
	bl	_printf
	mov	x0, x21
	bl	_pthread_mutex_lock
	str	w23, [x27]
	mov	x0, x22
	bl	_pthread_cond_signal
	ldr	w0, [sp, #28]
	bl	_pthread_cancel
	mov	x0, x21
	bl	_pthread_mutex_unlock
	str	w23, [x26]
	str	xzr, [sp, #16]
	ldr	w0, [sp, #28]
	add	x1, sp, #16
	bl	_pthread_join
	ldr	x8, [sp, #16]
	ldr	x9, [x19]
	cmp	x8, x9
	b.eq	LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	w25, w25, #1
	ldr	w8, [x24]
	cmp	w25, w8
	b.lt	LBB0_2
LBB0_4:
	mov	w23, #0
Lloh16:
	adrp	x0, l_str@PAGE
Lloh17:
	add	x0, x0, l_str@PAGEOFF
	b	LBB0_6
LBB0_5:
Lloh18:
	adrp	x0, l_str.3@PAGE
Lloh19:
	add	x0, x0, l_str.3@PAGEOFF
LBB0_6:
	bl	_puts
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_NLOOPS,4,2                     ; @NLOOPS
	.comm	_stop,4,2                       ; @stop
	.comm	_wake,4,2                       ; @wake
	.comm	_thr_routine,4,2                ; @thr_routine
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"trying: %d\n"

	.comm	_m,4,2                          ; @m
	.comm	_cv,4,2                         ; @cv
	.comm	_PTHREAD_CANCELED,8,3           ; @PTHREAD_CANCELED
l_str:                                  ; @str
	.asciz	"OK"

l_str.3:                                ; @str.3
	.asciz	"the condition variable implementation does not\nconform to SUSv3, a thread unblocked from\ncondition variable still can be canceled."

.subsections_via_symbols
