	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function da9052_hwmon_probe
_da9052_hwmon_probe:                    ## @da9052_hwmon_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	$40, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	leaq	36(%r15), %rdi
	callq	_mutex_init
	movl	(%r14), %edi
	callq	_dev_get_drvdata
	movq	%rax, 16(%r15)
	movq	%r15, %rdi
	addq	$32, %rdi
	callq	_init_completion
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_device_property_read_bool
	movq	%rax, 24(%r15)
	testq	%rax, %rax
	je	LBB0_11
## %bb.3:
	movl	(%r14), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_devm_regulator_get
	movq	%rax, 8(%r15)
	movq	%rax, %rdi
	callq	_IS_ERR
	movq	8(%r15), %rdi
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	callq	_PTR_ERR
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_17
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_5:
	callq	_regulator_enable
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_17
## %bb.6:
	movq	8(%r15), %rdi
	callq	_regulator_get_voltage
	movl	%eax, %ebx
	movl	%eax, (%r15)
	testl	%eax, %eax
	js	LBB0_15
## %bb.7:
	movl	%ebx, %eax
	imulq	$274877907, %rax, %rdx          ## imm = 0x10624DD3
	shrq	$38, %rdx
	movl	%edx, (%r15)
	addl	$-2601000, %ebx                 ## imm = 0xFFD84FD8
	movq	16(%r15), %rdi
	cmpl	$-801001, %ebx                  ## imm = 0xFFF3C717
	ja	LBB0_9
## %bb.8:
	movq	(%rdi), %rdi
	leaq	L_.str.3(%rip), %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_dev_err
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_15
LBB0_9:
	movq	_DA9052_TSI_CONT_A_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_da9052_reg_write
	movq	16(%r15), %rdi
	movq	_DA9052_ADC_CONT_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_DA9052_ADCCONT_ADCMODE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %edx
	callq	_da9052_reg_update
	movq	16(%r15), %rdi
	movq	_DA9052_IRQ_TSIREADY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_da9052_tsi_datardy_irq@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.4(%rip), %rdx
	movq	%r15, %r8
	callq	_da9052_request_irq
	testl	%eax, %eax
	je	LBB0_11
## %bb.10:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	callq	_dev_err
	jmp	LBB0_15
LBB0_11:
	movq	_da9052_groups@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_devm_hwmon_device_register_with_groups
	movq	%rax, %rdi
	callq	_PTR_ERR_OR_ZERO
	testl	%eax, %eax
	je	LBB0_12
## %bb.13:
	movl	%eax, %ebx
	cmpq	$0, 24(%r15)
	je	LBB0_15
## %bb.14:
	movq	16(%r15), %rdi
	movq	_DA9052_IRQ_TSIREADY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdx
	callq	_da9052_free_irq
LBB0_15:
	movq	8(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_17
## %bb.16:
	callq	_regulator_disable
	jmp	LBB0_17
LBB0_12:
	xorl	%ebx, %ebx
LBB0_17:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"dlg,tsi-as-adc"

L_.str.1:                               ## @.str.1
	.asciz	"tsiref"

L_.str.2:                               ## @.str.2
	.asciz	"failed to get tsiref: %d"

L_.str.3:                               ## @.str.3
	.asciz	"invalid TSIREF voltage: %d"

	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_DA9052_TSI_CONT_A_REG,4,2      ## @DA9052_TSI_CONT_A_REG
	.comm	_DA9052_ADC_CONT_REG,4,2        ## @DA9052_ADC_CONT_REG
	.comm	_DA9052_ADCCONT_ADCMODE,4,2     ## @DA9052_ADCCONT_ADCMODE
	.comm	_DA9052_IRQ_TSIREADY,4,2        ## @DA9052_IRQ_TSIREADY
L_.str.4:                               ## @.str.4
	.asciz	"tsiready-irq"

	.comm	_da9052_tsi_datardy_irq,4,2     ## @da9052_tsi_datardy_irq
L_.str.5:                               ## @.str.5
	.asciz	"Failed to register TSIRDY IRQ: %d"

L_.str.6:                               ## @.str.6
	.asciz	"da9052"

	.comm	_da9052_groups,4,2              ## @da9052_groups
	.no_dead_strip	_da9052_hwmon_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function da9052_hwmon_probe
_da9052_hwmon_probe:                    ; @da9052_hwmon_probe
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	mov	w1, #40
	bl	_devm_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x0, x20
	mov	x1, x19
	bl	_platform_set_drvdata
	add	x0, x19, #36
	bl	_mutex_init
	ldr	w0, [x20]
	bl	_dev_get_drvdata
	str	x0, [x19, #16]
	add	x0, x19, #32
	bl	_init_completion
	ldr	w0, [x20]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_device_property_read_bool
	str	x0, [x19, #24]
	cbz	x0, LBB0_11
; %bb.2:
	ldr	w0, [x20]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_devm_regulator_get
	str	x0, [x19, #8]
	bl	_IS_ERR
	mov	x8, x0
	ldr	x0, [x19, #8]
	cbz	x8, LBB0_5
; %bb.3:
	bl	_PTR_ERR
	mov	x21, x0
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
	b	LBB0_16
LBB0_4:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_16
LBB0_5:
	bl	_regulator_enable
	mov	x21, x0
	cbnz	w0, LBB0_16
; %bb.6:
	ldr	x0, [x19, #8]
	bl	_regulator_get_voltage
	mov	x21, x0
	str	w0, [x19]
	tbnz	w0, #31, LBB0_14
; %bb.7:
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w21, w8
	lsr	x2, x8, #38
	str	w2, [x19]
	sub	w8, w21, #635, lsl #12          ; =2600960
	sub	w8, w8, #40
	ldr	x0, [x19, #16]
	mov	w9, #50967
	movk	w9, #65523, lsl #16
	cmp	w8, w9
	b.hi	LBB0_9
; %bb.8:
	ldr	x0, [x0]
Lloh12:
	adrp	x1, l_.str.3@PAGE
Lloh13:
	add	x1, x1, l_.str.3@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_dev_err
Lloh14:
	adrp	x8, _ENXIO@GOTPAGE
Lloh15:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w21, w8
	b	LBB0_14
LBB0_9:
Lloh17:
	adrp	x8, _DA9052_TSI_CONT_A_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _DA9052_TSI_CONT_A_REG@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_da9052_reg_write
	ldr	x0, [x19, #16]
Lloh20:
	adrp	x8, _DA9052_ADC_CONT_REG@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DA9052_ADC_CONT_REG@GOTPAGEOFF]
Lloh22:
	ldr	w1, [x8]
Lloh23:
	adrp	x8, _DA9052_ADCCONT_ADCMODE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _DA9052_ADCCONT_ADCMODE@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
	mov	x3, x2
	bl	_da9052_reg_update
	ldr	x0, [x19, #16]
Lloh26:
	adrp	x8, _DA9052_IRQ_TSIREADY@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DA9052_IRQ_TSIREADY@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _da9052_tsi_datardy_irq@GOTPAGE
Lloh30:
	ldr	x8, [x8, _da9052_tsi_datardy_irq@GOTPAGEOFF]
Lloh31:
	ldr	w3, [x8]
Lloh32:
	adrp	x2, l_.str.4@PAGE
Lloh33:
	add	x2, x2, l_.str.4@PAGEOFF
	mov	x4, x19
	bl	_da9052_request_irq
	cbz	w0, LBB0_11
; %bb.10:
	mov	x21, x0
Lloh34:
	adrp	x1, l_.str.5@PAGE
Lloh35:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	mov	x2, x21
	bl	_dev_err
	b	LBB0_14
LBB0_11:
Lloh36:
	adrp	x8, _da9052_groups@GOTPAGE
Lloh37:
	ldr	x8, [x8, _da9052_groups@GOTPAGEOFF]
Lloh38:
	ldr	w3, [x8]
Lloh39:
	adrp	x1, l_.str.6@PAGE
Lloh40:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x20
	mov	x2, x19
	bl	_devm_hwmon_device_register_with_groups
	bl	_PTR_ERR_OR_ZERO
	mov	x21, x0
	cbz	w0, LBB0_16
; %bb.12:
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_14
; %bb.13:
	ldr	x0, [x19, #16]
Lloh41:
	adrp	x8, _DA9052_IRQ_TSIREADY@GOTPAGE
Lloh42:
	ldr	x8, [x8, _DA9052_IRQ_TSIREADY@GOTPAGEOFF]
Lloh43:
	ldr	w1, [x8]
	mov	x2, x19
	bl	_da9052_free_irq
LBB0_14:
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_16
; %bb.15:
	bl	_regulator_disable
LBB0_16:
	mov	x0, x21
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"dlg,tsi-as-adc"

l_.str.1:                               ; @.str.1
	.asciz	"tsiref"

l_.str.2:                               ; @.str.2
	.asciz	"failed to get tsiref: %d"

l_.str.3:                               ; @.str.3
	.asciz	"invalid TSIREF voltage: %d"

	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_DA9052_TSI_CONT_A_REG,4,2      ; @DA9052_TSI_CONT_A_REG
	.comm	_DA9052_ADC_CONT_REG,4,2        ; @DA9052_ADC_CONT_REG
	.comm	_DA9052_ADCCONT_ADCMODE,4,2     ; @DA9052_ADCCONT_ADCMODE
	.comm	_DA9052_IRQ_TSIREADY,4,2        ; @DA9052_IRQ_TSIREADY
l_.str.4:                               ; @.str.4
	.asciz	"tsiready-irq"

	.comm	_da9052_tsi_datardy_irq,4,2     ; @da9052_tsi_datardy_irq
l_.str.5:                               ; @.str.5
	.asciz	"Failed to register TSIRDY IRQ: %d"

l_.str.6:                               ; @.str.6
	.asciz	"da9052"

	.comm	_da9052_groups,4,2              ; @da9052_groups
	.no_dead_strip	_da9052_hwmon_probe
.subsections_via_symbols
