	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function handle_octopus
_handle_octopus:                        ## @handle_octopus
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	$0, -48(%rbp)
	testl	%edi, %edi
	jle	LBB0_1
## %bb.2:
	movq	%rsi, %r12
	movl	%edi, %ebx
	incq	%rbx
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	leal	-2(%rbx), %eax
	movq	(%r12,%rax,8), %rdi
	callq	_get_commit_reference
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_commit_list_insert
	decq	%rbx
	cmpq	$1, %rbx
	ja	LBB0_3
## %bb.4:
	movq	-48(%rbp), %rdi
	jmp	LBB0_5
LBB0_1:
	xorl	%edi, %edi
LBB0_5:
	callq	_get_octopus_merge_bases
	movq	%rax, -40(%rbp)
	movq	-48(%rbp), %rdi
	callq	_free_commit_list
	leaq	-40(%rbp), %rdi
	callq	_reduce_heads_replace
	movq	-40(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_6
## %bb.7:
	leaq	L_.str(%rip), %r15
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdi
	callq	_oid_to_hex
	movq	%r15, %rdi
	movq	%rax, %rsi
	callq	_printf
	testl	%r14d, %r14d
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%rbx), %rbx
	testq	%rbx, %rbx
	jne	LBB0_8
LBB0_10:
	movq	-40(%rbp), %rdi
	callq	_free_commit_list
	xorl	%eax, %eax
	jmp	LBB0_11
LBB0_6:
	movl	$1, %eax
LBB0_11:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s\n"

	.no_dead_strip	_handle_octopus
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function handle_octopus
_handle_octopus:                        ; @handle_octopus
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x2
	str	xzr, [sp, #8]
	cmp	w0, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x20, x1
	mov	w8, w0
	add	x21, x8, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	sub	w8, w21, #2
	ldr	x0, [x20, w8, uxtw #3]
	bl	_get_commit_reference
	add	x1, sp, #8
	bl	_commit_list_insert
	sub	x21, x21, #1
	cmp	x21, #1
	b.hi	LBB0_2
; %bb.3:
	ldr	x0, [sp, #8]
	b	LBB0_5
LBB0_4:
	mov	x0, #0
LBB0_5:
	bl	_get_octopus_merge_bases
	str	x0, [sp]
	ldr	x0, [sp, #8]
	bl	_free_commit_list
	mov	x0, sp
	bl	_reduce_heads_replace
	ldr	x21, [sp]
	cbz	x21, LBB0_10
; %bb.6:
Lloh0:
	adrp	x20, l_.str@PAGE
Lloh1:
	add	x20, x20, l_.str@PAGEOFF
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x0, [x21]
	bl	_oid_to_hex
	mov	x1, x0
	mov	x0, x20
	bl	_printf
	cbz	w19, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x21, [x21, #8]
	cbnz	x21, LBB0_7
LBB0_9:
	ldr	x0, [sp]
	bl	_free_commit_list
	mov	w0, #0
	b	LBB0_11
LBB0_10:
	mov	w0, #1
LBB0_11:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s\n"

	.no_dead_strip	_handle_octopus
.subsections_via_symbols
