	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sbsm_get_property
_sbsm_get_property:                     ## @sbsm_get_property
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %ebx
	callq	_power_supply_get_drvdata
	movq	%rax, %r15
	cmpl	$129, %ebx
	je	LBB0_4
## %bb.1:
	cmpl	$128, %ebx
	jne	LBB0_12
## %bb.2:
	movl	(%r15), %edi
	movq	_SBSM_CMD_BATSYSSTATECONT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sbsm_read_word
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.3:
	movq	_SBSM_BIT_AC_PRESENT@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	movl	(%rax), %eax
	andl	%ebx, %eax
	setne	%cl
	movl	%ecx, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_4:
	movl	(%r15), %edi
	movq	_SBSM_CMD_BATSYSSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sbsm_read_word
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_13
## %bb.5:
	movq	_SBSM_MASK_CHARGE_BAT@GOTPCREL(%rip), %rax
	testl	%ebx, (%rax)
	je	LBB0_6
## %bb.7:
	movq	_POWER_SUPPLY_CHARGE_TYPE_TRICKLE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	cmpl	$0, 4(%r15)
	je	LBB0_13
## %bb.8:
	movl	(%r15), %edi
	movq	_SBSM_CMD_LTC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_sbsm_read_word
	testl	%eax, %eax
	js	LBB0_9
## %bb.10:
	movq	_SBSM_BIT_TURBO@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_13
## %bb.11:
	movq	_POWER_SUPPLY_CHARGE_TYPE_FAST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	jmp	LBB0_13
LBB0_12:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movq	_POWER_SUPPLY_CHARGE_TYPE_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_13
LBB0_9:
	movl	%eax, %ebx
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_SBSM_CMD_BATSYSSTATECONT,4,2   ## @SBSM_CMD_BATSYSSTATECONT
	.comm	_SBSM_BIT_AC_PRESENT,4,2        ## @SBSM_BIT_AC_PRESENT
	.comm	_SBSM_CMD_BATSYSSTATE,4,2       ## @SBSM_CMD_BATSYSSTATE
	.comm	_SBSM_MASK_CHARGE_BAT,4,2       ## @SBSM_MASK_CHARGE_BAT
	.comm	_POWER_SUPPLY_CHARGE_TYPE_NONE,4,2 ## @POWER_SUPPLY_CHARGE_TYPE_NONE
	.comm	_POWER_SUPPLY_CHARGE_TYPE_TRICKLE,4,2 ## @POWER_SUPPLY_CHARGE_TYPE_TRICKLE
	.comm	_SBSM_CMD_LTC,4,2               ## @SBSM_CMD_LTC
	.comm	_SBSM_BIT_TURBO,4,2             ## @SBSM_BIT_TURBO
	.comm	_POWER_SUPPLY_CHARGE_TYPE_FAST,4,2 ## @POWER_SUPPLY_CHARGE_TYPE_FAST
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_sbsm_get_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sbsm_get_property
_sbsm_get_property:                     ; @sbsm_get_property
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	mov	x19, x2
	mov	x21, x1
	bl	_power_supply_get_drvdata
	mov	x20, x0
	cmp	w21, #129
	b.eq	LBB0_4
; %bb.1:
	cmp	w21, #128
	b.ne	LBB0_10
; %bb.2:
	ldr	w0, [x20]
Lloh0:
	adrp	x8, _SBSM_CMD_BATSYSSTATECONT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SBSM_CMD_BATSYSSTATECONT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_sbsm_read_word
	tbnz	w0, #31, LBB0_14
; %bb.3:
Lloh3:
	adrp	x8, _SBSM_BIT_AC_PRESENT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SBSM_BIT_AC_PRESENT@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w0
	mov	w0, #0
	cset	w8, ne
	str	w8, [x19]
	b	LBB0_14
LBB0_4:
	ldr	w0, [x20]
Lloh6:
	adrp	x8, _SBSM_CMD_BATSYSSTATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SBSM_CMD_BATSYSSTATE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_sbsm_read_word
	tbnz	w0, #31, LBB0_14
; %bb.5:
Lloh9:
	adrp	x8, _SBSM_MASK_CHARGE_BAT@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SBSM_MASK_CHARGE_BAT@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_11
; %bb.6:
Lloh12:
	adrp	x8, _POWER_SUPPLY_CHARGE_TYPE_TRICKLE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _POWER_SUPPLY_CHARGE_TYPE_TRICKLE@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	str	w8, [x19]
	ldr	w8, [x20, #4]
	cbz	w8, LBB0_13
; %bb.7:
	ldr	w0, [x20]
Lloh15:
	adrp	x8, _SBSM_CMD_LTC@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SBSM_CMD_LTC@GOTPAGEOFF]
Lloh17:
	ldr	w1, [x8]
	bl	_sbsm_read_word
	tbnz	w0, #31, LBB0_14
; %bb.8:
Lloh18:
	adrp	x8, _SBSM_BIT_TURBO@GOTPAGE
Lloh19:
	ldr	x8, [x8, _SBSM_BIT_TURBO@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	tst	w8, w0
	b.eq	LBB0_13
; %bb.9:
	mov	w0, #0
Lloh21:
	adrp	x8, _POWER_SUPPLY_CHARGE_TYPE_FAST@GOTPAGE
Lloh22:
	ldr	x8, [x8, _POWER_SUPPLY_CHARGE_TYPE_FAST@GOTPAGEOFF]
	b	LBB0_12
LBB0_10:
Lloh23:
	adrp	x8, _EINVAL@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_14
LBB0_11:
	mov	w0, #0
Lloh26:
	adrp	x8, _POWER_SUPPLY_CHARGE_TYPE_NONE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _POWER_SUPPLY_CHARGE_TYPE_NONE@GOTPAGEOFF]
LBB0_12:
	ldr	w8, [x8]
	str	w8, [x19]
	b	LBB0_14
LBB0_13:
	mov	w0, #0
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_SBSM_CMD_BATSYSSTATECONT,4,2   ; @SBSM_CMD_BATSYSSTATECONT
	.comm	_SBSM_BIT_AC_PRESENT,4,2        ; @SBSM_BIT_AC_PRESENT
	.comm	_SBSM_CMD_BATSYSSTATE,4,2       ; @SBSM_CMD_BATSYSSTATE
	.comm	_SBSM_MASK_CHARGE_BAT,4,2       ; @SBSM_MASK_CHARGE_BAT
	.comm	_POWER_SUPPLY_CHARGE_TYPE_NONE,4,2 ; @POWER_SUPPLY_CHARGE_TYPE_NONE
	.comm	_POWER_SUPPLY_CHARGE_TYPE_TRICKLE,4,2 ; @POWER_SUPPLY_CHARGE_TYPE_TRICKLE
	.comm	_SBSM_CMD_LTC,4,2               ; @SBSM_CMD_LTC
	.comm	_SBSM_BIT_TURBO,4,2             ; @SBSM_BIT_TURBO
	.comm	_POWER_SUPPLY_CHARGE_TYPE_FAST,4,2 ; @POWER_SUPPLY_CHARGE_TYPE_FAST
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_sbsm_get_property
.subsections_via_symbols
