	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jz4780_i2c_probe
_jz4780_i2c_probe:                      ## @jz4780_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	%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	%rdi, %r15
	movl	$0, -44(%rbp)
	leaq	8(%rdi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$72, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	_THIS_MODULE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 48(%rbx)
	movq	_jz4780_i2c_algorithm@GOTPCREL(%rip), %rax
	movq	%rax, 40(%rbx)
	movq	%rbx, 32(%rbx)
	movl	$5, 8(%rbx)
	movq	%r14, 24(%rbx)
	movl	8(%r15), %eax
	movl	%eax, 16(%rbx)
	movl	12(%rbx), %edi
	movq	(%r15), %rdx
	leaq	L_.str(%rip), %rsi
	callq	_sprintf
	leaq	68(%rbx), %rdi
	callq	_init_completion
	leaq	64(%rbx), %rdi
	callq	_spin_lock_init
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_devm_ioremap_resource
	movl	%eax, 60(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	60(%rbx), %edi
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_16:
	movl	%r12d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_platform_set_drvdata
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	movl	4(%rbx), %edi
	testq	%rax, %rax
	je	LBB0_6
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_6:
	callq	_clk_prepare_enable
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_16
## %bb.7:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	leaq	-44(%rbp), %rdx
	callq	_of_property_read_u32
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %r13d
	leaq	L_.str.2(%rip), %rsi
	jmp	LBB0_11
LBB0_9:
	movl	-44(%rbp), %eax
	imulq	$274877907, %rax, %rcx          ## imm = 0x10624DD3
	shrq	$38, %rcx
	movl	%ecx, (%rbx)
	cmpq	$999, %rax                      ## imm = 0x3E7
	ja	LBB0_12
## %bb.10:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
	leaq	L_.str.3(%rip), %rsi
LBB0_11:
	movq	%r14, %rdi
	callq	_dev_err
LBB0_15:
	movl	4(%rbx), %edi
	callq	_clk_disable_unprepare
	movl	%r13d, %r12d
	jmp	LBB0_16
LBB0_12:
	movq	%rbx, %rdi
	callq	_jz4780_i2c_set_speed
	movl	(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	_JZ4780_I2C_CTRL@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_jz4780_i2c_readw
                                        ## kill: def $ax killed $ax def $eax
	movq	_JZ4780_I2C_CTRL_STPHLD@GOTPCREL(%rip), %rcx
	movzwl	(%rcx), %ecx
	notl	%ecx
	andl	%eax, %ecx
	movl	(%r12), %esi
	movzwl	%cx, %edx
	movq	%rbx, %rdi
	callq	_jz4780_i2c_writew
	movq	_JZ4780_I2C_INTM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_jz4780_i2c_writew
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, %r15d
	movl	%eax, 56(%rbx)
	movq	_jz4780_i2c_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	%r14, %rdi
	callq	_dev_name
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%r13d, %edx
	xorl	%ecx, %ecx
	movl	%eax, %r8d
	movq	%rbx, %r9
	callq	_devm_request_irq
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.13:
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_i2c_add_adapter
	testl	%eax, %eax
	jns	LBB0_16
## %bb.14:
	movl	%eax, %r13d
	jmp	LBB0_15
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_THIS_MODULE,4,2                ## @THIS_MODULE
	.comm	_jz4780_i2c_algorithm,4,2       ## @jz4780_i2c_algorithm
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
L_.str.1:                               ## @.str.1
	.asciz	"clock-frequency"

L_.str.2:                               ## @.str.2
	.asciz	"clock-frequency not specified in DT\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"clock-frequency minimum is 1000\n"

L_.str.4:                               ## @.str.4
	.asciz	"Bus frequency is %d KHz\n"

	.comm	_JZ4780_I2C_CTRL,4,2            ## @JZ4780_I2C_CTRL
	.comm	_JZ4780_I2C_CTRL_STPHLD,2,1     ## @JZ4780_I2C_CTRL_STPHLD
	.comm	_JZ4780_I2C_INTM,4,2            ## @JZ4780_I2C_INTM
	.comm	_jz4780_i2c_irq,4,2             ## @jz4780_i2c_irq
	.no_dead_strip	_jz4780_i2c_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jz4780_i2c_probe
_jz4780_i2c_probe:                      ; @jz4780_i2c_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x22, x0
	str	wzr, [sp, #12]
	add	x20, x0, #8
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x8, _THIS_MODULE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _THIS_MODULE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	w9, #5
	mov	x21, x0
	str	w9, [x21, #8]!
	str	w8, [x0, #48]
Lloh6:
	adrp	x8, _jz4780_i2c_algorithm@GOTPAGE
Lloh7:
	ldr	x8, [x8, _jz4780_i2c_algorithm@GOTPAGEOFF]
	stp	x0, x8, [x0, #32]
	str	x20, [x0, #24]
	ldr	w8, [x22, #8]
	str	w8, [x0, #16]
	ldr	w0, [x0, #12]
	ldr	x2, [x22]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_sprintf
	add	x0, x19, #68
	bl	_init_completion
	add	x0, x19, #64
	bl	_spin_lock_init
Lloh10:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x22
	mov	w2, #0
	bl	_platform_get_resource
	mov	x1, x0
	mov	x0, x20
	bl	_devm_ioremap_resource
	str	w0, [x19, #60]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x19, #60]
	b	LBB0_6
LBB0_3:
Lloh13:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_5:
	mov	x0, x22
	mov	x1, x19
	bl	_platform_set_drvdata
	mov	x0, x20
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x19, #4]
	bl	_IS_ERR
	mov	x8, x0
	ldr	w0, [x19, #4]
	cbz	x8, LBB0_7
LBB0_6:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_7:
	bl	_clk_prepare_enable
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.8:
	ldr	w0, [x20]
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x2, sp, #12
	bl	_of_property_read_u32
	cbz	w0, LBB0_10
; %bb.9:
	mov	x23, x0
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_12
LBB0_10:
	ldr	w8, [sp, #12]
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	mul	x9, x8, x9
	lsr	x9, x9, #38
	str	w9, [x19]
	cmp	w8, #999
	b.hi	LBB0_14
; %bb.11:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	neg	w23, w8
Lloh23:
	adrp	x1, l_.str.3@PAGE
Lloh24:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_12:
	mov	x0, x20
	bl	_dev_err
LBB0_13:
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
	b	LBB0_4
LBB0_14:
	mov	x0, x19
	bl	_jz4780_i2c_set_speed
	ldr	w2, [x19]
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x20
	bl	_dev_info
Lloh27:
	adrp	x23, _JZ4780_I2C_CTRL@GOTPAGE
Lloh28:
	ldr	x23, [x23, _JZ4780_I2C_CTRL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_jz4780_i2c_readw
Lloh29:
	adrp	x8, _JZ4780_I2C_CTRL_STPHLD@GOTPAGE
Lloh30:
	ldr	x8, [x8, _JZ4780_I2C_CTRL_STPHLD@GOTPAGEOFF]
	ldrh	w8, [x8]
	eor	w8, w8, #0xffff
	and	w2, w0, w8
	ldr	w1, [x23]
	mov	x0, x19
	bl	_jz4780_i2c_writew
Lloh31:
	adrp	x8, _JZ4780_I2C_INTM@GOTPAGE
Lloh32:
	ldr	x8, [x8, _JZ4780_I2C_INTM@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_jz4780_i2c_writew
	mov	x0, x22
	mov	w1, #0
	bl	_platform_get_irq
	mov	x22, x0
	str	w0, [x19, #56]
Lloh34:
	adrp	x8, _jz4780_i2c_irq@GOTPAGE
Lloh35:
	ldr	x8, [x8, _jz4780_i2c_irq@GOTPAGEOFF]
Lloh36:
	ldr	w23, [x8]
	mov	x0, x20
	bl	_dev_name
	mov	x4, x0
	mov	x0, x20
	mov	x1, x22
	mov	x2, x23
	mov	w3, #0
	mov	x5, x19
	bl	_devm_request_irq
	mov	x23, x0
	cbnz	w0, LBB0_13
; %bb.15:
	mov	x0, x21
	bl	_i2c_add_adapter
	tbnz	w0, #31, LBB0_17
; %bb.16:
	mov	w23, #0
	b	LBB0_4
LBB0_17:
	mov	x23, x0
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_THIS_MODULE,4,2                ; @THIS_MODULE
	.comm	_jz4780_i2c_algorithm,4,2       ; @jz4780_i2c_algorithm
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
l_.str.1:                               ; @.str.1
	.asciz	"clock-frequency"

l_.str.2:                               ; @.str.2
	.asciz	"clock-frequency not specified in DT\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"clock-frequency minimum is 1000\n"

l_.str.4:                               ; @.str.4
	.asciz	"Bus frequency is %d KHz\n"

	.comm	_JZ4780_I2C_CTRL,4,2            ; @JZ4780_I2C_CTRL
	.comm	_JZ4780_I2C_CTRL_STPHLD,2,1     ; @JZ4780_I2C_CTRL_STPHLD
	.comm	_JZ4780_I2C_INTM,4,2            ; @JZ4780_I2C_INTM
	.comm	_jz4780_i2c_irq,4,2             ; @jz4780_i2c_irq
	.no_dead_strip	_jz4780_i2c_probe
.subsections_via_symbols
