	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function truncate_shm
_truncate_shm:                          ## @truncate_shm
	.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, %r14
	movl	%edi, %ebx
	movq	$0, -48(%rbp)
	leaq	L_.str(%rip), %r15
	movq	_optarg@GOTPCREL(%rip), %r13
	leaq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_getopt
	cmpl	$115, %eax
	jne	LBB0_2
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r13), %edi
	movq	%r12, %rsi
	callq	_expand_number
	cmpl	$-1, %eax
	jne	LBB0_1
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_err
	jmp	LBB0_1
LBB0_2:
	cmpl	$-1, %eax
	jne	LBB0_9
## %bb.3:
	movq	_optind@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	subl	%eax, %ebx
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.7:
	leaq	(%r14,%rax,8), %r14
	movl	%ebx, %r15d
	xorl	%ebx, %ebx
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14,%rbx,8), %rdi
	movq	-48(%rbp), %rsi
	callq	_truncate_one_shm
	testl	%r12d, %r12d
	movl	%r12d, %ecx
	cmovel	%eax, %ecx
	testl	%eax, %eax
	cmovnel	%ecx, %r12d
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_8
	jmp	LBB0_10
LBB0_9:
	movl	$2, %r12d
	jmp	LBB0_10
LBB0_4:
	xorl	%r12d, %r12d
LBB0_10:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"s:"

	.comm	_optarg,4,2                     ## @optarg
L_.str.1:                               ## @.str.1
	.asciz	"size:"

	.comm	_optind,8,3                     ## @optind
	.no_dead_strip	_truncate_shm
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function truncate_shm
_truncate_shm:                          ; @truncate_shm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x20, x0
	str	xzr, [sp, #8]
Lloh0:
	adrp	x21, l_.str@PAGE
Lloh1:
	add	x21, x21, l_.str@PAGEOFF
Lloh2:
	adrp	x23, _optarg@GOTPAGE
Lloh3:
	ldr	x23, [x23, _optarg@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str.1@PAGE
Lloh5:
	add	x22, x22, l_.str.1@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_getopt
	cmp	w0, #115
	b.ne	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w0, [x23]
	add	x1, sp, #8
	bl	_expand_number
	cmn	w0, #1
	b.ne	LBB0_1
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #1
	mov	x1, x22
	bl	_err
	b	LBB0_1
LBB0_4:
	cmn	w0, #1
	b.ne	LBB0_8
; %bb.5:
Lloh6:
	adrp	x8, _optind@GOTPAGE
Lloh7:
	ldr	x8, [x8, _optind@GOTPAGEOFF]
Lloh8:
	ldr	x8, [x8]
	sub	w21, w20, w8
	cmp	w21, #1
	b.lt	LBB0_9
; %bb.6:
	mov	w20, #0
	add	x19, x19, x8, lsl #3
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x19], #8
	ldr	x1, [sp, #8]
	bl	_truncate_one_shm
	cmp	w20, #0
	ccmp	w0, #0, #4, eq
	csel	w20, w0, w20, ne
	subs	x21, x21, #1
	b.ne	LBB0_7
	b	LBB0_10
LBB0_8:
	mov	w20, #2
	b	LBB0_10
LBB0_9:
	mov	w20, #0
LBB0_10:
	mov	x0, x20
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"s:"

	.comm	_optarg,4,2                     ; @optarg
l_.str.1:                               ; @.str.1
	.asciz	"size:"

	.comm	_optind,8,3                     ; @optind
	.no_dead_strip	_truncate_shm
.subsections_via_symbols
