	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt7615_mcu_gen_dl_mode
_mt7615_mcu_gen_dl_mode:                ## @mt7615_mcu_gen_dl_mode
	.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
	movl	%esi, %r14d
	movl	%edi, %esi
	movq	_FW_FEATURE_SET_ENCRYPT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_DL_MODE_ENCRYPT@GOTPCREL(%rip), %rcx
	movq	_DL_MODE_RESET_SEC_IV@GOTPCREL(%rip), %rdx
	movl	(%rdx), %ebx
	orl	(%rcx), %ebx
	andl	%edi, %eax
	testl	%eax, %eax
	cmovel	%eax, %ebx
	movq	_DL_MODE_KEY_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_FW_FEATURE_SET_KEY_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_FIELD_GET
	movl	%r15d, %edi
	movl	%eax, %esi
	callq	_FIELD_PREP
	orl	%ebx, %eax
	movq	_DL_MODE_NEED_RSP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	testl	%r14d, %r14d
	je	LBB0_2
## %bb.1:
	movq	_DL_MODE_WORKING_PDA_CR4@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r14d
LBB0_2:
	orl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FW_FEATURE_SET_ENCRYPT,4,2     ## @FW_FEATURE_SET_ENCRYPT
	.comm	_DL_MODE_ENCRYPT,4,2            ## @DL_MODE_ENCRYPT
	.comm	_DL_MODE_RESET_SEC_IV,4,2       ## @DL_MODE_RESET_SEC_IV
	.comm	_DL_MODE_KEY_IDX,4,2            ## @DL_MODE_KEY_IDX
	.comm	_FW_FEATURE_SET_KEY_IDX,4,2     ## @FW_FEATURE_SET_KEY_IDX
	.comm	_DL_MODE_NEED_RSP,4,2           ## @DL_MODE_NEED_RSP
	.comm	_DL_MODE_WORKING_PDA_CR4,4,2    ## @DL_MODE_WORKING_PDA_CR4
	.no_dead_strip	_mt7615_mcu_gen_dl_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt7615_mcu_gen_dl_mode
_mt7615_mcu_gen_dl_mode:                ; @mt7615_mcu_gen_dl_mode
	.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	x19, x1
	mov	x1, x0
Lloh0:
	adrp	x8, _FW_FEATURE_SET_ENCRYPT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FW_FEATURE_SET_ENCRYPT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DL_MODE_ENCRYPT@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DL_MODE_ENCRYPT@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
Lloh6:
	adrp	x10, _DL_MODE_RESET_SEC_IV@GOTPAGE
Lloh7:
	ldr	x10, [x10, _DL_MODE_RESET_SEC_IV@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	orr	w9, w10, w9
	tst	w8, w0
	csel	w21, wzr, w9, eq
Lloh9:
	adrp	x8, _DL_MODE_KEY_IDX@GOTPAGE
Lloh10:
	ldr	x8, [x8, _DL_MODE_KEY_IDX@GOTPAGEOFF]
Lloh11:
	ldr	w20, [x8]
Lloh12:
	adrp	x8, _FW_FEATURE_SET_KEY_IDX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _FW_FEATURE_SET_KEY_IDX@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_FIELD_GET
	mov	x1, x0
	mov	x0, x20
	bl	_FIELD_PREP
	orr	w8, w0, w21
Lloh15:
	adrp	x9, _DL_MODE_NEED_RSP@GOTPAGE
Lloh16:
	ldr	x9, [x9, _DL_MODE_NEED_RSP@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
Lloh18:
	adrp	x10, _DL_MODE_WORKING_PDA_CR4@GOTPAGE
Lloh19:
	ldr	x10, [x10, _DL_MODE_WORKING_PDA_CR4@GOTPAGEOFF]
	orr	w8, w8, w9
Lloh20:
	ldr	w9, [x10]
	cmp	w19, #0
	csel	w9, wzr, w9, eq
	orr	w0, w8, w9
	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 AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_FW_FEATURE_SET_ENCRYPT,4,2     ; @FW_FEATURE_SET_ENCRYPT
	.comm	_DL_MODE_ENCRYPT,4,2            ; @DL_MODE_ENCRYPT
	.comm	_DL_MODE_RESET_SEC_IV,4,2       ; @DL_MODE_RESET_SEC_IV
	.comm	_DL_MODE_KEY_IDX,4,2            ; @DL_MODE_KEY_IDX
	.comm	_FW_FEATURE_SET_KEY_IDX,4,2     ; @FW_FEATURE_SET_KEY_IDX
	.comm	_DL_MODE_NEED_RSP,4,2           ; @DL_MODE_NEED_RSP
	.comm	_DL_MODE_WORKING_PDA_CR4,4,2    ; @DL_MODE_WORKING_PDA_CR4
	.no_dead_strip	_mt7615_mcu_gen_dl_mode
.subsections_via_symbols
