	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RIOBootCodeRTA                 ## -- Begin function RIOBootCodeRTA
	.p2align	4, 0x90
_RIOBootCodeRTA:                        ## @RIOBootCodeRTA
	.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	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_func_enter
	movq	_RIO_DEBUG_BOOT@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
	movl	(%rbx), %eax
	movq	_SIXTY_FOUR_K@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jle	LBB0_2
## %bb.1:
	movl	(%r13), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	_HOST_FILE_TOO_LARGE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
	callq	_func_exit
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_2:
	cmpq	$0, 24(%r14)
	je	LBB0_4
## %bb.3:
	movl	(%r13), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%r15d, %r15d
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	_BOOT_IN_PROGRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
	callq	_func_exit
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_4:
	movq	_RTA_BOOT_DATA_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	cltd
	idivl	%ecx
	movl	%ecx, %eax
	subl	%edx, %eax
	cltd
	idivl	%ecx
	movl	%edx, %r12d
	movq	16(%r14), %rdi
	xorl	%r15d, %r15d
	xorl	%esi, %esi
	callq	_memset
	movslq	%r12d, %rdi
	shlq	$2, %rdi
	addq	16(%r14), %rdi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	callq	_copy_from_user
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	movl	(%r13), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_rio_dprintk
	movq	_COPYIN_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r14)
	xorl	%eax, %eax
	callq	_func_exit
	movq	_EFAULT@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_6:
	movl	(%rbx), %ecx
	addl	%ecx, %r12d
	movl	%r12d, %eax
	cltd
	movq	_RTA_BOOT_DATA_SIZE@GOTPCREL(%rip), %rsi
	idivl	(%rsi)
	movl	%eax, (%r14)
	movl	%ecx, 4(%r14)
	xorl	%eax, %eax
	callq	_func_exit
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RIO_DEBUG_BOOT,4,2             ## @RIO_DEBUG_BOOT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Data at user address %p\n"

	.comm	_SIXTY_FOUR_K,4,2               ## @SIXTY_FOUR_K
L_.str.1:                               ## @.str.1
	.asciz	"RTA Boot Code Too Large!\n"

	.comm	_HOST_FILE_TOO_LARGE,4,2        ## @HOST_FILE_TOO_LARGE
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.2:                               ## @.str.2
	.asciz	"RTA Boot Code : BUSY BUSY BUSY!\n"

	.comm	_BOOT_IN_PROGRESS,4,2           ## @BOOT_IN_PROGRESS
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_RTA_BOOT_DATA_SIZE,4,2         ## @RTA_BOOT_DATA_SIZE
L_.str.3:                               ## @.str.3
	.asciz	"Bad data copy from user space\n"

	.comm	_COPYIN_FAILED,4,2              ## @COPYIN_FAILED
	.comm	_EFAULT,4,2                     ## @EFAULT
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RIOBootCodeRTA                 ; -- Begin function RIOBootCodeRTA
	.p2align	2
_RIOBootCodeRTA:                        ; @RIOBootCodeRTA
	.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	x20, x1
	mov	x19, x0
	bl	_func_enter
Lloh0:
	adrp	x22, _RIO_DEBUG_BOOT@GOTPAGE
Lloh1:
	ldr	x22, [x22, _RIO_DEBUG_BOOT@GOTPAGEOFF]
	ldr	w0, [x22]
	ldr	w8, [x20, #4]
	str	x8, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_rio_dprintk
	ldr	w8, [x20]
Lloh4:
	adrp	x9, _SIXTY_FOUR_K@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SIXTY_FOUR_K@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.le	LBB0_2
; %bb.1:
	ldr	w0, [x22]
Lloh7:
	adrp	x1, l_.str.1@PAGE
Lloh8:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_rio_dprintk
Lloh9:
	adrp	x8, _HOST_FILE_TOO_LARGE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _HOST_FILE_TOO_LARGE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	bl	_func_exit
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_2:
	ldr	x9, [x19, #24]
	cbz	x9, LBB0_4
; %bb.3:
	ldr	w0, [x22]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_rio_dprintk
Lloh16:
	adrp	x8, _BOOT_IN_PROGRESS@GOTPAGE
Lloh17:
	ldr	x8, [x8, _BOOT_IN_PROGRESS@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	bl	_func_exit
Lloh19:
	adrp	x8, _EBUSY@GOTPAGE
Lloh20:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
Lloh21:
	adrp	x23, _RTA_BOOT_DATA_SIZE@GOTPAGE
Lloh22:
	ldr	x23, [x23, _RTA_BOOT_DATA_SIZE@GOTPAGEOFF]
	ldr	w9, [x23]
	sdiv	w10, w8, w9
	neg	w8, w8
	madd	w8, w10, w9, w8
	add	w8, w9, w8
	sdiv	w10, w8, w9
	msub	w21, w10, w9, w8
	ldr	x0, [x19, #16]
	mov	w1, #0
	mov	x2, x21
	bl	_memset
	ldr	x8, [x19, #16]
	add	x0, x8, w21, sxtw #2
	ldp	w2, w1, [x20]
	bl	_copy_from_user
	cbz	x0, LBB0_8
; %bb.5:
	ldr	w0, [x22]
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_rio_dprintk
Lloh25:
	adrp	x8, _COPYIN_FAILED@GOTPAGE
Lloh26:
	ldr	x8, [x8, _COPYIN_FAILED@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	bl	_func_exit
Lloh28:
	adrp	x8, _EFAULT@GOTPAGE
Lloh29:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
LBB0_8:
	ldr	w8, [x20]
	add	w9, w8, w21
	ldr	w10, [x23]
	sdiv	w9, w9, w10
	stp	w9, w8, [x19]
	bl	_func_exit
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_RIO_DEBUG_BOOT,4,2             ; @RIO_DEBUG_BOOT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Data at user address %p\n"

	.comm	_SIXTY_FOUR_K,4,2               ; @SIXTY_FOUR_K
l_.str.1:                               ; @.str.1
	.asciz	"RTA Boot Code Too Large!\n"

	.comm	_HOST_FILE_TOO_LARGE,4,2        ; @HOST_FILE_TOO_LARGE
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.2:                               ; @.str.2
	.asciz	"RTA Boot Code : BUSY BUSY BUSY!\n"

	.comm	_BOOT_IN_PROGRESS,4,2           ; @BOOT_IN_PROGRESS
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_RTA_BOOT_DATA_SIZE,4,2         ; @RTA_BOOT_DATA_SIZE
l_.str.3:                               ; @.str.3
	.asciz	"Bad data copy from user space\n"

	.comm	_COPYIN_FAILED,4,2              ; @COPYIN_FAILED
	.comm	_EFAULT,4,2                     ; @EFAULT
.subsections_via_symbols
