	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dlg_button_layout              ## -- Begin function dlg_button_layout
	.p2align	4, 0x90
_dlg_button_layout:                     ## @dlg_button_layout
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, %r15
	callq	_dlg_button_count
	testq	%rax, %rax
	je	LBB0_6
## %bb.2:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	xorl	%ebx, %ebx
	leaq	-60(%rbp), %r12
	leaq	-56(%rbp), %r13
	leaq	-52(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	incl	%ebx
	movq	%r15, %rdi
	movl	%ebx, %esi
	movq	%r12, %rdx
	movq	%r13, %rcx
	movq	%r14, %r8
	callq	_dlg_button_x_step
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movq	_MARGIN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	leal	(%rbx,%rax,4), %ecx
	movq	_COLS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ecx
	cmovll	%ecx, %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	cmpl	(%rcx), %eax
	jle	LBB0_6
## %bb.5:
	movl	%eax, (%rcx)
LBB0_6:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MARGIN,4,2                     ## @MARGIN
	.comm	_COLS,4,2                       ## @COLS
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dlg_button_layout              ; -- Begin function dlg_button_layout
	.p2align	2
_dlg_button_layout:                     ; @dlg_button_layout
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x1
	mov	x20, x0
	bl	_dlg_button_count
	cbz	x0, LBB0_6
; %bb.2:
	mov	w21, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	add	w21, w21, #1
	add	x2, sp, #12
	add	x3, sp, #8
	add	x4, sp, #4
	mov	x0, x20
	mov	x1, x21
	bl	_dlg_button_x_step
	cbz	w0, LBB0_3
; %bb.4:
Lloh0:
	adrp	x8, _MARGIN@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MARGIN@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _COLS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _COLS@GOTPAGEOFF]
	add	w8, w21, w8, lsl #2
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w8, w8, w9, lt
	ldr	w9, [x19]
	cmp	w8, w9
	b.le	LBB0_6
; %bb.5:
	str	w8, [x19]
LBB0_6:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MARGIN,4,2                     ; @MARGIN
	.comm	_COLS,4,2                       ; @COLS
.subsections_via_symbols
