	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dlg_draw_box2                  ## -- Begin function dlg_draw_box2
	.p2align	4, 0x90
_dlg_draw_box2:                         ## @dlg_draw_box2
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%r9d, -48(%rbp)                 ## 4-byte Spill
	movl	%r8d, %ebx
	movl	%ecx, %r12d
	movl	%edx, -76(%rbp)                 ## 4-byte Spill
                                        ## kill: def $esi killed $esi def $rsi
	movq	%rsi, -96(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r13
	movb	24(%rbp), %al
	movb	%al, -41(%rbp)                  ## 1-byte Spill
	movb	16(%rbp), %r15b
	callq	_dlg_get_attrs
	movb	%al, -43(%rbp)                  ## 1-byte Spill
	xorl	%r14d, %r14d
	movq	%r13, -72(%rbp)                 ## 8-byte Spill
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_dlg_attrset
	movq	%r12, -88(%rbp)                 ## 8-byte Spill
	testl	%r12d, %r12d
	jle	LBB0_16
## %bb.1:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	decl	%eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	-48(%rbp), %eax                 ## 4-byte Reload
	orb	$32, %al
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movzbl	%r15b, %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movzbl	-41(%rbp), %eax                 ## 1-byte Folded Reload
	movl	%eax, -56(%rbp)                 ## 4-byte Spill
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_2 Depth=1
	incl	%r14d
	cmpl	-88(%rbp), %r14d                ## 4-byte Folded Reload
	je	LBB0_16
LBB0_2:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leal	(%r14,%rax), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movl	-76(%rbp), %edx                 ## 4-byte Reload
	callq	_wmove
	testl	%ebx, %ebx
	jle	LBB0_15
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r14d, %r14d
	sete	-42(%rbp)                       ## 1-byte Folded Spill
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_4:                                 ##   Parent Loop BB0_2 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	%r14d, %eax
	orl	%r13d, %eax
	movq	_ACS_ULCORNER@GOTPCREL(%rip), %rdx
	movl	%r15d, %r12d
	je	LBB0_13
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpl	-60(%rbp), %r14d                ## 4-byte Folded Reload
	jne	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	_ACS_LLCORNER@GOTPCREL(%rip), %rdx
	movl	%r15d, %r12d
	testl	%r13d, %r13d
	je	LBB0_13
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	leal	(%rbx,%r13), %edi
	cmpl	$1, %edi
	sete	%al
	movq	_ACS_URCORNER@GOTPCREL(%rip), %rdx
	movzbl	-41(%rbp), %ecx                 ## 1-byte Folded Reload
	movl	%ecx, %r12d
	testb	%al, -42(%rbp)                  ## 1-byte Folded Reload
	je	LBB0_8
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_4 Depth=2
	movl	(%rdx), %edi
	callq	_dlg_boxchar
	orb	%r12b, %al
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=2
	movsbl	%al, %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_waddch
	decl	%r13d
	movl	%ebx, %eax
	addl	%r13d, %eax
	jne	LBB0_4
	jmp	LBB0_15
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=2
	movq	%rbx, %r8
	cmpl	$1, %edi
	sete	%dl
	testl	%r13d, %r13d
	sete	%sil
	cmpl	-60(%rbp), %r14d                ## 4-byte Folded Reload
	sete	%bl
	andb	%bl, %dl
	movl	%edx, %eax
	orb	-42(%rbp), %al                  ## 1-byte Folded Reload
	orb	%al, %bl
	testb	%dl, %dl
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	cmovnel	%ecx, %r12d
	movq	_ACS_HLINE@GOTPCREL(%rip), %rdx
	cmovneq	_ACS_LRCORNER@GOTPCREL(%rip), %rdx
	testb	%al, %al
	cmovel	%ecx, %r12d
	orb	%bl, %sil
	testb	%bl, %bl
	jne	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=2
	movl	-52(%rbp), %r12d                ## 4-byte Reload
	movq	_ACS_VLINE@GOTPCREL(%rip), %rdx
LBB0_10:                                ##   in Loop: Header=BB0_4 Depth=2
	testb	%sil, %sil
	cmovel	-56(%rbp), %r12d                ## 4-byte Folded Reload
	jne	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=2
	movl	-48(%rbp), %eax                 ## 4-byte Reload
                                        ## kill: def $al killed $al killed $eax
	cmpl	$1, %edi
	movq	%r8, %rbx
	jne	LBB0_14
	jmp	LBB0_13
LBB0_11:                                ##   in Loop: Header=BB0_4 Depth=2
	movq	%r8, %rbx
	jmp	LBB0_13
LBB0_16:
	movsbl	-43(%rbp), %esi                 ## 1-byte Folded Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dlg_attrset                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ACS_ULCORNER,4,2               ## @ACS_ULCORNER
	.comm	_ACS_LLCORNER,4,2               ## @ACS_LLCORNER
	.comm	_ACS_URCORNER,4,2               ## @ACS_URCORNER
	.comm	_ACS_LRCORNER,4,2               ## @ACS_LRCORNER
	.comm	_ACS_HLINE,4,2                  ## @ACS_HLINE
	.comm	_ACS_VLINE,4,2                  ## @ACS_VLINE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dlg_draw_box2                  ; -- Begin function dlg_draw_box2
	.p2align	2
_dlg_draw_box2:                         ; @dlg_draw_box2
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x25, x6
	mov	x27, x5
	mov	x21, x4
	mov	x20, x3
	stp	w1, w2, [sp, #16]               ; 8-byte Folded Spill
	mov	x24, x0
	bl	_dlg_get_attrs
	str	w0, [sp, #12]                   ; 4-byte Folded Spill
	mov	x0, x24
	mov	w1, #0
	bl	_dlg_attrset
	str	w20, [sp, #24]                  ; 4-byte Folded Spill
	subs	w28, w20, #1
	b.lt	LBB0_13
; %bb.1:
	mov	w26, #0
	orr	w8, w27, #0x20
	str	w8, [sp, #28]                   ; 4-byte Folded Spill
Lloh0:
	adrp	x23, _ACS_ULCORNER@GOTPAGE
Lloh1:
	ldr	x23, [x23, _ACS_ULCORNER@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	w26, w26, #1
	ldr	w8, [sp, #24]                   ; 4-byte Folded Reload
	cmp	w26, w8
	b.eq	LBB0_13
LBB0_3:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_5 Depth 2
	ldp	w8, w2, [sp, #16]               ; 8-byte Folded Reload
	add	w1, w26, w8
	mov	x0, x24
	bl	_wmove
	cmp	w21, #1
	b.lt	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w27, #0
	cmp	w26, #0
	cset	w22, eq
LBB0_5:                                 ;   Parent Loop BB0_3 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x9, x23
	mov	x20, x25
	orr	w8, w26, w27
	cbz	w8, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w26, w28
	b.ne	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=2
Lloh2:
	adrp	x9, _ACS_LLCORNER@GOTPAGE
Lloh3:
	ldr	x9, [x9, _ACS_LLCORNER@GOTPAGEOFF]
	mov	x20, x25
	cbz	w27, LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=2
	add	w8, w21, w27
	cmp	w8, #1
	cset	w9, eq
	and	w10, w22, w9
Lloh4:
	adrp	x9, _ACS_URCORNER@GOTPAGE
Lloh5:
	ldr	x9, [x9, _ACS_URCORNER@GOTPAGEOFF]
	mov	x20, x19
	tbz	w10, #0, LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=2
	ldr	w0, [x9]
	bl	_dlg_boxchar
	orr	w10, w0, w20
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=2
	sxtb	w1, w10
	mov	x0, x24
	bl	_waddch
	sub	w27, w27, #1
	cmn	w21, w27
	b.ne	LBB0_5
	b	LBB0_2
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=2
	cmp	w8, #1
	cset	w9, eq
	cmp	w27, #0
	cset	w10, eq
	cmp	w26, w28
	cset	w11, eq
	ands	w9, w11, w9
	orr	w9, w9, w22
	csel	w12, w19, w25, ne
	orr	w11, w9, w11
Lloh6:
	adrp	x13, _ACS_HLINE@GOTPAGE
Lloh7:
	ldr	x13, [x13, _ACS_HLINE@GOTPAGEOFF]
Lloh8:
	adrp	x14, _ACS_LRCORNER@GOTPAGE
Lloh9:
	ldr	x14, [x14, _ACS_LRCORNER@GOTPAGEOFF]
	csel	x13, x14, x13, ne
	cmp	w9, #0
	csel	w9, w12, w19, ne
	orr	w10, w11, w10
	cmp	w11, #0
	csel	w11, w9, w25, ne
Lloh10:
	adrp	x9, _ACS_VLINE@GOTPAGE
Lloh11:
	ldr	x9, [x9, _ACS_VLINE@GOTPAGEOFF]
	csel	x9, x13, x9, ne
	cmp	w10, #0
	csel	w20, w11, w19, ne
	tbnz	w10, #0, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=2
	ldr	w10, [sp, #28]                  ; 4-byte Folded Reload
	cmp	w8, #1
	b.ne	LBB0_10
	b	LBB0_9
LBB0_13:
	mov	x0, x24
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_dlg_attrset
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_ACS_ULCORNER,4,2               ; @ACS_ULCORNER
	.comm	_ACS_LLCORNER,4,2               ; @ACS_LLCORNER
	.comm	_ACS_URCORNER,4,2               ; @ACS_URCORNER
	.comm	_ACS_LRCORNER,4,2               ; @ACS_LRCORNER
	.comm	_ACS_HLINE,4,2                  ; @ACS_HLINE
	.comm	_ACS_VLINE,4,2                  ; @ACS_VLINE
.subsections_via_symbols
