	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function qed_mcp_trace_dump
_qed_mcp_trace_dump:                    ## @qed_mcp_trace_dump
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %rbx
	movl	%ecx, %r14d
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r13
	movq	%rdi, %r15
	movl	$0, -76(%rbp)
	movl	$0, (%r8)
	movq	_DBG_GRC_PARAM_NO_MCP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_qed_grc_get_param
	movl	%eax, %r12d
	leaq	-100(%rbp), %rdx
	leaq	-80(%rbp), %rcx
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_qed_mcp_trace_get_data_info
	movq	_DBG_STATUS_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_20
## %bb.1:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%rbx, -112(%rbp)                ## 8-byte Spill
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movq	%r15, %rdx
	movl	%r14d, %ecx
	movl	$1, %r8d
	callq	_qed_dump_common_global_params
	movslq	%eax, %rbx
	leaq	(%r15,%rbx,4), %rdi
	leaq	L_.str(%rip), %rdx
	leaq	L_.str.1(%rip), %rcx
	movl	%r14d, %esi
	callq	_qed_dump_str_param
	addl	%eax, %ebx
	xorl	%eax, %eax
	testl	%r14d, %r14d
	movl	%r14d, -72(%rbp)                ## 4-byte Spill
	je	LBB0_2
## %bb.3:
	testl	%r12d, %r12d
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jne	LBB0_7
## %bb.4:
	movq	-88(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_qed_mcp_halt
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_DP_NOTICE
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_2:
	movq	-64(%rbp), %r13                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_5:
	movb	$1, %al
LBB0_7:
	movl	%eax, -96(%rbp)                 ## 4-byte Spill
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movl	-80(%rbp), %edi
	addl	$4, %edi
	movq	_BYTES_IN_DWORD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_DIV_ROUND_UP
	movl	%eax, %r12d
	movl	%eax, -92(%rbp)                 ## 4-byte Spill
	movslq	%ebx, %rbx
	leaq	(%r15,%rbx,4), %rdi
	leaq	L_.str.3(%rip), %rdx
	movl	-72(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_qed_dump_section_hdr
	addl	%eax, %ebx
	movslq	%ebx, %rbx
	leaq	(%r15,%rbx,4), %rdi
	leaq	L_.str.4(%rip), %rdx
	movl	%r14d, %esi
	movl	%r12d, %ecx
	callq	_qed_dump_num_param
	addl	%eax, %ebx
	movq	%r15, %r12
	movslq	%ebx, %r15
	leaq	(%r12,%r15,4), %r12
	movl	-100(%rbp), %edi
	callq	_BYTES_TO_DWORDS
	movq	_SPLIT_TYPE_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	subq	$8, %rsp
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	movq	%rdi, %r13
	movq	%r12, %rdx
	movl	%r14d, %ecx
	movl	%eax, %r8d
	movl	-92(%rbp), %r9d                 ## 4-byte Reload
	pushq	$0
	pushq	%rbx
	pushq	$0
	callq	_qed_grc_dump_addr_range
	addq	$32, %rsp
	addl	%eax, %r15d
	cmpb	$0, -96(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_10
## %bb.8:
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_resume
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.5(%rip), %rsi
	movq	%r13, %rdi
	callq	_DP_NOTICE
LBB0_10:
	movl	-72(%rbp), %r14d                ## 4-byte Reload
	testl	%r14d, %r14d
	sete	%r12b
	movslq	%r15d, %rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rbx,4), %rdi
	leaq	L_.str.6(%rip), %rdx
	movl	%r14d, %esi
	movl	$1, %ecx
	callq	_qed_dump_section_hdr
	addl	%eax, %ebx
	movq	_DBG_GRC_PARAM_MCP_TRACE_META_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_qed_grc_get_param
	movl	%eax, -48(%rbp)
	testl	%eax, %eax
	setne	%al
	xorl	%r13d, %r13d
	testb	%al, %r12b
	jne	LBB0_14
## %bb.11:
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_14
## %bb.12:
	movl	-80(%rbp), %edx
	leaq	-116(%rbp), %rcx
	leaq	-76(%rbp), %r8
	leaq	-48(%rbp), %r9
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_trace_get_meta_info
	movq	_DBG_STATUS_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	jne	LBB0_14
## %bb.13:
	movl	-48(%rbp), %edi
	callq	_BYTES_TO_DWORDS
	movl	%eax, %r13d
LBB0_14:
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movslq	%ebx, %r15
	leaq	(%r12,%r15,4), %rdi
	leaq	L_.str.4(%rip), %rdx
	movl	%r14d, %esi
	movl	%r13d, %ecx
	callq	_qed_dump_num_param
	addl	%eax, %r15d
	testl	%r14d, %r14d
	je	LBB0_15
## %bb.16:
	testl	%r13d, %r13d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	je	LBB0_18
## %bb.17:
	movl	-76(%rbp), %edx
	movl	-48(%rbp), %ecx
	movslq	%r15d, %rax
	leaq	(%r12,%rax,4), %r8
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_qed_mcp_trace_read_meta
	jmp	LBB0_18
LBB0_15:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
LBB0_18:
	xorl	%ebx, %ebx
	movq	_DBG_STATUS_OK@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	cmovel	%r13d, %ebx
	addl	%r15d, %ebx
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	movl	%eax, %r14d
	callq	_qed_dump_last_section
	addl	%ebx, %eax
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movl	%eax, (%rcx)
	movl	%r14d, %eax
	cmpl	$0, -68(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_20
## %bb.19:
	movq	_DBG_STATUS_NVRAM_GET_IMAGE_FAILED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_20:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DBG_GRC_PARAM_NO_MCP,4,2       ## @DBG_GRC_PARAM_NO_MCP
	.comm	_DBG_STATUS_OK,4,2              ## @DBG_STATUS_OK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dump-type"

L_.str.1:                               ## @.str.1
	.asciz	"mcp-trace"

L_.str.2:                               ## @.str.2
	.asciz	"MCP halt failed!\n"

	.comm	_BYTES_IN_DWORD,4,2             ## @BYTES_IN_DWORD
L_.str.3:                               ## @.str.3
	.asciz	"mcp_trace_data"

L_.str.4:                               ## @.str.4
	.asciz	"size"

	.comm	_SPLIT_TYPE_NONE,4,2            ## @SPLIT_TYPE_NONE
L_.str.5:                               ## @.str.5
	.asciz	"Failed to resume MCP after halt!\n"

L_.str.6:                               ## @.str.6
	.asciz	"mcp_trace_meta"

	.comm	_DBG_GRC_PARAM_MCP_TRACE_META_SIZE,4,2 ## @DBG_GRC_PARAM_MCP_TRACE_META_SIZE
	.comm	_DBG_STATUS_NVRAM_GET_IMAGE_FAILED,4,2 ## @DBG_STATUS_NVRAM_GET_IMAGE_FAILED
	.no_dead_strip	_qed_mcp_trace_dump
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function qed_mcp_trace_dump
_qed_mcp_trace_dump:                    ; @qed_mcp_trace_dump
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x19, x4
	mov	x20, x3
	mov	x21, x2
	mov	x23, x1
	mov	x24, x0
	str	wzr, [sp, #16]
	str	wzr, [x4]
Lloh0:
	adrp	x8, _DBG_GRC_PARAM_NO_MCP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DBG_GRC_PARAM_NO_MCP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_qed_grc_get_param
	mov	x22, x0
	add	x2, sp, #28
	add	x3, sp, #24
	mov	x0, x24
	mov	x1, x23
	bl	_qed_mcp_trace_get_data_info
	mov	x25, x0
Lloh3:
	adrp	x8, _DBG_STATUS_OK@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DBG_STATUS_OK@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_19
; %bb.1:
	str	w22, [sp, #8]                   ; 4-byte Folded Spill
	mov	x0, x24
	mov	x1, x23
	mov	x2, x21
	mov	x3, x20
	mov	w4, #1
	bl	_qed_dump_common_global_params
	mov	x26, x0
	add	x0, x21, w0, sxtw #2
Lloh6:
	adrp	x2, l_.str@PAGE
Lloh7:
	add	x2, x2, l_.str@PAGEOFF
Lloh8:
	adrp	x3, l_.str.1@PAGE
Lloh9:
	add	x3, x3, l_.str.1@PAGEOFF
	mov	x1, x20
	bl	_qed_dump_str_param
	mov	w28, #0
	add	w27, w0, w26
	cbz	w20, LBB0_6
; %bb.2:
	ldr	w8, [sp, #8]                    ; 4-byte Folded Reload
	cbnz	w8, LBB0_6
; %bb.3:
	mov	x0, x24
	mov	x1, x23
	bl	_qed_mcp_halt
	cbz	w0, LBB0_5
; %bb.4:
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x24
	bl	_DP_NOTICE
	mov	w28, #0
	b	LBB0_6
LBB0_5:
	mov	w28, #1
LBB0_6:
	ldr	w8, [sp, #24]
	add	w0, w8, #4
Lloh12:
	adrp	x8, _BYTES_IN_DWORD@GOTPAGE
Lloh13:
	ldr	x8, [x8, _BYTES_IN_DWORD@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	bl	_DIV_ROUND_UP
	mov	x26, x0
	add	x0, x21, w27, sxtw #2
Lloh15:
	adrp	x2, l_.str.3@PAGE
Lloh16:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x1, x20
	mov	w3, #1
	bl	_qed_dump_section_hdr
	add	w22, w0, w27
	add	x0, x21, w22, sxtw #2
Lloh17:
	adrp	x2, l_.str.4@PAGE
Lloh18:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x1, x20
	mov	x3, x26
	bl	_qed_dump_num_param
	add	w22, w22, w0
	add	x27, x21, w22, sxtw #2
	ldr	w0, [sp, #28]
	bl	_BYTES_TO_DWORDS
	mov	x4, x0
Lloh19:
	adrp	x8, _SPLIT_TYPE_NONE@GOTPAGE
Lloh20:
	ldr	x8, [x8, _SPLIT_TYPE_NONE@GOTPAGEOFF]
Lloh21:
	ldr	w7, [x8]
	str	wzr, [sp]
	mov	x0, x24
	mov	x1, x23
	mov	x2, x27
	mov	x3, x20
	mov	x5, x26
	mov	w6, #0
	bl	_qed_grc_dump_addr_range
	add	w22, w0, w22
	cbz	w28, LBB0_9
; %bb.7:
	mov	x0, x24
	mov	x1, x23
	bl	_qed_mcp_resume
	cbz	x0, LBB0_9
; %bb.8:
Lloh22:
	adrp	x1, l_.str.5@PAGE
Lloh23:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x24
	bl	_DP_NOTICE
LBB0_9:
	add	x0, x21, w22, sxtw #2
Lloh24:
	adrp	x2, l_.str.6@PAGE
Lloh25:
	add	x2, x2, l_.str.6@PAGEOFF
	mov	x1, x20
	mov	w3, #1
	bl	_qed_dump_section_hdr
	mov	x27, x0
Lloh26:
	adrp	x8, _DBG_GRC_PARAM_MCP_TRACE_META_SIZE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DBG_GRC_PARAM_MCP_TRACE_META_SIZE@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x24
	bl	_qed_grc_get_param
	mov	w26, #0
	cmp	w0, #0
	ccmp	w20, #0, #0, ne
	add	w27, w27, w22
	str	w0, [sp, #12]
	b.eq	LBB0_13
; %bb.10:
	ldr	w28, [sp, #8]                   ; 4-byte Folded Reload
	cbnz	w28, LBB0_15
; %bb.11:
	ldr	w2, [sp, #24]
	add	x3, sp, #20
	add	x4, sp, #16
	add	x5, sp, #12
	mov	x0, x24
	mov	x1, x23
	bl	_qed_mcp_trace_get_meta_info
	mov	x25, x0
Lloh29:
	adrp	x8, _DBG_STATUS_OK@GOTPAGE
Lloh30:
	ldr	x8, [x8, _DBG_STATUS_OK@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_14
; %bb.12:
	ldr	w0, [sp, #12]
	bl	_BYTES_TO_DWORDS
	mov	x26, x0
	b	LBB0_15
LBB0_13:
	ldr	w28, [sp, #8]                   ; 4-byte Folded Reload
	b	LBB0_15
LBB0_14:
	mov	w26, #0
LBB0_15:
	add	x0, x21, w27, sxtw #2
Lloh32:
	adrp	x2, l_.str.4@PAGE
Lloh33:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x1, x20
	mov	x3, x26
	bl	_qed_dump_num_param
	add	w22, w0, w27
	cbz	w20, LBB0_18
; %bb.16:
	cbz	w26, LBB0_18
; %bb.17:
	ldp	w3, w2, [sp, #12]
	add	x4, x21, w22, sxtw #2
	mov	x0, x24
	mov	x1, x23
	bl	_qed_mcp_trace_read_meta
	mov	x25, x0
LBB0_18:
Lloh34:
	adrp	x8, _DBG_STATUS_OK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _DBG_STATUS_OK@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
	cmp	w25, w8
	csel	w8, w26, wzr, eq
	add	w23, w8, w22
	mov	x0, x21
	mov	x1, x23
	mov	x2, x20
	bl	_qed_dump_last_section
	add	w8, w23, w0
	str	w8, [x19]
Lloh37:
	adrp	x8, _DBG_STATUS_NVRAM_GET_IMAGE_FAILED@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DBG_STATUS_NVRAM_GET_IMAGE_FAILED@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	cmp	w28, #0
	csel	w25, w25, w8, eq
LBB0_19:
	mov	x0, x25
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.cfi_endproc
                                        ; -- End function
	.comm	_DBG_GRC_PARAM_NO_MCP,4,2       ; @DBG_GRC_PARAM_NO_MCP
	.comm	_DBG_STATUS_OK,4,2              ; @DBG_STATUS_OK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dump-type"

l_.str.1:                               ; @.str.1
	.asciz	"mcp-trace"

l_.str.2:                               ; @.str.2
	.asciz	"MCP halt failed!\n"

	.comm	_BYTES_IN_DWORD,4,2             ; @BYTES_IN_DWORD
l_.str.3:                               ; @.str.3
	.asciz	"mcp_trace_data"

l_.str.4:                               ; @.str.4
	.asciz	"size"

	.comm	_SPLIT_TYPE_NONE,4,2            ; @SPLIT_TYPE_NONE
l_.str.5:                               ; @.str.5
	.asciz	"Failed to resume MCP after halt!\n"

l_.str.6:                               ; @.str.6
	.asciz	"mcp_trace_meta"

	.comm	_DBG_GRC_PARAM_MCP_TRACE_META_SIZE,4,2 ; @DBG_GRC_PARAM_MCP_TRACE_META_SIZE
	.comm	_DBG_STATUS_NVRAM_GET_IMAGE_FAILED,4,2 ; @DBG_STATUS_NVRAM_GET_IMAGE_FAILED
	.no_dead_strip	_qed_mcp_trace_dump
.subsections_via_symbols
