	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbsm_probe
_sbsm_probe:                            ## @sbsm_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
	subq	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %r13
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -64(%rbp)
	cmpl	$10, (%rdi)
	jne	LBB0_7
## %bb.1:
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	_I2C_FUNC_SMBUS_WORD_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r13, %rdi
	callq	_i2c_check_functionality
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	leaq	4(%rbx), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$32, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_14
## %bb.3:
	movq	%rax, %r15
	movq	%rbx, %rdi
	movq	%rax, %rsi
	callq	_i2c_set_clientdata
	movq	%rbx, 24(%r15)
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	callq	_strstr
	xorl	%ecx, %ecx
	testl	%eax, %eax
	setne	%cl
	movl	%ecx, (%r15)
	movq	_SBSM_CMD_BATSYSINFO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_sbsm_read_word
	movl	%eax, %r12d
	testl	%eax, %eax
	js	LBB0_17
## %bb.4:
	movq	_SBSM_MASK_BAT_SUPPORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%r12d, %eax
	movl	%eax, 4(%r15)
	movq	_SBSM_MAX_BATS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_I2C_MUX_LOCKED@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	$0, (%rsp)
	movq	_sbsm_select@GOTPCREL(%rip), %r9
	movq	%r14, %rbx
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	movq	%rbx, %rsi
	xorl	%ecx, %ecx
	callq	_i2c_mux_alloc
	movq	%rax, 8(%r15)
	testq	%rax, %rax
	je	LBB0_23
## %bb.5:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, (%rax)
	movq	_SBSM_MAX_BATS@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_18
## %bb.6:
	xorl	%r14d, %r14d
	jmp	LBB0_10
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_10 Depth=1
	incl	%r14d
LBB0_9:                                 ##   in Loop: Header=BB0_10 Depth=1
	cmpl	(%r13), %r14d
	jge	LBB0_18
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movl	4(%r15), %ebx
	movl	%r14d, %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_8
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	8(%r15), %rdi
	incl	%r14d
	xorl	%r12d, %r12d
	xorl	%esi, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	callq	_i2c_mux_add_adapter
	testl	%eax, %eax
	je	LBB0_9
## %bb.12:
	movl	%eax, %r12d
	jmp	LBB0_20
LBB0_13:
	movq	_EPFNOSUPPORT@GOTPCREL(%rip), %rax
	jmp	LBB0_15
LBB0_14:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_15:
	xorl	%r12d, %r12d
LBB0_16:
	subl	(%rax), %r12d
LBB0_17:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	testl	%r12d, %r12d
	je	LBB0_24
## %bb.19:
	incl	%r14d
LBB0_20:
	leaq	L_.str.2(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r14d, %edx
LBB0_21:
	xorl	%eax, %eax
	callq	_dev_err
LBB0_22:
	movq	8(%r15), %rdi
	callq	_i2c_mux_del_adapters
	jmp	LBB0_17
LBB0_23:
	leaq	L_.str.1(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	jmp	LBB0_16
LBB0_24:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r14
	movl	(%r14), %ecx
	movq	_sbsm_default_psy_desc@GOTPCREL(%rip), %rsi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movl	$4, %edx
	callq	_devm_kmemdup
	testq	%rax, %rax
	je	LBB0_29
## %bb.25:
	movq	%rax, %r13
	movl	(%r14), %r14d
	movq	%rbx, %rdi
	callq	_dev_name
	leaq	L_.str.3(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movl	%eax, %ecx
	callq	_devm_kasprintf
	movl	%eax, (%r13)
	testl	%eax, %eax
	je	LBB0_29
## %bb.26:
	movq	%r15, %rdi
	callq	_sbsm_gpio_setup
	testl	%eax, %eax
	js	LBB0_30
## %bb.27:
	movq	%r15, -56(%rbp)
	movl	(%rbx), %eax
	movl	%eax, -64(%rbp)
	leaq	-64(%rbp), %rdx
	movq	%rbx, %rdi
	movq	%r13, %rsi
	callq	_devm_power_supply_register
	movl	%eax, 16(%r15)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_31
## %bb.28:
	movl	16(%r15), %edi
	callq	_PTR_ERR
	movl	%eax, %r12d
	movl	(%r13), %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	jmp	LBB0_21
LBB0_29:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
	jmp	LBB0_22
LBB0_30:
	movl	%eax, %r12d
	jmp	LBB0_22
LBB0_31:
	xorl	%r12d, %r12d
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_FUNC_SMBUS_WORD_DATA,4,2   ## @I2C_FUNC_SMBUS_WORD_DATA
	.comm	_EPFNOSUPPORT,4,2               ## @EPFNOSUPPORT
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ltc1760"

	.comm	_SBSM_CMD_BATSYSINFO,4,2        ## @SBSM_CMD_BATSYSINFO
	.comm	_SBSM_MASK_BAT_SUPPORTED,4,2    ## @SBSM_MASK_BAT_SUPPORTED
	.comm	_SBSM_MAX_BATS,4,2              ## @SBSM_MAX_BATS
	.comm	_I2C_MUX_LOCKED,4,2             ## @I2C_MUX_LOCKED
	.comm	_sbsm_select,4,2                ## @sbsm_select
L_.str.1:                               ## @.str.1
	.asciz	"failed to alloc i2c mux\n"

L_.str.2:                               ## @.str.2
	.asciz	"failed to register i2c mux channel %d\n"

	.comm	_sbsm_default_psy_desc,4,2      ## @sbsm_default_psy_desc
L_.str.3:                               ## @.str.3
	.asciz	"sbsm-%s"

L_.str.4:                               ## @.str.4
	.asciz	"failed to register power supply %s\n"

	.no_dead_strip	_sbsm_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbsm_probe
_sbsm_probe:                            ; @sbsm_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	ldr	x22, [x0, #8]
	stp	xzr, xzr, [sp, #16]
	ldr	w8, [x0]
	cmp	w8, #10
	b.ne	LBB0_7
; %bb.1:
	mov	x23, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _I2C_FUNC_SMBUS_WORD_DATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I2C_FUNC_SMBUS_WORD_DATA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_i2c_check_functionality
	cbz	w0, LBB0_13
; %bb.2:
	add	x20, x21, #4
Lloh3:
	adrp	x24, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x24]
	mov	x0, x20
	mov	w1, #32
	bl	_devm_kzalloc
	cbz	x0, LBB0_15
; %bb.3:
	mov	x19, x0
	mov	x0, x21
	mov	x1, x19
	bl	_i2c_set_clientdata
	str	x21, [x19, #24]
	ldr	w0, [x23]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_strstr
	cmp	w0, #0
	cset	w8, ne
	str	w8, [x19]
Lloh7:
	adrp	x8, _SBSM_CMD_BATSYSINFO@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SBSM_CMD_BATSYSINFO@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_sbsm_read_word
	mov	x21, x0
	tbnz	w0, #31, LBB0_17
; %bb.4:
Lloh10:
	adrp	x8, _SBSM_MASK_BAT_SUPPORTED@GOTPAGE
Lloh11:
	ldr	x8, [x8, _SBSM_MASK_BAT_SUPPORTED@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	and	w8, w8, w21
	str	w8, [x19, #4]
Lloh13:
	adrp	x23, _SBSM_MAX_BATS@GOTPAGE
Lloh14:
	ldr	x23, [x23, _SBSM_MAX_BATS@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh15:
	adrp	x8, _I2C_MUX_LOCKED@GOTPAGE
Lloh16:
	ldr	x8, [x8, _I2C_MUX_LOCKED@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
Lloh18:
	adrp	x5, _sbsm_select@GOTPAGE
Lloh19:
	ldr	x5, [x5, _sbsm_select@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x20
	mov	w3, #0
	mov	x6, #0
	bl	_i2c_mux_alloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_14
; %bb.5:
	str	x19, [x0]
	ldr	w8, [x23]
	cmp	w8, #1
	b.lt	LBB0_18
; %bb.6:
	mov	w22, #0
	b	LBB0_10
LBB0_7:
Lloh20:
	adrp	x8, _EINVAL@GOTPAGE
Lloh21:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_16
LBB0_8:                                 ;   in Loop: Header=BB0_10 Depth=1
	add	w22, w22, #1
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=1
	ldr	w8, [x23]
	cmp	w22, w8
	b.ge	LBB0_19
LBB0_10:                                ; =>This Inner Loop Header: Depth=1
	ldr	w25, [x19, #4]
	mov	x0, x22
	bl	_BIT
	tst	w0, w25
	b.eq	LBB0_8
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=1
	ldr	x0, [x19, #8]
	add	w22, w22, #1
	mov	w1, #0
	mov	x2, x22
	mov	w3, #0
	bl	_i2c_mux_add_adapter
	cbnz	w0, LBB0_26
; %bb.12:                               ;   in Loop: Header=BB0_10 Depth=1
	mov	w21, #0
	b	LBB0_9
LBB0_13:
Lloh22:
	adrp	x8, _EPFNOSUPPORT@GOTPAGE
Lloh23:
	ldr	x8, [x8, _EPFNOSUPPORT@GOTPAGEOFF]
	b	LBB0_16
LBB0_14:
Lloh24:
	adrp	x1, l_.str.1@PAGE
Lloh25:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_err
LBB0_15:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_16:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_17:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_18:
	mov	w22, #0
LBB0_19:
	cbz	w21, LBB0_21
; %bb.20:
	add	w22, w22, #1
	b	LBB0_27
LBB0_21:
	ldr	w3, [x24]
Lloh28:
	adrp	x1, _sbsm_default_psy_desc@GOTPAGE
Lloh29:
	ldr	x1, [x1, _sbsm_default_psy_desc@GOTPAGEOFF]
	mov	x0, x20
	mov	w2, #4
	bl	_devm_kmemdup
	cbz	x0, LBB0_30
; %bb.22:
	mov	x22, x0
	ldr	w21, [x24]
	mov	x0, x20
	bl	_dev_name
	mov	x3, x0
Lloh30:
	adrp	x2, l_.str.3@PAGE
Lloh31:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x1, x21
	bl	_devm_kasprintf
	str	w0, [x22]
	cbz	w0, LBB0_30
; %bb.23:
	mov	x0, x19
	bl	_sbsm_gpio_setup
	tbnz	w0, #31, LBB0_31
; %bb.24:
	str	x19, [sp, #24]
	ldr	w8, [x20]
	str	w8, [sp, #16]
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x22
	bl	_devm_power_supply_register
	str	w0, [x19, #16]
	bl	_IS_ERR
	cbz	x0, LBB0_32
; %bb.25:
	ldr	w0, [x19, #16]
	bl	_PTR_ERR
	mov	x21, x0
	ldr	w8, [x22]
	str	x8, [sp]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_28
LBB0_26:
	mov	x21, x0
LBB0_27:
	str	x22, [sp]
Lloh34:
	adrp	x1, l_.str.2@PAGE
Lloh35:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_28:
	mov	x0, x20
	bl	_dev_err
LBB0_29:
	ldr	x0, [x19, #8]
	bl	_i2c_mux_del_adapters
	b	LBB0_17
LBB0_30:
Lloh36:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh37:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_29
LBB0_31:
	mov	x21, x0
	b	LBB0_29
LBB0_32:
	mov	w21, #0
	b	LBB0_17
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_FUNC_SMBUS_WORD_DATA,4,2   ; @I2C_FUNC_SMBUS_WORD_DATA
	.comm	_EPFNOSUPPORT,4,2               ; @EPFNOSUPPORT
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ltc1760"

	.comm	_SBSM_CMD_BATSYSINFO,4,2        ; @SBSM_CMD_BATSYSINFO
	.comm	_SBSM_MASK_BAT_SUPPORTED,4,2    ; @SBSM_MASK_BAT_SUPPORTED
	.comm	_SBSM_MAX_BATS,4,2              ; @SBSM_MAX_BATS
	.comm	_I2C_MUX_LOCKED,4,2             ; @I2C_MUX_LOCKED
	.comm	_sbsm_select,4,2                ; @sbsm_select
l_.str.1:                               ; @.str.1
	.asciz	"failed to alloc i2c mux\n"

l_.str.2:                               ; @.str.2
	.asciz	"failed to register i2c mux channel %d\n"

	.comm	_sbsm_default_psy_desc,4,2      ; @sbsm_default_psy_desc
l_.str.3:                               ; @.str.3
	.asciz	"sbsm-%s"

l_.str.4:                               ; @.str.4
	.asciz	"failed to register power supply %s\n"

	.no_dead_strip	_sbsm_probe
.subsections_via_symbols
