	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s3c_hwmon_probe
_s3c_hwmon_probe:                       ## @s3c_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	callq	_dev_get_platdata
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$24, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rax, %r13
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_platform_set_drvdata
	movq	%r13, %rdi
	addq	$16, %rdi
	callq	_mutex_init
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_s3c_adc_register
	movl	%eax, (%r13)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.25:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	(%r13), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_5:
	movq	%r12, %rdi
	callq	_s3c_hwmon_add_raw
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_23
## %bb.6:
	movq	%r12, %rdi
	callq	_hwmon_device_register
	movl	%eax, 4(%r13)
	movl	%eax, %edi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:
	leaq	L_.str.2(%rip), %rsi
	movq	%r12, %rdi
	xorl	%eax, %eax
	callq	_dev_err
	movl	4(%r13), %edi
	callq	_PTR_ERR
	movl	%eax, %ebx
LBB0_22:
	movq	%r12, %rdi
	callq	_s3c_hwmon_remove_raw
LBB0_23:
	movl	(%r13), %edi
	callq	_s3c_adc_release
LBB0_24:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_8
## %bb.10:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	$-1, -56(%rbp)                  ## 8-byte Folded Spill
	xorl	%r15d, %r15d
	xorl	%r13d, %r13d
	jmp	LBB0_11
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.4(%rip), %rsi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
LBB0_16:                                ##   in Loop: Header=BB0_11 Depth=1
	incq	%r13
	movq	(%r14), %rdi
	callq	_ARRAY_SIZE
	cltq
	addq	$4, %r15
	decq	-56(%rbp)                       ## 8-byte Folded Spill
	xorl	%ebx, %ebx
	cmpq	%rax, %r13
	jge	LBB0_24
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r15,2), %rbx
	testq	%rbx, %rbx
	je	LBB0_16
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	cmpl	$65536, (%rbx)                  ## imm = 0x10000
	jl	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r12, %rdi
	leaq	L_.str.3(%rip), %rsi
	movl	%r13d, %edx
	callq	_dev_warn
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpq	$0, 8(%rbx)
	je	LBB0_15
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r14), %rax
	movq	(%rax,%r15,2), %rsi
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %rdx
	addq	%r15, %rdx
	movq	%r12, %rdi
	movl	%r13d, %ecx
	callq	_s3c_hwmon_create_attr
	testl	%eax, %eax
	je	LBB0_16
## %bb.18:
	movl	%eax, %ebx
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	movl	%r13d, %edx
	xorl	%eax, %eax
	callq	_dev_err
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	cmpl	$-1, %r14d
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	je	LBB0_21
## %bb.19:
	addq	$-4, %r15
	negq	%r14
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rsi
	addq	%r15, %rsi
	movq	%r12, %rdi
	callq	_s3c_hwmon_remove_attr
	decq	%r14
	addq	$-4, %r15
	cmpq	$1, %r14
	jg	LBB0_20
LBB0_21:
	movl	4(%r13), %edi
	callq	_hwmon_device_unregister
	jmp	LBB0_22
LBB0_8:
	xorl	%ebx, %ebx
	jmp	LBB0_24
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no platform data supplied\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"cannot register adc\n"

L_.str.2:                               ## @.str.2
	.asciz	"error registering with hwmon\n"

L_.str.3:                               ## @.str.3
	.asciz	"channel %d multiplier too large\n"

L_.str.4:                               ## @.str.4
	.asciz	"channel %d divider zero\n"

L_.str.5:                               ## @.str.5
	.asciz	"error creating channel %d\n"

	.no_dead_strip	_s3c_hwmon_probe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s3c_hwmon_probe
_s3c_hwmon_probe:                       ; @s3c_hwmon_probe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x19, x0
	bl	_dev_get_platdata
	cbz	x0, LBB0_4
; %bb.1:
	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, #24
	bl	_devm_kzalloc
	cbz	x0, LBB0_5
; %bb.2:
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_platform_set_drvdata
	add	x0, x20, #16
	bl	_mutex_init
	mov	x0, x19
	mov	x1, #0
	mov	x2, #0
	mov	w3, #0
	bl	_s3c_adc_register
	str	w0, [x20]
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.3:
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	b	_PTR_ERR
LBB0_4:
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_dev_err
Lloh7:
	adrp	x8, _EINVAL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_7:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	mov	x0, x19
	bl	_s3c_hwmon_add_raw
	mov	x22, x0
	cbnz	w0, LBB0_12
; %bb.9:
	mov	x0, x19
	bl	_hwmon_device_register
	str	w0, [x20, #4]
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.10:
Lloh11:
	adrp	x1, l_.str.2@PAGE
Lloh12:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	ldr	w0, [x20, #4]
	bl	_PTR_ERR
	mov	x22, x0
LBB0_11:
	mov	x0, x19
	bl	_s3c_hwmon_remove_raw
LBB0_12:
	ldr	w0, [x20]
	bl	_s3c_adc_release
	b	LBB0_7
LBB0_13:
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_26
; %bb.14:
	mov	x23, #0
	mov	x26, #-4
Lloh13:
	adrp	x24, l_.str.3@PAGE
Lloh14:
	add	x24, x24, l_.str.3@PAGEOFF
Lloh15:
	adrp	x25, l_.str.4@PAGE
Lloh16:
	add	x25, x25, l_.str.4@PAGEOFF
	b	LBB0_17
LBB0_15:                                ;   in Loop: Header=BB0_17 Depth=1
	str	x23, [sp]
	mov	x0, x19
	mov	x1, x25
	bl	_dev_err
LBB0_16:                                ;   in Loop: Header=BB0_17 Depth=1
	add	x23, x23, #1
	ldr	x0, [x21]
	bl	_ARRAY_SIZE
	mov	w22, #0
	add	x26, x26, #4
	cmp	x23, w0, sxtw
	b.ge	LBB0_7
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x22, [x8, x23, lsl #3]
	cbz	x22, LBB0_16
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	w8, [x22]
	cmp	w8, #16, lsl #12                ; =65536
	b.lt	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_17 Depth=1
	mov	x0, x19
	mov	x1, x24
	mov	x2, x23
	bl	_dev_warn
LBB0_20:                                ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_15
; %bb.21:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x8, [x21]
	ldr	x1, [x8, x23, lsl #3]
	ldr	x8, [x20, #8]
	add	x8, x8, x26
	add	x2, x8, #4
	mov	x0, x19
	mov	x3, x23
	bl	_s3c_hwmon_create_attr
	cbz	w0, LBB0_16
; %bb.22:
	mov	x22, x0
	str	x23, [sp]
Lloh17:
	adrp	x1, l_.str.5@PAGE
Lloh18:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x19
	bl	_dev_err
	cbz	w23, LBB0_25
; %bb.23:
	add	x21, x23, #1
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x1, x8, x26
	mov	x0, x19
	bl	_s3c_hwmon_remove_attr
	sub	x21, x21, #1
	sub	x26, x26, #4
	cmp	x21, #1
	b.gt	LBB0_24
LBB0_25:
	ldr	w0, [x20, #4]
	bl	_hwmon_device_unregister
	b	LBB0_11
LBB0_26:
	mov	w22, #0
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no platform data supplied\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"cannot register adc\n"

l_.str.2:                               ; @.str.2
	.asciz	"error registering with hwmon\n"

l_.str.3:                               ; @.str.3
	.asciz	"channel %d multiplier too large\n"

l_.str.4:                               ; @.str.4
	.asciz	"channel %d divider zero\n"

l_.str.5:                               ; @.str.5
	.asciz	"error creating channel %d\n"

	.no_dead_strip	_s3c_hwmon_probe
.subsections_via_symbols
