	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function check_battery
_check_battery:                         ## @check_battery
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r14
	movq	(%rdi), %rax
	movslq	%esi, %rbx
	shlq	$4, %rbx
	movl	(%rax,%rbx), %ecx
	cmpl	%edx, %ecx
	jne	LBB0_1
## %bb.4:
	xorl	%r15d, %r15d
	testl	%edx, %edx
	jne	LBB0_9
## %bb.5:
	cmpl	$0, 4(%rax,%rbx)
	jne	LBB0_9
## %bb.6:
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	_HZ@GOTPCREL(%rip), %rdx
	imull	$18000, (%rdx), %edx            ## imm = 0x4650
	movq	(%rcx), %rdi
	movslq	%edx, %rsi
	addq	8(%rax,%rbx), %rsi
	callq	_time_after_eq
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r14), %rsi
	incl	%r12d
	leaq	L_.str.2(%rip), %rdx
	movl	%r12d, %ecx
	callq	_dev_printk
	movq	(%r14), %rax
	movl	$1, 4(%rax,%rbx)
	jmp	LBB0_8
LBB0_1:
	leaq	(%rax,%rbx), %rdx
	incl	%r12d
	xorl	%esi, %esi
	testl	%ecx, %ecx
	sete	%sil
	movl	%esi, (%rdx)
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, 8(%rax,%rbx)
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r14), %rsi
	je	LBB0_2
## %bb.3:
	leaq	L_.str.1(%rip), %rdx
	movl	%r12d, %ecx
	callq	_dev_printk
	jmp	LBB0_8
LBB0_2:
	leaq	L_.str(%rip), %rdx
	movl	%r12d, %ecx
	callq	_dev_printk
	movq	(%r14), %rax
	movl	$0, 4(%rax,%rbx)
LBB0_8:
	movl	$1, %r15d
LBB0_9:
	movl	%r15d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Battery %d now good\n"

L_.str.1:                               ## @.str.1
	.asciz	"Battery %d now FAILED\n"

	.comm	_HZ,4,2                         ## @HZ
L_.str.2:                               ## @.str.2
	.asciz	"Battery %d still FAILED after 5 hours\n"

	.no_dead_strip	_check_battery
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function check_battery
_check_battery:                         ; @check_battery
	.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, x1
	mov	x19, x0
	ldr	x9, [x0]
	sxtw	x21, w20
	add	x10, x9, w1, sxtw #4
	ldr	w8, [x10]
	cmp	w8, w2
	b.ne	LBB0_4
; %bb.1:
	cbnz	w2, LBB0_3
; %bb.2:
	add	x8, x9, x21, lsl #4
	ldr	w9, [x8, #4]
	cbz	w9, LBB0_7
LBB0_3:
	mov	w0, #0
	b	LBB0_9
LBB0_4:
	cmp	w8, #0
	cset	w11, eq
	str	w11, [x10]
Lloh0:
	adrp	x10, _jiffies@GOTPAGE
Lloh1:
	ldr	x10, [x10, _jiffies@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	add	x9, x9, x21, lsl #4
	str	x10, [x9, #8]
Lloh3:
	adrp	x9, _KERN_ERR@GOTPAGE
Lloh4:
	ldr	x9, [x9, _KERN_ERR@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x9]
	ldr	x1, [x19, #8]
	add	w3, w20, #1
	cbz	w8, LBB0_6
; %bb.5:
Lloh6:
	adrp	x2, l_.str.1@PAGE
Lloh7:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_dev_printk
	mov	w0, #1
	b	LBB0_9
LBB0_6:
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	bl	_dev_printk
	ldr	x8, [x19]
	add	x8, x8, x21, lsl #4
	str	wzr, [x8, #4]
	mov	w0, #1
	b	LBB0_9
LBB0_7:
Lloh10:
	adrp	x9, _jiffies@GOTPAGE
Lloh11:
	ldr	x9, [x9, _jiffies@GOTPAGEOFF]
Lloh12:
	ldr	x0, [x9]
	ldr	x8, [x8, #8]
Lloh13:
	adrp	x9, _HZ@GOTPAGE
Lloh14:
	ldr	x9, [x9, _HZ@GOTPAGEOFF]
Lloh15:
	ldr	w9, [x9]
	mov	w10, #18000
	mul	w9, w9, w10
	add	x1, x8, w9, sxtw
	bl	_time_after_eq
	cbz	x0, LBB0_9
; %bb.8:
Lloh16:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	ldr	x1, [x19, #8]
	add	w3, w20, #1
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	bl	_dev_printk
	ldr	x8, [x19]
	add	x8, x8, x21, lsl #4
	mov	w0, #1
	str	w0, [x8, #4]
LBB0_9:
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Battery %d now good\n"

l_.str.1:                               ; @.str.1
	.asciz	"Battery %d now FAILED\n"

	.comm	_HZ,4,2                         ; @HZ
l_.str.2:                               ; @.str.2
	.asciz	"Battery %d still FAILED after 5 hours\n"

	.no_dead_strip	_check_battery
.subsections_via_symbols
