	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd_append                     ## -- Begin function cmd_append
	.p2align	4, 0x90
_cmd_append:                            ## @cmd_append
	.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	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$2, %edi
	jne	LBB0_1
## %bb.2:
	movq	%rdx, %r14
	movq	(%rsi), %rbx
	movq	$0, -48(%rbp)
	movq	8(%rsi), %rdi
	leaq	-48(%rbp), %rsi
	callq	_read_data
	cmpq	$0, -48(%rbp)
	je	LBB0_3
## %bb.4:
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_strlen
	movq	-48(%rbp), %rcx
	movq	_quiet@GOTPCREL(%rip), %r12
	movq	(%r12), %r9
	leaq	-36(%rbp), %rdx
	movq	%rdx, (%rsp)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%eax, %edx
	movq	%r15, %r8
	callq	_yrmcds_append
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_free
	movl	%ebx, %edi
	callq	_CHECK_ERROR
	cmpq	$0, (%r12)
	je	LBB0_6
## %bb.5:
	leaq	-36(%rbp), %rsi
	movq	%r14, %rdi
	callq	_yrmcds_noop
	movl	%eax, %edi
	callq	_CHECK_ERROR
LBB0_6:
	movq	_debug@GOTPCREL(%rip), %r15
	cmpq	$0, (%r15)
	je	LBB0_8
## %bb.7:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	-36(%rbp), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_8:
	leaq	-56(%rbp), %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	callq	_CHECK_RESPONSE
	movl	-56(%rbp), %eax
	cmpl	-36(%rbp), %eax
	je	LBB0_12
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_yrmcds_recv
	movl	%eax, %edi
	callq	_CHECK_ERROR
	cmpq	$0, (%r15)
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rbx, %rdi
	callq	_print_response
	jmp	LBB0_11
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$1, %eax
	jmp	LBB0_13
LBB0_12:
	xorl	%eax, %eax
	jmp	LBB0_13
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	movl	$2, %eax
LBB0_13:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Wrong number of arguments.\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to read data.\n"

	.comm	_quiet,8,3                      ## @quiet
	.comm	_debug,8,3                      ## @debug
L_.str.2:                               ## @.str.2
	.asciz	"request serial = %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_cmd_append                     ; -- Begin function cmd_append
	.p2align	2
_cmd_append:                            ; @cmd_append
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	cmp	w0, #2
	b.ne	LBB0_9
; %bb.1:
	mov	x19, x2
	str	xzr, [sp, #24]
	ldp	x20, x0, [x1]
	add	x1, sp, #24
	bl	_read_data
	ldr	x8, [sp, #24]
	cbz	x8, LBB0_11
; %bb.2:
	mov	x21, x0
	mov	x0, x20
	bl	_strlen
	mov	x2, x0
	ldr	x3, [sp, #24]
Lloh0:
	adrp	x22, _quiet@GOTPAGE
Lloh1:
	ldr	x22, [x22, _quiet@GOTPAGEOFF]
	ldr	x5, [x22]
	add	x6, sp, #12
	mov	x0, x19
	mov	x1, x20
	mov	x4, x21
	bl	_yrmcds_append
	mov	x20, x0
	ldr	x0, [sp, #24]
	bl	_free
	mov	x0, x20
	bl	_CHECK_ERROR
	ldr	x8, [x22]
	cbz	x8, LBB0_4
; %bb.3:
	add	x1, sp, #12
	mov	x0, x19
	bl	_yrmcds_noop
	bl	_CHECK_ERROR
LBB0_4:
Lloh2:
	adrp	x20, _debug@GOTPAGE
Lloh3:
	ldr	x20, [x20, _debug@GOTPAGEOFF]
	ldr	x8, [x20]
	cbz	x8, LBB0_7
; %bb.5:
Lloh4:
	adrp	x8, _stderr@GOTPAGE
Lloh5:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
	ldr	w8, [sp, #12]
	str	x8, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_fprintf
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #16
	bl	_CHECK_RESPONSE
	ldp	w9, w8, [sp, #12]
	cmp	w8, w9
	b.eq	LBB0_10
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	add	x1, sp, #16
	mov	x0, x19
	bl	_yrmcds_recv
	bl	_CHECK_ERROR
	ldr	x8, [x20]
	cbz	x8, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	add	x0, sp, #16
	bl	_print_response
	b	LBB0_6
LBB0_9:
Lloh9:
	adrp	x8, _stderr@GOTPAGE
Lloh10:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	w0, #1
	b	LBB0_12
LBB0_10:
	mov	w0, #0
	b	LBB0_12
LBB0_11:
Lloh14:
	adrp	x8, _stderr@GOTPAGE
Lloh15:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x1, l_.str.1@PAGE
Lloh18:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	mov	w0, #2
LBB0_12:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Wrong number of arguments.\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to read data.\n"

	.comm	_quiet,8,3                      ; @quiet
	.comm	_debug,8,3                      ; @debug
l_.str.2:                               ; @.str.2
	.asciz	"request serial = %u\n"

.subsections_via_symbols
