	.file	"68886516.c"
	.intel_syntax noprefix
	.text
	.type	xtoi, @function
xtoi:
.LFB6:
	.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	QWORD PTR -40[rbp], rdi
	mov	QWORD PTR -48[rbp], rsi
	mov	rax, QWORD PTR -40[rbp]
	mov	rdi, rax
	call	strlen@PLT
	mov	QWORD PTR -8[rbp], rax
	cmp	QWORD PTR -8[rbp], 0
	je	.L2
	cmp	QWORD PTR -8[rbp], 8
	jbe	.L3
	mov	eax, 2
	jmp	.L4
.L3:
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], 0
	mov	DWORD PTR -12[rbp], 1
	mov	rax, QWORD PTR -8[rbp]
	sub	eax, 1
	mov	DWORD PTR -20[rbp], eax
	jmp	.L5
.L11:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	mov	edi, eax
	call	isxdigit@PLT
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 96
	jle	.L7
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 87
	mov	DWORD PTR -16[rbp], eax
	jmp	.L8
.L7:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	cmp	al, 64
	jle	.L9
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 55
	mov	DWORD PTR -16[rbp], eax
	jmp	.L8
.L9:
	mov	eax, DWORD PTR -20[rbp]
	movsx	rdx, eax
	mov	rax, QWORD PTR -40[rbp]
	add	rax, rdx
	movzx	eax, BYTE PTR [rax]
	movsx	eax, al
	sub	eax, 48
	mov	DWORD PTR -16[rbp], eax
.L8:
	mov	rax, QWORD PTR -48[rbp]
	mov	edx, DWORD PTR [rax]
	mov	eax, DWORD PTR -16[rbp]
	imul	eax, DWORD PTR -12[rbp]
	add	edx, eax
	mov	rax, QWORD PTR -48[rbp]
	mov	DWORD PTR [rax], edx
	sal	DWORD PTR -12[rbp], 4
	jmp	.L12
.L6:
	mov	eax, 4
	jmp	.L4
.L12:
	sub	DWORD PTR -20[rbp], 1
.L5:
	cmp	DWORD PTR -20[rbp], 0
	jns	.L11
.L2:
	mov	eax, 1
.L4:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.size	xtoi, .-xtoi
	.section	.rodata
	.align 8
.LC0:
	.string	"Provide the cpuid in hex, and you will get how we id it"
	.align 8
.LC1:
	.string	"usage: cpuidhaiku <AMD|INTEL> <cpuid_hex>"
.LC2:
	.string	"cpuid: 0x%X\n"
.LC3:
	.string	"AMD"
.LC4:
	.string	"INTEL"
.LC5:
	.string	"Vendor should be AMD or INTEL"
.LC6:
	.string	"Haiku CPUID: 0x%lx\n"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -8[rbp], rax
	xor	eax, eax
	cmp	DWORD PTR -52[rbp], 3
	je	.L14
	lea	rdi, .LC0[rip]
	call	puts@PLT
	lea	rdi, .LC1[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L21
.L14:
	mov	DWORD PTR -36[rbp], 0
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	lea	rdx, -36[rbp]
	mov	rsi, rdx
	mov	rdi, rax
	call	xtoi
	mov	eax, DWORD PTR -36[rbp]
	mov	esi, eax
	lea	rdi, .LC2[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -36[rbp]
	shr	eax, 20
	and	eax, 15
	mov	DWORD PTR -28[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	shr	eax, 16
	and	eax, 15
	mov	DWORD PTR -24[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	shr	eax, 8
	and	eax, 15
	mov	DWORD PTR -20[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	shr	eax, 4
	and	eax, 15
	mov	DWORD PTR -16[rbp], eax
	mov	eax, DWORD PTR -36[rbp]
	and	eax, 15
	mov	DWORD PTR -12[rbp], eax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 3
	lea	rsi, .LC3[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L16
	cmp	DWORD PTR -20[rbp], 15
	jne	.L17
	mov	eax, DWORD PTR -28[rbp]
	sal	eax, 20
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	sal	eax, 16
	add	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	sal	eax, 4
	add	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	mov	DWORD PTR -32[rbp], eax
	jmp	.L18
.L17:
	mov	eax, DWORD PTR -20[rbp]
	sal	eax, 4
	mov	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	mov	DWORD PTR -32[rbp], eax
.L18:
	add	DWORD PTR -32[rbp], 4352
	jmp	.L19
.L16:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	mov	edx, 5
	lea	rsi, .LC4[rip]
	mov	rdi, rax
	call	strncmp@PLT
	test	eax, eax
	jne	.L20
	mov	eax, DWORD PTR -28[rbp]
	sal	eax, 20
	mov	edx, eax
	mov	eax, DWORD PTR -24[rbp]
	sal	eax, 16
	add	edx, eax
	mov	eax, DWORD PTR -20[rbp]
	sal	eax, 4
	add	edx, eax
	mov	eax, DWORD PTR -16[rbp]
	add	eax, edx
	mov	DWORD PTR -32[rbp], eax
	add	DWORD PTR -32[rbp], 4096
	jmp	.L19
.L20:
	lea	rdi, .LC5[rip]
	call	puts@PLT
	mov	eax, 1
	jmp	.L21
.L19:
	mov	eax, DWORD PTR -32[rbp]
	mov	esi, eax
	lea	rdi, .LC6[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, 0
.L21:
	mov	rcx, QWORD PTR -8[rbp]
	sub	rcx, QWORD PTR fs:40
	je	.L22
	call	__stack_chk_fail@PLT
.L22:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE7:
	.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	"68886516.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	xtoi, %function
xtoi:
	@ 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	r0, [fp, #-24]
	bl	strlen
	str	r0, [fp, #-8]
	ldr	r3, [fp, #-8]
	cmp	r3, #0
	beq	.L2
	ldr	r3, [fp, #-8]
	cmp	r3, #8
	bls	.L3
	mov	r3, #2
	b	.L4
.L3:
	ldr	r3, [fp, #-28]
	mov	r2, #0
	str	r2, [r3]
	mov	r3, #1
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-8]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
	b	.L5
.L11:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	mov	r0, r3
	bl	isxdigit
	mov	r3, r0
	cmp	r3, #0
	beq	.L6
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #96
	bls	.L7
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #87
	str	r3, [fp, #-16]
	b	.L8
.L7:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #64
	bls	.L9
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #55
	str	r3, [fp, #-16]
	b	.L8
.L9:
	ldr	r3, [fp, #-20]
	ldr	r2, [fp, #-24]
	add	r3, r2, r3
	ldrb	r3, [r3]	@ zero_extendqisi2
	sub	r3, r3, #48
	str	r3, [fp, #-16]
.L8:
	ldr	r3, [fp, #-28]
	ldr	r3, [r3]
	ldr	r2, [fp, #-16]
	ldr	r1, [fp, #-12]
	mul	r2, r1, r2
	add	r2, r3, r2
	ldr	r3, [fp, #-28]
	str	r2, [r3]
	ldr	r3, [fp, #-12]
	lsl	r3, r3, #4
	str	r3, [fp, #-12]
	b	.L12
.L6:
	mov	r3, #4
	b	.L4
.L12:
	ldr	r3, [fp, #-20]
	sub	r3, r3, #1
	str	r3, [fp, #-20]
.L5:
	ldr	r3, [fp, #-20]
	cmp	r3, #0
	bge	.L11
.L2:
	mov	r3, #1
.L4:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
	.size	xtoi, .-xtoi
	.section	.rodata
	.align	2
.LC0:
	.ascii	"Provide the cpuid in hex, and you will get how we i"
	.ascii	"d it\000"
	.align	2
.LC1:
	.ascii	"usage: cpuidhaiku <AMD|INTEL> <cpuid_hex>\000"
	.align	2
.LC2:
	.ascii	"cpuid: 0x%X\012\000"
	.align	2
.LC3:
	.ascii	"AMD\000"
	.align	2
.LC4:
	.ascii	"INTEL\000"
	.align	2
.LC5:
	.ascii	"Vendor should be AMD or INTEL\000"
	.align	2
.LC6:
	.ascii	"Haiku CPUID: 0x%lx\012\000"
	.align	2
.LC7:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ 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, #-40]
	str	r1, [fp, #-44]
	ldr	r3, .L23
	ldr	r3, [r3]
	str	r3, [fp, #-8]
	mov	r3,#0
	ldr	r3, [fp, #-40]
	cmp	r3, #3
	beq	.L14
	ldr	r0, .L23+4
	bl	puts
	ldr	r0, .L23+8
	bl	puts
	mov	r3, #1
	b	.L21
.L14:
	mov	r3, #0
	str	r3, [fp, #-36]
	ldr	r3, [fp, #-44]
	add	r3, r3, #8
	ldr	r3, [r3]
	sub	r2, fp, #36
	mov	r1, r2
	mov	r0, r3
	bl	xtoi
	ldr	r3, [fp, #-36]
	mov	r1, r3
	ldr	r0, .L23+12
	bl	printf
	ldr	r3, [fp, #-36]
	lsr	r3, r3, #20
	and	r3, r3, #15
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-36]
	lsr	r3, r3, #16
	and	r3, r3, #15
	str	r3, [fp, #-24]
	ldr	r3, [fp, #-36]
	lsr	r3, r3, #8
	and	r3, r3, #15
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-36]
	lsr	r3, r3, #4
	and	r3, r3, #15
	str	r3, [fp, #-16]
	ldr	r3, [fp, #-36]
	and	r3, r3, #15
	str	r3, [fp, #-12]
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #3
	ldr	r1, .L23+16
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L16
	ldr	r3, [fp, #-20]
	cmp	r3, #15
	bne	.L17
	ldr	r3, [fp, #-28]
	lsl	r2, r3, #20
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #16
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-32]
	b	.L18
.L17:
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-32]
.L18:
	ldr	r3, [fp, #-32]
	add	r3, r3, #4352
	str	r3, [fp, #-32]
	b	.L19
.L16:
	ldr	r3, [fp, #-44]
	add	r3, r3, #4
	ldr	r3, [r3]
	mov	r2, #5
	ldr	r1, .L23+20
	mov	r0, r3
	bl	strncmp
	mov	r3, r0
	cmp	r3, #0
	bne	.L20
	ldr	r3, [fp, #-28]
	lsl	r2, r3, #20
	ldr	r3, [fp, #-24]
	lsl	r3, r3, #16
	add	r2, r2, r3
	ldr	r3, [fp, #-20]
	lsl	r3, r3, #4
	add	r3, r2, r3
	ldr	r2, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-32]
	ldr	r3, [fp, #-32]
	add	r3, r3, #4096
	str	r3, [fp, #-32]
	b	.L19
.L20:
	ldr	r0, .L23+24
	bl	puts
	mov	r3, #1
	b	.L21
.L19:
	ldr	r1, [fp, #-32]
	ldr	r0, .L23+28
	bl	printf
	mov	r3, #0
.L21:
	ldr	r2, .L23
	ldr	r1, [r2]
	ldr	r2, [fp, #-8]
	eors	r1, r2, r1
	mov	r2, #0
	beq	.L22
	bl	__stack_chk_fail
.L22:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L24:
	.align	2
.L23:
	.word	.LC7
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
