	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hostapd_cli_open_connection
_hostapd_cli_open_connection:           ## @hostapd_cli_open_connection
	.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
	testq	%rdi, %rdi
	je	LBB0_8
## %bb.1:
	movq	%rdi, %rbx
	movq	_ctrl_iface_dir@GOTPCREL(%rip), %r12
	movq	(%r12), %rdi
	callq	_strlen
	movl	%eax, %r14d
	movq	%rbx, %rdi
	callq	_strlen
                                        ## kill: def $eax killed $eax def $rax
	leal	(%r14,%rax), %r15d
	addl	$2, %r15d
	movl	%r15d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r14
	movq	(%r12), %rcx
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rdi
	movl	%r15d, %esi
	movq	%rbx, %r8
	callq	_snprintf
	movq	_client_socket_dir@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	testq	%rsi, %rsi
	je	LBB0_3
## %bb.5:
	cmpq	$0, (%rsi)
	je	LBB0_4
## %bb.6:
	movq	_F_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	%rsi, %rdi
	movl	%eax, %esi
	callq	_access
	movq	(%rbx), %rsi
	testq	%rax, %rax
	jns	LBB0_4
## %bb.7:
	movq	%rsi, %rdi
	callq	_perror
	movq	%r14, %rdi
	callq	_free
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_3:
	xorl	%esi, %esi
LBB0_4:
	movq	%r14, %rdi
	callq	_wpa_ctrl_open2
	movq	_ctrl_conn@GOTPCREL(%rip), %rbx
	movq	%rax, (%rbx)
	movq	%r14, %rdi
	callq	_free
	movq	(%rbx), %rax
LBB0_9:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ctrl_iface_dir,8,3             ## @ctrl_iface_dir
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/%s"

	.comm	_client_socket_dir,8,3          ## @client_socket_dir
	.comm	_F_OK,4,2                       ## @F_OK
	.comm	_ctrl_conn,8,3                  ## @ctrl_conn
	.no_dead_strip	_hostapd_cli_open_connection
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hostapd_cli_open_connection
_hostapd_cli_open_connection:           ; @hostapd_cli_open_connection
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x20, x0
Lloh0:
	adrp	x22, _ctrl_iface_dir@GOTPAGE
Lloh1:
	ldr	x22, [x22, _ctrl_iface_dir@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_strlen
	mov	x19, x0
	mov	x0, x20
	bl	_strlen
	add	w8, w19, w0
	add	w21, w8, #2
	mov	x0, x21
	bl	_malloc
	cbz	x0, LBB0_6
; %bb.2:
	mov	x19, x0
	ldr	x3, [x22]
Lloh2:
	adrp	x2, l_.str@PAGE
Lloh3:
	add	x2, x2, l_.str@PAGEOFF
	mov	x1, x21
	mov	x4, x20
	bl	_snprintf
Lloh4:
	adrp	x20, _client_socket_dir@GOTPAGE
Lloh5:
	ldr	x20, [x20, _client_socket_dir@GOTPAGEOFF]
	ldr	x1, [x20]
	cbz	x1, LBB0_5
; %bb.3:
	ldr	x8, [x1]
	cbz	x8, LBB0_5
; %bb.4:
Lloh6:
	adrp	x8, _F_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _F_OK@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	x0, x1
	mov	x1, x8
	bl	_access
	ldr	x1, [x20]
	tbnz	x0, #63, LBB0_7
LBB0_5:
	mov	x0, x19
	bl	_wpa_ctrl_open2
Lloh9:
	adrp	x20, _ctrl_conn@GOTPAGE
Lloh10:
	ldr	x20, [x20, _ctrl_conn@GOTPAGEOFF]
	str	x0, [x20]
	mov	x0, x19
	bl	_free
	ldr	x0, [x20]
LBB0_6:
	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_7:
	mov	x0, x1
	bl	_perror
	mov	x0, x19
	bl	_free
	mov	x0, #0
	b	LBB0_6
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ctrl_iface_dir,8,3             ; @ctrl_iface_dir
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/%s"

	.comm	_client_socket_dir,8,3          ; @client_socket_dir
	.comm	_F_OK,4,2                       ; @F_OK
	.comm	_ctrl_conn,8,3                  ; @ctrl_conn
	.no_dead_strip	_hostapd_cli_open_connection
.subsections_via_symbols
