	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_record__mmap_read
_perf_record__mmap_read:                ## @perf_record__mmap_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	%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
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	%rsi, %rdi
	callq	_perf_mmap__read_head
	movl	%eax, %ecx
	movl	(%r15), %r12d
	xorl	%eax, %eax
	cmpl	%r12d, %ecx
	je	LBB0_8
## %bb.1:
	movslq	(%rbx), %r13
	addq	8(%r15), %r13
	incl	4(%rbx)
	movl	%ecx, %edx
	subl	%r12d, %edx
	movq	%rbx, %rdi
	movl	16(%r15), %r14d
	movl	%r14d, %eax
	andl	%r12d, %eax
	leaq	(%rax,%rdx), %rbx
	movl	%r14d, %esi
	andl	%ecx, %esi
	cmpq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movl	%ecx, %ebx
	je	LBB0_4
## %bb.2:
	leaq	(%rax,%r13), %rsi
	subl	%eax, %r14d
	incl	%r14d
	movq	%r14, %rdx
	callq	_write_output
	testq	%rax, %rax
	js	LBB0_7
## %bb.3:
	addl	%r12d, %r14d
	movl	%ebx, %edx
	subl	%r14d, %edx
	andl	16(%r15), %r14d
	movq	%r14, %rax
LBB0_4:
	addq	%rax, %r13
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	callq	_write_output
	testq	%rax, %rax
	js	LBB0_7
## %bb.5:
	movl	%ebx, %esi
	movl	%ebx, (%r15)
	movq	%r15, %rdi
	callq	_perf_mmap__write_tail
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_7:
	movl	$-1, %eax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_perf_record__mmap_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_record__mmap_read
_perf_record__mmap_read:                ; @perf_record__mmap_read
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x19, x1
	mov	x21, x0
	mov	x0, x1
	bl	_perf_mmap__read_head
	ldr	w23, [x19]
	cmp	w0, w23
	b.eq	LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldp	w9, w10, [x21]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x24, x8, x9
	add	w8, w10, #1
	str	w8, [x21, #4]
	ldr	w9, [x19, #16]
	and	x8, x9, x23
	sub	w2, w0, w23
	add	x10, x8, x2
	and	w11, w9, w0
	cmp	x10, x11
	b.eq	LBB0_4
; %bb.2:
	add	x1, x24, x8
	sub	w8, w9, w8
	add	w22, w8, #1
	mov	x0, x21
	mov	x2, x22
	bl	_write_output
	tbnz	x0, #63, LBB0_7
; %bb.3:
	ldr	w8, [x19, #16]
	add	w9, w22, w23
	and	w8, w8, w9
	sub	w2, w20, w9
LBB0_4:
	add	x1, x24, x8
	mov	x0, x21
	bl	_write_output
	tbnz	x0, #63, LBB0_7
; %bb.5:
	str	w20, [x19]
	mov	x0, x19
	mov	x1, x20
	bl	_perf_mmap__write_tail
LBB0_6:
	mov	w0, #0
	b	LBB0_8
LBB0_7:
	mov	w0, #-1
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_perf_record__mmap_read
.subsections_via_symbols
