	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function create_socket
_create_socket:                         ## @create_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	%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	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r12
	movq	%rsi, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	leaq	-48(%rbp), %r13
	movq	%r13, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movl	$4, -48(%rbp)
	movl	8(%r12), %edi
	leaq	-44(%rbp), %r15
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_nl_addr_fill_sockaddr
	testl	%eax, %eax
	jne	LBB0_1
## %bb.2:
	movl	$4, (%rbx)
	movl	4(%r12), %edi
	leaq	4(%rbx), %r13
	movq	%r13, %rsi
	movq	%rbx, %rdx
	callq	_nl_addr_fill_sockaddr
	testl	%eax, %eax
	je	LBB0_3
LBB0_1:
	movq	_EADDRNOTAVAIL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	$-1, %ebx
LBB0_8:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_3:
	movq	_PORT_DISCARD@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r12), %edx
	movq	%r13, %rdi
	callq	_set_link_port
	movl	$-1, %ebx
	testl	%eax, %eax
	jne	LBB0_8
## %bb.4:
	movl	(%r13), %edi
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movq	_SOCK_CLOEXEC@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	orl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_8
## %bb.5:
	movl	%eax, %r12d
	movl	-48(%rbp), %edx
	movl	%eax, %edi
	movq	%r15, %rsi
	callq	_bind
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%r12d, %edi
	callq	_close
	jmp	LBB0_8
LBB0_7:
	movl	%r12d, (%r14)
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.cfi_endproc
                                        ## -- End function
	.comm	_EADDRNOTAVAIL,4,2              ## @EADDRNOTAVAIL
	.comm	_errno,4,2                      ## @errno
	.comm	_PORT_DISCARD,4,2               ## @PORT_DISCARD
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_SOCK_CLOEXEC,4,2               ## @SOCK_CLOEXEC
	.no_dead_strip	_create_socket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function create_socket
_create_socket:                         ; @create_socket
	.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	x19, x2
	mov	x22, x1
	mov	x21, x0
	mov	x0, x1
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x20, sp, #8
	add	x0, sp, #8
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	mov	w24, #4
	str	w24, [sp, #8]
	ldr	w0, [x21, #8]
	orr	x20, x20, #0x4
	add	x2, sp, #8
	mov	x1, x20
	bl	_nl_addr_fill_sockaddr
	cbnz	w0, LBB0_2
; %bb.1:
	mov	x23, x22
	str	w24, [x23], #4
	ldr	w0, [x21, #4]
	mov	x1, x23
	mov	x2, x22
	bl	_nl_addr_fill_sockaddr
	cbz	w0, LBB0_5
LBB0_2:
Lloh0:
	adrp	x8, _EADDRNOTAVAIL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EADDRNOTAVAIL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _errno@GOTPAGE
Lloh4:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh5:
	str	w8, [x9]
LBB0_3:
	mov	w0, #-1
LBB0_4:
	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
LBB0_5:
Lloh6:
	adrp	x8, _PORT_DISCARD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PORT_DISCARD@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	ldr	w2, [x21]
	mov	x0, x23
	bl	_set_link_port
	cbnz	w0, LBB0_3
; %bb.6:
Lloh9:
	adrp	x8, _SOCK_DGRAM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SOCK_DGRAM@GOTPAGEOFF]
	ldr	w0, [x23]
Lloh11:
	ldr	w8, [x8]
Lloh12:
	adrp	x9, _SOCK_CLOEXEC@GOTPAGE
Lloh13:
	ldr	x9, [x9, _SOCK_CLOEXEC@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w1, w9, w8
	mov	w2, #0
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.7:
	mov	x21, x0
	ldr	w2, [sp, #8]
	mov	x1, x20
	bl	_bind
	cbz	w0, LBB0_9
; %bb.8:
	mov	x0, x21
	bl	_close
	b	LBB0_3
LBB0_9:
	str	w21, [x19]
	b	LBB0_4
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EADDRNOTAVAIL,4,2              ; @EADDRNOTAVAIL
	.comm	_errno,4,2                      ; @errno
	.comm	_PORT_DISCARD,4,2               ; @PORT_DISCARD
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_SOCK_CLOEXEC,4,2               ; @SOCK_CLOEXEC
	.no_dead_strip	_create_socket
.subsections_via_symbols
