	.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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	(%rdi), %r14
	callq	_dump_present
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	_EEXIST@GOTPCREL(%rip), %rax
LBB0_7:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	movq	_PHYSDEV_CONTROL_FW_RESET_MASK@GOTPCREL(%rip), %rax
	movq	_PHYSDEV_CONTROL_DD_MASK@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_lancer_physdev_ctrl
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	%r15, %rdi
	callq	_lancer_wait_idle
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.5:
	movq	%r15, %rdi
	callq	_dump_present
	xorl	%ebx, %ebx
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_3:
	movl	%eax, %ebx
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Previous dump not cleared, not forcing dump\n"

	.comm	_EEXIST,4,2                     ## @EEXIST
	.comm	_PHYSDEV_CONTROL_FW_RESET_MASK,4,2 ## @PHYSDEV_CONTROL_FW_RESET_MASK
	.comm	_PHYSDEV_CONTROL_DD_MASK,4,2    ## @PHYSDEV_CONTROL_DD_MASK
L_.str.1:                               ## @.str.1
	.asciz	"FW reset failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"FW dump not generated\n"

	.comm	_EIO,4,2                        ## @EIO
.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	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
	mov	x20, x0
	ldr	x19, [x0]
	bl	_dump_present
	cbz	x0, LBB0_4
; %bb.1:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_info
Lloh2:
	adrp	x8, _EEXIST@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EEXIST@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_3:
	mov	x0, x21
	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
LBB0_4:
Lloh4:
	adrp	x8, _PHYSDEV_CONTROL_FW_RESET_MASK@GOTPAGE
Lloh5:
	ldr	x8, [x8, _PHYSDEV_CONTROL_FW_RESET_MASK@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _PHYSDEV_CONTROL_DD_MASK@GOTPAGE
Lloh8:
	ldr	x9, [x9, _PHYSDEV_CONTROL_DD_MASK@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	x0, x20
	bl	_lancer_physdev_ctrl
	tbnz	w0, #31, LBB0_8
; %bb.5:
	mov	x0, x20
	bl	_lancer_wait_idle
	mov	x21, x0
	cbnz	w0, LBB0_3
; %bb.6:
	mov	x0, x20
	bl	_dump_present
	cbz	x0, LBB0_9
; %bb.7:
	mov	w21, #0
	b	LBB0_3
LBB0_8:
	mov	x21, x0
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	b	LBB0_3
LBB0_9:
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh14:
	adrp	x8, _EIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
	b	LBB0_2
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Previous dump not cleared, not forcing dump\n"

	.comm	_EEXIST,4,2                     ; @EEXIST
	.comm	_PHYSDEV_CONTROL_FW_RESET_MASK,4,2 ; @PHYSDEV_CONTROL_FW_RESET_MASK
	.comm	_PHYSDEV_CONTROL_DD_MASK,4,2    ; @PHYSDEV_CONTROL_DD_MASK
l_.str.1:                               ; @.str.1
	.asciz	"FW reset failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"FW dump not generated\n"

	.comm	_EIO,4,2                        ; @EIO
.subsections_via_symbols
