	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function respected_while_running_threadroutine
_respected_while_running_threadroutine: ## @respected_while_running_threadroutine
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%eax, %eax
	callq	_getpid
	movq	_SIGUSR1@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, %edi
	callq	_kill
	movl	$1, %edi
	callq	_sleep
	movq	_flag@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	$2, %esi
	jne	LBB0_2
## %bb.1:
	leaq	L_str.4(%rip), %rdi
	jmp	LBB0_7
LBB0_2:
	movq	_flag2@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_thr_usr1@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_thr_usr2@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	cmpl	$1, %esi
	jne	LBB0_5
## %bb.3:
	cmpl	$1, %edx
	jne	LBB0_5
## %bb.4:
	cmpq	%r8, %rcx
	movq	%rcx, %r8
	jne	LBB0_6
LBB0_5:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_printf
	leaq	L_.str.3(%rip), %rdi
	callq	_atf_tc_fail
	jmp	LBB0_8
LBB0_6:
	leaq	L_str(%rip), %rdi
LBB0_7:
	callq	_puts
LBB0_8:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.comm	_flag,4,2                       ## @flag
	.comm	_flag2,4,2                      ## @flag2
	.comm	_thr_usr1,8,3                   ## @thr_usr1
	.comm	_thr_usr2,8,3                   ## @thr_usr2
	.section	__TEXT,__cstring,cstring_literals
L_.str.2:                               ## @.str.2
	.asciz	"Failure: flag=%d, flag2=%d, thr1=%p, thr2=%p\n"

L_.str.3:                               ## @.str.3
	.asciz	"failure"

L_str:                                  ## @str
	.asciz	"Success: Handlers were invoked by different threads"

L_str.4:                                ## @str.4
	.asciz	"Success: Both handlers ran in order"

	.no_dead_strip	_respected_while_running_threadroutine
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function respected_while_running_threadroutine
_respected_while_running_threadroutine: ; @respected_while_running_threadroutine
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	bl	_getpid
Lloh0:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_kill
	mov	w0, #1
	bl	_sleep
Lloh3:
	adrp	x8, _flag@GOTPAGE
Lloh4:
	ldr	x8, [x8, _flag@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, #2
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x0, l_str.4@PAGE
Lloh7:
	add	x0, x0, l_str.4@PAGEOFF
	b	LBB0_6
LBB0_2:
Lloh8:
	adrp	x9, _flag2@GOTPAGE
Lloh9:
	ldr	x9, [x9, _flag2@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _thr_usr1@GOTPAGE
Lloh12:
	ldr	x10, [x10, _thr_usr1@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
Lloh14:
	adrp	x11, _thr_usr2@GOTPAGE
Lloh15:
	ldr	x11, [x11, _thr_usr2@GOTPAGEOFF]
Lloh16:
	ldr	x11, [x11]
	cmp	w8, #1
	ccmp	w9, #1, #0, eq
	b.ne	LBB0_4
; %bb.3:
	cmp	x10, x11
	mov	x11, x10
	b.ne	LBB0_5
LBB0_4:
	stp	x10, x11, [sp, #16]
	stp	x8, x9, [sp]
Lloh17:
	adrp	x0, l_.str.2@PAGE
Lloh18:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_printf
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_atf_tc_fail
	b	LBB0_7
LBB0_5:
Lloh21:
	adrp	x0, l_str@PAGE
Lloh22:
	add	x0, x0, l_str@PAGEOFF
LBB0_6:
	bl	_puts
LBB0_7:
	mov	x0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.comm	_flag,4,2                       ; @flag
	.comm	_flag2,4,2                      ; @flag2
	.comm	_thr_usr1,8,3                   ; @thr_usr1
	.comm	_thr_usr2,8,3                   ; @thr_usr2
	.section	__TEXT,__cstring,cstring_literals
l_.str.2:                               ; @.str.2
	.asciz	"Failure: flag=%d, flag2=%d, thr1=%p, thr2=%p\n"

l_.str.3:                               ; @.str.3
	.asciz	"failure"

l_str:                                  ; @str
	.asciz	"Success: Handlers were invoked by different threads"

l_str.4:                                ; @str.4
	.asciz	"Success: Both handlers ran in order"

	.no_dead_strip	_respected_while_running_threadroutine
.subsections_via_symbols
