	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function paint_down_to_common
_paint_down_to_common:                  ## @paint_down_to_common
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r13
	movl	%edx, %r12d
	movq	_compare_commits_by_gen_then_commit_date@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	movl	$0, -44(%rbp)
	movq	$0, -64(%rbp)
	movq	_GENERATION_NUMBER_INFINITY@GOTPCREL(%rip), %rax
	testl	%r8d, %r8d
	jne	LBB0_2
## %bb.1:
	movq	_compare_commits_by_commit_date@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, -48(%rbp)
LBB0_2:
	movl	(%rax), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	_PARENT1@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%rsi)
	testl	%r12d, %r12d
	je	LBB0_3
## %bb.4:
	movq	%rdi, -80(%rbp)                 ## 8-byte Spill
	movl	%r8d, -68(%rbp)                 ## 4-byte Spill
	leaq	-48(%rbp), %rdi
	callq	_prio_queue_put
	testl	%r12d, %r12d
	jle	LBB0_7
## %bb.5:
	movl	%r12d, %ebx
	xorl	%r15d, %r15d
	movq	_PARENT2@GOTPCREL(%rip), %r14
	leaq	-48(%rbp), %r12
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %eax
	movq	(%r13,%r15,8), %rsi
	orl	%eax, 4(%rsi)
	movq	%r12, %rdi
	callq	_prio_queue_put
	incq	%r15
	cmpq	%r15, %rbx
	jne	LBB0_6
LBB0_7:
	leaq	-48(%rbp), %rdi
	callq	_queue_has_nonstale
	testq	%rax, %rax
	movl	-68(%rbp), %r14d                ## 4-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_11
LBB0_8:
	leaq	-48(%rbp), %rdi
	callq	_clear_prio_queue
	movq	-64(%rbp), %rax
	jmp	LBB0_22
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_11 Depth=1
	leaq	-48(%rbp), %rdi
	callq	_queue_has_nonstale
	testq	%rax, %rax
	je	LBB0_8
LBB0_11:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_24 Depth 2
	leaq	-48(%rbp), %rdi
	callq	_prio_queue_get
	movq	%rax, %r12
	testl	%r14d, %r14d
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r12), %ebx
	cmpl	-52(%rbp), %ebx                 ## 4-byte Folded Reload
	jle	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	%r12, %rdi
	addq	$8, %rdi
	callq	_oid_to_hex
	leaq	L_.str(%rip), %rdi
	movl	%ebx, %esi
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	movl	%eax, %ecx
	callq	_BUG
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movl	(%r12), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	cmpl	%r14d, %eax
	jl	LBB0_8
## %bb.15:                              ##   in Loop: Header=BB0_11 Depth=1
	movl	4(%r12), %eax
	movq	_PARENT2@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	movq	_PARENT1@GOTPCREL(%rip), %rcx
	orl	(%rcx), %ebx
	movq	_STALE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ebx, %ecx
	movl	%ecx, %r13d
	andl	%eax, %r13d
	cmpl	%ebx, %r13d
	jne	LBB0_18
## %bb.16:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	_RESULT@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%ecx, %r13d
	testl	%eax, %edx
	jne	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	orl	%eax, %edx
	movl	%edx, 4(%r12)
	movq	%r12, %rdi
	leaq	-64(%rbp), %rsi
	callq	_commit_list_insert_by_date
	movq	_STALE@GOTPCREL(%rip), %rax
	orl	(%rax), %ebx
	movl	%ebx, %r13d
	.p2align	4, 0x90
LBB0_18:                                ##   in Loop: Header=BB0_11 Depth=1
	movq	16(%r12), %r12
	.p2align	4, 0x90
LBB0_24:                                ##   Parent Loop BB0_11 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testq	%r12, %r12
	je	LBB0_10
## %bb.19:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	8(%r12), %rbx
	movq	(%r12), %r12
	movl	4(%rbx), %eax
	notl	%eax
	testl	%eax, %r13d
	je	LBB0_24
## %bb.20:                              ##   in Loop: Header=BB0_24 Depth=2
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_repo_parse_commit
	testq	%rax, %rax
	jne	LBB0_21
## %bb.23:                              ##   in Loop: Header=BB0_24 Depth=2
	orl	%r13d, 4(%rbx)
	leaq	-48(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_prio_queue_put
	jmp	LBB0_24
LBB0_3:
	leaq	-64(%rbp), %rax
	movq	%rsi, %rdi
	movq	%rax, %rsi
	callq	_commit_list_append
	movq	-64(%rbp), %rax
	jmp	LBB0_22
LBB0_21:
	xorl	%eax, %eax
LBB0_22:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_compare_commits_by_gen_then_commit_date,4,2 ## @compare_commits_by_gen_then_commit_date
	.comm	_GENERATION_NUMBER_INFINITY,4,2 ## @GENERATION_NUMBER_INFINITY
	.comm	_compare_commits_by_commit_date,4,2 ## @compare_commits_by_commit_date
	.comm	_PARENT1,4,2                    ## @PARENT1
	.comm	_PARENT2,4,2                    ## @PARENT2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"bad generation skip %8x > %8x at %s"

	.comm	_STALE,4,2                      ## @STALE
	.comm	_RESULT,4,2                     ## @RESULT
	.no_dead_strip	_paint_down_to_common
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function paint_down_to_common
_paint_down_to_common:                  ; @paint_down_to_common
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x4
	mov	x22, x3
	mov	x23, x2
	mov	x8, x1
	mov	x20, x0
	str	wzr, [sp, #12]
Lloh0:
	adrp	x9, _compare_commits_by_gen_then_commit_date@GOTPAGE
Lloh1:
	ldr	x9, [x9, _compare_commits_by_gen_then_commit_date@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	w9, [sp, #8]
	str	xzr, [sp]
Lloh3:
	adrp	x9, _GENERATION_NUMBER_INFINITY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GENERATION_NUMBER_INFINITY@GOTPAGEOFF]
	cbnz	w4, LBB0_2
; %bb.1:
Lloh5:
	adrp	x10, _compare_commits_by_commit_date@GOTPAGE
Lloh6:
	ldr	x10, [x10, _compare_commits_by_commit_date@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x10]
	str	w10, [sp, #8]
LBB0_2:
	ldr	w21, [x9]
Lloh8:
	adrp	x25, _PARENT1@GOTPAGE
Lloh9:
	ldr	x25, [x25, _PARENT1@GOTPAGEOFF]
	ldr	w9, [x25]
	ldr	w10, [x8, #4]
	orr	w9, w10, w9
	str	w9, [x8, #4]
	cbz	w23, LBB0_21
; %bb.3:
	add	x0, sp, #8
	mov	x1, x8
	bl	_prio_queue_put
	cmp	w23, #1
	b.lt	LBB0_6
; %bb.4:
	mov	w23, w23
Lloh10:
	adrp	x24, _PARENT2@GOTPAGE
Lloh11:
	ldr	x24, [x24, _PARENT2@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x24]
	ldr	x1, [x22], #8
	ldr	w9, [x1, #4]
	orr	w8, w9, w8
	str	w8, [x1, #4]
	add	x0, sp, #8
	bl	_prio_queue_put
	subs	x23, x23, #1
	b.ne	LBB0_5
LBB0_6:
	add	x0, sp, #8
	bl	_queue_has_nonstale
	cbz	x0, LBB0_22
; %bb.7:
Lloh12:
	adrp	x26, _PARENT2@GOTPAGE
Lloh13:
	ldr	x26, [x26, _PARENT2@GOTPAGEOFF]
Lloh14:
	adrp	x27, _STALE@GOTPAGE
Lloh15:
	ldr	x27, [x27, _STALE@GOTPAGEOFF]
Lloh16:
	adrp	x28, _RESULT@GOTPAGE
Lloh17:
	ldr	x28, [x28, _RESULT@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	add	x0, sp, #8
	bl	_queue_has_nonstale
	cbz	x0, LBB0_22
LBB0_9:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_18 Depth 2
	add	x0, sp, #8
	bl	_prio_queue_get
	mov	x23, x0
	cbz	w19, LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w24, [x23]
	cmp	w24, w21
	b.le	LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_9 Depth=1
	add	x0, x23, #8
	bl	_oid_to_hex
	mov	x3, x0
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x24
	mov	x2, x21
	bl	_BUG
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	w21, [x23]
	cmp	w21, w19
	b.lt	LBB0_22
; %bb.13:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [x23, #4]
	ldr	w9, [x25]
	ldr	w10, [x26]
	orr	w22, w10, w9
	ldr	w9, [x27]
	orr	w9, w22, w9
	and	w24, w9, w8
	cmp	w24, w22
	b.ne	LBB0_15
; %bb.14:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w10, [x28]
	mov	x24, x9
	tst	w10, w8
	b.eq	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	x22, [x23, #16]
	cbnz	x22, LBB0_18
	b	LBB0_8
LBB0_16:                                ;   in Loop: Header=BB0_9 Depth=1
	orr	w8, w10, w8
	str	w8, [x23, #4]
	mov	x1, sp
	mov	x0, x23
	bl	_commit_list_insert_by_date
	ldr	w8, [x27]
	orr	w24, w8, w22
	ldr	x22, [x23, #16]
	cbnz	x22, LBB0_18
	b	LBB0_8
LBB0_17:                                ;   in Loop: Header=BB0_18 Depth=2
	cbz	x22, LBB0_8
LBB0_18:                                ;   Parent Loop BB0_9 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldp	x22, x23, [x22]
	ldr	w8, [x23, #4]
	bics	wzr, w24, w8
	b.eq	LBB0_17
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=2
	mov	x0, x20
	mov	x1, x23
	bl	_repo_parse_commit
	cbnz	x0, LBB0_24
; %bb.20:                               ;   in Loop: Header=BB0_18 Depth=2
	ldr	w8, [x23, #4]
	orr	w8, w8, w24
	str	w8, [x23, #4]
	add	x0, sp, #8
	mov	x1, x23
	bl	_prio_queue_put
	b	LBB0_17
LBB0_21:
	mov	x1, sp
	mov	x0, x8
	bl	_commit_list_append
	b	LBB0_23
LBB0_22:
	add	x0, sp, #8
	bl	_clear_prio_queue
LBB0_23:
	ldr	x0, [sp]
	b	LBB0_25
LBB0_24:
	mov	x0, #0
LBB0_25:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_compare_commits_by_gen_then_commit_date,4,2 ; @compare_commits_by_gen_then_commit_date
	.comm	_GENERATION_NUMBER_INFINITY,4,2 ; @GENERATION_NUMBER_INFINITY
	.comm	_compare_commits_by_commit_date,4,2 ; @compare_commits_by_commit_date
	.comm	_PARENT1,4,2                    ; @PARENT1
	.comm	_PARENT2,4,2                    ; @PARENT2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"bad generation skip %8x > %8x at %s"

	.comm	_STALE,4,2                      ; @STALE
	.comm	_RESULT,4,2                     ; @RESULT
	.no_dead_strip	_paint_down_to_common
.subsections_via_symbols
