	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tlsv1_set_key_pem
_tlsv1_set_key_pem:                     ## @tlsv1_set_key_pem
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	_pem_key_begin@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_search_tag
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	%rax, %rbx
	movq	(%r14), %rdi
	callq	_os_strlen
	cltq
	leaq	(%rbx,%rax,4), %r14
	movq	_pem_key_end@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	(%r12,%r15,4), %rdx
	subq	%r14, %rdx
	shrq	$2, %rdx
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_search_tag
	testq	%rax, %rax
	je	LBB0_12
## %bb.2:
	movq	%rax, %rbx
	subq	%r14, %rbx
	shrq	$2, %rbx
	leaq	L_.str(%rip), %rdi
	movq	%r14, %rsi
	movl	%ebx, %edx
	callq	_search_tag
	testq	%rax, %rax
	je	LBB0_7
## %bb.3:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_12
LBB0_4:
	movq	_pem_key2_begin@GOTPCREL(%rip), %r14
	movq	(%r14), %rdi
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_search_tag
	testq	%rax, %rax
	je	LBB0_12
## %bb.5:
	movq	%rax, %rbx
	movq	(%r14), %rdi
	callq	_os_strlen
	cltq
	leaq	(%rbx,%rax,4), %r14
	movq	_pem_key2_end@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	leaq	(%r12,%r15,4), %rdx
	subq	%r14, %rdx
	shrq	$2, %rdx
	movq	%r14, %rsi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_search_tag
	testq	%rax, %rax
	je	LBB0_12
## %bb.6:
	movq	%rax, %rbx
	subq	%r14, %rbx
	shrq	$2, %rbx
LBB0_7:
	leaq	-40(%rbp), %rdx
	movq	%r14, %rdi
	movl	%ebx, %esi
	callq	_base64_decode
	testq	%rax, %rax
	je	LBB0_12
## %bb.8:
	movq	%rax, %r14
	movq	-40(%rbp), %rsi
	movq	%rax, %rdi
	xorl	%edx, %edx
	callq	_crypto_private_key_import
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_os_free
	jmp	LBB0_13
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movq	%rbx, %rax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pem_key_begin,8,3              ## @pem_key_begin
	.comm	_pem_key2_begin,8,3             ## @pem_key2_begin
	.comm	_pem_key2_end,8,3               ## @pem_key2_end
	.comm	_pem_key_end,8,3                ## @pem_key_end
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Proc-Type: 4,ENCRYPTED"

	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"TLSv1: Unsupported private key format (Proc-Type/DEK-Info)"

	.no_dead_strip	_tlsv1_set_key_pem
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tlsv1_set_key_pem
_tlsv1_set_key_pem:                     ; @tlsv1_set_key_pem
	.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _pem_key_begin@GOTPAGE
Lloh1:
	ldr	x22, [x22, _pem_key_begin@GOTPAGEOFF]
	ldr	x0, [x22]
	mov	x1, x21
	mov	x2, x20
	bl	_search_tag
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	x0, [x22]
	bl	_os_strlen
	add	x19, x19, w0, sxtw #2
Lloh2:
	adrp	x8, _pem_key_end@GOTPAGE
Lloh3:
	ldr	x8, [x8, _pem_key_end@GOTPAGEOFF]
Lloh4:
	ldr	x0, [x8]
	add	x8, x21, x20, lsl #2
	sub	x8, x8, x19
	lsr	x2, x8, #2
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_search_tag
	cbz	x0, LBB0_9
; %bb.2:
	sub	x8, x0, x19
	lsr	x20, x8, #2
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x19
	mov	x2, x20
	bl	_search_tag
	cbz	x0, LBB0_7
; %bb.3:
Lloh7:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh8:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	b	LBB0_9
LBB0_4:
Lloh12:
	adrp	x22, _pem_key2_begin@GOTPAGE
Lloh13:
	ldr	x22, [x22, _pem_key2_begin@GOTPAGEOFF]
	ldr	x0, [x22]
	mov	x1, x21
	mov	x2, x20
	bl	_search_tag
	mov	x19, x0
	cbz	x0, LBB0_10
; %bb.5:
	ldr	x0, [x22]
	bl	_os_strlen
	add	x19, x19, w0, sxtw #2
Lloh14:
	adrp	x8, _pem_key2_end@GOTPAGE
Lloh15:
	ldr	x8, [x8, _pem_key2_end@GOTPAGEOFF]
Lloh16:
	ldr	x0, [x8]
	add	x8, x21, x20, lsl #2
	sub	x8, x8, x19
	lsr	x2, x8, #2
	mov	x1, x19
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_search_tag
	cbz	x0, LBB0_9
; %bb.6:
	sub	x8, x0, x19
	lsr	x20, x8, #2
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
LBB0_7:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x20
	bl	_base64_decode
	cbz	x0, LBB0_9
; %bb.8:
	mov	x20, x0
	ldr	x1, [sp, #8]
	mov	x2, #0
	bl	_crypto_private_key_import
	mov	x19, x0
	mov	x0, x20
	bl	_os_free
	b	LBB0_10
LBB0_9:
	mov	x19, #0
LBB0_10:
	mov	x0, x19
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_pem_key_begin,8,3              ; @pem_key_begin
	.comm	_pem_key2_begin,8,3             ; @pem_key2_begin
	.comm	_pem_key2_end,8,3               ; @pem_key2_end
	.comm	_pem_key_end,8,3                ; @pem_key_end
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Proc-Type: 4,ENCRYPTED"

	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"TLSv1: Unsupported private key format (Proc-Type/DEK-Info)"

	.no_dead_strip	_tlsv1_set_key_pem
.subsections_via_symbols
