	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenAdapterHandle              ## -- Begin function OpenAdapterHandle
	.p2align	4, 0x90
_OpenAdapterHandle:                     ## @OpenAdapterHandle
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r13
	movq	%rsi, %rbx
	movq	%rdi, %r14
	xorl	%eax, %eax
	callq	_OpenDriverHandle
	movq	%rax, %r12
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rax
	movq	_FALSE@GOTPCREL(%rip), %r15
	cmpq	(%rax), %r12
	je	LBB0_20
## %bb.1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	$4100, %edx                     ## imm = 0x1004
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r13
	movq	%r14, 32(%rax)
	movq	_IOCTL_NDISUIO_QUERY_BINDING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-72(%rbp), %r14
	movl	$4100, %ecx                     ## imm = 0x1004
	movl	$4100, %r9d                     ## imm = 0x1004
	movq	%r12, %rdi
	movq	%r13, %rdx
	movq	%r13, %r8
	pushq	$0
	pushq	%r14
	callq	_DeviceIoControl
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	_IOCTL_NDISUIO_OPEN_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	%r13d, %rax
	leaq	(%rax,%rax,4), %rdx
	shlq	$3, %rdx
	addq	24(%r13), %rdx
	movq	(%r13), %rcx
	movq	%r12, %rdi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$0
	pushq	%r14
	callq	_DeviceIoControl
	addq	$16, %rsp
	testq	%rax, %rax
	je	LBB0_4
## %bb.6:
	movq	%r12, %r14
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	$4, -48(%rbp)
	leaq	-48(%rbp), %r15
	movq	_ERROR_INSUFFICIENT_BUFFER@GOTPCREL(%rip), %r12
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	testq	%rbx, %rbx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_HeapFree
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movq	-48(%rbp), %rdx
	movl	%eax, %edi
	xorl	%esi, %esi
	callq	_HeapAlloc
	testq	%rax, %rax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r15, %rsi
	callq	_GetInterfaceInfo
	cmpq	(%r12), %rax
	je	LBB0_7
## %bb.12:
	movq	_NO_ERROR@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.13:
	cmpq	$0, 8(%rbx)
	movq	-56(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_18
## %bb.14:
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	leal	(%r13,%r13,4), %edi
	shll	$3, %edi
	addl	24(%r13), %edi
	movq	16(%rbx), %rax
	movl	(%rax,%r15,4), %esi
	callq	_wcsstr
	testq	%rax, %rax
	jne	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%r15
	cmpq	8(%rbx), %r15
	jb	LBB0_15
LBB0_18:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_HeapFree
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	jmp	LBB0_19
LBB0_4:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_HeapFree
LBB0_2:
	movq	%r12, %rdi
	callq	_CloseHandle
	jmp	LBB0_20
LBB0_10:
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
LBB0_19:
	callq	_HeapFree
	movq	%r14, %rdi
	callq	_CloseHandle
	movq	_FALSE@GOTPCREL(%rip), %r15
LBB0_20:
	movq	(%r15), %rax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	16(%rbx), %rax
	movl	(%rax,%r15,4), %eax
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	%r14, (%r12)
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%r13, %rdx
	callq	_HeapFree
	xorl	%eax, %eax
	callq	_GetProcessHeap
	movl	%eax, %edi
	xorl	%esi, %esi
	movq	%rbx, %rdx
	callq	_HeapFree
	movq	_TRUE@GOTPCREL(%rip), %r15
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_FALSE,8,3                      ## @FALSE
	.comm	_IOCTL_NDISUIO_QUERY_BINDING,4,2 ## @IOCTL_NDISUIO_QUERY_BINDING
	.comm	_IOCTL_NDISUIO_OPEN_DEVICE,4,2  ## @IOCTL_NDISUIO_OPEN_DEVICE
	.comm	_ERROR_INSUFFICIENT_BUFFER,8,3  ## @ERROR_INSUFFICIENT_BUFFER
	.comm	_NO_ERROR,8,3                   ## @NO_ERROR
	.comm	_TRUE,8,3                       ## @TRUE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_OpenAdapterHandle              ; -- Begin function OpenAdapterHandle
	.p2align	2
_OpenAdapterHandle:                     ; @OpenAdapterHandle
	.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	x22, x2
	mov	x21, x1
	mov	x23, x0
	bl	_OpenDriverHandle
Lloh0:
	adrp	x8, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_18
; %bb.1:
	mov	x19, x0
	bl	_GetProcessHeap
	mov	w1, #0
	mov	w2, #4100
	bl	_HeapAlloc
	cbz	x0, LBB0_17
; %bb.2:
	mov	x20, x0
	str	x23, [x0, #32]
Lloh3:
	adrp	x8, _IOCTL_NDISUIO_QUERY_BINDING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _IOCTL_NDISUIO_QUERY_BINDING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	add	x6, sp, #8
	mov	x0, x19
	mov	x2, x20
	mov	w3, #4100
	mov	x4, x20
	mov	w5, #4100
	mov	x7, #0
	bl	_DeviceIoControl
	cbz	x0, LBB0_15
; %bb.3:
Lloh6:
	adrp	x8, _IOCTL_NDISUIO_OPEN_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _IOCTL_NDISUIO_OPEN_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	x8, [x20, #24]
	mov	w9, #40
	smaddl	x2, w20, w9, x8
	ldr	x3, [x20]
	add	x6, sp, #8
	mov	x0, x19
	mov	x4, #0
	mov	x5, #0
	mov	x7, #0
	bl	_DeviceIoControl
	cbz	x0, LBB0_15
; %bb.4:
	mov	x23, #0
	sxtw	x24, w20
	mov	w8, #4
	str	x8, [sp]
Lloh9:
	adrp	x25, _ERROR_INSUFFICIENT_BUFFER@GOTPAGE
Lloh10:
	ldr	x25, [x25, _ERROR_INSUFFICIENT_BUFFER@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	cbz	x23, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x23
	bl	_HeapFree
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	bl	_GetProcessHeap
	ldr	x2, [sp]
	mov	w1, #0
	bl	_HeapAlloc
	cbz	x0, LBB0_15
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x23, x0
	mov	x1, sp
	bl	_GetInterfaceInfo
	ldr	x8, [x25]
	cmp	x0, x8
	b.eq	LBB0_5
; %bb.9:
Lloh11:
	adrp	x8, _NO_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _NO_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_14
; %bb.10:
	ldr	x8, [x23, #8]
	cbz	x8, LBB0_14
; %bb.11:
	mov	x25, #0
	mov	w26, #40
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, #24]
	madd	w0, w24, w26, w8
	ldr	x8, [x23, #16]
	ldr	w1, [x8, x25, lsl #2]
	bl	_wcsstr
	cbnz	x0, LBB0_20
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x25, x25, #1
	ldr	x8, [x23, #8]
	cmp	x25, x8
	b.lo	LBB0_12
LBB0_14:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_HeapFree
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x23
	b	LBB0_16
LBB0_15:
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
LBB0_16:
	bl	_HeapFree
LBB0_17:
	mov	x0, x19
	bl	_CloseHandle
LBB0_18:
Lloh14:
	adrp	x8, _FALSE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
LBB0_19:
	ldr	x0, [x8]
	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
LBB0_20:
	ldr	x8, [x23, #16]
	ldr	w8, [x8, x25, lsl #2]
	str	w8, [x22]
	str	x19, [x21]
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x20
	bl	_HeapFree
	bl	_GetProcessHeap
	mov	w1, #0
	mov	x2, x23
	bl	_HeapFree
Lloh16:
	adrp	x8, _TRUE@GOTPAGE
Lloh17:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
	b	LBB0_19
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_FALSE,8,3                      ; @FALSE
	.comm	_IOCTL_NDISUIO_QUERY_BINDING,4,2 ; @IOCTL_NDISUIO_QUERY_BINDING
	.comm	_IOCTL_NDISUIO_OPEN_DEVICE,4,2  ; @IOCTL_NDISUIO_OPEN_DEVICE
	.comm	_ERROR_INSUFFICIENT_BUFFER,8,3  ; @ERROR_INSUFFICIENT_BUFFER
	.comm	_NO_ERROR,8,3                   ; @NO_ERROR
	.comm	_TRUE,8,3                       ; @TRUE
.subsections_via_symbols
