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

```c
/*
 * FileName:     bit_operation_2
 * CreatedDate:  2020-07-25 14:03:58 +0900
 * LastModified: 2020-07-25 14:27:56 +0900
 */

#include <stdio.h>

void flag_operation(long long int x, int order){
    for(int i=31;i>=0;i--){
        if(1&x>>i){
            if(order == 0){
                printf("1");
            }
            else if(order == 1){
                printf("0");
            }
        }
        else{
            if(order == 0){
                printf("0");
            }
            else if(order == 1){
                printf("1");
            }
        }
    }
}

void flag_transform(long long int x, int order){
    if(order==0){
        x = x<<1;
    }
    else if(order==1){
        x = x>>1;
    }
    for(int i=31; i>=0; i--){
        if(1&x>>i){
            printf("1");
        }
        else{
            printf("0");
        }
    }
}

int main(void){
    long long int x;scanf("%lld", &x);
    flag_operation(x, 0);
    printf("\n");
    flag_operation(x, 1);
    printf("\n");
    flag_transform(x, 0);
    printf("\n");
    flag_transform(x, 1);
    printf("\n");
    return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	flag_operation
	.type	flag_operation, @function
flag_operation:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$31, -4(%rbp)
	jmp	.L2
.L7:
	movl	-4(%rbp), %eax
	movq	-24(%rbp), %rdx
	movl	%eax, %ecx
	sarq	%cl, %rdx
	movq	%rdx, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	cmpl	$0, -28(%rbp)
	jne	.L4
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L5
.L4:
	cmpl	$1, -28(%rbp)
	jne	.L5
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L3:
	cmpl	$0, -28(%rbp)
	jne	.L6
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L6:
	cmpl	$1, -28(%rbp)
	jne	.L5
	movl	$49, %edi
	call	putchar@PLT
.L5:
	subl	$1, -4(%rbp)
.L2:
	cmpl	$0, -4(%rbp)
	jns	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	flag_operation, .-flag_operation
	.globl	flag_transform
	.type	flag_transform, @function
flag_transform:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	cmpl	$0, -28(%rbp)
	jne	.L9
	salq	-24(%rbp)
	jmp	.L10
.L9:
	cmpl	$1, -28(%rbp)
	jne	.L10
	sarq	-24(%rbp)
.L10:
	movl	$31, -4(%rbp)
	jmp	.L11
.L14:
	movl	-4(%rbp), %eax
	movq	-24(%rbp), %rdx
	movl	%eax, %ecx
	sarq	%cl, %rdx
	movq	%rdx, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L12
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L13
.L12:
	movl	$48, %edi
	call	putchar@PLT
.L13:
	subl	$1, -4(%rbp)
.L11:
	cmpl	$0, -4(%rbp)
	jns	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	flag_transform, .-flag_transform
	.section	.rodata
.LC0:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$1, %esi
	movq	%rax, %rdi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$1, %esi
	movq	%rax, %rdi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.p2align 4
	.globl	flag_operation
	.type	flag_operation, @function
flag_operation:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	cmpl	$1, %esi
	je	.L9
	testl	%esi, %esi
	je	.L14
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	movl	$31, %ebx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	movl	$48, %edi
	call	putchar@PLT
.L5:
	subl	$1, %ebx
	jb	.L1
.L6:
	btq	%rbx, %rbp
	jnc	.L15
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L5
.L9:
	movl	$31, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$48, %edi
	call	putchar@PLT
.L8:
	subl	$1, %ebx
	jb	.L1
.L2:
	btq	%rbx, %rbp
	jc	.L16
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	flag_operation, .-flag_operation
	.p2align 4
	.globl	flag_transform
	.type	flag_transform, @function
flag_transform:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	testl	%esi, %esi
	jne	.L18
	addq	%rbp, %rbp
.L19:
	movl	$31, %ebx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$49, %edi
	call	putchar@PLT
	subl	$1, %ebx
	jb	.L25
.L22:
	btq	%rbx, %rbp
	jc	.L26
	movl	$48, %edi
	call	putchar@PLT
	subl	$1, %ebx
	jnb	.L22
.L25:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movq	%rdi, %rax
	sarq	%rax
	cmpl	$1, %esi
	cmove	%rax, %rbp
	jmp	.L19
	.cfi_endproc
.LFE24:
	.size	flag_transform, .-flag_transform
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rdi
	xorl	%esi, %esi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	(%rsp), %rdi
	movl	$1, %esi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	(%rsp), %rdi
	xorl	%esi, %esi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movq	(%rsp), %rdi
	movl	$1, %esi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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
	.p2align 4
	.globl	flag_operation
	.type	flag_operation, @function
flag_operation:
.LFB23:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	cmpl	$1, %esi
	je	.L9
	testl	%esi, %esi
	je	.L14
.L1:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
.L14:
	.cfi_restore_state
	movl	$31, %ebx
	jmp	.L6
	.p2align 4,,10
	.p2align 3
.L15:
	movl	$48, %edi
	call	putchar@PLT
.L5:
	subl	$1, %ebx
	jb	.L1
.L6:
	btq	%rbx, %rbp
	jnc	.L15
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L5
.L9:
	movl	$31, %ebx
	jmp	.L2
	.p2align 4,,10
	.p2align 3
.L16:
	movl	$48, %edi
	call	putchar@PLT
.L8:
	subl	$1, %ebx
	jb	.L1
.L2:
	btq	%rbx, %rbp
	jc	.L16
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L8
	.cfi_endproc
.LFE23:
	.size	flag_operation, .-flag_operation
	.p2align 4
	.globl	flag_transform
	.type	flag_transform, @function
flag_transform:
.LFB24:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rdi, %rbp
	pushq	%rbx
	.cfi_def_cfa_offset 24
	.cfi_offset 3, -24
	subq	$8, %rsp
	.cfi_def_cfa_offset 32
	testl	%esi, %esi
	jne	.L18
	addq	%rbp, %rbp
.L19:
	movl	$31, %ebx
	jmp	.L22
	.p2align 4,,10
	.p2align 3
.L26:
	movl	$49, %edi
	call	putchar@PLT
	subl	$1, %ebx
	jb	.L25
.L22:
	btq	%rbx, %rbp
	jc	.L26
	movl	$48, %edi
	call	putchar@PLT
	subl	$1, %ebx
	jnb	.L22
.L25:
	addq	$8, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	popq	%rbx
	.cfi_def_cfa_offset 16
	popq	%rbp
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L18:
	.cfi_restore_state
	movq	%rdi, %rax
	sarq	%rax
	cmpl	$1, %esi
	cmove	%rax, %rbp
	jmp	.L19
	.cfi_endproc
.LFE24:
	.size	flag_transform, .-flag_transform
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%lld"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB25:
	.cfi_startproc
	endbr64
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	.LC0(%rip), %rdi
	movq	%fs:40, %rax
	movq	%rax, 8(%rsp)
	xorl	%eax, %eax
	movq	%rsp, %rsi
	call	__isoc99_scanf@PLT
	movq	(%rsp), %rdi
	xorl	%esi, %esi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	(%rsp), %rdi
	movl	$1, %esi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	(%rsp), %rdi
	xorl	%esi, %esi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movq	(%rsp), %rdi
	movl	$1, %esi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movq	8(%rsp), %rax
	subq	%fs:40, %rax
	jne	.L30
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L30:
	.cfi_restore_state
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE25:
	.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:

/*
 * FileName:     bit_operation_2
 * CreatedDate:  2020-07-25 14:03:58 +0900
 * LastModified: 2020-07-25 14:27:56 +0900
 */

#include <stdio.h>

void flag_operation(long long int x, int order){
    for(int i=31;i>=0;i--){
        if(1&x>>i){
            if(order == 0){
                printf("1");
            }
            else if(order == 1){
                printf("0");
            }
        }
        else{
            if(order == 0){
                printf("0");
            }
            else if(order == 1){
                printf("1");
            }
        }
    }
}

void flag_transform(long long int x, int order){
    if(order==0){
        x = x<<1;
    }
    else if(order==1){
        x = x>>1;
    }
    for(int i=31; i>=0; i--){
        if(1&x>>i){
            printf("1");
        }
        else{
            printf("0");
        }
    }
}

int main(void){
    long long int x;scanf("%lld", &x);
    flag_operation(x, 0);
    printf("\n");
    flag_operation(x, 1);
    printf("\n");
    flag_transform(x, 0);
    printf("\n");
    flag_transform(x, 1);
    printf("\n");
    return 0;
}


9
 5
 7
 3
 2
 1
 10
 0
 4
 -1

00000000000000000000000000001001
11111111111111111111111111110110
00000000000000000000000000010010
00000000000000000000000000000100
 00000000000000000000000000000101
11111111111111111111111111111010
00000000000000000000000000001010
00000000000000000000000000000010
 00000000000000000000000000000111
11111111111111111111111111111000
00000000000000000000000000001110
00000000000000000000000000000011
 00000000000000000000000000000011
11111111111111111111111111111100
00000000000000000000000000000110
00000000000000000000000000000001
 00000000000000000000000000000010
11111111111111111111111111111101
00000000000000000000000000000100
00000000000000000000000000000001
 00000000000000000000000000000001
11111111111111111111111111111110
00000000000000000000000000000010
00000000000000000000000000000000
 00000000000000000000000000001010
11111111111111111111111111110101
00000000000000000000000000010100
00000000000000000000000000000101
 00000000000000000000000000000000
11111111111111111111111111111111
00000000000000000000000000000000
00000000000000000000000000000000
 00000000000000000000000000000100
11111111111111111111111111111011
00000000000000000000000000001000
00000000000000000000000000000010
 11111111111111111111111111111111
00000000000000000000000000000000
11111111111111111111111111111110
11111111111111111111111111111111

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

```c
/*
 * FileName:     bit_operation_2
 * CreatedDate:  2020-07-25 14:03:58 +0900
 * LastModified: 2020-07-25 14:27:56 +0900
 */

#include <stdio.h>

void flag_operation(long long int x, int order){
    for(int i=31;i>=0;i--){
        if(1&x>>i){
            if(order == 0){
                printf("1");
            }
            else if(order == 1){
                printf("0");
            }
        }
        else{
            if(order == 0){
                printf("0");
            }
            else if(order == 1){
                printf("1");
            }
        }
    }
}

void flag_transform(long long int x, int order){
    if(order==0){
        x = x<<1;
    }
    else if(order==1){
        x = x>>1;
    }
    for(int i=31; i>=0; i--){
        if(1&x>>i){
            printf("1");
        }
        else{
            printf("0");
        }
    }
}

int main(void){
    long long int x;scanf("%lld", &x);
    flag_operation(x, 0);
    printf("\n");
    flag_operation(x, 1);
    printf("\n");
    flag_transform(x, 0);
    printf("\n");
    flag_transform(x, 1);
    printf("\n");
    return 0;
}

```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	flag_operation
	.type	flag_operation, @function
flag_operation:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$31, -4(%rbp)
	jmp	.L2
.L7:
	movl	-4(%rbp), %eax
	movq	-24(%rbp), %rdx
	movl	%eax, %ecx
	sarq	%cl, %rdx
	movq	%rdx, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	cmpl	$0, -28(%rbp)
	jne	.L4
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L5
.L4:
	cmpl	$1, -28(%rbp)
	jne	.L5
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L3:
	cmpl	$0, -28(%rbp)
	jne	.L6
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L6:
	cmpl	$1, -28(%rbp)
	jne	.L5
	movl	$49, %edi
	call	putchar@PLT
.L5:
	subl	$1, -4(%rbp)
.L2:
	cmpl	$0, -4(%rbp)
	jns	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	flag_operation, .-flag_operation
	.globl	flag_transform
	.type	flag_transform, @function
flag_transform:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	cmpl	$0, -28(%rbp)
	jne	.L9
	salq	-24(%rbp)
	jmp	.L10
.L9:
	cmpl	$1, -28(%rbp)
	jne	.L10
	sarq	-24(%rbp)
.L10:
	movl	$31, -4(%rbp)
	jmp	.L11
.L14:
	movl	-4(%rbp), %eax
	movq	-24(%rbp), %rdx
	movl	%eax, %ecx
	sarq	%cl, %rdx
	movq	%rdx, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L12
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L13
.L12:
	movl	$48, %edi
	call	putchar@PLT
.L13:
	subl	$1, -4(%rbp)
.L11:
	cmpl	$0, -4(%rbp)
	jns	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	flag_transform, .-flag_transform
	.section	.rodata
.LC0:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$1, %esi
	movq	%rax, %rdi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$1, %esi
	movq	%rax, %rdi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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
	.globl	flag_operation
	.type	flag_operation, @function
flag_operation:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	movl	$31, -4(%rbp)
	jmp	.L2
.L7:
	movl	-4(%rbp), %eax
	movq	-24(%rbp), %rdx
	movl	%eax, %ecx
	sarq	%cl, %rdx
	movq	%rdx, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L3
	cmpl	$0, -28(%rbp)
	jne	.L4
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L5
.L4:
	cmpl	$1, -28(%rbp)
	jne	.L5
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L3:
	cmpl	$0, -28(%rbp)
	jne	.L6
	movl	$48, %edi
	call	putchar@PLT
	jmp	.L5
.L6:
	cmpl	$1, -28(%rbp)
	jne	.L5
	movl	$49, %edi
	call	putchar@PLT
.L5:
	subl	$1, -4(%rbp)
.L2:
	cmpl	$0, -4(%rbp)
	jns	.L7
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	flag_operation, .-flag_operation
	.globl	flag_transform
	.type	flag_transform, @function
flag_transform:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$32, %rsp
	movq	%rdi, -24(%rbp)
	movl	%esi, -28(%rbp)
	cmpl	$0, -28(%rbp)
	jne	.L9
	salq	-24(%rbp)
	jmp	.L10
.L9:
	cmpl	$1, -28(%rbp)
	jne	.L10
	sarq	-24(%rbp)
.L10:
	movl	$31, -4(%rbp)
	jmp	.L11
.L14:
	movl	-4(%rbp), %eax
	movq	-24(%rbp), %rdx
	movl	%eax, %ecx
	sarq	%cl, %rdx
	movq	%rdx, %rax
	andl	$1, %eax
	testq	%rax, %rax
	je	.L12
	movl	$49, %edi
	call	putchar@PLT
	jmp	.L13
.L12:
	movl	$48, %edi
	call	putchar@PLT
.L13:
	subl	$1, -4(%rbp)
.L11:
	cmpl	$0, -4(%rbp)
	jns	.L14
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	flag_transform, .-flag_transform
	.section	.rodata
.LC0:
	.string	"%lld"
	.text
	.globl	main
	.type	main, @function
main:
.LFB2:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	subq	$16, %rsp
	movq	%fs:40, %rax
	movq	%rax, -8(%rbp)
	xorl	%eax, %eax
	leaq	-16(%rbp), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	__isoc99_scanf@PLT
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$1, %esi
	movq	%rax, %rdi
	call	flag_operation
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$0, %esi
	movq	%rax, %rdi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movq	-16(%rbp), %rax
	movl	$1, %esi
	movq	%rax, %rdi
	call	flag_transform
	movl	$10, %edi
	call	putchar@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rdx
	subq	%fs:40, %rdx
	je	.L17
	call	__stack_chk_fail@PLT
.L17:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.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:
