	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function connmanctl_scan
_connmanctl_scan:                       ## @connmanctl_scan
	.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
	subq	$544, %rsp                      ## imm = 0x220
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %r14
	movq	_RARCH_FILETYPE_UNSET@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_lines@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	callq	_free
LBB0_2:
	xorl	%eax, %eax
	callq	_string_list_new
	movq	%rax, (%r12)
	xorl	%eax, %eax
	callq	_connmanctl_tether_status
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	_MSG_LOCALAP_SWITCHING_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movq	_MESSAGE_QUEUE_ICON_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_MESSAGE_QUEUE_CATEGORY_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rsp)
	movl	%eax, %edi
	movl	$1, %esi
	movl	$180, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_runloop_msg_queue_push
	movl	$0, (%r14)
	leaq	L_.str(%rip), %rdx
	xorl	%edi, %edi
	movq	%rdx, %rsi
	callq	_connmanctl_tether_toggle
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str.2(%rip), %rbx
	movq	%rbx, %rsi
	callq	_popen
	movq	%rax, %rdi
	callq	_pclose
	leaq	L_.str.3(%rip), %rdi
	movq	%rbx, %rsi
	callq	_popen
	movq	%rax, %rdi
	callq	_pclose
	movq	_MSG_WIFI_SCAN_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movq	_MESSAGE_QUEUE_ICON_DEFAULT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	movq	_MESSAGE_QUEUE_CATEGORY_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, (%rsp)
	movl	%eax, %edi
	movl	$1, %esi
	movl	$180, %edx
	movl	$1, %ecx
	xorl	%r8d, %r8d
	callq	_runloop_msg_queue_push
	leaq	L_.str.4(%rip), %rdi
	movq	%rbx, %rsi
	callq	_popen
	movq	%rax, %r14
	leaq	-560(%rbp), %rbx
	movq	%rbx, %rdi
	movl	$512, %esi                      ## imm = 0x200
	movq	%rax, %rdx
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %rdi
	movq	%rbx, %rsi
	movl	%r15d, %edx
	callq	_string_list_append
	movq	%rbx, %rdi
	movl	$512, %esi                      ## imm = 0x200
	movq	%r14, %rdx
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	callq	_fgets
	testq	%rax, %rax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_strlen
	testq	%rax, %rax
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$10, -1(%rax,%rbx)
	jne	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movb	$0, -561(%rbp,%rax)
	jmp	LBB0_9
LBB0_10:
	movq	%r14, %rdi
	callq	_pclose
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	addq	$544, %rsp                      ## imm = 0x220
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RARCH_FILETYPE_UNSET,4,2       ## @RARCH_FILETYPE_UNSET
	.comm	_lines,8,3                      ## @lines
	.comm	_MSG_LOCALAP_SWITCHING_OFF,4,2  ## @MSG_LOCALAP_SWITCHING_OFF
	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ## @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ## @MESSAGE_QUEUE_CATEGORY_INFO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.space	1

L_.str.1:                               ## @.str.1
	.asciz	"connmanctl enable wifi"

L_.str.2:                               ## @.str.2
	.asciz	"r"

L_.str.3:                               ## @.str.3
	.asciz	"connmanctl scan wifi"

	.comm	_MSG_WIFI_SCAN_COMPLETE,4,2     ## @MSG_WIFI_SCAN_COMPLETE
L_.str.4:                               ## @.str.4
	.asciz	"connmanctl services"

	.no_dead_strip	_connmanctl_scan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function connmanctl_scan
_connmanctl_scan:                       ; @connmanctl_scan
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #528
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	bl	_config_get_ptr
	mov	x20, x0
Lloh3:
	adrp	x8, _RARCH_FILETYPE_UNSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RARCH_FILETYPE_UNSET@GOTPAGEOFF]
Lloh5:
	ldr	w19, [x8]
Lloh6:
	adrp	x21, _lines@GOTPAGE
Lloh7:
	ldr	x21, [x21, _lines@GOTPAGEOFF]
	ldr	x0, [x21]
	cbz	x0, LBB0_2
; %bb.1:
	bl	_free
LBB0_2:
	bl	_string_list_new
	str	x0, [x21]
	bl	_connmanctl_tether_status
Lloh8:
	adrp	x22, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGE
Lloh9:
	ldr	x22, [x22, _MESSAGE_QUEUE_ICON_DEFAULT@GOTPAGEOFF]
Lloh10:
	adrp	x23, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGE
Lloh11:
	ldr	x23, [x23, _MESSAGE_QUEUE_CATEGORY_INFO@GOTPAGEOFF]
	cbz	x0, LBB0_4
; %bb.3:
Lloh12:
	adrp	x8, _MSG_LOCALAP_SWITCHING_OFF@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MSG_LOCALAP_SWITCHING_OFF@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	ldr	w5, [x22]
	ldr	w6, [x23]
	mov	w1, #1
	mov	w2, #180
	mov	w3, #1
	mov	x4, #0
	bl	_runloop_msg_queue_push
	str	wzr, [x20]
Lloh15:
	adrp	x1, l_.str@PAGE
Lloh16:
	add	x1, x1, l_.str@PAGEOFF
	mov	w0, #0
	mov	x2, x1
	bl	_connmanctl_tether_toggle
LBB0_4:
Lloh17:
	adrp	x0, l_.str.1@PAGE
Lloh18:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh19:
	adrp	x20, l_.str.2@PAGE
Lloh20:
	add	x20, x20, l_.str.2@PAGEOFF
	mov	x1, x20
	bl	_popen
	bl	_pclose
Lloh21:
	adrp	x0, l_.str.3@PAGE
Lloh22:
	add	x0, x0, l_.str.3@PAGEOFF
	mov	x1, x20
	bl	_popen
	bl	_pclose
Lloh23:
	adrp	x8, _MSG_WIFI_SCAN_COMPLETE@GOTPAGE
Lloh24:
	ldr	x8, [x8, _MSG_WIFI_SCAN_COMPLETE@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	ldr	w5, [x22]
	ldr	w6, [x23]
	mov	w1, #1
	mov	w2, #180
	mov	w3, #1
	mov	x4, #0
	bl	_runloop_msg_queue_push
Lloh26:
	adrp	x0, l_.str.4@PAGE
Lloh27:
	add	x0, x0, l_.str.4@PAGEOFF
	mov	x1, x20
	bl	_popen
	mov	x20, x0
	add	x22, sp, #8
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x0, [x21]
	add	x1, sp, #8
	mov	x2, x19
	bl	_string_list_append
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	add	x0, sp, #8
	mov	w1, #512
	mov	x2, x20
	bl	_fgets
	cbz	x0, LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	add	x0, sp, #8
	bl	_strlen
	cbz	x0, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	sub	x8, x0, #1
	ldrb	w9, [x22, x8]
	cmp	w9, #10
	b.ne	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	strb	wzr, [x22, x8]
	b	LBB0_5
LBB0_10:
	mov	x0, x20
	bl	_pclose
	ldur	x8, [x29, #-56]
Lloh28:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh29:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh30:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	add	sp, sp, #528
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.cfi_endproc
                                        ; -- End function
	.comm	_RARCH_FILETYPE_UNSET,4,2       ; @RARCH_FILETYPE_UNSET
	.comm	_lines,8,3                      ; @lines
	.comm	_MSG_LOCALAP_SWITCHING_OFF,4,2  ; @MSG_LOCALAP_SWITCHING_OFF
	.comm	_MESSAGE_QUEUE_ICON_DEFAULT,4,2 ; @MESSAGE_QUEUE_ICON_DEFAULT
	.comm	_MESSAGE_QUEUE_CATEGORY_INFO,4,2 ; @MESSAGE_QUEUE_CATEGORY_INFO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.space	1

l_.str.1:                               ; @.str.1
	.asciz	"connmanctl enable wifi"

l_.str.2:                               ; @.str.2
	.asciz	"r"

l_.str.3:                               ; @.str.3
	.asciz	"connmanctl scan wifi"

	.comm	_MSG_WIFI_SCAN_COMPLETE,4,2     ; @MSG_WIFI_SCAN_COMPLETE
l_.str.4:                               ; @.str.4
	.asciz	"connmanctl services"

	.no_dead_strip	_connmanctl_scan
.subsections_via_symbols
