	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function test_bwrite
_test_bwrite:                           ## @test_bwrite
	.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
	movl	(%rbx), %edi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rsi
	callq	_apr_brigade_create
	movq	%rax, %rbx
	movq	_COUNT@GOTPCREL(%rip), %rax
	cmpl	$0, (%rax)
	jle	LBB0_3
## %bb.1:
	xorl	%r14d, %r14d
	movq	_THESTR@GOTPCREL(%rip), %r13
	leaq	L_.str(%rip), %r12
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %ecx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	$4, %r8d
	callq	_apr_brigade_write
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_apr_assert_success
	incl	%r14d
	movq	_COUNT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r14d
	jl	LBB0_2
LBB0_3:
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$1, %esi
	callq	_apr_brigade_length
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	movl	%eax, %edx
	callq	_apr_assert_success
	movslq	-44(%rbp), %rax
	movq	_COUNT@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	shlq	$2, %rcx
	xorl	%edx, %edx
	cmpq	%rax, %rcx
	sete	%dl
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	callq	_ABTS_ASSERT
	movq	%rbx, %rdi
	callq	_apr_brigade_destroy
	movq	-56(%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
	.comm	_COUNT,4,2                      ## @COUNT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"brigade_write"

	.comm	_THESTR,4,2                     ## @THESTR
L_.str.1:                               ## @.str.1
	.asciz	"determine brigade length"

L_.str.2:                               ## @.str.2
	.asciz	"brigade has correct length"

	.no_dead_strip	_test_bwrite
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function test_bwrite
_test_bwrite:                           ; @test_bwrite
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x0
Lloh0:
	adrp	x21, _p@GOTPAGE
Lloh1:
	ldr	x21, [x21, _p@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_apr_bucket_alloc_create
	mov	x19, x0
	ldr	w0, [x21]
	mov	x1, x19
	bl	_apr_brigade_create
	mov	x21, x0
Lloh2:
	adrp	x23, _COUNT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _COUNT@GOTPAGEOFF]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	w24, #0
Lloh4:
	adrp	x25, _THESTR@GOTPAGE
Lloh5:
	ldr	x25, [x25, _THESTR@GOTPAGEOFF]
Lloh6:
	adrp	x22, l_.str@PAGE
Lloh7:
	add	x22, x22, l_.str@PAGEOFF
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w3, [x25]
	mov	x0, x21
	mov	x1, #0
	mov	x2, #0
	mov	w4, #4
	bl	_apr_brigade_write
	mov	x2, x0
	mov	x0, x20
	mov	x1, x22
	bl	_apr_assert_success
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.lt	LBB0_2
LBB0_3:
	add	x2, sp, #12
	mov	x0, x21
	mov	w1, #1
	bl	_apr_brigade_length
	mov	x2, x0
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_apr_assert_success
	ldrsw	x8, [sp, #12]
	ldrsw	x9, [x23]
	cmp	x8, x9, lsl #2
	cset	w2, eq
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_ABTS_ASSERT
	mov	x0, x21
	bl	_apr_brigade_destroy
	mov	x0, x19
	bl	_apr_bucket_alloc_destroy
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_p,4,2                          ; @p
	.comm	_COUNT,4,2                      ; @COUNT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"brigade_write"

	.comm	_THESTR,4,2                     ; @THESTR
l_.str.1:                               ; @.str.1
	.asciz	"determine brigade length"

l_.str.2:                               ; @.str.2
	.asciz	"brigade has correct length"

	.no_dead_strip	_test_bwrite
.subsections_via_symbols
