	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function done_battery_state_ohare
_done_battery_state_ohare:              ## @done_battery_state_ohare
	.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, %rbx
	movq	_PMU_BATT_TYPE_HOOPER@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_PMAC_FTR_GET_MB_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_PMAC_MB_INFO_MODEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_pmac_call_feature
	movq	(%rbx), %rcx
	testb	$1, (%rcx)
	movq	_PMU_PWR_AC_PRESENT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	jne	LBB0_1
## %bb.2:
	notl	%edx
	movq	_pmu_power_flags@GOTPCREL(%rip), %rsi
	andl	(%rsi), %edx
	jmp	LBB0_3
LBB0_1:
	movq	_pmu_power_flags@GOTPCREL(%rip), %rsi
	orl	(%rsi), %edx
LBB0_3:
	movq	_pmu_power_flags@GOTPCREL(%rip), %rsi
	movl	%edx, (%rsi)
	movq	_PMAC_TYPE_COMET@GOTPCREL(%rip), %rdx
	cmpl	(%rdx), %eax
	movl	$213, %ebx
	movl	$330, %eax                      ## imm = 0x14A
	cmovneq	%rax, %rbx
	movl	$189, %edi
	cmovneq	%rax, %rdi
	movl	(%rcx), %r13d
	testb	$4, %r13b
	jne	LBB0_5
## %bb.4:
	xorl	%esi, %esi
	xorl	%r10d, %r10d
	xorl	%r9d, %r9d
	xorl	%eax, %eax
	xorl	%ecx, %ecx
	jmp	LBB0_21
LBB0_5:
	movq	_PMU_BATT_PRESENT@GOTPCREL(%rip), %r15
	movl	%r13d, %r11d
	shll	$30, %r11d
	sarl	$31, %r11d
	movq	_PMU_BATT_CHARGING@GOTPCREL(%rip), %r12
	movl	4(%rcx), %eax
	shll	$8, %eax
	orl	8(%rcx), %eax
	movslq	%eax, %rsi
	imulq	$265, %rsi, %rax                ## imm = 0x109
	addq	$72665, %rax                    ## imm = 0x11BD9
	movabsq	$7378697629483820647, %rdx      ## imm = 0x6666666666666667
	imulq	%rdx
	movq	%rdx, %r9
	movslq	20(%rcx), %r10
	testb	$1, %r13b
	jne	LBB0_8
## %bb.6:
	cmpl	$201, %r10d
	jl	LBB0_10
## %bb.7:
	leaq	(%r10,%r10,4), %rax
	leaq	(%rax,%rax,2), %rbx
	leaq	(%rax,%rax,2), %rax
	addq	$-3000, %rax                    ## imm = 0xF448
	movabsq	$-6640827866535438581, %rdx     ## imm = 0xA3D70A3D70A3D70B
	imulq	%rdx
	leaq	(%rdx,%rbx), %rax
	addq	$-3000, %rax                    ## imm = 0xF448
	movq	%rax, %rdx
	shrq	$63, %rdx
	sarq	$6, %rax
	addq	%rdx, %rax
	addq	%rax, %rsi
	jmp	LBB0_10
LBB0_8:
	testb	$2, %r13b
	je	LBB0_10
## %bb.9:
	imulq	$97, %rsi, %r8
	movabsq	$-6640827866535438581, %rdx     ## imm = 0xA3D70A3D70A3D70B
	movq	%r8, %rax
	imulq	%rdx
	movq	%rdx, %rsi
	addq	%r8, %rsi
	movq	%rsi, %rax
	shrq	$63, %rax
	sarq	$6, %rsi
	addq	%rax, %rsi
	movq	%rbx, %rdi
LBB0_10:
	orl	(%r15), %r14d
	imulq	$100, %rsi, %rax
	movq	%rax, %rdx
	andl	(%r12), %r11d
	shrq	$32, %rdx
	je	LBB0_11
## %bb.12:
	cqto
	idivq	%rdi
	movq	%rax, %rsi
	testb	$64, %r13b
	je	LBB0_15
LBB0_14:
	movl	24(%rcx), %eax
	shll	$8, %eax
	addl	28(%rcx), %eax
	cmpl	$6500, %eax                     ## imm = 0x1964
	movl	$6500, %ecx                     ## imm = 0x1964
	cmovll	%eax, %ecx
	movslq	%ecx, %rax
	imulq	$-2114445439, %rax, %rax        ## imm = 0x81F81F81
	movq	%rax, %rcx
	sarq	$37, %rcx
	shrq	$63, %rax
	addl	%ecx, %eax
	addl	$100, %eax
	cmpq	%rax, %rsi
	cmovgeq	%rax, %rsi
LBB0_15:
	movq	%r9, %rcx
	shrq	$63, %rcx
	sarq	$2, %r9
	testl	%r10d, %r10d
	jle	LBB0_16
## %bb.17:
	imulq	$16440, %rsi, %rax              ## imm = 0x4038
	movq	%rax, %rdx
	orq	%r10, %rdx
	shrq	$32, %rdx
	je	LBB0_18
## %bb.19:
	cqto
	idivq	%r10
	jmp	LBB0_20
LBB0_11:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%edi
	movl	%eax, %esi
	testb	$64, %r13b
	jne	LBB0_14
	jmp	LBB0_15
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_20
LBB0_18:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%r10d
                                        ## kill: def $eax killed $eax def $rax
LBB0_20:
	orl	%r11d, %r14d
	addq	%rcx, %r9
	negq	%r10
	movl	$100, %ecx
LBB0_21:
	movq	_pmu_batteries@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_pmu_cur_battery@GOTPCREL(%rip), %rdi
	movq	(%rdi), %rbx
	leaq	(%rbx,%rbx,2), %rbx
	shlq	$4, %rbx
	movl	%r14d, (%rdx,%rbx)
	movq	%rsi, 8(%rdx,%rbx)
	movq	(%rdi), %rsi
	leaq	(%rsi,%rsi,2), %rsi
	shlq	$4, %rsi
	movq	%rcx, 16(%rdx,%rsi)
	movq	(%rdi), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	%r10, 24(%rdx,%rcx)
	movq	(%rdi), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	%r9, 32(%rdx,%rcx)
	movq	(%rdi), %rcx
	leaq	(%rcx,%rcx,2), %rcx
	shlq	$4, %rcx
	movq	%rax, 40(%rdx,%rcx)
	movq	_async_req_locks@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clear_bit                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_PMU_BATT_TYPE_HOOPER,4,2       ## @PMU_BATT_TYPE_HOOPER
	.comm	_PMAC_FTR_GET_MB_INFO,4,2       ## @PMAC_FTR_GET_MB_INFO
	.comm	_PMAC_MB_INFO_MODEL,4,2         ## @PMAC_MB_INFO_MODEL
	.comm	_PMU_PWR_AC_PRESENT,4,2         ## @PMU_PWR_AC_PRESENT
	.comm	_pmu_power_flags,4,2            ## @pmu_power_flags
	.comm	_PMAC_TYPE_COMET,4,2            ## @PMAC_TYPE_COMET
	.comm	_PMU_BATT_PRESENT,4,2           ## @PMU_BATT_PRESENT
	.comm	_PMU_BATT_CHARGING,4,2          ## @PMU_BATT_CHARGING
	.comm	_pmu_batteries,8,3              ## @pmu_batteries
	.comm	_pmu_cur_battery,8,3            ## @pmu_cur_battery
	.comm	_async_req_locks,4,2            ## @async_req_locks
	.no_dead_strip	_done_battery_state_ohare
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function done_battery_state_ohare
_done_battery_state_ohare:              ; @done_battery_state_ohare
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _PMU_BATT_TYPE_HOOPER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PMU_BATT_TYPE_HOOPER@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _PMAC_FTR_GET_MB_INFO@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PMAC_FTR_GET_MB_INFO@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x8, _PMAC_MB_INFO_MODEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PMAC_MB_INFO_MODEL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x1, #0
	mov	w3, #0
	bl	_pmac_call_feature
	ldr	x8, [x19]
Lloh9:
	adrp	x9, _PMU_PWR_AC_PRESENT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _PMU_PWR_AC_PRESENT@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x9]
	ldrb	w11, [x8]
Lloh12:
	adrp	x9, _pmu_power_flags@GOTPAGE
Lloh13:
	ldr	x9, [x9, _pmu_power_flags@GOTPAGEOFF]
	tbnz	w11, #0, LBB0_2
; %bb.1:
	ldr	w11, [x9]
	bic	w10, w11, w10
	b	LBB0_3
LBB0_2:
	ldr	w11, [x9]
	orr	w10, w11, w10
LBB0_3:
	str	w10, [x9]
Lloh14:
	adrp	x9, _PMAC_TYPE_COMET@GOTPAGE
Lloh15:
	ldr	x9, [x9, _PMAC_TYPE_COMET@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	cmp	w0, w9
	mov	w9, #330
	mov	w10, #213
	csel	x17, x10, x9, eq
	mov	w10, #189
	csel	x11, x10, x9, eq
	ldr	w12, [x8]
	tbnz	w12, #2, LBB0_5
; %bb.4:
	mov	x11, #0
	mov	x9, #0
	mov	x8, #0
	mov	x10, #0
	mov	x12, #0
	b	LBB0_16
LBB0_5:
Lloh17:
	adrp	x9, _PMU_BATT_PRESENT@GOTPAGE
Lloh18:
	ldr	x9, [x9, _PMU_BATT_PRESENT@GOTPAGEOFF]
Lloh19:
	ldr	w13, [x9]
Lloh20:
	adrp	x9, _PMU_BATT_CHARGING@GOTPAGE
Lloh21:
	ldr	x9, [x9, _PMU_BATT_CHARGING@GOTPAGEOFF]
	lsl	w14, w12, #30
Lloh22:
	ldr	w15, [x9]
	ldp	w9, w10, [x8, #4]
	orr	w9, w10, w9, lsl #8
	sxtw	x16, w9
	mov	w10, #265
	mov	w0, #7129
	movk	w0, #1, lsl #16
	smaddl	x9, w9, w10, x0
	mov	x10, #7378697629483820646
	movk	x10, #26215
	smulh	x10, x9, x10
	ldrsw	x9, [x8, #20]
	tbnz	w12, #0, LBB0_8
; %bb.6:
	cmp	w9, #201
	b.lt	LBB0_10
; %bb.7:
	lsl	x17, x9, #4
	sub	x17, x17, x9
	sub	x17, x17, #3000
	mov	x0, #55051
	movk	x0, #28835, lsl #16
	movk	x0, #2621, lsl #32
	movk	x0, #41943, lsl #48
	smulh	x0, x17, x0
	add	x17, x0, x17
	asr	x0, x17, #6
	add	x17, x0, x17, lsr #63
	add	x16, x17, x16
	b	LBB0_10
LBB0_8:
	tbz	w12, #1, LBB0_10
; %bb.9:
	mov	w11, #97
	mul	x11, x16, x11
	mov	x16, #55051
	movk	x16, #28835, lsl #16
	movk	x16, #2621, lsl #32
	movk	x16, #41943, lsl #48
	smulh	x16, x11, x16
	add	x11, x16, x11
	asr	x16, x11, #6
	add	x16, x16, x11, lsr #63
	mov	x11, x17
LBB0_10:
	orr	w13, w13, w20
	and	w14, w15, w14, asr #31
	asr	x15, x10, #2
	mov	w17, #100
	mul	x16, x16, x17
	sdiv	x11, x16, x11
	tbz	w12, #6, LBB0_12
; %bb.11:
	ldp	w12, w8, [x8, #24]
	add	w8, w8, w12, lsl #8
	mov	w12, #6500
	cmp	w8, w12
	csel	w8, w8, w12, lt
	mov	w12, #8065
	movk	w12, #33272, lsl #16
	smull	x8, w8, w12
	lsr	x12, x8, #63
	asr	x8, x8, #37
	add	w8, w8, w12
	add	w8, w8, #100
	cmp	x11, x8
	csel	x11, x11, x8, lt
LBB0_12:
	orr	w20, w13, w14
	add	x8, x15, x10, lsr #63
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.13:
	mov	w10, #16440
	mul	x10, x11, x10
	sdiv	x10, x10, x9
	b	LBB0_15
LBB0_14:
	mov	x10, #0
LBB0_15:
	neg	x9, x9
	mov	w12, #100
LBB0_16:
Lloh23:
	adrp	x13, _pmu_batteries@GOTPAGE
Lloh24:
	ldr	x13, [x13, _pmu_batteries@GOTPAGEOFF]
Lloh25:
	ldr	x13, [x13]
Lloh26:
	adrp	x14, _pmu_cur_battery@GOTPAGE
Lloh27:
	ldr	x14, [x14, _pmu_cur_battery@GOTPAGEOFF]
	ldr	x15, [x14]
	mov	w16, #48
	madd	x15, x15, x16, x13
	str	w20, [x15]
	str	x11, [x15, #8]
	ldr	x11, [x14]
	madd	x11, x11, x16, x13
	str	x12, [x11, #16]
	ldr	x11, [x14]
	madd	x11, x11, x16, x13
	str	x9, [x11, #24]
	ldr	x9, [x14]
	madd	x9, x9, x16, x13
	str	x8, [x9, #32]
	ldr	x8, [x14]
	madd	x8, x8, x16, x13
	str	x10, [x8, #40]
Lloh28:
	adrp	x1, _async_req_locks@GOTPAGE
Lloh29:
	ldr	x1, [x1, _async_req_locks@GOTPAGEOFF]
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_clear_bit
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_PMU_BATT_TYPE_HOOPER,4,2       ; @PMU_BATT_TYPE_HOOPER
	.comm	_PMAC_FTR_GET_MB_INFO,4,2       ; @PMAC_FTR_GET_MB_INFO
	.comm	_PMAC_MB_INFO_MODEL,4,2         ; @PMAC_MB_INFO_MODEL
	.comm	_PMU_PWR_AC_PRESENT,4,2         ; @PMU_PWR_AC_PRESENT
	.comm	_pmu_power_flags,4,2            ; @pmu_power_flags
	.comm	_PMAC_TYPE_COMET,4,2            ; @PMAC_TYPE_COMET
	.comm	_PMU_BATT_PRESENT,4,2           ; @PMU_BATT_PRESENT
	.comm	_PMU_BATT_CHARGING,4,2          ; @PMU_BATT_CHARGING
	.comm	_pmu_batteries,8,3              ; @pmu_batteries
	.comm	_pmu_cur_battery,8,3            ; @pmu_cur_battery
	.comm	_async_req_locks,4,2            ; @async_req_locks
	.no_dead_strip	_done_battery_state_ohare
.subsections_via_symbols
