	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_ebi_xslate_smc_timings
_atmel_ebi_xslate_smc_timings:          ## @atmel_ebi_xslate_smc_timings
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, -80(%rbp)                 ## 8-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movl	4(%rax), %edi
	callq	_clk_get_rate
	movl	%eax, %ecx
	movq	_NSEC_PER_SEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r12d
	leaq	L_.str(%rip), %rsi
	leaq	-48(%rbp), %rdx
	movq	%rbx, -88(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_of_property_read_u32
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	testl	%eax, %eax
	jne	LBB0_4
## %bb.1:
	movl	-48(%rbp), %edi
	movl	%r12d, %esi
	callq	_DIV_ROUND_UP
	movq	_ATMEL_SMC_MODE_TDF_MAX@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jbe	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	movl	$1, %r15d
	testl	%r12d, %r12d
	jne	LBB0_17
	jmp	LBB0_18
LBB0_3:
	movq	_ATMEL_SMC_MODE_TDF_MIN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	cmpl	%edi, %eax
	cmoval	%eax, %edi
	callq	_ATMEL_SMC_MODE_TDF
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	orl	%eax, (%rcx)
	movl	$1, %r15d
LBB0_4:
	movq	_timings_xlate_table@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.6:
	movl	%r12d, -68(%rbp)                ## 4-byte Spill
	movl	%r15d, -52(%rbp)                ## 4-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	movl	$16, %r15d
	xorl	%ebx, %ebx
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_9
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movq	(%r13), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$24, %r15
	cmpq	%rax, %rbx
	jge	LBB0_15
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %r14
	movq	-16(%r14,%r15), %rsi
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	leaq	-48(%rbp), %rdx
	callq	_of_property_read_u32
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_8
## %bb.10:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	-48(%rbp), %edi
	movl	-68(%rbp), %esi                 ## 4-byte Reload
	callq	_DIV_ROUND_UP
	movl	(%r14,%r15), %esi
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	*-8(%r14,%r15)
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	movl	%eax, %r12d
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_5:
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	testl	%r12d, %r12d
	jne	LBB0_17
	jmp	LBB0_18
LBB0_9:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_17
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_15:
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	movl	-52(%rbp), %r15d                ## 4-byte Reload
	testl	%r12d, %r12d
	je	LBB0_18
LBB0_17:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	movq	-88(%rbp), %rdx                 ## 8-byte Reload
	callq	_dev_err
	movl	%r12d, %r15d
LBB0_18:
	movl	%r15d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NSEC_PER_SEC,4,2               ## @NSEC_PER_SEC
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atmel,smc-tdf-ns"

	.comm	_ATMEL_SMC_MODE_TDF_MAX,4,2     ## @ATMEL_SMC_MODE_TDF_MAX
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATMEL_SMC_MODE_TDF_MIN,4,2     ## @ATMEL_SMC_MODE_TDF_MIN
	.comm	_timings_xlate_table,8,3        ## @timings_xlate_table
L_.str.1:                               ## @.str.1
	.asciz	"missing or invalid timings definition in %pOF"

	.no_dead_strip	_atmel_ebi_xslate_smc_timings
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_ebi_xslate_smc_timings
_atmel_ebi_xslate_smc_timings:          ; @atmel_ebi_xslate_smc_timings
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
	ldr	w0, [x8, #4]
	bl	_clk_get_rate
Lloh0:
	adrp	x8, _NSEC_PER_SEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NSEC_PER_SEC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	udiv	w23, w8, w0
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #12
	mov	x0, x19
	bl	_of_property_read_u32
	mov	x22, x0
	cbz	w0, LBB0_2
; %bb.1:
	mov	w24, #0
	b	LBB0_5
LBB0_2:
	ldr	w0, [sp, #12]
	mov	x1, x23
	bl	_DIV_ROUND_UP
Lloh5:
	adrp	x8, _ATMEL_SMC_MODE_TDF_MAX@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ATMEL_SMC_MODE_TDF_MAX@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ls	LBB0_4
; %bb.3:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w22, w8
	mov	w24, #1
	b	LBB0_17
LBB0_4:
Lloh11:
	adrp	x8, _ATMEL_SMC_MODE_TDF_MIN@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ATMEL_SMC_MODE_TDF_MIN@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w0, w8
	csel	w0, w0, w8, hi
	bl	_ATMEL_SMC_MODE_TDF
	ldr	w8, [x21]
	orr	w8, w8, w0
	str	w8, [x21]
	mov	w24, #1
LBB0_5:
Lloh14:
	adrp	x26, _timings_xlate_table@GOTPAGE
Lloh15:
	ldr	x26, [x26, _timings_xlate_table@GOTPAGEOFF]
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_17
; %bb.6:
	str	x20, [sp]                       ; 8-byte Folded Spill
	mov	x27, #0
	mov	x28, #0
	b	LBB0_9
LBB0_7:                                 ;   in Loop: Header=BB0_9 Depth=1
	cbz	w22, LBB0_14
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x28, x28, #1
	ldr	x0, [x26]
	bl	_ARRAY_SIZE
	add	x27, x27, #24
	cmp	x28, w0, sxtw
	b.ge	LBB0_13
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x20, [x26]
	ldr	x1, [x20, x27]
	add	x2, sp, #12
	mov	x0, x19
	bl	_of_property_read_u32
	mov	x25, x0
	cbnz	w0, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cbnz	w22, LBB0_15
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w0, [sp, #12]
	mov	x1, x23
	bl	_DIV_ROUND_UP
	mov	x2, x0
	add	x8, x20, x27
	ldr	x9, [x8, #8]
	ldr	w1, [x8, #16]
	mov	x0, x21
	blr	x9
	cbz	w0, LBB0_8
; %bb.12:
	mov	x25, x0
	ldr	x20, [sp]                       ; 8-byte Folded Reload
	b	LBB0_18
LBB0_13:
	mov	x22, x25
	b	LBB0_16
LBB0_14:
	ldr	x20, [sp]                       ; 8-byte Folded Reload
	b	LBB0_18
LBB0_15:
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_16:
	ldr	x20, [sp]                       ; 8-byte Folded Reload
LBB0_17:
	mov	x25, x22
	cbz	w22, LBB0_19
LBB0_18:
	ldr	x8, [x20]
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x2, x19
	bl	_dev_err
	mov	x24, x25
LBB0_19:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_NSEC_PER_SEC,4,2               ; @NSEC_PER_SEC
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atmel,smc-tdf-ns"

	.comm	_ATMEL_SMC_MODE_TDF_MAX,4,2     ; @ATMEL_SMC_MODE_TDF_MAX
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATMEL_SMC_MODE_TDF_MIN,4,2     ; @ATMEL_SMC_MODE_TDF_MIN
	.comm	_timings_xlate_table,8,3        ; @timings_xlate_table
l_.str.1:                               ; @.str.1
	.asciz	"missing or invalid timings definition in %pOF"

	.no_dead_strip	_atmel_ebi_xslate_smc_timings
.subsections_via_symbols
