	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9150_fg_probe
_da9150_fg_probe:                       ## @da9150_fg_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, %r12
	movl	16(%rdi), %edi
	callq	_dev_get_drvdata
	movq	%rax, %rbx
	movq	%r12, %rdi
	callq	_dev_get_platdata
	movq	%rax, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$48, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%rbx, 40(%r14)
	movq	%r12, 32(%r14)
	leaq	28(%r14), %rdi
	callq	_mutex_init
	movq	_DA9150_CORE2WIRE_CTRL_A@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DA9150_FG_QIF_EN_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	%ecx, %edx
	callq	_da9150_set_bits
	movq	_fg_desc@GOTPCREL(%rip), %rsi
	movq	%r12, %rdi
	xorl	%edx, %edx
	callq	_devm_power_supply_register
	movl	%eax, 24(%r14)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.23:
	movl	24(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_22
LBB0_3:
	movq	_DA9150_QIF_FW_MAIN_VER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DA9150_QIF_FW_MAIN_VER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	callq	_da9150_fg_read_attr
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%eax, %edx
	callq	_dev_info
	cmpq	$0, 8(%r12)
	je	LBB0_5
## %bb.4:
	movq	%r12, %rdi
	callq	_da9150_fg_dt_pdata
	movq	%rax, %r15
	movq	%rax, (%r12)
LBB0_5:
	testq	%r15, %r15
	je	LBB0_13
## %bb.6:
	movq	8(%r15), %rax
	movq	%rax, 16(%r14)
	movl	(%r15), %eax
	cmpl	$101, %eax
	jl	LBB0_8
## %bb.7:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_warn
	jmp	LBB0_9
LBB0_8:
	movl	%eax, (%r14)
LBB0_9:
	movl	4(%r15), %eax
	cmpl	$100, %eax
	jg	LBB0_11
## %bb.10:
	cmpl	(%r15), %eax
	jge	LBB0_11
## %bb.12:
	movl	%eax, 4(%r14)
	jmp	LBB0_13
LBB0_11:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	callq	_dev_warn
LBB0_13:
	movq	%r14, %rdi
	callq	_da9150_fg_soc_event_config
	cmpq	$0, 16(%r14)
	je	LBB0_15
## %bb.14:
	leaq	8(%r14), %rbx
	movq	_da9150_fg_work@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_INIT_DELAYED_WORK
	movq	16(%r14), %rdi
	callq	_msecs_to_jiffies
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_schedule_delayed_work
LBB0_15:
	leaq	L_.str.3(%rip), %rsi
	movq	%r12, %rdi
	callq	_platform_get_irq_byname
	movl	%eax, %r15d
	testl	%eax, %eax
	js	LBB0_16
## %bb.17:
	movq	_da9150_fg_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_IRQF_ONESHOT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, (%rsp)
	leaq	L_.str.3(%rip), %r9
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	movl	%r15d, %esi
	xorl	%edx, %edx
	callq	_devm_request_threaded_irq
	testl	%eax, %eax
	je	LBB0_22
## %bb.18:
	movl	%eax, %r13d
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movl	%r13d, %r15d
	cmpq	$0, 16(%r14)
	jne	LBB0_20
	jmp	LBB0_21
LBB0_16:
	leaq	L_.str.4(%rip), %rsi
	movq	%r12, %rdi
	movl	%r15d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	cmpq	$0, 16(%r14)
	je	LBB0_21
LBB0_20:
	addq	$8, %r14
	movq	%r14, %rdi
	callq	_cancel_delayed_work
LBB0_21:
	movl	%r15d, %ebx
LBB0_22:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_DA9150_CORE2WIRE_CTRL_A,4,2    ## @DA9150_CORE2WIRE_CTRL_A
	.comm	_DA9150_FG_QIF_EN_MASK,4,2      ## @DA9150_FG_QIF_EN_MASK
	.comm	_fg_desc,4,2                    ## @fg_desc
	.comm	_DA9150_QIF_FW_MAIN_VER,4,2     ## @DA9150_QIF_FW_MAIN_VER
	.comm	_DA9150_QIF_FW_MAIN_VER_SIZE,4,2 ## @DA9150_QIF_FW_MAIN_VER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Version: 0x%x\n"

L_.str.1:                               ## @.str.1
	.asciz	"Invalid SOC warning level provided, Ignoring"

L_.str.2:                               ## @.str.2
	.asciz	"Invalid SOC critical level provided, Ignoring"

	.comm	_da9150_fg_work,4,2             ## @da9150_fg_work
L_.str.3:                               ## @.str.3
	.asciz	"FG"

L_.str.4:                               ## @.str.4
	.asciz	"Failed to get IRQ FG: %d\n"

	.comm	_da9150_fg_irq,4,2              ## @da9150_fg_irq
	.comm	_IRQF_ONESHOT,4,2               ## @IRQF_ONESHOT
L_.str.5:                               ## @.str.5
	.asciz	"Failed to request IRQ %d: %d\n"

	.no_dead_strip	_da9150_fg_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function da9150_fg_probe
_da9150_fg_probe:                       ; @da9150_fg_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldr	w0, [x0, #16]
	bl	_dev_get_drvdata
	mov	x22, x0
	mov	x0, x19
	bl	_dev_get_platdata
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #48
	bl	_devm_kzalloc
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	stp	x19, x22, [x20, #32]
	add	x0, x20, #28
	bl	_mutex_init
Lloh3:
	adrp	x8, _DA9150_CORE2WIRE_CTRL_A@GOTPAGE
Lloh4:
	ldr	x8, [x8, _DA9150_CORE2WIRE_CTRL_A@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _DA9150_FG_QIF_EN_MASK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DA9150_FG_QIF_EN_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x22
	mov	x3, x2
	bl	_da9150_set_bits
Lloh9:
	adrp	x1, _fg_desc@GOTPAGE
Lloh10:
	ldr	x1, [x1, _fg_desc@GOTPAGEOFF]
	mov	x0, x19
	mov	x2, #0
	bl	_devm_power_supply_register
	str	w0, [x20, #24]
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	ldr	w0, [x20, #24]
	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
	add	sp, sp, #64
	b	_PTR_ERR
LBB0_3:
Lloh11:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh12:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_22
LBB0_4:
Lloh14:
	adrp	x8, _DA9150_QIF_FW_MAIN_VER@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DA9150_QIF_FW_MAIN_VER@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _DA9150_QIF_FW_MAIN_VER_SIZE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DA9150_QIF_FW_MAIN_VER_SIZE@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_da9150_fg_read_attr
	mov	x2, x0
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_info
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_da9150_fg_dt_pdata
	mov	x21, x0
	str	x0, [x19]
LBB0_6:
	cbz	x21, LBB0_14
; %bb.7:
	ldr	x8, [x21, #8]
	str	x8, [x20, #16]
	ldr	w8, [x21]
	cmp	w8, #101
	b.lt	LBB0_9
; %bb.8:
Lloh22:
	adrp	x1, l_.str.1@PAGE
Lloh23:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
	b	LBB0_10
LBB0_9:
	str	w8, [x20]
LBB0_10:
	ldr	w8, [x21, #4]
	cmp	w8, #100
	b.gt	LBB0_13
; %bb.11:
	ldr	w9, [x21]
	cmp	w8, w9
	b.ge	LBB0_13
; %bb.12:
	str	w8, [x20, #4]
	b	LBB0_14
LBB0_13:
Lloh24:
	adrp	x1, l_.str.2@PAGE
Lloh25:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_warn
LBB0_14:
	mov	x0, x20
	bl	_da9150_fg_soc_event_config
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_16
; %bb.15:
	add	x21, x20, #8
Lloh26:
	adrp	x8, _da9150_fg_work@GOTPAGE
Lloh27:
	ldr	x8, [x8, _da9150_fg_work@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_INIT_DELAYED_WORK
	ldr	x0, [x20, #16]
	bl	_msecs_to_jiffies
	mov	x1, x0
	mov	x0, x21
	bl	_schedule_delayed_work
LBB0_16:
Lloh29:
	adrp	x1, l_.str.3@PAGE
Lloh30:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x19
	bl	_platform_get_irq_byname
	mov	x21, x0
	tbnz	w0, #31, LBB0_19
; %bb.17:
Lloh31:
	adrp	x8, _da9150_fg_irq@GOTPAGE
Lloh32:
	ldr	x8, [x8, _da9150_fg_irq@GOTPAGEOFF]
Lloh33:
	ldr	w3, [x8]
Lloh34:
	adrp	x8, _IRQF_ONESHOT@GOTPAGE
Lloh35:
	ldr	x8, [x8, _IRQF_ONESHOT@GOTPAGEOFF]
Lloh36:
	ldr	w4, [x8]
Lloh37:
	adrp	x5, l_.str.3@PAGE
Lloh38:
	add	x5, x5, l_.str.3@PAGEOFF
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	mov	x6, x20
	bl	_devm_request_threaded_irq
	cbz	w0, LBB0_21
; %bb.18:
	mov	x22, x0
	str	x22, [sp]
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	mov	x21, x22
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_20
	b	LBB0_22
LBB0_19:
Lloh41:
	adrp	x1, l_.str.4@PAGE
Lloh42:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	mov	x2, x21
	bl	_dev_err
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_22
LBB0_20:
	add	x0, x20, #8
	bl	_cancel_delayed_work
	b	LBB0_22
LBB0_21:
	mov	w21, #0
LBB0_22:
	mov	x0, x21
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_DA9150_CORE2WIRE_CTRL_A,4,2    ; @DA9150_CORE2WIRE_CTRL_A
	.comm	_DA9150_FG_QIF_EN_MASK,4,2      ; @DA9150_FG_QIF_EN_MASK
	.comm	_fg_desc,4,2                    ; @fg_desc
	.comm	_DA9150_QIF_FW_MAIN_VER,4,2     ; @DA9150_QIF_FW_MAIN_VER
	.comm	_DA9150_QIF_FW_MAIN_VER_SIZE,4,2 ; @DA9150_QIF_FW_MAIN_VER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Version: 0x%x\n"

l_.str.1:                               ; @.str.1
	.asciz	"Invalid SOC warning level provided, Ignoring"

l_.str.2:                               ; @.str.2
	.asciz	"Invalid SOC critical level provided, Ignoring"

	.comm	_da9150_fg_work,4,2             ; @da9150_fg_work
l_.str.3:                               ; @.str.3
	.asciz	"FG"

l_.str.4:                               ; @.str.4
	.asciz	"Failed to get IRQ FG: %d\n"

	.comm	_da9150_fg_irq,4,2              ; @da9150_fg_irq
	.comm	_IRQF_ONESHOT,4,2               ; @IRQF_ONESHOT
l_.str.5:                               ; @.str.5
	.asciz	"Failed to request IRQ %d: %d\n"

	.no_dead_strip	_da9150_fg_probe
.subsections_via_symbols
