	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_trunc
_do_trunc:                              ## @do_trunc
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %r14d
	xorl	%eax, %eax
	callq	_random
	movq	_fsize@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	_offset@GOTPCREL(%rip), %r15
	movslq	%edx, %rbx
	movq	(%r15), %rsi
	addq	%rbx, %rsi
	movl	%r14d, %edi
	callq	_ftruncate
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movq	_vflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	(%r15), %rbx
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
LBB0_1:
	callq	_do_trunc.cold.1
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function do_trunc.cold.1
_do_trunc.cold.1:                       ## @do_trunc.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str(%rip), %rdi
	callq	_perror
	pushq	$7
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_fsize,4,2                      ## @fsize
	.comm	_offset,8,3                     ## @offset
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"truncate"

	.comm	_vflag,8,3                      ## @vflag
	.comm	_stderr,4,2                     ## @stderr
L_.str.1:                               ## @.str.1
	.asciz	"Truncated at offset %ld\n"

	.no_dead_strip	_do_trunc
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_trunc
_do_trunc:                              ; @do_trunc
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_random
Lloh0:
	adrp	x8, _fsize@GOTPAGE
Lloh1:
	ldr	x8, [x8, _fsize@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	sdiv	w9, w0, w8
	msub	w8, w9, w8, w0
Lloh3:
	adrp	x20, _offset@GOTPAGE
Lloh4:
	ldr	x20, [x20, _offset@GOTPAGEOFF]
	ldr	x9, [x20]
	sxtw	x21, w8
	add	x1, x9, x21
	mov	x0, x19
	bl	_ftruncate
	tbnz	x0, #63, LBB0_4
; %bb.1:
Lloh5:
	adrp	x8, _vflag@GOTPAGE
Lloh6:
	ldr	x8, [x8, _vflag@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x8, [x20]
	add	x2, x8, x21
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_fprintf
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	bl	_do_trunc.cold.1
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function do_trunc.cold.1
_do_trunc.cold.1:                       ; @do_trunc.cold.1
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	mov	w0, #7
	bl	_exit
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_fsize,4,2                      ; @fsize
	.comm	_offset,8,3                     ; @offset
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"truncate"

	.comm	_vflag,8,3                      ; @vflag
	.comm	_stderr,4,2                     ; @stderr
l_.str.1:                               ; @.str.1
	.asciz	"Truncated at offset %ld\n"

	.no_dead_strip	_do_trunc
.subsections_via_symbols
