	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_truncfile
_test_truncfile:                        ## @test_truncfile
	.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
	movq	%rdi, %r15
	movq	_p@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	callq	_apr_bucket_alloc_create
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movq	%rax, %rsi
	callq	_apr_brigade_create
	movq	%rax, %r13
	leaq	L_.str(%rip), %rsi
	leaq	L_.str.1(%rip), %rdx
	movq	%r15, %rdi
	callq	_make_test_file
	movq	%rax, %r12
	movl	(%rbx), %r8d
	movq	%r13, %rdi
	movq	%rax, %rsi
	xorl	%edx, %edx
	movl	$5, %ecx
	callq	_apr_brigade_insert_file
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_apr_file_trunc
	movq	%r13, %rdi
	callq	_APR_BRIGADE_FIRST
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_APR_BUCKET_NEXT
	movq	%rax, %r14
	movq	%r13, %rdi
	callq	_APR_BRIGADE_SENTINEL
	xorl	%edx, %edx
	cmpq	%rax, %r14
	sete	%dl
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_ABTS_ASSERT
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_apr_bucket_file_enable_mmap
	movq	_APR_BLOCK_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-64(%rbp), %rsi
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_apr_bucket_read
	movq	_APR_EOF@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpq	(%rcx), %rax
	sete	%dl
	leaq	L_.str.3(%rip), %rsi
	movq	%r15, %rdi
	callq	_ABTS_ASSERT
	xorl	%edx, %edx
	cmpq	$0, -56(%rbp)
	sete	%dl
	leaq	L_.str.4(%rip), %rsi
	movq	%r15, %rdi
	callq	_ABTS_ASSERT
	movq	%rbx, %rdi
	callq	_APR_BUCKET_NEXT
	movq	%rax, %rbx
	movq	%r13, %rdi
	callq	_APR_BRIGADE_SENTINEL
	xorl	%edx, %edx
	cmpq	%rax, %rbx
	sete	%dl
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdi
	callq	_ABTS_ASSERT
	movq	%r12, %rdi
	callq	_apr_file_close
	movq	%r13, %rdi
	callq	_apr_brigade_destroy
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_apr_bucket_alloc_destroy
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_p,4,2                          ## @p
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"testfile.txt"

L_.str.1:                               ## @.str.1
	.asciz	"hello"

L_.str.2:                               ## @.str.2
	.asciz	"single bucket in brigade"

L_.str.3:                               ## @.str.3
	.asciz	"read gave APR_EOF"

	.comm	_APR_BLOCK_READ,4,2             ## @APR_BLOCK_READ
	.comm	_APR_EOF,8,3                    ## @APR_EOF
L_.str.4:                               ## @.str.4
	.asciz	"read length 0"

L_.str.5:                               ## @.str.5
	.asciz	"still a single bucket in brigade"

	.no_dead_strip	_test_truncfile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_truncfile
_test_truncfile:                        ; @test_truncfile
	.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	x20, x0
Lloh0:
	adrp	x23, _p@GOTPAGE
Lloh1:
	ldr	x23, [x23, _p@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_apr_bucket_alloc_create
	mov	x19, x0
	ldr	w0, [x23]
	mov	x1, x19
	bl	_apr_brigade_create
	mov	x21, x0
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_make_test_file
	mov	x22, x0
	ldr	w4, [x23]
	mov	x0, x21
	mov	x1, x22
	mov	w2, #0
	mov	w3, #5
	bl	_apr_brigade_insert_file
	mov	x0, x22
	mov	w1, #0
	bl	_apr_file_trunc
	mov	x0, x21
	bl	_APR_BRIGADE_FIRST
	mov	x23, x0
	bl	_APR_BUCKET_NEXT
	mov	x24, x0
	mov	x0, x21
	bl	_APR_BRIGADE_SENTINEL
	cmp	x24, x0
	cset	w2, eq
Lloh6:
	adrp	x1, l_.str.2@PAGE
Lloh7:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_ABTS_ASSERT
	mov	x0, x23
	mov	w1, #0
	bl	_apr_bucket_file_enable_mmap
Lloh8:
	adrp	x8, _APR_BLOCK_READ@GOTPAGE
Lloh9:
	ldr	x8, [x8, _APR_BLOCK_READ@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	add	x1, sp, #8
	mov	x2, sp
	mov	x0, x23
	bl	_apr_bucket_read
Lloh11:
	adrp	x8, _APR_EOF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _APR_EOF@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	cset	w2, eq
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_ABTS_ASSERT
	ldr	x8, [sp]
	cmp	x8, #0
	cset	w2, eq
Lloh16:
	adrp	x1, l_.str.4@PAGE
Lloh17:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_ABTS_ASSERT
	mov	x0, x23
	bl	_APR_BUCKET_NEXT
	mov	x23, x0
	mov	x0, x21
	bl	_APR_BRIGADE_SENTINEL
	cmp	x23, x0
	cset	w2, eq
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_ABTS_ASSERT
	mov	x0, x22
	bl	_apr_file_close
	mov	x0, x21
	bl	_apr_brigade_destroy
	mov	x0, x19
	bl	_apr_bucket_alloc_destroy
	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	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_p,4,2                          ; @p
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"testfile.txt"

l_.str.1:                               ; @.str.1
	.asciz	"hello"

l_.str.2:                               ; @.str.2
	.asciz	"single bucket in brigade"

l_.str.3:                               ; @.str.3
	.asciz	"read gave APR_EOF"

	.comm	_APR_BLOCK_READ,4,2             ; @APR_BLOCK_READ
	.comm	_APR_EOF,8,3                    ; @APR_EOF
l_.str.4:                               ; @.str.4
	.asciz	"read length 0"

l_.str.5:                               ; @.str.5
	.asciz	"still a single bucket in brigade"

	.no_dead_strip	_test_truncfile
.subsections_via_symbols
