	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function linux_ptrace_getregs
_linux_ptrace_getregs:                  ## @linux_ptrace_getregs
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	_PT_GETREGS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-40(%rbp), %rcx
	movl	%r12d, %edx
	xorl	%r8d, %r8d
	callq	_kern_ptrace
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	leaq	-40(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_map_regs_to_linux
	movq	_PT_LWPINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-48(%rbp), %rcx
	movq	%r15, %rdi
	movl	%r12d, %edx
	movl	$4, %r8d
	callq	_kern_ptrace
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_linux_msg
	jmp	LBB0_6
LBB0_3:
	movq	_PL_FLAG_SCE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, -48(%rbp)
	je	LBB0_5
## %bb.4:
	movl	$-38, -64(%rbp)
	movl	-60(%rbp), %eax
	movl	%eax, -56(%rbp)
LBB0_5:
	leaq	-64(%rbp), %rdi
	movq	%r14, %rsi
	movl	$12, %edx
	callq	_copyout
	movl	%eax, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PT_GETREGS,4,2                 ## @PT_GETREGS
	.comm	_PT_LWPINFO,4,2                 ## @PT_LWPINFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PT_LWPINFO failed with error %d"

	.comm	_PL_FLAG_SCE,4,2                ## @PL_FLAG_SCE
	.no_dead_strip	_linux_ptrace_getregs
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function linux_ptrace_getregs
_linux_ptrace_getregs:                  ; @linux_ptrace_getregs
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x2
	mov	x21, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _PT_GETREGS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PT_GETREGS@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x3, sp, #16
	mov	x2, x21
	mov	w4, #0
	bl	_kern_ptrace
	mov	x22, x0
	cbnz	w0, LBB0_6
; %bb.1:
	add	x0, sp, #16
	mov	x1, sp
	bl	_map_regs_to_linux
Lloh3:
	adrp	x8, _PT_LWPINFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PT_LWPINFO@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x3, sp, #24
	mov	x0, x20
	mov	x2, x21
	mov	w4, #4
	bl	_kern_ptrace
	cbz	w0, LBB0_3
; %bb.2:
	mov	x22, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x2, x22
	bl	_linux_msg
	b	LBB0_6
LBB0_3:
	ldr	w8, [sp, #24]
Lloh8:
	adrp	x9, _PL_FLAG_SCE@GOTPAGE
Lloh9:
	ldr	x9, [x9, _PL_FLAG_SCE@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_5
; %bb.4:
	mov	w8, #-38
	ldr	w9, [sp, #4]
	str	w8, [sp]
	str	w9, [sp, #8]
LBB0_5:
	mov	x0, sp
	mov	x1, x19
	mov	w2, #12
	bl	_copyout
	mov	x22, x0
LBB0_6:
	mov	x0, x22
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_PT_GETREGS,4,2                 ; @PT_GETREGS
	.comm	_PT_LWPINFO,4,2                 ; @PT_LWPINFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PT_LWPINFO failed with error %d"

	.comm	_PL_FLAG_SCE,4,2                ; @PL_FLAG_SCE
	.no_dead_strip	_linux_ptrace_getregs
.subsections_via_symbols
