	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function proc_wepkey_on_close
_proc_wepkey_on_close:                  ## @proc_wepkey_on_close
	.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	%rsi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	callq	_PDE_DATA
	movq	(%rax), %r14
	leaq	-64(%rbp), %rdi
	xorl	%esi, %esi
	movl	$16, %edx
	callq	_memset
	movq	(%rbx), %r12
	cmpl	$0, 8(%r12)
	je	LBB0_23
## %bb.1:
	movq	(%r12), %rax
	movsbl	(%rax), %r15d
	movl	%r15d, %ecx
	andb	$-4, %cl
	cmpb	$48, %cl
	jne	LBB0_9
## %bb.2:
	movb	1(%rax), %cl
	cmpb	$32, %cl
	je	LBB0_4
## %bb.3:
	cmpb	$10, %cl
	jne	LBB0_9
LBB0_4:
	addl	$-48, %r15d
	cmpb	$10, %cl
	jne	LBB0_5
## %bb.7:
	movsbl	%r15b, %esi
	movq	%r14, %rdi
	movl	$1, %edx
	movl	$1, %ecx
	callq	_set_wep_tx_idx
	testl	%eax, %eax
	jns	LBB0_23
## %bb.8:
	movq	(%r14), %rcx
	movl	(%rcx), %edi
	movzbl	%r15b, %edx
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_22
LBB0_9:
	movq	(%r14), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	xorl	%eax, %eax
	callq	_airo_print_err
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movb	2(%rax), %al
	testb	%al, %al
	je	LBB0_6
## %bb.10:
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	movl	$2863311531, %r14d              ## imm = 0xAAAAAAAB
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%ebx, %ecx
	imulq	%r14, %rcx
	shrq	$33, %rcx
	leal	(%rcx,%rcx,2), %edx
	movl	%r13d, %ecx
	subl	%edx, %ecx
	cmpl	$1, %ecx
	je	LBB0_14
## %bb.12:                              ##   in Loop: Header=BB0_11 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_11 Depth=1
	movsbl	%al, %edi
	callq	_hex_to_bin
	shlb	$4, %al
	movzbl	%r13b, %ecx
	imull	$171, %ecx, %ecx
	shrq	$9, %rcx
	movb	%al, -64(%rbp,%rcx)
	jmp	LBB0_15
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_11 Depth=1
	movzbl	%r13b, %ecx
	imull	$171, %ecx, %r14d
	shrl	$9, %r14d
	movsbl	%al, %edi
	callq	_hex_to_bin
	movzbl	%r14b, %ecx
	movl	$2863311531, %r14d              ## imm = 0xAAAAAAAB
	orb	%al, -64(%rbp,%rcx)
LBB0_15:                                ##   in Loop: Header=BB0_11 Depth=1
	cmpq	$47, %r13
	je	LBB0_16
## %bb.17:                              ##   in Loop: Header=BB0_11 Depth=1
	movq	(%r12), %rax
	movzbl	3(%rax,%r13), %eax
	incl	%ebx
	incq	%r13
	testb	%al, %al
	jne	LBB0_11
## %bb.18:
	movl	%r13d, %eax
	movl	$2863311531, %ecx               ## imm = 0xAAAAAAAB
	imulq	%rax, %rcx
	shrq	$33, %rcx
	jmp	LBB0_19
LBB0_6:
	xorl	%ecx, %ecx
	jmp	LBB0_20
LBB0_16:
	movl	$16, %ecx
LBB0_19:
	movq	-72(%rbp), %r14                 ## 8-byte Reload
LBB0_20:
	movsbl	%r15b, %esi
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
                                        ## kill: def $ecx killed $ecx killed $rcx
	movl	$1, %r8d
	movl	$1, %r9d
	callq	_set_wep_key
	testl	%eax, %eax
	jns	LBB0_23
## %bb.21:
	movq	(%r14), %rcx
	movl	(%rcx), %edi
	leaq	L_.str.2(%rip), %rsi
	movl	%r15d, %edx
LBB0_22:
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_airo_print_err
	jmp	LBB0_23
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to set WEP transmit index to %d: %d."

L_.str.1:                               ## @.str.1
	.asciz	"WepKey passed invalid key index"

L_.str.2:                               ## @.str.2
	.asciz	"failed to set WEP key at index %d: %d."

	.no_dead_strip	_proc_wepkey_on_close
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function proc_wepkey_on_close
_proc_wepkey_on_close:                  ; @proc_wepkey_on_close
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x20, x1
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #40]
	bl	_PDE_DATA
	ldr	x19, [x0]
	add	x0, sp, #24
	mov	w1, #0
	mov	w2, #16
	bl	_memset
	ldr	x21, [x20]
	ldr	w8, [x21, #8]
	cbz	w8, LBB0_8
; %bb.1:
	ldr	x8, [x21]
	ldrsb	w9, [x8]
	and	w10, w9, #0xfffffffc
	cmp	w10, #48
	b.ne	LBB0_6
; %bb.2:
	ldrb	w10, [x8, #1]
	cmp	w10, #32
	ccmp	w10, #10, #4, ne
	b.ne	LBB0_6
; %bb.3:
	sub	w20, w9, #48
	cmp	w10, #10
	b.ne	LBB0_10
; %bb.4:
	sxtb	w1, w20
	mov	x0, x19
	mov	w2, #1
	mov	w3, #1
	bl	_set_wep_tx_idx
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_8
; %bb.5:
	ldr	x8, [x19]
	ldr	w8, [x8]
	and	x9, x20, #0xff
	stp	x9, x0, [sp]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_23
LBB0_6:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_7:
	bl	_airo_print_err
LBB0_8:
	ldr	x8, [sp, #40]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_24
; %bb.9:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_10:
	ldrb	w8, [x8, #2]
	cbz	w8, LBB0_19
; %bb.11:
	mov	x22, #0
	mov	w23, #171
	add	x24, sp, #24
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	and	w9, w22, #0xff
	mul	w9, w9, w23
	lsr	w25, w9, #9
	add	w9, w25, w25, lsl #1
	sub	w9, w22, w9
	and	w9, w9, #0xff
	cmp	w9, #1
	b.eq	LBB0_15
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	cbnz	w9, LBB0_16
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	sxtb	w0, w8
	bl	_hex_to_bin
	lsl	w8, w0, #4
	and	w9, w22, #0xff
	mul	w9, w9, w23
	lsr	w9, w9, #9
	strb	w8, [x24, w9, uxtw]
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_12 Depth=1
	sxtb	w0, w8
	bl	_hex_to_bin
	ldrb	w8, [x24, x25]
	orr	w8, w8, w0
	strb	w8, [x24, x25]
LBB0_16:                                ;   in Loop: Header=BB0_12 Depth=1
	cmp	x22, #47
	b.eq	LBB0_20
; %bb.17:                               ;   in Loop: Header=BB0_12 Depth=1
	ldr	x8, [x21]
	add	x8, x8, x22
	ldrb	w8, [x8, #3]
	add	x22, x22, #1
	cbnz	w8, LBB0_12
; %bb.18:
	and	x8, x22, #0xffffffff
	mov	w9, #43691
	movk	w9, #43690, lsl #16
	mul	x8, x8, x9
	lsr	x3, x8, #33
	b	LBB0_21
LBB0_19:
	mov	w3, #0
	b	LBB0_21
LBB0_20:
	mov	w3, #16
LBB0_21:
	sxtb	w1, w20
	add	x2, sp, #24
	mov	x0, x19
                                        ; kill: def $w3 killed $w3 killed $x3
	mov	w4, #1
	mov	w5, #1
	bl	_set_wep_key
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #31, LBB0_8
; %bb.22:
	ldr	x8, [x19]
	ldr	w8, [x8]
                                        ; kill: def $w20 killed $w20 killed $x20 def $x20
	stp	x20, x0, [sp]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_23:
	mov	x0, x8
	b	LBB0_7
LBB0_24:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to set WEP transmit index to %d: %d."

l_.str.1:                               ; @.str.1
	.asciz	"WepKey passed invalid key index"

l_.str.2:                               ; @.str.2
	.asciz	"failed to set WEP key at index %d: %d."

	.no_dead_strip	_proc_wepkey_on_close
.subsections_via_symbols
