	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function altr_i2c_probe
_altr_i2c_probe:                        ## @altr_i2c_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$72, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	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
	movl	%eax, 64(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	64(%rbx), %edi
LBB0_4:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_23
LBB0_5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_6
## %bb.8:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, 8(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_10
## %bb.9:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	8(%rbx), %edi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str(%rip), %rsi
LBB0_7:
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_23
LBB0_10:
	movq	%r14, 48(%rbx)
	leaq	60(%rbx), %rdi
	callq	_init_completion
	leaq	56(%rbx), %rdi
	callq	_spin_lock_init
	movq	48(%rbx), %rdi
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdx
	callq	_device_property_read_u32
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movq	_ALTR_I2C_DFLT_FIFO_SZ@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r12), %eax
	movl	%eax, (%rbx)
LBB0_12:
	movq	48(%rbx), %rdi
	leaq	4(%rbx), %r12
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdx
	callq	_device_property_read_u32
	testq	%rax, %rax
	je	LBB0_16
## %bb.13:
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	$100000, (%r12)                 ## imm = 0x186A0
	jmp	LBB0_14
LBB0_16:
	movl	(%r12), %edx
	cmpl	$400001, %edx                   ## imm = 0x61A81
	jl	LBB0_14
## %bb.17:
	leaq	L_.str.6(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	jmp	LBB0_23
LBB0_14:
	movq	_altr_i2c_isr_quick@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_altr_i2c_isr@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	4(%r14), %r9d
	movq	%rbx, (%rsp)
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_18
## %bb.15:
	movl	%eax, %r12d
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r12d, %r15d
LBB0_23:
	movl	%r15d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movl	8(%rbx), %edi
	callq	_clk_prepare_enable
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	%eax, %r15d
	leaq	L_.str.8(%rip), %rsi
	jmp	LBB0_7
LBB0_20:
	movq	%rbx, %rdi
	callq	_altr_i2c_init
	movq	%rbx, %r15
	addq	$16, %r15
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_i2c_set_adapdata
	movl	44(%rbx), %edi
	movl	4(%r14), %esi
	movl	$4, %edx
	callq	_strlcpy
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 40(%rbx)
	movq	_altr_i2c_algo@GOTPCREL(%rip), %rax
	movq	%rax, 32(%rbx)
	movq	%r14, 24(%rbx)
	movl	(%r14), %eax
	movl	%eax, 16(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_platform_set_drvdata
	movq	%r15, %rdi
	callq	_i2c_add_adapter
	testl	%eax, %eax
	je	LBB0_22
## %bb.21:
	movl	%eax, %r15d
	movl	8(%rbx), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_23
LBB0_22:
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	xorl	%r15d, %r15d
	jmp	LBB0_23
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"missing interrupt resource\n"

L_.str.1:                               ## @.str.1
	.asciz	"missing clock\n"

L_.str.2:                               ## @.str.2
	.asciz	"fifo-size"

L_.str.3:                               ## @.str.3
	.asciz	"FIFO size set to default of %d\n"

	.comm	_ALTR_I2C_DFLT_FIFO_SZ,4,2      ## @ALTR_I2C_DFLT_FIFO_SZ
L_.str.4:                               ## @.str.4
	.asciz	"clock-frequency"

L_.str.5:                               ## @.str.5
	.asciz	"Default to 100kHz\n"

L_.str.6:                               ## @.str.6
	.asciz	"invalid clock-frequency %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_altr_i2c_isr_quick,4,2         ## @altr_i2c_isr_quick
	.comm	_altr_i2c_isr,4,2               ## @altr_i2c_isr
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.7:                               ## @.str.7
	.asciz	"failed to claim IRQ %d\n"

L_.str.8:                               ## @.str.8
	.asciz	"failed to enable clock\n"

	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_altr_i2c_algo,4,2              ## @altr_i2c_algo
L_.str.9:                               ## @.str.9
	.asciz	"Altera SoftIP I2C Probe Complete\n"

	.no_dead_strip	_altr_i2c_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function altr_i2c_probe
_altr_i2c_probe:                        ; @altr_i2c_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x19
	bl	_devm_ioremap_resource
	str	w0, [x20, #64]
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.2:
	ldr	w0, [x20, #64]
LBB0_3:
	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
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_4:
Lloh6:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_19
LBB0_6:
	mov	x0, x19
	mov	w1, #0
	bl	_platform_get_irq
	mov	x21, x0
	tbnz	w0, #31, LBB0_9
; %bb.7:
	mov	x0, x19
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x20, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_11
; %bb.8:
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #8]
	b	LBB0_3
LBB0_9:
Lloh10:
	adrp	x1, l_.str@PAGE
Lloh11:
	add	x1, x1, l_.str@PAGEOFF
LBB0_10:
	mov	x0, x19
	bl	_dev_err
	b	LBB0_19
LBB0_11:
	str	x19, [x20, #48]
	add	x0, x20, #60
	bl	_init_completion
	add	x0, x20, #56
	bl	_spin_lock_init
	ldr	x0, [x20, #48]
Lloh12:
	adrp	x1, l_.str.2@PAGE
Lloh13:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x20
	bl	_device_property_read_u32
	cbz	x0, LBB0_13
; %bb.12:
Lloh14:
	adrp	x22, _ALTR_I2C_DFLT_FIFO_SZ@GOTPAGE
Lloh15:
	ldr	x22, [x22, _ALTR_I2C_DFLT_FIFO_SZ@GOTPAGEOFF]
	ldr	w8, [x22]
	str	x8, [sp]
Lloh16:
	adrp	x1, l_.str.3@PAGE
Lloh17:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w8, [x22]
	str	w8, [x20]
LBB0_13:
	ldr	x0, [x20, #48]
	add	x22, x20, #4
Lloh18:
	adrp	x1, l_.str.4@PAGE
Lloh19:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x2, x22
	bl	_device_property_read_u32
	cbz	x0, LBB0_15
; %bb.14:
Lloh20:
	adrp	x1, l_.str.5@PAGE
Lloh21:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	w8, #34464
	movk	w8, #1, lsl #16
	str	w8, [x22]
	b	LBB0_17
LBB0_15:
	ldr	w8, [x22]
	mov	w9, #6785
	movk	w9, #6, lsl #16
	cmp	w8, w9
	b.lt	LBB0_17
; %bb.16:
	str	x8, [sp]
Lloh22:
	adrp	x1, l_.str.6@PAGE
Lloh23:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh24:
	adrp	x8, _EINVAL@GOTPAGE
Lloh25:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_17:
Lloh26:
	adrp	x8, _altr_i2c_isr_quick@GOTPAGE
Lloh27:
	ldr	x8, [x8, _altr_i2c_isr_quick@GOTPAGEOFF]
Lloh28:
	adrp	x9, _altr_i2c_isr@GOTPAGE
Lloh29:
	ldr	x9, [x9, _altr_i2c_isr@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
Lloh31:
	ldr	w3, [x9]
Lloh32:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh34:
	ldr	w4, [x8]
	ldr	w5, [x19, #4]
	mov	x0, x19
	mov	x1, x21
	mov	x6, x20
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_20
; %bb.18:
	mov	x22, x0
	str	x21, [sp]
Lloh35:
	adrp	x1, l_.str.7@PAGE
Lloh36:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	mov	x21, x22
LBB0_19:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
LBB0_20:
	ldr	w0, [x20, #8]
	bl	_clk_prepare_enable
	cbz	w0, LBB0_22
; %bb.21:
	mov	x21, x0
Lloh37:
	adrp	x1, l_.str.8@PAGE
Lloh38:
	add	x1, x1, l_.str.8@PAGEOFF
	b	LBB0_10
LBB0_22:
	mov	x0, x20
	bl	_altr_i2c_init
	add	x21, x20, #16
	mov	x0, x21
	mov	x1, x20
	bl	_i2c_set_adapdata
	ldr	w0, [x20, #44]
	ldr	w1, [x19, #4]
	mov	w2, #4
	bl	_strlcpy
Lloh39:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh40:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh41:
	ldr	w8, [x8]
	str	w8, [x20, #40]
Lloh42:
	adrp	x8, _altr_i2c_algo@GOTPAGE
Lloh43:
	ldr	x8, [x8, _altr_i2c_algo@GOTPAGEOFF]
	stp	x19, x8, [x20, #24]
	ldr	w8, [x19]
	str	w8, [x20, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	mov	x0, x21
	bl	_i2c_add_adapter
	mov	x21, x0
	cbz	w0, LBB0_24
; %bb.23:
	ldr	w0, [x20, #8]
	bl	_clk_disable_unprepare
	b	LBB0_19
LBB0_24:
Lloh44:
	adrp	x1, l_.str.9@PAGE
Lloh45:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh30
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"missing interrupt resource\n"

l_.str.1:                               ; @.str.1
	.asciz	"missing clock\n"

l_.str.2:                               ; @.str.2
	.asciz	"fifo-size"

l_.str.3:                               ; @.str.3
	.asciz	"FIFO size set to default of %d\n"

	.comm	_ALTR_I2C_DFLT_FIFO_SZ,4,2      ; @ALTR_I2C_DFLT_FIFO_SZ
l_.str.4:                               ; @.str.4
	.asciz	"clock-frequency"

l_.str.5:                               ; @.str.5
	.asciz	"Default to 100kHz\n"

l_.str.6:                               ; @.str.6
	.asciz	"invalid clock-frequency %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_altr_i2c_isr_quick,4,2         ; @altr_i2c_isr_quick
	.comm	_altr_i2c_isr,4,2               ; @altr_i2c_isr
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.7:                               ; @.str.7
	.asciz	"failed to claim IRQ %d\n"

l_.str.8:                               ; @.str.8
	.asciz	"failed to enable clock\n"

	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_altr_i2c_algo,4,2              ; @altr_i2c_algo
l_.str.9:                               ; @.str.9
	.asciz	"Altera SoftIP I2C Probe Complete\n"

	.no_dead_strip	_altr_i2c_probe
.subsections_via_symbols
