	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function acpi_capm_convert_battstate
_acpi_capm_convert_battstate:           ## @acpi_capm_convert_battstate
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_APM_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	(%rdi), %eax
	movq	_ACPI_BATT_STAT_DISCHARG@GOTPCREL(%rip), %rsi
	movl	%ecx, %edx
	testl	%eax, (%rsi)
	je	LBB0_2
## %bb.1:
	xorl	%edx, %edx
	cmpl	$50, 4(%rdi)
	setl	%dl
LBB0_2:
	movq	_ACPI_BATT_STAT_CRITICAL@GOTPCREL(%rip), %rsi
	testl	%eax, (%rsi)
	movl	$2, %esi
	cmovel	%edx, %esi
	movq	_ACPI_BATT_STAT_CHARGING@GOTPCREL(%rip), %rdx
	testl	%eax, (%rdx)
	movl	$3, %eax
	cmovel	%esi, %eax
	cmpl	%ecx, %eax
	jne	LBB0_4
## %bb.3:
	xorl	%eax, %eax
	cmpl	$50, 4(%rdi)
	setl	%al
LBB0_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_APM_UNKNOWN,4,2                ## @APM_UNKNOWN
	.comm	_ACPI_BATT_STAT_DISCHARG,4,2    ## @ACPI_BATT_STAT_DISCHARG
	.comm	_ACPI_BATT_STAT_CRITICAL,4,2    ## @ACPI_BATT_STAT_CRITICAL
	.comm	_ACPI_BATT_STAT_CHARGING,4,2    ## @ACPI_BATT_STAT_CHARGING
	.no_dead_strip	_acpi_capm_convert_battstate
.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_battstate
_acpi_capm_convert_battstate:           ; @acpi_capm_convert_battstate
	.cfi_startproc
; %bb.0:
Lloh0:
	adrp	x8, _APM_UNKNOWN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _APM_UNKNOWN@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x8]
	ldr	w8, [x0]
Lloh3:
	adrp	x10, _ACPI_BATT_STAT_DISCHARG@GOTPAGE
Lloh4:
	ldr	x10, [x10, _ACPI_BATT_STAT_DISCHARG@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	tst	w10, w8
	b.eq	LBB0_2
; %bb.1:
	ldr	w10, [x0, #4]
	cmp	w10, #50
	cset	w10, lt
	b	LBB0_3
LBB0_2:
	mov	x10, x9
LBB0_3:
Lloh6:
	adrp	x11, _ACPI_BATT_STAT_CRITICAL@GOTPAGE
Lloh7:
	ldr	x11, [x11, _ACPI_BATT_STAT_CRITICAL@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	tst	w11, w8
	mov	w11, #2
Lloh9:
	adrp	x12, _ACPI_BATT_STAT_CHARGING@GOTPAGE
Lloh10:
	ldr	x12, [x12, _ACPI_BATT_STAT_CHARGING@GOTPAGEOFF]
	csel	w10, w10, w11, eq
Lloh11:
	ldr	w11, [x12]
	tst	w11, w8
	mov	w8, #3
	csel	w8, w10, w8, eq
	cmp	w8, w9
	b.ne	LBB0_5
; %bb.4:
	ldr	w8, [x0, #4]
	cmp	w8, #50
	cset	w8, lt
LBB0_5:
	mov	x0, x8
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_APM_UNKNOWN,4,2                ; @APM_UNKNOWN
	.comm	_ACPI_BATT_STAT_DISCHARG,4,2    ; @ACPI_BATT_STAT_DISCHARG
	.comm	_ACPI_BATT_STAT_CRITICAL,4,2    ; @ACPI_BATT_STAT_CRITICAL
	.comm	_ACPI_BATT_STAT_CHARGING,4,2    ; @ACPI_BATT_STAT_CHARGING
	.no_dead_strip	_acpi_capm_convert_battstate
.subsections_via_symbols
