	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function meson_nfc_setup_data_interface
_meson_nfc_setup_data_interface:        ## @meson_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r14d
	callq	_to_meson_nand
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nand_get_sdr_timings
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	_ENOTSUPP@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	jmp	LBB0_9
LBB0_3:
	movq	_NAND_DATA_IFACE_CHECK_ONLY@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	cmpl	%r14d, (%rax)
	je	LBB0_9
## %bb.4:
	movslq	(%r12), %rax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
	movq	_NFC_CLK_CYCLE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_DIV_ROUND_UP
	movq	%rax, %r14
	movq	_NFC_DEFAULT_DELAY@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	4(%r12), %eax
	addl	%ecx, %eax
	cltd
	idivl	%r14d
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	addl	8(%r12), %ecx
	movl	(%r12), %edx
	movl	20(%r12), %edi
	movl	%edx, %eax
	shrl	$31, %eax
	addl	%edx, %eax
	sarl	%eax
	addl	%ecx, %eax
	cltd
	idivl	%r14d
	movl	%eax, %r13d
	callq	_PSEC_TO_NSEC
	movl	(%rbx), %esi
	imull	%r14d, %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	movq	%rax, 24(%r15)
	movl	16(%r12), %edi
	callq	_PSEC_TO_NSEC
	movl	(%rbx), %esi
	imull	%r14d, %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP
	movq	%rax, 16(%r15)
	movl	12(%r12), %edi
	callq	_PSEC_TO_NSEC
	movl	(%rbx), %esi
	imull	%r14d, %esi
	movl	%eax, %edi
	callq	_DIV_ROUND_UP_ULL
	movl	%eax, %ebx
	movl	%eax, %edi
	callq	_ilog2
	movl	%eax, 12(%r15)
	movl	%ebx, %edi
	callq	_is_power_of_2
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	incl	12(%r15)
LBB0_6:
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
	movq	%rax, %rbx
	movl	%r13d, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_DIV_ROUND_UP
	movq	%rax, %rsi
	cmpl	%ebx, %esi
	jge	LBB0_8
## %bb.7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_8:
	movl	%r14d, (%r15)
	xorl	%ecx, %ecx
	movl	$1000000000, %eax               ## imm = 0x3B9ACA00
	xorl	%edx, %edx
	idivl	%r14d
	movl	%eax, 4(%r15)
	addl	%ebx, %esi
	movl	%esi, %eax
	shrl	$31, %eax
	addl	%esi, %eax
	sarl	%eax
	incl	%eax
	movl	%eax, 8(%r15)
LBB0_9:
	movl	%ecx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOTSUPP,4,2                   ## @ENOTSUPP
	.comm	_NAND_DATA_IFACE_CHECK_ONLY,4,2 ## @NAND_DATA_IFACE_CHECK_ONLY
	.comm	_NFC_CLK_CYCLE,4,2              ## @NFC_CLK_CYCLE
	.comm	_NFC_DEFAULT_DELAY,4,2          ## @NFC_DEFAULT_DELAY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_meson_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 meson_nfc_setup_data_interface
_meson_nfc_setup_data_interface:        ; @meson_nfc_setup_data_interface
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x2
	mov	x20, x1
	bl	_to_meson_nand
	mov	x19, x0
	mov	x0, x21
	bl	_nand_get_sdr_timings
	mov	x21, x0
	bl	_IS_ERR
	cbz	x0, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _ENOTSUPP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENOTSUPP@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
LBB0_3:
Lloh2:
	adrp	x8, _NAND_DATA_IFACE_CHECK_ONLY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _NAND_DATA_IFACE_CHECK_ONLY@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w8, w20
	b.ne	LBB0_5
; %bb.4:
	mov	w0, #0
	b	LBB0_10
LBB0_5:
	ldrsw	x8, [x21]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x8, x8, x9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
Lloh5:
	adrp	x24, _NFC_CLK_CYCLE@GOTPAGE
Lloh6:
	ldr	x24, [x24, _NFC_CLK_CYCLE@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_DIV_ROUND_UP
	mov	x20, x0
Lloh7:
	adrp	x8, _NFC_DEFAULT_DELAY@GOTPAGE
Lloh8:
	ldr	x8, [x8, _NFC_DEFAULT_DELAY@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	ldp	w10, w9, [x21]
	add	w9, w8, w9
	sdiv	w23, w9, w20
	ldr	w9, [x21, #8]
	add	w8, w9, w8
	cmp	w10, #0
	cinc	w9, w10, lt
	add	w8, w8, w9, asr #1
	ldr	w0, [x21, #20]
	sdiv	w22, w8, w20
	bl	_PSEC_TO_NSEC
	ldr	w8, [x24]
	mul	w1, w8, w20
	bl	_DIV_ROUND_UP
	str	x0, [x19, #24]
	ldr	w0, [x21, #16]
	bl	_PSEC_TO_NSEC
	ldr	w8, [x24]
	mul	w1, w8, w20
	bl	_DIV_ROUND_UP
	str	x0, [x19, #16]
	ldr	w0, [x21, #12]
	bl	_PSEC_TO_NSEC
	ldr	w8, [x24]
	mul	w1, w8, w20
	bl	_DIV_ROUND_UP_ULL
	mov	x21, x0
	bl	_ilog2
	str	w0, [x19, #12]
	mov	x0, x21
	bl	_is_power_of_2
	cbnz	w0, LBB0_7
; %bb.6:
	ldr	w8, [x19, #12]
	add	w8, w8, #1
	str	w8, [x19, #12]
LBB0_7:
	mov	x0, x23
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	mov	x21, x0
	mov	x0, x22
	mov	w1, #1000
	bl	_DIV_ROUND_UP
	mov	x8, x0
	cmp	w8, w21
	b.ge	LBB0_9
; %bb.8:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_9:
	mov	w0, #0
	mov	w9, #51712
	movk	w9, #15258, lsl #16
	sdiv	w9, w9, w20
	stp	w20, w9, [x19]
	add	w8, w8, w21
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	add	w8, w8, #1
	str	w8, [x19, #8]
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOTSUPP,4,2                   ; @ENOTSUPP
	.comm	_NAND_DATA_IFACE_CHECK_ONLY,4,2 ; @NAND_DATA_IFACE_CHECK_ONLY
	.comm	_NFC_CLK_CYCLE,4,2              ; @NFC_CLK_CYCLE
	.comm	_NFC_DEFAULT_DELAY,4,2          ; @NFC_DEFAULT_DELAY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_meson_nfc_setup_data_interface
.subsections_via_symbols
