	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lin_lwp_attach_lwp             ## -- Begin function lin_lwp_attach_lwp
	.p2align	4, 0x90
_lin_lwp_attach_lwp:                    ## @lin_lwp_attach_lwp
	.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
	movl	%esi, %r14d
	movl	%edi, %r13d
	callq	_is_lwp
	movl	%eax, %edi
	callq	_gdb_assert
	movq	_SIGCHLD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_blocked_mask@GOTPCREL(%rip), %rdi
	callq	_sigismember
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	testl	%r14d, %r14d
	je	LBB0_4
LBB0_3:
	movl	%r13d, %edi
	callq	_target_pid_to_str
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_printf_filtered
LBB0_4:
	movl	%r13d, %edi
	callq	_find_lwp_pid
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movl	%r13d, %edi
	callq	_add_lwp
	movq	%rax, %r14
LBB0_6:
	movl	%r13d, %edi
	callq	_GET_LWP
	movl	%eax, %ebx
	movl	%r13d, %edi
	callq	_GET_PID
	cmpl	%eax, %ebx
	jne	LBB0_7
## %bb.19:
	movl	$1, 4(%r14)
	jmp	LBB0_20
LBB0_7:
	movq	_PTRACE_ATTACH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_GET_LWP
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ptrace
	testq	%rax, %rax
	jns	LBB0_9
## %bb.8:
	movl	%r13d, %edi
	callq	_target_pid_to_str
	movl	%eax, %ebx
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	callq	_safe_strerror
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	movq	%rax, %rdx
	callq	_error
LBB0_9:
	movq	_debug_lin_lwp@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	je	LBB0_11
## %bb.10:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movq	%rbx, %r15
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_target_pid_to_str
	leaq	L_.str.2(%rip), %rsi
	movl	%ebx, %edi
	movq	%r15, %rbx
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_fprintf_unfiltered
LBB0_11:
	movl	%r13d, %edi
	callq	_GET_LWP
	leaq	-44(%rbp), %rsi
	xorl	%r15d, %r15d
	movl	%eax, %edi
	xorl	%edx, %edx
	callq	_waitpid
	movl	%eax, %r12d
	cmpl	$-1, %eax
	jne	LBB0_14
## %bb.12:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_ECHILD@GOTPCREL(%rip), %rcx
	movl	$-1, %r12d
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.13:
	movl	%r13d, %edi
	callq	_GET_LWP
	movq	___WCLONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	leaq	-44(%rbp), %rsi
	movl	%eax, %edi
	callq	_waitpid
	movl	%eax, %r12d
	movl	$1, (%r14)
LBB0_14:
	movl	%r13d, %edi
	callq	_GET_LWP
	cmpl	%eax, %r12d
	jne	LBB0_17
## %bb.15:
	movl	-44(%rbp), %edi
	callq	_WIFSTOPPED
	testq	%rax, %rax
	je	LBB0_17
## %bb.16:
	movl	-44(%rbp), %edi
	callq	_WSTOPSIG
	xorl	%r15d, %r15d
	testq	%rax, %rax
	setne	%r15b
LBB0_17:
	movl	%r15d, %edi
	callq	_gdb_assert
	movl	%r12d, %edi
	callq	_child_post_attach
	movl	$1, 4(%r14)
	cmpq	$0, (%rbx)
	je	LBB0_20
## %bb.18:
	movq	_gdb_stdlog@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	%r13d, %edi
	callq	_target_pid_to_str
	movl	%eax, %ebx
	movl	-44(%rbp), %edi
	callq	_status_to_str
	leaq	L_.str.3(%rip), %rsi
	movl	%r14d, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_fprintf_unfiltered
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	(%rbx), %esi
	movq	_blocked_mask@GOTPCREL(%rip), %r15
	movq	%r15, %rdi
	callq	_sigaddset
	movq	_SIG_BLOCK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_sigprocmask
	testl	%r14d, %r14d
	jne	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_blocked_mask,4,2               ## @blocked_mask
	.comm	_SIGCHLD,4,2                    ## @SIGCHLD
	.comm	_SIG_BLOCK,4,2                  ## @SIG_BLOCK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"[New %s]\n"

	.comm	_PTRACE_ATTACH,4,2              ## @PTRACE_ATTACH
L_.str.1:                               ## @.str.1
	.asciz	"Can't attach %s: %s"

	.comm	_errno,8,3                      ## @errno
	.comm	_debug_lin_lwp,8,3              ## @debug_lin_lwp
	.comm	_gdb_stdlog,4,2                 ## @gdb_stdlog
L_.str.2:                               ## @.str.2
	.asciz	"LLAL: PTRACE_ATTACH %s, 0, 0 (OK)\n"

	.comm	_ECHILD,8,3                     ## @ECHILD
	.comm	___WCLONE,4,2                   ## @__WCLONE
L_.str.3:                               ## @.str.3
	.asciz	"LLAL: waitpid %s received %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lin_lwp_attach_lwp             ; -- Begin function lin_lwp_attach_lwp
	.p2align	2
_lin_lwp_attach_lwp:                    ; @lin_lwp_attach_lwp
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x1
	mov	x19, x0
	bl	_is_lwp
	bl	_gdb_assert
Lloh0:
	adrp	x21, _SIGCHLD@GOTPAGE
Lloh1:
	ldr	x21, [x21, _SIGCHLD@GOTPAGEOFF]
	ldr	w1, [x21]
Lloh2:
	adrp	x0, _blocked_mask@GOTPAGE
Lloh3:
	ldr	x0, [x0, _blocked_mask@GOTPAGEOFF]
	bl	_sigismember
	cbz	w0, LBB0_14
; %bb.1:
	cbz	w20, LBB0_3
LBB0_2:
	mov	x0, x19
	bl	_target_pid_to_str
	mov	x1, x0
Lloh4:
	adrp	x0, l_.str@PAGE
Lloh5:
	add	x0, x0, l_.str@PAGEOFF
	bl	_printf_filtered
LBB0_3:
	mov	x0, x19
	bl	_find_lwp_pid
	mov	x20, x0
	cbnz	x0, LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_add_lwp
	mov	x20, x0
LBB0_5:
	mov	x0, x19
	bl	_GET_LWP
	mov	x21, x0
	mov	x0, x19
	bl	_GET_PID
	cmp	w21, w0
	b.ne	LBB0_7
; %bb.6:
	mov	w8, #1
	str	w8, [x20, #4]
	b	LBB0_22
LBB0_7:
Lloh6:
	adrp	x8, _PTRACE_ATTACH@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PTRACE_ATTACH@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_GET_LWP
	mov	x1, x0
	mov	x0, x21
	mov	w2, #0
	mov	w3, #0
	bl	_ptrace
	tbz	x0, #63, LBB0_9
; %bb.8:
	mov	x0, x19
	bl	_target_pid_to_str
	mov	x21, x0
Lloh9:
	adrp	x8, _errno@GOTPAGE
Lloh10:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh11:
	ldr	x0, [x8]
	bl	_safe_strerror
	mov	x2, x0
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_error
LBB0_9:
Lloh14:
	adrp	x23, _debug_lin_lwp@GOTPAGE
Lloh15:
	ldr	x23, [x23, _debug_lin_lwp@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh16:
	adrp	x22, _gdb_stdlog@GOTPAGE
Lloh17:
	ldr	x22, [x22, _gdb_stdlog@GOTPAGEOFF]
	cbz	x8, LBB0_11
; %bb.10:
	ldr	w21, [x22]
	mov	x0, x19
	bl	_target_pid_to_str
	mov	x2, x0
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_fprintf_unfiltered
LBB0_11:
	mov	x0, x19
	bl	_GET_LWP
	add	x1, sp, #12
	mov	w2, #0
	bl	_waitpid
	mov	x21, x0
	cmn	w0, #1
	b.ne	LBB0_16
; %bb.12:
Lloh20:
	adrp	x8, _errno@GOTPAGE
Lloh21:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
Lloh23:
	adrp	x9, _ECHILD@GOTPAGE
Lloh24:
	ldr	x9, [x9, _ECHILD@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_15
; %bb.13:
	mov	x0, x19
	bl	_GET_LWP
Lloh26:
	adrp	x8, ___WCLONE@GOTPAGE
Lloh27:
	ldr	x8, [x8, ___WCLONE@GOTPAGEOFF]
Lloh28:
	ldr	w2, [x8]
	add	x1, sp, #12
	bl	_waitpid
	mov	x21, x0
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_16
LBB0_14:
	ldr	w1, [x21]
Lloh29:
	adrp	x21, _blocked_mask@GOTPAGE
Lloh30:
	ldr	x21, [x21, _blocked_mask@GOTPAGEOFF]
	mov	x0, x21
	bl	_sigaddset
Lloh31:
	adrp	x8, _SIG_BLOCK@GOTPAGE
Lloh32:
	ldr	x8, [x8, _SIG_BLOCK@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	mov	x1, x21
	mov	x2, #0
	bl	_sigprocmask
	cbnz	w20, LBB0_2
	b	LBB0_3
LBB0_15:
	mov	w21, #-1
LBB0_16:
	mov	x0, x19
	bl	_GET_LWP
	cmp	w21, w0
	b.ne	LBB0_19
; %bb.17:
	ldr	w0, [sp, #12]
	bl	_WIFSTOPPED
	cbz	x0, LBB0_20
; %bb.18:
	ldr	w0, [sp, #12]
	bl	_WSTOPSIG
	cmp	x0, #0
	cset	w0, ne
	b	LBB0_20
LBB0_19:
	mov	w0, #0
LBB0_20:
	bl	_gdb_assert
	mov	x0, x21
	bl	_child_post_attach
	mov	w8, #1
	str	w8, [x20, #4]
	ldr	x8, [x23]
	cbz	x8, LBB0_22
; %bb.21:
	ldr	w20, [x22]
	mov	x0, x19
	bl	_target_pid_to_str
	mov	x19, x0
	ldr	w0, [sp, #12]
	bl	_status_to_str
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh34:
	adrp	x1, l_.str.3@PAGE
Lloh35:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_fprintf_unfiltered
LBB0_22:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_blocked_mask,4,2               ; @blocked_mask
	.comm	_SIGCHLD,4,2                    ; @SIGCHLD
	.comm	_SIG_BLOCK,4,2                  ; @SIG_BLOCK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"[New %s]\n"

	.comm	_PTRACE_ATTACH,4,2              ; @PTRACE_ATTACH
l_.str.1:                               ; @.str.1
	.asciz	"Can't attach %s: %s"

	.comm	_errno,8,3                      ; @errno
	.comm	_debug_lin_lwp,8,3              ; @debug_lin_lwp
	.comm	_gdb_stdlog,4,2                 ; @gdb_stdlog
l_.str.2:                               ; @.str.2
	.asciz	"LLAL: PTRACE_ATTACH %s, 0, 0 (OK)\n"

	.comm	_ECHILD,8,3                     ; @ECHILD
	.comm	___WCLONE,4,2                   ; @__WCLONE
l_.str.3:                               ; @.str.3
	.asciz	"LLAL: waitpid %s received %s\n"

.subsections_via_symbols
