	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __rap_lseek
___rap_lseek:                           ## @__rap_lseek
	.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	%r12
	pushq	%rbx
	subq	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movl	%edx, %r14d
	movq	%rsi, %rdi
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	callq	_RIORAP_FD
	movq	%rax, %rbx
	movq	_RMT_SEEK@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, -80(%rbp)
	movl	%r15d, -76(%rbp)
	leaq	-72(%rbp), %rdi
	movl	%r14d, %esi
	callq	_r_write_be64
	leaq	-80(%rbp), %r14
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$10, %edx
	callq	_r_socket_write
	movq	%rbx, %rdi
	callq	_r_socket_flush
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	$9, %edx
	callq	_r_socket_read_block
	cmpl	$9, %eax
	jne	LBB0_3
## %bb.1:
	movl	-80(%rbp), %esi
	movq	_RMT_REPLY@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	(%r12), %edx
	cmpl	%edx, %esi
	jne	LBB0_4
## %bb.2:
	leaq	-80(%rbp), %rdi
	movl	$1, %esi
	callq	_r_read_at_be64
	jmp	LBB0_6
LBB0_3:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	callq	_eprintf
	jmp	LBB0_5
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_eprintf
LBB0_5:
	movl	$-1, %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RMT_SEEK,4,2                   ## @RMT_SEEK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Truncated socket read\n"

	.comm	_RMT_REPLY,4,2                  ## @RMT_REPLY
L_.str.1:                               ## @.str.1
	.asciz	"Unexpected lseek reply (%02x -> %02x)\n"

	.no_dead_strip	___rap_lseek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __rap_lseek
___rap_lseek:                           ; @__rap_lseek
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x3
	mov	x20, x2
	mov	x0, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	bl	_RIORAP_FD
	mov	x21, x0
Lloh3:
	adrp	x22, _RMT_SEEK@GOTPAGE
Lloh4:
	ldr	x22, [x22, _RMT_SEEK@GOTPAGEOFF]
	ldr	w8, [x22]
	stp	w8, w19, [sp, #16]
	add	x8, sp, #16
	add	x0, x8, #8
	mov	x1, x20
	bl	_r_write_be64
	add	x1, sp, #16
	mov	x0, x21
	mov	w2, #10
	bl	_r_socket_write
	mov	x0, x21
	bl	_r_socket_flush
	add	x1, sp, #16
	mov	x0, x21
	mov	w2, #9
	bl	_r_socket_read_block
	cmp	w0, #9
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [sp, #16]
	ldr	w9, [x22]
Lloh5:
	adrp	x10, _RMT_REPLY@GOTPAGE
Lloh6:
	ldr	x10, [x10, _RMT_REPLY@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	orr	w9, w10, w9
	cmp	w8, w9
	b.ne	LBB0_4
; %bb.2:
	add	x0, sp, #16
	mov	w1, #1
	bl	_r_read_at_be64
	b	LBB0_6
LBB0_3:
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_5
LBB0_4:
	stp	x8, x9, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_5:
	bl	_eprintf
	mov	w0, #-1
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RMT_SEEK,4,2                   ; @RMT_SEEK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Truncated socket read\n"

	.comm	_RMT_REPLY,4,2                  ; @RMT_REPLY
l_.str.1:                               ; @.str.1
	.asciz	"Unexpected lseek reply (%02x -> %02x)\n"

	.no_dead_strip	___rap_lseek
.subsections_via_symbols
