	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tlsv1_add_cert
_tlsv1_add_cert:                        ## @tlsv1_add_cert
	.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	%rdx, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	_pem_cert_begin@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_search_tag
	movq	%rax, %r13
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testq	%r13, %r13
	je	LBB0_7
## %bb.1:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	addq	%r15, %rbx
	movq	_pem_cert_end@GOTPCREL(%rip), %r14
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rax
	movq	%rbx, %r15
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_os_strlen
	movslq	%eax, %rbx
	addq	%r13, %rbx
	movl	(%r14), %edi
	movl	%r15d, %edx
	subl	%ebx, %edx
	movq	%rbx, %rsi
	callq	_search_tag
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r15
	movl	%r15d, %esi
	subl	%ebx, %esi
	movq	%rbx, %rdi
	leaq	-64(%rbp), %rdx
	callq	_base64_decode
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r13
	movq	-64(%rbp), %rdx
	movq	%r12, %rdi
	movq	%rax, %rsi
	callq	_tlsv1_add_cert_der
	testq	%rax, %rax
	js	LBB0_10
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r13, %rdi
	callq	_os_free
	movl	(%r14), %edi
	callq	_os_strlen
	cltq
	addq	%rax, %r15
	movq	_pem_cert_begin@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	movl	%ebx, %edx
	subl	%r15d, %edx
	movq	%r15, %rsi
	callq	_search_tag
	movq	%rax, %r13
	testq	%rax, %rax
	jne	LBB0_2
## %bb.6:
	xorl	%eax, %eax
	jmp	LBB0_12
LBB0_7:
	leaq	L_.str(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_tlsv1_add_cert_der
	jmp	LBB0_12
LBB0_8:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_11
LBB0_9:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_11
LBB0_10:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r13, %rdi
	callq	_os_free
LBB0_11:
	movl	$-1, %eax
LBB0_12:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_pem_cert_begin,4,2             ## @pem_cert_begin
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TLSv1: No PEM certificate tag found - assume DER format"

L_.str.1:                               ## @.str.1
	.asciz	"TLSv1: Converting PEM format certificate into DER format"

	.comm	_pem_cert_end,4,2               ## @pem_cert_end
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
L_.str.2:                               ## @.str.2
	.asciz	"TLSv1: Could not find PEM certificate end tag (%s)"

L_.str.3:                               ## @.str.3
	.asciz	"TLSv1: Could not decode PEM certificate"

L_.str.4:                               ## @.str.4
	.asciz	"TLSv1: Failed to parse PEM certificate after DER conversion"

	.no_dead_strip	_tlsv1_add_cert
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tlsv1_add_cert
_tlsv1_add_cert:                        ; @tlsv1_add_cert
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _pem_cert_begin@GOTPAGE
Lloh1:
	ldr	x23, [x23, _pem_cert_begin@GOTPAGEOFF]
	ldr	w0, [x23]
	bl	_search_tag
	mov	x22, x0
Lloh2:
	adrp	x8, _MSG_DEBUG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_DEBUG@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	cbz	x22, LBB0_6
; %bb.1:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	add	x25, x21, x20
Lloh7:
	adrp	x24, _pem_cert_end@GOTPAGE
Lloh8:
	ldr	x24, [x24, _pem_cert_end@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x23]
	bl	_os_strlen
	add	x21, x22, w0, sxtw
	ldr	w0, [x24]
	sub	w2, w25, w21
	mov	x1, x21
	bl	_search_tag
	cbz	x0, LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x20, x0
	sub	w1, w20, w21
	add	x2, sp, #8
	mov	x0, x21
	bl	_base64_decode
	cbz	x0, LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x21, x0
	ldr	x2, [sp, #8]
	mov	x0, x19
	mov	x1, x21
	bl	_tlsv1_add_cert_der
	tbnz	x0, #63, LBB0_10
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_os_free
	ldr	w0, [x24]
	bl	_os_strlen
	add	x1, x20, w0, sxtw
	ldr	w0, [x23]
	sub	w2, w25, w1
	bl	_search_tag
	mov	x22, x0
	cbnz	x0, LBB0_2
	b	LBB0_12
LBB0_6:
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	mov	x0, x19
	mov	x1, x21
	mov	x2, x20
	bl	_tlsv1_add_cert_der
	b	LBB0_12
LBB0_7:
Lloh11:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh12:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	ldr	w8, [x24]
	str	x8, [sp]
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh16:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
Lloh19:
	adrp	x1, l_.str.3@PAGE
Lloh20:
	add	x1, x1, l_.str.3@PAGEOFF
LBB0_9:
	bl	_wpa_printf
	b	LBB0_11
LBB0_10:
Lloh21:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
Lloh24:
	adrp	x1, l_.str.4@PAGE
Lloh25:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	mov	x0, x21
	bl	_os_free
LBB0_11:
	mov	w0, #-1
LBB0_12:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_pem_cert_begin,4,2             ; @pem_cert_begin
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TLSv1: No PEM certificate tag found - assume DER format"

l_.str.1:                               ; @.str.1
	.asciz	"TLSv1: Converting PEM format certificate into DER format"

	.comm	_pem_cert_end,4,2               ; @pem_cert_end
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
l_.str.2:                               ; @.str.2
	.asciz	"TLSv1: Could not find PEM certificate end tag (%s)"

l_.str.3:                               ; @.str.3
	.asciz	"TLSv1: Could not decode PEM certificate"

l_.str.4:                               ; @.str.4
	.asciz	"TLSv1: Failed to parse PEM certificate after DER conversion"

	.no_dead_strip	_tlsv1_add_cert
.subsections_via_symbols
