	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sighandler
_sighandler:                            ## @sighandler
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_pthread_self
	movq	%rax, %r15
	movq	_mainthread@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r15
	setne	%al
	movq	_SIGUSR1@GOTPCREL(%rip), %rcx
	cmpl	%r14d, (%rcx)
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	leaq	L_.str(%rip), %rsi
	callq	_ATF_REQUIRE_MSG
	movq	_NTHREAD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	movq	_th@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	(%rcx), %r15
	je	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	addq	$16, %rcx
	cmpq	%rbx, %rax
	jne	LBB0_2
## %bb.4:
	movl	%eax, %ebx
LBB0_5:
	xorl	%edi, %edi
	cmpl	%eax, %ebx
	setne	%dil
	leaq	L_.str.1(%rip), %rsi
	callq	_ATF_REQUIRE_MSG
	movq	_th@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	shlq	$4, %rcx
	incl	8(%rax,%rcx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mainthread,8,3                 ## @mainthread
	.comm	_SIGUSR1,4,2                    ## @SIGUSR1
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unexpected signal"

	.comm	_NTHREAD,4,2                    ## @NTHREAD
	.comm	_th,8,3                         ## @th
L_.str.1:                               ## @.str.1
	.asciz	"unknown thread"

	.no_dead_strip	_sighandler
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sighandler
_sighandler:                            ; @sighandler
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x20, x0
	bl	_pthread_self
	mov	x19, x0
Lloh0:
	adrp	x8, _mainthread@GOTPAGE
Lloh1:
	ldr	x8, [x8, _mainthread@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
Lloh3:
	adrp	x8, _SIGUSR1@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SIGUSR1@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ccmp	w8, w20, #0, ne
	cset	w0, eq
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	bl	_ATF_REQUIRE_MSG
Lloh8:
	adrp	x8, _NTHREAD@GOTPAGE
Lloh9:
	ldr	x8, [x8, _NTHREAD@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
Lloh11:
	adrp	x20, _th@GOTPAGE
Lloh12:
	ldr	x20, [x20, _th@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, #0
	ldr	x9, [x20]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cmp	x19, x10
	b.eq	LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	add	x21, x21, #1
	add	x9, x9, #16
	cmp	x8, x21
	b.ne	LBB0_2
; %bb.4:
	mov	x21, x8
	b	LBB0_6
LBB0_5:
	mov	w21, #0
LBB0_6:
	cmp	w21, w8
	cset	w0, ne
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_ATF_REQUIRE_MSG
	ldr	x8, [x20]
	add	x8, x8, w21, uxtw #4
	ldr	w9, [x8, #8]
	add	w9, w9, #1
	str	w9, [x8, #8]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_mainthread,8,3                 ; @mainthread
	.comm	_SIGUSR1,4,2                    ; @SIGUSR1
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unexpected signal"

	.comm	_NTHREAD,4,2                    ; @NTHREAD
	.comm	_th,8,3                         ; @th
l_.str.1:                               ; @.str.1
	.asciz	"unknown thread"

	.no_dead_strip	_sighandler
.subsections_via_symbols
