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

```c
#include <stdio.h>

int main(){
  long long int a,b,k;
  long long int bis=1,j;
  scanf("%lld %lld %lld",&k,&a,&b);
  if(b-a<2){
    bis+=k;
  }
  else{
    j=k-(a-1);
    if(j>0){
      bis = a;
        bis += (j/2)*(b-a);
        bis += j % 2;
    }
  }
    
  printf("%lld",bis);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -24(%rbp)
	leaq	-40(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jg	.L2
	movq	-32(%rbp), %rax
	addq	%rax, -24(%rbp)
	jmp	.L3
.L2:
	movq	-32(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	$1, %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jle	.L3
	movq	-48(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	addq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	addq	%rax, -24(%rbp)
.L3:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
user
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	leaq	8(%rsp), %rcx
	movq	%rsp, %rdx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	movq	8(%rsp), %rax
	subq	%rsi, %rax
	cmpq	$1, %rax
	jle	.L8
	movq	16(%rsp), %rcx
	leaq	-1(%rsi), %rdx
	subq	%rdx, %rcx
	movl	$1, %edx
	testq	%rcx, %rcx
	jle	.L3
	movq	%rcx, %rdx
	andl	$1, %ecx
	sarq	%rdx
	imulq	%rax, %rdx
	addq	%rsi, %rdx
	addq	%rcx, %rdx
.L3:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movq	16(%rsp), %rax
	leaq	1(%rax), %rdx
	jmp	.L3
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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
	.file	"temp.c"
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB23:
	.cfi_startproc
	endbr64
	subq	$40, %rsp
	.cfi_def_cfa_offset 48
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 24(%rsp)
	xorl	%eax, %eax
	leaq	16(%rsp), %rsi
	leaq	8(%rsp), %rcx
	movq	%rsp, %rdx
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rsi
	movq	8(%rsp), %rax
	subq	%rsi, %rax
	cmpq	$1, %rax
	jle	.L8
	movq	16(%rsp), %rcx
	leaq	-1(%rsi), %rdx
	subq	%rdx, %rcx
	movl	$1, %edx
	testq	%rcx, %rcx
	jle	.L3
	movq	%rcx, %rdx
	andl	$1, %ecx
	sarq	%rdx
	imulq	%rax, %rdx
	addq	%rsi, %rdx
	addq	%rcx, %rdx
.L3:
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rsi
	movl	$1, %edi
	call	__printf_chk@PLT
	movq	24(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L9
	xorl	%eax, %eax
	addq	$40, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L8:
	.cfi_restore_state
	movq	16(%rsp), %rax
	leaq	1(%rax), %rdx
	jmp	.L3
.L9:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE23:
	.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:

#include <stdio.h>

int main(){
  long long int a,b,k;
  long long int bis=1,j;
  scanf("%lld %lld %lld",&k,&a,&b);
  if(b-a<2){
    bis+=k;
  }
  else{
    j=k-(a-1);
    if(j>0){
      bis = a;
        bis += (j/2)*(b-a);
        bis += j % 2;
    }
  }
    
  printf("%lld",bis);
}
5 2 6
 7 5 4
 314159265 35897932 35610649
 5 3 6
 7 1 4
 3 3 6
 407766107 35897932 14836778
 7 2 6
 407766107 9307229 14836778
 407766107 9307229 25447105

10 8 314159266 7 11 4 407766108 14 1101648954500241 3215538450316794
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
#include <stdio.h>

int main(){
  long long int a,b,k;
  long long int bis=1,j;
  scanf("%lld %lld %lld",&k,&a,&b);
  if(b-a<2){
    bis+=k;
  }
  else{
    j=k-(a-1);
    if(j>0){
      bis = a;
        bis += (j/2)*(b-a);
        bis += j % 2;
    }
  }
    
  printf("%lld",bis);
}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -24(%rbp)
	leaq	-40(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jg	.L2
	movq	-32(%rbp), %rax
	addq	%rax, -24(%rbp)
	jmp	.L3
.L2:
	movq	-32(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	$1, %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jle	.L3
	movq	-48(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	addq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	addq	%rax, -24(%rbp)
.L3:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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.
train
	.file	"temp.c"
	.text
	.section	.rodata
.LC0:
	.string	"%lld %lld %lld"
.LC1:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$48, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	movq	$1, -24(%rbp)
	leaq	-40(%rbp), %rcx
	leaq	-48(%rbp), %rdx
	leaq	-32(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-40(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	cmpq	$1, %rax
	jg	.L2
	movq	-32(%rbp), %rax
	addq	%rax, -24(%rbp)
	jmp	.L3
.L2:
	movq	-32(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	$1, %rdx
	subq	%rdx, %rax
	movq	%rax, -16(%rbp)
	cmpq	$0, -16(%rbp)
	jle	.L3
	movq	-48(%rbp), %rax
	movq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	movq	%rax, %rdx
	shrq	$63, %rdx
	addq	%rdx, %rax
	sarq	%rax
	movq	%rax, %rcx
	movq	-40(%rbp), %rax
	movq	-48(%rbp), %rdx
	subq	%rdx, %rax
	imulq	%rcx, %rax
	addq	%rax, -24(%rbp)
	movq	-16(%rbp), %rax
	cqto
	shrq	$63, %rdx
	addq	%rdx, %rax
	andl	$1, %eax
	subq	%rdx, %rax
	addq	%rax, -24(%rbp)
.L3:
	movq	-24(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC1(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L5
	call	__stack_chk_fail@PLT
.L5:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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:
