	.file	"extr_monthcal.c_MONTHCAL_GetMonthRange.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"flag=%d, st=%p\n"
.LC1:
	.string	"Unknown flag value, got %d\n"
	.text
	.p2align 4
	.type	MONTHCAL_GetMonthRange, @function
MONTHCAL_GetMonthRange:
.LFB0:
	.cfi_startproc
	endbr64
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	mov	r12, rdi
	lea	rdi, .LC0[rip]
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	ebp, esi
	push	rbx
	.cfi_def_cfa_offset 32
	.cfi_offset 3, -32
	mov	rbx, rdx
	call	TRACE@PLT
	cmp	ebp, 128
	je	.L2
	cmp	ebp, 129
	je	.L3
	mov	esi, ebp
	lea	rdi, .LC1[rip]
	call	WARN@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	xor	eax, eax
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L2:
	.cfi_restore_state
	test	rbx, rbx
	je	.L5
	mov	rbp, QWORD PTR [r12]
	mov	rdi, r12
	mov	rax, QWORD PTR 0[rbp]
	mov	QWORD PTR [rbx], rax
	mov	eax, DWORD PTR 8[rbp]
	mov	DWORD PTR 8[rbx], eax
	call	MONTHCAL_GetCalCount@PLT
	mov	ecx, DWORD PTR min_allowed_date[rip+8]
	cdqe
	lea	rax, [rax+rax*2]
	lea	rax, 0[rbp+rax*4]
	mov	rdx, QWORD PTR -12[rax]
	mov	QWORD PTR 12[rbx], rdx
	mov	eax, DWORD PTR -4[rax]
	mov	DWORD PTR 20[rbx], eax
	mov	eax, 1
	cmp	DWORD PTR 8[rbx], ecx
	je	.L20
.L6:
	mov	DWORD PTR [rbx], eax
	mov	esi, DWORD PTR TRUE[rip]
	mov	rdi, rbx
	call	MONTHCAL_CalculateDayOfWeek@PLT
	mov	esi, DWORD PTR 16[rbx]
	mov	edi, DWORD PTR 20[rbx]
	call	MONTHCAL_MonthLength@PLT
	mov	esi, DWORD PTR TRUE[rip]
	lea	rdi, 12[rbx]
	mov	DWORD PTR 12[rbx], eax
	call	MONTHCAL_CalculateDayOfWeek@PLT
.L5:
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	mov	rdi, r12
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	jmp	MONTHCAL_GetCalCount@PLT
	.p2align 4,,10
	.p2align 3
.L3:
	.cfi_restore_state
	test	rbx, rbx
	je	.L7
	mov	rsi, rbx
	mov	rdi, r12
	call	MONTHCAL_GetMinDate@PLT
	lea	rsi, 12[rbx]
	mov	rdi, r12
	call	MONTHCAL_GetMaxDate@PLT
.L7:
	mov	rdi, r12
	call	MONTHCAL_GetCalCount@PLT
	pop	rbx
	.cfi_remember_state
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	add	eax, 2
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L20:
	.cfi_restore_state
	mov	ecx, DWORD PTR min_allowed_date[rip+4]
	cmp	DWORD PTR 4[rbx], ecx
	jne	.L6
	mov	eax, DWORD PTR min_allowed_date[rip]
	jmp	.L6
	.cfi_endproc
.LFE0:
	.size	MONTHCAL_GetMonthRange, .-MONTHCAL_GetMonthRange
	.comm	min_allowed_date,12,8
	.comm	TRUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.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, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_monthcal.c_MONTHCAL_GetMonthRange.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"flag=%d, st=%p\012\000"
	.align	2
.LC1:
	.ascii	"Unknown flag value, got %d\012\000"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	MONTHCAL_GetMonthRange, %function
MONTHCAL_GetMonthRange:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, lr}
	mov	r5, r1
	mov	r6, r0
	ldr	r0, .L21
	mov	r4, r2
	bl	TRACE
	cmp	r5, #128
	beq	.L2
	cmp	r5, #129
	beq	.L3
	mov	r1, r5
	ldr	r0, .L21+4
	bl	WARN
	mov	r0, #0
	pop	{r4, r5, r6, r7, r8, pc}
.L2:
	cmp	r4, #0
	beq	.L5
	ldr	r5, [r6]
	add	r7, r4, #12
	ldm	r5, {r0, r1, r2}
	stm	r4, {r0, r1, r2}
	mov	r0, r6
	bl	MONTHCAL_GetCalCount
	add	r0, r0, r0, lsl #1
	add	r5, r5, r0, lsl #2
	ldmdb	r5, {r0, r1, r2}
	stm	r7, {r0, r1, r2}
	ldr	r3, .L21+8
	ldr	r1, [r4, #8]
	ldr	r2, [r3, #8]
	cmp	r1, r2
	beq	.L20
.L10:
	mov	r3, #1
.L6:
	ldr	r5, .L21+12
	str	r3, [r4]
	ldr	r1, [r5]
	mov	r0, r4
	bl	MONTHCAL_CalculateDayOfWeek
	ldr	r1, [r4, #16]
	ldr	r0, [r4, #20]
	bl	MONTHCAL_MonthLength
	ldr	r1, [r5]
	str	r0, [r4, #12]
	mov	r0, r7
	bl	MONTHCAL_CalculateDayOfWeek
.L5:
	mov	r0, r6
	pop	{r4, r5, r6, r7, r8, lr}
	b	MONTHCAL_GetCalCount
.L3:
	cmp	r4, #0
	beq	.L7
	mov	r1, r4
	mov	r0, r6
	bl	MONTHCAL_GetMinDate
	mov	r0, r6
	add	r1, r4, #12
	bl	MONTHCAL_GetMaxDate
.L7:
	mov	r0, r6
	bl	MONTHCAL_GetCalCount
	add	r0, r0, #2
	pop	{r4, r5, r6, r7, r8, pc}
.L20:
	ldr	r2, [r3, #4]
	ldr	r1, [r4, #4]
	cmp	r1, r2
	ldreq	r3, [r3]
	bne	.L10
	b	.L6
.L22:
	.align	2
.L21:
	.word	.LC0
	.word	.LC1
	.word	min_allowed_date
	.word	TRUE
	.size	MONTHCAL_GetMonthRange, .-MONTHCAL_GetMonthRange
	.comm	min_allowed_date,12,4
	.comm	TRUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
