	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function perf_event__get_comm_tgid
_perf_event__get_comm_tgid:             ## @perf_event__get_comm_tgid
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r12
	movq	%rsi, %r13
	movl	%edi, -64(%rbp)                 ## 4-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_PATH_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	_BUFSIZ@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rax, -96(%rbp)                 ## 8-byte Spill
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	leaq	L_.str(%rip), %rdx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movl	-64(%rbp), %ecx                 ## 4-byte Reload
	callq	_snprintf
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_fopen
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_21
## %bb.1:
	movq	%r14, %rax
	addq	$5, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	leaq	-1(%r12), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	$-1, %ebx
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_13 Depth 2
                                        ##     Child Loop BB0_7 Depth 2
	movq	%r14, %rdi
	movq	-96(%rbp), %rsi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	$5, %edx
	callq	_memcmp
	testq	%rax, %rax
	je	LBB0_5
## %bb.10:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	$5, %edx
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_16
## %bb.11:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movb	(%rbx), %al
	testb	%al, %al
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	%al, %edi
	callq	_isspace
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	movzbl	1(%rbx), %eax
	incq	%rbx
	testb	%al, %al
	jne	LBB0_13
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	callq	_atoi
	movl	%eax, %ebx
LBB0_16:                                ##   in Loop: Header=BB0_2 Depth=1
	cmpb	$0, (%r13)
	jne	LBB0_17
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	%ebx, -68(%rbp)                 ## 4-byte Spill
	movq	%r13, %r15
	movq	%r12, %r13
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movb	(%r12), %al
	testb	%al, %al
	je	LBB0_9
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movsbl	%al, %edi
	callq	_isspace
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	movzbl	1(%r12), %eax
	incq	%r12
	testb	%al, %al
	jne	LBB0_7
LBB0_9:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%r12, %rdi
	callq	_strlen
	decl	%eax
	movslq	%eax, %rbx
	cmpq	%r13, %rbx
	cmovaeq	-80(%rbp), %rbx                 ## 8-byte Folded Reload
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%r13, %r12
	movq	%r15, %r13
	movq	%rbx, %rdx
	callq	_memcpy
	movb	$0, (%r15,%rbx)
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	movl	-68(%rbp), %ebx                 ## 4-byte Reload
	cmpb	$0, (%r13)
	je	LBB0_2
LBB0_17:                                ##   in Loop: Header=BB0_2 Depth=1
	testl	%ebx, %ebx
	js	LBB0_2
	jmp	LBB0_18
LBB0_21:
	leaq	L_.str.2(%rip), %rdi
	movq	%r15, %rsi
	callq	_pr_debug
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_3:
	leaq	L_.str.3(%rip), %rdi
	movq	%r15, %rsi
	callq	_pr_warning
LBB0_18:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_fclose
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_22
## %bb.20:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX,4,2                   ## @PATH_MAX
	.comm	_BUFSIZ,4,2                     ## @BUFSIZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/proc/%d/status"

L_.str.1:                               ## @.str.1
	.asciz	"r"

L_.str.2:                               ## @.str.2
	.asciz	"couldn't open %s\n"

L_.str.3:                               ## @.str.3
	.asciz	"couldn't get COMM and pgid, malformed %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"Name:"

L_.str.5:                               ## @.str.5
	.asciz	"Tgid:"

	.no_dead_strip	_perf_event__get_comm_tgid
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function perf_event__get_comm_tgid
_perf_event__get_comm_tgid:             ; @perf_event__get_comm_tgid
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	sub	sp, sp, #32
	mov	x26, x2
	mov	x20, x1
	mov	x3, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _PATH_MAX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PATH_MAX@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x19, x8, x9
	mov	sp, x19
Lloh8:
	adrp	x8, _BUFSIZ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _BUFSIZ@GOTPAGEOFF]
Lloh10:
	ldr	w22, [x8]
	mov	x9, x22
Lloh11:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh12:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
Lloh13:
	adrp	x2, l_.str@PAGE
Lloh14:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_snprintf
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_fopen
	cbz	x0, LBB0_17
; %bb.1:
	mov	x24, x0
	add	x21, x23, #5
	sub	x8, x26, #1
	stp	x19, x8, [x29, #-104]           ; 16-byte Folded Spill
	mov	w27, #-1
Lloh17:
	adrp	x25, l_.str.4@PAGE
Lloh18:
	add	x25, x25, l_.str.4@PAGEOFF
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_13 Depth 2
	mov	x0, x23
	mov	x1, x22
	mov	x2, x24
	bl	_fgets
	cbz	x0, LBB0_18
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
	mov	x1, x25
	mov	w2, #5
	bl	_memcmp
	cbz	x0, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x23
Lloh19:
	adrp	x1, l_.str.5@PAGE
Lloh20:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	w2, #5
	bl	_memcmp
	cbnz	x0, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21]
	mov	x27, x21
	cbz	w8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x27, x21
LBB0_7:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sxtb	w0, w8
	bl	_isspace
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldrb	w8, [x27, #1]!
	cbnz	w8, LBB0_7
LBB0_9:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x27
	bl	_atoi
	mov	x27, x0
LBB0_10:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x20]
	cbnz	w8, LBB0_16
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_2 Depth=1
	ldrb	w8, [x21]
	mov	x28, x21
	cbz	w8, LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_2 Depth=1
	mov	x28, x21
LBB0_13:                                ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sxtb	w0, w8
	bl	_isspace
	cbz	x0, LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=2
	ldrb	w8, [x28, #1]!
	cbnz	w8, LBB0_13
LBB0_15:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x28
	bl	_strlen
	sub	w8, w0, #1
	sxtw	x8, w8
	cmp	x8, x26
	mov	x19, x26
	ldur	x9, [x29, #-96]                 ; 8-byte Folded Reload
	csel	x26, x8, x9, lo
	mov	x0, x20
	mov	x1, x28
	mov	x2, x26
	bl	_memcpy
	strb	wzr, [x20, x26]
	mov	x26, x19
	ldrb	w8, [x20]
	cbz	w8, LBB0_2
LBB0_16:                                ;   in Loop: Header=BB0_2 Depth=1
	tbnz	w27, #31, LBB0_2
	b	LBB0_19
LBB0_17:
Lloh21:
	adrp	x0, l_.str.2@PAGE
Lloh22:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_pr_debug
	mov	w27, #0
	b	LBB0_20
LBB0_18:
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	ldur	x1, [x29, #-104]                ; 8-byte Folded Reload
	bl	_pr_warning
LBB0_19:
	mov	x0, x24
	bl	_fclose
LBB0_20:
	ldur	x8, [x29, #-88]
Lloh25:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh26:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.21:
	mov	x0, x27
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX,4,2                   ; @PATH_MAX
	.comm	_BUFSIZ,4,2                     ; @BUFSIZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/proc/%d/status"

l_.str.1:                               ; @.str.1
	.asciz	"r"

l_.str.2:                               ; @.str.2
	.asciz	"couldn't open %s\n"

l_.str.3:                               ; @.str.3
	.asciz	"couldn't get COMM and pgid, malformed %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"Name:"

l_.str.5:                               ; @.str.5
	.asciz	"Tgid:"

	.no_dead_strip	_perf_event__get_comm_tgid
.subsections_via_symbols
