	.file	"extr_buttons.c_dlg_button_layout.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	dlg_button_layout
	.type	dlg_button_layout, @function
dlg_button_layout:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 24[rsp], rax
	xor	eax, eax
	test	rdi, rdi
	je	.L1
	mov	rbp, rdi
	mov	r12, rsi
	call	dlg_button_count@PLT
	test	rax, rax
	je	.L1
	mov	ebx, 1
	lea	r15, 20[rsp]
	lea	r14, 16[rsp]
	lea	r13, 12[rsp]
	jmp	.L4
	.p2align 4,,10
	.p2align 3
.L6:
	add	ebx, 1
.L4:
	mov	r8, r15
	mov	rcx, r14
	mov	rdx, r13
	mov	esi, ebx
	mov	rdi, rbp
	call	dlg_button_x_step@PLT
	test	eax, eax
	je	.L6
	mov	eax, DWORD PTR MARGIN[rip]
	lea	eax, [rbx+rax*4]
	cmp	DWORD PTR COLS[rip], eax
	cmovle	eax, DWORD PTR COLS[rip]
	cmp	DWORD PTR [r12], eax
	jl	.L11
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR 24[rsp]
	xor	rax, QWORD PTR fs:40
	jne	.L12
	add	rsp, 40
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L11:
	.cfi_restore_state
	mov	DWORD PTR [r12], eax
	jmp	.L1
.L12:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	dlg_button_layout, .-dlg_button_layout
	.comm	MARGIN,4,4
	.comm	COLS,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_buttons.c_dlg_button_layout.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	dlg_button_layout
	.syntax unified
	.arm
	.fpu softvfp
	.type	dlg_button_layout, %function
dlg_button_layout:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, lr}
	ldr	r3, .L12
	sub	sp, sp, #28
	subs	r5, r0, #0
	ldr	r3, [r3]
	str	r3, [sp, #20]
	mov	r3,#0
	beq	.L1
	mov	r7, r1
	bl	dlg_button_count
	cmp	r0, #0
	beq	.L1
	mov	r4, #1
	add	r6, sp, #16
	b	.L4
.L6:
	add	r4, r4, #1
.L4:
	mov	r1, r4
	mov	r0, r5
	str	r6, [sp]
	add	r3, sp, #12
	add	r2, sp, #8
	bl	dlg_button_x_step
	cmp	r0, #0
	beq	.L6
	ldr	r2, .L12+4
	ldr	r3, .L12+8
	ldr	r1, [r2]
	ldr	r3, [r3]
	add	r4, r4, r1, lsl #2
	cmp	r4, r3
	movge	r4, r3
	ldr	r3, [r7]
	cmp	r3, r4
	strlt	r4, [r7]
.L1:
	ldr	r3, .L12
	ldr	r2, [r3]
	ldr	r3, [sp, #20]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L11
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, pc}
.L11:
	bl	__stack_chk_fail
.L13:
	.align	2
.L12:
	.word	.LC0
	.word	MARGIN
	.word	COLS
	.size	dlg_button_layout, .-dlg_button_layout
	.comm	MARGIN,4,4
	.comm	COLS,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
