	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function query_battery_state
_query_battery_state:                   ## @query_battery_state
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_async_req_locks@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	callq	_test_and_set_bit
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	popq	%rbp
	retq
LBB0_1:
	movq	_pmu_kind@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PMU_OHARE_BASED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.4:
	movq	_done_battery_state_ohare@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PMU_BATTERY_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_batt_req@GOTPCREL(%rip), %rdi
	movl	$1, %edx
	xorl	%eax, %eax
	popq	%rbp
	jmp	_pmu_request                    ## TAILCALL
LBB0_2:
	movq	_done_battery_state_smart@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_PMU_SMART_BATTERY_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_pmu_cur_battery@GOTPCREL(%rip), %rax
	movq	(%rax), %r8
	incq	%r8
	movq	_batt_req@GOTPCREL(%rip), %rdi
	movl	$2, %edx
	xorl	%eax, %eax
	popq	%rbp
	jmp	_pmu_request                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_async_req_locks,4,2            ## @async_req_locks
	.comm	_pmu_kind,8,3                   ## @pmu_kind
	.comm	_PMU_OHARE_BASED,8,3            ## @PMU_OHARE_BASED
	.comm	_batt_req,4,2                   ## @batt_req
	.comm	_done_battery_state_ohare,4,2   ## @done_battery_state_ohare
	.comm	_PMU_BATTERY_STATE,4,2          ## @PMU_BATTERY_STATE
	.comm	_done_battery_state_smart,4,2   ## @done_battery_state_smart
	.comm	_PMU_SMART_BATTERY_STATE,4,2    ## @PMU_SMART_BATTERY_STATE
	.comm	_pmu_cur_battery,8,3            ## @pmu_cur_battery
	.no_dead_strip	_query_battery_state
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function query_battery_state
_query_battery_state:                   ; @query_battery_state
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #32
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x1, _async_req_locks@GOTPAGE
Lloh1:
	ldr	x1, [x1, _async_req_locks@GOTPAGEOFF]
	mov	w0, #0
	bl	_test_and_set_bit
	cbnz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _pmu_kind@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pmu_kind@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _PMU_OHARE_BASED@GOTPAGE
Lloh6:
	ldr	x9, [x9, _PMU_OHARE_BASED@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _done_battery_state_ohare@GOTPAGE
Lloh9:
	ldr	x8, [x8, _done_battery_state_ohare@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
Lloh11:
	adrp	x8, _PMU_BATTERY_STATE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _PMU_BATTERY_STATE@GOTPAGEOFF]
Lloh13:
	ldr	w3, [x8]
Lloh14:
	adrp	x0, _batt_req@GOTPAGE
Lloh15:
	ldr	x0, [x0, _batt_req@GOTPAGEOFF]
	mov	w2, #1
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	b	_pmu_request
LBB0_3:
Lloh16:
	adrp	x8, _done_battery_state_smart@GOTPAGE
Lloh17:
	ldr	x8, [x8, _done_battery_state_smart@GOTPAGEOFF]
Lloh18:
	adrp	x9, _PMU_SMART_BATTERY_STATE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _PMU_SMART_BATTERY_STATE@GOTPAGEOFF]
Lloh20:
	ldr	w1, [x8]
Lloh21:
	ldr	w3, [x9]
Lloh22:
	adrp	x8, _pmu_cur_battery@GOTPAGE
Lloh23:
	ldr	x8, [x8, _pmu_cur_battery@GOTPAGEOFF]
Lloh24:
	ldr	x8, [x8]
	add	x8, x8, #1
	str	x8, [sp]
Lloh25:
	adrp	x0, _batt_req@GOTPAGE
Lloh26:
	ldr	x0, [x0, _batt_req@GOTPAGEOFF]
	mov	w2, #2
	bl	_pmu_request
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #32
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_async_req_locks,4,2            ; @async_req_locks
	.comm	_pmu_kind,8,3                   ; @pmu_kind
	.comm	_PMU_OHARE_BASED,8,3            ; @PMU_OHARE_BASED
	.comm	_batt_req,4,2                   ; @batt_req
	.comm	_done_battery_state_ohare,4,2   ; @done_battery_state_ohare
	.comm	_PMU_BATTERY_STATE,4,2          ; @PMU_BATTERY_STATE
	.comm	_done_battery_state_smart,4,2   ; @done_battery_state_smart
	.comm	_PMU_SMART_BATTERY_STATE,4,2    ; @PMU_SMART_BATTERY_STATE
	.comm	_pmu_cur_battery,8,3            ; @pmu_cur_battery
	.no_dead_strip	_query_battery_state
.subsections_via_symbols
