	.file	"149586.c"
	.intel_syntax noprefix
	.text
	.globl	hexdigit
	.type	hexdigit, @function
hexdigit:
.LFB6:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	mov	eax, edi
	mov	BYTE PTR -4[rbp], al
	cmp	BYTE PTR -4[rbp], 47
	jle	.L2
	cmp	BYTE PTR -4[rbp], 57
	jg	.L2
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 48
	jmp	.L3
.L2:
	cmp	BYTE PTR -4[rbp], 64
	jle	.L4
	cmp	BYTE PTR -4[rbp], 70
	jg	.L4
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 55
	jmp	.L3
.L4:
	cmp	BYTE PTR -4[rbp], 96
	jle	.L5
	cmp	BYTE PTR -4[rbp], 102
	jg	.L5
	movsx	eax, BYTE PTR -4[rbp]
	sub	eax, 87
	jmp	.L3
.L5:
	mov	eax, -1
.L3:
	pop	rbp
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	hexdigit, .-hexdigit
	.globl	htoi
	.type	htoi, @function
htoi:
.LFB7:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L7
.L10:
	sal	DWORD PTR -12[rbp], 4
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	hexdigit
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	jne	.L8
	mov	eax, -1
	jmp	.L9
.L8:
	mov	eax, DWORD PTR -4[rbp]
	or	DWORD PTR -12[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L7:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L10
	mov	eax, DWORD PTR -12[rbp]
.L9:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.size	htoi, .-htoi
	.globl	otoi
	.type	otoi, @function
otoi:
.LFB8:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L12
.L16:
	sal	DWORD PTR -12[rbp], 3
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	hexdigit
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L13
	cmp	DWORD PTR -4[rbp], 7
	jle	.L14
.L13:
	mov	eax, -1
	jmp	.L15
.L14:
	mov	eax, DWORD PTR -4[rbp]
	or	DWORD PTR -12[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L12:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L16
	mov	eax, DWORD PTR -12[rbp]
.L15:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE8:
	.size	otoi, .-otoi
	.globl	btoi
	.type	btoi, @function
btoi:
.LFB9:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 24
	mov	QWORD PTR -24[rbp], rdi
	mov	DWORD PTR -12[rbp], 0
	mov	DWORD PTR -8[rbp], 0
	jmp	.L18
.L22:
	sal	DWORD PTR -12[rbp]
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	hexdigit
	mov	DWORD PTR -4[rbp], eax
	cmp	DWORD PTR -4[rbp], -1
	je	.L19
	cmp	DWORD PTR -4[rbp], 1
	jle	.L20
.L19:
	mov	eax, -1
	jmp	.L21
.L20:
	mov	eax, DWORD PTR -4[rbp]
	or	DWORD PTR -12[rbp], eax
	add	DWORD PTR -8[rbp], 1
.L18:
	mov	eax, DWORD PTR -8[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -24[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	test	al, al
	jne	.L22
	mov	eax, DWORD PTR -12[rbp]
.L21:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE9:
	.size	btoi, .-btoi
	.section	.rodata
.LC0:
	.string	"Usage: %s [format] [number]\n"
	.text
	.globl	usage
	.type	usage, @function
usage:
.LFB10:
	.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 stderr[rip]
	mov	rdx, QWORD PTR -8[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	edi, 1
	call	exit@PLT
	.cfi_endproc
.LFE10:
	.size	usage, .-usage
	.section	.rodata
.LC1:
	.string	"oxb"
.LC2:
	.string	"%s"
	.align 8
.LC3:
	.string	"Error: incorrectly formatted string %s\n"
.LC4:
	.string	"%d\n"
	.text
	.globl	main
	.type	main, @function
main:
.LFB11:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	sub	rsp, 1072
	mov	DWORD PTR -1060[rbp], edi
	mov	QWORD PTR -1072[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	mov	DWORD PTR -1048[rbp], 0
	mov	DWORD PTR -1044[rbp], 16
	lea	rax, -1040[rbp]
	mov	edx, 1024
	mov	esi, 0
	mov	rdi, rax
	call	memset@PLT
	jmp	.L25
.L29:
	movsx	eax, BYTE PTR -1049[rbp]
	cmp	eax, 120
	je	.L26
	cmp	eax, 120
	jg	.L27
	cmp	eax, 98
	je	.L28
	cmp	eax, 111
	jne	.L27
	mov	DWORD PTR -1044[rbp], 8
	jmp	.L25
.L26:
	mov	DWORD PTR -1044[rbp], 16
	jmp	.L25
.L28:
	mov	DWORD PTR -1044[rbp], 2
	jmp	.L25
.L27:
	mov	rax, QWORD PTR -1072[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rdi, rax
	call	usage
.L25:
	mov	rcx, QWORD PTR -1072[rbp]
	mov	eax, DWORD PTR -1060[rbp]
	lea	rdx, .LC1[rip]
	mov	rsi, rcx
	mov	edi, eax
	call	getopt@PLT
	mov	BYTE PTR -1049[rbp], al
	cmp	BYTE PTR -1049[rbp], -1
	jne	.L29
	mov	eax, DWORD PTR optind[rip]
	cmp	DWORD PTR -1060[rbp], eax
	jg	.L30
	lea	rax, -1040[rbp]
	mov	rsi, rax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	__isoc99_scanf@PLT
	jmp	.L31
.L30:
	mov	eax, DWORD PTR optind[rip]
	cdqe
	lea	rdx, 0[0+rax*8]
	mov	rax, QWORD PTR -1072[rbp]
	add	rax, rdx
	mov	rdx, QWORD PTR [rax]
	lea	rax, -1040[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	strcpy@PLT
.L31:
	cmp	DWORD PTR -1044[rbp], 16
	je	.L32
	cmp	DWORD PTR -1044[rbp], 16
	jg	.L33
	cmp	DWORD PTR -1044[rbp], 2
	je	.L34
	cmp	DWORD PTR -1044[rbp], 8
	je	.L35
	jmp	.L33
.L32:
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	htoi
	mov	DWORD PTR -1048[rbp], eax
	jmp	.L36
.L35:
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	otoi
	mov	DWORD PTR -1048[rbp], eax
	jmp	.L36
.L34:
	lea	rax, -1040[rbp]
	mov	rdi, rax
	call	btoi
	mov	DWORD PTR -1048[rbp], eax
	jmp	.L36
.L33:
	mov	DWORD PTR -1048[rbp], -1
.L36:
	cmp	DWORD PTR -1048[rbp], -1
	jne	.L37
	mov	rax, QWORD PTR stderr[rip]
	lea	rdx, -1040[rbp]
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L39
.L37:
	mov	eax, DWORD PTR -1048[rbp]
	mov	esi, eax
	lea	rdi, .LC4[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L39:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L40
	call	__stack_chk_fail@PLT
.L40:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE11:
	.size	main, .-main
	.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	"149586.c"
	.text
	.align	2
	.global	hexdigit
	.syntax unified
	.arm
	.fpu softvfp
	.type	hexdigit, %function
hexdigit:
	@ 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
	mov	r3, r0
	strb	r3, [fp, #-5]
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #47
	bls	.L2
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #57
	bhi	.L2
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #48
	b	.L3
.L2:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L4
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #70
	bhi	.L4
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #55
	b	.L3
.L4:
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L5
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	cmp	r3, #102
	bhi	.L5
	ldrb	r3, [fp, #-5]	@ zero_extendqisi2
	sub	r3, r3, #87
	b	.L3
.L5:
	mvn	r3, #0
.L3:
	mov	r0, r3
	add	sp, fp, #0
	@ sp needed
	ldr	fp, [sp], #4
	bx	lr
	.size	hexdigit, .-hexdigit
	.align	2
	.global	htoi
	.syntax unified
	.arm
	.fpu softvfp
	.type	htoi, %function
htoi:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L7
.L10:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #4
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	hexdigit
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	bne	.L8
	mvn	r3, #0
	b	.L9
.L8:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	orr	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L7:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L10
	ldr	r3, [fp, #-16]
.L9:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	htoi, .-htoi
	.align	2
	.global	otoi
	.syntax unified
	.arm
	.fpu softvfp
	.type	otoi, %function
otoi:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L12
.L16:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	hexdigit
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L13
	ldr	r3, [fp, #-8]
	cmp	r3, #7
	ble	.L14
.L13:
	mvn	r3, #0
	b	.L15
.L14:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	orr	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L12:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-16]
.L15:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	otoi, .-otoi
	.align	2
	.global	btoi
	.syntax unified
	.arm
	.fpu softvfp
	.type	btoi, %function
btoi:
	@ 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]
	mov	r3, #0
	str	r3, [fp, #-12]
	b	.L18
.L22:
	ldr	r3, [fp, #-16]
	lsl	r3, r3, #1
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	hexdigit
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmn	r3, #1
	beq	.L19
	ldr	r3, [fp, #-8]
	cmp	r3, #1
	ble	.L20
.L19:
	mvn	r3, #0
	b	.L21
.L20:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-8]
	orr	r3, r2, r3
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r3, #1
	str	r3, [fp, #-12]
.L18:
	ldr	r3, [fp, #-12]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L22
	ldr	r3, [fp, #-16]
.L21:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	btoi, .-btoi
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Usage: %s [format] [number]\012\000"
	.text
	.align	2
	.global	usage
	.syntax unified
	.arm
	.fpu softvfp
	.type	usage, %function
usage:
	@ 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, .L24
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L24+4
	mov	r0, r3
	bl	fprintf
	mov	r0, #1
	bl	exit
.L25:
	.align	2
.L24:
	.word	stderr
	.word	.LC0
	.size	usage, .-usage
	.section	.rodata
	.align	2
.LC1:
	.ascii	"oxb\000"
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 1048
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #1040
	sub	sp, sp, #8
	str	r0, [fp, #-1048]
	str	r1, [fp, #-1052]
	ldr	r3, .L34
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	mov	r3, #0
	str	r3, [fp, #-1040]
	mov	r3, #16
	str	r3, [fp, #-1036]
	sub	r3, fp, #1024
	sub	r3, r3, #4
	sub	r3, r3, #4
	mov	r2, #1024
	mov	r1, #0
	mov	r0, r3
	bl	memset
	b	.L27
.L33:
	cmp	r3, #120
	bgt	.L29
	cmp	r3, #98
	beq	.L30
	cmp	r3, #111
	bne	.L29
	mov	r3, #8
	str	r3, [fp, #-1036]
	b	.L27
.L28:
	mov	r3, #16
	str	r3, [fp, #-1036]
	b	.L27
.L30:
	mov	r3, #2
	str	r3, [fp, #-1036]
	b	.L27
.L29:
	ldr	r3, [fp, #-1052]
	ldr	r3, [r3]
	mov	r0, r3
	bl	usage
.L27:
	ldr	r2, .L34+4
	ldr	r1, [fp, #-1052]
	ldr	r0, [fp, #-1048]
	bl	getopt
	mov	r3, r0
	strb	r3, [fp, #-1041]
	ldrb	r3, [fp, #-1041]	@ zero_extendqisi2
	cmp	r3, #120
	beq	.L28
	b	.L33
.L35:
	.align	2
.L34:
	.word	.LC2
	.word	.LC1
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
