	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function on_connect
_on_connect:                            ## @on_connect
	.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
	movq	%rdi, %rbx
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.3:
	movq	%rsi, %rdx
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fprintf
	movq	%rbx, %rdi
	callq	_h2o_socket_close
	movq	_exit_loop@GOTPCREL(%rip), %rax
	movl	$1, (%rax)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	_ssl_ctx@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	testq	%r14, %r14
	je	LBB0_2
## %bb.4:
	movq	_host@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%edi, %edi
	xorl	%esi, %esi
	callq	_h2o_iovec_init
	movq	_on_handshake_complete@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	movl	%eax, %ecx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_h2o_socket_ssl_handshake       ## TAILCALL
LBB0_2:
	movl	(%rbx), %esi
	movq	_on_write@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%rbx, %rdi
	movl	$1, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_h2o_socket_write               ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to connect to host:%s\n"

	.comm	_exit_loop,4,2                  ## @exit_loop
	.comm	_ssl_ctx,8,3                    ## @ssl_ctx
	.comm	_host,4,2                       ## @host
	.comm	_on_handshake_complete,4,2      ## @on_handshake_complete
	.comm	_on_write,4,2                   ## @on_write
	.no_dead_strip	_on_connect
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function on_connect
_on_connect:                            ; @on_connect
	.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	x19, x0
	cbz	x1, LBB0_2
; %bb.1:
	mov	x2, x1
Lloh0:
	adrp	x8, _stderr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	mov	x0, x19
	bl	_h2o_socket_close
Lloh5:
	adrp	x8, _exit_loop@GOTPAGE
Lloh6:
	ldr	x8, [x8, _exit_loop@GOTPAGEOFF]
	mov	w9, #1
Lloh7:
	str	w9, [x8]
	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_2:
Lloh8:
	adrp	x8, _ssl_ctx@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ssl_ctx@GOTPAGEOFF]
Lloh10:
	ldr	x20, [x8]
	cbz	x20, LBB0_4
; %bb.3:
Lloh11:
	adrp	x8, _host@GOTPAGE
Lloh12:
	ldr	x8, [x8, _host@GOTPAGEOFF]
Lloh13:
	ldr	w21, [x8]
	mov	x0, #0
	mov	w1, #0
	bl	_h2o_iovec_init
	mov	x3, x0
Lloh14:
	adrp	x8, _on_handshake_complete@GOTPAGE
Lloh15:
	ldr	x8, [x8, _on_handshake_complete@GOTPAGEOFF]
Lloh16:
	ldr	w4, [x8]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	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	_h2o_socket_ssl_handshake
LBB0_4:
Lloh17:
	adrp	x8, _on_write@GOTPAGE
Lloh18:
	ldr	x8, [x8, _on_write@GOTPAGEOFF]
	ldr	w1, [x19]
Lloh19:
	ldr	w3, [x8]
	mov	x0, x19
	mov	w2, #1
	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	_h2o_socket_write
	.loh AdrpLdrGotStr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to connect to host:%s\n"

	.comm	_exit_loop,4,2                  ; @exit_loop
	.comm	_ssl_ctx,8,3                    ; @ssl_ctx
	.comm	_host,4,2                       ; @host
	.comm	_on_handshake_complete,4,2      ; @on_handshake_complete
	.comm	_on_write,4,2                   ; @on_write
	.no_dead_strip	_on_connect
.subsections_via_symbols
