	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function global_open_pipe
_global_open_pipe:                      ## @global_open_pipe
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movl	$40, %edi
	callq	_os_zalloc
	movl	$-1, %r14d
	testq	%rax, %rax
	je	LBB0_17
## %bb.1:
	movq	%rax, %r13
	movq	_MSG_DEBUG@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r15, 32(%r13)
	movq	_INVALID_HANDLE_VALUE@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rax
	movq	%rax, (%r13)
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%edi, %edi
	movl	%edx, %esi
	xorl	%ecx, %ecx
	callq	_CreateEvent
	movq	%rax, 24(%r13)
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	movq	_wpa_supplicant_global_iface_receive@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	movl	$8, %esi
	movq	%r13, %rcx
	xorl	%r8d, %r8d
	callq	_eloop_register_event
	movq	_NAMED_PIPE_PREFIX@GOTPCREL(%rip), %rax
	movq	_PIPE_ACCESS_DUPLEX@GOTPCREL(%rip), %rcx
	movq	_FILE_FLAG_OVERLAPPED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %esi
	orl	(%rcx), %esi
	movq	_PIPE_TYPE_MESSAGE@GOTPCREL(%rip), %rcx
	movq	_PIPE_READMODE_MESSAGE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	orl	(%rcx), %edx
	movl	(%rax), %edi
	movq	_PIPE_WAIT@GOTPCREL(%rip), %rax
	orl	(%rax), %edx
	movq	_REPLY_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_REQUEST_BUFSIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$10, %ecx
	pushq	$0
	pushq	$1000                           ## imm = 0x3E8
	callq	_CreateNamedPipe
	addq	$16, %rsp
	movq	%rax, (%r13)
	cmpq	(%rbx), %rax
	jne	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %r15
	jmp	LBB0_3
LBB0_2:
	leaq	L_.str.1(%rip), %r15
LBB0_3:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	xorl	%eax, %eax
	callq	_GetLastError
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	%r13, %rdi
	callq	_global_close_pipe
	jmp	LBB0_17
LBB0_6:
	movq	%r13, %rbx
	addq	$24, %rbx
	movq	%rax, %rdi
	movq	%rbx, %rsi
	callq	_ConnectNamedPipe
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movq	_MSG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	xorl	%eax, %eax
	callq	_GetLastError
	leaq	L_.str.3(%rip), %rsi
	movl	%r15d, %edi
	jmp	LBB0_16
LBB0_8:
	xorl	%eax, %eax
	callq	_GetLastError
	cmpl	$128, %eax
	je	LBB0_14
## %bb.9:
	cmpl	$129, %eax
	jne	LBB0_15
## %bb.10:
	movl	(%r12), %edi
	leaq	L_.str.4(%rip), %rsi
	xorl	%eax, %eax
	callq	_wpa_printf
	jmp	LBB0_11
LBB0_14:
	movl	(%r12), %edi
	leaq	L_.str.5(%rip), %rsi
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	(%rbx), %rdi
	callq	_SetEvent
	testl	%eax, %eax
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	je	LBB0_15
LBB0_11:
	movq	(%r15), %rax
	movq	%rax, 16(%r13)
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:
	movq	%r13, 8(%rax)
LBB0_13:
	movq	%r13, (%r15)
	xorl	%r14d, %r14d
	jmp	LBB0_17
LBB0_15:
	movl	(%r12), %edi
	leaq	L_.str.6(%rip), %rsi
LBB0_16:
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_wpa_printf
	movq	(%r13), %rdi
	callq	_CloseHandle
	movq	%r13, %rdi
	callq	_os_free
LBB0_17:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MSG_DEBUG,4,2                  ## @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CTRL: Open pipe %p"

	.comm	_INVALID_HANDLE_VALUE,8,3       ## @INVALID_HANDLE_VALUE
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_MSG_ERROR,4,2                  ## @MSG_ERROR
L_.str.1:                               ## @.str.1
	.asciz	"CTRL: CreateEvent failed: %d"

	.comm	_wpa_supplicant_global_iface_receive,4,2 ## @wpa_supplicant_global_iface_receive
	.comm	_NAMED_PIPE_PREFIX,4,2          ## @NAMED_PIPE_PREFIX
	.comm	_PIPE_ACCESS_DUPLEX,4,2         ## @PIPE_ACCESS_DUPLEX
	.comm	_FILE_FLAG_OVERLAPPED,4,2       ## @FILE_FLAG_OVERLAPPED
	.comm	_PIPE_TYPE_MESSAGE,4,2          ## @PIPE_TYPE_MESSAGE
	.comm	_PIPE_READMODE_MESSAGE,4,2      ## @PIPE_READMODE_MESSAGE
	.comm	_PIPE_WAIT,4,2                  ## @PIPE_WAIT
	.comm	_REPLY_BUFSIZE,4,2              ## @REPLY_BUFSIZE
	.comm	_REQUEST_BUFSIZE,4,2            ## @REQUEST_BUFSIZE
L_.str.2:                               ## @.str.2
	.asciz	"CTRL: CreateNamedPipe failed: %d"

L_.str.3:                               ## @.str.3
	.asciz	"CTRL: ConnectNamedPipe failed: %d"

L_.str.4:                               ## @.str.4
	.asciz	"CTRL: ConnectNamedPipe: connection in progress"

L_.str.5:                               ## @.str.5
	.asciz	"CTRL: ConnectNamedPipe: already connected"

L_.str.6:                               ## @.str.6
	.asciz	"CTRL: ConnectNamedPipe error: %d"

	.no_dead_strip	_global_open_pipe
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function global_open_pipe
_global_open_pipe:                      ; @global_open_pipe
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x20, x0
	mov	w0, #40
	bl	_os_zalloc
	cbz	x0, LBB0_17
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x23, _MSG_DEBUG@GOTPAGE
Lloh1:
	ldr	x23, [x23, _MSG_DEBUG@GOTPAGEOFF]
	ldr	w0, [x23]
	str	x19, [sp]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	bl	_wpa_printf
Lloh4:
	adrp	x22, _INVALID_HANDLE_VALUE@GOTPAGE
Lloh5:
	ldr	x22, [x22, _INVALID_HANDLE_VALUE@GOTPAGEOFF]
	str	x20, [x19, #32]
	ldr	x8, [x22]
	str	x8, [x19]
Lloh6:
	adrp	x8, _TRUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, #0
	mov	x2, x1
	mov	x3, #0
	bl	_CreateEvent
	mov	x21, x19
	str	x0, [x21, #24]!
	cbz	x0, LBB0_4
; %bb.2:
Lloh9:
	adrp	x8, _wpa_supplicant_global_iface_receive@GOTPAGE
Lloh10:
	ldr	x8, [x8, _wpa_supplicant_global_iface_receive@GOTPAGEOFF]
Lloh11:
	ldr	w2, [x8]
	mov	w1, #8
	mov	x3, x19
	mov	x4, #0
	bl	_eloop_register_event
Lloh12:
	adrp	x8, _NAMED_PIPE_PREFIX@GOTPAGE
Lloh13:
	ldr	x8, [x8, _NAMED_PIPE_PREFIX@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
Lloh15:
	adrp	x8, _PIPE_ACCESS_DUPLEX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _PIPE_ACCESS_DUPLEX@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
Lloh18:
	adrp	x9, _FILE_FLAG_OVERLAPPED@GOTPAGE
Lloh19:
	ldr	x9, [x9, _FILE_FLAG_OVERLAPPED@GOTPAGEOFF]
Lloh20:
	ldr	w9, [x9]
	orr	w1, w9, w8
Lloh21:
	adrp	x8, _PIPE_TYPE_MESSAGE@GOTPAGE
Lloh22:
	ldr	x8, [x8, _PIPE_TYPE_MESSAGE@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _PIPE_READMODE_MESSAGE@GOTPAGE
Lloh25:
	ldr	x9, [x9, _PIPE_READMODE_MESSAGE@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh27:
	adrp	x9, _PIPE_WAIT@GOTPAGE
Lloh28:
	ldr	x9, [x9, _PIPE_WAIT@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	orr	w2, w8, w9
Lloh30:
	adrp	x8, _REPLY_BUFSIZE@GOTPAGE
Lloh31:
	ldr	x8, [x8, _REPLY_BUFSIZE@GOTPAGEOFF]
Lloh32:
	ldr	w4, [x8]
Lloh33:
	adrp	x8, _REQUEST_BUFSIZE@GOTPAGE
Lloh34:
	ldr	x8, [x8, _REQUEST_BUFSIZE@GOTPAGEOFF]
Lloh35:
	ldr	w5, [x8]
	mov	w3, #10
	mov	w6, #1000
	mov	x7, #0
	bl	_CreateNamedPipe
	str	x0, [x19]
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_6
; %bb.3:
Lloh36:
	adrp	x20, l_.str.2@PAGE
Lloh37:
	add	x20, x20, l_.str.2@PAGEOFF
	b	LBB0_5
LBB0_4:
Lloh38:
	adrp	x20, l_.str.1@PAGE
Lloh39:
	add	x20, x20, l_.str.1@PAGEOFF
LBB0_5:
Lloh40:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh42:
	ldr	w21, [x8]
	bl	_GetLastError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
	mov	x0, x21
	mov	x1, x20
	bl	_wpa_printf
	mov	x0, x19
	bl	_global_close_pipe
	b	LBB0_17
LBB0_6:
	mov	x1, x21
	bl	_ConnectNamedPipe
	cbz	x0, LBB0_8
; %bb.7:
Lloh43:
	adrp	x8, _MSG_ERROR@GOTPAGE
Lloh44:
	ldr	x8, [x8, _MSG_ERROR@GOTPAGEOFF]
Lloh45:
	ldr	w20, [x8]
	bl	_GetLastError
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh46:
	adrp	x1, l_.str.3@PAGE
Lloh47:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	b	LBB0_16
LBB0_8:
	bl	_GetLastError
	mov	x22, x0
	cmp	w0, #128
	b.eq	LBB0_11
; %bb.9:
	cmp	w22, #129
	b.ne	LBB0_15
; %bb.10:
	ldr	w0, [x23]
Lloh48:
	adrp	x1, l_.str.4@PAGE
Lloh49:
	add	x1, x1, l_.str.4@PAGEOFF
	bl	_wpa_printf
	b	LBB0_12
LBB0_11:
	ldr	w0, [x23]
Lloh50:
	adrp	x1, l_.str.5@PAGE
Lloh51:
	add	x1, x1, l_.str.5@PAGEOFF
	bl	_wpa_printf
	ldr	x0, [x21]
	bl	_SetEvent
	cbz	w0, LBB0_15
LBB0_12:
	ldr	x8, [x20]
	str	x8, [x19, #16]
	cbz	x8, LBB0_14
; %bb.13:
	str	x19, [x8, #8]
LBB0_14:
	mov	w0, #0
	str	x19, [x20]
	b	LBB0_18
LBB0_15:
	ldr	w0, [x23]
	str	x22, [sp]
Lloh52:
	adrp	x1, l_.str.6@PAGE
Lloh53:
	add	x1, x1, l_.str.6@PAGEOFF
LBB0_16:
	bl	_wpa_printf
	ldr	x0, [x19]
	bl	_CloseHandle
	mov	x0, x19
	bl	_os_free
LBB0_17:
	mov	w0, #-1
LBB0_18:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpAdd	Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpAdd	Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.cfi_endproc
                                        ; -- End function
	.comm	_MSG_DEBUG,4,2                  ; @MSG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CTRL: Open pipe %p"

	.comm	_INVALID_HANDLE_VALUE,8,3       ; @INVALID_HANDLE_VALUE
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_MSG_ERROR,4,2                  ; @MSG_ERROR
l_.str.1:                               ; @.str.1
	.asciz	"CTRL: CreateEvent failed: %d"

	.comm	_wpa_supplicant_global_iface_receive,4,2 ; @wpa_supplicant_global_iface_receive
	.comm	_NAMED_PIPE_PREFIX,4,2          ; @NAMED_PIPE_PREFIX
	.comm	_PIPE_ACCESS_DUPLEX,4,2         ; @PIPE_ACCESS_DUPLEX
	.comm	_FILE_FLAG_OVERLAPPED,4,2       ; @FILE_FLAG_OVERLAPPED
	.comm	_PIPE_TYPE_MESSAGE,4,2          ; @PIPE_TYPE_MESSAGE
	.comm	_PIPE_READMODE_MESSAGE,4,2      ; @PIPE_READMODE_MESSAGE
	.comm	_PIPE_WAIT,4,2                  ; @PIPE_WAIT
	.comm	_REPLY_BUFSIZE,4,2              ; @REPLY_BUFSIZE
	.comm	_REQUEST_BUFSIZE,4,2            ; @REQUEST_BUFSIZE
l_.str.2:                               ; @.str.2
	.asciz	"CTRL: CreateNamedPipe failed: %d"

l_.str.3:                               ; @.str.3
	.asciz	"CTRL: ConnectNamedPipe failed: %d"

l_.str.4:                               ; @.str.4
	.asciz	"CTRL: ConnectNamedPipe: connection in progress"

l_.str.5:                               ; @.str.5
	.asciz	"CTRL: ConnectNamedPipe: already connected"

l_.str.6:                               ; @.str.6
	.asciz	"CTRL: ConnectNamedPipe error: %d"

	.no_dead_strip	_global_open_pipe
.subsections_via_symbols
