	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gb_svc_pwrmon_debugfs_init
_gb_svc_pwrmon_debugfs_init:            ## @gb_svc_pwrmon_debugfs_init
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rsi
	leaq	L_.str(%rip), %rdi
	callq	_debugfs_create_dir
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR_OR_NULL
	testq	%rax, %rax
	jne	LBB0_13
## %bb.1:
	leaq	-52(%rbp), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_gb_svc_pwrmon_rail_count_get
	testq	%rax, %rax
	jne	LBB0_12
## %bb.2:
	movl	-52(%rbp), %eax
	testl	%eax, %eax
	je	LBB0_12
## %bb.3:
	movq	_GB_SVC_PWRMON_MAX_RAIL_COUNT@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jg	LBB0_12
## %bb.4:
	cltq
	movq	_GB_SVC_PWRMON_RAIL_NAME_BUFSIZE@GOTPCREL(%rip), %r12
	movslq	(%r12), %rbx
	imulq	%rax, %rbx
	addq	$24, %rbx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%rax, %r14
	movl	-52(%rbp), %edi
	movl	(%r13), %edx
	movl	$24, %esi
	callq	_kcalloc
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%rax, (%rcx)
	testq	%rax, %rax
	je	LBB0_11
## %bb.6:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	movq	%rbx, %rdx
	callq	_gb_svc_pwrmon_rail_names_get
	testq	%rax, %rax
	je	LBB0_7
LBB0_11:
	movq	%r14, %rdi
	callq	_kfree
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %rdi
	callq	_kfree
	movq	$0, (%rbx)
LBB0_12:
	movq	%r15, %rdi
	callq	_debugfs_remove
LBB0_13:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.14:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	cmpl	$0, -52(%rbp)
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	jle	LBB0_10
## %bb.8:
	movq	%r12, %rax
	xorl	%r14d, %r14d
	xorl	%ecx, %ecx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	movq	%r15, -88(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rsp, -112(%rbp)                ## 8-byte Spill
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	(%rbx), %r12
	leaq	(%r12,%r14), %rcx
	movq	%rcx, -104(%rbp)                ## 8-byte Spill
	movl	(%rax), %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rdi
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	16(%rax), %rcx
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	%rax, %rcx
	movl	%r15d, %esi
	leaq	L_.str.1(%rip), %rdx
	callq	_snprintf
	movl	%r13d, (%r12,%r14)
	movq	%rbx, 8(%r12,%r14)
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_debugfs_create_dir
	movq	%rax, %rbx
	leaq	L_.str.2(%rip), %rdi
	movl	$292, %esi                      ## imm = 0x124
	movq	%rax, %rdx
	movq	-104(%rbp), %r12                ## 8-byte Reload
	movq	%r12, %rcx
	movq	_pwrmon_debugfs_voltage_fops@GOTPCREL(%rip), %r8
	callq	_debugfs_create_file
	leaq	L_.str.3(%rip), %rdi
	movl	$292, %esi                      ## imm = 0x124
	movq	%rbx, %rdx
	movq	%r12, %rcx
	movq	_pwrmon_debugfs_current_fops@GOTPCREL(%rip), %r8
	callq	_debugfs_create_file
	leaq	L_.str.4(%rip), %rdi
	movl	$292, %esi                      ## imm = 0x124
	movq	%rbx, %rdx
	movq	%r12, %rcx
	movq	_pwrmon_debugfs_power_fops@GOTPCREL(%rip), %r8
	callq	_debugfs_create_file
	movq	-112(%rbp), %rsp                ## 8-byte Reload
	incq	%r13
	movslq	-52(%rbp), %rax
	addq	$4, -80(%rbp)                   ## 8-byte Folded Spill
	addq	$24, %r14
	cmpq	%rax, %r13
	movq	_GB_SVC_PWRMON_RAIL_NAME_BUFSIZE@GOTPCREL(%rip), %rax
	jl	LBB0_9
LBB0_10:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	jmp	LBB0_13
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"pwrmon"

	.comm	_GB_SVC_PWRMON_MAX_RAIL_COUNT,4,2 ## @GB_SVC_PWRMON_MAX_RAIL_COUNT
	.comm	_GB_SVC_PWRMON_RAIL_NAME_BUFSIZE,4,2 ## @GB_SVC_PWRMON_RAIL_NAME_BUFSIZE
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.1:                               ## @.str.1
	.asciz	"%s"

L_.str.2:                               ## @.str.2
	.asciz	"voltage_now"

	.comm	_pwrmon_debugfs_voltage_fops,4,2 ## @pwrmon_debugfs_voltage_fops
L_.str.3:                               ## @.str.3
	.asciz	"current_now"

	.comm	_pwrmon_debugfs_current_fops,4,2 ## @pwrmon_debugfs_current_fops
L_.str.4:                               ## @.str.4
	.asciz	"power_now"

	.comm	_pwrmon_debugfs_power_fops,4,2  ## @pwrmon_debugfs_power_fops
	.no_dead_strip	_gb_svc_pwrmon_debugfs_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gb_svc_pwrmon_debugfs_init
_gb_svc_pwrmon_debugfs_init:            ; @gb_svc_pwrmon_debugfs_init
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
	ldr	x1, [x0, #8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_debugfs_create_dir
	mov	x20, x0
	bl	_IS_ERR_OR_NULL
	cbnz	x0, LBB0_9
; %bb.1:
	sub	x1, x29, #92
	mov	x0, x19
	bl	_gb_svc_pwrmon_rail_count_get
	cbnz	x0, LBB0_8
; %bb.2:
	ldur	w8, [x29, #-92]
	cbz	w8, LBB0_8
; %bb.3:
Lloh5:
	adrp	x9, _GB_SVC_PWRMON_MAX_RAIL_COUNT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _GB_SVC_PWRMON_MAX_RAIL_COUNT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_8
; %bb.4:
	sxtw	x8, w8
Lloh8:
	adrp	x24, _GB_SVC_PWRMON_RAIL_NAME_BUFSIZE@GOTPAGE
Lloh9:
	ldr	x24, [x24, _GB_SVC_PWRMON_RAIL_NAME_BUFSIZE@GOTPAGEOFF]
	ldrsw	x9, [x24]
	orr	x10, xzr, #0x18
	madd	x22, x9, x8, x10
Lloh10:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh11:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x22
	bl	_kzalloc
	cbz	x0, LBB0_8
; %bb.5:
	mov	x21, x0
	ldur	w0, [x29, #-92]
	ldr	w2, [x23]
	mov	w1, #24
	bl	_kcalloc
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_gb_svc_pwrmon_rail_names_get
	cbz	x0, LBB0_11
LBB0_7:
	mov	x0, x21
	bl	_kfree
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
LBB0_8:
	mov	x0, x20
	bl	_debugfs_remove
LBB0_9:
	ldur	x8, [x29, #-88]
Lloh12:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh13:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.10:
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldur	w8, [x29, #-92]
	cmp	w8, #1
	b.lt	LBB0_14
; %bb.12:
	mov	x25, #0
	mov	x26, #0
	mov	x27, #0
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x28, sp
	ldr	x8, [x19]
	add	x22, x8, x25
	ldr	w1, [x24]
	mov	x9, x1
Lloh15:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh16:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	ldr	x8, [x21, #16]
	add	x3, x8, x26
	mov	x0, x23
                                        ; kill: def $w1 killed $w1 killed $x1
Lloh17:
	adrp	x2, l_.str.1@PAGE
Lloh18:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_snprintf
	str	w27, [x22]
	str	x19, [x22, #8]
	mov	x0, x23
	mov	x1, x20
	bl	_debugfs_create_dir
	mov	x23, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	mov	w1, #292
	mov	x2, x23
	mov	x3, x22
Lloh21:
	adrp	x4, _pwrmon_debugfs_voltage_fops@GOTPAGE
Lloh22:
	ldr	x4, [x4, _pwrmon_debugfs_voltage_fops@GOTPAGEOFF]
	bl	_debugfs_create_file
Lloh23:
	adrp	x0, l_.str.3@PAGE
Lloh24:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	w1, #292
	mov	x2, x23
	mov	x3, x22
Lloh25:
	adrp	x4, _pwrmon_debugfs_current_fops@GOTPAGE
Lloh26:
	ldr	x4, [x4, _pwrmon_debugfs_current_fops@GOTPAGEOFF]
	bl	_debugfs_create_file
Lloh27:
	adrp	x0, l_.str.4@PAGE
Lloh28:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	w1, #292
	mov	x2, x23
	mov	x3, x22
Lloh29:
	adrp	x4, _pwrmon_debugfs_power_fops@GOTPAGE
Lloh30:
	ldr	x4, [x4, _pwrmon_debugfs_power_fops@GOTPAGEOFF]
	bl	_debugfs_create_file
	mov	sp, x28
	add	x27, x27, #1
	ldursw	x8, [x29, #-92]
	add	x26, x26, #4
	add	x25, x25, #24
	cmp	x27, x8
	b.lt	LBB0_13
LBB0_14:
	mov	x0, x21
	bl	_kfree
	b	LBB0_9
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh29, Lloh30
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"pwrmon"

	.comm	_GB_SVC_PWRMON_MAX_RAIL_COUNT,4,2 ; @GB_SVC_PWRMON_MAX_RAIL_COUNT
	.comm	_GB_SVC_PWRMON_RAIL_NAME_BUFSIZE,4,2 ; @GB_SVC_PWRMON_RAIL_NAME_BUFSIZE
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.1:                               ; @.str.1
	.asciz	"%s"

l_.str.2:                               ; @.str.2
	.asciz	"voltage_now"

	.comm	_pwrmon_debugfs_voltage_fops,4,2 ; @pwrmon_debugfs_voltage_fops
l_.str.3:                               ; @.str.3
	.asciz	"current_now"

	.comm	_pwrmon_debugfs_current_fops,4,2 ; @pwrmon_debugfs_current_fops
l_.str.4:                               ; @.str.4
	.asciz	"power_now"

	.comm	_pwrmon_debugfs_power_fops,4,2  ; @pwrmon_debugfs_power_fops
	.no_dead_strip	_gb_svc_pwrmon_debugfs_init
.subsections_via_symbols
