	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_output_next_wrap           ## -- Begin function get_output_next_wrap
	.p2align	4, 0x90
_get_output_next_wrap:                  ## @get_output_next_wrap
	.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	%rsi, %r14
	movq	%rdi, %r15
	movq	_CLOSEST_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_get_output_next
	movq	%rax, %rbx
	testq	%rax, %rax
	jne	LBB0_7
## %bb.1:
	movq	_D_RIGHT@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_D_LEFT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	%r15, %rdi
	jne	LBB0_3
## %bb.2:
	movq	%rax, %rdi
	jmp	LBB0_6
LBB0_3:
	cmpq	%r15, %rax
	je	LBB0_6
## %bb.4:
	movq	_D_DOWN@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	cmpq	%r15, %rdi
	jne	LBB0_6
## %bb.5:
	movq	_D_UP@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
LBB0_6:
	movq	_FARTHEST_OUTPUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rsi
	callq	_get_output_next
	movq	%rax, %rbx
LBB0_7:
	testq	%rbx, %rbx
	cmoveq	%r14, %rbx
	movq	%r14, %rdi
	callq	_output_primary_name
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_output_primary_name
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	callq	_DLOG
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CLOSEST_OUTPUT,4,2             ## @CLOSEST_OUTPUT
	.comm	_D_RIGHT,8,3                    ## @D_RIGHT
	.comm	_D_LEFT,8,3                     ## @D_LEFT
	.comm	_D_DOWN,8,3                     ## @D_DOWN
	.comm	_D_UP,8,3                       ## @D_UP
	.comm	_FARTHEST_OUTPUT,4,2            ## @FARTHEST_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"current = %s, best = %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_get_output_next_wrap           ; -- Begin function get_output_next_wrap
	.p2align	2
_get_output_next_wrap:                  ; @get_output_next_wrap
	.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
	mov	x19, x1
	mov	x20, x0
Lloh0:
	adrp	x8, _CLOSEST_OUTPUT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CLOSEST_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	w2, [x8]
	bl	_get_output_next
	cbnz	x0, LBB0_5
; %bb.1:
Lloh3:
	adrp	x8, _D_RIGHT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _D_RIGHT@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _D_LEFT@GOTPAGE
Lloh7:
	ldr	x9, [x9, _D_LEFT@GOTPAGEOFF]
Lloh8:
	ldr	x0, [x9]
	cmp	x8, x20
	b.eq	LBB0_4
; %bb.2:
	cmp	x0, x20
	mov	x0, x8
	b.eq	LBB0_4
; %bb.3:
Lloh9:
	adrp	x8, _D_DOWN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _D_DOWN@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
Lloh12:
	adrp	x9, _D_UP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _D_UP@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x8, x20
	csel	x0, x9, x8, eq
LBB0_4:
Lloh15:
	adrp	x8, _FARTHEST_OUTPUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _FARTHEST_OUTPUT@GOTPAGEOFF]
Lloh17:
	ldr	w2, [x8]
	mov	x1, x19
	bl	_get_output_next
LBB0_5:
	cmp	x0, #0
	csel	x20, x19, x0, eq
	mov	x0, x19
	bl	_output_primary_name
	mov	x19, x0
	mov	x0, x20
	bl	_output_primary_name
	mov	x2, x0
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	bl	_DLOG
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_CLOSEST_OUTPUT,4,2             ; @CLOSEST_OUTPUT
	.comm	_D_RIGHT,8,3                    ; @D_RIGHT
	.comm	_D_LEFT,8,3                     ; @D_LEFT
	.comm	_D_DOWN,8,3                     ; @D_DOWN
	.comm	_D_UP,8,3                       ; @D_UP
	.comm	_FARTHEST_OUTPUT,4,2            ; @FARTHEST_OUTPUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"current = %s, best = %s\n"

.subsections_via_symbols
