	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_falcon_boot                    ## -- Begin function falcon_boot
	.p2align	4, 0x90
_falcon_boot:                           ## @falcon_boot
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 44(%rdi)
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r15
	movq	_FALCON_DMACTL@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	addq	48(%r15), %rdi
	movl	$1, %edx
	movl	$10, %ecx
	movl	$10000, %r8d                    ## imm = 0x2710
	callq	_readl_poll_timeout
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	(%rbx), %rdx
	xorl	%r14d, %r14d
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_falcon_writel
	movl	40(%r15), %esi
	addl	8(%r15), %esi
	sarl	$8, %esi
	movq	_FALCON_DMATRFBASE@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	callq	_falcon_writel
	cmpq	$0, 24(%r15)
	je	LBB0_7
## %bb.5:
	xorl	%ebx, %ebx
	movq	_FALCON_MEMORY_DATA@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	32(%r15), %rsi
	addq	%rbx, %rsi
	movl	(%r12), %ecx
	movq	%r15, %rdi
	movq	%rbx, %rdx
	callq	_falcon_copy_chunk
	addq	$256, %rbx                      ## imm = 0x100
	cmpq	24(%r15), %rbx
	jb	LBB0_6
LBB0_7:
	movq	16(%r15), %rsi
	movq	_FALCON_MEMORY_IMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_falcon_copy_chunk
	movl	$255, %edi
	callq	_FALCON_IRQMSET_EXT
	movq	_FALCON_IRQMSET_SWGEN1@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQMSET_SWGEN0@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQMSET_EXTERR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQMSET_HALT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQMSET_WDTMR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQMSET@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_falcon_writel
	movl	$255, %edi
	callq	_FALCON_IRQDEST_EXT
	movq	_FALCON_IRQDEST_SWGEN1@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQDEST_SWGEN0@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQDEST_EXTERR@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQDEST_HALT@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_FALCON_IRQDEST@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_falcon_writel
	movq	_FALCON_ITFEN_MTHDEN@GOTPCREL(%rip), %rax
	movq	_FALCON_ITFEN_CTXEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	_FALCON_ITFEN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	callq	_falcon_writel
	movq	_FALCON_BOOTVEC@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_falcon_writel
	movq	_FALCON_CPUCTL_STARTCPU@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_FALCON_CPUCTL@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	callq	_falcon_writel
	movq	%r15, %rdi
	callq	_falcon_wait_idle
	testl	%eax, %eax
	jns	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	movl	(%r15), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movl	%ebx, %r14d
	jmp	LBB0_9
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_9
LBB0_3:
	movl	%eax, %r14d
LBB0_9:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_FALCON_DMACTL,8,3              ## @FALCON_DMACTL
	.comm	_FALCON_DMACTL_IMEM_SCRUBBING,4,2 ## @FALCON_DMACTL_IMEM_SCRUBBING
	.comm	_FALCON_DMACTL_DMEM_SCRUBBING,4,2 ## @FALCON_DMACTL_DMEM_SCRUBBING
	.comm	_FALCON_DMATRFBASE,8,3          ## @FALCON_DMATRFBASE
	.comm	_FALCON_MEMORY_DATA,4,2         ## @FALCON_MEMORY_DATA
	.comm	_FALCON_MEMORY_IMEM,4,2         ## @FALCON_MEMORY_IMEM
	.comm	_FALCON_IRQMSET_SWGEN1,4,2      ## @FALCON_IRQMSET_SWGEN1
	.comm	_FALCON_IRQMSET_SWGEN0,4,2      ## @FALCON_IRQMSET_SWGEN0
	.comm	_FALCON_IRQMSET_EXTERR,4,2      ## @FALCON_IRQMSET_EXTERR
	.comm	_FALCON_IRQMSET_HALT,4,2        ## @FALCON_IRQMSET_HALT
	.comm	_FALCON_IRQMSET_WDTMR,4,2       ## @FALCON_IRQMSET_WDTMR
	.comm	_FALCON_IRQMSET,8,3             ## @FALCON_IRQMSET
	.comm	_FALCON_IRQDEST_SWGEN1,4,2      ## @FALCON_IRQDEST_SWGEN1
	.comm	_FALCON_IRQDEST_SWGEN0,4,2      ## @FALCON_IRQDEST_SWGEN0
	.comm	_FALCON_IRQDEST_EXTERR,4,2      ## @FALCON_IRQDEST_EXTERR
	.comm	_FALCON_IRQDEST_HALT,4,2        ## @FALCON_IRQDEST_HALT
	.comm	_FALCON_IRQDEST,8,3             ## @FALCON_IRQDEST
	.comm	_FALCON_ITFEN_MTHDEN,4,2        ## @FALCON_ITFEN_MTHDEN
	.comm	_FALCON_ITFEN_CTXEN,4,2         ## @FALCON_ITFEN_CTXEN
	.comm	_FALCON_ITFEN,8,3               ## @FALCON_ITFEN
	.comm	_FALCON_BOOTVEC,8,3             ## @FALCON_BOOTVEC
	.comm	_FALCON_CPUCTL_STARTCPU,4,2     ## @FALCON_CPUCTL_STARTCPU
	.comm	_FALCON_CPUCTL,8,3              ## @FALCON_CPUCTL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Falcon boot failed due to timeout\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_falcon_boot                    ; -- Begin function falcon_boot
	.p2align	2
_falcon_boot:                           ; @falcon_boot
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	w8, [x0, #44]
	cbz	w8, LBB0_7
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #48]
Lloh0:
	adrp	x20, _FALCON_DMACTL@GOTPAGE
Lloh1:
	ldr	x20, [x20, _FALCON_DMACTL@GOTPAGEOFF]
	ldr	x9, [x20]
	add	x0, x9, x8
	mov	w2, #1
	mov	w3, #10
	mov	w4, #10000
	bl	_readl_poll_timeout
	tbnz	w0, #31, LBB0_8
; %bb.2:
	ldr	x2, [x20]
	mov	x0, x19
	mov	w1, #0
	bl	_falcon_writel
	ldr	w8, [x19, #8]
	ldr	w9, [x19, #40]
	add	w8, w9, w8
	asr	w1, w8, #8
Lloh2:
	adrp	x8, _FALCON_DMATRFBASE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _FALCON_DMATRFBASE@GOTPAGEOFF]
Lloh4:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_falcon_writel
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_5
; %bb.3:
	mov	x20, #0
Lloh5:
	adrp	x21, _FALCON_MEMORY_DATA@GOTPAGE
Lloh6:
	ldr	x21, [x21, _FALCON_MEMORY_DATA@GOTPAGEOFF]
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #32]
	add	x1, x20, x8
	ldr	w3, [x21]
	mov	x0, x19
	mov	x2, x20
	bl	_falcon_copy_chunk
	add	x20, x20, #256
	ldr	x8, [x19, #24]
	cmp	x20, x8
	b.lo	LBB0_4
LBB0_5:
	ldr	x1, [x19, #16]
Lloh7:
	adrp	x8, _FALCON_MEMORY_IMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _FALCON_MEMORY_IMEM@GOTPAGEOFF]
Lloh9:
	ldr	w3, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_falcon_copy_chunk
	mov	w0, #255
	bl	_FALCON_IRQMSET_EXT
Lloh10:
	adrp	x8, _FALCON_IRQMSET_SWGEN1@GOTPAGE
Lloh11:
	ldr	x8, [x8, _FALCON_IRQMSET_SWGEN1@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
Lloh13:
	adrp	x9, _FALCON_IRQMSET_SWGEN0@GOTPAGE
Lloh14:
	ldr	x9, [x9, _FALCON_IRQMSET_SWGEN0@GOTPAGEOFF]
	orr	w8, w8, w0
Lloh15:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh16:
	adrp	x9, _FALCON_IRQMSET_EXTERR@GOTPAGE
Lloh17:
	ldr	x9, [x9, _FALCON_IRQMSET_EXTERR@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh19:
	adrp	x9, _FALCON_IRQMSET_HALT@GOTPAGE
Lloh20:
	ldr	x9, [x9, _FALCON_IRQMSET_HALT@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, _FALCON_IRQMSET_WDTMR@GOTPAGE
Lloh23:
	ldr	x10, [x10, _FALCON_IRQMSET_WDTMR@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh24:
	ldr	w9, [x10]
	orr	w1, w8, w9
Lloh25:
	adrp	x8, _FALCON_IRQMSET@GOTPAGE
Lloh26:
	ldr	x8, [x8, _FALCON_IRQMSET@GOTPAGEOFF]
Lloh27:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_falcon_writel
	mov	w0, #255
	bl	_FALCON_IRQDEST_EXT
Lloh28:
	adrp	x8, _FALCON_IRQDEST_SWGEN1@GOTPAGE
Lloh29:
	ldr	x8, [x8, _FALCON_IRQDEST_SWGEN1@GOTPAGEOFF]
Lloh30:
	ldr	w8, [x8]
	orr	w8, w8, w0
Lloh31:
	adrp	x9, _FALCON_IRQDEST_SWGEN0@GOTPAGE
Lloh32:
	ldr	x9, [x9, _FALCON_IRQDEST_SWGEN0@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh34:
	adrp	x9, _FALCON_IRQDEST_EXTERR@GOTPAGE
Lloh35:
	ldr	x9, [x9, _FALCON_IRQDEST_EXTERR@GOTPAGEOFF]
Lloh36:
	ldr	w9, [x9]
Lloh37:
	adrp	x10, _FALCON_IRQDEST_HALT@GOTPAGE
Lloh38:
	ldr	x10, [x10, _FALCON_IRQDEST_HALT@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh39:
	ldr	w9, [x10]
	orr	w1, w8, w9
Lloh40:
	adrp	x8, _FALCON_IRQDEST@GOTPAGE
Lloh41:
	ldr	x8, [x8, _FALCON_IRQDEST@GOTPAGEOFF]
Lloh42:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_falcon_writel
Lloh43:
	adrp	x8, _FALCON_ITFEN_MTHDEN@GOTPAGE
Lloh44:
	ldr	x8, [x8, _FALCON_ITFEN_MTHDEN@GOTPAGEOFF]
Lloh45:
	adrp	x9, _FALCON_ITFEN_CTXEN@GOTPAGE
Lloh46:
	ldr	x9, [x9, _FALCON_ITFEN_CTXEN@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
Lloh48:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh49:
	adrp	x8, _FALCON_ITFEN@GOTPAGE
Lloh50:
	ldr	x8, [x8, _FALCON_ITFEN@GOTPAGEOFF]
Lloh51:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_falcon_writel
Lloh52:
	adrp	x8, _FALCON_BOOTVEC@GOTPAGE
Lloh53:
	ldr	x8, [x8, _FALCON_BOOTVEC@GOTPAGEOFF]
Lloh54:
	ldr	x2, [x8]
	mov	x0, x19
	mov	w1, #0
	bl	_falcon_writel
Lloh55:
	adrp	x8, _FALCON_CPUCTL_STARTCPU@GOTPAGE
Lloh56:
	ldr	x8, [x8, _FALCON_CPUCTL_STARTCPU@GOTPAGEOFF]
Lloh57:
	ldr	w1, [x8]
Lloh58:
	adrp	x8, _FALCON_CPUCTL@GOTPAGE
Lloh59:
	ldr	x8, [x8, _FALCON_CPUCTL@GOTPAGEOFF]
Lloh60:
	ldr	x2, [x8]
	mov	x0, x19
	bl	_falcon_writel
	mov	x0, x19
	bl	_falcon_wait_idle
	mov	x20, x0
	mov	w0, #0
	tbz	w20, #31, LBB0_8
; %bb.6:
	ldr	w0, [x19]
Lloh61:
	adrp	x1, l_.str@PAGE
Lloh62:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	mov	x0, x20
	b	LBB0_8
LBB0_7:
Lloh63:
	adrp	x8, _EINVAL@GOTPAGE
Lloh64:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh65:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_8:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh48
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh47
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh61, Lloh62
	.loh AdrpLdrGotLdr	Lloh63, Lloh64, Lloh65
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_FALCON_DMACTL,8,3              ; @FALCON_DMACTL
	.comm	_FALCON_DMACTL_IMEM_SCRUBBING,4,2 ; @FALCON_DMACTL_IMEM_SCRUBBING
	.comm	_FALCON_DMACTL_DMEM_SCRUBBING,4,2 ; @FALCON_DMACTL_DMEM_SCRUBBING
	.comm	_FALCON_DMATRFBASE,8,3          ; @FALCON_DMATRFBASE
	.comm	_FALCON_MEMORY_DATA,4,2         ; @FALCON_MEMORY_DATA
	.comm	_FALCON_MEMORY_IMEM,4,2         ; @FALCON_MEMORY_IMEM
	.comm	_FALCON_IRQMSET_SWGEN1,4,2      ; @FALCON_IRQMSET_SWGEN1
	.comm	_FALCON_IRQMSET_SWGEN0,4,2      ; @FALCON_IRQMSET_SWGEN0
	.comm	_FALCON_IRQMSET_EXTERR,4,2      ; @FALCON_IRQMSET_EXTERR
	.comm	_FALCON_IRQMSET_HALT,4,2        ; @FALCON_IRQMSET_HALT
	.comm	_FALCON_IRQMSET_WDTMR,4,2       ; @FALCON_IRQMSET_WDTMR
	.comm	_FALCON_IRQMSET,8,3             ; @FALCON_IRQMSET
	.comm	_FALCON_IRQDEST_SWGEN1,4,2      ; @FALCON_IRQDEST_SWGEN1
	.comm	_FALCON_IRQDEST_SWGEN0,4,2      ; @FALCON_IRQDEST_SWGEN0
	.comm	_FALCON_IRQDEST_EXTERR,4,2      ; @FALCON_IRQDEST_EXTERR
	.comm	_FALCON_IRQDEST_HALT,4,2        ; @FALCON_IRQDEST_HALT
	.comm	_FALCON_IRQDEST,8,3             ; @FALCON_IRQDEST
	.comm	_FALCON_ITFEN_MTHDEN,4,2        ; @FALCON_ITFEN_MTHDEN
	.comm	_FALCON_ITFEN_CTXEN,4,2         ; @FALCON_ITFEN_CTXEN
	.comm	_FALCON_ITFEN,8,3               ; @FALCON_ITFEN
	.comm	_FALCON_BOOTVEC,8,3             ; @FALCON_BOOTVEC
	.comm	_FALCON_CPUCTL_STARTCPU,4,2     ; @FALCON_CPUCTL_STARTCPU
	.comm	_FALCON_CPUCTL,8,3              ; @FALCON_CPUCTL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Falcon boot failed due to timeout\n"

.subsections_via_symbols
