	.file	"523037.c"
	.intel_syntax noprefix
	.text
	.type	monster_init, @function
monster_init:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 10
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 1[rax], 2
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	monster_init, .-monster_init
	.type	monster_take_hit, @function
monster_take_hit:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	eax, esi
	mov	BYTE PTR -12[rbp], al
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	cmp	BYTE PTR -12[rbp], al
	jnb	.L3
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR [rax]
	sub	al, BYTE PTR -12[rbp]
	mov	edx, eax
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], dl
	jmp	.L5
.L3:
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 0
.L5:
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	monster_take_hit, .-monster_take_hit
	.section	.rodata
	.type	fist, @object
	.size	fist, 2
fist:
	.byte	1
	.byte	-1
	.type	sword, @object
	.size	sword, 2
sword:
	.byte	3
	.byte	10
	.text
	.type	hero_init, @function
hero_init:
.LFB2:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR [rax], 10
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 1[rax], 10
	movzx	edx, WORD PTR fist[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	hero_change_weapon
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	hero_init, .-hero_init
	.type	hero_change_weapon, @function
hero_change_weapon:
.LFB3:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	QWORD PTR -8[rbp], rdi
	mov	WORD PTR -10[rbp], si
	mov	rax, QWORD PTR -8[rbp]
	movzx	edx, WORD PTR -10[rbp]
	mov	WORD PTR 2[rax], dx
	nop
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	hero_change_weapon, .-hero_change_weapon
	.type	hero_hit_monster, @function
hero_hit_monster:
.LFB4:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 16
	mov	QWORD PTR -8[rbp], rdi
	mov	QWORD PTR -16[rbp], rsi
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 2[rax]
	movzx	edx, al
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	monster_take_hit
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 3[rax]
	lea	edx, -1[rax]
	mov	rax, QWORD PTR -8[rbp]
	mov	BYTE PTR 3[rax], dl
	mov	rax, QWORD PTR -8[rbp]
	movzx	eax, BYTE PTR 3[rax]
	test	al, al
	jne	.L10
	movzx	edx, WORD PTR fist[rip]
	mov	rax, QWORD PTR -8[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	hero_change_weapon
.L10:
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE4:
	.size	hero_hit_monster, .-hero_hit_monster
	.globl	benched_routine
	.type	benched_routine, @function
benched_routine:
.LFB5:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 32
	mov	QWORD PTR -16[rbp], 128
	mov	QWORD PTR -8[rbp], 1024
	mov	BYTE PTR -17[rbp], 3
	mov	rax, QWORD PTR -16[rbp]
	mov	rdi, rax
	call	hero_init
	movzx	edx, WORD PTR sword[rip]
	mov	rax, QWORD PTR -16[rbp]
	mov	esi, edx
	mov	rdi, rax
	call	hero_change_weapon
	mov	BYTE PTR -18[rbp], 0
	jmp	.L12
.L13:
	movzx	eax, BYTE PTR -18[rbp]
	lea	rdx, [rax+rax]
	mov	rax, QWORD PTR -8[rbp]
	add	rax, rdx
	mov	rdi, rax
	call	monster_init
	add	BYTE PTR -18[rbp], 1
.L12:
	movzx	eax, BYTE PTR -18[rbp]
	cmp	al, BYTE PTR -17[rbp]
	jb	.L13
	mov	rax, QWORD PTR -8[rbp]
	lea	rdx, 2[rax]
	mov	rax, QWORD PTR -16[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	hero_hit_monster
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE5:
	.size	benched_routine, .-benched_routine
	.ident	"GCC: (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.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:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 6
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"523037.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	monster_init, %function
monster_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #10
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #2
	strb	r2, [r3, #1]
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	monster_init, .-monster_init
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	monster_take_hit, %function
monster_take_hit:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	@ link register save eliminated.
	str	fp, [sp, #-4]!
	add	fp, sp, #0
	sub	sp, sp, #12
	str	r0, [fp, #-8]
	mov	r3, r1
	strb	r3, [fp, #-9]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3]	@ zero_extendqisi2
	ldrb	r2, [fp, #-9]	@ zero_extendqisi2
	cmp	r2, r3
	bcs	.L3
	ldr	r3, [fp, #-8]
	ldrb	r2, [r3]	@ zero_extendqisi2
	ldrb	r3, [fp, #-9]
	sub	r3, r2, r3
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	strb	r2, [r3]
	b	.L5
.L3:
	ldr	r3, [fp, #-8]
	mov	r2, #0
	strb	r2, [r3]
.L5:
	nop
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	monster_take_hit, .-monster_take_hit
	.section	.rodata
	.align	2
	.type	fist, %object
	.size	fist, 2
fist:
	.byte	1
	.byte	-1
	.align	2
	.type	sword, %object
	.size	sword, 2
sword:
	.byte	3
	.byte	10
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hero_init, %function
hero_init:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	mov	r2, #10
	strb	r2, [r3]
	ldr	r3, [fp, #-8]
	mov	r2, #10
	strb	r2, [r3, #1]
	ldr	r3, .L7
	ldr	r1, [r3]
	ldr	r0, [fp, #-8]
	bl	hero_change_weapon
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L8:
	.align	2
.L7:
	.word	fist
	.size	hero_init, .-hero_init
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hero_change_weapon, %function
hero_change_weapon:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	strh	r1, [fp, #-12]	@ movhi
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	sub	r1, fp, #12
	mov	r2, #2
	mov	r0, r3
	bl	memcpy
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	hero_change_weapon, .-hero_change_weapon
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	hero_hit_monster, %function
hero_hit_monster:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #8
	str	r0, [fp, #-8]
	str	r1, [fp, #-12]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #2]	@ zero_extendqisi2
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	monster_take_hit
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	sub	r3, r3, #1
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	strb	r2, [r3, #3]
	ldr	r3, [fp, #-8]
	ldrb	r3, [r3, #3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L12
	ldr	r3, .L13
	ldr	r1, [r3]
	ldr	r0, [fp, #-8]
	bl	hero_change_weapon
.L12:
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L14:
	.align	2
.L13:
	.word	fist
	.size	hero_hit_monster, .-hero_hit_monster
	.align	2
	.global	benched_routine
	.syntax unified
	.arm
	.fpu softvfp
	.type	benched_routine, %function
benched_routine:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	mov	r3, #128
	str	r3, [fp, #-12]
	mov	r3, #1024
	str	r3, [fp, #-8]
	mov	r3, #3
	strb	r3, [fp, #-13]
	ldr	r0, [fp, #-12]
	bl	hero_init
	ldr	r3, .L18
	ldr	r1, [r3]
	ldr	r0, [fp, #-12]
	bl	hero_change_weapon
	mov	r3, #0
	strb	r3, [fp, #-14]
	b	.L16
.L17:
	ldrb	r3, [fp, #-14]	@ zero_extendqisi2
	lsl	r3, r3, #1
	ldr	r2, [fp, #-8]
	add	r3, r2, r3
	mov	r0, r3
	bl	monster_init
	ldrb	r3, [fp, #-14]
	add	r3, r3, #1
	strb	r3, [fp, #-14]
.L16:
	ldrb	r2, [fp, #-14]	@ zero_extendqisi2
	ldrb	r3, [fp, #-13]	@ zero_extendqisi2
	cmp	r2, r3
	bcc	.L17
	ldr	r3, [fp, #-8]
	add	r3, r3, #2
	mov	r1, r3
	ldr	r0, [fp, #-12]
	bl	hero_hit_monster
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L19:
	.align	2
.L18:
	.word	sword
	.size	benched_routine, .-benched_routine
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
