	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_mem_stats                  ## -- Begin function get_mem_stats
	.p2align	4, 0x90
_get_mem_stats:                         ## @get_mem_stats
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	movq	%rdi, %rcx
	leaq	_get_mem_stats.mem(%rip), %rbx
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	$10000, %esi                    ## imm = 0x2710
	callq	_snprintf
	movq	_O_RDONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_open
	cmpl	$-1, %eax
	je	LBB0_1
## %bb.2:
	movl	%eax, %ebx
	leaq	_get_mem_stats.mem(%rip), %r13
	movl	%eax, %edi
	movq	%r13, %rsi
	movl	$9999, %edx                     ## imm = 0x270F
	callq	_read
	testl	%eax, %eax
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	jle	LBB0_3
## %bb.4:
	cltq
	movb	$0, (%rax,%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	leaq	16(%rax), %rcx
	movq	%rcx, -72(%rbp)                 ## 8-byte Spill
	addq	$24, %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	$-1, (%r14)
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$0, (%r12)
	je	LBB0_17
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_9 Depth 2
                                        ##     Child Loop BB0_13 Depth 2
	movb	(%r13), %al
	testb	%al, %al
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rbx
	incq	%r13
	xorl	%r15d, %r15d
	testb	%al, %al
	je	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$10, %al
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=2
	movzbl	(%r13), %eax
	incq	%r13
	incq	%r15
	testb	%al, %al
	jne	LBB0_9
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, %rdi
	leaq	L_.str.1(%rip), %rsi
	movl	$6, %edx
	callq	_strncmp
	testq	%rax, %rax
	movl	$0, %r14d
	cmoveq	-56(%rbp), %r14                 ## 8-byte Folded Reload
	movq	%rbx, %rdi
	leaq	L_.str.2(%rip), %rsi
	movl	$6, %edx
	callq	_strncmp
	testq	%rax, %rax
	cmoveq	-80(%rbp), %r14                 ## 8-byte Folded Reload
	movq	%rbx, %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	$5, %edx
	callq	_strncmp
	testq	%rax, %rax
	cmoveq	-72(%rbp), %r14                 ## 8-byte Folded Reload
	movq	%rbx, %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	$5, %edx
	callq	_strncmp
	testq	%rax, %rax
	cmoveq	-64(%rbp), %r14                 ## 8-byte Folded Reload
	leaq	-1(%r13), %r12
	testq	%r14, %r14
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	cmpq	%r12, %rbx
	jae	LBB0_15
	.p2align	4, 0x90
LBB0_13:                                ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpb	$32, (%rbx)
	je	LBB0_19
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=2
	incq	%rbx
	decq	%r15
	jne	LBB0_13
	jmp	LBB0_15
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	$-1, (%r14)
	movq	%rbx, %rdi
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdx
	callq	_sscanf
	jmp	LBB0_16
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_17
LBB0_6:
	movl	$1, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_17:
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_close
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_18:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_get_mem_stats.mem,10000,4 ## @get_mem_stats.mem
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"/proc/%lu/status"

	.comm	_O_RDONLY,4,2                   ## @O_RDONLY
L_.str.1:                               ## @.str.1
	.asciz	"VmPeak"

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

L_.str.3:                               ## @.str.3
	.asciz	"VmHWM"

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

L_.str.5:                               ## @.str.5
	.asciz	"%llu"

	.comm	_TMEM_SIZE,4,2                  ## @TMEM_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_mem_stats                  ; -- Begin function get_mem_stats
	.p2align	2
_get_mem_stats:                         ; @get_mem_stats
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x3, x0
Lloh0:
	adrp	x20, _get_mem_stats.mem@PAGE
Lloh1:
	add	x20, x20, _get_mem_stats.mem@PAGEOFF
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	w1, #10000
	bl	_snprintf
Lloh4:
	adrp	x8, _O_RDONLY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _O_RDONLY@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_open
	cmn	w0, #1
	b.eq	LBB0_15
; %bb.1:
	mov	x20, x0
Lloh7:
	adrp	x21, _get_mem_stats.mem@PAGE
Lloh8:
	add	x21, x21, _get_mem_stats.mem@PAGEOFF
	mov	x1, x21
	mov	w2, #9999
	bl	_read
	cmp	w0, #1
	b.lt	LBB0_16
; %bb.2:
	str	w20, [sp, #12]                  ; 4-byte Folded Spill
	strb	wzr, [x21, w0, sxtw]
	add	x28, x19, #8
	add	x26, x19, #16
Lloh9:
	adrp	x24, l_.str.3@PAGE
Lloh10:
	add	x24, x24, l_.str.3@PAGEOFF
	add	x20, x19, #24
Lloh11:
	adrp	x25, l_.str.4@PAGE
Lloh12:
	add	x25, x25, l_.str.4@PAGEOFF
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #-1
	str	x8, [x2]
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldrb	w8, [x23]
	cbz	w8, LBB0_14
LBB0_5:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_7 Depth 2
                                        ;     Child Loop BB0_11 Depth 2
	ldrb	w8, [x21]
	cbz	w8, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x27, x21
	mov	x22, #0
	add	x21, x21, #1
	cbz	w8, LBB0_9
LBB0_7:                                 ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cmp	w8, #10
	b.eq	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=2
	ldrb	w8, [x21], #1
	add	x22, x22, #1
	cbnz	w8, LBB0_7
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x27
Lloh13:
	adrp	x1, l_.str.1@PAGE
Lloh14:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #6
	bl	_strncmp
	cmp	x0, #0
	csel	x23, x19, xzr, eq
	mov	x0, x27
Lloh15:
	adrp	x1, l_.str.2@PAGE
Lloh16:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w2, #6
	bl	_strncmp
	cmp	x0, #0
	csel	x23, x28, x23, eq
	mov	x0, x27
	mov	x1, x24
	mov	w2, #5
	bl	_strncmp
	cmp	x0, #0
	csel	x23, x26, x23, eq
	mov	x0, x27
	mov	x1, x25
	mov	w2, #5
	bl	_strncmp
	cmp	x0, #0
	csel	x2, x20, x23, eq
	sub	x23, x21, #1
	cbz	x2, LBB0_4
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	x27, x23
	b.hs	LBB0_3
LBB0_11:                                ;   Parent Loop BB0_5 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrb	w8, [x27]
	cmp	w8, #32
	b.eq	LBB0_13
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=2
	add	x27, x27, #1
	subs	x22, x22, #1
	b.ne	LBB0_11
	b	LBB0_3
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #-1
	str	x8, [x2]
	mov	x0, x27
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_sscanf
	b	LBB0_4
LBB0_14:
	mov	w19, #1
	ldr	w20, [sp, #12]                  ; 4-byte Folded Reload
	b	LBB0_17
LBB0_15:
	mov	w19, #0
	b	LBB0_18
LBB0_16:
	mov	w19, #0
LBB0_17:
	mov	x0, x20
	bl	_close
LBB0_18:
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_get_mem_stats.mem,10000,0 ; @get_mem_stats.mem
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"/proc/%lu/status"

	.comm	_O_RDONLY,4,2                   ; @O_RDONLY
l_.str.1:                               ; @.str.1
	.asciz	"VmPeak"

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

l_.str.3:                               ; @.str.3
	.asciz	"VmHWM"

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

l_.str.5:                               ; @.str.5
	.asciz	"%llu"

	.comm	_TMEM_SIZE,4,2                  ; @TMEM_SIZE
.subsections_via_symbols
