	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rmi_smb_probe
_rmi_smb_probe:                         ## @rmi_smb_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
	leaq	8(%rdi), %r14
	movq	%r14, %rdi
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movl	12(%r15), %edi
	movq	_I2C_FUNC_SMBUS_READ_BLOCK_DATA@GOTPCREL(%rip), %rax
	movq	_I2C_FUNC_SMBUS_HOST_NOTIFY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	cmpq	$0, (%r15)
	jle	LBB0_5
## %bb.6:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.8:
	movq	%rax, %r12
	movq	_RMI_DEBUG_XPORT@GOTPCREL(%rip), %r13
	movl	(%r13), %ebx
	movq	%r14, %rdi
	callq	_dev_name
	leaq	L_.str.3(%rip), %rdx
	movl	%ebx, %edi
	movq	%r14, %rsi
	movl	%eax, %ecx
	callq	_rmi_dbg
	movq	%r15, 40(%r12)
	leaq	36(%r12), %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	addq	$32, %rdi
	callq	_mutex_init
	movq	%r14, 24(%r12)
	movl	(%r15), %eax
	movl	%eax, 16(%r12)
	leaq	L_.str.4(%rip), %rax
	movq	%rax, (%r12)
	movq	_rmi_smb_ops@GOTPCREL(%rip), %rax
	movq	%rax, 8(%r12)
	movq	%r12, %rdi
	callq	_rmi_smb_get_version
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_14
## %bb.9:
	movl	(%r13), %edi
	leaq	L_.str.5(%rip), %rdx
	movq	%r14, %rsi
	movl	%ebx, %ecx
	callq	_rmi_dbg
	movl	%ebx, %eax
	andl	$-2, %eax
	cmpl	$2, %eax
	jne	LBB0_10
## %bb.11:
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_i2c_set_clientdata
	leaq	L_.str.7(%rip), %rsi
	movq	%r14, %rdi
	callq	_dev_info
	movq	%r12, %rdi
	callq	_rmi_register_transport_device
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %ebx
	leaq	L_.str.8(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_err
	jmp	LBB0_14
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_5:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	movq	(%r15), %rbx
	testq	%rbx, %rbx
	cmovel	%r12d, %ebx
	jmp	LBB0_14
LBB0_7:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_14
LBB0_10:
	leaq	L_.str.6(%rip), %rsi
	xorl	%r15d, %r15d
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %r15d
	movl	%r15d, %ebx
	jmp	LBB0_14
LBB0_12:
	xorl	%ebx, %ebx
LBB0_14:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no platform data, aborting\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_I2C_FUNC_SMBUS_READ_BLOCK_DATA,4,2 ## @I2C_FUNC_SMBUS_READ_BLOCK_DATA
	.comm	_I2C_FUNC_SMBUS_HOST_NOTIFY,4,2 ## @I2C_FUNC_SMBUS_HOST_NOTIFY
L_.str.1:                               ## @.str.1
	.asciz	"adapter does not support required functionality\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
L_.str.2:                               ## @.str.2
	.asciz	"no IRQ provided, giving up\n"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_RMI_DEBUG_XPORT,4,2            ## @RMI_DEBUG_XPORT
L_.str.3:                               ## @.str.3
	.asciz	"Probing %s\n"

L_.str.4:                               ## @.str.4
	.asciz	"smb"

	.comm	_rmi_smb_ops,4,2                ## @rmi_smb_ops
L_.str.5:                               ## @.str.5
	.asciz	"Smbus version is %d"

L_.str.6:                               ## @.str.6
	.asciz	"Unrecognized SMB version %d\n"

L_.str.7:                               ## @.str.7
	.asciz	"registering SMbus-connected sensor\n"

L_.str.8:                               ## @.str.8
	.asciz	"failed to register sensor: %d\n"

	.no_dead_strip	_rmi_smb_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rmi_smb_probe
_rmi_smb_probe:                         ; @rmi_smb_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	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_dev_get_platdata
	cbz	x0, LBB0_8
; %bb.1:
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_READ_BLOCK_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_READ_BLOCK_DATA@GOTPAGEOFF]
	ldr	w0, [x20, #12]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _I2C_FUNC_SMBUS_HOST_NOTIFY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_FUNC_SMBUS_HOST_NOTIFY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	_i2c_check_functionality
	cbz	w0, LBB0_10
; %bb.2:
	ldr	x8, [x20]
	cmp	x8, #0
	b.le	LBB0_14
; %bb.3:
Lloh6:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_9
; %bb.4:
	mov	x21, x0
Lloh9:
	adrp	x23, _RMI_DEBUG_XPORT@GOTPAGE
Lloh10:
	ldr	x23, [x23, _RMI_DEBUG_XPORT@GOTPAGEOFF]
	ldr	w22, [x23]
	mov	x0, x19
	bl	_dev_name
	mov	x3, x0
Lloh11:
	adrp	x2, l_.str.3@PAGE
Lloh12:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x22
	mov	x1, x19
	bl	_rmi_dbg
	str	x20, [x21, #40]
	add	x0, x21, #36
	bl	_mutex_init
	add	x0, x21, #32
	bl	_mutex_init
	str	x19, [x21, #24]
	ldr	x8, [x20]
	str	w8, [x21, #16]
Lloh13:
	adrp	x8, l_.str.4@PAGE
Lloh14:
	add	x8, x8, l_.str.4@PAGEOFF
Lloh15:
	adrp	x9, _rmi_smb_ops@GOTPAGE
Lloh16:
	ldr	x9, [x9, _rmi_smb_ops@GOTPAGEOFF]
	stp	x8, x9, [x21]
	mov	x0, x21
	bl	_rmi_smb_get_version
	mov	x22, x0
	tbnz	w0, #31, LBB0_13
; %bb.5:
	ldr	w0, [x23]
Lloh17:
	adrp	x2, l_.str.5@PAGE
Lloh18:
	add	x2, x2, l_.str.5@PAGEOFF
	mov	x1, x19
	mov	x3, x22
	bl	_rmi_dbg
	and	w8, w22, #0xfffffffe
	cmp	w8, #2
	b.ne	LBB0_15
; %bb.6:
	mov	x0, x20
	mov	x1, x21
	bl	_i2c_set_clientdata
Lloh19:
	adrp	x1, l_.str.7@PAGE
Lloh20:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	mov	x0, x21
	bl	_rmi_register_transport_device
	mov	x22, x0
	cbz	w0, LBB0_13
; %bb.7:
	str	x22, [sp]
Lloh21:
	adrp	x1, l_.str.8@PAGE
Lloh22:
	add	x1, x1, l_.str.8@PAGEOFF
	mov	x0, x19
	bl	_dev_err
                                        ; kill: def $w22 killed $w22 killed $x22 def $x22
	b	LBB0_13
LBB0_8:
Lloh23:
	adrp	x1, l_.str@PAGE
Lloh24:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
LBB0_9:
Lloh25:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh26:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh27:
	adrp	x1, l_.str.1@PAGE
Lloh28:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_11:
	mov	x0, x19
	bl	_dev_err
Lloh29:
	adrp	x8, _ENODEV@GOTPAGE
Lloh30:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_13:
	mov	x0, x22
	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_14:
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	x8, [x20]
Lloh33:
	adrp	x9, _ENODEV@GOTPAGE
Lloh34:
	ldr	x9, [x9, _ENODEV@GOTPAGEOFF]
Lloh35:
	ldr	w9, [x9]
	cmp	x8, #0
	csneg	w22, w8, w9, ne
	b	LBB0_13
LBB0_15:
	str	x22, [sp]
Lloh36:
	adrp	x1, l_.str.6@PAGE
Lloh37:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_11
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no platform data, aborting\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_I2C_FUNC_SMBUS_READ_BLOCK_DATA,4,2 ; @I2C_FUNC_SMBUS_READ_BLOCK_DATA
	.comm	_I2C_FUNC_SMBUS_HOST_NOTIFY,4,2 ; @I2C_FUNC_SMBUS_HOST_NOTIFY
l_.str.1:                               ; @.str.1
	.asciz	"adapter does not support required functionality\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
l_.str.2:                               ; @.str.2
	.asciz	"no IRQ provided, giving up\n"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_RMI_DEBUG_XPORT,4,2            ; @RMI_DEBUG_XPORT
l_.str.3:                               ; @.str.3
	.asciz	"Probing %s\n"

l_.str.4:                               ; @.str.4
	.asciz	"smb"

	.comm	_rmi_smb_ops,4,2                ; @rmi_smb_ops
l_.str.5:                               ; @.str.5
	.asciz	"Smbus version is %d"

l_.str.6:                               ; @.str.6
	.asciz	"Unrecognized SMB version %d\n"

l_.str.7:                               ; @.str.7
	.asciz	"registering SMbus-connected sensor\n"

l_.str.8:                               ; @.str.8
	.asciz	"failed to register sensor: %d\n"

	.no_dead_strip	_rmi_smb_probe
.subsections_via_symbols
