	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function extendbody
_extendbody:                            ## @extendbody
	.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
	movl	%esi, %r15d
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_TESTSZ@GOTPCREL(%rip), %r13
	movl	(%r13), %eax
	incl	%eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	xorl	%eax, %eax
	callq	_FSTEST_ENTER
	movq	_O_CREAT@GOTPCREL(%rip), %rax
	movq	_O_RDWR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movl	%r15d, %eax
	testl	%r15d, %r15d
	je	LBB0_2
## %bb.1:
	movq	_O_APPEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_2:
	orl	%eax, %esi
	leaq	L_.str(%rip), %rdi
	callq	_rump_sys_open
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_RL
	movl	%ebx, %edi
	movl	%r15d, %esi
	callq	_rump_sys_ftruncate
	movl	%eax, %edi
	callq	_RL
	leaq	-56(%rbp), %rsi
	movl	%ebx, %edi
	callq	_rump_sys_fstat
	movl	%eax, %edi
	callq	_RL
	movl	-56(%rbp), %edi
	movl	%r15d, %esi
	callq	_ATF_REQUIRE_EQ
	movq	_TESTSTR@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movl	(%r13), %edx
	movl	%ebx, %edi
	callq	_rump_sys_write
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_ATF_REQUIRE_EQ
	movl	(%r13), %edx
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%r15d, %ecx
	callq	_rump_sys_pread
	movl	(%r13), %esi
	movl	%eax, %edi
	callq	_ATF_REQUIRE_EQ
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_ATF_REQUIRE_STREQ
	movl	%ebx, %edi
	leaq	-56(%rbp), %rsi
	callq	_rump_sys_fstat
	movl	%eax, %edi
	callq	_RL
	movl	-56(%rbp), %edi
	addl	(%r13), %r15d
	movl	%r15d, %esi
	callq	_ATF_REQUIRE_EQ
	movl	%ebx, %edi
	callq	_rump_sys_close
	movl	%eax, %edi
	callq	_RL
	xorl	%eax, %eax
	callq	_FSTEST_EXIT
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_4
## %bb.3:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_TESTSZ,4,2                     ## @TESTSZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"testfile"

	.comm	_O_CREAT,4,2                    ## @O_CREAT
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_APPEND,4,2                   ## @O_APPEND
	.comm	_TESTSTR,4,2                    ## @TESTSTR
	.no_dead_strip	_extendbody
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function extendbody
_extendbody:                            ; @extendbody
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #16
	mov	x19, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x22, _TESTSZ@GOTPAGE
Lloh4:
	ldr	x22, [x22, _TESTSZ@GOTPAGEOFF]
	ldr	w8, [x22]
	add	w8, w8, #1
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	bl	_FSTEST_ENTER
Lloh7:
	adrp	x8, _O_CREAT@GOTPAGE
Lloh8:
	ldr	x8, [x8, _O_CREAT@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
Lloh10:
	adrp	x9, _O_RDWR@GOTPAGE
Lloh11:
	ldr	x9, [x9, _O_RDWR@GOTPAGEOFF]
Lloh12:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh13:
	adrp	x9, _O_APPEND@GOTPAGE
Lloh14:
	ldr	x9, [x9, _O_APPEND@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	cmp	w19, #0
	csel	w9, wzr, w9, eq
	orr	w1, w8, w9
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	bl	_rump_sys_open
	mov	x21, x0
	bl	_RL
	mov	x0, x21
	mov	x1, x19
	bl	_rump_sys_ftruncate
	bl	_RL
	sub	x1, x29, #64
	mov	x0, x21
	bl	_rump_sys_fstat
	bl	_RL
	ldur	w0, [x29, #-64]
	mov	x1, x19
	bl	_ATF_REQUIRE_EQ
Lloh18:
	adrp	x23, _TESTSTR@GOTPAGE
Lloh19:
	ldr	x23, [x23, _TESTSTR@GOTPAGEOFF]
	ldr	w1, [x23]
	ldr	w2, [x22]
	mov	x0, x21
	bl	_rump_sys_write
	ldr	w1, [x22]
	bl	_ATF_REQUIRE_EQ
	ldr	w2, [x22]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_rump_sys_pread
	ldr	w1, [x22]
	bl	_ATF_REQUIRE_EQ
	ldr	w1, [x23]
	mov	x0, x20
	bl	_ATF_REQUIRE_STREQ
	sub	x1, x29, #64
	mov	x0, x21
	bl	_rump_sys_fstat
	bl	_RL
	ldur	w0, [x29, #-64]
	ldr	w8, [x22]
	add	w1, w8, w19
	bl	_ATF_REQUIRE_EQ
	mov	x0, x21
	bl	_rump_sys_close
	bl	_RL
	bl	_FSTEST_EXIT
	ldur	x8, [x29, #-56]
Lloh20:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh21:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh22:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TESTSZ,4,2                     ; @TESTSZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"testfile"

	.comm	_O_CREAT,4,2                    ; @O_CREAT
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_APPEND,4,2                   ; @O_APPEND
	.comm	_TESTSTR,4,2                    ; @TESTSTR
	.no_dead_strip	_extendbody
.subsections_via_symbols
