	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_multithread_send_message   ## -- Begin function h2o_multithread_send_message
	.p2align	4, 0x90
_h2o_multithread_send_message:          ## @h2o_multithread_send_message
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	(%rdi), %rdi
	addq	$4, %rdi
	callq	_pthread_mutex_lock
	testq	%r14, %r14
	je	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_h2o_linklist_is_linked
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_assert
	leaq	8(%r12), %r15
	movq	%r15, %rdi
	callq	_h2o_linklist_is_empty
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	leaq	12(%r12), %rbx
	movq	%rbx, %rdi
	callq	_h2o_linklist_unlink
	movq	(%r12), %rdi
	addq	$8, %rdi
	movq	%rbx, %rsi
	callq	_h2o_linklist_insert
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_h2o_linklist_insert
	movq	(%r12), %rdi
	addq	$4, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_4
LBB0_3:
	leaq	8(%r12), %rdi
	callq	_h2o_linklist_is_empty
	movq	%rax, %rbx
	movq	(%r12), %rdi
	addq	$4, %rdi
	callq	_pthread_mutex_unlock
	testq	%rbx, %rbx
	je	LBB0_7
LBB0_4:
	leaq	L_.str(%rip), %r14
	movq	_errno@GOTPCREL(%rip), %r15
	movq	_EINTR@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	%r14, %rsi
	movl	$1, %edx
	callq	_write
	cmpl	$-1, %eax
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rax
	cmpq	%rax, (%r15)
	je	LBB0_5
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_h2o_linklist_insert
	movq	(%r12), %rdi
	addq	$4, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_pthread_mutex_unlock           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

	.comm	_errno,8,3                      ## @errno
	.comm	_EINTR,8,3                      ## @EINTR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_h2o_multithread_send_message   ; -- Begin function h2o_multithread_send_message
	.p2align	2
_h2o_multithread_send_message:          ; @h2o_multithread_send_message
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x20, x1
	mov	x19, x0
	ldr	x8, [x0]
	add	x0, x8, #4
	bl	_pthread_mutex_lock
	cbz	x20, LBB0_3
; %bb.1:
	mov	x0, x20
	bl	_h2o_linklist_is_linked
	cmp	w0, #0
	cset	w0, eq
	bl	_assert
	add	x21, x19, #8
	mov	x0, x21
	bl	_h2o_linklist_is_empty
	cbz	x0, LBB0_7
; %bb.2:
	add	x22, x19, #12
	mov	x0, x22
	bl	_h2o_linklist_unlink
	ldr	x8, [x19]
	add	x0, x8, #8
	mov	x1, x22
	bl	_h2o_linklist_insert
	mov	x0, x21
	mov	x1, x20
	bl	_h2o_linklist_insert
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_pthread_mutex_unlock
	b	LBB0_4
LBB0_3:
	add	x0, x19, #8
	bl	_h2o_linklist_is_empty
	mov	x20, x0
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_pthread_mutex_unlock
	cbz	x20, LBB0_6
LBB0_4:
Lloh0:
	adrp	x20, l_.str@PAGE
Lloh1:
	add	x20, x20, l_.str@PAGEOFF
Lloh2:
	adrp	x21, _errno@GOTPAGE
Lloh3:
	ldr	x21, [x21, _errno@GOTPAGEOFF]
Lloh4:
	adrp	x22, _EINTR@GOTPAGE
Lloh5:
	ldr	x22, [x22, _EINTR@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	w0, [x8]
	mov	x1, x20
	mov	w2, #1
	bl	_write
	ldr	x8, [x21]
	ldr	x9, [x22]
	cmn	w0, #1
	ccmp	x8, x9, #0, eq
	b.eq	LBB0_5
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_7:
	mov	x0, x21
	mov	x1, x20
	bl	_h2o_linklist_insert
	ldr	x8, [x19]
	add	x0, x8, #4
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_pthread_mutex_unlock
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

	.comm	_errno,8,3                      ; @errno
	.comm	_EINTR,8,3                      ; @EINTR
.subsections_via_symbols
