	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function calc_max_seg_no
_calc_max_seg_no:                       ## @calc_max_seg_no
	.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	%rdi, %r15
	movl	(%rdi), %eax
	testl	%eax, %eax
	je	LBB0_3
## %bb.1:
	movl	4(%r15), %ecx
	addl	%ecx, %eax
	decl	%eax
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	%rsi, %r14
	movl	8(%r15), %esi
	testq	%rsi, %rsi
	je	LBB0_10
## %bb.4:
	movl	4(%r15), %eax
	addl	%esi, %eax
	decl	%eax
	testl	%esi, %esi
	jle	LBB0_2
## %bb.5:
	movq	24(%r15), %rdi
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	addl	%edx, %eax
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incq	%rbx
	cmpq	%rbx, %rsi
	je	LBB0_2
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdi,%rbx,8), %rcx
	movl	(%rcx), %edx
	cmpl	$-1, %edx
	jne	LBB0_6
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	4(%rcx), %eax
	cltd
	idivl	12(%r15)
	movl	%eax, %ecx
	movl	(%r14), %eax
	cltd
	idivl	%ecx
	jmp	LBB0_7
LBB0_10:
	cmpq	$0, 16(%r14)
	movl	16(%r15), %ecx
	je	LBB0_13
## %bb.11:
	testl	%ecx, %ecx
	je	LBB0_16
## %bb.12:
	movl	4(%r15), %ebx
	xorl	%eax, %eax
	callq	_get_current_time_in_sec
	subl	4(%r14), %eax
	imull	12(%r15), %eax
	cltd
	idivl	16(%r15)
	addl	%ebx, %eax
	jmp	LBB0_2
LBB0_13:
	testl	%ecx, %ecx
	je	LBB0_16
## %bb.14:
	movl	12(%r15), %eax
	imull	8(%r14), %eax
	cltd
	idivl	%ecx
	addl	4(%r15), %eax
	jmp	LBB0_2
LBB0_16:
	xorl	%eax, %eax
	jmp	LBB0_2
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_calc_max_seg_no
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function calc_max_seg_no
_calc_max_seg_no:                       ; @calc_max_seg_no
	.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, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w9, [x19, #4]
	add	w8, w8, w9
	sub	w0, w8, #1
LBB0_2:
	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
LBB0_3:
	mov	x20, x1
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_10
; %bb.4:
	ldr	w9, [x19, #4]
	add	w9, w8, w9
	sub	w0, w9, #1
	cmp	w8, #1
	b.lt	LBB0_2
; %bb.5:
	ldr	x9, [x19, #24]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	w0, w11, w0
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x9, x9, #8
	subs	x8, x8, #1
	b.eq	LBB0_2
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	ldr	w11, [x10]
	cmn	w11, #1
	b.ne	LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	w10, [x10, #4]
	ldr	w11, [x19, #12]
	sdiv	w10, w10, w11
	ldr	w11, [x20]
	sdiv	w0, w11, w10
	b	LBB0_7
LBB0_10:
	ldr	x9, [x20, #16]
	ldr	w8, [x19, #16]
	cbz	x9, LBB0_13
; %bb.11:
	cbz	w8, LBB0_15
; %bb.12:
	ldr	w21, [x19, #4]
	bl	_get_current_time_in_sec
	ldr	w8, [x20, #4]
	sub	w8, w0, w8
	ldp	w9, w10, [x19, #12]
	mul	w8, w8, w9
	sdiv	w8, w8, w10
	add	w0, w8, w21
	b	LBB0_2
LBB0_13:
	cbz	w8, LBB0_15
; %bb.14:
	ldr	w9, [x19, #4]
	ldr	w10, [x20, #8]
	ldr	w11, [x19, #12]
	mul	w10, w11, w10
	sdiv	w8, w10, w8
	add	w0, w8, w9
	b	LBB0_2
LBB0_15:
	mov	w0, #0
	b	LBB0_2
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_calc_max_seg_no
.subsections_via_symbols
