	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpa_driver_ndis_add_wep
_wpa_driver_ndis_add_wep:               ## @wpa_driver_ndis_add_wep
	.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	%r9, %r12
	movq	%r8, -48(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r13d
	movl	%edx, %r15d
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	leaq	12(%r9), %r14
	movq	%r14, %rdi
	callq	_os_zalloc
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	%rax, %rbx
	movl	%r15d, %eax
	orl	$-2147483648, %eax              ## imm = 0x80000000
	testl	%r13d, %r13d
	cmovel	%r15d, %eax
	movq	%r14, (%rbx)
	movl	%eax, 8(%rbx)
	movq	%r12, 16(%rbx)
	movl	24(%rbx), %edi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_os_memcpy
	movq	_MSG_MSGDUMP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_wpa_hexdump_key
	movq	_OID_802_11_ADD_WEP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_ndis_set_oid
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_os_free
	movl	%r14d, %eax
	jmp	LBB0_3
LBB0_2:
	movl	$-1, %eax
LBB0_3:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_MSGDUMP,4,2                ## @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NDIS: OID_802_11_ADD_WEP"

	.comm	_OID_802_11_ADD_WEP,4,2         ## @OID_802_11_ADD_WEP
	.no_dead_strip	_wpa_driver_ndis_add_wep
.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_add_wep
_wpa_driver_ndis_add_wep:               ; @wpa_driver_ndis_add_wep
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x22, x5
	mov	x23, x4
	mov	x25, x3
	mov	x24, x2
	mov	x21, x0
	add	x19, x5, #12
	mov	x0, x19
	bl	_os_zalloc
	cbz	x0, LBB0_2
; %bb.1:
	mov	x20, x0
	str	x19, [x0]
	orr	w8, w24, #0x80000000
	cmp	w25, #0
	csel	w8, w24, w8, eq
	str	w8, [x0, #8]
	str	x22, [x0, #16]
	ldr	w0, [x0, #24]
	mov	x1, x23
	mov	x2, x22
	bl	_os_memcpy
Lloh0:
	adrp	x8, _MSG_MSGDUMP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MSG_MSGDUMP@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	mov	x3, x19
	bl	_wpa_hexdump_key
Lloh5:
	adrp	x8, _OID_802_11_ADD_WEP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _OID_802_11_ADD_WEP@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x21
	mov	x2, x20
	mov	x3, x19
	bl	_ndis_set_oid
	mov	x19, x0
	mov	x0, x20
	bl	_os_free
	mov	x0, x19
	b	LBB0_3
LBB0_2:
	mov	w0, #-1
LBB0_3:
	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
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_MSGDUMP,4,2                ; @MSG_MSGDUMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NDIS: OID_802_11_ADD_WEP"

	.comm	_OID_802_11_ADD_WEP,4,2         ; @OID_802_11_ADD_WEP
	.no_dead_strip	_wpa_driver_ndis_add_wep
.subsections_via_symbols
