	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_attr_setdetachstate       ## -- Begin function _thr_attr_setdetachstate
	.p2align	4, 0x90
__thr_attr_setdetachstate:              ## @_thr_attr_setdetachstate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	(%rdi), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	movq	_PTHREAD_CREATE_DETACHED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cmpl	%esi, %ecx
	je	LBB0_5
## %bb.3:
	movq	_PTHREAD_CREATE_JOINABLE@GOTPCREL(%rip), %rdx
	cmpl	%esi, (%rdx)
	je	LBB0_5
LBB0_4:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
LBB0_5:
	movq	_PTHREAD_DETACHED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	cmpl	%esi, %ecx
	jne	LBB0_7
## %bb.6:
	orl	%edx, (%rax)
	jmp	LBB0_8
LBB0_7:
	notl	%edx
	andl	%edx, (%rax)
LBB0_8:
	xorl	%eax, %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PTHREAD_CREATE_DETACHED,4,2    ## @PTHREAD_CREATE_DETACHED
	.comm	_PTHREAD_CREATE_JOINABLE,4,2    ## @PTHREAD_CREATE_JOINABLE
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PTHREAD_DETACHED,4,2           ## @PTHREAD_DETACHED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	__thr_attr_setdetachstate       ; -- Begin function _thr_attr_setdetachstate
	.p2align	2
__thr_attr_setdetachstate:              ; @_thr_attr_setdetachstate
	.cfi_startproc
; %bb.0:
	cbz	x0, LBB0_5
; %bb.1:
	ldr	x8, [x0]
	cbz	x8, LBB0_5
; %bb.2:
Lloh0:
	adrp	x9, _PTHREAD_CREATE_DETACHED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PTHREAD_CREATE_DETACHED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
Lloh3:
	adrp	x10, _PTHREAD_CREATE_JOINABLE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PTHREAD_CREATE_JOINABLE@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	cmp	w9, w1
	ccmp	w10, w1, #4, ne
	b.ne	LBB0_5
; %bb.3:
Lloh6:
	adrp	x10, _PTHREAD_DETACHED@GOTPAGE
Lloh7:
	ldr	x10, [x10, _PTHREAD_DETACHED@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	cmp	w9, w1
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #0
	ldr	w9, [x8]
	orr	w9, w9, w10
	str	w9, [x8]
	ret
LBB0_5:
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ret
LBB0_6:
	mov	w0, #0
	ldr	w9, [x8]
	bic	w9, w9, w10
	str	w9, [x8]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_PTHREAD_CREATE_DETACHED,4,2    ; @PTHREAD_CREATE_DETACHED
	.comm	_PTHREAD_CREATE_JOINABLE,4,2    ; @PTHREAD_CREATE_JOINABLE
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PTHREAD_DETACHED,4,2           ; @PTHREAD_DETACHED
.subsections_via_symbols
