	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ReadRdpFile
_ReadRdpFile:                           ## @ReadRdpFile
	.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
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rdi, %rbx
	xorl	%r14d, %r14d
	xorl	%esi, %esi
	callq	_GetFileSize
	testl	%eax, %eax
	je	LBB0_7
## %bb.2:
	movl	%eax, %r15d
	xorl	%eax, %eax
	callq	_GetProcessHeap
	leal	2(%r15), %edx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.3:
	movq	%rax, %r14
	leaq	-28(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%rax, %rsi
	movl	%r15d, %edx
	xorl	%r8d, %r8d
	callq	_ReadFile
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	-28(%rbp), %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	addl	%eax, %ecx
	sarl	%ecx
	movslq	%ecx, %rax
	movq	$0, (%r14,%rax,8)
	jmp	LBB0_7
LBB0_5:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r14, %rdx
	callq	_HeapFree
LBB0_6:
	xorl	%r14d, %r14d
LBB0_7:
	movq	%r14, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_ReadRdpFile
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ReadRdpFile
_ReadRdpFile:                           ; @ReadRdpFile
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
	mov	x1, #0
	bl	_GetFileSize
	cbz	w0, LBB0_6
; %bb.2:
	mov	x21, x0
	bl	_GetProcessHeap
	add	w2, w21, #2
	mov	w1, #0
	bl	_HeapAlloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.3:
	add	x3, sp, #12
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x4, #0
	bl	_ReadFile
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	str	xzr, [x19, w8, sxtw #3]
	b	LBB0_7
LBB0_5:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x19
	bl	_HeapFree
LBB0_6:
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_ReadRdpFile
.subsections_via_symbols
