	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$3, %edi
	jne	LBB0_3
## %bb.1:
	movq	%rsi, %rbx
	movq	16(%rsi), %rdi
	leaq	-48(%rbp), %rsi
	xorl	%edx, %edx
	callq	_strtoll
	movq	%rax, %r14
	movq	-48(%rbp), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	cmpb	$0, (%rax)
	je	LBB0_6
LBB0_3:
	xorl	%eax, %eax
	callq	_usage
LBB0_4:
	movl	$2, %eax
LBB0_5:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	16(%rbx), %rax
	cmpb	$0, (%rax)
	je	LBB0_3
## %bb.7:
	movq	8(%rbx), %rdi
	movq	_O_WRONLY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_open
	testl	%eax, %eax
	js	LBB0_13
## %bb.8:
	movl	%eax, %r15d
	leaq	-64(%rbp), %rsi
	movl	%eax, %edi
	callq	_fstat
	testq	%rax, %rax
	js	LBB0_14
## %bb.9:
	movl	-56(%rbp), %edi
	callq	_S_ISREG
	testl	%eax, %eax
	je	LBB0_15
## %bb.10:
	movq	-64(%rbp), %r13
	cmpq	%r13, %r14
	jge	LBB0_17
## %bb.11:
	movq	%r13, %rax
	negq	%rax
	cmpq	%rax, %r14
	jge	LBB0_19
## %bb.12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_18
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_16
LBB0_14:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rdx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_16
LBB0_15:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rdx
	leaq	L_.str.2(%rip), %rsi
LBB0_16:
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %eax
	jmp	LBB0_5
LBB0_17:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_18:
	movq	%r14, %rdx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_4
LBB0_19:
	movq	_F_WRLCK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	callq	_lock_whole_file
	testq	%rax, %rax
	jle	LBB0_23
## %bb.20:
	movq	%r14, %r12
	sarq	$63, %r12
	andq	%r13, %r12
	addq	%r14, %r12
	movl	%r15d, %edi
	movq	%r12, %rsi
	callq	_ftruncate
	testq	%rax, %rax
	jns	LBB0_22
## %bb.21:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%rbx), %rdx
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_22:
	movl	%r15d, %edi
	callq	_close
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_23:
	movl	$1, %eax
	jmp	LBB0_5
	.cfi_endproc
                                        ## -- End function
	.comm	_O_WRONLY,4,2                   ## @O_WRONLY
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cannot open file %s: %m\n"

L_.str.1:                               ## @.str.1
	.asciz	"cannot stat file %s: %m\n"

L_.str.2:                               ## @.str.2
	.asciz	"%s is not a regular file\n"

L_.str.3:                               ## @.str.3
	.asciz	"truncate position %lld after end of file\n"

L_.str.4:                               ## @.str.4
	.asciz	"truncate position %lld before start of file\n"

	.comm	_F_WRLCK,4,2                    ## @F_WRLCK
L_.str.5:                               ## @.str.5
	.asciz	"cannot truncate file %s at position %lld: %m\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	cmp	w0, #3
	b.ne	LBB0_3
; %bb.1:
	mov	x19, x1
	ldr	x0, [x1, #16]
	add	x1, sp, #40
	mov	w2, #0
	bl	_strtoll
	ldr	x8, [sp, #40]
	cbz	x8, LBB0_3
; %bb.2:
	ldrb	w8, [x8]
	cbz	w8, LBB0_6
LBB0_3:
	bl	_usage
LBB0_4:
	mov	w0, #2
LBB0_5:
	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
	add	sp, sp, #96
	ret
LBB0_6:
	ldr	x8, [x19, #16]
	ldrb	w8, [x8]
	cbz	w8, LBB0_3
; %bb.7:
	mov	x20, x0
	ldr	x0, [x19, #8]
Lloh0:
	adrp	x8, _O_WRONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _O_WRONLY@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_open
	tbnz	w0, #31, LBB0_13
; %bb.8:
	mov	x21, x0
	add	x1, sp, #24
	bl	_fstat
	tbnz	x0, #63, LBB0_14
; %bb.9:
	ldr	w0, [sp, #32]
	bl	_S_ISREG
	cbz	w0, LBB0_15
; %bb.10:
	ldr	x22, [sp, #24]
	cmp	x20, x22
	b.ge	LBB0_17
; %bb.11:
	neg	x8, x22
	cmp	x20, x8
	b.ge	LBB0_19
; %bb.12:
Lloh3:
	adrp	x8, _stderr@GOTPAGE
Lloh4:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh6:
	adrp	x1, l_.str.4@PAGE
Lloh7:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_18
LBB0_13:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_16
LBB0_14:
Lloh13:
	adrp	x8, _stderr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_15:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	str	x8, [sp]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_16:
	bl	_fprintf
	mov	w0, #1
	b	LBB0_5
LBB0_17:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	str	x20, [sp]
Lloh26:
	adrp	x1, l_.str.3@PAGE
Lloh27:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_18:
	bl	_fprintf
	b	LBB0_4
LBB0_19:
Lloh28:
	adrp	x8, _F_WRLCK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _F_WRLCK@GOTPAGEOFF]
Lloh30:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_lock_whole_file
	cmp	x0, #1
	b.lt	LBB0_23
; %bb.20:
	and	x8, x22, x20, asr #63
	add	x20, x8, x20
	mov	x0, x21
	mov	x1, x20
	bl	_ftruncate
	tbz	x0, #63, LBB0_22
; %bb.21:
Lloh31:
	adrp	x8, _stderr@GOTPAGE
Lloh32:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh33:
	ldr	w0, [x8]
	ldr	x8, [x19, #8]
	stp	x8, x20, [sp]
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_fprintf
LBB0_22:
	mov	x0, x21
	bl	_close
	mov	w0, #0
	b	LBB0_5
LBB0_23:
	mov	w0, #1
	b	LBB0_5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_O_WRONLY,4,2                   ; @O_WRONLY
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cannot open file %s: %m\n"

l_.str.1:                               ; @.str.1
	.asciz	"cannot stat file %s: %m\n"

l_.str.2:                               ; @.str.2
	.asciz	"%s is not a regular file\n"

l_.str.3:                               ; @.str.3
	.asciz	"truncate position %lld after end of file\n"

l_.str.4:                               ; @.str.4
	.asciz	"truncate position %lld before start of file\n"

	.comm	_F_WRLCK,4,2                    ; @F_WRLCK
l_.str.5:                               ; @.str.5
	.asciz	"cannot truncate file %s at position %lld: %m\n"

.subsections_via_symbols
