	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_demultiplex_sideband           ## -- Begin function demultiplex_sideband
	.p2align	4, 0x90
_demultiplex_sideband:                  ## @demultiplex_sideband
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%ecx, %r15d
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %rcx
	cmpq	$0, _demultiplex_sideband.suffix(%rip)
	je	LBB0_1
## %bb.6:
	testl	%r13d, %r13d
	je	LBB0_7
LBB0_8:
	movq	%r9, -48(%rbp)                  ## 8-byte Spill
	jle	LBB0_9
## %bb.10:
	movzbl	(%r12), %r8d
	movl	%r13d, %eax
	movb	$0, (%r12,%rax)
	cmpl	$1, %r8d
	je	LBB0_11
## %bb.12:
	cmpb	$3, %r8b
	je	LBB0_24
## %bb.13:
	cmpb	$2, %r8b
	jne	LBB0_29
## %bb.14:
	incq	%r12
	leaq	L_.str.5(%rip), %rsi
	movq	%r12, %rdi
	callq	_strpbrk
	testq	%rax, %rax
	je	LBB0_21
## %bb.15:
	movq	%rax, %r13
	leaq	L_.str.5(%rip), %r15
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_16 Depth=1
	movsbl	(%r13), %esi
	movq	%r14, %rdi
	callq	_strbuf_addch
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	movl	$2, %edi
	callq	_xwrite
	movq	%r14, %rdi
	callq	_strbuf_reset
	movq	%r13, %r12
	incq	%r12
	movq	%r12, %rdi
	movq	%r15, %rsi
	callq	_strpbrk
	movq	%rax, %r13
	testq	%rax, %rax
	je	LBB0_21
LBB0_16:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %ebx
	subl	%r12d, %ebx
	cmpq	$0, 8(%r14)
	je	LBB0_17
## %bb.18:                              ##   in Loop: Header=BB0_16 Depth=1
	testl	%ebx, %ebx
	jg	LBB0_19
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	_DISPLAY_PREFIX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	%r14, %rdi
	callq	_strbuf_addstr
	testl	%ebx, %ebx
	jle	LBB0_20
LBB0_19:                                ##   in Loop: Header=BB0_16 Depth=1
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_maybe_colorize_sideband
	movq	_demultiplex_sideband.suffix(%rip), %rsi
	movq	%r14, %rdi
	callq	_strbuf_addstr
	jmp	LBB0_20
LBB0_1:
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	%r9, %rbx
	movl	$2, %edi
	callq	_isatty
	testq	%rax, %rax
	je	LBB0_4
## %bb.2:
	xorl	%eax, %eax
	callq	_is_terminal_dumb
	testl	%eax, %eax
	je	LBB0_3
LBB0_4:
	movq	_DUMB_SUFFIX@GOTPCREL(%rip), %rax
	jmp	LBB0_5
LBB0_9:
	cmpq	$0, 8(%r14)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_strbuf_addf
	jmp	LBB0_30
LBB0_11:
	movq	_SIDEBAND_PRIMARY@GOTPCREL(%rip), %rax
	jmp	LBB0_31
LBB0_24:
	decl	%r13d
	testl	%r15d, %r15d
	je	LBB0_26
## %bb.25:
	leaq	1(%r12), %rsi
	leaq	L_.str.3(%rip), %rdi
	callq	_die
LBB0_26:
	cmpq	$0, 8(%r14)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	movq	_DISPLAY_PREFIX@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	L_.str.4(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_strbuf_addf
	incq	%r12
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_maybe_colorize_sideband
	movq	_SIDEBAND_REMOTE_ERROR@GOTPCREL(%rip), %rax
	jmp	LBB0_31
LBB0_29:
	cmpq	$0, 8(%r14)
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rdx
	cmoveq	%rax, %rdx
	leaq	L_.str.6(%rip), %rsi
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_strbuf_addf
LBB0_30:
	movq	_SIDEBAND_PROTOCOL_ERROR@GOTPCREL(%rip), %rax
LBB0_31:
	movq	-48(%rbp), %r9                  ## 8-byte Reload
	jmp	LBB0_32
LBB0_21:
	xorl	%ebx, %ebx
	cmpb	$0, (%r12)
	je	LBB0_38
## %bb.22:
	cmpq	$0, 8(%r14)
	jne	LBB0_23
## %bb.27:
	movq	_DISPLAY_PREFIX@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	jmp	LBB0_28
LBB0_3:
	movq	_ANSI_SUFFIX@GOTPCREL(%rip), %rax
LBB0_5:
	movq	(%rax), %rax
	movq	%rax, _demultiplex_sideband.suffix(%rip)
	movq	%rbx, %r9
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%r13d, %r13d
	jne	LBB0_8
LBB0_7:
	movq	_SIDEBAND_FLUSH@GOTPCREL(%rip), %rax
LBB0_32:
	movl	(%rax), %eax
	movl	%eax, (%r9)
	testl	%r15d, %r15d
	je	LBB0_35
## %bb.33:
	movq	_SIDEBAND_PROTOCOL_ERROR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_35
## %bb.34:
	movq	(%r14), %rsi
	leaq	L_.str.7(%rip), %rdi
	callq	_die
LBB0_35:
	cmpq	$0, 8(%r14)
	je	LBB0_37
## %bb.36:
	movq	%r14, %rdi
	movl	$10, %esi
	callq	_strbuf_addch
	movq	(%r14), %rsi
	movq	8(%r14), %rdx
	movl	$2, %edi
	callq	_xwrite
LBB0_37:
	movq	%r14, %rdi
	callq	_strbuf_release
	movl	$1, %ebx
LBB0_38:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	leaq	L_.str.2(%rip), %rsi
LBB0_28:
	movq	%r14, %rdi
	callq	_strbuf_addstr
	movq	%r12, %rdi
	callq	_strlen
	movq	%r14, %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	callq	_maybe_colorize_sideband
	jmp	LBB0_38
	.cfi_endproc
                                        ## -- End function
.zerofill __DATA,__bss,_demultiplex_sideband.suffix,8,3 ## @demultiplex_sideband.suffix
	.comm	_ANSI_SUFFIX,8,3                ## @ANSI_SUFFIX
	.comm	_DUMB_SUFFIX,8,3                ## @DUMB_SUFFIX
	.comm	_SIDEBAND_FLUSH,4,2             ## @SIDEBAND_FLUSH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s: protocol error: no band designator"

L_.str.1:                               ## @.str.1
	.asciz	"\n"

L_.str.2:                               ## @.str.2
	.space	1

	.comm	_SIDEBAND_PROTOCOL_ERROR,4,2    ## @SIDEBAND_PROTOCOL_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"remote error: %s"

L_.str.4:                               ## @.str.4
	.asciz	"%s%s"

	.comm	_DISPLAY_PREFIX,8,3             ## @DISPLAY_PREFIX
	.comm	_SIDEBAND_REMOTE_ERROR,4,2      ## @SIDEBAND_REMOTE_ERROR
L_.str.5:                               ## @.str.5
	.asciz	"\n\r"

	.comm	_SIDEBAND_PRIMARY,4,2           ## @SIDEBAND_PRIMARY
L_.str.6:                               ## @.str.6
	.asciz	"%s%s: protocol error: bad band #%d"

L_.str.7:                               ## @.str.7
	.asciz	"%s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_demultiplex_sideband           ; -- Begin function demultiplex_sideband
	.p2align	2
_demultiplex_sideband:                  ; @demultiplex_sideband
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x5
	mov	x19, x4
	mov	x21, x3
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	adrp	x25, _demultiplex_sideband.suffix@PAGE
	ldr	x8, [x25, _demultiplex_sideband.suffix@PAGEOFF]
	cbz	x8, LBB0_13
; %bb.1:
	cbz	w24, LBB0_27
LBB0_2:
	cmp	w24, #0
	b.le	LBB0_16
; %bb.3:
	ldrb	w8, [x22]
	strb	wzr, [x22, w24, uxtw]
	cmp	w8, #1
	b.eq	LBB0_17
; %bb.4:
	cmp	w8, #3
	b.eq	LBB0_18
; %bb.5:
	cmp	w8, #2
	b.ne	LBB0_21
; %bb.6:
	add	x20, x22, #1
Lloh0:
	adrp	x1, l_.str.5@PAGE
Lloh1:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x20
	bl	_strpbrk
	cbz	x0, LBB0_23
; %bb.7:
	mov	x21, x0
Lloh2:
	adrp	x24, _DISPLAY_PREFIX@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DISPLAY_PREFIX@GOTPAGEOFF]
Lloh4:
	adrp	x22, l_.str.5@PAGE
Lloh5:
	add	x22, x22, l_.str.5@PAGEOFF
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	ldrsb	w1, [x21], #1
	mov	x0, x19
	bl	_strbuf_addch
	ldp	x1, x2, [x19]
	mov	w0, #2
	bl	_xwrite
	mov	x0, x19
	bl	_strbuf_reset
	mov	x20, x21
	mov	x0, x21
	mov	x1, x22
	bl	_strpbrk
	mov	x21, x0
	cbz	x0, LBB0_23
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	sub	w23, w21, w20
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	cmp	w23, #1
	b.ge	LBB0_12
	b	LBB0_8
LBB0_11:                                ;   in Loop: Header=BB0_9 Depth=1
	ldr	x1, [x24]
	mov	x0, x19
	bl	_strbuf_addstr
	cmp	w23, #1
	b.lt	LBB0_8
LBB0_12:                                ;   in Loop: Header=BB0_9 Depth=1
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_maybe_colorize_sideband
	ldr	x1, [x25, _demultiplex_sideband.suffix@PAGEOFF]
	mov	x0, x19
	bl	_strbuf_addstr
	b	LBB0_8
LBB0_13:
	mov	w0, #2
	bl	_isatty
	cbz	x0, LBB0_15
; %bb.14:
	bl	_is_terminal_dumb
	cbz	w0, LBB0_25
LBB0_15:
Lloh6:
	adrp	x8, _DUMB_SUFFIX@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DUMB_SUFFIX@GOTPAGEOFF]
	b	LBB0_26
LBB0_16:
	ldr	x8, [x19, #8]
Lloh8:
	adrp	x9, l_.str.1@PAGE
Lloh9:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh10:
	adrp	x10, l_.str.2@PAGE
Lloh11:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x8, #0
	csel	x2, x10, x9, eq
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_22
LBB0_17:
Lloh14:
	adrp	x8, _SIDEBAND_PRIMARY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SIDEBAND_PRIMARY@GOTPAGEOFF]
	b	LBB0_28
LBB0_18:
	sub	w23, w24, #1
	cbz	w21, LBB0_20
; %bb.19:
	add	x1, x22, #1
Lloh16:
	adrp	x0, l_.str.3@PAGE
Lloh17:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_die
LBB0_20:
Lloh18:
	adrp	x8, l_.str.1@PAGE
Lloh19:
	add	x8, x8, l_.str.1@PAGEOFF
Lloh20:
	adrp	x9, l_.str.2@PAGE
Lloh21:
	add	x9, x9, l_.str.2@PAGEOFF
	ldr	x10, [x19, #8]
	cmp	x10, #0
	csel	x2, x9, x8, eq
Lloh22:
	adrp	x8, _DISPLAY_PREFIX@GOTPAGE
Lloh23:
	ldr	x8, [x8, _DISPLAY_PREFIX@GOTPAGEOFF]
Lloh24:
	ldr	x3, [x8]
Lloh25:
	adrp	x1, l_.str.4@PAGE
Lloh26:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x19
	bl	_strbuf_addf
	add	x1, x22, #1
	mov	x0, x19
	mov	x2, x23
	bl	_maybe_colorize_sideband
Lloh27:
	adrp	x8, _SIDEBAND_REMOTE_ERROR@GOTPAGE
Lloh28:
	ldr	x8, [x8, _SIDEBAND_REMOTE_ERROR@GOTPAGEOFF]
	b	LBB0_28
LBB0_21:
	ldr	x9, [x19, #8]
Lloh29:
	adrp	x10, l_.str.1@PAGE
Lloh30:
	add	x10, x10, l_.str.1@PAGEOFF
Lloh31:
	adrp	x11, l_.str.2@PAGE
Lloh32:
	add	x11, x11, l_.str.2@PAGEOFF
	cmp	x9, #0
	csel	x2, x11, x10, eq
	str	x8, [sp]
Lloh33:
	adrp	x1, l_.str.6@PAGE
Lloh34:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_22:
	mov	x0, x19
	mov	x3, x23
	bl	_strbuf_addf
Lloh35:
	adrp	x8, _SIDEBAND_PROTOCOL_ERROR@GOTPAGE
Lloh36:
	ldr	x8, [x8, _SIDEBAND_PROTOCOL_ERROR@GOTPAGEOFF]
	b	LBB0_28
LBB0_23:
	ldrb	w8, [x20]
	cbz	w8, LBB0_35
; %bb.24:
Lloh37:
	adrp	x8, _DISPLAY_PREFIX@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DISPLAY_PREFIX@GOTPAGEOFF]
	ldr	x9, [x19, #8]
Lloh39:
	ldr	x8, [x8]
Lloh40:
	adrp	x10, l_.str.2@PAGE
Lloh41:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x9, #0
	csel	x1, x8, x10, eq
	mov	x0, x19
	bl	_strbuf_addstr
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	mov	x0, x19
	mov	x1, x20
	bl	_maybe_colorize_sideband
	mov	w0, #0
	b	LBB0_34
LBB0_25:
Lloh42:
	adrp	x8, _ANSI_SUFFIX@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ANSI_SUFFIX@GOTPAGEOFF]
LBB0_26:
	ldr	x8, [x8]
	str	x8, [x25, _demultiplex_sideband.suffix@PAGEOFF]
	cbnz	w24, LBB0_2
LBB0_27:
Lloh44:
	adrp	x8, _SIDEBAND_FLUSH@GOTPAGE
Lloh45:
	ldr	x8, [x8, _SIDEBAND_FLUSH@GOTPAGEOFF]
LBB0_28:
	ldr	w8, [x8]
	str	w8, [x20]
	cbz	w21, LBB0_31
; %bb.29:
Lloh46:
	adrp	x9, _SIDEBAND_PROTOCOL_ERROR@GOTPAGE
Lloh47:
	ldr	x9, [x9, _SIDEBAND_PROTOCOL_ERROR@GOTPAGEOFF]
Lloh48:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_31
; %bb.30:
	ldr	x1, [x19]
Lloh49:
	adrp	x0, l_.str.7@PAGE
Lloh50:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_die
LBB0_31:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_33
; %bb.32:
	mov	x0, x19
	mov	w1, #10
	bl	_strbuf_addch
	ldp	x1, x2, [x19]
	mov	w0, #2
	bl	_xwrite
LBB0_33:
	mov	x0, x19
	bl	_strbuf_release
	mov	w0, #1
LBB0_34:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_35:
	mov	w0, #0
	b	LBB0_34
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh27, Lloh28
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.cfi_endproc
                                        ; -- End function
.zerofill __DATA,__bss,_demultiplex_sideband.suffix,8,3 ; @demultiplex_sideband.suffix
	.comm	_ANSI_SUFFIX,8,3                ; @ANSI_SUFFIX
	.comm	_DUMB_SUFFIX,8,3                ; @DUMB_SUFFIX
	.comm	_SIDEBAND_FLUSH,4,2             ; @SIDEBAND_FLUSH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s: protocol error: no band designator"

l_.str.1:                               ; @.str.1
	.asciz	"\n"

l_.str.2:                               ; @.str.2
	.space	1

	.comm	_SIDEBAND_PROTOCOL_ERROR,4,2    ; @SIDEBAND_PROTOCOL_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"remote error: %s"

l_.str.4:                               ; @.str.4
	.asciz	"%s%s"

	.comm	_DISPLAY_PREFIX,8,3             ; @DISPLAY_PREFIX
	.comm	_SIDEBAND_REMOTE_ERROR,4,2      ; @SIDEBAND_REMOTE_ERROR
l_.str.5:                               ; @.str.5
	.asciz	"\n\r"

	.comm	_SIDEBAND_PRIMARY,4,2           ; @SIDEBAND_PRIMARY
l_.str.6:                               ; @.str.6
	.asciz	"%s%s: protocol error: bad band #%d"

l_.str.7:                               ; @.str.7
	.asciz	"%s"

.subsections_via_symbols
