	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dotruncate                     ## -- Begin function dotruncate
	.p2align	4, 0x90
_dotruncate:                            ## @dotruncate
	.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, %ebx
	movq	_file_size@GOTPCREL(%rip), %r15
	movl	(%r15), %r14d
	movq	_truncbdy@GOTPCREL(%rip), %rcx
	movl	%edi, %eax
	xorl	%edx, %edx
	divl	(%rcx)
	subl	%edx, %ebx
	movq	_biggest@GOTPCREL(%rip), %rax
	movl	%r14d, %edx
	cmpl	(%rax), %ebx
	jbe	LBB0_4
## %bb.1:
	movl	%ebx, (%rax)
	movq	_quiet@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	movl	%r14d, %edx
	jne	LBB0_4
## %bb.2:
	movq	_testcalls@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_simulatedopcount@GOTPCREL(%rip), %rcx
	movl	%r14d, %edx
	cmpl	(%rcx), %eax
	jle	LBB0_4
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_prt
	movl	(%r15), %edx
LBB0_4:
	movq	_OP_TRUNCATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	xorl	%ecx, %ecx
	callq	_log4
	movl	(%r15), %eax
	cmpl	%eax, %ebx
	jbe	LBB0_6
## %bb.5:
	movq	_good_buf@GOTPCREL(%rip), %rcx
	movq	%rax, %rdi
	addq	(%rcx), %rdi
	movl	%ebx, %edx
	subl	%eax, %edx
	xorl	%esi, %esi
	callq	_memset
LBB0_6:
	movl	%ebx, (%r15)
	movq	_testcalls@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_simulatedopcount@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jle	LBB0_15
## %bb.7:
	movq	_progressinterval@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	testl	%ecx, %ecx
	je	LBB0_9
## %bb.8:
	movl	%esi, %eax
	cltd
	idivl	%ecx
	testl	%edx, %edx
	je	LBB0_13
LBB0_9:
	movq	_debug@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_14
## %bb.10:
	movq	_monitorstart@GOTPCREL(%rip), %rax
	cmpl	$-1, (%rax)
	je	LBB0_13
## %bb.11:
	movq	_monitorend@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	$-1, %eax
	je	LBB0_13
## %bb.12:
	cmpl	%eax, %ebx
	ja	LBB0_14
LBB0_13:
	leaq	L_.str.1(%rip), %rdi
	movl	%r14d, %edx
	movl	%ebx, %ecx
	xorl	%eax, %eax
	callq	_prt
LBB0_14:
	movq	_fd@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_ftruncate
	cmpl	$-1, %eax
	je	LBB0_16
LBB0_15:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	leaq	L_.str.2(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_prt
	leaq	L_.str.3(%rip), %rdi
	callq	_prterr
	movl	$160, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_report_failure                 ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_file_size,4,2                  ## @file_size
	.comm	_truncbdy,4,2                   ## @truncbdy
	.comm	_biggest,4,2                    ## @biggest
	.comm	_quiet,4,2                      ## @quiet
	.comm	_testcalls,4,2                  ## @testcalls
	.comm	_simulatedopcount,4,2           ## @simulatedopcount
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"truncating to largest ever: 0x%x\n"

	.comm	_OP_TRUNCATE,4,2                ## @OP_TRUNCATE
	.comm	_good_buf,8,3                   ## @good_buf
	.comm	_progressinterval,4,2           ## @progressinterval
	.comm	_debug,8,3                      ## @debug
	.comm	_monitorstart,4,2               ## @monitorstart
	.comm	_monitorend,4,2                 ## @monitorend
L_.str.1:                               ## @.str.1
	.asciz	"%lu trunc\tfrom 0x%x to 0x%x\n"

	.comm	_fd,4,2                         ## @fd
L_.str.2:                               ## @.str.2
	.asciz	"ftruncate1: %x\n"

L_.str.3:                               ## @.str.3
	.asciz	"dotruncate: ftruncate"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dotruncate                     ; -- Begin function dotruncate
	.p2align	2
_dotruncate:                            ; @dotruncate
	.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
Lloh0:
	adrp	x21, _file_size@GOTPAGE
Lloh1:
	ldr	x21, [x21, _file_size@GOTPAGEOFF]
	ldr	w20, [x21]
Lloh2:
	adrp	x8, _truncbdy@GOTPAGE
Lloh3:
	ldr	x8, [x8, _truncbdy@GOTPAGEOFF]
	mov	x2, x20
Lloh4:
	ldr	w8, [x8]
	udiv	w9, w0, w8
	mul	w19, w9, w8
Lloh5:
	adrp	x8, _biggest@GOTPAGE
Lloh6:
	ldr	x8, [x8, _biggest@GOTPAGEOFF]
	ldr	w9, [x8]
Lloh7:
	adrp	x22, _testcalls@GOTPAGE
Lloh8:
	ldr	x22, [x22, _testcalls@GOTPAGEOFF]
Lloh9:
	adrp	x23, _simulatedopcount@GOTPAGE
Lloh10:
	ldr	x23, [x23, _simulatedopcount@GOTPAGEOFF]
	cmp	w19, w9
	b.ls	LBB0_4
; %bb.1:
	str	w19, [x8]
Lloh11:
	adrp	x8, _quiet@GOTPAGE
Lloh12:
	ldr	x8, [x8, _quiet@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cbnz	w8, LBB0_4
; %bb.2:
	ldr	w8, [x22]
	ldr	w9, [x23]
	cmp	w8, w9
	b.le	LBB0_4
; %bb.3:
Lloh14:
	adrp	x0, l_.str@PAGE
Lloh15:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_prt
	ldr	w2, [x21]
LBB0_4:
Lloh16:
	adrp	x8, _OP_TRUNCATE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OP_TRUNCATE@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	x1, x19
	mov	w3, #0
	bl	_log4
	ldr	w8, [x21]
	cmp	w19, w8
	b.ls	LBB0_6
; %bb.5:
Lloh19:
	adrp	x9, _good_buf@GOTPAGE
Lloh20:
	ldr	x9, [x9, _good_buf@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	add	x0, x9, x8
	sub	w2, w19, w8
	mov	w1, #0
	bl	_memset
LBB0_6:
	str	w19, [x21]
	ldr	w1, [x22]
	ldr	w8, [x23]
	cmp	w1, w8
	b.le	LBB0_15
; %bb.7:
Lloh22:
	adrp	x8, _progressinterval@GOTPAGE
Lloh23:
	ldr	x8, [x8, _progressinterval@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cbz	w8, LBB0_9
; %bb.8:
	sdiv	w9, w1, w8
	msub	w8, w9, w8, w1
	cbz	w8, LBB0_13
LBB0_9:
Lloh25:
	adrp	x8, _debug@GOTPAGE
Lloh26:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.10:
Lloh28:
	adrp	x8, _monitorstart@GOTPAGE
Lloh29:
	ldr	x8, [x8, _monitorstart@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	cmn	w8, #1
	b.eq	LBB0_13
; %bb.11:
Lloh31:
	adrp	x8, _monitorend@GOTPAGE
Lloh32:
	ldr	x8, [x8, _monitorend@GOTPAGEOFF]
Lloh33:
	ldr	w8, [x8]
	cmn	w8, #1
	b.eq	LBB0_13
; %bb.12:
	cmp	w19, w8
	b.hi	LBB0_14
LBB0_13:
	stp	x20, x19, [sp]
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_prt
LBB0_14:
Lloh36:
	adrp	x8, _fd@GOTPAGE
Lloh37:
	ldr	x8, [x8, _fd@GOTPAGEOFF]
Lloh38:
	ldr	w0, [x8]
	mov	x1, x19
	bl	_ftruncate
	cmn	w0, #1
	b.eq	LBB0_16
LBB0_15:
	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
LBB0_16:
Lloh39:
	adrp	x0, l_.str.2@PAGE
Lloh40:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	x1, x19
	bl	_prt
Lloh41:
	adrp	x0, l_.str.3@PAGE
Lloh42:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_prterr
	mov	w0, #160
	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
	b	_report_failure
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.cfi_endproc
                                        ; -- End function
	.comm	_file_size,4,2                  ; @file_size
	.comm	_truncbdy,4,2                   ; @truncbdy
	.comm	_biggest,4,2                    ; @biggest
	.comm	_quiet,4,2                      ; @quiet
	.comm	_testcalls,4,2                  ; @testcalls
	.comm	_simulatedopcount,4,2           ; @simulatedopcount
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"truncating to largest ever: 0x%x\n"

	.comm	_OP_TRUNCATE,4,2                ; @OP_TRUNCATE
	.comm	_good_buf,8,3                   ; @good_buf
	.comm	_progressinterval,4,2           ; @progressinterval
	.comm	_debug,8,3                      ; @debug
	.comm	_monitorstart,4,2               ; @monitorstart
	.comm	_monitorend,4,2                 ; @monitorend
l_.str.1:                               ; @.str.1
	.asciz	"%lu trunc\tfrom 0x%x to 0x%x\n"

	.comm	_fd,4,2                         ; @fd
l_.str.2:                               ; @.str.2
	.asciz	"ftruncate1: %x\n"

l_.str.3:                               ; @.str.3
	.asciz	"dotruncate: ftruncate"

.subsections_via_symbols
