	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function smb347_probe
_smb347_probe:                          ## @smb347_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	$48, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	$0, -40(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movq	$0, -64(%rbp)
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.3:
	movq	%rdi, %r15
	cmpq	$0, 8(%r12)
	jne	LBB0_5
## %bb.4:
	cmpq	$0, 16(%r12)
	je	LBB0_1
LBB0_5:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	movl	$56, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	%rax, %r14
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_i2c_set_clientdata
	movq	%r14, %rdi
	addq	$48, %rdi
	callq	_mutex_init
	movq	%r15, 40(%r14)
	movq	%r12, 16(%r14)
	movq	_smb347_regmap@GOTPCREL(%rip), %rsi
	movq	%r15, %rdi
	callq	_devm_regmap_init_i2c
	movq	%rax, 32(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_8
## %bb.31:
	movq	32(%r14), %rdi
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_6:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_30:
	movl	%ebx, %eax
	addq	$48, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r14, %rdi
	callq	_smb347_hw_init
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	leaq	_smb347_probe.battery(%rip), %rdi
	movq	%rdi, -56(%rbp)
	callq	_ARRAY_SIZE
	movl	%eax, -40(%rbp)
	movq	%r14, -48(%rbp)
	movq	16(%r14), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_13
## %bb.11:
	movq	_smb347_mains_desc@GOTPCREL(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	_power_supply_register
	movq	%rax, 8(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_12
## %bb.18:
	movq	8(%r14), %rdi
	jmp	LBB0_19
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_30
LBB0_12:
	movq	16(%r14), %rax
LBB0_13:
	cmpq	$0, 16(%rax)
	je	LBB0_20
## %bb.14:
	movq	_smb347_usb_desc@GOTPCREL(%rip), %rsi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rdi
	callq	_power_supply_register
	movq	%rax, 24(%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_20
## %bb.15:
	movq	16(%r14), %rax
	cmpq	$0, 8(%rax)
	je	LBB0_17
## %bb.16:
	movq	8(%r14), %rdi
	callq	_power_supply_unregister
LBB0_17:
	movq	24(%r14), %rdi
	jmp	LBB0_19
LBB0_20:
	movq	%r14, -72(%rbp)
	movq	_smb347_battery_desc@GOTPCREL(%rip), %rsi
	leaq	-80(%rbp), %rdx
	movq	%r15, %rdi
	callq	_power_supply_register
	movq	%rax, (%r14)
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_26
## %bb.21:
	movq	16(%r14), %rax
	cmpq	$0, 16(%rax)
	je	LBB0_23
## %bb.22:
	movq	24(%r14), %rdi
	callq	_power_supply_unregister
	movq	16(%r14), %rax
LBB0_23:
	cmpq	$0, 8(%rax)
	je	LBB0_25
## %bb.24:
	movq	8(%r14), %rdi
	callq	_power_supply_unregister
LBB0_25:
	movq	(%r14), %rdi
LBB0_19:
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_30
LBB0_26:
	xorl	%ebx, %ebx
	cmpq	$0, (%r12)
	js	LBB0_30
## %bb.27:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_smb347_irq_init
	testl	%eax, %eax
	js	LBB0_28
## %bb.29:
	movq	%r14, %rdi
	callq	_smb347_irq_enable
	jmp	LBB0_30
LBB0_28:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r15, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_dev_warn
	leaq	L_.str.2(%rip), %rsi
	movq	%r15, %rdi
	xorl	%eax, %eax
	callq	_dev_warn
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.section	__DATA,__data
	.p2align	3                               ## @smb347_probe.battery
_smb347_probe.battery:
	.quad	L_.str

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"smb347-battery"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_smb347_regmap,4,2              ## @smb347_regmap
	.comm	_smb347_mains_desc,4,2          ## @smb347_mains_desc
	.comm	_smb347_usb_desc,4,2            ## @smb347_usb_desc
	.comm	_smb347_battery_desc,4,2        ## @smb347_battery_desc
L_.str.1:                               ## @.str.1
	.asciz	"failed to initialize IRQ: %d\n"

L_.str.2:                               ## @.str.2
	.asciz	"disabling IRQ support\n"

	.no_dead_strip	_smb347_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function smb347_probe
_smb347_probe:                          ; @smb347_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	str	xzr, [sp, #56]
	stp	xzr, xzr, [sp, #16]
	str	xzr, [sp, #32]
	ldr	x21, [x0]
	cbz	x21, LBB0_6
; %bb.1:
	mov	x20, x0
	ldr	x8, [x21, #8]
	cbnz	x8, LBB0_3
; %bb.2:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_6
LBB0_3:
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x20
	mov	w1, #56
	bl	_devm_kzalloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	bl	_i2c_set_clientdata
	add	x0, x19, #48
	bl	_mutex_init
	str	x20, [x19, #40]
	str	x21, [x19, #16]
Lloh3:
	adrp	x1, _smb347_regmap@GOTPAGE
Lloh4:
	ldr	x1, [x1, _smb347_regmap@GOTPAGEOFF]
	mov	x0, x20
	bl	_devm_regmap_init_i2c
	str	x0, [x19, #32]
	bl	_IS_ERR
	cbz	x0, LBB0_10
; %bb.5:
	ldr	x0, [x19, #32]
	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
	add	sp, sp, #112
	b	_PTR_ERR
LBB0_6:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	add	sp, sp, #112
	ret
LBB0_10:
	mov	x0, x19
	bl	_smb347_hw_init
	tbnz	w0, #31, LBB0_9
; %bb.11:
Lloh9:
	adrp	x0, _smb347_probe.battery@PAGE
Lloh10:
	add	x0, x0, _smb347_probe.battery@PAGEOFF
	str	x0, [sp, #40]
	bl	_ARRAY_SIZE
	str	w0, [sp, #56]
	str	x19, [sp, #48]
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_15
; %bb.12:
Lloh11:
	adrp	x1, _smb347_mains_desc@GOTPAGE
Lloh12:
	ldr	x1, [x1, _smb347_mains_desc@GOTPAGEOFF]
	add	x2, sp, #40
	mov	x0, x20
	bl	_power_supply_register
	str	x0, [x19, #8]
	bl	_IS_ERR
	cbz	x0, LBB0_14
; %bb.13:
	ldr	x0, [x19, #8]
	bl	_PTR_ERR
	b	LBB0_9
LBB0_14:
	ldr	x8, [x19, #16]
LBB0_15:
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_20
; %bb.16:
Lloh13:
	adrp	x1, _smb347_usb_desc@GOTPAGE
Lloh14:
	ldr	x1, [x1, _smb347_usb_desc@GOTPAGEOFF]
	add	x2, sp, #40
	mov	x0, x20
	bl	_power_supply_register
	str	x0, [x19, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_20
; %bb.17:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_19
; %bb.18:
	ldr	x0, [x19, #8]
	bl	_power_supply_unregister
LBB0_19:
	ldr	x0, [x19, #24]
	bl	_PTR_ERR
	b	LBB0_9
LBB0_20:
	str	x19, [sp, #24]
Lloh15:
	adrp	x1, _smb347_battery_desc@GOTPAGE
Lloh16:
	ldr	x1, [x1, _smb347_battery_desc@GOTPAGEOFF]
	add	x2, sp, #16
	mov	x0, x20
	bl	_power_supply_register
	str	x0, [x19]
	bl	_IS_ERR
	cbz	x0, LBB0_26
; %bb.21:
	ldr	x8, [x19, #16]
	ldr	x9, [x8, #16]
	cbz	x9, LBB0_23
; %bb.22:
	ldr	x0, [x19, #24]
	bl	_power_supply_unregister
	ldr	x8, [x19, #16]
LBB0_23:
	ldr	x8, [x8, #8]
	cbz	x8, LBB0_25
; %bb.24:
	ldr	x0, [x19, #8]
	bl	_power_supply_unregister
LBB0_25:
	ldr	x0, [x19]
	bl	_PTR_ERR
	b	LBB0_9
LBB0_26:
	ldr	x8, [x21]
	tbnz	x8, #63, LBB0_30
; %bb.27:
	mov	x0, x19
	mov	x1, x20
	bl	_smb347_irq_init
                                        ; kill: def $w0 killed $w0 def $x0
	tbnz	w0, #31, LBB0_29
; %bb.28:
	mov	x0, x19
	bl	_smb347_irq_enable
	b	LBB0_30
LBB0_29:
	str	x0, [sp]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
Lloh19:
	adrp	x1, l_.str.2@PAGE
Lloh20:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_dev_warn
LBB0_30:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__DATA,__data
	.p2align	3                               ; @smb347_probe.battery
_smb347_probe.battery:
	.quad	l_.str

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"smb347-battery"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_smb347_regmap,4,2              ; @smb347_regmap
	.comm	_smb347_mains_desc,4,2          ; @smb347_mains_desc
	.comm	_smb347_usb_desc,4,2            ; @smb347_usb_desc
	.comm	_smb347_battery_desc,4,2        ; @smb347_battery_desc
l_.str.1:                               ; @.str.1
	.asciz	"failed to initialize IRQ: %d\n"

l_.str.2:                               ; @.str.2
	.asciz	"disabling IRQ support\n"

	.no_dead_strip	_smb347_probe
.subsections_via_symbols
