	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function wpa_supplicant_decrypt_key_data
_wpa_supplicant_decrypt_key_data:       ## @wpa_supplicant_decrypt_key_data
	.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	$152, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r15
	movq	%r8, %r14
	movl	%ecx, %r13d
	movq	%rdx, -184(%rbp)                ## 8-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r9), %rcx
	leaq	L_.str(%rip), %rsi
	movq	%r8, %rdx
	callq	_wpa_hexdump
	cmpl	$0, 28(%rbx)
	je	LBB0_1
## %bb.3:
	movq	_WPA_KEY_INFO_TYPE_HMAC_MD5_RC4@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	jne	LBB0_7
## %bb.4:
	cmpl	$16, 8(%rbx)
	jne	LBB0_7
## %bb.5:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	(%r12), %rsi
	leaq	-176(%rbp), %r12
	movl	$16, %edx
	movq	%r12, %rdi
	callq	_os_memcpy
	leaq	-112(%rbp), %rdi
	movq	16(%rbx), %rsi
	movslq	8(%rbx), %rdx
	callq	_os_memcpy
	movq	(%r15), %r8
	movq	%r12, %rdi
	movl	$32, %esi
	movl	$256, %edx                      ## imm = 0x100
	movq	%r14, %rcx
	callq	_rc4_skip
	movq	%rax, %r13
	movq	%r12, %rdi
	movl	$128, %esi
	callq	_forced_memzero
	testq	%r13, %r13
	je	LBB0_20
## %bb.6:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_2
LBB0_7:
	movq	_WPA_KEY_INFO_TYPE_HMAC_SHA1_AES@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	je	LBB0_10
## %bb.8:
	movq	_WPA_KEY_INFO_TYPE_AES_128_CMAC@GOTPCREL(%rip), %rax
	cmpl	%r13d, (%rax)
	je	LBB0_10
## %bb.9:
	movl	24(%rbx), %edi
	callq	_wpa_use_aes_key_wrap
	testq	%rax, %rax
	je	LBB0_18
LBB0_10:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	8(%rbx), %edx
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	(%r15), %rcx
	cmpq	$8, %rcx
	jb	LBB0_12
## %bb.11:
	movl	%ecx, %eax
	andl	$7, %eax
	testq	%rax, %rax
	jne	LBB0_12
## %bb.14:
	addq	$-8, %rcx
	movq	%rcx, (%r15)
	movq	%rcx, %rdi
	callq	_os_malloc
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%rax, %r13
	movq	16(%rbx), %rdi
	movslq	8(%rbx), %rsi
	movq	(%r15), %rdx
	shrq	$3, %rdx
	movq	%r14, %rcx
	movq	%rax, %r8
	callq	_aes_unwrap
	movq	(%r15), %rdx
	testq	%rax, %rax
	je	LBB0_19
## %bb.17:
	movq	%r13, %rdi
	movq	%rdx, %rsi
	callq	_bin_clear_free
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.7(%rip), %rdx
	jmp	LBB0_2
LBB0_1:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
LBB0_2:
	xorl	%eax, %eax
	callq	_wpa_msg
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_12:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.5(%rip), %rdx
                                        ## kill: def $ecx killed $ecx killed $rcx
	jmp	LBB0_13
LBB0_18:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.8(%rip), %rdx
	movl	%r13d, %ecx
LBB0_13:
	xorl	%eax, %eax
	callq	_wpa_msg
	movl	$-1, %eax
	jmp	LBB0_21
LBB0_15:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	movq	_MSG_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.6(%rip), %rdx
	jmp	LBB0_2
LBB0_19:
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_os_memcpy
	movq	(%r15), %rsi
	movq	%r13, %rdi
	callq	_bin_clear_free
	movq	-184(%rbp), %rax                ## 8-byte Reload
	leaq	(%r12,%rax,4), %rdi
	addq	$8, %rdi
	movq	(%r15), %rsi
	callq	_WPA_PUT_BE16
LBB0_20:
	movq	_MSG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	(%r15), %rcx
	leaq	L_.str.9(%rip), %rsi
	movq	%r14, %rdx
	callq	_wpa_hexdump_key
	xorl	%eax, %eax
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_23
## %bb.22:
	addq	$152, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RSN: encrypted key data"

	.comm	_MSG_WARNING,4,2                ## @MSG_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"WPA: PTK not available, cannot decrypt EAPOL-Key Key Data"

	.comm	_WPA_KEY_INFO_TYPE_HMAC_MD5_RC4,4,2 ## @WPA_KEY_INFO_TYPE_HMAC_MD5_RC4
L_.str.2:                               ## @.str.2
	.asciz	"WPA: Decrypt Key Data using RC4"

	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"WPA: RC4 failed"

	.comm	_WPA_KEY_INFO_TYPE_HMAC_SHA1_AES,4,2 ## @WPA_KEY_INFO_TYPE_HMAC_SHA1_AES
	.comm	_WPA_KEY_INFO_TYPE_AES_128_CMAC,4,2 ## @WPA_KEY_INFO_TYPE_AES_128_CMAC
L_.str.4:                               ## @.str.4
	.asciz	"WPA: Decrypt Key Data using AES-UNWRAP (KEK length %u)"

L_.str.5:                               ## @.str.5
	.asciz	"WPA: Unsupported AES-WRAP len %u"

L_.str.6:                               ## @.str.6
	.asciz	"WPA: No memory for AES-UNWRAP buffer"

L_.str.7:                               ## @.str.7
	.asciz	"WPA: AES unwrap failed - could not decrypt EAPOL-Key key data"

L_.str.8:                               ## @.str.8
	.asciz	"WPA: Unsupported key_info type %d"

L_.str.9:                               ## @.str.9
	.asciz	"WPA: decrypted EAPOL-Key key data"

	.comm	_MSG_INFO,4,2                   ## @MSG_INFO
	.no_dead_strip	_wpa_supplicant_decrypt_key_data
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function wpa_supplicant_decrypt_key_data
_wpa_supplicant_decrypt_key_data:       ; @wpa_supplicant_decrypt_key_data
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #224
	.cfi_def_cfa_offset 224
	stp	x26, x25, [sp, #144]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #160]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #176]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #192]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #208]            ; 16-byte Folded Spill
	add	x29, sp, #208
	.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, x5
	mov	x19, x4
	mov	x24, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
Lloh3:
	adrp	x25, _MSG_DEBUG@GOTPAGE
Lloh4:
	ldr	x25, [x25, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x25]
	ldr	x3, [x5]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x4
	bl	_wpa_hexdump
	ldr	w8, [x21, #28]
	cbz	w8, LBB0_12
; %bb.1:
Lloh7:
	adrp	x8, _WPA_KEY_INFO_TYPE_HMAC_MD5_RC4@GOTPAGE
Lloh8:
	ldr	x8, [x8, _WPA_KEY_INFO_TYPE_HMAC_MD5_RC4@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	cmp	w8, w24
	b.ne	LBB0_5
; %bb.2:
	ldr	w8, [x21, #8]
	cmp	w8, #16
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x25]
Lloh10:
	adrp	x1, l_.str.2@PAGE
Lloh11:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_wpa_printf
	ldr	x1, [x22]
	add	x22, sp, #8
	add	x0, sp, #8
	mov	w2, #16
	bl	_os_memcpy
	add	x0, x22, #64
	ldr	x1, [x21, #16]
	ldrsw	x2, [x21, #8]
	bl	_os_memcpy
	ldr	x4, [x20]
	add	x0, sp, #8
	mov	w1, #32
	mov	w2, #256
	mov	x3, x19
	bl	_rc4_skip
	mov	x22, x0
	add	x0, sp, #8
	mov	w1, #128
	bl	_forced_memzero
	cbz	x22, LBB0_20
; %bb.4:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
Lloh15:
	adrp	x2, l_.str.3@PAGE
Lloh16:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_16
LBB0_5:
Lloh17:
	adrp	x8, _WPA_KEY_INFO_TYPE_HMAC_SHA1_AES@GOTPAGE
Lloh18:
	ldr	x8, [x8, _WPA_KEY_INFO_TYPE_HMAC_SHA1_AES@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _WPA_KEY_INFO_TYPE_AES_128_CMAC@GOTPAGE
Lloh21:
	ldr	x9, [x9, _WPA_KEY_INFO_TYPE_AES_128_CMAC@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, w24
	ccmp	w9, w24, #4, ne
	b.eq	LBB0_7
; %bb.6:
	ldr	w0, [x21, #24]
	bl	_wpa_use_aes_key_wrap
	cbz	x0, LBB0_14
LBB0_7:
	ldr	w0, [x25]
	ldr	w8, [x21, #8]
	str	x8, [sp]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	ldr	x8, [x20]
	subs	x0, x8, #8
	b.lo	LBB0_13
; %bb.8:
	and	x9, x8, #0x7
	cbnz	x9, LBB0_13
; %bb.9:
	str	x0, [x20]
	bl	_os_malloc
	cbz	x0, LBB0_15
; %bb.10:
	mov	x24, x0
	ldr	x0, [x21, #16]
	ldrsw	x1, [x21, #8]
	ldr	x8, [x20]
	lsr	x2, x8, #3
	mov	x3, x19
	mov	x4, x24
	bl	_aes_unwrap
	ldr	x2, [x20]
	cbz	x0, LBB0_19
; %bb.11:
	mov	x0, x24
	mov	x1, x2
	bl	_bin_clear_free
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh25:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh26:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x2, l_.str.7@PAGE
Lloh29:
	add	x2, x2, l_.str.7@PAGEOFF
	b	LBB0_16
LBB0_12:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh30:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
Lloh33:
	adrp	x2, l_.str.1@PAGE
Lloh34:
	add	x2, x2, l_.str.1@PAGEOFF
	b	LBB0_16
LBB0_13:
	ldr	x9, [x21]
	ldr	w0, [x9]
Lloh35:
	adrp	x9, _MSG_WARNING@GOTPAGE
Lloh36:
	ldr	x9, [x9, _MSG_WARNING@GOTPAGEOFF]
Lloh37:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh38:
	adrp	x2, l_.str.5@PAGE
Lloh39:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_16
LBB0_14:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh40:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	str	x24, [sp]
Lloh43:
	adrp	x2, l_.str.8@PAGE
Lloh44:
	add	x2, x2, l_.str.8@PAGEOFF
	b	LBB0_16
LBB0_15:
	ldr	x8, [x21]
	ldr	w0, [x8]
Lloh45:
	adrp	x8, _MSG_WARNING@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MSG_WARNING@GOTPAGEOFF]
Lloh47:
	ldr	w1, [x8]
Lloh48:
	adrp	x2, l_.str.6@PAGE
Lloh49:
	add	x2, x2, l_.str.6@PAGEOFF
LBB0_16:
	bl	_wpa_msg
	mov	w0, #-1
LBB0_17:
	ldur	x8, [x29, #-72]
Lloh50:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh51:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh52:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_21
; %bb.18:
	ldp	x29, x30, [sp, #208]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #192]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #176]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #160]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #144]            ; 16-byte Folded Reload
	add	sp, sp, #224
	ret
LBB0_19:
	mov	x0, x19
	mov	x1, x24
	bl	_os_memcpy
	ldr	x1, [x20]
	mov	x0, x24
	bl	_bin_clear_free
	add	x8, x22, x23, lsl #2
	add	x0, x8, #8
	ldr	x1, [x20]
	bl	_WPA_PUT_BE16
LBB0_20:
	ldr	w0, [x25]
	ldr	x3, [x20]
Lloh53:
	adrp	x1, l_.str.9@PAGE
Lloh54:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x2, x19
	bl	_wpa_hexdump_key
	mov	w0, #0
	b	LBB0_17
LBB0_21:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh50, Lloh51, Lloh52
	.loh AdrpAdd	Lloh53, Lloh54
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RSN: encrypted key data"

	.comm	_MSG_WARNING,4,2                ; @MSG_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"WPA: PTK not available, cannot decrypt EAPOL-Key Key Data"

	.comm	_WPA_KEY_INFO_TYPE_HMAC_MD5_RC4,4,2 ; @WPA_KEY_INFO_TYPE_HMAC_MD5_RC4
l_.str.2:                               ; @.str.2
	.asciz	"WPA: Decrypt Key Data using RC4"

	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"WPA: RC4 failed"

	.comm	_WPA_KEY_INFO_TYPE_HMAC_SHA1_AES,4,2 ; @WPA_KEY_INFO_TYPE_HMAC_SHA1_AES
	.comm	_WPA_KEY_INFO_TYPE_AES_128_CMAC,4,2 ; @WPA_KEY_INFO_TYPE_AES_128_CMAC
l_.str.4:                               ; @.str.4
	.asciz	"WPA: Decrypt Key Data using AES-UNWRAP (KEK length %u)"

l_.str.5:                               ; @.str.5
	.asciz	"WPA: Unsupported AES-WRAP len %u"

l_.str.6:                               ; @.str.6
	.asciz	"WPA: No memory for AES-UNWRAP buffer"

l_.str.7:                               ; @.str.7
	.asciz	"WPA: AES unwrap failed - could not decrypt EAPOL-Key key data"

l_.str.8:                               ; @.str.8
	.asciz	"WPA: Unsupported key_info type %d"

l_.str.9:                               ; @.str.9
	.asciz	"WPA: decrypted EAPOL-Key key data"

	.comm	_MSG_INFO,4,2                   ; @MSG_INFO
	.no_dead_strip	_wpa_supplicant_decrypt_key_data
.subsections_via_symbols
