	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function remote_fileio_func_fstat
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_remote_fileio_func_fstat:              ## @remote_fileio_func_fstat
	.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
	subq	$120, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, -32(%rbp)
	leaq	-32(%rbp), %rdi
	leaq	-64(%rbp), %rsi
	callq	_remote_fileio_extract_int
	testq	%rax, %rax
	je	LBB0_2
LBB0_1:
	xorl	%eax, %eax
	callq	_remote_fileio_ioerror
	jmp	LBB0_18
LBB0_2:
	movl	-64(%rbp), %edi
	callq	_remote_fileio_map_fd
	movl	%eax, %ebx
	movq	_FIO_FD_INVALID@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	callq	_remote_fileio_badfd
LBB0_18:
	addq	$120, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	leaq	-32(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_remote_fileio_extract_long
	testq	%rax, %rax
	jne	LBB0_1
## %bb.5:
	movq	-56(%rbp), %r14
	movq	_remote_fio_no_longjmp@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	movq	_FIO_FD_CONSOLE_IN@GOTPCREL(%rip), %r15
	cmpl	(%r15), %ebx
	je	LBB0_7
## %bb.6:
	movq	_FIO_FD_CONSOLE_OUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_7
## %bb.12:
	leaq	-136(%rbp), %rsi
	movl	%ebx, %edi
	callq	_fstat
	movl	%eax, %r15d
	cmpl	$-1, %eax
	jne	LBB0_15
	jmp	LBB0_13
LBB0_7:
	movl	$1, %edi
	callq	_remote_fileio_to_fio_uint
	movq	_S_IFCHR@GOTPCREL(%rip), %rax
	cmpl	(%r15), %ebx
	jne	LBB0_8
## %bb.9:
	movq	_S_IRUSR@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_8:
	movq	_S_IWUSR@GOTPCREL(%rip), %rcx
LBB0_10:
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	%ecx, -136(%rbp)
	movl	$1, -132(%rbp)
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_getuid
	movl	%eax, -68(%rbp)
	xorl	%eax, %eax
	callq	_getgid
	movl	%eax, -72(%rbp)
	xorps	%xmm0, %xmm0
	movups	%xmm0, -88(%rbp)
	movl	$512, -128(%rbp)                ## imm = 0x200
	leaq	-40(%rbp), %rdi
	xorl	%esi, %esi
	callq	_gettimeofday
	testl	%eax, %eax
	je	LBB0_11
## %bb.14:
	xorps	%xmm0, %xmm0
	movups	%xmm0, -120(%rbp)
	movq	$0, -104(%rbp)
	jmp	LBB0_15
LBB0_11:
	movq	-40(%rbp), %rax
	movq	%rax, -120(%rbp)
	movq	%rax, -112(%rbp)
	movq	%rax, -104(%rbp)
LBB0_15:
	testq	%r14, %r14
	je	LBB0_17
## %bb.16:
	leaq	-136(%rbp), %rdi
	leaq	-48(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_remote_fileio_to_fio_stat
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	$4, %edx
	callq	_remote_fileio_write_bytes
	cmpl	$4, %eax
	jne	LBB0_13
LBB0_17:
	movl	%r15d, %edi
	callq	_remote_fileio_return_success
	jmp	LBB0_18
LBB0_13:
	movl	$-1, %edi
	callq	_remote_fileio_return_errno
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_FIO_FD_INVALID,4,2             ## @FIO_FD_INVALID
	.comm	_remote_fio_no_longjmp,4,2      ## @remote_fio_no_longjmp
	.comm	_FIO_FD_CONSOLE_IN,4,2          ## @FIO_FD_CONSOLE_IN
	.comm	_FIO_FD_CONSOLE_OUT,4,2         ## @FIO_FD_CONSOLE_OUT
	.comm	_S_IFCHR,4,2                    ## @S_IFCHR
	.comm	_S_IRUSR,4,2                    ## @S_IRUSR
	.comm	_S_IWUSR,4,2                    ## @S_IWUSR
	.no_dead_strip	_remote_fileio_func_fstat
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function remote_fileio_func_fstat
_remote_fileio_func_fstat:              ; @remote_fileio_func_fstat
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	stur	x0, [x29, #-40]
	sub	x0, x29, #40
	sub	x1, x29, #48
	bl	_remote_fileio_extract_int
	cbz	x0, LBB0_2
LBB0_1:
	bl	_remote_fileio_ioerror
	b	LBB0_4
LBB0_2:
	ldur	w0, [x29, #-48]
	bl	_remote_fileio_map_fd
Lloh0:
	adrp	x8, _FIO_FD_INVALID@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FIO_FD_INVALID@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_5
; %bb.3:
	bl	_remote_fileio_badfd
LBB0_4:
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_5:
	mov	x20, x0
	sub	x0, x29, #40
	sub	x1, x29, #56
	bl	_remote_fileio_extract_long
	cbnz	x0, LBB0_1
; %bb.6:
	ldur	x19, [x29, #-56]
Lloh3:
	adrp	x8, _remote_fio_no_longjmp@GOTPAGE
Lloh4:
	ldr	x8, [x8, _remote_fio_no_longjmp@GOTPAGEOFF]
	mov	w21, #1
Lloh5:
	str	w21, [x8]
Lloh6:
	adrp	x22, _FIO_FD_CONSOLE_IN@GOTPAGE
Lloh7:
	ldr	x22, [x22, _FIO_FD_CONSOLE_IN@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh8:
	adrp	x9, _FIO_FD_CONSOLE_OUT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _FIO_FD_CONSOLE_OUT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmp	w20, w8
	ccmp	w20, w9, #4, ne
	b.ne	LBB0_9
; %bb.7:
	mov	w0, #1
	bl	_remote_fileio_to_fio_uint
Lloh11:
	adrp	x8, _S_IFCHR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _S_IFCHR@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	ldr	w9, [x22]
Lloh14:
	adrp	x10, _S_IRUSR@GOTPAGE
Lloh15:
	ldr	x10, [x10, _S_IRUSR@GOTPAGEOFF]
Lloh16:
	adrp	x11, _S_IWUSR@GOTPAGE
Lloh17:
	ldr	x11, [x11, _S_IWUSR@GOTPAGEOFF]
	cmp	w20, w9
	csel	x9, x10, x11, eq
	ldr	w9, [x9]
	orr	w8, w9, w8
	stp	w8, w21, [sp, #16]
	bl	_getuid
	str	w0, [sp, #84]
	bl	_getgid
	str	w0, [sp, #80]
	stp	xzr, xzr, [sp, #64]
	mov	w8, #512
	str	w8, [sp, #24]
	mov	x0, sp
	mov	x1, #0
	bl	_gettimeofday
	mov	w20, #0
	cbz	w0, LBB0_10
; %bb.8:
	stp	xzr, xzr, [sp, #32]
	str	xzr, [sp, #48]
	b	LBB0_11
LBB0_9:
	add	x1, sp, #16
	mov	x0, x20
	bl	_fstat
	mov	x20, x0
	cmn	w0, #1
	b.ne	LBB0_11
	b	LBB0_15
LBB0_10:
	ldr	x8, [sp]
	stp	x8, x8, [sp, #32]
	str	x8, [sp, #48]
LBB0_11:
	cbz	x19, LBB0_13
; %bb.12:
	add	x0, sp, #16
	add	x1, sp, #8
	bl	_remote_fileio_to_fio_stat
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #4
	bl	_remote_fileio_write_bytes
	cmp	w0, #4
	b.ne	LBB0_14
LBB0_13:
	mov	x0, x20
	bl	_remote_fileio_return_success
	b	LBB0_4
LBB0_14:
	mov	w0, #-1
LBB0_15:
	bl	_remote_fileio_return_errno
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_FIO_FD_INVALID,4,2             ; @FIO_FD_INVALID
	.comm	_remote_fio_no_longjmp,4,2      ; @remote_fio_no_longjmp
	.comm	_FIO_FD_CONSOLE_IN,4,2          ; @FIO_FD_CONSOLE_IN
	.comm	_FIO_FD_CONSOLE_OUT,4,2         ; @FIO_FD_CONSOLE_OUT
	.comm	_S_IFCHR,4,2                    ; @S_IFCHR
	.comm	_S_IRUSR,4,2                    ; @S_IRUSR
	.comm	_S_IWUSR,4,2                    ; @S_IWUSR
	.no_dead_strip	_remote_fileio_func_fstat
.subsections_via_symbols
