	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ## -- Begin function main
	.p2align	4, 0x90
_main:                                  ## @main
	.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	%rsi, %r14
	movl	%edi, %r12d
	movq	%rsp, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_NEVERBLEED_ERRBUF_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	xorl	%eax, %eax
	callq	_SSL_load_error_strings
	xorl	%eax, %eax
	callq	_SSL_library_init
	xorl	%eax, %eax
	callq	_OpenSSL_add_all_algorithms
	leaq	-56(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_neverbleed_init
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	jmp	LBB0_14
LBB0_2:
	xorl	%eax, %eax
	callq	_SSLv23_server_method
	movl	%eax, %edi
	callq	_SSL_CTX_new
	movq	_SSL_OP_ALL@GOTPCREL(%rip), %rcx
	movq	_SSL_OP_NO_SSLv2@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	_SSL_OP_NO_SSLv3@GOTPCREL(%rip), %rcx
	orl	(%rcx), %esi
	movq	%rax, %r15
	movq	_SSL_OP_NO_COMPRESSION@GOTPCREL(%rip), %rax
	orl	(%rax), %esi
	movq	%r15, %rdi
	callq	_SSL_CTX_set_options
	movq	%r15, %rdi
	callq	_setup_ecc_key
	cmpl	$5, %r12d
	jne	LBB0_6
## %bb.3:
	movq	8(%r14), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_strcmp
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	8(%r14), %rdi
	leaq	L_.str.3(%rip), %rsi
	callq	_strcmp
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	8(%r14), %rdx
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_14
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r14), %rdx
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_14
LBB0_7:
	movq	16(%r14), %rdi
	leaq	L_.str.5(%rip), %rsi
	leaq	-50(%rbp), %rdx
	callq	_sscanf
	cmpl	$1, %eax
	jne	LBB0_12
## %bb.8:
	movq	24(%r14), %rsi
	movq	%r15, %rdi
	callq	_SSL_CTX_use_certificate_chain_file
	cmpl	$1, %eax
	jne	LBB0_13
## %bb.9:
	movq	32(%r14), %rdx
	testq	%r12, %r12
	je	LBB0_18
## %bb.10:
	leaq	-56(%rbp), %rdi
	movq	%r15, %rsi
	movq	%rbx, %rcx
	callq	_neverbleed_load_private_key_file
	cmpl	$1, %eax
	je	LBB0_19
## %bb.11:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%r14), %rdx
	leaq	L_.str.8(%rip), %rsi
	movq	%rbx, %rcx
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_15
LBB0_12:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	16(%r14), %rdx
	leaq	L_.str.6(%rip), %rsi
	jmp	LBB0_14
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	24(%r14), %rdx
	leaq	L_.str.7(%rip), %rsi
LBB0_14:
	xorl	%eax, %eax
	callq	_fprintf
LBB0_15:
	movl	$111, %eax
LBB0_16:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_21
## %bb.17:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_18:
	movq	_SSL_FILETYPE_PEM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%r15, %rdi
	movq	%rdx, %rsi
	movl	%eax, %edx
	callq	_SSL_CTX_use_PrivateKey_file
	cmpl	$1, %eax
	jne	LBB0_20
LBB0_19:
	movzwl	-50(%rbp), %edi
	movq	%r15, %rsi
	callq	_dumb_https_server
	jmp	LBB0_16
LBB0_20:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	32(%r14), %rdx
	leaq	L_.str.9(%rip), %rsi
	jmp	LBB0_14
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_NEVERBLEED_ERRBUF_SIZE,4,2     ## @NEVERBLEED_ERRBUF_SIZE
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"openssl_privsep_init: %s\n"

	.comm	_SSL_OP_ALL,4,2                 ## @SSL_OP_ALL
	.comm	_SSL_OP_NO_SSLv2,4,2            ## @SSL_OP_NO_SSLv2
	.comm	_SSL_OP_NO_SSLv3,4,2            ## @SSL_OP_NO_SSLv3
	.comm	_SSL_OP_NO_COMPRESSION,4,2      ## @SSL_OP_NO_COMPRESSION
L_.str.1:                               ## @.str.1
	.asciz	"Usage: %s <internal|privsep> <port> <certificate-chain-file> <private-key-file>\n"

L_.str.2:                               ## @.str.2
	.asciz	"internal"

L_.str.3:                               ## @.str.3
	.asciz	"privsep"

L_.str.4:                               ## @.str.4
	.asciz	"unknown mode:%s\n"

L_.str.5:                               ## @.str.5
	.asciz	"%hu"

L_.str.6:                               ## @.str.6
	.asciz	"failed to parse port:%s\n"

L_.str.7:                               ## @.str.7
	.asciz	"failed to load certificate chain file:%s\n"

L_.str.8:                               ## @.str.8
	.asciz	"failed to load private key from file:%s:%s\n"

	.comm	_SSL_FILETYPE_PEM,4,2           ## @SSL_FILETYPE_PEM
L_.str.9:                               ## @.str.9
	.asciz	"failed to load private key from file:%s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_main                           ; -- Begin function main
	.p2align	2
_main:                                  ; @main
	.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
	sub	sp, sp, #16
	mov	x19, x1
	mov	x22, x0
	mov	x23, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _NEVERBLEED_ERRBUF_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _NEVERBLEED_ERRBUF_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	bl	_SSL_load_error_strings
	bl	_SSL_library_init
	bl	_OpenSSL_add_all_algorithms
	sub	x0, x29, #64
	mov	x1, x20
	bl	_neverbleed_init
	cbz	x0, LBB0_2
; %bb.1:
Lloh8:
	adrp	x8, _stderr@GOTPAGE
Lloh9:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
Lloh11:
	adrp	x1, l_.str@PAGE
Lloh12:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	b	LBB0_14
LBB0_2:
	bl	_SSLv23_server_method
	bl	_SSL_CTX_new
	mov	x21, x0
Lloh13:
	adrp	x8, _SSL_OP_ALL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _SSL_OP_ALL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
Lloh16:
	adrp	x9, _SSL_OP_NO_SSLv2@GOTPAGE
Lloh17:
	ldr	x9, [x9, _SSL_OP_NO_SSLv2@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh19:
	adrp	x9, _SSL_OP_NO_SSLv3@GOTPAGE
Lloh20:
	ldr	x9, [x9, _SSL_OP_NO_SSLv3@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh22:
	adrp	x9, _SSL_OP_NO_COMPRESSION@GOTPAGE
Lloh23:
	ldr	x9, [x9, _SSL_OP_NO_COMPRESSION@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	orr	w1, w8, w9
	bl	_SSL_CTX_set_options
	mov	x0, x21
	bl	_setup_ecc_key
	cmp	w22, #5
	b.ne	LBB0_6
; %bb.3:
	ldr	x0, [x19, #8]
Lloh25:
	adrp	x1, l_.str.2@PAGE
Lloh26:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_strcmp
	mov	x22, x0
	cbz	x0, LBB0_7
; %bb.4:
	ldr	x0, [x19, #8]
Lloh27:
	adrp	x1, l_.str.3@PAGE
Lloh28:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_strcmp
	cbz	x0, LBB0_7
; %bb.5:
Lloh29:
	adrp	x8, _stderr@GOTPAGE
Lloh30:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh31:
	ldr	w0, [x8]
	ldr	x2, [x19, #8]
Lloh32:
	adrp	x1, l_.str.4@PAGE
Lloh33:
	add	x1, x1, l_.str.4@PAGEOFF
	b	LBB0_14
LBB0_6:
Lloh34:
	adrp	x8, _stderr@GOTPAGE
Lloh35:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	ldr	x2, [x19]
Lloh37:
	adrp	x1, l_.str.1@PAGE
Lloh38:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_14
LBB0_7:
	ldr	x0, [x19, #16]
Lloh39:
	adrp	x1, l_.str.5@PAGE
Lloh40:
	add	x1, x1, l_.str.5@PAGEOFF
	sub	x2, x29, #58
	bl	_sscanf
	cmp	w0, #1
	b.ne	LBB0_12
; %bb.8:
	ldr	x1, [x19, #24]
	mov	x0, x21
	bl	_SSL_CTX_use_certificate_chain_file
	cmp	w0, #1
	b.ne	LBB0_13
; %bb.9:
	ldr	x2, [x19, #32]
	cbz	x22, LBB0_18
; %bb.10:
	sub	x0, x29, #64
	mov	x1, x21
	mov	x3, x20
	bl	_neverbleed_load_private_key_file
	cmp	w0, #1
	b.eq	LBB0_19
; %bb.11:
Lloh41:
	adrp	x8, _stderr@GOTPAGE
Lloh42:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
	ldr	x2, [x19, #32]
	str	x20, [sp, #-16]!
Lloh44:
	adrp	x1, l_.str.8@PAGE
Lloh45:
	add	x1, x1, l_.str.8@PAGEOFF
	bl	_fprintf
	add	sp, sp, #16
	b	LBB0_15
LBB0_12:
Lloh46:
	adrp	x8, _stderr@GOTPAGE
Lloh47:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh48:
	ldr	w0, [x8]
	ldr	x2, [x19, #16]
Lloh49:
	adrp	x1, l_.str.6@PAGE
Lloh50:
	add	x1, x1, l_.str.6@PAGEOFF
	b	LBB0_14
LBB0_13:
Lloh51:
	adrp	x8, _stderr@GOTPAGE
Lloh52:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh53:
	ldr	w0, [x8]
	ldr	x2, [x19, #24]
Lloh54:
	adrp	x1, l_.str.7@PAGE
Lloh55:
	add	x1, x1, l_.str.7@PAGEOFF
LBB0_14:
	bl	_fprintf
LBB0_15:
	mov	w0, #111
LBB0_16:
	mov	sp, x23
	ldur	x8, [x29, #-56]
Lloh56:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh57:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh58:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.17:
	sub	sp, x29, #48
	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_18:
Lloh59:
	adrp	x8, _SSL_FILETYPE_PEM@GOTPAGE
Lloh60:
	ldr	x8, [x8, _SSL_FILETYPE_PEM@GOTPAGEOFF]
Lloh61:
	ldr	w8, [x8]
	mov	x0, x21
	mov	x1, x2
	mov	x2, x8
	bl	_SSL_CTX_use_PrivateKey_file
	cmp	w0, #1
	b.ne	LBB0_20
LBB0_19:
	ldurh	w0, [x29, #-58]
	mov	x1, x21
	bl	_dumb_https_server
	b	LBB0_16
LBB0_20:
Lloh62:
	adrp	x8, _stderr@GOTPAGE
Lloh63:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh64:
	ldr	w0, [x8]
	ldr	x2, [x19, #32]
Lloh65:
	adrp	x1, l_.str.9@PAGE
Lloh66:
	add	x1, x1, l_.str.9@PAGEOFF
	b	LBB0_14
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.loh AdrpAdd	Lloh54, Lloh55
	.loh AdrpLdrGotLdr	Lloh51, Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.cfi_endproc
                                        ; -- End function
	.comm	_NEVERBLEED_ERRBUF_SIZE,4,2     ; @NEVERBLEED_ERRBUF_SIZE
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"openssl_privsep_init: %s\n"

	.comm	_SSL_OP_ALL,4,2                 ; @SSL_OP_ALL
	.comm	_SSL_OP_NO_SSLv2,4,2            ; @SSL_OP_NO_SSLv2
	.comm	_SSL_OP_NO_SSLv3,4,2            ; @SSL_OP_NO_SSLv3
	.comm	_SSL_OP_NO_COMPRESSION,4,2      ; @SSL_OP_NO_COMPRESSION
l_.str.1:                               ; @.str.1
	.asciz	"Usage: %s <internal|privsep> <port> <certificate-chain-file> <private-key-file>\n"

l_.str.2:                               ; @.str.2
	.asciz	"internal"

l_.str.3:                               ; @.str.3
	.asciz	"privsep"

l_.str.4:                               ; @.str.4
	.asciz	"unknown mode:%s\n"

l_.str.5:                               ; @.str.5
	.asciz	"%hu"

l_.str.6:                               ; @.str.6
	.asciz	"failed to parse port:%s\n"

l_.str.7:                               ; @.str.7
	.asciz	"failed to load certificate chain file:%s\n"

l_.str.8:                               ; @.str.8
	.asciz	"failed to load private key from file:%s:%s\n"

	.comm	_SSL_FILETYPE_PEM,4,2           ; @SSL_FILETYPE_PEM
l_.str.9:                               ; @.str.9
	.asciz	"failed to load private key from file:%s\n"

.subsections_via_symbols
