	.file	"253001.c"
	.intel_syntax noprefix
	.text
	.section	.rodata
.LC0:
	.string	"usage: %s t p q n\n"
	.align 8
.LC1:
	.string	"  Generates the upper or lower Christoffel word for p/q"
.LC2:
	.string	"  t = type of word"
.LC3:
	.string	"    u = upper"
.LC4:
	.string	"    l = lower"
.LC5:
	.string	"  p = numerator"
.LC6:
	.string	"  q = denominator"
	.align 8
.LC7:
	.string	"  n = number of terms to generate, default=p+q"
.LC8:
	.string	"1"
.LC9:
	.string	"0"
	.text
	.globl	main
	.type	main, @function
main:
.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, 64
	mov	DWORD PTR -52[rbp], edi
	mov	QWORD PTR -64[rbp], rsi
	cmp	DWORD PTR -52[rbp], 2
	jg	.L2
	mov	rax, QWORD PTR -64[rbp]
	mov	rax, QWORD PTR [rax]
	mov	rsi, rax
	lea	rdi, .LC0[rip]
	mov	eax, 0
	call	printf@PLT
	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
	mov	edi, -1
	call	exit@PLT
.L2:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 16
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -24[rbp], rax
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 24
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	mov	QWORD PTR -16[rbp], rax
	cmp	DWORD PTR -52[rbp], 5
	jne	.L3
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 32
	mov	rax, QWORD PTR [rax]
	mov	edx, 10
	mov	esi, 0
	mov	rdi, rax
	call	strtoul@PLT
	jmp	.L4
.L3:
	mov	rdx, QWORD PTR -24[rbp]
	mov	rax, QWORD PTR -16[rbp]
	add	rax, rdx
.L4:
	mov	QWORD PTR -8[rbp], rax
	mov	QWORD PTR -32[rbp], 0
.L15:
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 117
	jne	.L5
	lea	rax, .LC8[rip]
	jmp	.L6
.L5:
	lea	rax, .LC9[rip]
.L6:
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	add	QWORD PTR -32[rbp], 1
	mov	rax, QWORD PTR -24[rbp]
	mov	QWORD PTR -48[rbp], rax
	mov	rax, QWORD PTR -16[rbp]
	mov	QWORD PTR -40[rbp], rax
	jmp	.L7
.L11:
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jbe	.L8
	mov	edi, 49
	call	putchar@PLT
	mov	rax, QWORD PTR -16[rbp]
	add	QWORD PTR -40[rbp], rax
	jmp	.L9
.L8:
	mov	edi, 48
	call	putchar@PLT
	mov	rax, QWORD PTR -24[rbp]
	add	QWORD PTR -48[rbp], rax
.L9:
	add	QWORD PTR -32[rbp], 1
.L7:
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	je	.L10
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jb	.L11
.L10:
	mov	rax, QWORD PTR -48[rbp]
	cmp	rax, QWORD PTR -40[rbp]
	jne	.L12
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jnb	.L12
	mov	rax, QWORD PTR -64[rbp]
	add	rax, 8
	mov	rax, QWORD PTR [rax]
	movzx	eax, BYTE PTR [rax]
	cmp	al, 117
	jne	.L13
	lea	rax, .LC9[rip]
	jmp	.L14
.L13:
	lea	rax, .LC8[rip]
.L14:
	mov	rdi, rax
	mov	eax, 0
	call	printf@PLT
	add	QWORD PTR -32[rbp], 1
.L12:
	mov	rax, QWORD PTR -32[rbp]
	cmp	rax, QWORD PTR -8[rbp]
	jb	.L15
	mov	edi, 10
	call	putchar@PLT
	mov	eax, 0
	leave
	.cfi_def_cfa 7, 8
	ret
	.cfi_endproc
.LFE6:
	.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	"253001.c"
	.text
	.section	.rodata
	.align	2
.LC0:
	.ascii	"usage: %s t p q n\012\000"
	.align	2
.LC1:
	.ascii	"  Generates the upper or lower Christoffel word for"
	.ascii	" p/q\000"
	.align	2
.LC2:
	.ascii	"  t = type of word\000"
	.align	2
.LC3:
	.ascii	"    u = upper\000"
	.align	2
.LC4:
	.ascii	"    l = lower\000"
	.align	2
.LC5:
	.ascii	"  p = numerator\000"
	.align	2
.LC6:
	.ascii	"  q = denominator\000"
	.align	2
.LC7:
	.ascii	"  n = number of terms to generate, default=p+q\000"
	.align	2
.LC8:
	.ascii	"1\000"
	.align	2
.LC9:
	.ascii	"0\000"
	.text
	.align	2
	.global	main
	.syntax unified
	.arm
	.fpu softvfp
	.type	main, %function
main:
	@ args = 0, pretend = 0, frame = 32
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{fp, lr}
	add	fp, sp, #4
	sub	sp, sp, #32
	str	r0, [fp, #-32]
	str	r1, [fp, #-36]
	ldr	r3, [fp, #-32]
	cmp	r3, #2
	bgt	.L2
	ldr	r3, [fp, #-36]
	ldr	r3, [r3]
	mov	r1, r3
	ldr	r0, .L17
	bl	printf
	ldr	r0, .L17+4
	bl	puts
	ldr	r0, .L17+8
	bl	puts
	ldr	r0, .L17+12
	bl	puts
	ldr	r0, .L17+16
	bl	puts
	ldr	r0, .L17+20
	bl	puts
	ldr	r0, .L17+24
	bl	puts
	ldr	r0, .L17+28
	bl	puts
	mvn	r0, #0
	bl	exit
.L2:
	ldr	r3, [fp, #-36]
	add	r3, r3, #8
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-16]
	ldr	r3, [fp, #-36]
	add	r3, r3, #12
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	str	r0, [fp, #-12]
	ldr	r3, [fp, #-32]
	cmp	r3, #5
	bne	.L3
	ldr	r3, [fp, #-36]
	add	r3, r3, #16
	ldr	r3, [r3]
	mov	r2, #10
	mov	r1, #0
	mov	r0, r3
	bl	strtoul
	mov	r3, r0
	b	.L4
.L3:
	ldr	r2, [fp, #-16]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
.L4:
	str	r3, [fp, #-8]
	mov	r3, #0
	str	r3, [fp, #-20]
.L15:
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #117
	bne	.L5
	ldr	r3, .L17+32
	b	.L6
.L5:
	ldr	r3, .L17+36
.L6:
	mov	r0, r3
	bl	printf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
	ldr	r3, [fp, #-16]
	str	r3, [fp, #-28]
	ldr	r3, [fp, #-12]
	str	r3, [fp, #-24]
	b	.L7
.L11:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bls	.L8
	mov	r0, #49
	bl	putchar
	ldr	r2, [fp, #-24]
	ldr	r3, [fp, #-12]
	add	r3, r2, r3
	str	r3, [fp, #-24]
	b	.L9
.L8:
	mov	r0, #48
	bl	putchar
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-16]
	add	r3, r2, r3
	str	r3, [fp, #-28]
.L9:
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L7:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	beq	.L10
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcc	.L11
.L10:
	ldr	r2, [fp, #-28]
	ldr	r3, [fp, #-24]
	cmp	r2, r3
	bne	.L12
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcs	.L12
	ldr	r3, [fp, #-36]
	add	r3, r3, #4
	ldr	r3, [r3]
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, #117
	bne	.L13
	ldr	r3, .L17+36
	b	.L14
.L13:
	ldr	r3, .L17+32
.L14:
	mov	r0, r3
	bl	printf
	ldr	r3, [fp, #-20]
	add	r3, r3, #1
	str	r3, [fp, #-20]
.L12:
	ldr	r2, [fp, #-20]
	ldr	r3, [fp, #-8]
	cmp	r2, r3
	bcc	.L15
	mov	r0, #10
	bl	putchar
	mov	r3, #0
	mov	r0, r3
	sub	sp, fp, #4
	@ sp needed
	pop	{fp, pc}
.L18:
	.align	2
.L17:
	.word	.LC0
	.word	.LC1
	.word	.LC2
	.word	.LC3
	.word	.LC4
	.word	.LC5
	.word	.LC6
	.word	.LC7
	.word	.LC8
	.word	.LC9
	.size	main, .-main
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
