	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function authenticate
_authenticate:                          ## @authenticate
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	72(%rdi), %rbx
	movl	32(%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, %r12
	movl	28(%rbx), %edi
	callq	_le16_to_cpu
	movq	%rax, %r15
	movl	24(%rbx), %edi
	callq	_le16_to_cpu
	movq	_WLAN_STATUS_SUCCESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r12
	jne	LBB0_8
## %bb.1:
	cmpq	$0, 56(%r14)
	je	LBB0_2
## %bb.5:
	cmpq	(%r14), %r15
	jne	LBB0_25
## %bb.6:
	movq	_WLAN_AUTH_OPEN@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.7:
	cmpq	$2, %r15
	jne	LBB0_8
	jmp	LBB0_2
LBB0_12:
	movq	_WLAN_AUTH_SHARED_KEY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.13:
	cmpq	$4, %r15
	je	LBB0_2
## %bb.14:
	cmpq	$2, %r15
	jne	LBB0_8
## %bb.15:
	movq	(%rbx), %rcx
	movq	_WLAN_EID_CHALLENGE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_8
## %bb.16:
	movq	16(%rbx), %rdx
	movl	8(%rbx), %ecx
	movq	%r14, %rdi
	movq	%rax, %rsi
	jmp	LBB0_21
LBB0_8:
	movq	_WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %r12
	jne	LBB0_24
## %bb.9:
	movq	_WLAN_AUTH_OPEN@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rax
	jne	LBB0_17
## %bb.10:
	movabsq	$4294967297, %rax               ## imm = 0x100000001
	movq	%rax, 8(%r14)
	movq	_WLAN_AUTH_SHARED_KEY@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	jmp	LBB0_20
LBB0_2:
	cmpq	$0, 64(%r14)
	je	LBB0_11
## %bb.3:
	movq	_STATION_STATE_REASSOCIATING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_atmel_enter_state
	movq	%r14, %rdi
	movl	$1, %esi
	jmp	LBB0_4
LBB0_17:
	movq	_WLAN_AUTH_SHARED_KEY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_22
## %bb.18:
	cmpq	$0, 56(%r14)
	je	LBB0_22
## %bb.19:
	movq	$1, 8(%r14)
LBB0_20:
	movq	%r14, %rdi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
LBB0_21:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_authentication_request    ## TAILCALL
LBB0_22:
	cmpq	$0, 48(%r14)
	je	LBB0_24
## %bb.23:
	movq	40(%r14), %rax
	movslq	32(%r14), %rcx
	orl	$128, (%rax,%rcx,4)
	movq	%r14, %rdi
	callq	_retrieve_bss
	cmpl	$-1, %eax
	je	LBB0_24
## %bb.26:
	movq	%r14, %rdi
	movl	%eax, %esi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_atmel_join_bss                 ## TAILCALL
LBB0_24:
	movq	$0, 24(%r14)
	movq	_STATION_STATE_MGMT_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_atmel_enter_state
	movq	$0, 16(%r14)
LBB0_25:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movq	_STATION_STATE_ASSOCIATING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_atmel_enter_state
	movq	%r14, %rdi
	xorl	%esi, %esi
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_send_association_request       ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_WLAN_STATUS_SUCCESS,8,3        ## @WLAN_STATUS_SUCCESS
	.comm	_STATION_STATE_REASSOCIATING,4,2 ## @STATION_STATE_REASSOCIATING
	.comm	_STATION_STATE_ASSOCIATING,4,2  ## @STATION_STATE_ASSOCIATING
	.comm	_WLAN_AUTH_OPEN,8,3             ## @WLAN_AUTH_OPEN
	.comm	_WLAN_AUTH_SHARED_KEY,8,3       ## @WLAN_AUTH_SHARED_KEY
	.comm	_WLAN_EID_CHALLENGE,8,3         ## @WLAN_EID_CHALLENGE
	.comm	_WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG,8,3 ## @WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG
	.comm	_STATION_STATE_MGMT_ERROR,4,2   ## @STATION_STATE_MGMT_ERROR
	.no_dead_strip	_authenticate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function authenticate
lCPI0_0:
	.long	1                               ; 0x1
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_authenticate:                          ; @authenticate
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x22, [x0, #72]
	ldr	w0, [x22, #32]
	bl	_le16_to_cpu
	mov	x20, x0
	ldr	w0, [x22, #28]
	bl	_le16_to_cpu
	mov	x21, x0
	ldr	w0, [x22, #24]
	bl	_le16_to_cpu
	mov	x8, x0
Lloh0:
	adrp	x9, _WLAN_STATUS_SUCCESS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _WLAN_STATUS_SUCCESS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x20, x9
	b.ne	LBB0_10
; %bb.1:
	ldr	x9, [x19, #56]
	cbz	x9, LBB0_13
; %bb.2:
	ldr	x9, [x19]
	cmp	x21, x9
	b.ne	LBB0_24
; %bb.3:
Lloh3:
	adrp	x9, _WLAN_AUTH_OPEN@GOTPAGE
Lloh4:
	ldr	x9, [x9, _WLAN_AUTH_OPEN@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.4:
	cmp	x21, #2
	b.ne	LBB0_10
	b	LBB0_13
LBB0_5:
Lloh6:
	adrp	x9, _WLAN_AUTH_SHARED_KEY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _WLAN_AUTH_SHARED_KEY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.6:
	cmp	x21, #4
	b.eq	LBB0_13
; %bb.7:
	cmp	x21, #2
	b.ne	LBB0_10
; %bb.8:
	ldr	x9, [x22]
Lloh9:
	adrp	x10, _WLAN_EID_CHALLENGE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _WLAN_EID_CHALLENGE@GOTPAGEOFF]
Lloh11:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_10
; %bb.9:
	ldr	x2, [x22, #16]
	ldr	w3, [x22, #8]
	mov	x0, x19
	mov	x1, x8
	b	LBB0_19
LBB0_10:
Lloh12:
	adrp	x9, _WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG@GOTPAGE
Lloh13:
	ldr	x9, [x9, _WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG@GOTPAGEOFF]
Lloh14:
	ldr	x9, [x9]
	cmp	x20, x9
	b.ne	LBB0_23
; %bb.11:
Lloh15:
	adrp	x9, _WLAN_AUTH_OPEN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _WLAN_AUTH_OPEN@GOTPAGEOFF]
Lloh17:
	ldr	x1, [x9]
	cmp	x8, x1
	b.ne	LBB0_15
; %bb.12:
	movi.2s	v0, #1
Lloh18:
	adrp	x8, _WLAN_AUTH_SHARED_KEY@GOTPAGE
Lloh19:
	ldr	x8, [x8, _WLAN_AUTH_SHARED_KEY@GOTPAGEOFF]
	str	d0, [x19, #8]
Lloh20:
	ldr	x1, [x8]
	b	LBB0_18
LBB0_13:
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_25
; %bb.14:
Lloh21:
	adrp	x8, _STATION_STATE_REASSOCIATING@GOTPAGE
Lloh22:
	ldr	x8, [x8, _STATION_STATE_REASSOCIATING@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atmel_enter_state
	mov	x0, x19
	mov	w1, #1
	b	LBB0_26
LBB0_15:
Lloh24:
	adrp	x9, _WLAN_AUTH_SHARED_KEY@GOTPAGE
Lloh25:
	ldr	x9, [x9, _WLAN_AUTH_SHARED_KEY@GOTPAGEOFF]
Lloh26:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_20
; %bb.16:
	ldr	x8, [x19, #56]
	cbz	x8, LBB0_20
; %bb.17:
Lloh27:
	adrp	x8, lCPI0_0@PAGE
Lloh28:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19, #8]
LBB0_18:
	mov	x0, x19
	mov	x2, #0
	mov	w3, #0
LBB0_19:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_send_authentication_request
LBB0_20:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_23
; %bb.21:
	ldp	x9, x8, [x19, #32]
	sbfiz	x9, x9, #2, #32
	ldr	w10, [x8, x9]
	orr	w10, w10, #0x80
	str	w10, [x8, x9]
	mov	x0, x19
	bl	_retrieve_bss
	cmn	w0, #1
	b.eq	LBB0_23
; %bb.22:
	mov	x1, x0
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_atmel_join_bss
LBB0_23:
	str	xzr, [x19, #24]
Lloh29:
	adrp	x8, _STATION_STATE_MGMT_ERROR@GOTPAGE
Lloh30:
	ldr	x8, [x8, _STATION_STATE_MGMT_ERROR@GOTPAGEOFF]
Lloh31:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atmel_enter_state
	str	xzr, [x19, #16]
LBB0_24:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_25:
Lloh32:
	adrp	x8, _STATION_STATE_ASSOCIATING@GOTPAGE
Lloh33:
	ldr	x8, [x8, _STATION_STATE_ASSOCIATING@GOTPAGEOFF]
Lloh34:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_atmel_enter_state
	mov	x0, x19
	mov	w1, #0
LBB0_26:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_send_association_request
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdr	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_WLAN_STATUS_SUCCESS,8,3        ; @WLAN_STATUS_SUCCESS
	.comm	_STATION_STATE_REASSOCIATING,4,2 ; @STATION_STATE_REASSOCIATING
	.comm	_STATION_STATE_ASSOCIATING,4,2  ; @STATION_STATE_ASSOCIATING
	.comm	_WLAN_AUTH_OPEN,8,3             ; @WLAN_AUTH_OPEN
	.comm	_WLAN_AUTH_SHARED_KEY,8,3       ; @WLAN_AUTH_SHARED_KEY
	.comm	_WLAN_EID_CHALLENGE,8,3         ; @WLAN_EID_CHALLENGE
	.comm	_WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG,8,3 ; @WLAN_STATUS_NOT_SUPPORTED_AUTH_ALG
	.comm	_STATION_STATE_MGMT_ERROR,4,2   ; @STATION_STATE_MGMT_ERROR
	.no_dead_strip	_authenticate
.subsections_via_symbols
