	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function threadfunc2
_threadfunc2:                           ## @threadfunc2
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_pthread_self
	leaq	-28(%rbp), %r14
	movl	%eax, %edi
	movq	%r14, %rsi
	callq	_pthread_attr_get_np
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ATF_REQUIRE
	leaq	-24(%rbp), %rsi
	movq	%r14, %rdi
	callq	_pthread_attr_getstacksize
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ATF_REQUIRE
	movq	_STACKSIZE@GOTPCREL(%rip), %rax
	leaq	1(%rbx), %rcx
	imulq	(%rax), %rcx
	xorl	%edi, %edi
	cmpq	%rcx, -24(%rbp)
	sete	%dil
	callq	_ATF_REQUIRE
	movq	%r14, %rdi
	callq	_pthread_attr_destroy
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_ATF_REQUIRE
	movq	_threadfunc2.i(%rip), %rax
	leaq	1(%rax), %rdi
	movq	%rdi, _threadfunc2.i(%rip)
	cmpq	%rbx, %rax
	jne	LBB0_2
## %bb.1:
	movq	_error@GOTPCREL(%rip), %rax
	movl	$0, (%rax)
LBB0_2:
	callq	_pthread_exit
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_threadfunc2.i,8,3 ## @threadfunc2.i
	.comm	_STACKSIZE,8,3                  ## @STACKSIZE
	.comm	_error,4,2                      ## @error
	.no_dead_strip	_threadfunc2
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function threadfunc2
_threadfunc2:                           ; @threadfunc2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
	bl	_pthread_self
	add	x1, sp, #12
	bl	_pthread_attr_get_np
	cmp	x0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
	add	x0, sp, #12
	mov	x1, sp
	bl	_pthread_attr_getstacksize
	cmp	x0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
	ldr	x8, [sp]
Lloh0:
	adrp	x9, _STACKSIZE@GOTPAGE
Lloh1:
	ldr	x9, [x9, _STACKSIZE@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	madd	x9, x9, x19, x9
	cmp	x8, x9
	cset	w0, eq
	bl	_ATF_REQUIRE
	add	x0, sp, #12
	bl	_pthread_attr_destroy
	cmp	x0, #0
	cset	w0, eq
	bl	_ATF_REQUIRE
	adrp	x8, _threadfunc2.i@PAGE
	ldr	x9, [x8, _threadfunc2.i@PAGEOFF]
	add	x0, x9, #1
	str	x0, [x8, _threadfunc2.i@PAGEOFF]
	cmp	x9, x19
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _error@GOTPAGE
Lloh4:
	ldr	x8, [x8, _error@GOTPAGEOFF]
Lloh5:
	str	wzr, [x8]
LBB0_2:
	bl	_pthread_exit
	mov	x0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_threadfunc2.i,8,3 ; @threadfunc2.i
	.comm	_STACKSIZE,8,3                  ; @STACKSIZE
	.comm	_error,4,2                      ; @error
	.no_dead_strip	_threadfunc2
.subsections_via_symbols
