	.file	"70945.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"1111011"
.LC1:
	.string	"173"
.LC2:
	.string	"123"
.LC3:
	.string	"7b"
.LC4:
	.string	"3r"
.LC5:
	.string	"7fffffff"
.LC6:
	.string	"-80000000"
	.text
	.globl	main
	.type	main, @function
main:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	lea	rdx, .LC0[rip]
	mov	esi, 2
	mov	edi, 123
	call	test
	lea	rdx, .LC1[rip]
	mov	esi, 8
	mov	edi, 123
	call	test
	lea	rdx, .LC2[rip]
	mov	esi, 10
	mov	edi, 123
	call	test
	lea	rdx, .LC3[rip]
	mov	esi, 16
	mov	edi, 123
	call	test
	lea	rdx, .LC4[rip]
	mov	esi, 32
	mov	edi, 123
	call	test
	lea	rdx, .LC5[rip]
	mov	esi, 16
	mov	edi, 2147483647
	call	test
	lea	rdx, .LC6[rip]
	mov	esi, 16
	mov	edi, -2147483648
	call	test
	mov	eax, 0
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.size	main, .-main
	.section	.rodata
.LC7:
	.string	"ok: %d base %d -> \"%s\"\n"
	.align 8
.LC8:
	.string	"FAIL: %d base %d -> \"%s\" (expected \"%s\")\n"
	.text
	.globl	test
	.type	test, @function
test:
.LFB1:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	add	rsp, -128
	mov	DWORD PTR -116[rbp], edi
	mov	DWORD PTR -120[rbp], esi
	mov	QWORD PTR -128[rbp], rdx
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	lea	rdx, -112[rbp]
	mov	ecx, DWORD PTR -120[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, ecx
	mov	edi, eax
	call	itob
	mov	rdx, QWORD PTR -128[rbp]
	lea	rax, -112[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcmp@PLT
	test	eax, eax
	jne	.L4
	lea	rcx, -112[rbp]
	mov	edx, DWORD PTR -120[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	esi, eax
	lea	rdi, .LC7[rip]
	mov	eax, 0
	call	printf@PLT
	jmp	.L7
.L4:
	mov	rsi, QWORD PTR -128[rbp]
	lea	rcx, -112[rbp]
	mov	edx, DWORD PTR -120[rbp]
	mov	eax, DWORD PTR -116[rbp]
	mov	r8, rsi
	mov	esi, eax
	lea	rdi, .LC8[rip]
	mov	eax, 0
	call	printf@PLT
.L7:
	nop
	mov	rax, QWORD PTR -8[rbp]
	sub	rax, QWORD PTR fs:40
	je	.L6
	call	__stack_chk_fail@PLT
.L6:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE1:
	.size	test, .-test
	.globl	itob
	.type	itob, @function
itob:
.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, 48
	mov	DWORD PTR -36[rbp], edi
	mov	DWORD PTR -40[rbp], esi
	mov	QWORD PTR -48[rbp], rdx
	mov	DWORD PTR -16[rbp], 39
	mov	DWORD PTR -12[rbp], 0
	mov	eax, DWORD PTR -36[rbp]
	mov	DWORD PTR -8[rbp], eax
	cmp	DWORD PTR -8[rbp], 0
	jle	.L9
	neg	DWORD PTR -36[rbp]
.L9:
	mov	DWORD PTR -20[rbp], 0
.L12:
	mov	eax, DWORD PTR -36[rbp]
	cdq
	idiv	DWORD PTR -40[rbp]
	mov	eax, DWORD PTR -12[rbp]
	sub	eax, edx
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], 9
	jle	.L10
	mov	edx, DWORD PTR -4[rbp]
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	jmp	.L11
.L10:
	mov	eax, DWORD PTR -4[rbp]
.L11:
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -4[rbp]
	lea	ecx, 48[rax]
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	edx, ecx
	mov	BYTE PTR [rax], dl
	mov	eax, DWORD PTR -36[rbp]
	cdq
	idiv	DWORD PTR -40[rbp]
	mov	DWORD PTR -36[rbp], eax
	cmp	DWORD PTR -36[rbp], 0
	js	.L12
	cmp	DWORD PTR -8[rbp], 0
	jns	.L13
	mov	eax, DWORD PTR -20[rbp]
	lea	edx, 1[rax]
	mov	DWORD PTR -20[rbp], edx
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 45
.L13:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -48[rbp]
	add	rax, rdx
	mov	BYTE PTR [rax], 0
	mov	rax, QWORD PTR -48[rbp]
	mov	rdi, rax
	call	reverse
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE2:
	.size	itob, .-itob
	.globl	reverse
	.type	reverse, @function
reverse:
.LFB3:
	.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 -24[rbp], rdi
	mov	DWORD PTR -12[rbp], 0
	mov	rax, QWORD PTR -24[rbp]
	mov	rdi, rax
	call	strlen@PLT
	sub	eax, 1
	mov	DWORD PTR -8[rbp], eax
	jmp	.L15
.L16:
	mov	eax, DWORD PTR -12[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	DWORD PTR -4[rbp], eax
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -12[rbp]
	movsx	rcx, edx
	mov	rdx, QWORD PTR -24[rbp]
	add	rdx, rcx
	movzx	eax, BYTE PTR [rax]
	mov	BYTE PTR [rdx], al
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	mov	edx, DWORD PTR -4[rbp]
	mov	BYTE PTR [rax], dl
	add	DWORD PTR -12[rbp], 1
	sub	DWORD PTR -8[rbp], 1
.L15:
	mov	eax, DWORD PTR -12[rbp]
	cmp	eax, DWORD PTR -8[rbp]
	jl	.L16
	nop
	nop
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE3:
	.size	reverse, .-reverse
	.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	"70945.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"1111011\000"
	.align	2
.LC1:
	.ascii	"173\000"
	.align	2
.LC2:
	.ascii	"123\000"
	.align	2
.LC3:
	.ascii	"7b\000"
	.align	2
.LC4:
	.ascii	"3r\000"
	.align	2
.LC5:
	.ascii	"7fffffff\000"
	.align	2
.LC6:
	.ascii	"-80000000\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	ldr	r2, .L3
	mov	r1, #2
	mov	r0, #123
	bl	test
	ldr	r2, .L3+4
	mov	r1, #8
	mov	r0, #123
	bl	test
	ldr	r2, .L3+8
	mov	r1, #10
	mov	r0, #123
	bl	test
	ldr	r2, .L3+12
	mov	r1, #16
	mov	r0, #123
	bl	test
	ldr	r2, .L3+16
	mov	r1, #32
	mov	r0, #123
	bl	test
	ldr	r2, .L3+20
	mov	r1, #16
	mvn	r0, #-2147483648
	bl	test
	ldr	r2, .L3+24
	mov	r1, #16
	mov	r0, #-2147483648
	bl	test
	mov	r3, #0
	mov	r0, r3
	pop	{fp, pc}
.L4:
	.align	2
.L3:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.section	.rodata
	.align	2
.LC7:
	.ascii	"ok: %d base %d -> \"%s\"\012\000"
	.align	2
.LC8:
	.ascii	"FAIL: %d base %d -> \"%s\" (expected \"%s\")\012\000"
	.align	2
.LC9:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	test
	.syntax unified
	.arm
	.fpu softvfp
	.type	test, %function
test:
	@ args = 0, pretend = 0, frame = 120
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #128
	str	r0, [fp, #-112]
	str	r1, [fp, #-116]
	str	r2, [fp, #-120]
	ldr	r3, .L10
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	sub	r3, fp, #108
	mov	r2, r3
	ldr	r1, [fp, #-116]
	ldr	r0, [fp, #-112]
	bl	itob
	sub	r3, fp, #108
	ldr	r1, [fp, #-120]
	mov	r0, r3
	bl	strcmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L6
	sub	r3, fp, #108
	ldr	r2, [fp, #-116]
	ldr	r1, [fp, #-112]
	ldr	r0, .L10+4
	bl	printf
	b	.L9
.L6:
	sub	r2, fp, #108
	ldr	r3, [fp, #-120]
	str	r3, [sp]
	mov	r3, r2
	ldr	r2, [fp, #-116]
	ldr	r1, [fp, #-112]
	ldr	r0, .L10+8
	bl	printf
.L9:
	nop
	ldr	r3, .L10
	ldr	r2, [r3]
	ldr	r3, [fp, #-8]
	eors	r2, r3, r2
	mov	r3, #0
	beq	.L8
	bl	__stack_chk_fail
.L8:
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L11:
	.align	2
.L10:
	.word	.LC9
	.word	.LC7
	.word	.LC8
	.size	test, .-test
	.global	__aeabi_idivmod
	.global	__aeabi_idiv
	.align	2
	.global	itob
	.syntax unified
	.arm
	.fpu softvfp
	.type	itob, %function
itob:
	@ args = 0, pretend = 0, frame = 40
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #40
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	str	r2, [fp, #-40]
	mov	r3, #39
	str	r3, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-32]
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	ble	.L13
	ldr	r3, [fp, #-32]
	rsb	r3, r3, #0
	str	r3, [fp, #-32]
.L13:
	mov	r3, #0
	str	r3, [fp, #-24]
.L16:
	ldr	r3, [fp, #-32]
	ldr	r1, [fp, #-36]
	mov	r0, r3
	bl	__aeabi_idivmod
	mov	r3, r1
	mov	r2, r3
	ldr	r3, [fp, #-16]
	sub	r3, r3, r2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #9
	ble	.L14
	ldr	r2, [fp, #-8]
	ldr	r3, [fp, #-20]
	add	r3, r2, r3
	b	.L15
.L14:
	ldr	r3, [fp, #-8]
.L15:
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-8]
	and	r2, r3, #255
	ldr	r3, [fp, #-24]
	add	r1, r3, #1
	str	r1, [fp, #-24]
	mov	r1, r3
	ldr	r3, [fp, #-40]
	add	r3, r3, r1
	add	r2, r2, #48
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r1, [fp, #-36]
	ldr	r0, [fp, #-32]
	bl	__aeabi_idiv
	mov	r3, r0
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	cmp	r3, #0
	blt	.L16
	ldr	r3, [fp, #-12]
	cmp	r3, #0
	bge	.L17
	ldr	r3, [fp, #-24]
	add	r2, r3, #1
	str	r2, [fp, #-24]
	mov	r2, r3
	ldr	r3, [fp, #-40]
	add	r3, r3, r2
	mov	r2, #45
	strb	r2, [r3]
.L17:
	ldr	r3, [fp, #-24]
	ldr	r2, [fp, #-40]
	add	r3, r2, r3
	mov	r2, #0
	strb	r2, [r3]
	ldr	r0, [fp, #-40]
	bl	reverse
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	itob, .-itob
	.align	2
	.global	reverse
	.syntax unified
	.arm
	.fpu softvfp
	.type	reverse, %function
reverse:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-16]
	ldr	r0, [fp, #-24]
	bl	strlen
	mov	r3, r0
	sub	r3, r3, #1
	str	r3, [fp, #-12]
	b	.L19
.L20:
	ldr	r3, [fp, #-16]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	str	r3, [fp, #-8]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r2, r2, r3
	ldr	r3, [fp, #-16]
	ldr	r1, [fp, #-24]
	add	r3, r1, r3
	ldrb	r2, [r2]	@ zero_extendqisi2
	strb	r2, [r3]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldr	r2, [fp, #-8]
	and	r2, r2, #255
	strb	r2, [r3]
	ldr	r3, [fp, #-16]
	add	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	sub	r3, r3, #1
	str	r3, [fp, #-12]
.L19:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	cmp	r2, r3
	blt	.L20
	nop
	nop
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	reverse, .-reverse
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
