	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uboot_loadaddr                 ## -- Begin function uboot_loadaddr
	.p2align	4, 0x90
_uboot_loadaddr:                        ## @uboot_loadaddr
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdx, %rdx
	je	LBB0_1
## %bb.25:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rdx, %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_roundup2                       ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rdi
	callq	_ub_env_get
	testq	%rax, %rax
	je	LBB0_2
## %bb.24:
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_strtoul                        ## TAILCALL
LBB0_2:
	xorl	%eax, %eax
	callq	_ub_get_sys_info
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	callq	_panic
LBB0_4:
	movq	__start@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_KERN_ALIGN@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	callq	_rounddown2
	movq	%rax, %r14
	movq	_uboot_heap_end@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movl	(%rbx), %esi
	callq	_roundup2
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:
	movl	$16, %r12d
	xorl	%r15d, %r15d
	movq	_MR_ATTR_DRAM@GOTPCREL(%rip), %rdi
	xorl	%ebx, %ebx
	xorl	%ecx, %ecx
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	subq	%rsi, %rax
	cmpq	%rax, %rdx
	cmovleq	%rsi, %rcx
	cmovgq	%rdx, %rax
LBB0_18:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%rcx, %rdx
	movq	%rax, %rsi
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%rsi, %rbx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	cmovlq	%rdx, %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	cmovleq	%rsi, %rbx
	movl	(%r13), %eax
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%r15
	movslq	%eax, %rcx
	addq	$24, %r12
	cmpq	%rcx, %r15
	jge	LBB0_21
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rcx
	movq	-16(%rcx,%r12), %rdx
	cmpq	(%rdi), %rdx
	jne	LBB0_20
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rcx,%r12), %rdi
	movq	_KERN_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_roundup2
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %r14
	movq	8(%r13), %rax
	movslq	-8(%rax,%r12), %rdi
	addq	(%rax,%r12), %rdi
	movq	_KERN_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_rounddown2
	testq	%rbx, %rbx
	jne	LBB0_9
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	_KERN_MINADDR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	jmp	LBB0_11
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ecx, %ecx
LBB0_11:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	%r14, %r13
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movq	_MR_ATTR_DRAM@GOTPCREL(%rip), %rdi
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	addq	%rdx, %rcx
	movq	%r14, %rdx
	subq	%rcx, %rdx
	jl	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%rax, %r14
	jl	LBB0_13
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	cmpq	%rcx, %r14
	jge	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	$0, %edx
	movl	$0, %esi
	cmpq	-56(%rbp), %rax                 ## 8-byte Folded Reload
	jle	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	cmpq	%rcx, %rdx
	cmovgq	%rdx, %rcx
	subq	%rcx, %rax
	jmp	LBB0_18
LBB0_15:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_19
LBB0_21:
	testq	%rbx, %rbx
	jne	LBB0_23
	jmp	LBB0_22
LBB0_5:
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
LBB0_22:
	leaq	L_.str.2(%rip), %rdi
	callq	_panic
LBB0_23:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	addq	$40, %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	"loader_kernaddr"

L_.str.1:                               ## @.str.1
	.asciz	"could not retrieve system info"

	.comm	__start,8,3                     ## @_start
	.comm	_KERN_ALIGN,4,2                 ## @KERN_ALIGN
	.comm	_uboot_heap_end,8,3             ## @uboot_heap_end
	.comm	_MR_ATTR_DRAM,8,3               ## @MR_ATTR_DRAM
	.comm	_KERN_MINADDR,8,3               ## @KERN_MINADDR
L_.str.2:                               ## @.str.2
	.asciz	"Not enough DRAM to load kernel"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_uboot_loadaddr                 ; -- Begin function uboot_loadaddr
	.p2align	2
_uboot_loadaddr:                        ; @uboot_loadaddr
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	x2, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x2
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_roundup2
LBB0_2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_ub_env_get
	cbz	x0, LBB0_4
; %bb.3:
	mov	x1, #0
	mov	w2, #16
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_strtoul
LBB0_4:
	bl	_ub_get_sys_info
	mov	x19, x0
	cbnz	x0, LBB0_6
; %bb.5:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_panic
LBB0_6:
Lloh7:
	adrp	x8, __start@GOTPAGE
Lloh8:
	ldr	x8, [x8, __start@GOTPAGEOFF]
Lloh9:
	ldr	x0, [x8]
Lloh10:
	adrp	x24, _KERN_ALIGN@GOTPAGE
Lloh11:
	ldr	x24, [x24, _KERN_ALIGN@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_rounddown2
	mov	x21, x0
Lloh12:
	adrp	x8, _uboot_heap_end@GOTPAGE
Lloh13:
	ldr	x8, [x8, _uboot_heap_end@GOTPAGEOFF]
Lloh14:
	ldr	x0, [x8]
	ldr	w1, [x24]
	bl	_roundup2
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_17
; %bb.7:
	mov	x22, x0
	mov	x26, #0
	mov	x27, #0
	mov	x25, #0
	mov	x20, #0
Lloh15:
	adrp	x28, _MR_ATTR_DRAM@GOTPAGE
Lloh16:
	ldr	x28, [x28, _MR_ATTR_DRAM@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:                                 ;   in Loop: Header=BB0_11 Depth=1
	sub	x10, x0, x22
	cmp	x9, x10
	csel	x8, x8, x22, gt
	csel	x9, x9, x10, gt
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	cmp	x25, x9
	csel	x20, x8, x20, lt
	csel	x25, x25, x9, gt
	ldr	w8, [x19]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x27, x27, #1
	add	x26, x26, #24
	cmp	x27, w8, sxtw
	b.ge	LBB0_16
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x10, [x9, x26]
	ldr	x11, [x28]
	cmp	x10, x11
	b.ne	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x9, x26
	ldr	x0, [x8, #16]
	ldr	w1, [x24]
	bl	_roundup2
	mov	x23, x0
	ldr	x8, [x19, #8]
	add	x8, x8, x26
	ldr	x9, [x8, #16]
	ldrsw	x8, [x8, #8]
	add	x0, x9, x8
	ldr	w1, [x24]
	bl	_rounddown2
Lloh17:
	adrp	x8, _KERN_MINADDR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KERN_MINADDR@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	cmp	x25, #0
	csel	x8, x8, xzr, eq
	add	x8, x8, x23
	subs	x9, x21, x8
	ccmp	x21, x0, #0, ge
	b.lt	LBB0_8
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	x21, x8
	ccmp	x0, x22, #4, lt
	b.gt	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, #0
	mov	x9, #0
	b	LBB0_9
LBB0_15:                                ;   in Loop: Header=BB0_11 Depth=1
	cmp	x22, x8
	csel	x8, x22, x8, gt
	sub	x9, x0, x8
	b	LBB0_9
LBB0_16:
	cbnz	x25, LBB0_19
	b	LBB0_18
LBB0_17:
	mov	x20, #0
LBB0_18:
Lloh20:
	adrp	x0, l_.str.2@PAGE
Lloh21:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_panic
LBB0_19:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"loader_kernaddr"

l_.str.1:                               ; @.str.1
	.asciz	"could not retrieve system info"

	.comm	__start,8,3                     ; @_start
	.comm	_KERN_ALIGN,4,2                 ; @KERN_ALIGN
	.comm	_uboot_heap_end,8,3             ; @uboot_heap_end
	.comm	_MR_ATTR_DRAM,8,3               ; @MR_ATTR_DRAM
	.comm	_KERN_MINADDR,8,3               ; @KERN_MINADDR
l_.str.2:                               ; @.str.2
	.asciz	"Not enough DRAM to load kernel"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
.subsections_via_symbols
