	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_process                     ## -- Begin function ub_process
	.p2align	4, 0x90
_ub_process:                            ## @ub_process
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	leaq	-48(%rbp), %r14
	leaq	-52(%rbp), %r15
	movq	_UB_PIPE@GOTPCREL(%rip), %r13
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, -48(%rbp)
	movq	%r12, %rdi
	callq	_lock_basic_lock
	movl	4(%r12), %edi
	movq	%r14, %rsi
	movq	%r15, %rdx
	movl	$1, %ecx
	callq	_tube_read_msg
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_lock_basic_unlock
	cmpl	$-1, %ebx
	je	LBB0_2
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rsi
	movl	-52(%rbp), %edx
	movq	%r12, %rdi
	callq	_process_answer
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi
	callq	_free
	testl	%ebx, %ebx
	jne	LBB0_1
	jmp	LBB0_5
LBB0_2:
	movq	_UB_NOERROR@GOTPCREL(%rip), %r13
LBB0_5:
	movl	(%r13), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UB_PIPE,4,2                    ## @UB_PIPE
	.comm	_UB_NOERROR,4,2                 ## @UB_NOERROR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_process                     ; -- Begin function ub_process
	.p2align	2
_ub_process:                            ; @ub_process
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _UB_NOERROR@GOTPAGE
Lloh1:
	ldr	x21, [x21, _UB_NOERROR@GOTPAGEOFF]
Lloh2:
	adrp	x22, _UB_PIPE@GOTPAGE
Lloh3:
	ldr	x22, [x22, _UB_PIPE@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	str	xzr, [sp, #8]
	mov	x0, x19
	bl	_lock_basic_lock
	ldr	w0, [x19, #4]
	add	x1, sp, #8
	add	x2, sp, #4
	mov	w3, #1
	bl	_tube_read_msg
	mov	x20, x0
	mov	x0, x19
	bl	_lock_basic_unlock
	cmn	w20, #1
	b.eq	LBB0_6
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w20, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	x1, [sp, #8]
	ldr	w2, [sp, #4]
	mov	x0, x19
	bl	_process_answer
	mov	x20, x0
	ldr	x0, [sp, #8]
	bl	_free
	cbnz	w20, LBB0_1
; %bb.4:
	mov	x21, x22
	b	LBB0_6
LBB0_5:
Lloh4:
	adrp	x21, _UB_PIPE@GOTPAGE
Lloh5:
	ldr	x21, [x21, _UB_PIPE@GOTPAGEOFF]
LBB0_6:
	ldr	w0, [x21]
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_UB_PIPE,4,2                    ; @UB_PIPE
	.comm	_UB_NOERROR,4,2                 ; @UB_NOERROR
.subsections_via_symbols
