	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_thread_data                ## -- Begin function get_thread_data
	.p2align	4, 0x90
_get_thread_data:                       ## @get_thread_data
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_getpid
	movq	%rax, %r15
	movl	(%r14), %edi
	callq	_pthread_getspecific
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %rbx
	cmpq	%r15, (%rax)
	je	LBB0_17
## %bb.2:
	movl	8(%rbx), %edi
	callq	_close
	jmp	LBB0_5
LBB0_3:
	movl	$16, %edi
	callq	_malloc
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_5
## %bb.4:
	leaq	L_.str(%rip), %rdi
	callq	_dief
	xorl	%ebx, %ebx
LBB0_5:
	movq	%r15, (%rbx)
	movq	_PF_UNIX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	%eax, 8(%rbx)
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.6:
	leaq	L_.str.1(%rip), %rdi
	callq	_dief
	movl	8(%rbx), %eax
LBB0_7:
	movl	%eax, %edi
	callq	_set_cloexec
	leaq	8(%r14), %r15
	movl	8(%rbx), %edi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_connect
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	_errno@GOTPCREL(%rip), %r13
	movq	_EINTR@GOTPCREL(%rip), %r12
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movl	8(%rbx), %edi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_connect
	testq	%rax, %rax
	je	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	cmpq	(%r12), %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	leaq	L_.str.2(%rip), %rdi
	callq	_dief
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movl	8(%rbx), %edi
	movl	4(%r14), %esi
	movl	$4, %edx
	callq	_write
	cmpl	$-1, %eax
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	_errno@GOTPCREL(%rip), %rcx
	movq	_EINTR@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rdx, (%rcx)
	je	LBB0_12
LBB0_14:
	cmpl	$4, %eax
	je	LBB0_16
## %bb.15:
	leaq	L_.str.3(%rip), %rdi
	callq	_dief
LBB0_16:
	movl	(%r14), %edi
	movq	%rbx, %rsi
	callq	_pthread_setspecific
LBB0_17:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc failed"

	.comm	_PF_UNIX,4,2                    ## @PF_UNIX
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
L_.str.1:                               ## @.str.1
	.asciz	"socket(2) failed"

	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
L_.str.2:                               ## @.str.2
	.asciz	"failed to connect to privsep daemon"

L_.str.3:                               ## @.str.3
	.asciz	"failed to send authentication token"

	.comm	_SOCK_CLOEXEC,4,2               ## @SOCK_CLOEXEC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_thread_data                ; -- Begin function get_thread_data
	.p2align	2
_get_thread_data:                       ; @get_thread_data
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	bl	_getpid
	mov	x21, x0
	ldr	w0, [x19]
	bl	_pthread_getspecific
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x8, [x0]
	cmp	x8, x21
	b.eq	LBB0_16
; %bb.2:
	ldr	w0, [x20, #8]
	bl	_close
	b	LBB0_5
LBB0_3:
	mov	w0, #16
	bl	_malloc
	mov	x20, x0
	cbnz	x0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_dief
LBB0_5:
	str	x21, [x20]
Lloh2:
	adrp	x8, _PF_UNIX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _PF_UNIX@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	str	w0, [x20, #8]
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.6:
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_dief
	ldr	w0, [x20, #8]
LBB0_7:
	bl	_set_cloexec
	add	x21, x19, #8
	ldr	w0, [x20, #8]
	mov	x1, x21
	mov	w2, #4
	bl	_connect
	cbz	x0, LBB0_12
; %bb.8:
Lloh10:
	adrp	x23, _errno@GOTPAGE
Lloh11:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
Lloh12:
	adrp	x24, _EINTR@GOTPAGE
Lloh13:
	ldr	x24, [x24, _EINTR@GOTPAGEOFF]
Lloh14:
	adrp	x22, l_.str.2@PAGE
Lloh15:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w0, [x20, #8]
	mov	x1, x21
	mov	w2, #4
	bl	_connect
	cbz	x0, LBB0_12
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	ldr	x9, [x24]
	cmp	x8, x9
	b.eq	LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	x0, x22
	bl	_dief
	b	LBB0_9
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x20, #8]
	ldr	w1, [x19, #4]
	mov	w2, #4
	bl	_write
Lloh16:
	adrp	x8, _errno@GOTPAGE
Lloh17:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh18:
	ldr	x8, [x8]
Lloh19:
	adrp	x9, _EINTR@GOTPAGE
Lloh20:
	ldr	x9, [x9, _EINTR@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmn	w0, #1
	ccmp	x8, x9, #0, eq
	b.eq	LBB0_12
; %bb.13:
	cmp	w0, #4
	b.eq	LBB0_15
; %bb.14:
Lloh22:
	adrp	x0, l_.str.3@PAGE
Lloh23:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_dief
LBB0_15:
	ldr	w0, [x19]
	mov	x1, x20
	bl	_pthread_setspecific
LBB0_16:
	mov	x0, x20
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc failed"

	.comm	_PF_UNIX,4,2                    ; @PF_UNIX
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
l_.str.1:                               ; @.str.1
	.asciz	"socket(2) failed"

	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
l_.str.2:                               ; @.str.2
	.asciz	"failed to connect to privsep daemon"

l_.str.3:                               ; @.str.3
	.asciz	"failed to send authentication token"

	.comm	_SOCK_CLOEXEC,4,2               ; @SOCK_CLOEXEC
.subsections_via_symbols
