	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cpcap_battery_cc_raw_div
_cpcap_battery_cc_raw_div:              ## @cpcap_battery_cc_raw_div
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	testl	%r8d, %r8d
	je	LBB0_1
## %bb.2:
	movl	%edx, %r14d
	movl	(%rdi), %eax
	cmpl	$129, %eax
	je	LBB0_3
## %bb.4:
	cmpl	$128, %eax
	jne	LBB0_8
## %bb.5:
	movl	$91501, %eax                    ## imm = 0x1656D
	jmp	LBB0_6
LBB0_1:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_3:
	movl	$95374, %eax                    ## imm = 0x1748E
LBB0_6:
	imull	%esi, %ecx
	subl	%ecx, %r14d
	imull	4(%rdi), %eax
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	%r14d, %ebx
	negl	%ebx
	cmovsl	%r14d, %ebx
	imull	%eax, %ebx
	movl	%ebx, %edi
	movl	%r8d, %esi
	callq	_do_div
	movl	%ebx, %eax
	negl	%eax
	testl	%r14d, %r14d
	cmovsl	%ebx, %eax
	jmp	LBB0_7
LBB0_8:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_cpcap_battery_cc_raw_div
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cpcap_battery_cc_raw_div
_cpcap_battery_cc_raw_div:              ; @cpcap_battery_cc_raw_div
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	cbz	w4, LBB0_4
; %bb.1:
	mov	w8, #25965
	movk	w8, #1, lsl #16
	ldr	w9, [x0]
	cmp	w9, #129
	b.eq	LBB0_5
; %bb.2:
	cmp	w9, #128
	b.eq	LBB0_6
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_7
LBB0_4:
	mov	w19, #0
	b	LBB0_7
LBB0_5:
	add	w8, w8, #3873
LBB0_6:
	msub	w9, w3, w1, w2
	ldr	w10, [x0, #4]
	mul	w8, w10, w8
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	smull	x8, w8, w10
	lsr	x10, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w10
	cmp	w9, #0
	cneg	w9, w9, mi
	mul	w0, w8, w9
	cneg	w19, w0, ge
	mov	x1, x4
	bl	_do_div
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_cpcap_battery_cc_raw_div
.subsections_via_symbols
