	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mingw_socket                   ## -- Begin function mingw_socket
	.p2align	4, 0x90
_mingw_socket:                          ## @mingw_socket
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movl	%edi, %ebx
	xorl	%eax, %eax
	callq	_ensure_socket_initialization
	movl	%ebx, %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	callq	_WSASocket
	movq	%rax, %rbx
	movq	_INVALID_SOCKET@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rbx
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_WSAGetLastError
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %eax
	jmp	LBB0_3
LBB0_2:
	movq	_O_RDWR@GOTPCREL(%rip), %rax
	movq	_O_BINARY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	movq	%rbx, %rdi
	callq	__open_osfhandle
	testl	%eax, %eax
	js	LBB0_4
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	%rbx, %rdi
	callq	_closesocket
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_error                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_INVALID_SOCKET,8,3             ## @INVALID_SOCKET
	.comm	_errno,4,2                      ## @errno
	.comm	_O_RDWR,4,2                     ## @O_RDWR
	.comm	_O_BINARY,4,2                   ## @O_BINARY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"unable to make a socket file descriptor: %s"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mingw_socket                   ; -- Begin function mingw_socket
	.p2align	2
_mingw_socket:                          ; @mingw_socket
	.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, x2
	mov	x20, x1
	mov	x21, x0
	bl	_ensure_socket_initialization
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	mov	x3, #0
	mov	w4, #0
	mov	w5, #0
	bl	_WSASocket
Lloh0:
	adrp	x8, _INVALID_SOCKET@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INVALID_SOCKET@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.1:
	bl	_WSAGetLastError
Lloh3:
	adrp	x8, _errno@GOTPAGE
Lloh4:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh5:
	str	w0, [x8]
	mov	w0, #-1
	b	LBB0_3
LBB0_2:
	mov	x19, x0
Lloh6:
	adrp	x8, _O_RDWR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _O_RDWR@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _O_BINARY@GOTPAGE
Lloh10:
	ldr	x9, [x9, _O_BINARY@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w1, w9, w8
	bl	__open_osfhandle
	tbnz	w0, #31, LBB0_4
LBB0_3:
	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_4:
	mov	x0, x19
	bl	_closesocket
Lloh12:
	adrp	x8, _errno@GOTPAGE
Lloh13:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_strerror
	mov	x1, x0
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	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	_error
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_INVALID_SOCKET,8,3             ; @INVALID_SOCKET
	.comm	_errno,4,2                      ; @errno
	.comm	_O_RDWR,4,2                     ; @O_RDWR
	.comm	_O_BINARY,4,2                   ; @O_BINARY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"unable to make a socket file descriptor: %s"

.subsections_via_symbols
