	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function lego_ev3_battery_get_property
_lego_ev3_battery_get_property:         ## @lego_ev3_battery_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
	addl	$-128, %ebx
	cmpl	$5, %ebx
	ja	LBB0_5
## %bb.1:
	movq	%rax, %r15
	leaq	LJTI0_0(%rip), %rax
	movslq	(%rax,%rbx,4), %rcx
	addq	%rax, %rcx
	jmpq	*%rcx
LBB0_2:
	movl	16(%r15), %edi
	movq	%r14, %rsi
	callq	_iio_read_channel_processed
	testl	%eax, %eax
	jne	LBB0_12
## %bb.3:
	imull	$2000, (%r14), %eax             ## imm = 0x7D0
	addl	$50000, %eax                    ## imm = 0xC350
	movl	%eax, (%r14)
	movl	12(%r15), %edi
	leaq	-28(%rbp), %rsi
	callq	_iio_read_channel_processed
	testl	%eax, %eax
	jne	LBB0_12
## %bb.4:
	imull	$1000, -28(%rbp), %eax          ## imm = 0x3E8
	cltq
	imulq	$-2004318071, %rax, %rcx        ## imm = 0x88888889
	shrq	$32, %rcx
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$3, %eax
	addl	%ecx, %eax
	addl	%eax, (%r14)
	jmp	LBB0_11
LBB0_5:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_12
LBB0_6:
	movl	8(%r15), %eax
	jmp	LBB0_10
LBB0_7:
	movl	4(%r15), %eax
	jmp	LBB0_10
LBB0_8:
	movl	(%r15), %eax
	jmp	LBB0_10
LBB0_9:
	movq	_POWER_SUPPLY_SCOPE_SYSTEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	movl	%eax, (%r14)
LBB0_11:
	xorl	%eax, %eax
LBB0_12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movl	12(%r15), %edi
	movq	%r14, %rsi
	callq	_iio_read_channel_processed
	testl	%eax, %eax
	jne	LBB0_12
## %bb.14:
	imull	$20000, (%r14), %eax            ## imm = 0x4E20
	cltq
	imulq	$-2004318071, %rax, %rcx        ## imm = 0x88888889
	shrq	$32, %rcx
	addl	%ecx, %eax
	movl	%eax, %ecx
	shrl	$31, %ecx
	sarl	$3, %eax
	addl	%ecx, %eax
	movl	%eax, (%r14)
	jmp	LBB0_11
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_2, LBB0_2-LJTI0_0
.set L0_0_set_6, LBB0_6-LJTI0_0
.set L0_0_set_7, LBB0_7-LJTI0_0
.set L0_0_set_8, LBB0_8-LJTI0_0
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_13, LBB0_13-LJTI0_0
LJTI0_0:
	.long	L0_0_set_2
	.long	L0_0_set_6
	.long	L0_0_set_7
	.long	L0_0_set_8
	.long	L0_0_set_9
	.long	L0_0_set_13
	.end_data_region
                                        ## -- End function
	.comm	_POWER_SUPPLY_SCOPE_SYSTEM,4,2  ## @POWER_SUPPLY_SCOPE_SYSTEM
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_lego_ev3_battery_get_property
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function lego_ev3_battery_get_property
_lego_ev3_battery_get_property:         ; @lego_ev3_battery_get_property
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	w8, w21, #128
	cmp	w8, #5
	b.hi	LBB0_5
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x9, lJTI0_0@PAGE
Lloh1:
	add	x9, x9, lJTI0_0@PAGEOFF
	adr	x10, LBB0_2
	ldrb	w11, [x9, x8]
	add	x10, x10, x11, lsl #2
	br	x10
LBB0_2:
	ldr	w0, [x20, #16]
	mov	x1, x19
	bl	_iio_read_channel_processed
	cbnz	w0, LBB0_13
; %bb.3:
	ldr	w8, [x19]
	mov	w9, #2000
	mov	w10, #50000
	madd	w8, w8, w9, w10
	str	w8, [x19]
	ldr	w0, [x20, #12]
	add	x1, sp, #12
	bl	_iio_read_channel_processed
	cbnz	w0, LBB0_13
; %bb.4:
	ldr	w8, [sp, #12]
	mov	w9, #1000
	mul	w8, w8, w9
	mov	w9, #34953
	movk	w9, #34952, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #3
	add	w8, w9, w8, lsr #31
	ldr	w9, [x19]
	add	w8, w9, w8
	b	LBB0_12
LBB0_5:
Lloh2:
	adrp	x8, _EINVAL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_13
LBB0_6:
	mov	w0, #0
	ldr	w8, [x20, #8]
	b	LBB0_12
LBB0_7:
	mov	w0, #0
	ldr	w8, [x20, #4]
	b	LBB0_12
LBB0_8:
	mov	w0, #0
	ldr	w8, [x20]
	b	LBB0_12
LBB0_9:
	mov	w0, #0
Lloh5:
	adrp	x8, _POWER_SUPPLY_SCOPE_SYSTEM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _POWER_SUPPLY_SCOPE_SYSTEM@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	b	LBB0_12
LBB0_10:
	ldr	w0, [x20, #12]
	mov	x1, x19
	bl	_iio_read_channel_processed
	cbnz	w0, LBB0_13
; %bb.11:
	ldr	w8, [x19]
	mov	w9, #20000
	mul	w8, w8, w9
	mov	w9, #34953
	movk	w9, #34952, lsl #16
	smull	x9, w8, w9
	lsr	x9, x9, #32
	add	w8, w9, w8
	asr	w9, w8, #3
	add	w8, w9, w8, lsr #31
LBB0_12:
	str	w8, [x19]
LBB0_13:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_2-LBB0_2)>>2
	.byte	(LBB0_6-LBB0_2)>>2
	.byte	(LBB0_7-LBB0_2)>>2
	.byte	(LBB0_8-LBB0_2)>>2
	.byte	(LBB0_9-LBB0_2)>>2
	.byte	(LBB0_10-LBB0_2)>>2
                                        ; -- End function
	.comm	_POWER_SUPPLY_SCOPE_SYSTEM,4,2  ; @POWER_SUPPLY_SCOPE_SYSTEM
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_lego_ev3_battery_get_property
.subsections_via_symbols
