	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function getsocket
_getsocket:                             ## @getsocket
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r8d, -60(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r12
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movq	%rsi, %r14
	movq	%rdi, %rbx
	leaq	-120(%rbp), %r15
	xorl	%r13d, %r13d
	movq	%r15, %rdi
	xorl	%esi, %esi
	movl	$32, %edx
	callq	_memset
	movq	_AF_UNSPEC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -100(%rbp)
	movq	_SOCK_DGRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -104(%rbp)
	leaq	-56(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_getaddrinfo
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	%eax, %edi
	callq	_gai_strerror
	leaq	L_.str.1(%rip), %rsi
	movl	%r15d, %edi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	movl	%eax, %r8d
	xorl	%eax, %eax
	callq	_ERRX
LBB0_2:
	movq	-56(%rbp), %rbx
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.4:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	cmpq	_connector@GOTPCREL(%rip), %rcx
	sete	%al
	cmpq	_bind@GOTPCREL(%rip), %rcx
	sete	%dl
	leaq	L_.str.4(%rip), %rcx
	leaq	L_.str.5(%rip), %rsi
	cmoveq	%rcx, %rsi
	movq	%rsi, -88(%rbp)                 ## 8-byte Spill
	orb	%al, %dl
	movb	%dl, -41(%rbp)                  ## 1-byte Spill
	movq	_errno@GOTPCREL(%rip), %r12
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %r13d
	movl	%r14d, %edi
	callq	_close
LBB0_12:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%rbx), %rbx
	testq	%rbx, %rbx
	je	LBB0_13
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	20(%rbx), %edi
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	callq	_socket
	cmpl	$-1, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %r14d
	movl	%eax, %edi
	movq	%rbx, %rsi
	callq	_allowv4mapped
	leaq	L_.str.3(%rip), %r15
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	(%rbx), %rsi
	movl	8(%rbx), %edx
	movl	%r14d, %edi
	callq	*-72(%rbp)                      ## 8-byte Folded Reload
	movq	-88(%rbp), %r15                 ## 8-byte Reload
	cmpl	$-1, %eax
	je	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	cmpb	$0, -41(%rbp)                   ## 1-byte Folded Reload
	je	LBB0_16
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%r14d, %edi
	movq	%rbx, %rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_addmc
	leaq	L_.str.6(%rip), %r15
	cmpl	$-1, %eax
	je	LBB0_11
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r12), %r13d
	leaq	L_.str.2(%rip), %r15
	jmp	LBB0_12
LBB0_13:
	movq	-56(%rbp), %rdi
	jmp	LBB0_14
LBB0_3:
	leaq	L_.str(%rip), %r15
	xorl	%edi, %edi
LBB0_14:
	callq	_freeaddrinfo
	movq	_EXIT_FAILURE@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r13d, %edi
	callq	_strerror
	movslq	%eax, %rcx
	leaq	L_.str.7(%rip), %rsi
	movl	%ebx, %edi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_ERRX
	movl	$-1, %r14d
	jmp	LBB0_15
LBB0_16:
	movl	8(%rbx), %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	-56(%rbp), %rdi
	callq	_freeaddrinfo
LBB0_15:
	movl	%r14d, %eax
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"?"

	.comm	_AF_UNSPEC,4,2                  ## @AF_UNSPEC
	.comm	_SOCK_DGRAM,4,2                 ## @SOCK_DGRAM
	.comm	_EXIT_FAILURE,4,2               ## @EXIT_FAILURE
L_.str.1:                               ## @.str.1
	.asciz	"Can't resolve %s:%s (%s)"

	.comm	_errno,4,2                      ## @errno
L_.str.2:                               ## @.str.2
	.asciz	"socket"

L_.str.3:                               ## @.str.3
	.asciz	"allow v4 mapped"

L_.str.4:                               ## @.str.4
	.asciz	"bind"

L_.str.5:                               ## @.str.5
	.asciz	"connect"

L_.str.6:                               ## @.str.6
	.asciz	"join group"

L_.str.7:                               ## @.str.7
	.asciz	"%s (%s)"

	.no_dead_strip	_getsocket
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function getsocket
_getsocket:                             ; @getsocket
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x1
	mov	x23, x0
	add	x0, sp, #32
	mov	w1, #0
	mov	w2, #32
	bl	_memset
Lloh0:
	adrp	x8, _AF_UNSPEC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AF_UNSPEC@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _SOCK_DGRAM@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SOCK_DGRAM@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #48]
	add	x2, sp, #32
	add	x3, sp, #24
	mov	x0, x23
	mov	x1, x22
	bl	_getaddrinfo
Lloh6:
	adrp	x26, _EXIT_FAILURE@GOTPAGE
Lloh7:
	ldr	x26, [x26, _EXIT_FAILURE@GOTPAGEOFF]
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w24, [x26]
	bl	_gai_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x24
	mov	x2, x23
	mov	x3, x22
	bl	_ERRX
LBB0_2:
	ldr	x22, [sp, #24]
	cbz	x22, LBB0_13
; %bb.3:
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
Lloh10:
	adrp	x8, _bind@GOTPAGE
Lloh11:
	ldr	x8, [x8, _bind@GOTPAGEOFF]
Lloh12:
	adrp	x9, _connector@GOTPAGE
Lloh13:
	ldr	x9, [x9, _connector@GOTPAGEOFF]
	cmp	x21, x9
	cset	w9, eq
Lloh14:
	adrp	x10, l_.str.5@PAGE
Lloh15:
	add	x10, x10, l_.str.5@PAGEOFF
Lloh16:
	adrp	x11, l_.str.4@PAGE
Lloh17:
	add	x11, x11, l_.str.4@PAGEOFF
	cmp	x21, x8
	csel	x27, x11, x10, eq
	cset	w8, eq
	orr	w28, w8, w9
Lloh18:
	adrp	x19, _errno@GOTPAGE
Lloh19:
	ldr	x19, [x19, _errno@GOTPAGEOFF]
Lloh20:
	adrp	x26, l_.str.2@PAGE
Lloh21:
	add	x26, x26, l_.str.2@PAGEOFF
	b	LBB0_6
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
Lloh22:
	adrp	x24, l_.str.3@PAGE
Lloh23:
	add	x24, x24, l_.str.3@PAGEOFF
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	w25, [x19]
	mov	x0, x23
	bl	_close
	ldr	x22, [x22, #24]
	cbz	x22, LBB0_12
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldp	w1, w0, [x22, #16]
	ldr	w2, [x22, #12]
	bl	_socket
	cmn	w0, #1
	b.eq	LBB0_11
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x23, x0
	mov	x1, x22
	bl	_allowv4mapped
	cmn	w0, #1
	b.eq	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	x1, [x22]
	ldr	w2, [x22, #8]
	mov	x0, x23
	blr	x21
	mov	x24, x27
	cmn	w0, #1
	b.eq	LBB0_5
; %bb.9:                                ;   in Loop: Header=BB0_6 Depth=1
	cbz	w28, LBB0_15
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x23
	mov	x1, x22
	mov	x2, x20
	bl	_addmc
Lloh24:
	adrp	x24, l_.str.6@PAGE
Lloh25:
	add	x24, x24, l_.str.6@PAGEOFF
	cmn	w0, #1
	b.eq	LBB0_5
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_6 Depth=1
	ldr	w25, [x19]
	mov	x24, x26
	ldr	x22, [x22, #24]
	cbnz	x22, LBB0_6
LBB0_12:
	ldr	x0, [sp, #24]
Lloh26:
	adrp	x26, _EXIT_FAILURE@GOTPAGE
Lloh27:
	ldr	x26, [x26, _EXIT_FAILURE@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
	mov	x0, #0
	mov	w25, #0
Lloh28:
	adrp	x24, l_.str@PAGE
Lloh29:
	add	x24, x24, l_.str@PAGEOFF
LBB0_14:
	bl	_freeaddrinfo
	ldr	w19, [x26]
	mov	x0, x25
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	sxtw	x3, w0
Lloh30:
	adrp	x1, l_.str.7@PAGE
Lloh31:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	bl	_ERRX
	mov	w23, #-1
	b	LBB0_16
LBB0_15:
	ldr	w8, [x22, #8]
	ldp	x9, x0, [sp, #16]               ; 8-byte Folded Reload
	str	w8, [x9]
	bl	_freeaddrinfo
LBB0_16:
	mov	x0, x23
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"?"

	.comm	_AF_UNSPEC,4,2                  ; @AF_UNSPEC
	.comm	_SOCK_DGRAM,4,2                 ; @SOCK_DGRAM
	.comm	_EXIT_FAILURE,4,2               ; @EXIT_FAILURE
l_.str.1:                               ; @.str.1
	.asciz	"Can't resolve %s:%s (%s)"

	.comm	_errno,4,2                      ; @errno
l_.str.2:                               ; @.str.2
	.asciz	"socket"

l_.str.3:                               ; @.str.3
	.asciz	"allow v4 mapped"

l_.str.4:                               ; @.str.4
	.asciz	"bind"

l_.str.5:                               ; @.str.5
	.asciz	"connect"

l_.str.6:                               ; @.str.6
	.asciz	"join group"

l_.str.7:                               ; @.str.7
	.asciz	"%s (%s)"

	.no_dead_strip	_getsocket
.subsections_via_symbols
