	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_power_supply_find_ocv2cap_table ## -- Begin function power_supply_find_ocv2cap_table
	.p2align	4, 0x90
_power_supply_find_ocv2cap_table:       ## @power_supply_find_ocv2cap_table
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	8(%rdi), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rdi, %r14
	movq	_POWER_SUPPLY_OCV_TEMP_MAX@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_3
## %bb.4:
	movq	%rdx, -48(%rbp)                 ## 8-byte Spill
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movslq	%esi, %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rax
	movq	(%rax,%r12,8), %rdi
	subq	-56(%rbp), %rdi                 ## 8-byte Folded Reload
	callq	_abs
	cmpl	%ebx, %eax
	cmovll	%eax, %ebx
	cmovlq	%r12, %r13
	incq	%r12
	cmpq	(%r15), %r12
	jb	LBB0_5
## %bb.6:
	movq	8(%r14), %rax
	movq	(%rax,%r13,8), %rax
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	jmp	LBB0_7
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_8
LBB0_3:
	xorl	%r13d, %r13d
LBB0_7:
	movq	(%r14), %rcx
	movl	(%rcx,%r13,4), %ecx
	movl	%ecx, (%rdx)
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_POWER_SUPPLY_OCV_TEMP_MAX,8,3  ## @POWER_SUPPLY_OCV_TEMP_MAX
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_power_supply_find_ocv2cap_table ; -- Begin function power_supply_find_ocv2cap_table
	.p2align	2
_power_supply_find_ocv2cap_table:       ; @power_supply_find_ocv2cap_table
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
                                        ; kill: def $w1 killed $w1 def $x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	x0, [x8]
	cbz	x0, LBB0_7
; %bb.1:
	mov	x19, x2
Lloh0:
	adrp	x22, _POWER_SUPPLY_OCV_TEMP_MAX@GOTPAGE
Lloh1:
	ldr	x22, [x22, _POWER_SUPPLY_OCV_TEMP_MAX@GOTPAGEOFF]
	ldr	x8, [x22]
	cbz	x8, LBB0_5
; %bb.2:
	mov	x21, #0
	mov	x23, #0
Lloh2:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh4:
	ldr	w24, [x8]
	sxtw	x25, w1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	ldr	x8, [x8, x23, lsl #3]
	sub	x0, x8, x25
	bl	_abs
	cmp	w0, w24
	csel	w24, w0, w24, lt
	csel	x21, x23, x21, lt
	add	x23, x23, #1
	ldr	x8, [x22]
	cmp	x23, x8
	b.lo	LBB0_3
; %bb.4:
	ldr	x8, [x20, #8]
	ldr	x0, [x8, x21, lsl #3]
	b	LBB0_6
LBB0_5:
	mov	x21, #0
LBB0_6:
	ldr	x8, [x20]
	ldr	w8, [x8, x21, lsl #2]
	str	w8, [x19]
LBB0_7:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_POWER_SUPPLY_OCV_TEMP_MAX,8,3  ; @POWER_SUPPLY_OCV_TEMP_MAX
.subsections_via_symbols
