	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pt_thr_event_getmsg
_pt_thr_event_getmsg:                   ## @pt_thr_event_getmsg
	.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	%rsi, %r14
	movq	%rdi, %rbx
	movq	16(%rdi), %r12
	xorl	%eax, %eax
	callq	_TDBG_FUNC
	movq	(%rbx), %r15
	movl	20(%r12), %esi
	leaq	-56(%rbp), %rdx
	movq	%r12, %rdi
	callq	_thr_pread_ptr
	testl	%eax, %eax
	je	LBB0_2
LBB0_1:
	movq	_TD_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
LBB0_2:
	movl	16(%r12), %edi
	movq	(%r12), %rsi
	addq	%r15, %rsi
	movq	%r14, %rdx
	movl	$16, %ecx
	callq	_ps_pread
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %edi
	callq	_P2T
LBB0_10:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	cmpq	$0, (%r14)
	je	LBB0_5
## %bb.6:
	cmpq	-56(%rbp), %r15
	jne	LBB0_8
## %bb.7:
	movl	20(%r12), %esi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_thr_pwrite_ptr
LBB0_8:
	movq	$0, -48(%rbp)
	movl	16(%r12), %edi
	addq	(%r12), %r15
	leaq	-48(%rbp), %rdx
	movq	%r15, %rsi
	movl	$8, %ecx
	callq	_ps_pwrite
	movq	8(%r14), %rbx
	movq	8(%r12), %rsi
	addq	%rbx, %rsi
	leaq	-36(%rbp), %rdx
	movq	%r12, %rdi
	callq	_thr_pread_long
	testl	%eax, %eax
	jne	LBB0_1
## %bb.9:
	movq	%r12, _pt_thr_event_getmsg.handle+16(%rip)
	leaq	_pt_thr_event_getmsg.handle(%rip), %rax
	movl	-36(%rbp), %ecx
	movl	%ecx, _pt_thr_event_getmsg.handle+8(%rip)
	movq	%rbx, _pt_thr_event_getmsg.handle(%rip)
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_5:
	movq	_TD_NOMSG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_pt_thr_event_getmsg.handle,24,3 ## @pt_thr_event_getmsg.handle
	.comm	_TD_ERR,4,2                     ## @TD_ERR
	.comm	_TD_NOMSG,4,2                   ## @TD_NOMSG
	.no_dead_strip	_pt_thr_event_getmsg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function pt_thr_event_getmsg
_pt_thr_event_getmsg:                   ; @pt_thr_event_getmsg
	.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, x1
	mov	x21, x0
	ldr	x20, [x0, #16]
	bl	_TDBG_FUNC
	ldr	x21, [x21]
	ldr	w1, [x20, #20]
	add	x2, sp, #24
	mov	x0, x20
	bl	_thr_pread_ptr
	cbz	w0, LBB0_2
LBB0_1:
Lloh0:
	adrp	x8, _TD_ERR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TD_ERR@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	b	LBB0_4
LBB0_2:
	ldr	w0, [x20, #16]
	ldr	x8, [x20]
	add	x1, x8, x21
	mov	x2, x19
	mov	w3, #16
	bl	_ps_pread
	cbz	w0, LBB0_5
; %bb.3:
	bl	_P2T
LBB0_4:
	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
LBB0_5:
	ldr	x8, [x19]
	cbz	x8, LBB0_10
; %bb.6:
	ldr	x8, [sp, #24]
	cmp	x21, x8
	b.ne	LBB0_8
; %bb.7:
	ldr	w1, [x20, #20]
	mov	x0, x20
	mov	w2, #0
	bl	_thr_pwrite_ptr
LBB0_8:
	str	xzr, [sp, #8]
	ldr	w0, [x20, #16]
	ldr	x8, [x20]
	add	x1, x8, x21
	add	x2, sp, #8
	mov	w3, #8
	bl	_ps_pwrite
	ldr	x21, [x19, #8]
	ldr	x8, [x20, #8]
	add	x1, x8, x21
	add	x2, sp, #20
	mov	x0, x20
	bl	_thr_pread_long
	cbnz	w0, LBB0_1
; %bb.9:
Lloh3:
	adrp	x8, _pt_thr_event_getmsg.handle@PAGE
Lloh4:
	add	x8, x8, _pt_thr_event_getmsg.handle@PAGEOFF
	str	x20, [x8, #16]
	ldr	w9, [sp, #20]
	str	w9, [x8, #8]
	str	x21, [x8]
	str	x8, [x19, #8]
	b	LBB0_4
LBB0_10:
Lloh5:
	adrp	x8, _TD_NOMSG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _TD_NOMSG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_pt_thr_event_getmsg.handle,24,3 ; @pt_thr_event_getmsg.handle
	.comm	_TD_ERR,4,2                     ; @TD_ERR
	.comm	_TD_NOMSG,4,2                   ; @TD_NOMSG
	.no_dead_strip	_pt_thr_event_getmsg
.subsections_via_symbols
