	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mkimg_chs                      ## -- Begin function mkimg_chs
	.p2align	4, 0x90
_mkimg_chs:                             ## @mkimg_chs
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movl	$-1, (%r8)
	movl	$-1, (%rcx)
	movl	$-1, (%rdx)
	movq	_nsecs@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	cmpl	$1, %r10d
	je	LBB0_4
## %bb.1:
	movq	_nheads@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	cmpl	$1, %r11d
	je	LBB0_4
## %bb.2:
	movq	%rdx, %r9
	movl	%edi, %eax
	cltd
	idivl	%r10d
	movl	%edx, %edi
	cltd
	idivl	%r11d
	cmpl	%esi, %eax
	jg	LBB0_4
## %bb.3:
	incl	%edi
	movl	%eax, (%r9)
	movl	%edx, (%rcx)
	movl	%edi, (%r8)
LBB0_4:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_nsecs,4,2                      ## @nsecs
	.comm	_nheads,4,2                     ## @nheads
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mkimg_chs                      ; -- Begin function mkimg_chs
	.p2align	2
_mkimg_chs:                             ; @mkimg_chs
	.cfi_startproc
; %bb.0:
	mov	w8, #-1
	str	w8, [x4]
	str	w8, [x3]
	str	w8, [x2]
Lloh0:
	adrp	x8, _nsecs@GOTPAGE
Lloh1:
	ldr	x8, [x8, _nsecs@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _nheads@GOTPAGE
Lloh4:
	ldr	x9, [x9, _nheads@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, #1
	ccmp	w9, #1, #4, ne
	b.eq	LBB0_3
; %bb.1:
	sdiv	w11, w0, w8
	sdiv	w10, w11, w9
	cmp	w10, w1
	b.gt	LBB0_3
; %bb.2:
	msub	w9, w10, w9, w11
	msub	w8, w11, w8, w0
	str	w10, [x2]
	add	w8, w8, #1
	str	w9, [x3]
	str	w8, [x4]
LBB0_3:
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_nsecs,4,2                      ; @nsecs
	.comm	_nheads,4,2                     ; @nheads
.subsections_via_symbols
