	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_capm_convert_battflags
_acpi_capm_convert_battflags:           ## @acpi_capm_convert_battflags
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	(%rdi), %eax
	movl	4(%rdi), %ecx
	movq	_ACPI_BATT_STAT_CRITICAL@GOTPCREL(%rip), %rdx
	testl	%ecx, (%rdx)
	jne	LBB0_1
## %bb.2:
	movq	_APM_BATT_LOW@GOTPCREL(%rip), %rdx
	cmpl	$50, %eax
	jge	LBB0_4
	jmp	LBB0_5
LBB0_1:
	movq	_APM_BATT_CRITICAL@GOTPCREL(%rip), %rdx
	cmpl	$50, %eax
	jl	LBB0_5
LBB0_4:
	movq	_APM_BATT_HIGH@GOTPCREL(%rip), %rdx
LBB0_5:
	movq	_ACPI_BATT_STAT_CHARGING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	%ecx, %eax
	je	LBB0_7
## %bb.6:
	movq	_APM_BATT_CHARGING@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_7:
	movq	_ACPI_BATT_STAT_NOT_PRESENT@GOTPCREL(%rip), %rsi
	cmpl	(%rsi), %ecx
	jne	LBB0_8
## %bb.9:
	movq	_APM_BATT_NOT_PRESENT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	popq	%rbp
	retq
LBB0_8:
	orl	(%rdx), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APM_BATT_HIGH,4,2              ## @APM_BATT_HIGH
	.comm	_ACPI_BATT_STAT_CRITICAL,4,2    ## @ACPI_BATT_STAT_CRITICAL
	.comm	_APM_BATT_CRITICAL,4,2          ## @APM_BATT_CRITICAL
	.comm	_APM_BATT_LOW,4,2               ## @APM_BATT_LOW
	.comm	_ACPI_BATT_STAT_CHARGING,4,2    ## @ACPI_BATT_STAT_CHARGING
	.comm	_APM_BATT_CHARGING,4,2          ## @APM_BATT_CHARGING
	.comm	_ACPI_BATT_STAT_NOT_PRESENT,4,2 ## @ACPI_BATT_STAT_NOT_PRESENT
	.comm	_APM_BATT_NOT_PRESENT,4,2       ## @APM_BATT_NOT_PRESENT
	.no_dead_strip	_acpi_capm_convert_battflags
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function acpi_capm_convert_battflags
_acpi_capm_convert_battflags:           ; @acpi_capm_convert_battflags
	.cfi_startproc
; %bb.0:
	ldp	w8, w9, [x0]
Lloh0:
	adrp	x10, _ACPI_BATT_STAT_CRITICAL@GOTPAGE
Lloh1:
	ldr	x10, [x10, _ACPI_BATT_STAT_CRITICAL@GOTPAGEOFF]
Lloh2:
	adrp	x11, _APM_BATT_HIGH@GOTPAGE
Lloh3:
	ldr	x11, [x11, _APM_BATT_HIGH@GOTPAGEOFF]
Lloh4:
	adrp	x12, _APM_BATT_LOW@GOTPAGE
Lloh5:
	ldr	x12, [x12, _APM_BATT_LOW@GOTPAGEOFF]
Lloh6:
	adrp	x13, _APM_BATT_CRITICAL@GOTPAGE
Lloh7:
	ldr	x13, [x13, _APM_BATT_CRITICAL@GOTPAGEOFF]
Lloh8:
	ldr	w10, [x10]
	tst	w10, w9
	csel	x10, x12, x13, eq
	cmp	w8, #49
	csel	x8, x11, x10, gt
	ldr	w8, [x8]
Lloh9:
	adrp	x10, _ACPI_BATT_STAT_CHARGING@GOTPAGE
Lloh10:
	ldr	x10, [x10, _ACPI_BATT_STAT_CHARGING@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
Lloh12:
	adrp	x11, _APM_BATT_CHARGING@GOTPAGE
Lloh13:
	ldr	x11, [x11, _APM_BATT_CHARGING@GOTPAGEOFF]
Lloh14:
	ldr	w11, [x11]
	tst	w10, w9
	csel	w10, wzr, w11, eq
	orr	w8, w10, w8
Lloh15:
	adrp	x10, _ACPI_BATT_STAT_NOT_PRESENT@GOTPAGE
Lloh16:
	ldr	x10, [x10, _ACPI_BATT_STAT_NOT_PRESENT@GOTPAGEOFF]
Lloh17:
	ldr	w10, [x10]
Lloh18:
	adrp	x11, _APM_BATT_NOT_PRESENT@GOTPAGE
Lloh19:
	ldr	x11, [x11, _APM_BATT_NOT_PRESENT@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
	cmp	w9, w10
	csel	w0, w11, w8, eq
	ret
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_APM_BATT_HIGH,4,2              ; @APM_BATT_HIGH
	.comm	_ACPI_BATT_STAT_CRITICAL,4,2    ; @ACPI_BATT_STAT_CRITICAL
	.comm	_APM_BATT_CRITICAL,4,2          ; @APM_BATT_CRITICAL
	.comm	_APM_BATT_LOW,4,2               ; @APM_BATT_LOW
	.comm	_ACPI_BATT_STAT_CHARGING,4,2    ; @ACPI_BATT_STAT_CHARGING
	.comm	_APM_BATT_CHARGING,4,2          ; @APM_BATT_CHARGING
	.comm	_ACPI_BATT_STAT_NOT_PRESENT,4,2 ; @ACPI_BATT_STAT_NOT_PRESENT
	.comm	_APM_BATT_NOT_PRESENT,4,2       ; @APM_BATT_NOT_PRESENT
	.no_dead_strip	_acpi_capm_convert_battflags
.subsections_via_symbols
