	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpa_driver_ndis_set_key
_wpa_driver_ndis_set_key:               ## @wpa_driver_ndis_set_key
	.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
	movl	%r9d, -56(%rbp)                 ## 4-byte Spill
	movl	%r8d, %r15d
	movq	%rcx, %rbx
	movl	%edx, -52(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	shlq	$3, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	testq	%rbx, %rbx
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_is_broadcast_ether_addr
	testq	%rax, %rax
	je	LBB0_4
LBB0_2:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_wpa_driver_ndis_get_bssid
	xorl	%r12d, %r12d
	movb	$1, %dl
	testq	%rax, %rax
	jns	LBB0_5
## %bb.3:
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$255, %esi
	callq	_os_memset
	movb	$1, %dl
	jmp	LBB0_5
LBB0_4:
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_os_memcpy
	movl	$1, %r12d
	xorl	%edx, %edx
LBB0_5:
	movq	40(%rbp), %r9
	testq	%r9, %r9
	je	LBB0_7
## %bb.6:
	movq	_WPA_ALG_NONE@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	je	LBB0_7
## %bb.8:
	movq	32(%rbp), %r8
	movq	_WPA_ALG_WEP@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_10
## %bb.9:
	movq	%r13, %rdi
	movl	%r12d, %esi
	movl	%r15d, %edx
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	callq	_wpa_driver_ndis_add_wep
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_7:
	movq	%r13, %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movl	%r12d, %r8d
	callq	_wpa_driver_ndis_remove_key
	movl	%eax, %ebx
	jmp	LBB0_26
LBB0_10:
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	leaq	32(%r9), %rbx
	movq	%rbx, %rdi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.12:
	movq	%rax, %r12
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	16(%rbp), %r13
	movq	%rbx, (%rax)
	movl	%r15d, %ecx
	orl	$-2147483648, %ecx              ## imm = 0x80000000
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	cmovel	%r15d, %ecx
	movl	%ecx, %eax
	orl	$1073741824, %eax               ## imm = 0x40000000
	cmpb	$0, -60(%rbp)                   ## 1-byte Folded Reload
	cmovnel	%ecx, %eax
	movl	%eax, 8(%r12)
	testq	%r13, %r13
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	je	LBB0_28
## %bb.13:
	movq	24(%rbp), %r15
	testq	%r15, %r15
	je	LBB0_28
## %bb.14:
	orl	$536870912, %eax                ## imm = 0x20000000
	movl	%eax, 8(%r12)
	movq	40(%rbp), %rax
	movq	%rax, 16(%r12)
	movq	40(%r12), %rdi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	movq	%r14, %rsi
	callq	_os_memcpy
	movq	24(%r12), %rdi
	leaq	-1(%r15), %rax
	movl	%r15d, %esi
	andl	$3, %esi
	cmpq	$3, %rax
	jae	LBB0_16
## %bb.15:
	xorl	%eax, %eax
	jmp	LBB0_18
LBB0_11:
	movl	$-1, %ebx
	jmp	LBB0_26
LBB0_28:
	movq	40(%rbp), %rbx
	movq	%rbx, 16(%r12)
	movq	40(%r12), %rdi
	movq	_ETH_ALEN@GOTPCREL(%rip), %rax
	movslq	(%rax), %rdx
	movq	%r14, %rsi
	callq	_os_memcpy
	movq	%rbx, %rdx
	jmp	LBB0_21
LBB0_16:
	andq	$-4, %r15
	movl	$16, %edx
	xorl	%eax, %eax
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movq	-16(%r13,%rdx), %rbx
	leal	-16(%rdx), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rbx
	orq	%rdi, %rbx
	movq	%rbx, 24(%r12)
	movq	-8(%r13,%rdx), %rdi
	leal	-8(%rdx), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rdi
	orq	%rbx, %rdi
	movq	%rdi, 24(%r12)
	movq	(%r13,%rdx), %rbx
	movl	%edx, %ecx
	shlq	%cl, %rbx
	orq	%rdi, %rbx
	movq	%rbx, 24(%r12)
	movq	8(%r13,%rdx), %rdi
	leal	8(%rdx), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	shlq	%cl, %rdi
	orq	%rbx, %rdi
	movq	%rdi, 24(%r12)
	addq	$4, %rax
	addq	$32, %rdx
	cmpq	%rax, %r15
	jne	LBB0_17
LBB0_18:
	testq	%rsi, %rsi
	movq	40(%rbp), %rdx
	je	LBB0_21
## %bb.19:
	shlq	$3, %rax
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13,%rax), %rbx
	movl	%eax, %ecx
	shlq	%cl, %rbx
	orq	%rbx, %rdi
	movq	%rdi, 24(%r12)
	addq	$8, %rax
	decq	%rsi
	jne	LBB0_20
LBB0_21:
	movq	32(%r12), %rdi
	cmpq	$32, %rdx
	jne	LBB0_24
## %bb.22:
	movq	_WPA_ALG_TKIP@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_24
## %bb.23:
	movl	$16, %edx
	movq	32(%rbp), %rbx
	movq	%rbx, %rsi
	callq	_os_memcpy
	movq	32(%r12), %rdi
	subq	$-128, %rdi
	leaq	192(%rbx), %rsi
	movl	$8, %edx
	callq	_os_memcpy
	movl	$192, %edi
	addq	32(%r12), %rdi
	subq	$-128, %rbx
	movl	$8, %edx
	movq	%rbx, %rsi
	jmp	LBB0_25
LBB0_24:
	movq	32(%rbp), %rsi
LBB0_25:
	callq	_os_memcpy
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdx
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rcx
	callq	_wpa_hexdump_key
	movq	_OID_802_11_ADD_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	movq	%r12, %rdx
	movq	%rbx, %rcx
	callq	_ndis_set_oid
	movl	%eax, %ebx
	movq	%r12, %rdi
	callq	_os_free
LBB0_26:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_29
## %bb.27:
	movl	%ebx, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_29:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_ETH_ALEN,4,2                   ## @ETH_ALEN
	.comm	_WPA_ALG_NONE,4,2               ## @WPA_ALG_NONE
	.comm	_WPA_ALG_WEP,4,2                ## @WPA_ALG_WEP
	.comm	_WPA_ALG_TKIP,4,2               ## @WPA_ALG_TKIP
	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NDIS: OID_802_11_ADD_KEY"

	.comm	_OID_802_11_ADD_KEY,4,2         ## @OID_802_11_ADD_KEY
	.no_dead_strip	_wpa_driver_ndis_set_key
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpa_driver_ndis_set_key
_wpa_driver_ndis_set_key:               ; @wpa_driver_ndis_set_key
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #32
	mov	x22, x7
	mov	x23, x6
	stur	w5, [x29, #-92]                 ; 4-byte Folded Spill
	mov	x28, x4
	mov	x24, x3
	mov	x21, x2
	mov	x19, x1
	ldr	x20, [x29, #24]
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x25, _ETH_ALEN@GOTPAGE
Lloh4:
	ldr	x25, [x25, _ETH_ALEN@GOTPAGEOFF]
	ldr	w8, [x25]
	lsl	x8, x8, #3
	mov	x9, x8
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0xffffffff0
	sub	x26, x9, x8
	mov	sp, x26
	cbz	x3, LBB0_2
; %bb.1:
	mov	x0, x24
	bl	_is_broadcast_ether_addr
	cbz	x0, LBB0_5
LBB0_2:
	mov	x0, x19
	mov	x1, x26
	bl	_wpa_driver_ndis_get_bssid
	tbz	x0, #63, LBB0_4
; %bb.3:
	ldr	w2, [x25]
	mov	x0, x26
	mov	w1, #255
	bl	_os_memset
LBB0_4:
	mov	w4, #0
	mov	w27, #1
	cbnz	x20, LBB0_6
	b	LBB0_9
LBB0_5:
	ldrsw	x2, [x25]
	mov	x0, x26
	mov	x1, x24
	bl	_os_memcpy
	mov	w27, #0
	mov	w4, #1
	cbz	x20, LBB0_9
LBB0_6:
Lloh7:
	adrp	x8, _WPA_ALG_NONE@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WPA_ALG_NONE@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w21
	b.eq	LBB0_9
; %bb.7:
	ldr	x9, [x29, #16]
Lloh10:
	adrp	x8, _WPA_ALG_WEP@GOTPAGE
Lloh11:
	ldr	x8, [x8, _WPA_ALG_WEP@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_10
; %bb.8:
	mov	x0, x19
	mov	x1, x4
	mov	x2, x28
	ldur	w3, [x29, #-92]                 ; 4-byte Folded Reload
	mov	x4, x9
	mov	x5, x20
	bl	_wpa_driver_ndis_add_wep
	mov	x19, x0
	b	LBB0_22
LBB0_9:
	mov	x0, x19
	mov	x1, x28
	mov	x2, x24
	mov	x3, x26
	bl	_wpa_driver_ndis_remove_key
	mov	x19, x0
	b	LBB0_22
LBB0_10:
	stur	x9, [x29, #-104]                ; 8-byte Folded Spill
	add	x25, x20, #32
	mov	x0, x25
	bl	_os_zalloc
	cbz	x0, LBB0_15
; %bb.11:
	mov	x24, x0
	stur	x25, [x29, #-112]               ; 8-byte Folded Spill
	str	x25, [x0]
	orr	w8, w28, #0x80000000
	ldur	w9, [x29, #-92]                 ; 4-byte Folded Reload
	cmp	w9, #0
	csel	w8, w28, w8, eq
	orr	w9, w8, #0x40000000
	cmp	w27, #0
	csel	w8, w8, w9, ne
	str	w8, [x0, #8]
	cbz	x23, LBB0_16
; %bb.12:
	cbz	x22, LBB0_16
; %bb.13:
	orr	w8, w8, #0x20000000
	str	w8, [x24, #8]
	str	x20, [x24, #16]
	ldr	x0, [x24, #40]
Lloh13:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh14:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh15:
	ldrsw	x2, [x8]
	mov	x1, x26
	bl	_os_memcpy
	mov	x8, #0
	ldr	x9, [x24, #24]
LBB0_14:                                ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x23, x8]
	lsl	x10, x10, x8
	orr	x9, x9, x10
	str	x9, [x24, #24]
	add	x8, x8, #8
	subs	x22, x22, #1
	b.ne	LBB0_14
	b	LBB0_17
LBB0_15:
	mov	w19, #-1
	b	LBB0_22
LBB0_16:
	str	x20, [x24, #16]
	ldr	x0, [x24, #40]
Lloh16:
	adrp	x8, _ETH_ALEN@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETH_ALEN@GOTPAGEOFF]
Lloh18:
	ldrsw	x2, [x8]
	mov	x1, x26
	bl	_os_memcpy
LBB0_17:
	ldr	x0, [x24, #32]
	cmp	x20, #32
	b.ne	LBB0_20
; %bb.18:
Lloh19:
	adrp	x8, _WPA_ALG_TKIP@GOTPAGE
Lloh20:
	ldr	x8, [x8, _WPA_ALG_TKIP@GOTPAGEOFF]
Lloh21:
	ldr	w8, [x8]
	cmp	w8, w21
	b.ne	LBB0_20
; %bb.19:
	ldur	x20, [x29, #-104]               ; 8-byte Folded Reload
	mov	x1, x20
	mov	w2, #16
	bl	_os_memcpy
	ldr	x8, [x24, #32]
	add	x0, x8, #128
	add	x1, x20, #192
	mov	w2, #8
	bl	_os_memcpy
	ldr	x8, [x24, #32]
	add	x0, x8, #192
	add	x1, x20, #128
	mov	w2, #8
	b	LBB0_21
LBB0_20:
	ldur	x1, [x29, #-104]                ; 8-byte Folded Reload
	mov	x2, x20
LBB0_21:
	bl	_os_memcpy
	ldur	x20, [x29, #-112]               ; 8-byte Folded Reload
Lloh22:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh24:
	ldr	w0, [x8]
Lloh25:
	adrp	x1, l_.str@PAGE
Lloh26:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x24
	mov	x3, x20
	bl	_wpa_hexdump_key
Lloh27:
	adrp	x8, _OID_802_11_ADD_KEY@GOTPAGE
Lloh28:
	ldr	x8, [x8, _OID_802_11_ADD_KEY@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x24
	mov	x3, x20
	bl	_ndis_set_oid
	mov	x19, x0
	mov	x0, x24
	bl	_os_free
LBB0_22:
	ldur	x8, [x29, #-88]
Lloh30:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh31:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh32:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.23:
	mov	x0, x19
	sub	sp, x29, #80
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_ETH_ALEN,4,2                   ; @ETH_ALEN
	.comm	_WPA_ALG_NONE,4,2               ; @WPA_ALG_NONE
	.comm	_WPA_ALG_WEP,4,2                ; @WPA_ALG_WEP
	.comm	_WPA_ALG_TKIP,4,2               ; @WPA_ALG_TKIP
	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NDIS: OID_802_11_ADD_KEY"

	.comm	_OID_802_11_ADD_KEY,4,2         ; @OID_802_11_ADD_KEY
	.no_dead_strip	_wpa_driver_ndis_set_key
.subsections_via_symbols
