	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmclog_read                    ## -- Begin function pmclog_read
	.p2align	4, 0x90
_pmclog_read:                           ## @pmclog_read
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	(%rdi), %rax
	movq	_PL_STATE_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
LBB0_1:
	movq	_PMCLOG_ERROR@GOTPCREL(%rip), %rax
LBB0_7:
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movl	$-1, %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	%rdi, %rbx
	leaq	8(%rdi), %r15
	movq	8(%rdi), %rax
	testq	%rax, %rax
	jne	LBB0_11
## %bb.3:
	movq	_PMCLOG_REQUIRE_DATA@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
	movl	16(%rbx), %edi
	movq	_PMCLOG_FD_NONE@GOTPCREL(%rip), %rcx
	movl	$-1, %eax
	cmpl	(%rcx), %edi
	je	LBB0_9
LBB0_4:
	movl	24(%rbx), %esi
	movq	_PMCLOG_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_read
	testq	%rax, %rax
	jle	LBB0_5
## %bb.10:
	movq	%rax, 8(%rbx)
	movl	24(%rbx), %ecx
	movl	%ecx, 20(%rbx)
LBB0_11:
	xorl	%edi, %edi
	testq	%rax, %rax
	setg	%dil
	callq	_assert
	leaq	20(%rbx), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	movq	%r14, %rcx
	callq	_pmclog_get_event
	testl	%eax, %eax
	jns	LBB0_9
## %bb.12:
	movq	(%r14), %rcx
	movq	_PMCLOG_REQUIRE_DATA@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_9
## %bb.13:
	cmpl	$-1, 16(%rbx)
	je	LBB0_9
## %bb.14:
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	sete	%dil
	callq	_assert
	movl	16(%rbx), %edi
	jmp	LBB0_4
LBB0_5:
	je	LBB0_6
## %bb.8:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	_EAGAIN@GOTPCREL(%rip), %rdx
	movl	$-1, %eax
	cmpq	(%rdx), %rcx
	jne	LBB0_1
	jmp	LBB0_9
LBB0_6:
	movq	_PMCLOG_EOF@GOTPCREL(%rip), %rax
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_PL_STATE_ERROR,8,3             ## @PL_STATE_ERROR
	.comm	_PMCLOG_ERROR,8,3               ## @PMCLOG_ERROR
	.comm	_PMCLOG_REQUIRE_DATA,8,3        ## @PMCLOG_REQUIRE_DATA
	.comm	_PMCLOG_FD_NONE,4,2             ## @PMCLOG_FD_NONE
	.comm	_PMCLOG_BUFFER_SIZE,4,2         ## @PMCLOG_BUFFER_SIZE
	.comm	_PMCLOG_EOF,8,3                 ## @PMCLOG_EOF
	.comm	_errno,8,3                      ## @errno
	.comm	_EAGAIN,8,3                     ## @EAGAIN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pmclog_read                    ; -- Begin function pmclog_read
	.p2align	2
_pmclog_read:                           ; @pmclog_read
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PL_STATE_ERROR@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PL_STATE_ERROR@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
LBB0_1:
Lloh3:
	adrp	x8, _PMCLOG_ERROR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PMCLOG_ERROR@GOTPAGEOFF]
LBB0_2:
	ldr	x8, [x8]
	str	x8, [x19]
LBB0_3:
	mov	w0, #-1
LBB0_4:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_5:
	mov	x20, x0
	mov	x21, x0
	ldr	x0, [x21, #8]!
Lloh5:
	adrp	x22, _PMCLOG_REQUIRE_DATA@GOTPAGE
Lloh6:
	ldr	x22, [x22, _PMCLOG_REQUIRE_DATA@GOTPAGEOFF]
	cbnz	x0, LBB0_9
; %bb.6:
	ldr	x8, [x22]
	str	x8, [x19]
	ldr	w0, [x20, #16]
Lloh7:
	adrp	x8, _PMCLOG_FD_NONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _PMCLOG_FD_NONE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_3
LBB0_7:
	ldr	w1, [x20, #24]
Lloh10:
	adrp	x8, _PMCLOG_BUFFER_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _PMCLOG_BUFFER_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w2, [x8]
	bl	_read
	cmp	x0, #0
	b.le	LBB0_13
; %bb.8:
	str	x0, [x20, #8]
	ldr	w8, [x20, #24]
	str	w8, [x20, #20]
LBB0_9:
	cmp	x0, #0
	cset	w0, gt
	bl	_assert
	add	x1, x20, #20
	mov	x0, x20
	mov	x2, x21
	mov	x3, x19
	bl	_pmclog_get_event
	tbz	w0, #31, LBB0_4
; %bb.10:
	ldr	x8, [x19]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.11:
	ldr	w8, [x20, #16]
	cmn	w8, #1
	b.eq	LBB0_4
; %bb.12:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	cset	w0, eq
	bl	_assert
	ldr	w0, [x20, #16]
	b	LBB0_7
LBB0_13:
	cbz	x0, LBB0_15
; %bb.14:
Lloh13:
	adrp	x8, _errno@GOTPAGE
Lloh14:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
Lloh16:
	adrp	x9, _EAGAIN@GOTPAGE
Lloh17:
	ldr	x9, [x9, _EAGAIN@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_1
	b	LBB0_3
LBB0_15:
Lloh19:
	adrp	x8, _PMCLOG_EOF@GOTPAGE
Lloh20:
	ldr	x8, [x8, _PMCLOG_EOF@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PL_STATE_ERROR,8,3             ; @PL_STATE_ERROR
	.comm	_PMCLOG_ERROR,8,3               ; @PMCLOG_ERROR
	.comm	_PMCLOG_REQUIRE_DATA,8,3        ; @PMCLOG_REQUIRE_DATA
	.comm	_PMCLOG_FD_NONE,4,2             ; @PMCLOG_FD_NONE
	.comm	_PMCLOG_BUFFER_SIZE,4,2         ; @PMCLOG_BUFFER_SIZE
	.comm	_PMCLOG_EOF,8,3                 ; @PMCLOG_EOF
	.comm	_errno,8,3                      ; @errno
	.comm	_EAGAIN,8,3                     ; @EAGAIN
.subsections_via_symbols
