	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hidpp10_query_battery_mileage
_hidpp10_query_battery_mileage:         ## @hidpp10_query_battery_mileage
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %r14
	movq	_REPORT_ID_HIDPP_SHORT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_HIDPP_GET_REGISTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_HIDPP_REG_BATTERY_MILEAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	leaq	-24(%rbp), %rax
	movq	%rax, (%rsp)
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_hidpp_send_rap_command_sync
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	movq	-24(%rbp), %rax
	movl	(%rax), %ecx
	movl	%ecx, 8(%r14)
	movl	8(%rax), %edi
	callq	_hidpp10_battery_mileage_map_status
	movl	%eax, (%r14)
	movq	_POWER_SUPPLY_STATUS_DISCHARGING@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	sete	%cl
	movq	_POWER_SUPPLY_STATUS_FULL@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	sete	%al
	orb	%cl, %al
	movzbl	%al, %eax
	movl	%eax, 4(%r14)
LBB0_2:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_REPORT_ID_HIDPP_SHORT,4,2      ## @REPORT_ID_HIDPP_SHORT
	.comm	_HIDPP_GET_REGISTER,4,2         ## @HIDPP_GET_REGISTER
	.comm	_HIDPP_REG_BATTERY_MILEAGE,4,2  ## @HIDPP_REG_BATTERY_MILEAGE
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ## @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ## @POWER_SUPPLY_STATUS_FULL
	.no_dead_strip	_hidpp10_query_battery_mileage
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hidpp10_query_battery_mileage
_hidpp10_query_battery_mileage:         ; @hidpp10_query_battery_mileage
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _REPORT_ID_HIDPP_SHORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _REPORT_ID_HIDPP_SHORT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _HIDPP_GET_REGISTER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _HIDPP_GET_REGISTER@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _HIDPP_REG_BATTERY_MILEAGE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _HIDPP_REG_BATTERY_MILEAGE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	add	x6, sp, #8
	mov	x4, #0
	mov	w5, #0
	bl	_hidpp_send_rap_command_sync
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	w9, [x8]
	str	w9, [x19, #8]
	ldr	w0, [x8, #8]
	bl	_hidpp10_battery_mileage_map_status
	str	w0, [x19]
Lloh9:
	adrp	x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGE
Lloh10:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_DISCHARGING@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
Lloh12:
	adrp	x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POWER_SUPPLY_STATUS_FULL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	ccmp	w0, w8, #4, ne
	cset	w8, eq
	str	w8, [x19, #4]
LBB0_2:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_REPORT_ID_HIDPP_SHORT,4,2      ; @REPORT_ID_HIDPP_SHORT
	.comm	_HIDPP_GET_REGISTER,4,2         ; @HIDPP_GET_REGISTER
	.comm	_HIDPP_REG_BATTERY_MILEAGE,4,2  ; @HIDPP_REG_BATTERY_MILEAGE
	.comm	_POWER_SUPPLY_STATUS_DISCHARGING,4,2 ; @POWER_SUPPLY_STATUS_DISCHARGING
	.comm	_POWER_SUPPLY_STATUS_FULL,4,2   ; @POWER_SUPPLY_STATUS_FULL
	.no_dead_strip	_hidpp10_query_battery_mileage
.subsections_via_symbols
