	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function pt_ta_event_getmsg
_pt_ta_event_getmsg:                    ## @pt_ta_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	%r14
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	xorl	%eax, %eax
	callq	_TDBG_FUNC
	movl	20(%rbx), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_thr_pread_ptr
	testl	%eax, %eax
	je	LBB0_2
LBB0_1:
	movq	_TD_ERR@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_2:
	cmpq	$0, -24(%rbp)
	je	LBB0_8
## %bb.3:
	movl	20(%rbx), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_thr_pwrite_ptr
	movl	16(%rbx), %edi
	movq	(%rbx), %rsi
	addq	-24(%rbp), %rsi
	movq	%r14, %rdx
	movl	$16, %ecx
	callq	_ps_pread
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movl	%eax, %edi
	callq	_P2T
	jmp	LBB0_10
LBB0_5:
	cmpq	$0, (%r14)
	je	LBB0_8
## %bb.6:
	movq	$0, -40(%rbp)
	movl	16(%rbx), %edi
	movq	(%rbx), %rsi
	addq	-24(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	movl	$8, %ecx
	callq	_ps_pwrite
	movq	8(%r14), %rsi
	movq	%rsi, -24(%rbp)
	addq	8(%rbx), %rsi
	leaq	-28(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_thr_pread_long
	testl	%eax, %eax
	jne	LBB0_1
## %bb.7:
	movq	%rbx, _pt_ta_event_getmsg.handle+16(%rip)
	leaq	_pt_ta_event_getmsg.handle(%rip), %rax
	movl	-28(%rbp), %ecx
	movl	%ecx, _pt_ta_event_getmsg.handle+8(%rip)
	movq	-24(%rbp), %rcx
	movq	%rcx, _pt_ta_event_getmsg.handle(%rip)
	movq	%rax, 8(%r14)
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_8:
	movq	_TD_NOMSG@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	addq	$32, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_pt_ta_event_getmsg.handle,24,3 ## @pt_ta_event_getmsg.handle
	.comm	_TD_ERR,4,2                     ## @TD_ERR
	.comm	_TD_NOMSG,4,2                   ## @TD_NOMSG
	.no_dead_strip	_pt_ta_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_ta_event_getmsg
_pt_ta_event_getmsg:                    ; @pt_ta_event_getmsg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
	mov	x20, x0
	bl	_TDBG_FUNC
	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]
	b	LBB0_9
LBB0_2:
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_8
; %bb.3:
	ldr	w1, [x20, #20]
	mov	x0, x20
	mov	w2, #0
	bl	_thr_pwrite_ptr
	ldr	w0, [x20, #16]
	ldr	x8, [sp, #24]
	ldr	x9, [x20]
	add	x1, x9, x8
	mov	x2, x19
	mov	w3, #16
	bl	_ps_pread
	cbz	w0, LBB0_5
; %bb.4:
	bl	_P2T
	b	LBB0_10
LBB0_5:
	ldr	x8, [x19]
	cbz	x8, LBB0_8
; %bb.6:
	str	xzr, [sp, #16]
	ldr	w0, [x20, #16]
	ldr	x8, [sp, #24]
	ldr	x9, [x20]
	add	x1, x9, x8
	add	x2, sp, #16
	mov	w3, #8
	bl	_ps_pwrite
	ldr	x8, [x19, #8]
	str	x8, [sp, #24]
	ldr	x9, [x20, #8]
	add	x1, x9, x8
	add	x2, sp, #12
	mov	x0, x20
	bl	_thr_pread_long
	cbnz	w0, LBB0_1
; %bb.7:
Lloh2:
	adrp	x8, _pt_ta_event_getmsg.handle@PAGE
Lloh3:
	add	x8, x8, _pt_ta_event_getmsg.handle@PAGEOFF
	str	x20, [x8, #16]
	ldr	w9, [sp, #12]
	str	w9, [x8, #8]
	ldr	x9, [sp, #24]
	str	x9, [x8]
	str	x8, [x19, #8]
	b	LBB0_10
LBB0_8:
Lloh4:
	adrp	x8, _TD_NOMSG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _TD_NOMSG@GOTPAGEOFF]
LBB0_9:
	ldr	w0, [x8]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_pt_ta_event_getmsg.handle,24,3 ; @pt_ta_event_getmsg.handle
	.comm	_TD_ERR,4,2                     ; @TD_ERR
	.comm	_TD_NOMSG,4,2                   ; @TD_NOMSG
	.no_dead_strip	_pt_ta_event_getmsg
.subsections_via_symbols
