	.file	"952715.c"
	.intel_syntax noprefix
	.text
	.globl	dab
	.bss
	.align 32
	.type	dab, @object
	.size	dab, 8192
dab:
	.zero	8192
	.section	.rodata
.LC0:
	.string	"unhandled $%04x\n"
	.align 8
.LC1:
	.string	"/************************************************ "
	.align 8
.LC2:
	.string	" * Result table for Z8000 DAB instruction         "
	.align 8
.LC3:
	.string	" *                                                "
	.align 8
.LC4:
	.string	" * bits    description                            "
	.align 8
.LC5:
	.string	" * ---------------------------------------------- "
	.align 8
.LC6:
	.string	" * 0..7    destination value                      "
	.align 8
.LC7:
	.string	" * 8       carry flag before                      "
	.align 8
.LC8:
	.string	" * 9       half carry flag before                 "
	.align 8
.LC9:
	.string	" * 10      D flag (0 add/adc, 1 sub/sbc)          "
	.align 8
.LC10:
	.string	" * result  description                            "
	.align 8
.LC11:
	.string	" * 0..7    result value                           "
	.align 8
.LC12:
	.string	" * 8       carry flag after                       "
	.align 8
.LC13:
	.string	" ************************************************/"
	.align 8
.LC14:
	.string	"static const UINT16 Z8000_dab[0x800] = {"
.LC15:
	.string	"\t/* sub/sbc results */"
.LC16:
	.string	"\t/* add/adc results */"
.LC17:
	.string	"0x%03x,"
.LC18:
	.string	"};"
	.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
	sub	rsp, 32
	mov	DWORD PTR -20[rbp], edi
	mov	QWORD PTR -32[rbp], rsi
	mov	DWORD PTR -4[rbp], 0
	jmp	.L2
.L15:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 256
	test	eax, eax
	je	.L3
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 102
	movzx	eax, al
	or	ah, 1
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dab[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L4
.L3:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 512
	test	eax, eax
	je	.L5
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 102
	movzx	eax, al
	or	ah, 1
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dab[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L4
.L5:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 240
	cmp	eax, 159
	jg	.L6
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 15
	cmp	eax, 9
	jg	.L6
	mov	eax, DWORD PTR -4[rbp]
	movzx	eax, al
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, dab[rip]
	mov	DWORD PTR [rcx+rdx], eax
	jmp	.L4
.L6:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 240
	cmp	eax, 143
	jg	.L7
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 15
	cmp	eax, 9
	jle	.L7
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 6
	movzx	eax, al
	mov	edx, DWORD PTR -4[rbp]
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, dab[rip]
	mov	DWORD PTR [rcx+rdx], eax
	jmp	.L4
.L7:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 240
	cmp	eax, 159
	jle	.L8
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 15
	cmp	eax, 9
	jg	.L8
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 96
	movzx	eax, al
	or	ah, 1
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dab[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L4
.L8:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 240
	cmp	eax, 143
	jle	.L9
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 15
	cmp	eax, 9
	jle	.L9
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 102
	movzx	eax, al
	or	ah, 1
	mov	ecx, eax
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dab[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L4
.L9:
	mov	rax, QWORD PTR stderr[rip]
	mov	edx, DWORD PTR -4[rbp]
	lea	rsi, .LC0[rip]
	mov	rdi, rax
	mov	eax, 0
	call	fprintf@PLT
	mov	eax, 1
	jmp	.L10
.L4:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 256
	test	eax, eax
	je	.L11
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 512
	test	eax, eax
	je	.L12
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 154
	movzx	eax, al
	mov	edx, DWORD PTR -4[rbp]
	add	edx, 1024
	or	ah, 1
	mov	ecx, eax
	movsx	rax, edx
	lea	rdx, 0[0+rax*4]
	lea	rax, dab[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L13
.L12:
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 160
	movzx	eax, al
	mov	edx, DWORD PTR -4[rbp]
	add	edx, 1024
	or	ah, 1
	mov	ecx, eax
	movsx	rax, edx
	lea	rdx, 0[0+rax*4]
	lea	rax, dab[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L13
.L11:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 512
	test	eax, eax
	je	.L14
	mov	eax, DWORD PTR -4[rbp]
	add	eax, 250
	movzx	eax, al
	mov	edx, DWORD PTR -4[rbp]
	add	edx, 1024
	or	ah, 1
	mov	ecx, eax
	movsx	rax, edx
	lea	rdx, 0[0+rax*4]
	lea	rax, dab[rip]
	mov	DWORD PTR [rdx+rax], ecx
	jmp	.L13
.L14:
	mov	eax, DWORD PTR -4[rbp]
	lea	edx, 1024[rax]
	mov	eax, DWORD PTR -4[rbp]
	movzx	eax, al
	movsx	rdx, edx
	lea	rcx, 0[0+rdx*4]
	lea	rdx, dab[rip]
	mov	DWORD PTR [rcx+rdx], eax
.L13:
	add	DWORD PTR -4[rbp], 1
.L2:
	cmp	DWORD PTR -4[rbp], 1023
	jle	.L15
	lea	rdi, .LC1[rip]
	call	puts@PLT
	lea	rdi, .LC2[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC4[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC6[rip]
	call	puts@PLT
	lea	rdi, .LC7[rip]
	call	puts@PLT
	lea	rdi, .LC8[rip]
	call	puts@PLT
	lea	rdi, .LC9[rip]
	call	puts@PLT
	lea	rdi, .LC3[rip]
	call	puts@PLT
	lea	rdi, .LC10[rip]
	call	puts@PLT
	lea	rdi, .LC5[rip]
	call	puts@PLT
	lea	rdi, .LC11[rip]
	call	puts@PLT
	lea	rdi, .LC12[rip]
	call	puts@PLT
	lea	rdi, .LC13[rip]
	call	puts@PLT
	lea	rdi, .LC14[rip]
	call	puts@PLT
	mov	DWORD PTR -4[rbp], 0
	jmp	.L16
.L21:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1023
	test	eax, eax
	jne	.L17
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 1024
	test	eax, eax
	je	.L18
	lea	rdi, .LC15[rip]
	call	puts@PLT
	jmp	.L17
.L18:
	lea	rdi, .LC16[rip]
	call	puts@PLT
.L17:
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 7
	test	eax, eax
	jne	.L19
	mov	edi, 9
	call	putchar@PLT
.L19:
	mov	eax, DWORD PTR -4[rbp]
	cdqe
	lea	rdx, 0[0+rax*4]
	lea	rax, dab[rip]
	mov	eax, DWORD PTR [rdx+rax]
	mov	esi, eax
	lea	rdi, .LC17[rip]
	mov	eax, 0
	call	printf@PLT
	mov	eax, DWORD PTR -4[rbp]
	and	eax, 7
	cmp	eax, 7
	jne	.L20
	mov	edi, 10
	call	putchar@PLT
.L20:
	add	DWORD PTR -4[rbp], 1
.L16:
	cmp	DWORD PTR -4[rbp], 2047
	jle	.L21
	lea	rdi, .LC18[rip]
	call	puts@PLT
	mov	eax, 0
.L10:
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE0:
	.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	"952715.c"
	.text
	.comm	dab,8192,4
	.section	.rodata
	.align	2
.LC0:
	.ascii	"unhandled $%04x\012\000"
	.align	2
.LC1:
	.ascii	"/************************************************ \000"
	.align	2
.LC2:
	.ascii	" * Result table for Z8000 DAB instruction         \000"
	.align	2
.LC3:
	.ascii	" *                                                \000"
	.align	2
.LC4:
	.ascii	" * bits    description                            \000"
	.align	2
.LC5:
	.ascii	" * ---------------------------------------------- \000"
	.align	2
.LC6:
	.ascii	" * 0..7    destination value                      \000"
	.align	2
.LC7:
	.ascii	" * 8       carry flag before                      \000"
	.align	2
.LC8:
	.ascii	" * 9       half carry flag before                 \000"
	.align	2
.LC9:
	.ascii	" * 10      D flag (0 add/adc, 1 sub/sbc)          \000"
	.align	2
.LC10:
	.ascii	" * result  description                            \000"
	.align	2
.LC11:
	.ascii	" * 0..7    result value                           \000"
	.align	2
.LC12:
	.ascii	" * 8       carry flag after                       \000"
	.align	2
.LC13:
	.ascii	" ************************************************/\000"
	.align	2
.LC14:
	.ascii	"static const UINT16 Z8000_dab[0x800] = {\000"
	.align	2
.LC15:
	.ascii	"\011/* sub/sbc results */\000"
	.align	2
.LC16:
	.ascii	"\011/* add/adc results */\000"
	.align	2
.LC17:
	.ascii	"0x%03x,\000"
	.align	2
.LC18:
	.ascii	"};\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #16
	str	r0, [fp, #-16]
	str	r1, [fp, #-20]
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L2
.L15:
	ldr	r3, [fp, #-8]
	and	r3, r3, #256
	cmp	r3, #0
	beq	.L3
	ldr	r3, [fp, #-8]
	add	r3, r3, #102
	and	r3, r3, #255
	orr	r2, r3, #256
	ldr	r1, .L22
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	b	.L4
.L3:
	ldr	r3, [fp, #-8]
	and	r3, r3, #512
	cmp	r3, #0
	beq	.L5
	ldr	r3, [fp, #-8]
	add	r3, r3, #102
	and	r3, r3, #255
	orr	r2, r3, #256
	ldr	r1, .L22
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	b	.L4
.L5:
	ldr	r3, [fp, #-8]
	and	r3, r3, #240
	cmp	r3, #159
	bgt	.L6
	ldr	r3, [fp, #-8]
	and	r3, r3, #15
	cmp	r3, #9
	bgt	.L6
	ldr	r3, [fp, #-8]
	and	r2, r3, #255
	ldr	r1, .L22
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	b	.L4
.L6:
	ldr	r3, [fp, #-8]
	and	r3, r3, #240
	cmp	r3, #143
	bgt	.L7
	ldr	r3, [fp, #-8]
	and	r3, r3, #15
	cmp	r3, #9
	ble	.L7
	ldr	r3, [fp, #-8]
	add	r3, r3, #6
	and	r2, r3, #255
	ldr	r1, .L22
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	b	.L4
.L7:
	ldr	r3, [fp, #-8]
	and	r3, r3, #240
	cmp	r3, #159
	ble	.L8
	ldr	r3, [fp, #-8]
	and	r3, r3, #15
	cmp	r3, #9
	bgt	.L8
	ldr	r3, [fp, #-8]
	add	r3, r3, #96
	and	r3, r3, #255
	orr	r2, r3, #256
	ldr	r1, .L22
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	b	.L4
.L8:
	ldr	r3, [fp, #-8]
	and	r3, r3, #240
	cmp	r3, #143
	ble	.L9
	ldr	r3, [fp, #-8]
	and	r3, r3, #15
	cmp	r3, #9
	ble	.L9
	ldr	r3, [fp, #-8]
	add	r3, r3, #102
	and	r3, r3, #255
	orr	r2, r3, #256
	ldr	r1, .L22
	ldr	r3, [fp, #-8]
	str	r2, [r1, r3, lsl #2]
	b	.L4
.L9:
	ldr	r3, .L22+4
	ldr	r3, [r3]
	ldr	r2, [fp, #-8]
	ldr	r1, .L22+8
	mov	r0, r3
	bl	fprintf
	mov	r3, #1
	b	.L10
.L4:
	ldr	r3, [fp, #-8]
	and	r3, r3, #256
	cmp	r3, #0
	beq	.L11
	ldr	r3, [fp, #-8]
	and	r3, r3, #512
	cmp	r3, #0
	beq	.L12
	ldr	r3, [fp, #-8]
	add	r3, r3, #154
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	add	r3, r3, #1024
	orr	r2, r2, #256
	ldr	r1, .L22
	str	r2, [r1, r3, lsl #2]
	b	.L13
.L12:
	ldr	r3, [fp, #-8]
	add	r3, r3, #160
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	add	r3, r3, #1024
	orr	r2, r2, #256
	ldr	r1, .L22
	str	r2, [r1, r3, lsl #2]
	b	.L13
.L11:
	ldr	r3, [fp, #-8]
	and	r3, r3, #512
	cmp	r3, #0
	beq	.L14
	ldr	r3, [fp, #-8]
	add	r3, r3, #250
	and	r2, r3, #255
	ldr	r3, [fp, #-8]
	add	r3, r3, #1024
	orr	r2, r2, #256
	ldr	r1, .L22
	str	r2, [r1, r3, lsl #2]
	b	.L13
.L14:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1024
	ldr	r2, [fp, #-8]
	and	r2, r2, #255
	ldr	r1, .L22
	str	r2, [r1, r3, lsl #2]
.L13:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L2:
	ldr	r3, [fp, #-8]
	cmp	r3, #1024
	blt	.L15
	ldr	r0, .L22+12
	bl	puts
	ldr	r0, .L22+16
	bl	puts
	ldr	r0, .L22+20
	bl	puts
	ldr	r0, .L22+24
	bl	puts
	ldr	r0, .L22+28
	bl	puts
	ldr	r0, .L22+32
	bl	puts
	ldr	r0, .L22+36
	bl	puts
	ldr	r0, .L22+40
	bl	puts
	ldr	r0, .L22+44
	bl	puts
	ldr	r0, .L22+20
	bl	puts
	ldr	r0, .L22+48
	bl	puts
	ldr	r0, .L22+28
	bl	puts
	ldr	r0, .L22+52
	bl	puts
	ldr	r0, .L22+56
	bl	puts
	ldr	r0, .L22+60
	bl	puts
	ldr	r0, .L22+64
	bl	puts
	mov	r3, #0
	str	r3, [fp, #-8]
	b	.L16
.L21:
	ldr	r3, [fp, #-8]
	lsl	r3, r3, #22
	lsr	r3, r3, #22
	cmp	r3, #0
	bne	.L17
	ldr	r3, [fp, #-8]
	and	r3, r3, #1024
	cmp	r3, #0
	beq	.L18
	ldr	r0, .L22+68
	bl	puts
	b	.L17
.L18:
	ldr	r0, .L22+72
	bl	puts
.L17:
	ldr	r3, [fp, #-8]
	and	r3, r3, #7
	cmp	r3, #0
	bne	.L19
	mov	r0, #9
	bl	putchar
.L19:
	ldr	r2, .L22
	ldr	r3, [fp, #-8]
	ldr	r3, [r2, r3, lsl #2]
	mov	r1, r3
	ldr	r0, .L22+76
	bl	printf
	ldr	r3, [fp, #-8]
	and	r3, r3, #7
	cmp	r3, #7
	bne	.L20
	mov	r0, #10
	bl	putchar
.L20:
	ldr	r3, [fp, #-8]
	add	r3, r3, #1
	str	r3, [fp, #-8]
.L16:
	ldr	r3, [fp, #-8]
	cmp	r3, #2048
	blt	.L21
	ldr	r0, .L22+80
	bl	puts
	mov	r3, #0
.L10:
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L23:
	.align	2
.L22:
	.word	dab
	.word	stderr
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.word	.LC10
	.word	.LC11
	.word	.LC12
	.word	.LC13
	.word	.LC14
	.word	.LC15
	.word	.LC16
	.word	.LC17
	.word	.LC18
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
