	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function do_write
_do_write:                              ## @do_write
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edi, %ebx
	movq	_bsize@GOTPCREL(%rip), %r13
	movq	(%r13), %rsi
	movl	$1, %edi
	callq	_calloc
	movq	%rax, %r12
	movq	(%r13), %rsi
	movl	$1, %edi
	callq	_calloc
	testq	%r12, %r12
	je	LBB0_2
## %bb.1:
	movq	%rax, %r14
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	xorl	%eax, %eax
	callq	_random
	movq	_fsize@GOTPCREL(%rip), %rcx
	cltd
	idivl	(%rcx)
	movq	_offset@GOTPCREL(%rip), %rax
	movslq	%edx, %r15
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_strcpy
	movq	(%r13), %rdx
	movl	%ebx, %edi
	movq	%r12, %rsi
	callq	_write
	cmpq	(%r13), %rax
	jl	LBB0_7
## %bb.8:
	movq	_rflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.9:
	movq	_offset@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	%r15, %rsi
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	callq	_lseek
	testq	%rax, %rax
	js	LBB0_10
## %bb.11:
	movq	(%r13), %rdx
	movl	%ebx, %edi
	movq	%r14, %rsi
	callq	_read
	movq	(%r13), %rdx
	cmpq	%rdx, %rax
	jl	LBB0_12
## %bb.13:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_memcmp
	testq	%rax, %rax
	jne	LBB0_14
LBB0_15:
	movq	_vflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.16:
	movq	_stderr@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movq	_offset@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	addq	%r15, %rdx
	leaq	L_.str.6(%rip), %rsi
	callq	_fprintf
	movq	_rflag@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_18
## %bb.17:
	movl	(%rbx), %edi
	movq	_offset@GOTPCREL(%rip), %rax
	addq	(%rax), %r15
	leaq	L_.str.7(%rip), %rsi
	movq	%r15, %rdx
	callq	_fprintf
LBB0_18:
	movq	%r12, %rdi
	callq	_free
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_free                           ## TAILCALL
LBB0_2:
	callq	_do_write.cold.1
	jmp	LBB0_3
LBB0_5:
	callq	_do_write.cold.2
	jmp	LBB0_3
LBB0_7:
	callq	_do_write.cold.3
	jmp	LBB0_3
LBB0_10:
	callq	_do_write.cold.4
	jmp	LBB0_3
LBB0_12:
	callq	_do_write.cold.5
	jmp	LBB0_3
LBB0_14:
	callq	_do_write.cold.6
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function do_write.cold.1
_do_write.cold.1:                       ## @do_write.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	$4
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function do_write.cold.2
_do_write.cold.2:                       ## @do_write.cold.2
	.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.1(%rip), %rdi
	callq	_perror
	pushq	$5
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function do_write.cold.3
_do_write.cold.3:                       ## @do_write.cold.3
	.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.3(%rip), %rdi
	callq	_perror
	pushq	$6
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function do_write.cold.4
_do_write.cold.4:                       ## @do_write.cold.4
	.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.1(%rip), %rdi
	callq	_perror
	pushq	$7
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function do_write.cold.5
_do_write.cold.5:                       ## @do_write.cold.5
	.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.4(%rip), %rdi
	callq	_perror
	pushq	$8
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function do_write.cold.6
_do_write.cold.6:                       ## @do_write.cold.6
	.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.5(%rip), %rdi
	callq	_perror
	pushq	$9
	popq	%rdi
	callq	_exit
	.cfi_endproc
                                        ## -- End function
	.comm	_bsize,8,3                      ## @bsize
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"malloc"

	.comm	_fsize,4,2                      ## @fsize
	.comm	_offset,8,3                     ## @offset
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
L_.str.1:                               ## @.str.1
	.asciz	"lseek"

L_.str.2:                               ## @.str.2
	.asciz	"ZFS Test Suite Truncation Test"

L_.str.3:                               ## @.str.3
	.asciz	"write"

	.comm	_rflag,8,3                      ## @rflag
L_.str.4:                               ## @.str.4
	.asciz	"read"

L_.str.5:                               ## @.str.5
	.asciz	"memcmp"

	.comm	_vflag,8,3                      ## @vflag
	.comm	_stderr,4,2                     ## @stderr
L_.str.6:                               ## @.str.6
	.asciz	"Wrote to offset %ld\n"

L_.str.7:                               ## @.str.7
	.asciz	"Read back from offset %ld\n"

	.no_dead_strip	_do_write
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_write
_do_write:                              ; @do_write
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x21, x0
Lloh0:
	adrp	x24, _bsize@GOTPAGE
Lloh1:
	ldr	x24, [x24, _bsize@GOTPAGEOFF]
	ldr	x1, [x24]
	mov	w0, #1
	bl	_calloc
	mov	x19, x0
	ldr	x1, [x24]
	mov	w0, #1
	bl	_calloc
	cmp	x19, #0
	ccmp	x0, #0, #4, ne
	b.eq	LBB0_11
; %bb.1:
	mov	x20, x0
	bl	_random
Lloh2:
	adrp	x8, _fsize@GOTPAGE
Lloh3:
	ldr	x8, [x8, _fsize@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	sdiv	w9, w0, w8
	msub	w8, w9, w8, w0
Lloh5:
	adrp	x22, _offset@GOTPAGE
Lloh6:
	ldr	x22, [x22, _offset@GOTPAGEOFF]
	ldr	x9, [x22]
	sxtw	x23, w8
	add	x1, x9, x23
Lloh7:
	adrp	x26, _SEEK_SET@GOTPAGE
Lloh8:
	ldr	x26, [x26, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x26]
	mov	x0, x21
	bl	_lseek
	tbnz	x0, #63, LBB0_12
; %bb.2:
Lloh9:
	adrp	x1, l_.str.2@PAGE
Lloh10:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_strcpy
	ldr	x2, [x24]
	mov	x0, x21
	mov	x1, x19
	bl	_write
	ldr	x8, [x24]
	cmp	x0, x8
	b.lt	LBB0_13
; %bb.3:
Lloh11:
	adrp	x25, _rflag@GOTPAGE
Lloh12:
	ldr	x25, [x25, _rflag@GOTPAGEOFF]
	ldr	x8, [x25]
	cbz	x8, LBB0_7
; %bb.4:
	ldr	x8, [x22]
	add	x1, x8, x23
	ldr	w2, [x26]
	mov	x0, x21
	bl	_lseek
	tbnz	x0, #63, LBB0_14
; %bb.5:
	ldr	x2, [x24]
	mov	x0, x21
	mov	x1, x20
	bl	_read
	ldr	x2, [x24]
	cmp	x0, x2
	b.lt	LBB0_15
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_memcmp
	cbnz	x0, LBB0_16
LBB0_7:
Lloh13:
	adrp	x8, _vflag@GOTPAGE
Lloh14:
	ldr	x8, [x8, _vflag@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	cbz	x8, LBB0_10
; %bb.8:
Lloh16:
	adrp	x21, _stderr@GOTPAGE
Lloh17:
	ldr	x21, [x21, _stderr@GOTPAGEOFF]
	ldr	w0, [x21]
	ldr	x8, [x22]
	add	x2, x8, x23
Lloh18:
	adrp	x1, l_.str.6@PAGE
Lloh19:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	ldr	x8, [x25]
	cbz	x8, LBB0_10
; %bb.9:
	ldr	w0, [x21]
	ldr	x8, [x22]
	add	x2, x8, x23
Lloh20:
	adrp	x1, l_.str.7@PAGE
Lloh21:
	add	x1, x1, l_.str.7@PAGEOFF
	bl	_fprintf
LBB0_10:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_free
LBB0_11:
	bl	_do_write.cold.1
LBB0_12:
	bl	_do_write.cold.2
LBB0_13:
	bl	_do_write.cold.3
LBB0_14:
	bl	_do_write.cold.4
LBB0_15:
	bl	_do_write.cold.5
LBB0_16:
	bl	_do_write.cold.6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function do_write.cold.1
_do_write.cold.1:                       ; @do_write.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
Lloh22:
	adrp	x0, l_.str@PAGE
Lloh23:
	add	x0, x0, l_.str@PAGEOFF
	bl	_perror
	mov	w0, #4
	bl	_exit
	.loh AdrpAdd	Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function do_write.cold.2
_do_write.cold.2:                       ; @do_write.cold.2
	.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
Lloh24:
	adrp	x0, l_.str.1@PAGE
Lloh25:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	mov	w0, #5
	bl	_exit
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function do_write.cold.3
_do_write.cold.3:                       ; @do_write.cold.3
	.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
Lloh26:
	adrp	x0, l_.str.3@PAGE
Lloh27:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_perror
	mov	w0, #6
	bl	_exit
	.loh AdrpAdd	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function do_write.cold.4
_do_write.cold.4:                       ; @do_write.cold.4
	.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
Lloh28:
	adrp	x0, l_.str.1@PAGE
Lloh29:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	mov	w0, #7
	bl	_exit
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function do_write.cold.5
_do_write.cold.5:                       ; @do_write.cold.5
	.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
Lloh30:
	adrp	x0, l_.str.4@PAGE
Lloh31:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_perror
	mov	w0, #8
	bl	_exit
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function do_write.cold.6
_do_write.cold.6:                       ; @do_write.cold.6
	.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
Lloh32:
	adrp	x0, l_.str.5@PAGE
Lloh33:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_perror
	mov	w0, #9
	bl	_exit
	.loh AdrpAdd	Lloh32, Lloh33
	.cfi_endproc
                                        ; -- End function
	.comm	_bsize,8,3                      ; @bsize
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"malloc"

	.comm	_fsize,4,2                      ; @fsize
	.comm	_offset,8,3                     ; @offset
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
l_.str.1:                               ; @.str.1
	.asciz	"lseek"

l_.str.2:                               ; @.str.2
	.asciz	"ZFS Test Suite Truncation Test"

l_.str.3:                               ; @.str.3
	.asciz	"write"

	.comm	_rflag,8,3                      ; @rflag
l_.str.4:                               ; @.str.4
	.asciz	"read"

l_.str.5:                               ; @.str.5
	.asciz	"memcmp"

	.comm	_vflag,8,3                      ; @vflag
	.comm	_stderr,4,2                     ; @stderr
l_.str.6:                               ; @.str.6
	.asciz	"Wrote to offset %ld\n"

l_.str.7:                               ; @.str.7
	.asciz	"Read back from offset %ld\n"

	.no_dead_strip	_do_write
.subsections_via_symbols
