	.file	"204116.c"
	.intel_syntax noprefix
	.text
	.local	filename
	.comm	filename,128,32
	.local	buffer
	.comm	buffer,8,8
	.local	buffersize
	.comm	buffersize,4,4
	.globl	os_semihosting_call_host
	.type	os_semihosting_call_host, @function
os_semihosting_call_host:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 48
	mov	DWORD PTR -36[rbp], edi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -48[rbp]
	mov	QWORD PTR -16[rbp], rax
	cmp	DWORD PTR -36[rbp], 1
	jne	.L2
	mov	rax, QWORD PTR -16[rbp]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR -8[rbp], rax
	mov	rax, QWORD PTR -8[rbp]
	mov	rsi, rax
	lea	rdi, filename[rip]
	call	strcpy@PLT
	mov	DWORD PTR buffersize[rip], 0
	mov	eax, 1
	jmp	.L3
.L2:
	cmp	DWORD PTR -36[rbp], 2
	jne	.L4
	mov	rax, QWORD PTR buffer[rip]
	mov	rdi, rax
	call	free@PLT
	mov	DWORD PTR buffersize[rip], 0
	mov	eax, 0
	jmp	.L3
.L4:
	cmp	DWORD PTR -36[rbp], 5
	jne	.L5
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	DWORD PTR -20[rbp], eax
	mov	edx, DWORD PTR buffersize[rip]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	edx, eax
	mov	rax, QWORD PTR buffer[rip]
	mov	rsi, rdx
	mov	rdi, rax
	call	realloc@PLT
	mov	QWORD PTR buffer[rip], rax
	mov	edx, DWORD PTR -20[rbp]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	rcx, QWORD PTR buffer[rip]
	mov	esi, DWORD PTR buffersize[rip]
	mov	esi, esi
	add	rcx, rsi
	mov	rsi, rax
	mov	rdi, rcx
	call	memcpy@PLT
	mov	edx, DWORD PTR buffersize[rip]
	mov	eax, DWORD PTR -20[rbp]
	add	eax, edx
	mov	DWORD PTR buffersize[rip], eax
	mov	eax, 0
	jmp	.L3
.L5:
	mov	eax, DWORD PTR -36[rbp]
.L3:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	os_semihosting_call_host, .-os_semihosting_call_host
	.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	"204116.c"
	.text
	.local	filename
	.comm	filename,128,4
	.local	buffer
	.comm	buffer,4,4
	.local	buffersize
	.comm	buffersize,4,4
	.align	2
	.global	os_semihosting_call_host
	.syntax unified
	.arm
	.fpu softvfp
	.type	os_semihosting_call_host, %function
os_semihosting_call_host:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #24
	str	r0, [fp, #-24]
	str	r1, [fp, #-28]
	ldr	r3, [fp, #-28]
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-24]
	cmp	r3, #1
	bne	.L2
	ldr	r3, [fp, #-16]
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	ldr	r1, [fp, #-8]
	ldr	r0, .L6
	bl	strcpy
	ldr	r3, .L6+4
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	b	.L3
.L2:
	ldr	r3, [fp, #-24]
	cmp	r3, #2
	bne	.L4
	ldr	r3, .L6+8
	ldr	r3, [r3]
	mov	r0, r3
	bl	free
	ldr	r3, .L6+4
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #0
	b	.L3
.L4:
	ldr	r3, [fp, #-24]
	cmp	r3, #5
	bne	.L5
	ldr	r3, [fp, #-16]
	add	r3, r3, #8
	ldr	r3, [r3]
	str	r3, [fp, #-12]
	ldr	r3, .L6+8
	ldr	r0, [r3]
	ldr	r3, .L6+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	mov	r1, r3
	bl	realloc
	mov	r3, r0
	ldr	r2, .L6+8
	str	r3, [r2]
	ldr	r3, .L6+8
	ldr	r2, [r3]
	ldr	r3, .L6+4
	ldr	r3, [r3]
	add	r0, r2, r3
	ldr	r3, [fp, #-16]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldr	r2, [fp, #-12]
	mov	r1, r3
	bl	memcpy
	ldr	r3, .L6+4
	ldr	r2, [r3]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	ldr	r2, .L6+4
	str	r3, [r2]
	mov	r3, #0
	b	.L3
.L5:
	ldr	r3, [fp, #-24]
.L3:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L7:
	.align	2
.L6:
	.word	filename
	.word	buffersize
	.word	buffer
	.size	os_semihosting_call_host, .-os_semihosting_call_host
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
