	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_redis_check_eof                ## -- Begin function redis_check_eof
	.p2align	4, 0x90
_redis_check_eof:                       ## @redis_check_eof
	.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
	movl	%esi, %r14d
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.1:
	movq	%rdi, %r12
	movq	40(%rdi), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	movq	(%r12), %rax
	movq	_REDIS_SOCK_STATUS_FAILED@GOTPCREL(%rip), %r13
	cmpq	(%r13), %rax
	jne	LBB0_5
LBB0_3:
	movl	$-1, %ebx
	testl	%r14d, %r14d
	jne	LBB0_29
## %bb.4:
	leaq	L_.str(%rip), %r15
LBB0_28:
	movq	%r15, %rdi
	xorl	%esi, %esi
	callq	_REDIS_THROW_EXCEPTION
	movl	$-1, %ebx
LBB0_29:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	callq	_php_stream_eof
	testq	%rax, %rax
	je	LBB0_6
## %bb.7:
	movq	8(%r12), %rax
	movq	_MULTI@GOTPCREL(%rip), %rcx
	leaq	L_.str.1(%rip), %r15
	cmpq	(%rcx), %rax
	je	LBB0_27
## %bb.8:
	cmpq	$0, 48(%r12)
	je	LBB0_9
LBB0_27:
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_redis_sock_disconnect
	movq	(%r13), %rax
	movq	%rax, (%r12)
	movl	$-1, %ebx
	testl	%r14d, %r14d
	jne	LBB0_29
	jmp	LBB0_28
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_29
LBB0_9:
	movl	$10, %ebx
	leaq	L_.str.2(%rip), %r15
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_10 Depth=1
	decl	%ebx
	je	LBB0_27
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 40(%r12)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_redis_sock_disconnect
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	16(%r12), %rdi
	testq	%rdi, %rdi
	je	LBB0_18
## %bb.13:                              ##   in Loop: Header=BB0_10 Depth=1
	cmpl	$10, %ebx
	jne	LBB0_17
## %bb.14:                              ##   in Loop: Header=BB0_10 Depth=1
	xorl	%eax, %eax
	callq	_php_rand
	movq	16(%r12), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_15
## %bb.16:                              ##   in Loop: Header=BB0_10 Depth=1
	cqto
	idivq	%rcx
	movq	%rdx, %rdi
	jmp	LBB0_17
LBB0_15:                                ##   in Loop: Header=BB0_10 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %edi
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_10 Depth=1
	callq	_usleep
LBB0_18:                                ##   in Loop: Header=BB0_10 Depth=1
	movq	%r12, %rdi
	callq	_redis_sock_connect
	testq	%rax, %rax
	jne	LBB0_26
## %bb.19:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	_errno@GOTPCREL(%rip), %rax
	movq	$0, (%rax)
	movq	40(%r12), %rdi
	callq	_php_stream_eof
	testq	%rax, %rax
	jne	LBB0_26
## %bb.20:
	cmpq	$0, 32(%r12)
	je	LBB0_23
## %bb.21:
	movq	%r12, %rdi
	callq	_redis_sock_auth
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	leaq	L_.str.3(%rip), %r15
	jmp	LBB0_27
LBB0_23:
	xorl	%ebx, %ebx
	cmpq	$0, 24(%r12)
	je	LBB0_29
## %bb.24:
	movq	%r12, %rdi
	callq	_reselect_db
	testq	%rax, %rax
	je	LBB0_29
## %bb.25:
	leaq	L_.str.4(%rip), %r15
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_REDIS_SOCK_STATUS_FAILED,8,3   ## @REDIS_SOCK_STATUS_FAILED
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Connection closed"

	.comm	_errno,8,3                      ## @errno
	.comm	_MULTI,8,3                      ## @MULTI
L_.str.1:                               ## @.str.1
	.asciz	"Connection lost and socket is in MULTI/watching mode"

L_.str.2:                               ## @.str.2
	.asciz	"Connection lost"

L_.str.3:                               ## @.str.3
	.asciz	"AUTH failed while reconnecting"

L_.str.4:                               ## @.str.4
	.asciz	"SELECT failed while reconnecting"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_redis_check_eof                ; -- Begin function redis_check_eof
	.p2align	2
_redis_check_eof:                       ; @redis_check_eof
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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, x1
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	ldr	x0, [x0, #40]
	cbz	x0, LBB0_3
; %bb.2:
	ldr	x8, [x20]
Lloh0:
	adrp	x22, _REDIS_SOCK_STATUS_FAILED@GOTPAGE
Lloh1:
	ldr	x22, [x22, _REDIS_SOCK_STATUS_FAILED@GOTPAGEOFF]
	ldr	x9, [x22]
	cmp	x8, x9
	b.ne	LBB0_8
LBB0_3:
	cbnz	w19, LBB0_6
; %bb.4:
Lloh2:
	adrp	x21, l_.str@PAGE
Lloh3:
	add	x21, x21, l_.str@PAGEOFF
LBB0_5:
	mov	x0, x21
	mov	w1, #0
	bl	_REDIS_THROW_EXCEPTION
LBB0_6:
	mov	w0, #-1
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_8:
Lloh4:
	adrp	x23, _errno@GOTPAGE
Lloh5:
	ldr	x23, [x23, _errno@GOTPAGEOFF]
	str	xzr, [x23]
	bl	_php_stream_eof
	cbz	x0, LBB0_7
; %bb.9:
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _MULTI@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MULTI@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_11
; %bb.10:
	ldr	x8, [x20, #48]
	cbz	x8, LBB0_13
LBB0_11:
Lloh9:
	adrp	x21, l_.str.1@PAGE
Lloh10:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_12:
	mov	x0, x20
	mov	w1, #1
	bl	_redis_sock_disconnect
	ldr	x8, [x22]
	str	x8, [x20]
	cbnz	w19, LBB0_6
	b	LBB0_5
LBB0_13:
	mov	w24, #10
Lloh11:
	adrp	x21, l_.str.2@PAGE
Lloh12:
	add	x21, x21, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	subs	w24, w24, #1
	b.eq	LBB0_12
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x20
	mov	w1, #1
	bl	_redis_sock_disconnect
LBB0_17:                                ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x20, #16]
	cbz	x0, LBB0_21
; %bb.18:                               ;   in Loop: Header=BB0_15 Depth=1
	cmp	w24, #10
	b.ne	LBB0_20
; %bb.19:                               ;   in Loop: Header=BB0_15 Depth=1
	bl	_php_rand
	ldr	x8, [x20, #16]
	sdiv	x9, x0, x8
	msub	x0, x9, x8, x0
LBB0_20:                                ;   in Loop: Header=BB0_15 Depth=1
	bl	_usleep
LBB0_21:                                ;   in Loop: Header=BB0_15 Depth=1
	mov	x0, x20
	bl	_redis_sock_connect
	cbnz	x0, LBB0_14
; %bb.22:                               ;   in Loop: Header=BB0_15 Depth=1
	str	xzr, [x23]
	ldr	x0, [x20, #40]
	bl	_php_stream_eof
	cbnz	x0, LBB0_14
; %bb.23:
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_26
; %bb.24:
	mov	x0, x20
	bl	_redis_sock_auth
	cbz	x0, LBB0_26
; %bb.25:
Lloh13:
	adrp	x21, l_.str.3@PAGE
Lloh14:
	add	x21, x21, l_.str.3@PAGEOFF
	b	LBB0_12
LBB0_26:
	ldr	x8, [x20, #24]
	cbz	x8, LBB0_29
; %bb.27:
	mov	x0, x20
	bl	_reselect_db
	cbz	x0, LBB0_7
; %bb.28:
Lloh15:
	adrp	x21, l_.str.4@PAGE
Lloh16:
	add	x21, x21, l_.str.4@PAGEOFF
	b	LBB0_12
LBB0_29:
	mov	w0, #0
	b	LBB0_7
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_REDIS_SOCK_STATUS_FAILED,8,3   ; @REDIS_SOCK_STATUS_FAILED
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Connection closed"

	.comm	_errno,8,3                      ; @errno
	.comm	_MULTI,8,3                      ; @MULTI
l_.str.1:                               ; @.str.1
	.asciz	"Connection lost and socket is in MULTI/watching mode"

l_.str.2:                               ; @.str.2
	.asciz	"Connection lost"

l_.str.3:                               ; @.str.3
	.asciz	"AUTH failed while reconnecting"

l_.str.4:                               ; @.str.4
	.asciz	"SELECT failed while reconnecting"

.subsections_via_symbols
