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

```c
h;w;f(y){y=w/3;return w%3-1|y<h?(h/2>y?h/2:y)+y+1:h+y;}main(){scanf("%d%d",&h,&w);printf("%.f",h%3&&w%3?fmin(fmin(h%2?h:h/2,w%2?w:w/2),fmin(f(),(h^=w^=h^=w,f()))):0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	h
	.bss
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	w(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	w(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	-1(%rax), %edx
	movl	h(%rip), %eax
	cmpl	%eax, -4(%rbp)
	setl	%al
	movzbl	%al, %eax
	orl	%edx, %eax
	testl	%eax, %eax
	je	.L2
	movl	h(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	addl	$1, %eax
	jmp	.L4
.L2:
	movl	h(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC2:
	.string	"%.f"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	h(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L6
	movl	w(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L6
	movl	h(%rip), %edx
	movl	w(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, h(%rip)
	movl	h(%rip), %edx
	movl	w(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %edx
	movl	h(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, h(%rip)
	movl	$0, %eax
	call	f
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	%xmm2, -24(%rbp)
	movl	$0, %eax
	call	f
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	-24(%rbp), %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rbx
	movl	w(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L7
	movl	w(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	jmp	.L8
.L7:
	movl	w(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
.L8:
	movl	h(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	movl	h(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	jmp	.L10
.L9:
	movl	h(%rip), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
.L10:
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rax
	movq	%rbx, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rax
	jmp	.L11
.L6:
	movq	.LC1(%rip), %rax
.L11:
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	0
	.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	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	movslq	w(%rip), %rax
	movq	%rax, %rdx
	imulq	$1431655766, %rax, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	shrq	$32, %rax
	subl	%ecx, %eax
	movl	h(%rip), %ecx
	leal	(%rax,%rax,2), %esi
	subl	%esi, %edx
	xorl	%esi, %esi
	leal	(%rcx,%rax), %r8d
	subl	$1, %edx
	cmpl	%eax, %ecx
	setg	%sil
	orl	%esi, %edx
	je	.L1
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rax,%rdx), %r8d
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%.f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	leaq	h(%rip), %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	w(%rip), %rdx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	scanf@PLT
	movslq	h(%rip), %rcx
	pxor	%xmm0, %xmm0
	movq	%rcx, %rsi
	imulq	$1431655766, %rcx, %rcx
	movl	%esi, %eax
	sarl	$31, %eax
	shrq	$32, %rcx
	subl	%eax, %ecx
	leal	(%rcx,%rcx,2), %eax
	movl	%esi, %ecx
	subl	%eax, %ecx
	je	.L7
	movl	w(%rip), %edi
	movl	$3, %r8d
	movl	%edi, %eax
	cltd
	idivl	%r8d
	testl	%edx, %edx
	je	.L7
	movl	%esi, %eax
	subl	$1, %ecx
	movl	%esi, w(%rip)
	cltd
	movl	%edi, h(%rip)
	idivl	%r8d
	xorl	%edx, %edx
	cmpl	%eax, %edi
	movl	%eax, %r8d
	leal	(%rdi,%rax), %eax
	setg	%dl
	orl	%edx, %ecx
	je	.L9
	movl	%edi, %eax
	movl	$2, %ecx
	cltd
	idivl	%ecx
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	leal	1(%r8,%rax), %eax
.L9:
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	testb	$1, %sil
	je	.L19
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%esi, %xmm1
.L11:
	testb	$1, %dil
	jne	.L12
	movl	%edi, %eax
	movl	$2, %ecx
	pxor	%xmm0, %xmm0
	cltd
	idivl	%ecx
	cvtsi2sdl	%eax, %xmm0
.L13:
	movsd	%xmm2, 8(%rsp)
	call	fmin@PLT
	movsd	8(%rsp), %xmm2
	movapd	%xmm2, %xmm1
	call	fmin@PLT
.L7:
	leaq	.LC2(%rip), %rdi
	movl	$1, %eax
	call	printf@PLT
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	movl	%esi, %eax
	movl	$2, %ecx
	pxor	%xmm1, %xmm1
	cltd
	idivl	%ecx
	cvtsi2sdl	%eax, %xmm1
	jmp	.L11
.L12:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%edi, %xmm0
	jmp	.L13
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	w
	.bss
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.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	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	movslq	w(%rip), %rax
	movq	%rax, %rdx
	imulq	$1431655766, %rax, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	shrq	$32, %rax
	subl	%ecx, %eax
	movl	h(%rip), %ecx
	leal	(%rax,%rax,2), %esi
	subl	%esi, %edx
	xorl	%esi, %esi
	leal	(%rcx,%rax), %r8d
	subl	$1, %edx
	cmpl	%eax, %ecx
	setg	%sil
	orl	%esi, %edx
	je	.L1
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	leal	1(%rax,%rdx), %r8d
.L1:
	movl	%r8d, %eax
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC1:
	.string	"%d%d"
.LC2:
	.string	"%.f"
	.section	.text.startup,"ax",@progbits
	.p2align 4
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	leaq	h(%rip), %rsi
	subq	$24, %rsp
	.cfi_def_cfa_offset 32
	leaq	w(%rip), %rdx
	xorl	%eax, %eax
	leaq	.LC1(%rip), %rdi
	call	scanf@PLT
	movslq	h(%rip), %rcx
	pxor	%xmm0, %xmm0
	movq	%rcx, %rsi
	imulq	$1431655766, %rcx, %rcx
	movl	%esi, %eax
	sarl	$31, %eax
	shrq	$32, %rcx
	subl	%eax, %ecx
	leal	(%rcx,%rcx,2), %eax
	movl	%esi, %ecx
	subl	%eax, %ecx
	je	.L7
	movl	w(%rip), %edi
	movl	$3, %r8d
	movl	%edi, %eax
	cltd
	idivl	%r8d
	testl	%edx, %edx
	je	.L7
	movl	%esi, %eax
	subl	$1, %ecx
	movl	%esi, w(%rip)
	cltd
	movl	%edi, h(%rip)
	idivl	%r8d
	xorl	%edx, %edx
	cmpl	%eax, %edi
	movl	%eax, %r8d
	leal	(%rdi,%rax), %eax
	setg	%dl
	orl	%edx, %ecx
	je	.L9
	movl	%edi, %eax
	movl	$2, %ecx
	cltd
	idivl	%ecx
	cmpl	%r8d, %eax
	cmovl	%r8d, %eax
	leal	1(%r8,%rax), %eax
.L9:
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	testb	$1, %sil
	je	.L19
	pxor	%xmm1, %xmm1
	cvtsi2sdl	%esi, %xmm1
.L11:
	testb	$1, %dil
	jne	.L12
	movl	%edi, %eax
	movl	$2, %ecx
	pxor	%xmm0, %xmm0
	cltd
	idivl	%ecx
	cvtsi2sdl	%eax, %xmm0
.L13:
	movsd	%xmm2, 8(%rsp)
	call	fmin@PLT
	movsd	8(%rsp), %xmm2
	movapd	%xmm2, %xmm1
	call	fmin@PLT
.L7:
	leaq	.LC2(%rip), %rdi
	movl	$1, %eax
	call	printf@PLT
	xorl	%eax, %eax
	addq	$24, %rsp
	.cfi_remember_state
	.cfi_def_cfa_offset 8
	ret
.L19:
	.cfi_restore_state
	movl	%esi, %eax
	movl	$2, %ecx
	pxor	%xmm1, %xmm1
	cltd
	idivl	%ecx
	cvtsi2sdl	%eax, %xmm1
	jmp	.L11
.L12:
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%edi, %xmm0
	jmp	.L13
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.globl	w
	.bss
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.globl	h
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.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:

h;w;f(y){y=w/3;return w%3-1|y<h?(h/2>y?h/2:y)+y+1:h+y;}main(){scanf("%d%d",&h,&w);printf("%.f",h%3&&w%3?fmin(fmin(h%2?h:h/2,w%2?w:w/2),fmin(f(),(h^=w^=h^=w,f()))):0);}
100100 100000
 000000 2
 5 1
 100100 110000
 100111 100001
 100111 000101
 000011 001100
 000010 011000
 010010 011110
 011000 110111

50000 0 1 50050 83371 101 11 5 5005 5500
Given the following C code and unoptimized assembly code, your task is to generate highly optimized x86-64 assembly code.
C Code:

```c
h;w;f(y){y=w/3;return w%3-1|y<h?(h/2>y?h/2:y)+y+1:h+y;}main(){scanf("%d%d",&h,&w);printf("%.f",h%3&&w%3?fmin(fmin(h%2?h:h/2,w%2?w:w/2),fmin(f(),(h^=w^=h^=w,f()))):0);}```

Unoptimized Assembly Code:

```assembly
	.file	"temp.c"
	.text
	.globl	h
	.bss
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	w(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	w(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	-1(%rax), %edx
	movl	h(%rip), %eax
	cmpl	%eax, -4(%rbp)
	setl	%al
	movzbl	%al, %eax
	orl	%edx, %eax
	testl	%eax, %eax
	je	.L2
	movl	h(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	addl	$1, %eax
	jmp	.L4
.L2:
	movl	h(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC2:
	.string	"%.f"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	h(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L6
	movl	w(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L6
	movl	h(%rip), %edx
	movl	w(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, h(%rip)
	movl	h(%rip), %edx
	movl	w(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %edx
	movl	h(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, h(%rip)
	movl	$0, %eax
	call	f
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	%xmm2, -24(%rbp)
	movl	$0, %eax
	call	f
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	-24(%rbp), %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rbx
	movl	w(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L7
	movl	w(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	jmp	.L8
.L7:
	movl	w(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
.L8:
	movl	h(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	movl	h(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	jmp	.L10
.L9:
	movl	h(%rip), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
.L10:
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rax
	movq	%rbx, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rax
	jmp	.L11
.L6:
	movq	.LC1(%rip), %rax
.L11:
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	0
	.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	h
	.bss
	.align 4
	.type	h, @object
	.size	h, 4
h:
	.zero	4
	.globl	w
	.align 4
	.type	w, @object
	.size	w, 4
w:
	.zero	4
	.text
	.globl	f
	.type	f, @function
f:
.LFB0:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	movl	%edi, -4(%rbp)
	movl	w(%rip), %eax
	movslq	%eax, %rdx
	imulq	$1431655766, %rdx, %rdx
	shrq	$32, %rdx
	sarl	$31, %eax
	movl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	movl	%eax, -4(%rbp)
	movl	w(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	leal	-1(%rax), %edx
	movl	h(%rip), %eax
	cmpl	%eax, -4(%rbp)
	setl	%al
	movzbl	%al, %eax
	orl	%edx, %eax
	testl	%eax, %eax
	je	.L2
	movl	h(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	movl	%eax, %edx
	movl	-4(%rbp), %eax
	cmpl	%eax, %edx
	cmovl	%eax, %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
	addl	$1, %eax
	jmp	.L4
.L2:
	movl	h(%rip), %edx
	movl	-4(%rbp), %eax
	addl	%edx, %eax
.L4:
	popq	%rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	f, .-f
	.section	.rodata
.LC0:
	.string	"%d%d"
.LC2:
	.string	"%.f"
	.text
	.globl	main
	.type	main, @function
main:
.LFB1:
	.cfi_startproc
	endbr64
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register 6
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset 3, -24
	leaq	w(%rip), %rax
	movq	%rax, %rdx
	leaq	h(%rip), %rax
	movq	%rax, %rsi
	leaq	.LC0(%rip), %rax
	movq	%rax, %rdi
	movl	$0, %eax
	call	scanf@PLT
	movl	h(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L6
	movl	w(%rip), %edx
	movslq	%edx, %rax
	imulq	$1431655766, %rax, %rax
	shrq	$32, %rax
	movl	%edx, %ecx
	sarl	$31, %ecx
	subl	%ecx, %eax
	movl	%eax, %ecx
	addl	%ecx, %ecx
	addl	%eax, %ecx
	movl	%edx, %eax
	subl	%ecx, %eax
	testl	%eax, %eax
	je	.L6
	movl	h(%rip), %edx
	movl	w(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, h(%rip)
	movl	h(%rip), %edx
	movl	w(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, w(%rip)
	movl	w(%rip), %edx
	movl	h(%rip), %eax
	xorl	%edx, %eax
	movl	%eax, h(%rip)
	movl	$0, %eax
	call	f
	pxor	%xmm2, %xmm2
	cvtsi2sdl	%eax, %xmm2
	movsd	%xmm2, -24(%rbp)
	movl	$0, %eax
	call	f
	pxor	%xmm3, %xmm3
	cvtsi2sdl	%eax, %xmm3
	movq	%xmm3, %rax
	movsd	-24(%rbp), %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rbx
	movl	w(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L7
	movl	w(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
	jmp	.L8
.L7:
	movl	w(%rip), %eax
	pxor	%xmm0, %xmm0
	cvtsi2sdl	%eax, %xmm0
.L8:
	movl	h(%rip), %eax
	andl	$1, %eax
	testl	%eax, %eax
	jne	.L9
	movl	h(%rip), %eax
	movl	%eax, %edx
	shrl	$31, %edx
	addl	%edx, %eax
	sarl	%eax
	pxor	%xmm4, %xmm4
	cvtsi2sdl	%eax, %xmm4
	movq	%xmm4, %rax
	jmp	.L10
.L9:
	movl	h(%rip), %eax
	pxor	%xmm5, %xmm5
	cvtsi2sdl	%eax, %xmm5
	movq	%xmm5, %rax
.L10:
	movapd	%xmm0, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rax
	movq	%rbx, %xmm1
	movq	%rax, %xmm0
	call	fmin@PLT
	movq	%xmm0, %rax
	jmp	.L11
.L6:
	movq	.LC1(%rip), %rax
.L11:
	movq	%rax, %xmm0
	leaq	.LC2(%rip), %rax
	movq	%rax, %rdi
	movl	$1, %eax
	call	printf@PLT
	movl	$0, %eax
	movq	-8(%rbp), %rbx
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	main, .-main
	.section	.rodata
	.align 8
.LC1:
	.long	0
	.long	0
	.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:
