Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

long long gcd(long long a, long long b)
{
	if (a > b) {
		a += b;
		b = a - b;
		a -= b;
	}
	if (b % a == 0) return a;
	else return gcd(b % a, a);
}

int main()
{	
	int i, T;
	long long A, B, C, D, G;
	scanf("%d", &T);
	
	for (i = 1; i <= T; i++) {
		scanf("%lld %lld %lld %lld", &A, &B, &C, &D);
		if (A < B || D < B) {
			printf("No\n");
			continue;
		} else if (C >= B - 1) {
			printf("Yes\n");
			continue;
		}
		
		A %= B;
		C %= B;
		G = gcd(B, D);
		if (A + (B - A - 1) / G * G > C) printf("No\n");
		else printf("Yes\n");
	}
	
	fflush(stdout);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %r8
	.p2align 4,,10
	.p2align 3
.L3:
	cmpq	%rdi, %r8
	jl	.L2
	movq	%r8, %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
.L2:
	movq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rdx, %rdi
	testq	%rdx, %rdx
	jne	.L3
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld %lld %lld %lld"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	$1, %ebx
	leaq	32(%rsp), %r15
	leaq	24(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rdi
	movq	%r15, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rax
	jl	.L8
	movq	32(%rsp), %rcx
	cmpq	%rcx, %rdi
	jg	.L8
	movq	24(%rsp), %rsi
	leaq	-1(%rdi), %rdx
	cmpq	%rsi, %rdx
	jle	.L15
	cqto
	idivq	%rdi
	movq	%rsi, %rax
	movq	%rdi, %rsi
	movq	%rdx, 8(%rsp)
	movq	%rdx, %r9
	cqto
	idivq	%rdi
	movq	%rdx, 24(%rsp)
	movq	%rdx, %r8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	je	.L21
.L14:
	cmpq	%rsi, %rcx
	jg	.L12
	movq	%rsi, %rax
	movq	%rcx, %rsi
	movq	%rax, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	jne	.L14
.L21:
	subq	%r9, %rdi
	leaq	-1(%rdi), %rax
	cqto
	idivq	%rsi
	imulq	%rsi, %rax
	addq	%r9, %rax
	cmpq	%rax, %r8
	jge	.L15
.L8:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	addl	$1, %ebx
	cmpl	%ebx, 4(%rsp)
	jge	.L16
.L7:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

user
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %r8
	.p2align 4,,10
	.p2align 3
.L3:
	cmpq	%rdi, %r8
	jl	.L2
	movq	%r8, %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
.L2:
	movq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rdx, %rdi
	testq	%rdx, %rdx
	jne	.L3
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld %lld %lld %lld"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	$1, %ebx
	leaq	32(%rsp), %r15
	leaq	24(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rdi
	movq	%r15, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rax
	jl	.L8
	movq	32(%rsp), %rcx
	cmpq	%rcx, %rdi
	jg	.L8
	movq	24(%rsp), %rsi
	leaq	-1(%rdi), %rdx
	cmpq	%rsi, %rdx
	jle	.L15
	cqto
	idivq	%rdi
	movq	%rsi, %rax
	movq	%rdi, %rsi
	movq	%rdx, 8(%rsp)
	movq	%rdx, %r9
	cqto
	idivq	%rdi
	movq	%rdx, 24(%rsp)
	movq	%rdx, %r8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	je	.L21
.L14:
	cmpq	%rsi, %rcx
	jg	.L12
	movq	%rsi, %rax
	movq	%rcx, %rsi
	movq	%rax, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	jne	.L14
.L21:
	subq	%r9, %rdi
	leaq	-1(%rdi), %rax
	cqto
	idivq	%rsi
	imulq	%rsi, %rax
	addq	%r9, %rax
	cmpq	%rax, %r8
	jge	.L15
.L8:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	addl	$1, %ebx
	cmpl	%ebx, 4(%rsp)
	jge	.L16
.L7:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
rule
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %r8
	.p2align 4,,10
	.p2align 3
.L3:
	cmpq	%rdi, %r8
	jl	.L2
	movq	%r8, %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
.L2:
	movq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rdx, %rdi
	testq	%rdx, %rdx
	jne	.L3
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld %lld %lld %lld"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	$1, %ebx
	leaq	32(%rsp), %r15
	leaq	24(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rdi
	movq	%r15, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rax
	jl	.L8
	movq	32(%rsp), %rcx
	cmpq	%rcx, %rdi
	jg	.L8
	movq	24(%rsp), %rsi
	leaq	-1(%rdi), %rdx
	cmpq	%rsi, %rdx
	jle	.L15
	cqto
	idivq	%rdi
	movq	%rsi, %rax
	movq	%rdi, %rsi
	movq	%rdx, 8(%rsp)
	movq	%rdx, %r9
	cqto
	idivq	%rdi
	movq	%rdx, 24(%rsp)
	movq	%rdx, %r8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	je	.L21
.L14:
	cmpq	%rsi, %rcx
	jg	.L12
	movq	%rsi, %rax
	movq	%rcx, %rsi
	movq	%rax, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	jne	.L14
.L21:
	subq	%r9, %rdi
	leaq	-1(%rdi), %rax
	cqto
	idivq	%rsi
	imulq	%rsi, %rax
	addq	%r9, %rax
	cmpq	%rax, %r8
	jge	.L15
.L8:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	addl	$1, %ebx
	cmpl	%ebx, 4(%rsp)
	jge	.L16
.L7:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```
```c
#include <stdio.h>

long long gcd(long long a, long long b)
{
	if (a > b) {
		a += b;
		b = a - b;
		a -= b;
	}
	if (b % a == 0) return a;
	else return gcd(b % a, a);
}

int main()
{	
	int i, T;
	long long A, B, C, D, G;
	scanf("%d", &T);
	
	for (i = 1; i <= T; i++) {
		scanf("%lld %lld %lld %lld", &A, &B, &C, &D);
		if (A < B || D < B) {
			printf("No\n");
			continue;
		} else if (C >= B - 1) {
			printf("Yes\n");
			continue;
		}
		
		A %= B;
		C %= B;
		G = gcd(B, D);
		if (A + (B - A - 1) / G * G > C) printf("No\n");
		else printf("Yes\n");
	}
	
	fflush(stdout);
	return 0;
}```
Given the following C code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

long long gcd(long long a, long long b)
{
	if (a > b) {
		a += b;
		b = a - b;
		a -= b;
	}
	if (b % a == 0) return a;
	else return gcd(b % a, a);
}

int main()
{	
	int i, T;
	long long A, B, C, D, G;
	scanf("%d", &T);
	
	for (i = 1; i <= T; i++) {
		scanf("%lld %lld %lld %lld", &A, &B, &C, &D);
		if (A < B || D < B) {
			printf("No\n");
			continue;
		} else if (C >= B - 1) {
			printf("Yes\n");
			continue;
		}
		
		A %= B;
		C %= B;
		G = gcd(B, D);
		if (A + (B - A - 1) / G * G > C) printf("No\n");
		else printf("Yes\n");
	}
	
	fflush(stdout);
	return 0;
}```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

24
1 2 3 4
1 2 4 3
1 3 2 4
1 3 4 2
1 4 1 3
1 4 3 2
2 1 3 4
2 1 4 3
2 3 1 4
2 3 4 1
2 4 1 3
2 4 3 1
3 1 2 4
3 1 4 2
3 2 1 4
3 2 4 1
3 4 1 2
3 4 2 1
4 1 2 3
4 1 3 2
4 2 1 3
4 2 3 1
4 3 1 2
4 3 2 1
 14
9 7 5 9
9 7 6 9
14 10 7 12
14 10 8 12
14 10 9 12
14 10 7 11
14 10 8 11
14 10 9 11
9 10 5 10
10 10 5 10
11 10 5 10
16 10 5 10
1000000000100000000 17 14 999999999999999985
1000000000000000000 17 15 999999999999999985
 14
9 7 5 9
9 7 6 9
14 10 7 12
14 10 8 12
14 10 9 12
14 10 7 11
14 10 8 11
14 10 9 11
9 10 5 10
10 11 5 10
11 10 5 10
16 10 5 10
1000000000100000000 17 14 999999999999999985
1000000000000000000 17 15 999999999999999985
 14
9 7 5 9
9 7 6 9
14 10 7 12
14 10 15 12
14 10 9 12
14 11 7 11
14 10 8 11
14 10 9 11
9 10 3 10
10 11 5 10
11 10 5 10
16 10 5 10
1000000000100000000 17 14 999999999999999985
1000000000000000000 16 15 999999999999999985
 14
9 7 5 9
9 7 2 9
14 10 7 12
14 10 15 12
14 10 9 12
14 11 7 11
14 10 8 11
14 10 9 11
9 10 3 10
10 11 5 10
11 10 5 10
16 10 5 10
1000000000100000000 17 14 999999999999999985
1000000000000000000 16 15 1358327919252224189
 14
9 7 5 9
9 7 2 9
14 10 7 12
14 10 15 12
14 10 9 12
14 11 7 11
14 10 8 11
14 10 9 11
9 10 3 10
10 11 5 10
11 10 5 10
16 10 5 10
1000000000100000000 17 5 999999999999999985
1000000000000000000 16 15 1358327919252224189
 14
7 7 5 9
9 7 1 9
14 10 7 12
14 10 15 12
14 10 9 12
14 11 7 11
14 10 8 11
14 10 9 11
9 10 3 10
10 13 5 6
11 18 5 10
16 10 5 10
1000010000100000000 17 5 999999999999999985
1000000000000000000 16 15 2424336645253281229
 14
7 7 5 9
15 7 1 9
14 10 7 12
14 10 15 12
14 14 9 11
14 11 7 11
14 10 8 11
14 10 9 11
9 10 3 10
10 13 5 6
11 18 5 10
16 10 5 10
1000010000100000000 17 5 999999999999999985
1000000000000000000 16 15 2424336645253281229
 14
7 7 5 9
15 7 1 9
14 10 7 12
14 10 3 12
14 14 9 11
14 11 5 11
14 10 8 11
14 10 9 11
9 10 3 10
10 13 5 6
11 18 5 10
16 10 5 10
1000010000100000000 17 5 999999999999999985
1000000000000000000 16 15 2424336645253281229
 14
7 7 5 9
15 7 1 9
14 10 7 12
14 10 3 12
14 14 9 11
14 11 5 11
14 10 12 11
14 10 9 11
9 10 3 10
10 13 5 6
11 18 5 10
16 10 5 10
1000010000100000000 17 5 999999999999999985
1000000000000000000 16 15 2424336645253281229

No
No
No
No
No
No
Yes
Yes
No
No
No
No
Yes
Yes
Yes
No
No
No
Yes
Yes
Yes
No
No
No
 No
Yes
No
Yes
Yes
No
No
Yes
No
Yes
Yes
No
Yes
Yes
 No
Yes
No
Yes
Yes
No
No
Yes
No
No
Yes
No
Yes
Yes
 No
Yes
No
Yes
Yes
Yes
No
Yes
No
No
Yes
No
Yes
Yes
 No
No
No
Yes
Yes
Yes
No
Yes
No
No
Yes
No
Yes
Yes
 No
No
No
Yes
Yes
Yes
No
Yes
No
No
Yes
No
No
Yes
 No
No
No
Yes
Yes
Yes
No
Yes
No
No
No
No
No
Yes
 No
No
No
Yes
No
Yes
No
Yes
No
No
No
No
No
Yes
 No
No
No
No
No
Yes
No
Yes
No
No
No
No
No
Yes
 No
No
No
No
No
Yes
Yes
Yes
No
No
No
No
No
Yes

Given the following C code and assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

long long gcd(long long a, long long b)
{
	if (a > b) {
		a += b;
		b = a - b;
		a -= b;
	}
	if (b % a == 0) return a;
	else return gcd(b % a, a);
}

int main()
{	
	int i, T;
	long long A, B, C, D, G;
	scanf("%d", &T);
	
	for (i = 1; i <= T; i++) {
		scanf("%lld %lld %lld %lld", &A, &B, &C, &D);
		if (A < B || D < B) {
			printf("No\n");
			continue;
		} else if (C >= B - 1) {
			printf("Yes\n");
			continue;
		}
		
		A %= B;
		C %= B;
		G = gcd(B, D);
		if (A + (B - A - 1) / G * G > C) printf("No\n");
		else printf("Yes\n");
	}
	
	fflush(stdout);
	return 0;
}```

Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %r8
	.p2align 4,,10
	.p2align 3
.L3:
	cmpq	%rdi, %r8
	jl	.L2
	movq	%r8, %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
.L2:
	movq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rdx, %rdi
	testq	%rdx, %rdx
	jne	.L3
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld %lld %lld %lld"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	$1, %ebx
	leaq	32(%rsp), %r15
	leaq	24(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rdi
	movq	%r15, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rax
	jl	.L8
	movq	32(%rsp), %rcx
	cmpq	%rcx, %rdi
	jg	.L8
	movq	24(%rsp), %rsi
	leaq	-1(%rdi), %rdx
	cmpq	%rsi, %rdx
	jle	.L15
	cqto
	idivq	%rdi
	movq	%rsi, %rax
	movq	%rdi, %rsi
	movq	%rdx, 8(%rsp)
	movq	%rdx, %r9
	cqto
	idivq	%rdi
	movq	%rdx, 24(%rsp)
	movq	%rdx, %r8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	je	.L21
.L14:
	cmpq	%rsi, %rcx
	jg	.L12
	movq	%rsi, %rax
	movq	%rcx, %rsi
	movq	%rax, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	jne	.L14
.L21:
	subq	%r9, %rdi
	leaq	-1(%rdi), %rax
	cqto
	idivq	%rsi
	imulq	%rsi, %rax
	addq	%r9, %rax
	cmpq	%rax, %r8
	jge	.L15
.L8:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	addl	$1, %ebx
	cmpl	%ebx, 4(%rsp)
	jge	.L16
.L7:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```

Only output the optimized assembly code. Do not include any other text. Do not write any comments in the assembly code. Wrap the assembly code in ```assembly``` tags.
Optimized Assembly Code:

train
```assembly
	.file	"temp.c"
	.text
	.p2align 4
	.globl	gcd
	.type	gcd, @function
gcd:
.LFB23:
	.cfi_startproc
	endbr64
	movq	%rsi, %r8
	.p2align 4,,10
	.p2align 3
.L3:
	cmpq	%rdi, %r8
	jl	.L2
	movq	%r8, %rax
	movq	%rdi, %r8
	movq	%rax, %rdi
.L2:
	movq	%rdi, %rax
	cqto
	idivq	%r8
	movq	%rdx, %rdi
	testq	%rdx, %rdx
	jne	.L3
	movq	%r8, %rax
	ret
	.cfi_endproc
.LFE23:
	.size	gcd, .-gcd
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%d"
.LC1:
	.string	"%lld %lld %lld %lld"
.LC2:
	.string	"No"
.LC3:
	.string	"Yes"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	leaq	.LC0(%rip), %rdi
	pushq	%r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	pushq	%r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	pushq	%r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	pushq	%rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	pushq	%rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	subq	$56, %rsp
	.cfi_def_cfa_offset 112
	movq	%fs:40, %rax
	movq	%rax, 40(%rsp)
	xorl	%eax, %eax
	leaq	4(%rsp), %rsi
	call	__isoc99_scanf@PLT
	movl	4(%rsp), %eax
	testl	%eax, %eax
	jle	.L7
	movl	$1, %ebx
	leaq	32(%rsp), %r15
	leaq	24(%rsp), %r14
	leaq	16(%rsp), %r13
	leaq	8(%rsp), %r12
	leaq	.LC1(%rip), %rbp
	.p2align 4,,10
	.p2align 3
.L16:
	movq	%rbp, %rdi
	movq	%r15, %r8
	movq	%r14, %rcx
	movq	%r13, %rdx
	movq	%r12, %rsi
	xorl	%eax, %eax
	call	__isoc99_scanf@PLT
	movq	8(%rsp), %rax
	movq	16(%rsp), %rdi
	cmpq	%rdi, %rax
	jl	.L8
	movq	32(%rsp), %rcx
	cmpq	%rcx, %rdi
	jg	.L8
	movq	24(%rsp), %rsi
	leaq	-1(%rdi), %rdx
	cmpq	%rsi, %rdx
	jle	.L15
	cqto
	idivq	%rdi
	movq	%rsi, %rax
	movq	%rdi, %rsi
	movq	%rdx, 8(%rsp)
	movq	%rdx, %r9
	cqto
	idivq	%rdi
	movq	%rdx, 24(%rsp)
	movq	%rdx, %r8
	.p2align 4,,10
	.p2align 3
.L12:
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	je	.L21
.L14:
	cmpq	%rsi, %rcx
	jg	.L12
	movq	%rsi, %rax
	movq	%rcx, %rsi
	movq	%rax, %rcx
	movq	%rcx, %rax
	cqto
	idivq	%rsi
	movq	%rdx, %rcx
	testq	%rdx, %rdx
	jne	.L14
.L21:
	subq	%r9, %rdi
	leaq	-1(%rdi), %rax
	cqto
	idivq	%rsi
	imulq	%rsi, %rax
	addq	%r9, %rax
	cmpq	%rax, %r8
	jge	.L15
.L8:
	leaq	.LC2(%rip), %rdi
	call	puts@PLT
.L10:
	addl	$1, %ebx
	cmpl	%ebx, 4(%rsp)
	jge	.L16
.L7:
	movq	stdout(%rip), %rdi
	call	fflush@PLT
	movq	40(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L22
	addq	$56, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	xorl	%eax, %eax
	popq	%rbx
	.cfi_def_cfa_offset 48
	popq	%rbp
	.cfi_def_cfa_offset 40
	popq	%r12
	.cfi_def_cfa_offset 32
	popq	%r13
	.cfi_def_cfa_offset 24
	popq	%r14
	.cfi_def_cfa_offset 16
	popq	%r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	leaq	.LC3(%rip), %rdi
	call	puts@PLT
	jmp	.L10
.L22:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE24:
	.size	main, .-main
	.ident	"GCC: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	1f - 0f
	.long	4f - 1f
	.long	5
0:
	.string	"GNU"
1:
	.align 8
	.long	0xc0000002
	.long	3f - 2f
2:
	.long	0x3
3:
	.align 8
4:
```