	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%eax, %eax
	callq	_SSL_library_init
	xorl	%eax, %eax
	callq	_SSL_load_error_strings
	xorl	%eax, %eax
	callq	_RAND_status
	cmpl	$1, %eax
	jne	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	callq	_TLSv1_client_method
	movl	%eax, %edi
	callq	_SSL_CTX_new
	movq	%rax, %rbx
	movq	_SSL_VERIFY_PEER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_SSL_CTX_set_verify
	movq	_TRUSTED_CA_PATHNAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	_SSL_CTX_load_verify_locations
	cmpl	$1, %eax
	jne	LBB0_3
## %bb.4:
	movq	_SECURE_CIPHER_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_SSL_CTX_set_cipher_list
	cmpl	$1, %eax
	jne	LBB0_18
## %bb.5:
	movq	%rbx, %rdi
	callq	_BIO_new_ssl_connect
	movq	%rax, %r14
	leaq	-32(%rbp), %rsi
	movq	%rax, %rdi
	callq	_BIO_get_ssl
	cmpq	$0, -32(%rbp)
	je	LBB0_6
## %bb.7:
	movq	_TARGET_SERVER@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_BIO_set_conn_hostname
	movq	-32(%rbp), %rdi
	callq	_SSL_do_handshake
	movq	-32(%rbp), %rdi
	testq	%rax, %rax
	jle	LBB0_8
## %bb.11:
	callq	_SSL_get_peer_certificate
	testq	%rax, %rax
	je	LBB0_16
## %bb.12:
	movq	%rax, %r15
	movq	_TARGET_HOST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r15, %rsi
	callq	_validate_hostname
	movq	_MatchFound@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.14:
	movq	%r14, %rdi
	callq	_send_http_get_and_print
	jmp	LBB0_15
LBB0_1:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_19
LBB0_3:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_18
LBB0_6:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
	jmp	LBB0_17
LBB0_8:
	callq	_SSL_get_verify_result
	movq	_X509_V_OK@GOTPCREL(%rip), %rcx
	movq	_stderr@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r15d
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.10:
	movl	%r15d, %edi
	callq	_ERR_print_errors_fp
	jmp	LBB0_17
LBB0_13:
	movq	_stderr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_15:
	movq	%r15, %rdi
	callq	_X509_free
LBB0_16:
	movq	%r14, %rdi
	callq	_BIO_ssl_shutdown
	jmp	LBB0_17
LBB0_9:
	movq	%rax, %rdi
	callq	_X509_verify_cert_error_string
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_fprintf
LBB0_17:
	movq	%r14, %rdi
	callq	_BIO_free_all
LBB0_18:
	movq	%rbx, %rdi
	callq	_SSL_CTX_free
LBB0_19:
	xorl	%eax, %eax
	callq	_EVP_cleanup
	xorl	%eax, %eax
	callq	_ERR_free_strings
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_stderr,4,2                     ## @stderr
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"OpenSSL PRNG not seeded with enough data."

	.comm	_SSL_VERIFY_PEER,4,2            ## @SSL_VERIFY_PEER
	.comm	_TRUSTED_CA_PATHNAME,4,2        ## @TRUSTED_CA_PATHNAME
L_.str.1:                               ## @.str.1
	.asciz	"Couldn't load certificate trust store.\n"

	.comm	_SECURE_CIPHER_LIST,4,2         ## @SECURE_CIPHER_LIST
L_.str.2:                               ## @.str.2
	.asciz	"Can't locate SSL pointer\n"

	.comm	_TARGET_SERVER,4,2              ## @TARGET_SERVER
	.comm	_X509_V_OK,8,3                  ## @X509_V_OK
L_.str.3:                               ## @.str.3
	.asciz	"Certificate chain validation failed: %s\n"

	.comm	_TARGET_HOST,4,2                ## @TARGET_HOST
	.comm	_MatchFound,8,3                 ## @MatchFound
L_.str.4:                               ## @.str.4
	.asciz	"Hostname validation failed.\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:
	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
	bl	_SSL_library_init
	bl	_SSL_load_error_strings
	bl	_RAND_status
	cmp	w0, #1
	b.ne	LBB0_8
; %bb.1:
	bl	_TLSv1_client_method
	bl	_SSL_CTX_new
	mov	x19, x0
Lloh0:
	adrp	x8, _SSL_VERIFY_PEER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _SSL_VERIFY_PEER@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, #0
	bl	_SSL_CTX_set_verify
Lloh3:
	adrp	x8, _TRUSTED_CA_PATHNAME@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TRUSTED_CA_PATHNAME@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, #0
	bl	_SSL_CTX_load_verify_locations
	cmp	w0, #1
	b.ne	LBB0_9
; %bb.2:
Lloh6:
	adrp	x8, _SECURE_CIPHER_LIST@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SECURE_CIPHER_LIST@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_SSL_CTX_set_cipher_list
	cmp	w0, #1
	b.ne	LBB0_19
; %bb.3:
	mov	x0, x19
	bl	_BIO_new_ssl_connect
	mov	x20, x0
	add	x1, sp, #8
	bl	_BIO_get_ssl
	ldr	x8, [sp, #8]
	cbz	x8, LBB0_10
; %bb.4:
Lloh9:
	adrp	x8, _TARGET_SERVER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TARGET_SERVER@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_BIO_set_conn_hostname
	ldr	x0, [sp, #8]
	bl	_SSL_do_handshake
	mov	x8, x0
	ldr	x0, [sp, #8]
	cmp	x8, #0
	b.le	LBB0_11
; %bb.5:
	bl	_SSL_get_peer_certificate
	cbz	x0, LBB0_15
; %bb.6:
	mov	x21, x0
Lloh12:
	adrp	x8, _TARGET_HOST@GOTPAGE
Lloh13:
	ldr	x8, [x8, _TARGET_HOST@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_validate_hostname
Lloh15:
	adrp	x8, _MatchFound@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MatchFound@GOTPAGEOFF]
Lloh17:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_13
; %bb.7:
	mov	x0, x20
	bl	_send_http_get_and_print
	b	LBB0_14
LBB0_8:
Lloh18:
	adrp	x8, _stderr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fprintf
	b	LBB0_20
LBB0_9:
Lloh23:
	adrp	x8, _stderr@GOTPAGE
Lloh24:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
Lloh26:
	adrp	x1, l_.str.1@PAGE
Lloh27:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_fprintf
	b	LBB0_19
LBB0_10:
Lloh28:
	adrp	x8, _stderr@GOTPAGE
Lloh29:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh30:
	ldr	w0, [x8]
Lloh31:
	adrp	x1, l_.str.2@PAGE
Lloh32:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_11:
	bl	_SSL_get_verify_result
Lloh33:
	adrp	x8, _X509_V_OK@GOTPAGE
Lloh34:
	ldr	x8, [x8, _X509_V_OK@GOTPAGEOFF]
Lloh35:
	ldr	x8, [x8]
Lloh36:
	adrp	x9, _stderr@GOTPAGE
Lloh37:
	ldr	x9, [x9, _stderr@GOTPAGEOFF]
Lloh38:
	ldr	w21, [x9]
	cmp	x0, x8
	b.ne	LBB0_16
; %bb.12:
	mov	x0, x21
	bl	_ERR_print_errors_fp
	b	LBB0_18
LBB0_13:
Lloh39:
	adrp	x8, _stderr@GOTPAGE
Lloh40:
	ldr	x8, [x8, _stderr@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
Lloh42:
	adrp	x1, l_.str.4@PAGE
Lloh43:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_fprintf
LBB0_14:
	mov	x0, x21
	bl	_X509_free
LBB0_15:
	mov	x0, x20
	bl	_BIO_ssl_shutdown
	b	LBB0_18
LBB0_16:
	bl	_X509_verify_cert_error_string
	str	x0, [sp]
Lloh44:
	adrp	x1, l_.str.3@PAGE
Lloh45:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
LBB0_17:
	bl	_fprintf
LBB0_18:
	mov	x0, x20
	bl	_BIO_free_all
LBB0_19:
	mov	x0, x19
	bl	_SSL_CTX_free
LBB0_20:
	bl	_EVP_cleanup
	bl	_ERR_free_strings
	mov	w0, #0
	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	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpAdd	Lloh44, Lloh45
	.cfi_endproc
                                        ; -- End function
	.comm	_stderr,4,2                     ; @stderr
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"OpenSSL PRNG not seeded with enough data."

	.comm	_SSL_VERIFY_PEER,4,2            ; @SSL_VERIFY_PEER
	.comm	_TRUSTED_CA_PATHNAME,4,2        ; @TRUSTED_CA_PATHNAME
l_.str.1:                               ; @.str.1
	.asciz	"Couldn't load certificate trust store.\n"

	.comm	_SECURE_CIPHER_LIST,4,2         ; @SECURE_CIPHER_LIST
l_.str.2:                               ; @.str.2
	.asciz	"Can't locate SSL pointer\n"

	.comm	_TARGET_SERVER,4,2              ; @TARGET_SERVER
	.comm	_X509_V_OK,8,3                  ; @X509_V_OK
l_.str.3:                               ; @.str.3
	.asciz	"Certificate chain validation failed: %s\n"

	.comm	_TARGET_HOST,4,2                ; @TARGET_HOST
	.comm	_MatchFound,8,3                 ; @MatchFound
l_.str.4:                               ; @.str.4
	.asciz	"Hostname validation failed.\n"

.subsections_via_symbols
