	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sec_parse_crypt_info
_sec_parse_crypt_info:                  ## @sec_parse_crypt_info
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r15
	movq	%rcx, %r13
	movq	%rdx, %r12
	movq	%rdi, %rbx
	movq	(%rsi), %rsi
	callq	_in_uint32_le
	movq	%rbx, %rdi
	callq	_in_uint32_le
	movq	%rbx, %rdi
	callq	_in_uint32_le
	movq	%rbx, %rdi
	callq	_in_uint32_le
	movq	(%r12), %rsi
	movq	%rbx, %rdi
	callq	_in_uint8p
	movq	(%rbx), %rax
	movq	_False@GOTPCREL(%rip), %r14
	cmpq	8(%rbx), %rax
	ja	LBB0_17
## %bb.1:
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_in_uint32_le
	leaq	L_.str.4(%rip), %rdi
	callq	_DEBUG_RDP5
	movq	%rbx, %rdi
	callq	_in_uint32_le
	movq	%rbx, %rdi
	callq	_in_uint32_le
	callq	_DEBUG_RDP5
	movq	(%rbx), %rdi
	callq	_rdssl_cert_read
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_in_uint8s
	testq	%r13, %r13
	je	LBB0_2
## %bb.4:
	movq	%rbx, %rdi
	callq	_in_uint32_le
	callq	_DEBUG_RDP5
	movq	(%rbx), %rdi
	callq	_rdssl_cert_read
	movq	%rax, %r12
	movq	%rbx, %rdi
	callq	_in_uint8s
	testq	%r12, %r12
	je	LBB0_5
## %bb.6:
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_rdssl_certs_ok
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:
	movq	%r13, %rdi
	callq	_rdssl_cert_free
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_in_uint8s
	movq	_g_server_public_key_len@GOTPCREL(%rip), %rbx
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_rdssl_cert_to_rkey
	testq	%rax, %rax
	je	LBB0_9
## %bb.10:
	movq	%rax, %r13
	movq	%r12, %rdi
	callq	_rdssl_cert_free
	movl	(%rbx), %esi
	movq	_SEC_MODULUS_SIZE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %esi
	jl	LBB0_12
## %bb.11:
	movq	_SEC_MAX_MODULUS_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	cmpl	%r8d, %esi
	jle	LBB0_13
LBB0_12:
	shll	$3, %esi
	leaq	L_.str.15(%rip), %rdi
	xorl	%eax, %eax
	callq	_error
LBB0_15:
	movq	%r13, %rdi
	callq	_rdssl_rkey_free
	jmp	LBB0_17
LBB0_2:
	leaq	L_.str.10(%rip), %rdi
	jmp	LBB0_3
LBB0_5:
	movq	%r13, %rdi
	callq	_rdssl_cert_free
	leaq	L_.str.12(%rip), %rdi
	jmp	LBB0_3
LBB0_7:
	movq	%r12, %rdi
	callq	_rdssl_cert_free
	movq	%r13, %rdi
	callq	_rdssl_cert_free
	leaq	L_.str.13(%rip), %rdi
LBB0_3:
	xorl	%eax, %eax
	callq	_error
LBB0_17:
	movl	(%r14), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_9:
	leaq	L_.str.14(%rip), %rdi
	callq	_DEBUG_RDP5
	movq	%r12, %rdi
	callq	_rdssl_cert_free
	jmp	LBB0_17
LBB0_13:
	movq	_SEC_EXPONENT_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	%r15, %rsi
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	callq	_rdssl_rkey_get_exp_mod
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	leaq	L_.str.16(%rip), %rdi
	xorl	%eax, %eax
	callq	_error
	jmp	LBB0_15
LBB0_16:
	movq	%r13, %rdi
	callq	_rdssl_rkey_free
	movq	_True@GOTPCREL(%rip), %r14
	jmp	LBB0_17
	.cfi_endproc
                                        ## -- End function
	.comm	_False,4,2                      ## @False
	.comm	_SEC_RANDOM_SIZE,8,3            ## @SEC_RANDOM_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str.4:                               ## @.str.4
	.asciz	"We're going for the RDP5-style encryption\n"

L_.str.10:                              ## @.str.10
	.asciz	"Couldn't load CA Certificate from server\n"

L_.str.12:                              ## @.str.12
	.asciz	"Couldn't load Certificate from server\n"

L_.str.13:                              ## @.str.13
	.asciz	"Security error CA Certificate invalid\n"

	.comm	_g_server_public_key_len,4,2    ## @g_server_public_key_len
L_.str.14:                              ## @.str.14
	.asciz	"Didn't parse X509 correctly\n"

	.comm	_SEC_MODULUS_SIZE,4,2           ## @SEC_MODULUS_SIZE
	.comm	_SEC_MAX_MODULUS_SIZE,4,2       ## @SEC_MAX_MODULUS_SIZE
L_.str.15:                              ## @.str.15
	.asciz	"Bad server public key size (%u bits)\n"

	.comm	_SEC_EXPONENT_SIZE,4,2          ## @SEC_EXPONENT_SIZE
L_.str.16:                              ## @.str.16
	.asciz	"Problem extracting RSA exponent, modulus"

	.comm	_True,4,2                       ## @True
	.comm	_stdout,4,2                     ## @stdout
	.no_dead_strip	_sec_parse_crypt_info
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sec_parse_crypt_info
_sec_parse_crypt_info:                  ; @sec_parse_crypt_info
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x4
	mov	x19, x3
	mov	x22, x2
	mov	x21, x0
	ldr	x1, [x1]
	bl	_in_uint32_le
	mov	x0, x21
	bl	_in_uint32_le
	mov	x0, x21
	bl	_in_uint32_le
	mov	x0, x21
	bl	_in_uint32_le
	ldr	x1, [x22]
	mov	x0, x21
	bl	_in_uint8p
	ldp	x8, x9, [x21]
	cmp	x8, x9
	b.hi	LBB0_13
; %bb.1:
	mov	x0, x21
	bl	_in_uint32_le
Lloh0:
	adrp	x0, l_.str.4@PAGE
Lloh1:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DEBUG_RDP5
	mov	x0, x21
	bl	_in_uint32_le
	mov	x0, x21
	bl	_in_uint32_le
	bl	_DEBUG_RDP5
	ldr	x0, [x21]
	bl	_rdssl_cert_read
	mov	x23, x0
	mov	x0, x21
	bl	_in_uint8s
	cbz	x23, LBB0_9
; %bb.2:
	mov	x0, x21
	bl	_in_uint32_le
	bl	_DEBUG_RDP5
	ldr	x0, [x21]
	bl	_rdssl_cert_read
	mov	x22, x0
	mov	x0, x21
	bl	_in_uint8s
	cbz	x22, LBB0_10
; %bb.3:
	mov	x0, x22
	mov	x1, x23
	bl	_rdssl_certs_ok
	cbz	w0, LBB0_11
; %bb.4:
	mov	x0, x23
	bl	_rdssl_cert_free
	mov	x0, x21
	mov	w1, #16
	bl	_in_uint8s
Lloh2:
	adrp	x23, _g_server_public_key_len@GOTPAGE
Lloh3:
	ldr	x23, [x23, _g_server_public_key_len@GOTPAGEOFF]
	mov	x0, x22
	mov	x1, x23
	bl	_rdssl_cert_to_rkey
	cbz	x0, LBB0_15
; %bb.5:
	mov	x21, x0
	mov	x0, x22
	bl	_rdssl_cert_free
	ldr	w8, [x23]
Lloh4:
	adrp	x9, _SEC_MODULUS_SIZE@GOTPAGE
Lloh5:
	ldr	x9, [x9, _SEC_MODULUS_SIZE@GOTPAGEOFF]
Lloh6:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_7
; %bb.6:
Lloh7:
	adrp	x9, _SEC_MAX_MODULUS_SIZE@GOTPAGE
Lloh8:
	ldr	x9, [x9, _SEC_MAX_MODULUS_SIZE@GOTPAGEOFF]
Lloh9:
	ldr	w4, [x9]
	cmp	w8, w4
	b.le	LBB0_16
LBB0_7:
	lsl	w8, w8, #3
	str	x8, [sp]
Lloh10:
	adrp	x0, l_.str.15@PAGE
Lloh11:
	add	x0, x0, l_.str.15@PAGEOFF
LBB0_8:
	bl	_error
	mov	x0, x21
	bl	_rdssl_rkey_free
	b	LBB0_13
LBB0_9:
Lloh12:
	adrp	x0, l_.str.10@PAGE
Lloh13:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_12
LBB0_10:
	mov	x0, x23
	bl	_rdssl_cert_free
Lloh14:
	adrp	x0, l_.str.12@PAGE
Lloh15:
	add	x0, x0, l_.str.12@PAGEOFF
	b	LBB0_12
LBB0_11:
	mov	x0, x22
	bl	_rdssl_cert_free
	mov	x0, x23
	bl	_rdssl_cert_free
Lloh16:
	adrp	x0, l_.str.13@PAGE
Lloh17:
	add	x0, x0, l_.str.13@PAGEOFF
LBB0_12:
	bl	_error
LBB0_13:
Lloh18:
	adrp	x8, _False@GOTPAGE
Lloh19:
	ldr	x8, [x8, _False@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
LBB0_15:
Lloh20:
	adrp	x0, l_.str.14@PAGE
Lloh21:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_DEBUG_RDP5
	mov	x0, x22
	bl	_rdssl_cert_free
	b	LBB0_13
LBB0_16:
Lloh22:
	adrp	x8, _SEC_EXPONENT_SIZE@GOTPAGE
Lloh23:
	ldr	x8, [x8, _SEC_EXPONENT_SIZE@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	x0, x21
	mov	x1, x20
	mov	x3, x19
	bl	_rdssl_rkey_get_exp_mod
	cbz	x0, LBB0_18
; %bb.17:
Lloh25:
	adrp	x0, l_.str.16@PAGE
Lloh26:
	add	x0, x0, l_.str.16@PAGEOFF
	b	LBB0_8
LBB0_18:
	mov	x0, x21
	bl	_rdssl_rkey_free
Lloh27:
	adrp	x8, _True@GOTPAGE
Lloh28:
	ldr	x8, [x8, _True@GOTPAGEOFF]
	b	LBB0_14
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_False,4,2                      ; @False
	.comm	_SEC_RANDOM_SIZE,8,3            ; @SEC_RANDOM_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str.4:                               ; @.str.4
	.asciz	"We're going for the RDP5-style encryption\n"

l_.str.10:                              ; @.str.10
	.asciz	"Couldn't load CA Certificate from server\n"

l_.str.12:                              ; @.str.12
	.asciz	"Couldn't load Certificate from server\n"

l_.str.13:                              ; @.str.13
	.asciz	"Security error CA Certificate invalid\n"

	.comm	_g_server_public_key_len,4,2    ; @g_server_public_key_len
l_.str.14:                              ; @.str.14
	.asciz	"Didn't parse X509 correctly\n"

	.comm	_SEC_MODULUS_SIZE,4,2           ; @SEC_MODULUS_SIZE
	.comm	_SEC_MAX_MODULUS_SIZE,4,2       ; @SEC_MAX_MODULUS_SIZE
l_.str.15:                              ; @.str.15
	.asciz	"Bad server public key size (%u bits)\n"

	.comm	_SEC_EXPONENT_SIZE,4,2          ; @SEC_EXPONENT_SIZE
l_.str.16:                              ; @.str.16
	.asciz	"Problem extracting RSA exponent, modulus"

	.comm	_True,4,2                       ; @True
	.comm	_stdout,4,2                     ; @stdout
	.no_dead_strip	_sec_parse_crypt_info
.subsections_via_symbols
