	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpc_read_packet_from_file
_rpc_read_packet_from_file:             ## @rpc_read_packet_from_file
	.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
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	%rax, %r14
	movq	_BUFF_SIZE@GOTPCREL(%rip), %r12
	cmpl	$0, (%r12)
	jle	LBB0_2
## %bb.4:
	xorl	%ebx, %ebx
	movq	_P@GOTPCREL(%rip), %r13
	leaq	L_.str.2(%rip), %r15
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rdx
	addq	%rbx, %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_fscanf
	cmpl	$1, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	incq	%rbx
	movslq	(%r12), %rax
	cmpq	%rax, %rbx
	jl	LBB0_5
	jmp	LBB0_7
LBB0_3:
	leaq	L_.str.1(%rip), %rdi
	movq	%rbx, %rsi
	xorl	%eax, %eax
	callq	_kprintf
	jmp	LBB0_9
LBB0_2:
	xorl	%ebx, %ebx
LBB0_7:
	movq	%r14, %rdi
	callq	_fclose
	cmpl	(%r12), %ebx
	jne	LBB0_10
## %bb.8:
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_kprintf
LBB0_9:
	movl	$-1, %ebx
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r"

L_.str.1:                               ## @.str.1
	.asciz	"fopen (\"%s\", \"r\") failed. %m\n"

	.comm	_BUFF_SIZE,4,2                  ## @BUFF_SIZE
L_.str.2:                               ## @.str.2
	.asciz	"%x"

	.comm	_P,8,3                          ## @P
L_.str.3:                               ## @.str.3
	.asciz	"RPC packet is too big.\n"

	.no_dead_strip	_rpc_read_packet_from_file
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpc_read_packet_from_file
_rpc_read_packet_from_file:             ; @rpc_read_packet_from_file
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x19, x0
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x0
Lloh2:
	adrp	x22, _BUFF_SIZE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _BUFF_SIZE@GOTPAGEOFF]
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x19, #0
Lloh4:
	adrp	x23, _P@GOTPAGE
Lloh5:
	ldr	x23, [x23, _P@GOTPAGEOFF]
Lloh6:
	adrp	x21, l_.str.2@PAGE
Lloh7:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x23]
	add	x2, x19, x8
	mov	x0, x20
	mov	x1, x21
	bl	_fscanf
	cmp	w0, #1
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x19, x19, #1
	ldrsw	x8, [x22]
	cmp	x19, x8
	b.lt	LBB0_3
	b	LBB0_7
LBB0_5:
	str	x19, [sp]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_6:
	mov	w19, #0
LBB0_7:
	mov	x0, x20
	bl	_fclose
	ldr	w8, [x22]
	cmp	w19, w8
	b.ne	LBB0_10
; %bb.8:
Lloh10:
	adrp	x0, l_.str.3@PAGE
Lloh11:
	add	x0, x0, l_.str.3@PAGEOFF
LBB0_9:
	bl	_kprintf
	mov	w19, #-1
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #80
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r"

l_.str.1:                               ; @.str.1
	.asciz	"fopen (\"%s\", \"r\") failed. %m\n"

	.comm	_BUFF_SIZE,4,2                  ; @BUFF_SIZE
l_.str.2:                               ; @.str.2
	.asciz	"%x"

	.comm	_P,8,3                          ; @P
l_.str.3:                               ; @.str.3
	.asciz	"RPC packet is too big.\n"

	.no_dead_strip	_rpc_read_packet_from_file
.subsections_via_symbols
