	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function tncs_load_imv
_tncs_load_imv:                         ## @tncs_load_imv
	.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
	movq	%rdi, %rbx
	movq	(%rdi), %rcx
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	testq	%rcx, %rcx
	je	LBB0_1
## %bb.2:
	movl	8(%rbx), %edx
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	(%rbx), %rdi
	movq	_RTLD_LAZY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_dlopen
	movq	%rax, 16(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_tncs_imv_resolve_funcs
	testq	%rax, %rax
	js	LBB0_5
## %bb.6:
	movq	%rbx, %rdi
	callq	_tncs_imv_initialize
	testq	%rax, %rax
	js	LBB0_8
## %bb.7:
	movq	%rbx, %rdi
	callq	_tncs_imv_provide_bind_function
	movq	%rax, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	jns	LBB0_11
LBB0_8:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_9
LBB0_1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_9
LBB0_3:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movl	8(%rbx), %r15d
	movq	(%rbx), %rbx
	xorl	%eax, %eax
	callq	_dlerror
	leaq	L_.str.2(%rip), %rsi
	movl	%r14d, %edi
	movl	%r15d, %edx
	movq	%rbx, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_10
LBB0_5:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.3(%rip), %rsi
LBB0_9:
	xorl	%eax, %eax
	callq	_wpa_printf
LBB0_10:
	movl	$-1, %eax
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"TNC: No IMV configured"

L_.str.1:                               ## @.str.1
	.asciz	"TNC: Opening IMV: %s (%s)"

	.comm	_RTLD_LAZY,4,2                  ## @RTLD_LAZY
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"TNC: Failed to open IMV '%s' (%s): %s"

L_.str.3:                               ## @.str.3
	.asciz	"TNC: Failed to resolve IMV functions"

L_.str.4:                               ## @.str.4
	.asciz	"TNC: Failed to initialize IMV"

	.no_dead_strip	_tncs_load_imv
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function tncs_load_imv
_tncs_load_imv:                         ; @tncs_load_imv
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MSG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x9]
	cbz	x8, LBB0_6
; %bb.1:
	ldr	w9, [x19, #8]
	stp	x9, x8, [sp]
Lloh3:
	adrp	x1, l_.str.1@PAGE
Lloh4:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_wpa_printf
	ldr	x0, [x19]
Lloh5:
	adrp	x8, _RTLD_LAZY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RTLD_LAZY@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	bl	_dlopen
	str	x0, [x19, #16]
	cbz	x0, LBB0_7
; %bb.2:
	mov	x0, x19
	bl	_tncs_imv_resolve_funcs
	tbnz	x0, #63, LBB0_8
; %bb.3:
	mov	x0, x19
	bl	_tncs_imv_initialize
	tbnz	x0, #63, LBB0_9
; %bb.4:
	mov	x0, x19
	bl	_tncs_imv_provide_bind_function
	tbnz	x0, #63, LBB0_9
; %bb.5:
	mov	w0, #0
	b	LBB0_11
LBB0_6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_10
LBB0_7:
Lloh10:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh12:
	ldr	w20, [x8]
	ldr	x21, [x19]
	ldr	w19, [x19, #8]
	bl	_dlerror
                                        ; kill: def $w0 killed $w0 def $x0
	stp	x21, x0, [sp, #8]
	str	x19, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	b	LBB0_10
LBB0_8:
Lloh15:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
Lloh18:
	adrp	x1, l_.str.3@PAGE
Lloh19:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_10
LBB0_9:
Lloh20:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh22:
	ldr	w0, [x8]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_10:
	bl	_wpa_printf
	mov	w0, #-1
LBB0_11:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"TNC: No IMV configured"

l_.str.1:                               ; @.str.1
	.asciz	"TNC: Opening IMV: %s (%s)"

	.comm	_RTLD_LAZY,4,2                  ; @RTLD_LAZY
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"TNC: Failed to open IMV '%s' (%s): %s"

l_.str.3:                               ; @.str.3
	.asciz	"TNC: Failed to resolve IMV functions"

l_.str.4:                               ; @.str.4
	.asciz	"TNC: Failed to initialize IMV"

	.no_dead_strip	_tncs_load_imv
.subsections_via_symbols
