	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pids_sons_of_r                 ## -- Begin function pids_sons_of_r
	.p2align	4, 0x90
_pids_sons_of_r:                        ## @pids_sons_of_r
	.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	$1224, %rsp                     ## imm = 0x4C8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -1248(%rbp)               ## 8-byte Spill
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorl	%ebx, %ebx
	movl	%edi, -1236(%rbp)               ## 4-byte Spill
	testl	%edi, %edi
	jle	LBB0_16
## %bb.1:
	movl	%edx, -1232(%rbp)               ## 4-byte Spill
	leaq	L_.str(%rip), %rdi
	callq	_opendir
	testq	%rax, %rax
	je	LBB0_16
## %bb.2:
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	-1248(%rbp), %rcx               ## 8-byte Reload
	incl	%ecx
	movl	%ecx, -1228(%rbp)               ## 4-byte Spill
	movl	$0, -1220(%rbp)                 ## 4-byte Folded Spill
	leaq	-1216(%rbp), %rbx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rbx
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r14, %rdi
	callq	_fclose
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	callq	_readdir
	testq	%rax, %rax
	je	LBB0_15
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %r13
	movq	(%rax), %rbx
	movq	%rbx, %rdi
	callq	_atoi
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r12d
	leaq	-192(%rbp), %r14
	movq	%r14, %rdi
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	callq	_sprintf
	movq	%r14, %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_fopen
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$0, -1224(%rbp)
	movq	%r14, %rdi
	leaq	L_.str.3(%rip), %rsi
	leaq	-1252(%rbp), %rdx
	movq	%r13, %rbx
	movq	%r13, %rcx
	leaq	-56(%rbp), %r8
	leaq	-1224(%rbp), %r9
	callq	_fscanf
	movl	-1236(%rbp), %eax               ## 4-byte Reload
	cmpl	%eax, -1224(%rbp)
	jne	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %edi
	movq	%rbx, %rsi
	callq	_pids_cmdline
	movzbl	-56(%rbp), %eax
	cmpb	$84, %al
	leaq	L_.str.7(%rip), %rcx
	leaq	L_.str.6(%rip), %rdx
	cmoveq	%rdx, %rcx
	cmpb	$83, %al
	leaq	L_.str.5(%rip), %rax
	cmoveq	%rax, %rcx
	leaq	L_.str.4(%rip), %rdi
	movl	%r12d, %esi
	movq	%rbx, %rdx
	callq	_cons_printf
	movl	-1220(%rbp), %r13d              ## 4-byte Reload
	incl	%r13d
	movl	-1232(%rbp), %edx               ## 4-byte Reload
	cmpl	%edx, -1248(%rbp)               ## 4-byte Folded Reload
	jge	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r12d, %edi
	movl	-1228(%rbp), %esi               ## 4-byte Reload
	callq	_pids_sons_of_r
	addl	%eax, %r13d
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	%r13d, -1220(%rbp)              ## 4-byte Spill
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rbx
	jmp	LBB0_14
LBB0_3:
	movl	$0, -1220(%rbp)                 ## 4-byte Folded Spill
LBB0_15:
	movq	%r15, %rdi
	callq	_closedir
	movl	-1220(%rbp), %ebx               ## 4-byte Reload
LBB0_16:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_18
## %bb.17:
	movl	%ebx, %eax
	addq	$1224, %rsp                     ## imm = 0x4C8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/proc/"

L_.str.1:                               ## @.str.1
	.asciz	"/proc/%s/stat"

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

L_.str.3:                               ## @.str.3
	.asciz	"%d %s %s %d"

L_.str.4:                               ## @.str.4
	.asciz	" `- %d : %s (%s)\n"

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

L_.str.6:                               ## @.str.6
	.asciz	"stopped"

L_.str.7:                               ## @.str.7
	.asciz	"running"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_pids_sons_of_r                 ; -- Begin function pids_sons_of_r
	.p2align	2
_pids_sons_of_r:                        ; @pids_sons_of_r
	.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, #1200
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
	cmp	w0, #1
	b.lt	LBB0_11
; %bb.1:
	mov	x19, x2
	mov	x20, x1
	mov	x21, x0
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_opendir
	cbz	x0, LBB0_11
; %bb.2:
	mov	x23, x0
	bl	_readdir
	mov	w22, #0
	cbz	x0, LBB0_12
; %bb.3:
	add	w8, w20, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh5:
	adrp	x25, l_.str.1@PAGE
Lloh6:
	add	x25, x25, l_.str.1@PAGEOFF
Lloh7:
	adrp	x26, l_.str.2@PAGE
Lloh8:
	add	x26, x26, l_.str.2@PAGEOFF
Lloh9:
	adrp	x27, l_.str.3@PAGE
Lloh10:
	add	x27, x27, l_.str.3@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x28
	bl	_fclose
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	bl	_readdir
	cbz	x0, LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x28, [x0]
	mov	x0, x28
	bl	_atoi
	cbz	w0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x24, x0
	sub	x0, x29, #232
	mov	x1, x25
	mov	x2, x28
	bl	_sprintf
	sub	x0, x29, #232
	mov	x1, x26
	bl	_fopen
	mov	x28, x0
	cbz	x0, LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	str	wzr, [sp, #20]
	add	x2, sp, #16
	add	x3, sp, #24
	sub	x4, x29, #104
	add	x5, sp, #20
	mov	x0, x28
	mov	x1, x27
	bl	_fscanf
	ldr	w8, [sp, #20]
	cmp	w8, w21
	b.ne	LBB0_4
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x1, sp, #24
	mov	x0, x24
	bl	_pids_cmdline
	ldurb	w8, [x29, #-104]
	cmp	w8, #84
Lloh11:
	adrp	x9, l_.str.7@PAGE
Lloh12:
	add	x9, x9, l_.str.7@PAGEOFF
Lloh13:
	adrp	x10, l_.str.6@PAGE
Lloh14:
	add	x10, x10, l_.str.6@PAGEOFF
	csel	x9, x10, x9, eq
	cmp	w8, #83
Lloh15:
	adrp	x8, l_.str.5@PAGE
Lloh16:
	add	x8, x8, l_.str.5@PAGEOFF
	csel	x3, x8, x9, eq
	add	x2, sp, #24
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x24
	bl	_cons_printf
	add	w22, w22, #1
	cmp	w20, w19
	b.ge	LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	mov	x2, x19
	bl	_pids_sons_of_r
	add	w22, w0, w22
	b	LBB0_4
LBB0_11:
	mov	w22, #0
	b	LBB0_13
LBB0_12:
	mov	x0, x23
	bl	_closedir
LBB0_13:
	ldur	x8, [x29, #-96]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.14:
	mov	x0, x22
	add	sp, sp, #1200
	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_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/proc/"

l_.str.1:                               ; @.str.1
	.asciz	"/proc/%s/stat"

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

l_.str.3:                               ; @.str.3
	.asciz	"%d %s %s %d"

l_.str.4:                               ; @.str.4
	.asciz	" `- %d : %s (%s)\n"

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

l_.str.6:                               ; @.str.6
	.asciz	"stopped"

l_.str.7:                               ; @.str.7
	.asciz	"running"

.subsections_via_symbols
