	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function eap_tls_init_connection
_eap_tls_init_connection:               ## @eap_tls_init_connection
	.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	%rcx, %rbx
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r14
	movl	(%rdx), %ecx
	testl	%ecx, %ecx
	je	LBB0_4
## %bb.1:
	movq	_TLS_CONN_REQUEST_OCSP@GOTPCREL(%rip), %rdx
	movl	(%rbx), %eax
	orl	(%rdx), %eax
	movl	%eax, (%rbx)
	cmpl	$2, %ecx
	jl	LBB0_4
## %bb.2:
	movq	_TLS_CONN_REQUIRE_OCSP@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%rbx)
	cmpl	$3, %ecx
	jne	LBB0_4
## %bb.3:
	movq	_TLS_CONN_REQUIRE_OCSP_ALL@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
LBB0_4:
	movl	8(%r13), %edi
	callq	_tls_connection_init
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movl	8(%r13), %edi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_tls_connection_set_params
	movl	%eax, %r12d
	movq	_TLS_SET_PARAMS_ENGINE_PRV_BAD_PIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_8
## %bb.7:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_wpa_printf
	movq	8(%r15), %rdi
	callq	_os_free
	movq	$0, 8(%r15)
	movq	%r14, %rdi
	callq	_eap_sm_request_pin
	jmp	LBB0_12
LBB0_5:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_16
LBB0_8:
	movq	_TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_10
## %bb.9:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_wpa_printf
	jmp	LBB0_13
LBB0_10:
	movq	_TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jne	LBB0_13
## %bb.11:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_wpa_printf
LBB0_12:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, (%r14)
LBB0_13:
	testl	%r12d, %r12d
	je	LBB0_14
## %bb.15:
	movq	_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	callq	_wpa_printf
	movl	8(%r13), %edi
	movq	(%r13), %rsi
	callq	_tls_connection_deinit
	movq	$0, (%r13)
LBB0_16:
	movl	$-1, %eax
	jmp	LBB0_17
LBB0_14:
	xorl	%eax, %eax
LBB0_17:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TLS_CONN_REQUEST_OCSP,4,2      ## @TLS_CONN_REQUEST_OCSP
	.comm	_TLS_CONN_REQUIRE_OCSP,4,2      ## @TLS_CONN_REQUIRE_OCSP
	.comm	_TLS_CONN_REQUIRE_OCSP_ALL,4,2  ## @TLS_CONN_REQUIRE_OCSP_ALL
	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SSL: Failed to initialize new TLS connection"

	.comm	_TLS_SET_PARAMS_ENGINE_PRV_BAD_PIN,4,2 ## @TLS_SET_PARAMS_ENGINE_PRV_BAD_PIN
L_.str.1:                               ## @.str.1
	.asciz	"TLS: Bad PIN provided, requesting a new one"

	.comm	_TRUE,8,3                       ## @TRUE
	.comm	_TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED,4,2 ## @TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED
L_.str.2:                               ## @.str.2
	.asciz	"TLS: Failed to initialize engine"

	.comm	_TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED,4,2 ## @TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED
L_.str.3:                               ## @.str.3
	.asciz	"TLS: Failed to load private key"

L_.str.4:                               ## @.str.4
	.asciz	"TLS: Failed to set TLS connection parameters"

	.no_dead_strip	_eap_tls_init_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function eap_tls_init_connection
_eap_tls_init_connection:               ; @eap_tls_init_connection
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x22, x3
	mov	x21, x2
	mov	x19, x1
	mov	x20, x0
	ldr	w8, [x2]
	cbz	w8, LBB0_4
; %bb.1:
Lloh0:
	adrp	x9, _TLS_CONN_REQUEST_OCSP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TLS_CONN_REQUEST_OCSP@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	ldr	w10, [x22]
	orr	w9, w10, w9
	str	w9, [x22]
	cmp	w8, #2
	b.lt	LBB0_4
; %bb.2:
Lloh3:
	adrp	x10, _TLS_CONN_REQUIRE_OCSP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _TLS_CONN_REQUIRE_OCSP@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	orr	w9, w9, w10
	str	w9, [x22]
	cmp	w8, #3
	b.ne	LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _TLS_CONN_REQUIRE_OCSP_ALL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TLS_CONN_REQUIRE_OCSP_ALL@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	orr	w8, w9, w8
	str	w8, [x22]
LBB0_4:
	ldr	w0, [x19, #8]
	bl	_tls_connection_init
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.5:
	mov	x1, x0
	ldr	w0, [x19, #8]
	mov	x2, x22
	bl	_tls_connection_set_params
	mov	x22, x0
Lloh9:
	adrp	x8, _TLS_SET_PARAMS_ENGINE_PRV_BAD_PIN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TLS_SET_PARAMS_ENGINE_PRV_BAD_PIN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_8
; %bb.6:
Lloh12:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x1, l_.str.1@PAGE
Lloh16:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	ldr	x0, [x21, #8]
	bl	_os_free
	str	xzr, [x21, #8]
	mov	x0, x20
	bl	_eap_sm_request_pin
	b	LBB0_12
LBB0_7:
Lloh17:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh18:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	adrp	x1, l_.str@PAGE
Lloh21:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
	b	LBB0_15
LBB0_8:
Lloh22:
	adrp	x8, _TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED@GOTPAGE
Lloh23:
	ldr	x8, [x8, _TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_10
; %bb.9:
Lloh25:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh27:
	ldr	w0, [x8]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	b	LBB0_13
LBB0_10:
Lloh30:
	adrp	x8, _TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED@GOTPAGE
Lloh31:
	ldr	x8, [x8, _TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	cmp	w22, w8
	b.ne	LBB0_13
; %bb.11:
Lloh33:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh35:
	ldr	w0, [x8]
Lloh36:
	adrp	x1, l_.str.3@PAGE
Lloh37:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_wpa_printf
LBB0_12:
Lloh38:
	adrp	x8, _TRUE@GOTPAGE
Lloh39:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh40:
	ldr	x8, [x8]
	str	x8, [x20]
LBB0_13:
	cbz	w22, LBB0_16
; %bb.14:
Lloh41:
	adrp	x8, _MSG_INFO@GOTPAGE
Lloh42:
	ldr	x8, [x8, _MSG_INFO@GOTPAGEOFF]
Lloh43:
	ldr	w0, [x8]
Lloh44:
	adrp	x1, l_.str.4@PAGE
Lloh45:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	ldr	w0, [x19, #8]
	ldr	x1, [x19]
	bl	_tls_connection_deinit
	str	xzr, [x19]
LBB0_15:
	mov	w0, #-1
	b	LBB0_17
LBB0_16:
	mov	w0, #0
LBB0_17:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpAdd	Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_TLS_CONN_REQUEST_OCSP,4,2      ; @TLS_CONN_REQUEST_OCSP
	.comm	_TLS_CONN_REQUIRE_OCSP,4,2      ; @TLS_CONN_REQUIRE_OCSP
	.comm	_TLS_CONN_REQUIRE_OCSP_ALL,4,2  ; @TLS_CONN_REQUIRE_OCSP_ALL
	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SSL: Failed to initialize new TLS connection"

	.comm	_TLS_SET_PARAMS_ENGINE_PRV_BAD_PIN,4,2 ; @TLS_SET_PARAMS_ENGINE_PRV_BAD_PIN
l_.str.1:                               ; @.str.1
	.asciz	"TLS: Bad PIN provided, requesting a new one"

	.comm	_TRUE,8,3                       ; @TRUE
	.comm	_TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED,4,2 ; @TLS_SET_PARAMS_ENGINE_PRV_INIT_FAILED
l_.str.2:                               ; @.str.2
	.asciz	"TLS: Failed to initialize engine"

	.comm	_TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED,4,2 ; @TLS_SET_PARAMS_ENGINE_PRV_VERIFY_FAILED
l_.str.3:                               ; @.str.3
	.asciz	"TLS: Failed to load private key"

l_.str.4:                               ; @.str.4
	.asciz	"TLS: Failed to set TLS connection parameters"

	.no_dead_strip	_eap_tls_init_connection
.subsections_via_symbols
