	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_pnx_probe
_i2c_pnx_probe:                         ## @i2c_pnx_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
	movq	_I2C_PNX_SPEED_KHZ_DEFAULT@GOTPCREL(%rip), %rax
	movslq	(%rax), %r12
	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	%r15, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r14, 24(%rbx)
	movq	_pnx_algorithm@GOTPCREL(%rip), %rax
	movq	%rax, 48(%rbx)
	movq	%rbx, 40(%rbx)
	movl	16(%r15), %eax
	movl	%eax, 32(%rbx)
	movq	_I2C_PNX_TIMEOUT_DEFAULT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 68(%rbx)
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_devm_clk_get
	movl	%eax, 4(%rbx)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movl	4(%rbx), %edi
	jmp	LBB0_4
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_19:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	leaq	60(%rbx), %rdi
	movq	_i2c_pnx_timeout@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_timer_setup
	movl	8(%rbx), %edi
	movq	(%r15), %rcx
	leaq	L_.str(%rip), %rdx
	movl	$4, %esi
	callq	_snprintf
	movq	_IORESOURCE_MEM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	xorl	%edx, %edx
	callq	_platform_get_resource
	movq	%rax, %r13
	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_7
## %bb.6:
	movl	64(%rbx), %edi
LBB0_4:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_7:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movl	4(%rbx), %edi
	callq	_clk_prepare_enable
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_19
## %bb.8:
	imulq	$1000, %r12, %r12               ## imm = 0x3E8
	movl	4(%rbx), %edi
	callq	_clk_get_rate
	movq	%rax, %rcx
	orq	%r12, %rcx
	shrq	$32, %rcx
	je	LBB0_9
## %bb.10:
	xorl	%edx, %edx
	divq	%r12
	jmp	LBB0_11
LBB0_9:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r12d
                                        ## kill: def $eax killed $eax def $rax
LBB0_11:
	shrq	%rax
	addq	$-2, %rax
	cmpq	$1023, %rax                     ## imm = 0x3FF
	movl	$1023, %r13d                    ## imm = 0x3FF
	cmovbq	%rax, %r13
	movq	%rbx, %rdi
	callq	_I2C_REG_CKH
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_iowrite32
	movq	%rbx, %rdi
	callq	_I2C_REG_CKL
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_iowrite32
	movq	_mcntrl_reset@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	movq	%rbx, %rdi
	callq	_I2C_REG_CTL
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_iowrite32
	movq	%rbx, %rdi
	callq	_wait_reset
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	_ENODEV@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_18:
	movl	4(%rbx), %edi
	callq	_clk_disable_unprepare
	jmp	LBB0_19
LBB0_13:
	leaq	56(%rbx), %rdi
	callq	_init_completion
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_platform_get_irq
	movl	%eax, (%rbx)
	testl	%eax, %eax
	js	LBB0_14
## %bb.15:
	movq	_i2c_pnx_interrupt@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	(%r15), %r8
	movq	%r14, %rdi
	movl	%eax, %esi
	xorl	%ecx, %ecx
	movq	%rbx, %r9
	callq	_devm_request_irq
	movl	%eax, %r13d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.16:
	movq	%rbx, %rdi
	addq	$8, %rdi
	callq	_i2c_add_numbered_adapter
	testl	%eax, %eax
	js	LBB0_17
## %bb.20:
	movl	(%rbx), %r8d
	movl	8(%rbx), %edx
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %ecx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_dbg
	xorl	%r13d, %r13d
	jmp	LBB0_19
LBB0_14:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_err
	movl	(%rbx), %r13d
	jmp	LBB0_18
LBB0_17:
	movl	%eax, %r13d
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_PNX_SPEED_KHZ_DEFAULT,4,2  ## @I2C_PNX_SPEED_KHZ_DEFAULT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_pnx_algorithm,4,2              ## @pnx_algorithm
	.comm	_I2C_PNX_TIMEOUT_DEFAULT,4,2    ## @I2C_PNX_TIMEOUT_DEFAULT
	.comm	_i2c_pnx_timeout,4,2            ## @i2c_pnx_timeout
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

	.comm	_IORESOURCE_MEM,4,2             ## @IORESOURCE_MEM
	.comm	_mcntrl_reset,8,3               ## @mcntrl_reset
	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.1:                               ## @.str.1
	.asciz	"Failed to get IRQ from platform resource\n"

	.comm	_i2c_pnx_interrupt,4,2          ## @i2c_pnx_interrupt
L_.str.2:                               ## @.str.2
	.asciz	"%s: Master at %#8x, irq %d.\n"

	.no_dead_strip	_i2c_pnx_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_pnx_probe
_i2c_pnx_probe:                         ; @i2c_pnx_probe
	.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, x0
Lloh0:
	adrp	x8, _I2C_PNX_SPEED_KHZ_DEFAULT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_PNX_SPEED_KHZ_DEFAULT@GOTPAGEOFF]
Lloh2:
	ldrsw	x24, [x8]
	add	x20, x0, #8
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #72
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x19
	bl	_platform_set_drvdata
	str	x20, [x19, #24]
Lloh6:
	adrp	x8, _pnx_algorithm@GOTPAGE
Lloh7:
	ldr	x8, [x8, _pnx_algorithm@GOTPAGEOFF]
	stp	x19, x8, [x19, #40]
	ldr	w8, [x21, #16]
	str	w8, [x19, #32]
Lloh8:
	adrp	x8, _I2C_PNX_TIMEOUT_DEFAULT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _I2C_PNX_TIMEOUT_DEFAULT@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	str	w8, [x19, #68]
	mov	x0, x20
	mov	x1, #0
	bl	_devm_clk_get
	str	w0, [x19, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.2:
	ldr	w0, [x19, #4]
	b	LBB0_7
LBB0_3:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_4:
	mov	x0, x23
	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
LBB0_5:
	add	x0, x19, #60
Lloh14:
	adrp	x8, _i2c_pnx_timeout@GOTPAGE
Lloh15:
	ldr	x8, [x8, _i2c_pnx_timeout@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_timer_setup
	ldr	w0, [x19, #8]
	ldr	x3, [x21]
Lloh17:
	adrp	x2, l_.str@PAGE
Lloh18:
	add	x2, x2, l_.str@PAGEOFF
	mov	w1, #4
	bl	_snprintf
Lloh19:
	adrp	x8, _IORESOURCE_MEM@GOTPAGE
Lloh20:
	ldr	x8, [x8, _IORESOURCE_MEM@GOTPAGEOFF]
Lloh21:
	ldr	w1, [x8]
	mov	x0, x21
	mov	w2, #0
	bl	_platform_get_resource
	mov	x22, x0
	mov	x0, x20
	mov	x1, x22
	bl	_devm_ioremap_resource
	str	w0, [x19, #64]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.6:
	ldr	w0, [x19, #64]
LBB0_7:
	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
	b	_PTR_ERR
LBB0_8:
	ldr	w0, [x19, #4]
	bl	_clk_prepare_enable
	mov	x23, x0
	cbnz	w0, LBB0_4
; %bb.9:
	mov	w8, #1000
	mul	x23, x24, x8
	ldr	w0, [x19, #4]
	bl	_clk_get_rate
	udiv	x8, x0, x23
	lsr	x8, x8, #1
	sub	x8, x8, #2
	mov	w9, #1023
	cmp	x8, #1023
	csel	x23, x8, x9, lo
	mov	x0, x19
	bl	_I2C_REG_CKH
	mov	x1, x0
	mov	x0, x23
	bl	_iowrite32
	mov	x0, x19
	bl	_I2C_REG_CKL
	mov	x1, x0
	mov	x0, x23
	bl	_iowrite32
Lloh22:
	adrp	x8, _mcntrl_reset@GOTPAGE
Lloh23:
	ldr	x8, [x8, _mcntrl_reset@GOTPAGEOFF]
Lloh24:
	ldr	x23, [x8]
	mov	x0, x19
	bl	_I2C_REG_CTL
	mov	x1, x0
	mov	x0, x23
	bl	_iowrite32
	mov	x0, x19
	bl	_wait_reset
	cbz	x0, LBB0_12
; %bb.10:
Lloh25:
	adrp	x8, _ENODEV@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh27:
	ldr	w8, [x8]
	neg	w23, w8
LBB0_11:
	ldr	w0, [x19, #4]
	bl	_clk_disable_unprepare
	b	LBB0_4
LBB0_12:
	add	x0, x19, #56
	bl	_init_completion
	mov	x0, x21
	mov	w1, #0
	bl	_platform_get_irq
	str	w0, [x19]
	tbnz	w0, #31, LBB0_16
; %bb.13:
	mov	x1, x0
Lloh28:
	adrp	x8, _i2c_pnx_interrupt@GOTPAGE
Lloh29:
	ldr	x8, [x8, _i2c_pnx_interrupt@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	x4, [x21]
	mov	x0, x20
	mov	w3, #0
	mov	x5, x19
	bl	_devm_request_irq
	mov	x23, x0
	cbnz	w0, LBB0_11
; %bb.14:
	add	x0, x19, #8
	bl	_i2c_add_numbered_adapter
	tbnz	w0, #31, LBB0_17
; %bb.15:
	ldr	w2, [x19, #8]
	ldr	w3, [x22]
	ldr	w4, [x19]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_dbg
	mov	w23, #0
	b	LBB0_4
LBB0_16:
Lloh33:
	adrp	x1, l_.str.1@PAGE
Lloh34:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
	ldr	w23, [x19]
	b	LBB0_11
LBB0_17:
	mov	x23, x0
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_PNX_SPEED_KHZ_DEFAULT,4,2  ; @I2C_PNX_SPEED_KHZ_DEFAULT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_pnx_algorithm,4,2              ; @pnx_algorithm
	.comm	_I2C_PNX_TIMEOUT_DEFAULT,4,2    ; @I2C_PNX_TIMEOUT_DEFAULT
	.comm	_i2c_pnx_timeout,4,2            ; @i2c_pnx_timeout
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

	.comm	_IORESOURCE_MEM,4,2             ; @IORESOURCE_MEM
	.comm	_mcntrl_reset,8,3               ; @mcntrl_reset
	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.1:                               ; @.str.1
	.asciz	"Failed to get IRQ from platform resource\n"

	.comm	_i2c_pnx_interrupt,4,2          ; @i2c_pnx_interrupt
l_.str.2:                               ; @.str.2
	.asciz	"%s: Master at %#8x, irq %d.\n"

	.no_dead_strip	_i2c_pnx_probe
.subsections_via_symbols
