	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxic_nfc_setup_data_interface
_mxic_nfc_setup_data_interface:         ## @mxic_nfc_setup_data_interface
	.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	%rdx, %rbx
	movl	%esi, %r15d
	callq	_nand_get_controller_data
	movq	%rax, %r14
	movq	%rbx, %rdi
	callq	_nand_get_sdr_timings
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_1
## %bb.7:
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_NAND_DATA_IFACE_CHECK_ONLY@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	je	LBB0_6
## %bb.2:
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movslq	(%rbx), %rcx
	imulq	$274877907, %rcx, %rcx          ## imm = 0x10624DD3
	movq	%rcx, %rdx
	shrq	$63, %rdx
	sarq	$38, %rcx
	addl	%edx, %ecx
	cltd
	idivl	%ecx
	movslq	%eax, %r15
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mxic_nfc_set_freq
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	8(%r14), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdx
	callq	_dev_err
LBB0_4:
	cmpl	$29999, (%rbx)                  ## imm = 0x752F
	jg	LBB0_6
## %bb.5:
	movq	_DATA_STROB_EDO_EN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DATA_STROB@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	(%r14), %rsi
	callq	_writel
LBB0_6:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NAND_DATA_IFACE_CHECK_ONLY,4,2 ## @NAND_DATA_IFACE_CHECK_ONLY
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set freq:%ld failed\n"

	.comm	_DATA_STROB_EDO_EN,4,2          ## @DATA_STROB_EDO_EN
	.comm	_DATA_STROB,8,3                 ## @DATA_STROB
	.no_dead_strip	_mxic_nfc_setup_data_interface
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxic_nfc_setup_data_interface
_mxic_nfc_setup_data_interface:         ; @mxic_nfc_setup_data_interface
	.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, x2
	mov	x21, x1
	bl	_nand_get_controller_data
	mov	x19, x0
	mov	x0, x20
	bl	_nand_get_sdr_timings
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_2
; %bb.1:
	mov	x0, x20
	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
	b	_PTR_ERR
LBB0_2:
Lloh0:
	adrp	x8, _NAND_DATA_IFACE_CHECK_ONLY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NAND_DATA_IFACE_CHECK_ONLY@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_7
; %bb.3:
Lloh3:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldrsw	x9, [x20]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w9, w9, w10
	sdiv	w8, w8, w9
	sxtw	x21, w8
	mov	x0, x19
	mov	x1, x21
	bl	_mxic_nfc_set_freq
	cbz	w0, LBB0_5
; %bb.4:
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x21
	bl	_dev_err
LBB0_5:
	ldr	w8, [x20]
	mov	w9, #29999
	cmp	w8, w9
	b.gt	LBB0_7
; %bb.6:
Lloh8:
	adrp	x8, _DATA_STROB_EDO_EN@GOTPAGE
Lloh9:
	ldr	x8, [x8, _DATA_STROB_EDO_EN@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	ldr	x8, [x19]
Lloh11:
	adrp	x9, _DATA_STROB@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DATA_STROB@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
LBB0_7:
	mov	w0, #0
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_NAND_DATA_IFACE_CHECK_ONLY,4,2 ; @NAND_DATA_IFACE_CHECK_ONLY
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set freq:%ld failed\n"

	.comm	_DATA_STROB_EDO_EN,4,2          ; @DATA_STROB_EDO_EN
	.comm	_DATA_STROB,8,3                 ; @DATA_STROB
	.no_dead_strip	_mxic_nfc_setup_data_interface
.subsections_via_symbols
