	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_util_socket_and_bind           ## -- Begin function util_socket_and_bind
	.p2align	4, 0x90
_util_socket_and_bind:                  ## @util_socket_and_bind
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_FALSE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movq	_AF_INET@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movq	_SOCK_STREAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	xorl	%edx, %edx
	callq	_socket
	movl	$-1, %ebx
	cmpl	$-1, %eax
	je	LBB0_10
## %bb.1:
	movl	%eax, %r15d
	movl	(%r14), %eax
	movl	%eax, -56(%rbp)
	movq	$0, -64(%rbp)
	xorl	%eax, %eax
	callq	_rand
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_7
## %bb.2:
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	cltd
	idivl	%ecx
	movl	%edx, %ebx
	leaq	-72(%rbp), %r13
	xorl	%r14d, %r14d
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movslq	%ebx, %rcx
	movl	(%rax,%rcx,4), %eax
	movl	%eax, -72(%rbp)
	movl	%r15d, %edi
	movq	%r13, %rsi
	movl	$24, %edx
	callq	_bind
	cmpl	$-1, %eax
	jne	LBB0_6
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	incl	%ebx
	movl	(%r12), %eax
	cmpl	%eax, %ebx
	movl	$0, %ecx
	cmovel	%ecx, %ebx
	incl	%r14d
	cmpl	%eax, %r14d
	jl	LBB0_3
## %bb.5:
	movl	$-1, %ebx
	movl	-44(%rbp), %r13d                ## 4-byte Reload
LBB0_7:
	testl	%r13d, %r13d
	je	LBB0_8
LBB0_9:
	movq	_F_SETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	_F_GETFL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r15d, %edi
	xorl	%edx, %edx
	callq	_fcntl
	movq	_O_NONBLOCK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%r15d, %edi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_fcntl
	movl	%r15d, %ebx
	jmp	LBB0_10
LBB0_6:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %r13d
	movl	$-1, %ebx
	testl	%r13d, %r13d
	jne	LBB0_9
LBB0_8:
	movl	%r15d, %edi
	callq	_close
LBB0_10:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_FALSE,4,2                      ## @FALSE
	.comm	_AF_INET,4,2                    ## @AF_INET
	.comm	_SOCK_STREAM,4,2                ## @SOCK_STREAM
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_F_SETFL,4,2                    ## @F_SETFL
	.comm	_F_GETFL,4,2                    ## @F_GETFL
	.comm	_O_NONBLOCK,4,2                 ## @O_NONBLOCK
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_util_socket_and_bind           ; -- Begin function util_socket_and_bind
	.p2align	2
_util_socket_and_bind:                  ; @util_socket_and_bind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
Lloh0:
	adrp	x8, _FALSE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
Lloh3:
	adrp	x22, _AF_INET@GOTPAGE
Lloh4:
	ldr	x22, [x22, _AF_INET@GOTPAGEOFF]
	ldr	w0, [x22]
Lloh5:
	adrp	x8, _SOCK_STREAM@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SOCK_STREAM@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	w2, #0
	bl	_socket
	mov	x19, x0
	cmn	w0, #1
	b.eq	LBB0_9
; %bb.1:
	ldr	w8, [x22]
	str	w8, [sp, #24]
	str	xzr, [sp, #16]
	bl	_rand
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w22, #0
	sdiv	w9, w0, w8
	msub	w23, w9, w8, w0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	ldr	w8, [x8, w23, sxtw #2]
	str	w8, [sp, #8]
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #24
	bl	_bind
	cmn	w0, #1
	b.ne	LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	w8, w23, #1
	ldr	w9, [x20]
	cmp	w8, w9
	csinc	w23, wzr, w23, eq
	add	w22, w22, #1
	cmp	w22, w9
	b.lt	LBB0_3
LBB0_5:
	cbz	w21, LBB0_8
LBB0_6:
Lloh8:
	adrp	x8, _F_SETFL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _F_SETFL@GOTPAGEOFF]
Lloh10:
	ldr	w20, [x8]
Lloh11:
	adrp	x8, _F_GETFL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _F_GETFL@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #0
	bl	_fcntl
Lloh14:
	adrp	x8, _O_NONBLOCK@GOTPAGE
Lloh15:
	ldr	x8, [x8, _O_NONBLOCK@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	orr	w2, w8, w0
	mov	x0, x19
	mov	x1, x20
	bl	_fcntl
	b	LBB0_9
LBB0_7:
Lloh17:
	adrp	x8, _TRUE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh19:
	ldr	w21, [x8]
	cbnz	w21, LBB0_6
LBB0_8:
	mov	x0, x19
	bl	_close
	mov	w19, #-1
LBB0_9:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_FALSE,4,2                      ; @FALSE
	.comm	_AF_INET,4,2                    ; @AF_INET
	.comm	_SOCK_STREAM,4,2                ; @SOCK_STREAM
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_F_SETFL,4,2                    ; @F_SETFL
	.comm	_F_GETFL,4,2                    ; @F_GETFL
	.comm	_O_NONBLOCK,4,2                 ; @O_NONBLOCK
.subsections_via_symbols
