	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function run_socket
_run_socket:                            ## @run_socket
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	(%rdi), %eax
	movq	_H2O_SOCKET_FLAG_IS_DISPOSED@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_10
## %bb.1:
	movq	%rdi, %rbx
	movq	_H2O_SOCKET_FLAG_IS_READ_READY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_3
## %bb.2:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movq	%rbx, %rdi
	callq	_read_on_ready
	movl	(%rbx), %eax
LBB0_3:
	movq	_H2O_SOCKET_FLAG_IS_WRITE_NOTIFY@GOTPCREL(%rip), %r15
	testl	%eax, (%r15)
	je	LBB0_10
## %bb.4:
	leaq	8(%rbx), %r14
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	setne	%dil
	callq	_assert
	movl	(%r15), %eax
	notl	%eax
	andl	(%rbx), %eax
	movl	%eax, (%rbx)
	cmpq	$0, 24(%rbx)
	je	LBB0_6
## %bb.5:
	movq	_h2o_socket_error_io@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	movq	$0, 24(%rbx)
	jmp	LBB0_9
LBB0_6:
	movq	_H2O_SOCKET_FLAG_IS_CONNECTING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_7
## %bb.8:
	notl	%ecx
	andl	%ecx, %eax
	movl	%eax, (%rbx)
	movl	$4, -32(%rbp)
	movl	$0, -28(%rbp)
	movl	16(%rbx), %edi
	movq	_SOL_SOCKET@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_SO_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leaq	-28(%rbp), %rcx
	leaq	-32(%rbp), %r8
	callq	_getsockopt
	xorl	%esi, %esi
	cmpl	$0, -28(%rbp)
	movq	_h2o_socket_error_conn_fail@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmovneq	%rcx, %rsi
	testq	%rax, %rax
	cmovneq	%rcx, %rsi
	jmp	LBB0_9
LBB0_7:
	xorl	%esi, %esi
LBB0_9:
	movq	%r14, %rdi
	callq	_on_write_complete
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_H2O_SOCKET_FLAG_IS_DISPOSED,4,2 ## @H2O_SOCKET_FLAG_IS_DISPOSED
	.comm	_H2O_SOCKET_FLAG_IS_READ_READY,4,2 ## @H2O_SOCKET_FLAG_IS_READ_READY
	.comm	_H2O_SOCKET_FLAG_IS_WRITE_NOTIFY,4,2 ## @H2O_SOCKET_FLAG_IS_WRITE_NOTIFY
	.comm	_h2o_socket_error_io,8,3        ## @h2o_socket_error_io
	.comm	_H2O_SOCKET_FLAG_IS_CONNECTING,4,2 ## @H2O_SOCKET_FLAG_IS_CONNECTING
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_ERROR,4,2                   ## @SO_ERROR
	.comm	_h2o_socket_error_conn_fail,8,3 ## @h2o_socket_error_conn_fail
	.no_dead_strip	_run_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function run_socket
_run_socket:                            ; @run_socket
	.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
	ldr	w8, [x0]
Lloh0:
	adrp	x9, _H2O_SOCKET_FLAG_IS_DISPOSED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _H2O_SOCKET_FLAG_IS_DISPOSED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_10
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x9, _H2O_SOCKET_FLAG_IS_READ_READY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _H2O_SOCKET_FLAG_IS_READ_READY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	bic	w8, w8, w9
	str	w8, [x20]
	mov	x0, x20
	bl	_read_on_ready
	ldr	w8, [x20]
LBB0_3:
Lloh6:
	adrp	x21, _H2O_SOCKET_FLAG_IS_WRITE_NOTIFY@GOTPAGE
Lloh7:
	ldr	x21, [x21, _H2O_SOCKET_FLAG_IS_WRITE_NOTIFY@GOTPAGEOFF]
	ldr	w9, [x21]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.4:
	mov	x19, x20
	ldr	x8, [x19, #8]!
	cmp	x8, #0
	cset	w0, ne
	bl	_assert
	ldr	w8, [x21]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
	ldr	x9, [x20, #24]
	cbz	x9, LBB0_6
; %bb.5:
Lloh8:
	adrp	x8, _h2o_socket_error_io@GOTPAGE
Lloh9:
	ldr	x8, [x8, _h2o_socket_error_io@GOTPAGEOFF]
Lloh10:
	ldr	x1, [x8]
	str	xzr, [x20, #24]
	b	LBB0_9
LBB0_6:
Lloh11:
	adrp	x9, _H2O_SOCKET_FLAG_IS_CONNECTING@GOTPAGE
Lloh12:
	ldr	x9, [x9, _H2O_SOCKET_FLAG_IS_CONNECTING@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.7:
	bic	w8, w8, w9
	str	w8, [x20]
	mov	w8, #4
	stp	w8, wzr, [sp, #8]
	ldr	w0, [x20, #16]
Lloh14:
	adrp	x8, _SOL_SOCKET@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SOL_SOCKET@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x8, _SO_ERROR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SO_ERROR@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	add	x3, sp, #12
	add	x4, sp, #8
	bl	_getsockopt
	ldr	w8, [sp, #12]
	cmp	w8, #0
	ccmp	x0, #0, #0, eq
Lloh20:
	adrp	x8, _h2o_socket_error_conn_fail@GOTPAGE
Lloh21:
	ldr	x8, [x8, _h2o_socket_error_conn_fail@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	csel	x1, x8, xzr, ne
	b	LBB0_9
LBB0_8:
	mov	x1, #0
LBB0_9:
	mov	x0, x19
	bl	_on_write_complete
LBB0_10:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_H2O_SOCKET_FLAG_IS_DISPOSED,4,2 ; @H2O_SOCKET_FLAG_IS_DISPOSED
	.comm	_H2O_SOCKET_FLAG_IS_READ_READY,4,2 ; @H2O_SOCKET_FLAG_IS_READ_READY
	.comm	_H2O_SOCKET_FLAG_IS_WRITE_NOTIFY,4,2 ; @H2O_SOCKET_FLAG_IS_WRITE_NOTIFY
	.comm	_h2o_socket_error_io,8,3        ; @h2o_socket_error_io
	.comm	_H2O_SOCKET_FLAG_IS_CONNECTING,4,2 ; @H2O_SOCKET_FLAG_IS_CONNECTING
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_ERROR,4,2                   ; @SO_ERROR
	.comm	_h2o_socket_error_conn_fail,8,3 ; @h2o_socket_error_conn_fail
	.no_dead_strip	_run_socket
.subsections_via_symbols
