	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_event_desc
_read_event_desc:                       ## @read_event_desc
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	leaq	-64(%rbp), %rsi
	movl	%r15d, %edi
	movl	$8, %edx
	callq	_read
	cmpq	$8, %rax
	jne	LBB0_10
## %bb.1:
	cmpq	$0, (%r14)
	je	LBB0_3
## %bb.2:
	movq	-64(%rbp), %rdi
	callq	_bswap_32
	movq	%rax, -64(%rbp)
LBB0_3:
	leaq	-120(%rbp), %rsi
	movl	%r15d, %edi
	movl	$8, %edx
	callq	_read
	cmpq	$8, %rax
	jne	LBB0_10
## %bb.4:
	cmpq	$0, (%r14)
	movq	-120(%rbp), %r13
	je	LBB0_6
## %bb.5:
	movq	%r13, %rdi
	callq	_bswap_32
	movq	%rax, %r13
LBB0_6:
	movq	%r13, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.7:
	movq	%rax, %r12
	movq	-64(%rbp), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	leaq	1(%rax), %rdi
	movl	$40, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_28
## %bb.8:
	movq	%rax, %rbx
	cmpq	$4, %r13
	movl	$4, %eax
	cmovbq	%r13, %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_30
## %bb.9:
	xorl	%ecx, %ecx
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, -96(%rbp)                 ## 8-byte Spill
	jmp	LBB0_13
LBB0_10:
	xorl	%ebx, %ebx
LBB0_31:
	movq	%rbx, %rax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	addq	$40, %rbx
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	incq	%rcx
	cmpq	-80(%rbp), %rcx                 ## 8-byte Folded Reload
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movq	-96(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_32
LBB0_13:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
	movq	%rcx, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rcx, (%rbx)
	movl	%r15d, %edi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_read
	cmpq	%r13, %rax
	jne	LBB0_29
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpq	$0, (%r14)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r12, %rdi
	callq	_perf_event__attr_swap
LBB0_16:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	leaq	36(%rax), %rdi
	movq	%r12, %rsi
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	callq	_memcpy
	movl	%r15d, %edi
	leaq	-88(%rbp), %rsi
	movl	$8, %edx
	callq	_read
	cmpq	$8, %rax
	jne	LBB0_29
## %bb.17:                              ##   in Loop: Header=BB0_13 Depth=1
	cmpq	$0, (%r14)
	movq	-88(%rbp), %r12
	je	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r12, %rdi
	callq	_bswap_32
	movq	%rax, %r12
	movq	%rax, -88(%rbp)
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	$1, 8(%rbx)
	jmp	LBB0_20
LBB0_19:                                ##   in Loop: Header=BB0_13 Depth=1
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
LBB0_20:                                ##   in Loop: Header=BB0_13 Depth=1
	movl	%r15d, %edi
	movq	%r14, %rsi
	callq	_do_read_string
	movl	%eax, 32(%rbx)
	testq	%r12, %r12
	je	LBB0_12
## %bb.21:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r12, %rdi
	movl	$8, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_29
## %bb.22:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%rax, %r13
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%r12, 16(%rax)
	movq	%r13, 24(%rax)
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_24 Depth=2
	addq	$8, %r13
	decq	%r12
	je	LBB0_12
LBB0_24:                                ##   Parent Loop BB0_13 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r15d, %edi
	movq	%r13, %rsi
	movl	$8, %edx
	callq	_read
	cmpq	$8, %rax
	jne	LBB0_29
## %bb.25:                              ##   in Loop: Header=BB0_24 Depth=2
	cmpq	$0, (%r14)
	je	LBB0_23
## %bb.26:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	(%r13), %rdi
	callq	_bswap_64
	movq	%rax, (%r13)
	jmp	LBB0_23
LBB0_28:
	xorl	%ebx, %ebx
	jmp	LBB0_30
LBB0_29:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_free_event_desc
	xorl	%ebx, %ebx
	movq	-56(%rbp), %r12                 ## 8-byte Reload
LBB0_30:
	movq	%r12, %rdi
	callq	_free
	jmp	LBB0_31
LBB0_32:
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_read_event_desc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_event_desc
_read_event_desc:                       ; @read_event_desc
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	add	x1, sp, #24
	mov	x0, x19
	mov	w2, #8
	bl	_read
	cmp	x0, #8
	b.ne	LBB0_10
; %bb.1:
	ldr	x8, [x20]
	cbz	x8, LBB0_3
; %bb.2:
	ldr	x0, [sp, #24]
	bl	_bswap_32
	str	x0, [sp, #24]
LBB0_3:
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #8
	bl	_read
	cmp	x0, #8
	b.ne	LBB0_10
; %bb.4:
	ldr	x8, [x20]
	ldr	x22, [sp, #16]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x22
	bl	_bswap_32
	mov	x22, x0
LBB0_6:
	mov	x0, x22
	bl	_malloc
	cbz	x0, LBB0_10
; %bb.7:
	mov	x21, x0
	ldr	x27, [sp, #24]
	add	x0, x27, #1
	mov	w1, #40
	bl	_calloc
	mov	x23, x0
	cbz	x0, LBB0_27
; %bb.8:
	mov	w8, #4
	cmp	x22, #4
	csel	x8, x22, x8, lo
	str	x8, [sp]                        ; 8-byte Folded Spill
	cbz	x27, LBB0_27
; %bb.9:
	mov	x28, #0
	mov	x24, x23
	b	LBB0_13
LBB0_10:
	mov	x23, #0
LBB0_11:
	mov	x0, x23
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x24, x24, #40
	add	x28, x28, #1
	cmp	x28, x27
	b.eq	LBB0_27
LBB0_13:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_23 Depth 2
	str	x28, [x24]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_read
	cmp	x0, x22
	b.ne	LBB0_26
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x20]
	cbz	x8, LBB0_16
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x21
	bl	_perf_event__attr_swap
LBB0_16:                                ;   in Loop: Header=BB0_13 Depth=1
	add	x0, x24, #36
	mov	x1, x21
	ldr	x2, [sp]                        ; 8-byte Folded Reload
	bl	_memcpy
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #8
	bl	_read
	cmp	x0, #8
	b.ne	LBB0_26
; %bb.17:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x20]
	ldr	x25, [sp, #8]
	cbz	x8, LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x25
	bl	_bswap_32
	mov	x25, x0
	str	x0, [sp, #8]
	mov	w8, #1
	str	w8, [x24, #8]
LBB0_19:                                ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x19
	mov	x1, x20
	bl	_do_read_string
	str	w0, [x24, #32]
	cbz	x25, LBB0_12
; %bb.20:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x0, x25
	mov	w1, #8
	bl	_calloc
	cbz	x0, LBB0_26
; %bb.21:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x26, x0
	stp	x25, x0, [x24, #16]
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=2
	add	x26, x26, #8
	subs	x25, x25, #1
	b.eq	LBB0_12
LBB0_23:                                ;   Parent Loop BB0_13 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x19
	mov	x1, x26
	mov	w2, #8
	bl	_read
	cmp	x0, #8
	b.ne	LBB0_26
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=2
	ldr	x8, [x20]
	cbz	x8, LBB0_22
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=2
	ldr	x0, [x26]
	bl	_bswap_64
	str	x0, [x26]
	b	LBB0_22
LBB0_26:
	mov	x0, x23
	bl	_free_event_desc
	mov	x23, #0
LBB0_27:
	mov	x0, x21
	bl	_free
	b	LBB0_11
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_read_event_desc
.subsections_via_symbols
