	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BufFileSeek                    ## -- Begin function BufFileSeek
	.p2align	4, 0x90
_BufFileSeek:                           ## @BufFileSeek
	.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	%rdx, %r15
	movq	%rdi, %r14
	cmpl	$130, %ecx
	je	LBB0_5
## %bb.1:
	cmpl	$128, %ecx
	jne	LBB0_4
## %bb.2:
	movl	%esi, %ebx
	testl	%esi, %esi
	js	LBB0_3
## %bb.6:
	testq	%r15, %r15
	jns	LBB0_10
	jmp	LBB0_7
LBB0_5:
	movl	(%r14), %ebx
	movslq	16(%r14), %rax
	addq	8(%r14), %r15
	addq	%rax, %r15
	testq	%r15, %r15
	jns	LBB0_10
LBB0_7:
	movq	_MAX_PHYSICAL_FILESIZE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jle	LBB0_3
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	decl	%ebx
	addq	%rax, %r15
	js	LBB0_8
LBB0_10:
	cmpl	(%r14), %ebx
	jne	LBB0_14
## %bb.11:
	movq	8(%r14), %rax
	cmpq	%rax, %r15
	jl	LBB0_14
## %bb.12:
	movq	24(%r14), %rcx
	addq	%rax, %rcx
	cmpq	%rcx, %r15
	jle	LBB0_13
LBB0_14:
	movq	%r14, %rdi
	callq	_BufFileFlush
	testq	%rax, %rax
	jne	LBB0_3
## %bb.15:
	movl	32(%r14), %eax
	cmpl	%eax, %ebx
	sete	%cl
	testq	%r15, %r15
	sete	%dl
	andb	%cl, %dl
	movq	_MAX_PHYSICAL_FILESIZE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movzbl	%dl, %edx
	subl	%edx, %ebx
	testb	%dl, %dl
	cmovneq	%rcx, %r15
	cmpq	%rcx, %r15
	jle	LBB0_19
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	cmpl	%eax, %ebx
	jge	LBB0_3
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	subq	%rcx, %r15
	cmpq	%rcx, %r15
	jg	LBB0_17
LBB0_19:
	cmpl	%eax, %ebx
	jge	LBB0_3
## %bb.20:
	movl	%ebx, (%r14)
	movq	%r15, 8(%r14)
	movl	$0, 16(%r14)
	movq	$0, 24(%r14)
	jmp	LBB0_21
LBB0_4:
	movq	_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ecx, %edx
	callq	_elog
LBB0_3:
	movq	_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_22:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	subl	%eax, %r15d
	movl	%r15d, 16(%r14)
LBB0_21:
	xorl	%eax, %eax
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.comm	_EOF,4,2                        ## @EOF
	.comm	_ERROR,4,2                      ## @ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"invalid whence: %d"

	.comm	_MAX_PHYSICAL_FILESIZE,8,3      ## @MAX_PHYSICAL_FILESIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_BufFileSeek                    ; -- Begin function BufFileSeek
	.p2align	2
_BufFileSeek:                           ; @BufFileSeek
	.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	x20, x2
	mov	x19, x0
	cmp	w3, #130
	b.eq	LBB0_4
; %bb.1:
	cmp	w3, #128
	b.ne	LBB0_17
; %bb.2:
	mov	x21, x1
	tbnz	w1, #31, LBB0_18
; %bb.3:
	tbz	x20, #63, LBB0_8
	b	LBB0_5
LBB0_4:
	ldr	w21, [x19]
	ldr	x8, [x19, #8]
	ldrsw	x9, [x19, #16]
	add	x8, x8, x20
	add	x20, x8, x9
	tbz	x20, #63, LBB0_8
LBB0_5:
Lloh0:
	adrp	x8, _MAX_PHYSICAL_FILESIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_PHYSICAL_FILESIZE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w21, #0
	b.le	LBB0_18
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	w21, w21, #1
	adds	x20, x20, x8
	b.mi	LBB0_6
LBB0_8:
	ldr	w8, [x19]
	cmp	w21, w8
	b.ne	LBB0_11
; %bb.9:
	ldr	x8, [x19, #8]
	cmp	x20, x8
	b.lt	LBB0_11
; %bb.10:
	ldr	x9, [x19, #24]
	add	x9, x9, x8
	cmp	x20, x9
	b.le	LBB0_20
LBB0_11:
	mov	x0, x19
	bl	_BufFileFlush
	cbnz	x0, LBB0_18
; %bb.12:
	ldr	w8, [x19, #32]
	cmp	w21, w8
	cset	w9, eq
	cmp	x20, #0
Lloh3:
	adrp	x10, _MAX_PHYSICAL_FILESIZE@GOTPAGE
Lloh4:
	ldr	x10, [x10, _MAX_PHYSICAL_FILESIZE@GOTPAGEOFF]
	cset	w12, eq
Lloh5:
	ldr	x11, [x10]
	ands	w10, w9, w12
	csel	x9, x11, x20, ne
	sub	w10, w21, w10
	cmp	x9, x11
	b.le	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	add	w10, w10, #1
	cmp	w10, w8
	b.ge	LBB0_18
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	sub	x9, x9, x11
	cmp	x9, x11
	b.gt	LBB0_13
LBB0_15:
	cmp	w10, w8
	b.ge	LBB0_18
; %bb.16:
	mov	w0, #0
	str	w10, [x19]
	str	x9, [x19, #8]
	str	wzr, [x19, #16]
	str	xzr, [x19, #24]
	b	LBB0_19
LBB0_17:
Lloh6:
	adrp	x8, _ERROR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ERROR@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x3
	bl	_elog
LBB0_18:
Lloh11:
	adrp	x8, _EOF@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EOF@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
LBB0_19:
	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
LBB0_20:
	mov	w0, #0
	sub	w8, w20, w8
	str	w8, [x19, #16]
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_EOF,4,2                        ; @EOF
	.comm	_ERROR,4,2                      ; @ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"invalid whence: %d"

	.comm	_MAX_PHYSICAL_FILESIZE,8,3      ; @MAX_PHYSICAL_FILESIZE
.subsections_via_symbols
