	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lancer_initiate_dump           ## -- Begin function lancer_initiate_dump
	.p2align	4, 0x90
_lancer_initiate_dump:                  ## @lancer_initiate_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_PHYSDEV_CONTROL_FW_RESET_MASK@GOTPCREL(%rip), %rax
	movq	_PHYSDEV_CONTROL_DD_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_lancer_physdev_ctrl
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	%r14, %rdi
	callq	_lancer_wait_idle
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%r14, %rdi
	callq	_dump_present
	xorl	%ebx, %ebx
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	movl	$-1, %ebx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_5
LBB0_1:
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
LBB0_5:
	movq	(%r14), %rdi
	callq	_dev_err
LBB0_6:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PHYSDEV_CONTROL_FW_RESET_MASK,4,2 ## @PHYSDEV_CONTROL_FW_RESET_MASK
	.comm	_PHYSDEV_CONTROL_DD_MASK,4,2    ## @PHYSDEV_CONTROL_DD_MASK
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Firmware reset failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"Dump image not present\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_lancer_initiate_dump           ; -- Begin function lancer_initiate_dump
	.p2align	2
_lancer_initiate_dump:                  ; @lancer_initiate_dump
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _PHYSDEV_CONTROL_FW_RESET_MASK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PHYSDEV_CONTROL_FW_RESET_MASK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _PHYSDEV_CONTROL_DD_MASK@GOTPAGE
Lloh4:
	ldr	x9, [x9, _PHYSDEV_CONTROL_DD_MASK@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_lancer_physdev_ctrl
	tbnz	w0, #31, LBB0_4
; %bb.1:
	mov	x0, x19
	bl	_lancer_wait_idle
	mov	x20, x0
	cbnz	w0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_dump_present
	cbz	w0, LBB0_5
; %bb.3:
	mov	w20, #0
	b	LBB0_7
LBB0_4:
	mov	x20, x0
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_6
LBB0_5:
	mov	w20, #-1
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_6:
	ldr	x0, [x19]
	bl	_dev_err
LBB0_7:
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PHYSDEV_CONTROL_FW_RESET_MASK,4,2 ; @PHYSDEV_CONTROL_FW_RESET_MASK
	.comm	_PHYSDEV_CONTROL_DD_MASK,4,2    ; @PHYSDEV_CONTROL_DD_MASK
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Firmware reset failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"Dump image not present\n"

.subsections_via_symbols
