	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_php_network_bind_socket_to_local_addr ## -- Begin function php_network_bind_socket_to_local_addr
	.p2align	4, 0x90
_php_network_bind_socket_to_local_addr: ## @php_network_bind_socket_to_local_addr
	.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	%r9, %r14
	movq	%r8, %rbx
	movl	%edx, %r13d
	movl	%esi, -48(%rbp)                 ## 4-byte Spill
	leaq	-56(%rbp), %rdx
	movl	%r13d, %esi
	movq	%r8, %rcx
	callq	_php_network_getaddresses
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movq	-56(%rbp), %r12
	movq	(%r12), %r15
	testq	%r15, %r15
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_3
## %bb.4:
	addq	$8, %r12
	movq	_SOCK_ERR@GOTPCREL(%rip), %r14
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%eax, %eax
	callq	_php_socket_errno
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	callq	_closesocket
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r12), %r15
	addq	$8, %r12
	testq	%r15, %r15
	je	LBB0_11
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	movl	%r13d, %esi
	xorl	%edx, %edx
	callq	_socket
	cmpl	(%r14), %eax
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	%eax, %ebx
	cmpl	$129, (%r15)
	jne	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movl	$129, (%r15)
	movl	-48(%rbp), %edi                 ## 4-byte Reload
	callq	_htons
	movq	%rax, 8(%r15)
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	$16, %edx
	callq	_bind
	movq	_SOCK_CONN_ERR@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_8
	jmp	LBB0_15
LBB0_1:
	movl	$-1, %ebx
	jmp	LBB0_16
LBB0_3:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_11:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	je	LBB0_13
## %bb.12:
	movl	%edi, (%rax)
LBB0_13:
	movl	$-1, %ebx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	testq	%r14, %r14
	je	LBB0_15
## %bb.14:
	callq	_php_socket_error_str
	movq	%rax, (%r14)
LBB0_15:
	movq	-56(%rbp), %rdi
	callq	_php_network_freeaddresses
LBB0_16:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SOCK_ERR,4,2                   ## @SOCK_ERR
	.comm	_SOCK_CONN_ERR,4,2              ## @SOCK_CONN_ERR
	.comm	_IPPROTO_IPV6,4,2               ## @IPPROTO_IPV6
	.comm	_IPPROTO_TCP,4,2                ## @IPPROTO_TCP
	.comm	_IPV6_V6ONLY,4,2                ## @IPV6_V6ONLY
	.comm	_SOL_SOCKET,4,2                 ## @SOL_SOCKET
	.comm	_SO_BROADCAST,4,2               ## @SO_BROADCAST
	.comm	_SO_REUSEADDR,4,2               ## @SO_REUSEADDR
	.comm	_SO_REUSEPORT,4,2               ## @SO_REUSEPORT
	.comm	_STREAM_SOCKOP_IPV6_V6ONLY,8,3  ## @STREAM_SOCKOP_IPV6_V6ONLY
	.comm	_STREAM_SOCKOP_IPV6_V6ONLY_ENABLED,8,3 ## @STREAM_SOCKOP_IPV6_V6ONLY_ENABLED
	.comm	_STREAM_SOCKOP_SO_BROADCAST,8,3 ## @STREAM_SOCKOP_SO_BROADCAST
	.comm	_STREAM_SOCKOP_SO_REUSEPORT,8,3 ## @STREAM_SOCKOP_SO_REUSEPORT
	.comm	_STREAM_SOCKOP_TCP_NODELAY,8,3  ## @STREAM_SOCKOP_TCP_NODELAY
	.comm	_TCP_NODELAY,4,2                ## @TCP_NODELAY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_php_network_bind_socket_to_local_addr ; -- Begin function php_network_bind_socket_to_local_addr
	.p2align	2
_php_network_bind_socket_to_local_addr: ; @php_network_bind_socket_to_local_addr
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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, x5
	mov	x19, x4
	mov	x21, x2
	mov	x22, x1
	add	x2, sp, #8
	mov	x1, x21
	mov	x3, x4
	bl	_php_network_getaddresses
	cbz	w0, LBB0_15
; %bb.1:
	ldr	x8, [sp, #8]
	ldr	x25, [x8]
	str	x20, [sp]                       ; 8-byte Folded Spill
	mov	w23, #0
	cbz	x25, LBB0_9
; %bb.2:
	add	x26, x8, #8
Lloh0:
	adrp	x27, _SOCK_ERR@GOTPAGE
Lloh1:
	ldr	x27, [x27, _SOCK_ERR@GOTPAGEOFF]
	mov	w28, #129
Lloh2:
	adrp	x20, _SOCK_CONN_ERR@GOTPAGE
Lloh3:
	ldr	x20, [x20, _SOCK_CONN_ERR@GOTPAGEOFF]
	b	LBB0_6
LBB0_3:                                 ;   in Loop: Header=BB0_6 Depth=1
	bl	_php_socket_errno
	mov	x23, x0
LBB0_4:                                 ;   in Loop: Header=BB0_6 Depth=1
	mov	x0, x24
	bl	_closesocket
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=1
	ldr	x25, [x26], #8
	cbz	x25, LBB0_9
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x25]
	mov	x1, x21
	mov	w2, #0
	bl	_socket
	ldr	w8, [x27]
	cmp	w0, w8
	b.eq	LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	mov	x24, x0
	ldr	w8, [x25]
	cmp	w8, #129
	b.ne	LBB0_4
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=1
	str	w28, [x25]
	mov	x0, x22
	bl	_htons
	str	x0, [x25, #8]
	mov	x0, x24
	mov	x1, x25
	mov	w2, #16
	bl	_bind
	ldr	w8, [x20]
	cmp	w0, w8
	b.eq	LBB0_3
	b	LBB0_14
LBB0_9:
	ldr	x8, [sp]                        ; 8-byte Folded Reload
	cbz	x8, LBB0_11
; %bb.10:
	str	w23, [x8]
LBB0_11:
	cbz	x19, LBB0_13
; %bb.12:
	mov	x0, x23
	bl	_php_socket_error_str
	str	x0, [x19]
LBB0_13:
	mov	w24, #-1
LBB0_14:
	ldr	x0, [sp, #8]
	bl	_php_network_freeaddresses
	b	LBB0_16
LBB0_15:
	mov	w24, #-1
LBB0_16:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_SOCK_ERR,4,2                   ; @SOCK_ERR
	.comm	_SOCK_CONN_ERR,4,2              ; @SOCK_CONN_ERR
	.comm	_IPPROTO_IPV6,4,2               ; @IPPROTO_IPV6
	.comm	_IPPROTO_TCP,4,2                ; @IPPROTO_TCP
	.comm	_IPV6_V6ONLY,4,2                ; @IPV6_V6ONLY
	.comm	_SOL_SOCKET,4,2                 ; @SOL_SOCKET
	.comm	_SO_BROADCAST,4,2               ; @SO_BROADCAST
	.comm	_SO_REUSEADDR,4,2               ; @SO_REUSEADDR
	.comm	_SO_REUSEPORT,4,2               ; @SO_REUSEPORT
	.comm	_STREAM_SOCKOP_IPV6_V6ONLY,8,3  ; @STREAM_SOCKOP_IPV6_V6ONLY
	.comm	_STREAM_SOCKOP_IPV6_V6ONLY_ENABLED,8,3 ; @STREAM_SOCKOP_IPV6_V6ONLY_ENABLED
	.comm	_STREAM_SOCKOP_SO_BROADCAST,8,3 ; @STREAM_SOCKOP_SO_BROADCAST
	.comm	_STREAM_SOCKOP_SO_REUSEPORT,8,3 ; @STREAM_SOCKOP_SO_REUSEPORT
	.comm	_STREAM_SOCKOP_TCP_NODELAY,8,3  ; @STREAM_SOCKOP_TCP_NODELAY
	.comm	_TCP_NODELAY,4,2                ; @TCP_NODELAY
.subsections_via_symbols
