	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_power_supply_add_hwmon_sysfs   ## -- Begin function power_supply_add_hwmon_sysfs
	.p2align	4, 0x90
_power_supply_add_hwmon_sysfs:          ## @power_supply_add_hwmon_sysfs
	.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, %r14
	movq	(%rdi), %r13
	leaq	8(%rdi), %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r12
	movl	(%r12), %edx
	leaq	_power_supply_add_hwmon_sysfs(%rip), %rsi
	movq	%rbx, %rdi
	callq	_devres_open_group
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_devm_kzalloc
	testq	%rax, %rax
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.5:
	movq	%rax, %r15
	movq	%r14, 8(%rax)
	movq	_POWER_SUPPLY_PROP_TIME_TO_FULL_AVG@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	incq	%rdi
	movl	(%r12), %esi
	callq	_bitmap_zalloc
	movl	%eax, (%r15)
	testl	%eax, %eax
	je	LBB0_3
## %bb.6:
	movq	_power_supply_hwmon_bitmap_free@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%rbx, %rdi
	movl	%eax, %edx
	callq	_devm_add_action
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.7:
	movl	(%r13), %eax
	testl	%eax, %eax
	jle	LBB0_12
## %bb.8:
	xorl	%ebx, %ebx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r13), %rcx
	movl	(%rcx,%rbx,4), %edi
	leal	-128(%rdi), %ecx
	cmpl	$14, %ecx
	ja	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movl	(%r15), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_set_bit
	movl	(%r13), %eax
	jmp	LBB0_11
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_17
LBB0_12:
	movq	(%r14), %rax
	movq	16(%rax), %r12
	movq	%r12, %rdi
	movl	$45, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_15
## %bb.13:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	callq	_devm_kstrdup
	testq	%rax, %rax
	je	LBB0_3
## %bb.14:
	movq	%rax, %r12
	movq	%rax, %rdi
	movl	$45, %esi
	movl	$95, %edx
	callq	_strreplace
LBB0_15:
	movq	_power_supply_hwmon_chip_info@GOTPCREL(%rip), %rcx
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%r15, %rdx
	xorl	%r8d, %r8d
	callq	_devm_hwmon_device_register_with_info
	movq	%rax, %rdi
	callq	_PTR_ERR_OR_ZERO
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_4
## %bb.16:
	leaq	_power_supply_add_hwmon_sysfs(%rip), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_devres_close_group
	jmp	LBB0_17
LBB0_3:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	xorl	%esi, %esi
	callq	_devres_release_group
	movl	%r12d, %ebx
LBB0_17:
	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	_POWER_SUPPLY_PROP_TIME_TO_FULL_AVG,8,3 ## @POWER_SUPPLY_PROP_TIME_TO_FULL_AVG
	.comm	_power_supply_hwmon_bitmap_free,4,2 ## @power_supply_hwmon_bitmap_free
	.comm	_power_supply_hwmon_chip_info,4,2 ## @power_supply_hwmon_chip_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_power_supply_add_hwmon_sysfs   ; -- Begin function power_supply_add_hwmon_sysfs
	.p2align	2
_power_supply_add_hwmon_sysfs:          ; @power_supply_add_hwmon_sysfs
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x21, x0
	mov	x19, x0
	ldr	x24, [x19], #8
Lloh0:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
Lloh2:
	adrp	x1, _power_supply_add_hwmon_sysfs@PAGE
Lloh3:
	add	x1, x1, _power_supply_add_hwmon_sysfs@PAGEOFF
	mov	x0, x19
	bl	_devres_open_group
	cbz	w0, LBB0_9
; %bb.1:
	ldr	w2, [x23]
	mov	x0, x19
	mov	w1, #16
	bl	_devm_kzalloc
	cbz	x0, LBB0_15
; %bb.2:
	mov	x20, x0
	str	x21, [x0, #8]
Lloh4:
	adrp	x8, _POWER_SUPPLY_PROP_TIME_TO_FULL_AVG@GOTPAGE
Lloh5:
	ldr	x8, [x8, _POWER_SUPPLY_PROP_TIME_TO_FULL_AVG@GOTPAGEOFF]
Lloh6:
	ldr	x8, [x8]
	add	x0, x8, #1
	ldr	w1, [x23]
	bl	_bitmap_zalloc
	str	w0, [x20]
	cbz	w0, LBB0_15
; %bb.3:
	mov	x2, x0
Lloh7:
	adrp	x8, _power_supply_hwmon_bitmap_free@GOTPAGE
Lloh8:
	ldr	x8, [x8, _power_supply_hwmon_bitmap_free@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_devm_add_action
	mov	x22, x0
	cbnz	w0, LBB0_16
; %bb.4:
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_10
; %bb.5:
	mov	x22, #0
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x24, #8]
	ldr	w0, [x9, x22, lsl #2]
	sub	w9, w0, #128
	cmp	w9, #14
	b.hi	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w1, [x20]
	bl	_set_bit
	ldr	w8, [x24]
	b	LBB0_6
LBB0_9:
Lloh10:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_17
LBB0_10:
	ldr	x8, [x21]
	ldr	x21, [x8, #16]
	mov	x0, x21
	mov	w1, #45
	bl	_strchr
	cbz	x0, LBB0_13
; %bb.11:
	ldr	w2, [x23]
	mov	x0, x19
	mov	x1, x21
	bl	_devm_kstrdup
	cbz	x0, LBB0_15
; %bb.12:
	mov	x21, x0
	mov	w1, #45
	mov	w2, #95
	bl	_strreplace
LBB0_13:
Lloh13:
	adrp	x3, _power_supply_hwmon_chip_info@GOTPAGE
Lloh14:
	ldr	x3, [x3, _power_supply_hwmon_chip_info@GOTPAGEOFF]
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	mov	x4, #0
	bl	_devm_hwmon_device_register_with_info
	bl	_PTR_ERR_OR_ZERO
	mov	x22, x0
	cbnz	w0, LBB0_16
; %bb.14:
Lloh15:
	adrp	x1, _power_supply_add_hwmon_sysfs@PAGE
Lloh16:
	add	x1, x1, _power_supply_add_hwmon_sysfs@PAGEOFF
	mov	x0, x19
	bl	_devres_close_group
	b	LBB0_17
LBB0_15:
Lloh17:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh18:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	neg	w22, w8
LBB0_16:
	mov	x0, x19
	mov	x1, #0
	bl	_devres_release_group
LBB0_17:
	mov	x0, x22
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_POWER_SUPPLY_PROP_TIME_TO_FULL_AVG,8,3 ; @POWER_SUPPLY_PROP_TIME_TO_FULL_AVG
	.comm	_power_supply_hwmon_bitmap_free,4,2 ; @power_supply_hwmon_bitmap_free
	.comm	_power_supply_hwmon_chip_info,4,2 ; @power_supply_hwmon_chip_info
.subsections_via_symbols
