	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atmel_flexcom_probe
_atmel_flexcom_probe:                   ## @atmel_flexcom_probe
	.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, %r14
	movq	(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	movq	(%r15), %rax
	movq	_ATMEL_FLEXCOM_MODE_USART@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_6
## %bb.5:
	movq	_ATMEL_FLEXCOM_MODE_TWI@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_6
## %bb.7:
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movq	%rax, 16(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movq	16(%r15), %rdi
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_6:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movq	%rax, 8(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_11
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_11:
	callq	_clk_prepare_enable
	testl	%eax, %eax
	jne	LBB0_12
## %bb.13:
	movq	(%r15), %rdi
	callq	_FLEX_MR_OPMODE
	movq	_FLEX_MR@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	addq	16(%r15), %rsi
	movl	%eax, %edi
	callq	_writel
	movq	8(%r15), %rdi
	callq	_clk_disable_unprepare
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_devm_of_platform_populate      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"atmel,flexcom-mode"

	.comm	_ATMEL_FLEXCOM_MODE_USART,8,3   ## @ATMEL_FLEXCOM_MODE_USART
	.comm	_ATMEL_FLEXCOM_MODE_TWI,8,3     ## @ATMEL_FLEXCOM_MODE_TWI
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_FLEX_MR,8,3                    ## @FLEX_MR
	.no_dead_strip	_atmel_flexcom_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atmel_flexcom_probe
_atmel_flexcom_probe:                   ; @atmel_flexcom_probe
	.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, x0
	ldr	x21, [x0]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_of_property_read_u32
	cbnz	w0, LBB0_6
; %bb.2:
	ldr	x8, [x20]
Lloh5:
	adrp	x9, _ATMEL_FLEXCOM_MODE_USART@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATMEL_FLEXCOM_MODE_USART@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _ATMEL_FLEXCOM_MODE_TWI@GOTPAGE
Lloh9:
	ldr	x10, [x10, _ATMEL_FLEXCOM_MODE_TWI@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #0, ge
	b.le	LBB0_7
; %bb.3:
Lloh11:
	adrp	x8, _EINVAL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	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_7:
Lloh15:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	x0, [x20, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_9
; %bb.8:
	ldr	x0, [x20, #16]
	b	LBB0_10
LBB0_9:
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	x0, [x20, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x20, #8]
	cbz	x8, LBB0_11
LBB0_10:
	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_11:
	bl	_clk_prepare_enable
	cbnz	w0, LBB0_6
; %bb.12:
	ldr	x0, [x20]
	bl	_FLEX_MR_OPMODE
	ldr	x8, [x20, #16]
Lloh18:
	adrp	x9, _FLEX_MR@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FLEX_MR@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	add	x1, x9, x8
	bl	_writel
	ldr	x0, [x20, #8]
	bl	_clk_disable_unprepare
	mov	x0, x19
	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	_devm_of_platform_populate
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"atmel,flexcom-mode"

	.comm	_ATMEL_FLEXCOM_MODE_USART,8,3   ; @ATMEL_FLEXCOM_MODE_USART
	.comm	_ATMEL_FLEXCOM_MODE_TWI,8,3     ; @ATMEL_FLEXCOM_MODE_TWI
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_FLEX_MR,8,3                    ; @FLEX_MR
	.no_dead_strip	_atmel_flexcom_probe
.subsections_via_symbols
