	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpa_supplicant_join_mesh       ## -- Begin function wpa_supplicant_join_mesh
	.p2align	4, 0x90
_wpa_supplicant_join_mesh:              ## @wpa_supplicant_join_mesh
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movl	$104, %edi
	callq	_os_zalloc
	movq	%rax, %r15
	testq	%rbx, %rbx
	je	LBB0_5
## %bb.1:
	cmpq	$0, 64(%rbx)
	je	LBB0_5
## %bb.2:
	cmpq	$0, 56(%rbx)
	je	LBB0_5
## %bb.3:
	cmpl	$0, 72(%rbx)
	je	LBB0_5
## %bb.4:
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	callq	_wpa_supplicant_mesh_deinit
	movq	_WPA_CIPHER_NONE@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 48(%r14)
	movq	%rax, 40(%r14)
	movq	$0, 32(%r14)
	movups	56(%rbx), %xmm0
	movups	%xmm0, 88(%r15)
	addq	$16, %r12
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_ibss_mesh_setup_freq
	movq	40(%r15), %rdx
	xorl	%eax, %eax
	testq	%rdx, %rdx
	setne	%al
	movl	%eax, (%r14)
	movl	52(%r15), %ecx
	xorl	%eax, %eax
	testl	%ecx, %ecx
	setne	%al
	movl	%eax, 4(%r14)
	movl	48(%r15), %eax
	xorl	%esi, %esi
	testl	%eax, %eax
	setne	%sil
	movl	%esi, 8(%r14)
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.7:
	movq	32(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_9
## %bb.8:
	movq	%rdx, 48(%rbx)
LBB0_9:
	testl	%ecx, %ecx
	je	LBB0_18
## %bb.10:
	movl	$1, (%rbx)
	movl	24(%r15), %ecx
	movl	%ecx, 44(%rbx)
	movl	16(%r15), %ecx
	cmpl	$160, %ecx
	je	LBB0_15
## %bb.11:
	cmpl	$80, %ecx
	jne	LBB0_16
## %bb.12:
	movl	20(%r15), %ecx
	testl	%ecx, %ecx
	je	LBB0_14
## %bb.13:
	movq	_CHANWIDTH_80P80MHZ@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 36(%rbx)
	movl	%ecx, 40(%rbx)
	jmp	LBB0_18
LBB0_5:
	movq	_ENOENT@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	%r15, %rdi
	callq	_os_free
LBB0_37:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	_CHANWIDTH_160MHZ@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_16:
	movq	_CHANWIDTH_USE_HT@GOTPCREL(%rip), %rcx
	jmp	LBB0_17
LBB0_14:
	movq	_CHANWIDTH_80MHZ@GOTPCREL(%rip), %rcx
LBB0_17:
	movl	(%rcx), %ecx
	movl	%ecx, 36(%rbx)
LBB0_18:
	testl	%eax, %eax
	je	LBB0_20
## %bb.19:
	movl	$1, 4(%rbx)
LBB0_20:
	movq	8(%rbx), %rax
	testq	%rax, %rax
	jg	LBB0_22
## %bb.21:
	movq	24(%r14), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	jle	LBB0_23
LBB0_22:
	movq	%rax, (%r15)
LBB0_23:
	movq	16(%rbx), %rax
	testq	%rax, %rax
	jle	LBB0_25
## %bb.24:
	movq	%rax, 8(%r15)
	movq	24(%r14), %rax
	jmp	LBB0_27
LBB0_25:
	movq	24(%r14), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	jle	LBB0_27
## %bb.26:
	movq	%rcx, 8(%r15)
LBB0_27:
	movl	24(%rax), %ecx
	movl	%ecx, 76(%r15)
	movq	24(%rbx), %rcx
	movq	_DEFAULT_MESH_RSSI_THRESHOLD@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jge	LBB0_29
## %bb.28:
	movq	%rcx, 56(%r15)
	movq	_WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	%ecx, 72(%r15)
LBB0_29:
	movq	_WPA_KEY_MGMT_SAE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, 32(%rbx)
	je	LBB0_31
## %bb.30:
	movq	_WPA_DRIVER_MESH_FLAG_SAE_AUTH@GOTPCREL(%rip), %rcx
	movl	80(%r15), %edx
	orl	(%rcx), %edx
	movq	_WPA_DRIVER_MESH_FLAG_AMPE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %edx
	movl	%edx, 80(%r15)
	movl	$1, 16(%rax)
	xorl	%ecx, %ecx
	movq	_WPA_DRIVER_MESH_FLAG_USER_MPM@GOTPCREL(%rip), %rdx
	jmp	LBB0_35
LBB0_31:
	xorl	%ecx, %ecx
	cmpl	$0, 16(%rax)
	sete	%sil
	jne	LBB0_32
## %bb.33:
	movq	_WPA_DRIVER_MESH_FLAG_DRIVER_MPM@GOTPCREL(%rip), %rdx
	jmp	LBB0_34
LBB0_32:
	movq	_WPA_DRIVER_MESH_FLAG_USER_MPM@GOTPCREL(%rip), %rdx
LBB0_34:
	movb	%sil, %cl
LBB0_35:
	movl	(%rdx), %edx
	orl	%edx, 80(%r15)
	movl	%ecx, 64(%r15)
	movl	20(%rax), %eax
	movl	%eax, 68(%r15)
	movq	16(%r14), %rdi
	callq	_os_free
	movq	%r15, 16(%r14)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movq	%r12, %rdx
	callq	_wpa_supplicant_mesh_init
	testq	%rax, %rax
	je	LBB0_38
## %bb.36:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%r14, %rdi
	callq	_wpa_msg
	movq	%r14, %rdi
	callq	_wpa_drv_leave_mesh
	movl	$-1, %ebx
	jmp	LBB0_37
LBB0_38:
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_wpas_mesh_complete             ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOENT,4,2                     ## @ENOENT
	.comm	_WPA_CIPHER_NONE,8,3            ## @WPA_CIPHER_NONE
	.comm	_CHANWIDTH_80P80MHZ,4,2         ## @CHANWIDTH_80P80MHZ
	.comm	_CHANWIDTH_80MHZ,4,2            ## @CHANWIDTH_80MHZ
	.comm	_CHANWIDTH_160MHZ,4,2           ## @CHANWIDTH_160MHZ
	.comm	_CHANWIDTH_USE_HT,4,2           ## @CHANWIDTH_USE_HT
	.comm	_DEFAULT_MESH_RSSI_THRESHOLD,8,3 ## @DEFAULT_MESH_RSSI_THRESHOLD
	.comm	_WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD,4,2 ## @WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD
	.comm	_WPA_KEY_MGMT_SAE,4,2           ## @WPA_KEY_MGMT_SAE
	.comm	_WPA_DRIVER_MESH_FLAG_SAE_AUTH,4,2 ## @WPA_DRIVER_MESH_FLAG_SAE_AUTH
	.comm	_WPA_DRIVER_MESH_FLAG_AMPE,4,2  ## @WPA_DRIVER_MESH_FLAG_AMPE
	.comm	_WPA_DRIVER_MESH_FLAG_USER_MPM,4,2 ## @WPA_DRIVER_MESH_FLAG_USER_MPM
	.comm	_WPA_DRIVER_MESH_FLAG_DRIVER_MPM,4,2 ## @WPA_DRIVER_MESH_FLAG_DRIVER_MPM
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to init mesh"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_wpa_supplicant_join_mesh       ; -- Begin function wpa_supplicant_join_mesh
	.p2align	2
_wpa_supplicant_join_mesh:              ; @wpa_supplicant_join_mesh
	.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	x20, x1
	mov	x19, x0
	mov	w0, #104
	bl	_os_zalloc
	mov	x21, x0
	cbz	x20, LBB0_13
; %bb.1:
	ldr	x8, [x20, #64]
	cbz	x8, LBB0_13
; %bb.2:
	ldr	x8, [x20, #56]
	cbz	x8, LBB0_13
; %bb.3:
	ldr	w8, [x20, #72]
	cbz	w8, LBB0_13
; %bb.4:
	cbz	x21, LBB0_13
; %bb.5:
	mov	x0, x19
	bl	_wpa_supplicant_mesh_deinit
Lloh0:
	adrp	x8, _WPA_CIPHER_NONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _WPA_CIPHER_NONE@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stp	x8, x8, [x19, #40]
	str	xzr, [x19, #32]
	ldur	q0, [x20, #56]
	stur	q0, [x21, #88]
	add	x22, x21, #16
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_ibss_mesh_setup_freq
	ldr	x10, [x21, #40]
	cmp	x10, #0
	cset	w11, ne
	ldp	w8, w9, [x21, #48]
	cmp	w9, #0
	cset	w12, ne
	stp	w11, w12, [x19]
	cmp	w8, #0
	cset	w11, ne
	str	w11, [x19, #8]
	cbz	x10, LBB0_8
; %bb.6:
	ldr	x10, [x21, #32]
	cbz	x10, LBB0_8
; %bb.7:
	str	x10, [x20, #48]
LBB0_8:
	cbz	w9, LBB0_19
; %bb.9:
	mov	w9, #1
	str	w9, [x20]
	ldr	w9, [x21, #24]
	str	w9, [x20, #44]
	ldr	w9, [x21, #16]
	cmp	w9, #160
	b.eq	LBB0_15
; %bb.10:
	cmp	w9, #80
	b.ne	LBB0_16
; %bb.11:
	ldr	w9, [x21, #20]
	cbz	w9, LBB0_17
; %bb.12:
Lloh3:
	adrp	x10, _CHANWIDTH_80P80MHZ@GOTPAGE
Lloh4:
	ldr	x10, [x10, _CHANWIDTH_80P80MHZ@GOTPAGEOFF]
Lloh5:
	ldr	w10, [x10]
	stp	w10, w9, [x20, #36]
	b	LBB0_19
LBB0_13:
Lloh6:
	adrp	x8, _ENOENT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _ENOENT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w19, w8
	mov	x0, x21
	bl	_os_free
LBB0_14:
	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
	ret
LBB0_15:
Lloh9:
	adrp	x9, _CHANWIDTH_160MHZ@GOTPAGE
Lloh10:
	ldr	x9, [x9, _CHANWIDTH_160MHZ@GOTPAGEOFF]
	b	LBB0_18
LBB0_16:
Lloh11:
	adrp	x9, _CHANWIDTH_USE_HT@GOTPAGE
Lloh12:
	ldr	x9, [x9, _CHANWIDTH_USE_HT@GOTPAGEOFF]
	b	LBB0_18
LBB0_17:
Lloh13:
	adrp	x9, _CHANWIDTH_80MHZ@GOTPAGE
Lloh14:
	ldr	x9, [x9, _CHANWIDTH_80MHZ@GOTPAGEOFF]
LBB0_18:
	ldr	w9, [x9]
	str	w9, [x20, #36]
LBB0_19:
	cbz	w8, LBB0_21
; %bb.20:
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_21:
	ldr	x8, [x20, #8]
	cmp	x8, #0
	b.gt	LBB0_23
; %bb.22:
	ldr	x8, [x19, #24]
	ldr	x8, [x8]
	cmp	x8, #1
	b.lt	LBB0_24
LBB0_23:
	str	x8, [x21]
LBB0_24:
	ldr	x8, [x20, #16]
	cmp	x8, #1
	b.lt	LBB0_26
; %bb.25:
	str	x8, [x21, #8]
	ldr	x8, [x19, #24]
	b	LBB0_28
LBB0_26:
	ldr	x8, [x19, #24]
	ldr	x9, [x8, #8]
	cmp	x9, #1
	b.lt	LBB0_28
; %bb.27:
	str	x9, [x21, #8]
LBB0_28:
	ldr	w9, [x8, #24]
	str	w9, [x21, #76]
	ldr	x9, [x20, #24]
Lloh15:
	adrp	x10, _DEFAULT_MESH_RSSI_THRESHOLD@GOTPAGE
Lloh16:
	ldr	x10, [x10, _DEFAULT_MESH_RSSI_THRESHOLD@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ge	LBB0_30
; %bb.29:
	str	x9, [x21, #56]
Lloh18:
	adrp	x9, _WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD@GOTPAGE
Lloh19:
	ldr	x9, [x9, _WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	ldr	w10, [x21, #72]
	orr	w9, w10, w9
	str	w9, [x21, #72]
LBB0_30:
	ldr	w9, [x20, #32]
Lloh21:
	adrp	x10, _WPA_KEY_MGMT_SAE@GOTPAGE
Lloh22:
	ldr	x10, [x10, _WPA_KEY_MGMT_SAE@GOTPAGEOFF]
Lloh23:
	ldr	w10, [x10]
	tst	w10, w9
	b.eq	LBB0_32
; %bb.31:
	mov	w9, #0
Lloh24:
	adrp	x10, _WPA_DRIVER_MESH_FLAG_SAE_AUTH@GOTPAGE
Lloh25:
	ldr	x10, [x10, _WPA_DRIVER_MESH_FLAG_SAE_AUTH@GOTPAGEOFF]
Lloh26:
	ldr	w10, [x10]
	ldr	w11, [x21, #80]
	orr	w10, w11, w10
Lloh27:
	adrp	x11, _WPA_DRIVER_MESH_FLAG_AMPE@GOTPAGE
Lloh28:
	ldr	x11, [x11, _WPA_DRIVER_MESH_FLAG_AMPE@GOTPAGEOFF]
Lloh29:
	ldr	w11, [x11]
	orr	w10, w11, w10
	str	w10, [x21, #80]
	mov	w10, #1
	str	w10, [x8, #16]
Lloh30:
	adrp	x10, _WPA_DRIVER_MESH_FLAG_USER_MPM@GOTPAGE
Lloh31:
	ldr	x10, [x10, _WPA_DRIVER_MESH_FLAG_USER_MPM@GOTPAGEOFF]
	b	LBB0_33
LBB0_32:
	ldr	w9, [x8, #16]
	cmp	w9, #0
	cset	w9, eq
Lloh32:
	adrp	x10, _WPA_DRIVER_MESH_FLAG_USER_MPM@GOTPAGE
Lloh33:
	ldr	x10, [x10, _WPA_DRIVER_MESH_FLAG_USER_MPM@GOTPAGEOFF]
Lloh34:
	adrp	x11, _WPA_DRIVER_MESH_FLAG_DRIVER_MPM@GOTPAGE
Lloh35:
	ldr	x11, [x11, _WPA_DRIVER_MESH_FLAG_DRIVER_MPM@GOTPAGEOFF]
	csel	x10, x11, x10, eq
LBB0_33:
	ldr	w10, [x10]
	ldr	w11, [x21, #80]
	orr	w10, w11, w10
	str	w10, [x21, #80]
	str	w9, [x21, #64]
	ldr	w8, [x8, #20]
	str	w8, [x21, #68]
	ldr	x0, [x19, #16]
	bl	_os_free
	str	x21, [x19, #16]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	bl	_wpa_supplicant_mesh_init
	cbz	x0, LBB0_35
; %bb.34:
Lloh36:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh38:
	ldr	w1, [x8]
Lloh39:
	adrp	x2, l_.str@PAGE
Lloh40:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_wpa_msg
	mov	x0, x19
	bl	_wpa_drv_leave_mesh
	mov	w19, #-1
	b	LBB0_14
LBB0_35:
	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	_wpas_mesh_complete
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOENT,4,2                     ; @ENOENT
	.comm	_WPA_CIPHER_NONE,8,3            ; @WPA_CIPHER_NONE
	.comm	_CHANWIDTH_80P80MHZ,4,2         ; @CHANWIDTH_80P80MHZ
	.comm	_CHANWIDTH_80MHZ,4,2            ; @CHANWIDTH_80MHZ
	.comm	_CHANWIDTH_160MHZ,4,2           ; @CHANWIDTH_160MHZ
	.comm	_CHANWIDTH_USE_HT,4,2           ; @CHANWIDTH_USE_HT
	.comm	_DEFAULT_MESH_RSSI_THRESHOLD,8,3 ; @DEFAULT_MESH_RSSI_THRESHOLD
	.comm	_WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD,4,2 ; @WPA_DRIVER_MESH_CONF_FLAG_RSSI_THRESHOLD
	.comm	_WPA_KEY_MGMT_SAE,4,2           ; @WPA_KEY_MGMT_SAE
	.comm	_WPA_DRIVER_MESH_FLAG_SAE_AUTH,4,2 ; @WPA_DRIVER_MESH_FLAG_SAE_AUTH
	.comm	_WPA_DRIVER_MESH_FLAG_AMPE,4,2  ; @WPA_DRIVER_MESH_FLAG_AMPE
	.comm	_WPA_DRIVER_MESH_FLAG_USER_MPM,4,2 ; @WPA_DRIVER_MESH_FLAG_USER_MPM
	.comm	_WPA_DRIVER_MESH_FLAG_DRIVER_MPM,4,2 ; @WPA_DRIVER_MESH_FLAG_DRIVER_MPM
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to init mesh"

.subsections_via_symbols
