	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function rpc_service
_rpc_service:                           ## @rpc_service
	.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
	movl	$4152, %eax                     ## imm = 0x1038
	callq	____chkstk_darwin
	subq	%rax, %rsp
	popq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	(%rdi), %r12
	movq	_STRBUF_INIT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -4184(%rbp)
	movq	_CHILD_PROCESS_INIT@GOTPCREL(%rip), %rax
	movups	(%rax), %xmm0
	movaps	%xmm0, -4176(%rbp)
	movq	$-1, -4176(%rbp)
	movl	$1, -4168(%rbp)
	movq	%rdx, -4160(%rbp)
	leaq	-4176(%rbp), %rdi
	callq	_start_command
	testq	%rax, %rax
	jne	LBB0_16
## %bb.1:
	movl	-4176(%rbp), %edi
	movl	(%r13), %edx
	movl	4(%r13), %esi
	callq	_write_or_die
	testq	%r15, %r15
	je	LBB0_3
## %bb.2:
	movl	-4176(%rbp), %edi
	movl	4(%r15), %edx
	movl	8(%r15), %esi
	callq	_write_or_die
LBB0_3:
	movq	_http_post_buffer@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, 72(%rbx)
	callq	_xmalloc
	movq	%rax, 24(%rbx)
	movl	-4176(%rbp), %eax
	movl	%eax, 8(%rbx)
	movl	-4172(%rbp), %eax
	movl	%eax, 12(%rbx)
	movq	_url@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	leaq	L_.str(%rip), %rsi
	leaq	-4184(%rbp), %r13
	movq	%r13, %rdi
	movq	%r12, %rcx
	xorl	%eax, %eax
	callq	_strbuf_addf
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movq	%rax, 56(%rbx)
	leaq	L_.str.1(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_strbuf_addf
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movq	%rax, 48(%rbx)
	leaq	L_.str.2(%rip), %rsi
	movq	%r13, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_strbuf_addf
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movq	%rax, 40(%rbx)
	movl	(%r15), %edi
	movq	%r13, %rsi
	callq	_get_protocol_http_header
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	-4184(%rbp), %rdi
	xorl	%esi, %esi
	callq	_strbuf_detach
	movq	%rax, 32(%rbx)
	jmp	LBB0_6
LBB0_5:
	movq	$0, 32(%rbx)
LBB0_6:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	12(%rbx), %edi
	movq	24(%rbx), %rcx
	movl	72(%rbx), %r8d
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%r9d, %r9d
	callq	_packet_read
	testl	%eax, %eax
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	$0, 64(%rbx)
	movl	%eax, 16(%rbx)
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_post_rpc
	testl	%eax, %eax
	je	LBB0_7
## %bb.9:
	movl	%eax, %r15d
LBB0_10:
	movl	-4176(%rbp), %edi
	callq	_close
	movl	$-1, -4176(%rbp)
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.12:
	leaq	-4144(%rbp), %r14
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	-4172(%rbp), %edi
	movq	%r14, %rsi
	movl	$4096, %edx                     ## imm = 0x1000
	callq	_xread
	testq	%rax, %rax
	jg	LBB0_13
	jmp	LBB0_14
LBB0_11:
	movl	-4172(%rbp), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_strbuf_read
LBB0_14:
	movl	-4172(%rbp), %edi
	callq	_close
	movl	$-1, -4172(%rbp)
	leaq	-4176(%rbp), %rdi
	callq	_finish_command
	movl	%eax, %r14d
	movq	56(%rbx), %rdi
	callq	_free
	movq	48(%rbx), %rdi
	callq	_free
	movq	40(%rbx), %rdi
	callq	_free
	movq	32(%rbx), %rdi
	callq	_free
	movq	24(%rbx), %rdi
	callq	_free
	leaq	-4184(%rbp), %rdi
	callq	_strbuf_release
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_17
## %bb.15:
	orl	%r15d, %r14d
	movl	%r14d, %eax
	addq	$4152, %rsp                     ## imm = 0x1038
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	$1, %edi
	callq	_exit
LBB0_17:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_STRBUF_INIT,8,2                ## @STRBUF_INIT
	.comm	_CHILD_PROCESS_INIT,24,3        ## @CHILD_PROCESS_INIT
	.comm	_http_post_buffer,4,2           ## @http_post_buffer
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s%s"

	.comm	_url,4,2                        ## @url
L_.str.1:                               ## @.str.1
	.asciz	"Content-Type: application/x-%s-request"

L_.str.2:                               ## @.str.2
	.asciz	"Accept: application/x-%s-result"

	.no_dead_strip	_rpc_service
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function rpc_service
_rpc_service:                           ; @rpc_service
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	w9, #4160
Lloh0:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh1:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	sub	sp, sp, #1, lsl #12             ; =4096
	sub	sp, sp, #64
	mov	x20, x4
	mov	x23, x3
	mov	x21, x1
	mov	x19, x0
Lloh2:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh3:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh5:
	adrp	x8, _STRBUF_INIT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _STRBUF_INIT@GOTPAGEOFF]
	ldr	x22, [x0]
Lloh7:
	ldr	x8, [x8]
	str	x8, [sp, #48]
Lloh8:
	adrp	x8, _CHILD_PROCESS_INIT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _CHILD_PROCESS_INIT@GOTPAGEOFF]
Lloh10:
	ldr	q0, [x8]
	str	q0, [sp, #16]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [sp, #16]
	mov	w8, #1
	str	w8, [sp, #24]
	str	x2, [sp, #32]
	add	x0, sp, #16
	bl	_start_command
	cbnz	x0, LBB0_15
; %bb.1:
	ldr	w0, [sp, #16]
	ldp	w2, w1, [x23]
	bl	_write_or_die
	cbz	x21, LBB0_3
; %bb.2:
	ldr	w0, [sp, #16]
	ldp	w2, w1, [x21, #4]
	bl	_write_or_die
LBB0_3:
Lloh11:
	adrp	x8, _http_post_buffer@GOTPAGE
Lloh12:
	ldr	x8, [x8, _http_post_buffer@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	str	w0, [x19, #72]
	bl	_xmalloc
	str	x0, [x19, #24]
	ldr	d0, [sp, #16]
	str	d0, [x19, #8]
Lloh14:
	adrp	x8, _url@GOTPAGE
Lloh15:
	ldr	x8, [x8, _url@GOTPAGEOFF]
Lloh16:
	ldrsw	x2, [x8]
	str	x22, [sp]
Lloh17:
	adrp	x1, l_.str@PAGE
Lloh18:
	add	x1, x1, l_.str@PAGEOFF
	add	x0, sp, #48
	bl	_strbuf_addf
	add	x0, sp, #48
	mov	x1, #0
	bl	_strbuf_detach
	str	x0, [x19, #56]
Lloh19:
	adrp	x1, l_.str.1@PAGE
Lloh20:
	add	x1, x1, l_.str.1@PAGEOFF
	add	x0, sp, #48
	mov	x2, x22
	bl	_strbuf_addf
	add	x0, sp, #48
	mov	x1, #0
	bl	_strbuf_detach
	str	x0, [x19, #48]
Lloh21:
	adrp	x1, l_.str.2@PAGE
Lloh22:
	add	x1, x1, l_.str.2@PAGEOFF
	add	x0, sp, #48
	mov	x2, x22
	bl	_strbuf_addf
	add	x0, sp, #48
	mov	x1, #0
	bl	_strbuf_detach
	str	x0, [x19, #40]
	ldr	w0, [x21]
	add	x1, sp, #48
	bl	_get_protocol_http_header
	cbz	x0, LBB0_5
; %bb.4:
	add	x0, sp, #48
	mov	x1, #0
	bl	_strbuf_detach
	str	x0, [x19, #32]
	b	LBB0_6
LBB0_5:
	str	xzr, [x19, #32]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19, #12]
	ldr	x3, [x19, #24]
	ldr	w4, [x19, #72]
	mov	x1, #0
	mov	x2, #0
	mov	w5, #0
	bl	_packet_read
	cbz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	str	xzr, [x19, #64]
	str	w0, [x19, #16]
	mov	x0, x19
	mov	w1, #0
	bl	_post_rpc
	cbz	w0, LBB0_6
; %bb.8:
	mov	x21, x0
	b	LBB0_10
LBB0_9:
	mov	w21, #0
LBB0_10:
	ldr	w0, [sp, #16]
	bl	_close
	mov	w8, #-1
	str	w8, [sp, #16]
	cbz	w21, LBB0_12
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	w0, [sp, #20]
	add	x1, sp, #56
	mov	w2, #4096
	bl	_xread
	cmp	x0, #0
	b.gt	LBB0_11
	b	LBB0_13
LBB0_12:
	ldr	w1, [sp, #20]
	mov	x0, x20
	mov	w2, #0
	bl	_strbuf_read
LBB0_13:
	ldr	w0, [sp, #20]
	bl	_close
	mov	w8, #-1
	str	w8, [sp, #20]
	add	x0, sp, #16
	bl	_finish_command
	mov	x20, x0
	ldr	x0, [x19, #56]
	bl	_free
	ldr	x0, [x19, #48]
	bl	_free
	ldr	x0, [x19, #40]
	bl	_free
	ldr	x0, [x19, #32]
	bl	_free
	ldr	x0, [x19, #24]
	bl	_free
	add	x0, sp, #48
	bl	_strbuf_release
	ldur	x8, [x29, #-56]
Lloh23:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh24:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh25:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_16
; %bb.14:
	orr	w0, w20, w21
	add	sp, sp, #1, lsl #12             ; =4096
	add	sp, sp, #64
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_15:
	mov	w0, #1
	bl	_exit
LBB0_16:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_STRBUF_INIT,8,2                ; @STRBUF_INIT
	.comm	_CHILD_PROCESS_INIT,24,3        ; @CHILD_PROCESS_INIT
	.comm	_http_post_buffer,4,2           ; @http_post_buffer
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s%s"

	.comm	_url,4,2                        ; @url
l_.str.1:                               ; @.str.1
	.asciz	"Content-Type: application/x-%s-request"

l_.str.2:                               ; @.str.2
	.asciz	"Accept: application/x-%s-result"

	.no_dead_strip	_rpc_service
.subsections_via_symbols
