	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function seekAndWriteFd
_seekAndWriteFd:                        ## @seekAndWriteFd
	.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
	movq	%r8, %r15
	movl	%esi, %r14d
	movl	%edi, %ebx
	xorl	%edi, %edi
	cmpl	$131072, %ecx                   ## imm = 0x20000
	setb	%dil
	callq	_assert
	xorl	%edi, %edi
	cmpl	$3, %ebx
	setge	%dil
	callq	_assert
	xorl	%edi, %edi
	testq	%r15, %r15
	setne	%dil
	callq	_assert
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%ebx, %edi
	movl	%r14d, %esi
	callq	_lseek
	movl	$-1, %edi
	callq	_SimulateIOError
	movq	_TIMER_ELAPSED@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdi
	callq	_OSTRACE
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r15)
	movl	$-1, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TIMER_START,4,2                ## @TIMER_START
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_errno,4,2                      ## @errno
	.comm	_EINTR,4,2                      ## @EINTR
	.comm	_TIMER_END,4,2                  ## @TIMER_END
	.comm	_TIMER_ELAPSED,4,2              ## @TIMER_ELAPSED
	.no_dead_strip	_seekAndWriteFd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function seekAndWriteFd
_seekAndWriteFd:                        ; @seekAndWriteFd
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x4
	mov	x20, x1
	mov	x21, x0
	cmp	w3, #32, lsl #12                ; =131072
	cset	w0, lo
	bl	_assert
	cmp	w21, #2
	cset	w0, gt
	bl	_assert
	cmp	x19, #0
	cset	w0, ne
	bl	_assert
Lloh0:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	bl	_lseek
	mov	w0, #-1
	bl	_SimulateIOError
Lloh3:
	adrp	x8, _TIMER_ELAPSED@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TIMER_ELAPSED@GOTPAGEOFF]
Lloh5:
	ldrsw	x0, [x8]
	bl	_OSTRACE
Lloh6:
	adrp	x8, _errno@GOTPAGE
Lloh7:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x19]
	mov	w0, #-1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TIMER_START,4,2                ; @TIMER_START
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_errno,4,2                      ; @errno
	.comm	_EINTR,4,2                      ; @EINTR
	.comm	_TIMER_END,4,2                  ; @TIMER_END
	.comm	_TIMER_ELAPSED,4,2              ; @TIMER_ELAPSED
	.no_dead_strip	_seekAndWriteFd
.subsections_via_symbols
