	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_power_supply_ocv2cap_simple    ## -- Begin function power_supply_ocv2cap_simple
	.p2align	4, 0x90
_power_supply_ocv2cap_simple:           ## @power_supply_ocv2cap_simple
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	testl	%esi, %esi
	jle	LBB0_12
## %bb.1:
	cmpl	%edx, (%rdi)
	jge	LBB0_3
## %bb.2:
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	jne	LBB0_9
	jmp	LBB0_11
LBB0_3:
	movl	%esi, %r8d
	leaq	-1(%r8), %r9
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%rax, %r9
	je	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_5 Depth=1
	leaq	1(%rax), %rcx
	cmpl	%edx, 8(%rdi,%rax,8)
	movq	%rcx, %rax
	jge	LBB0_5
## %bb.7:
	cmpq	%r8, %rcx
	setae	%al
	testl	%ecx, %ecx
	je	LBB0_11
LBB0_9:
	testb	%al, %al
	jne	LBB0_11
## %bb.10:
	leal	-1(%rcx), %eax
	movl	(%rdi,%rax,8), %esi
	movl	4(%rdi,%rax,8), %eax
	movl	%ecx, %ecx
	movl	(%rdi,%rcx,8), %r8d
	movl	4(%rdi,%rcx,8), %ecx
	subl	%ecx, %eax
	subl	%r8d, %edx
	imull	%eax, %edx
	subl	%r8d, %esi
	movl	%edx, %eax
	cltd
	idivl	%esi
	addl	%ecx, %eax
	popq	%rbp
	retq
LBB0_11:
	testl	%ecx, %ecx
	je	LBB0_12
LBB0_6:
	movslq	%esi, %rax
	movl	-4(%rdi,%rax,8), %eax
	popq	%rbp
	retq
LBB0_12:
	movl	4(%rdi), %eax
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_power_supply_ocv2cap_simple    ; -- Begin function power_supply_ocv2cap_simple
	.p2align	2
_power_supply_ocv2cap_simple:           ; @power_supply_ocv2cap_simple
	.cfi_startproc
; %bb.0:
	cmp	w1, #1
	b.lt	LBB0_11
; %bb.1:
	ldr	w8, [x0]
	cmp	w8, w2
	b.ge	LBB0_3
; %bb.2:
	mov	x8, #0
	mov	w9, #0
	cbnz	w8, LBB0_7
	b	LBB0_9
LBB0_3:
	mov	x8, #0
	mov	w9, w1
	add	x10, x0, #8
	sub	x11, x9, #1
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x11, x8
	b.eq	LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w12, [x10], #8
	add	x8, x8, #1
	cmp	w12, w2
	b.ge	LBB0_4
; %bb.6:
	cmp	x8, x9
	cset	w9, hs
	cbz	w8, LBB0_9
LBB0_7:
	tbnz	w9, #0, LBB0_9
; %bb.8:
	sub	w9, w8, #1
	add	x9, x0, w9, uxtw #3
	add	x8, x0, w8, uxtw #3
	ldp	w8, w10, [x8]
	ldp	w9, w11, [x9]
	sub	w11, w11, w10
	sub	w12, w2, w8
	mul	w11, w12, w11
	sub	w8, w9, w8
	sdiv	w8, w11, w8
	add	w0, w8, w10
	ret
LBB0_9:
	cbz	w8, LBB0_11
LBB0_10:
	add	x8, x0, w1, sxtw #3
	ldur	w0, [x8, #-4]
	ret
LBB0_11:
	ldr	w0, [x0, #4]
	ret
	.cfi_endproc
                                        ; -- End function
.subsections_via_symbols
