	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function UI_CDKeyMenu_DrawKey
_UI_CDKeyMenu_DrawKey:                  ## @UI_CDKeyMenu_DrawKey
	.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
	movq	%rdi, %r15
	movq	16(%rdi), %rax
	movq	(%rax), %rcx
	movq	8(%rdi), %r13
	movq	_UI_LEFT@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	cmpq	%r13, %rcx
	jne	LBB0_1
## %bb.2:
	movq	_color_yellow@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_color_orange@GOTPCREL(%rip), %rax
LBB0_3:
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	_BIGCHAR_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	leal	(,%rdx,8), %eax
	movl	$320, %r12d                     ## imm = 0x140
	subl	%eax, %r12d
	movq	_BIGCHAR_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	movl	$240, %ebx
	subl	%eax, %ebx
	shll	$4, %edx
	movq	_listbar_color@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	%r12d, %edi
	movl	%ebx, %esi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_UI_FillRect
	movl	4(%r15), %edx
	movl	%r12d, %edi
	movl	%ebx, %esi
	movl	%r14d, %ecx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	callq	_UI_DrawString
	cmpq	%r13, -56(%rbp)                 ## 8-byte Folded Reload
	jne	LBB0_5
## %bb.4:
	xorl	%eax, %eax
	callq	_trap_Key_GetOverstrikeMode
	movq	_UI_PULSE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	notl	%ecx
	andl	%ecx, %r14d
	movq	_UI_BLINK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %r14d
	movq	_BIGCHAR_WIDTH@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	imull	(%r15), %edi
	addl	%r12d, %edi
	movq	_color_white@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	cmpq	$1, %rax
	movl	$11, %edx
	sbbl	$0, %edx
	movl	%ebx, %esi
	movl	%r14d, %ecx
	callq	_UI_DrawChar
LBB0_5:
	movl	4(%r15), %edi
	callq	_UI_CDKeyMenu_PreValidateKey
	cmpl	$1, %eax
	je	LBB0_6
## %bb.7:
	testl	%eax, %eax
	jne	LBB0_9
## %bb.8:
	leaq	L_.str.1(%rip), %rdx
	movq	_color_white@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_6:
	leaq	L_.str(%rip), %rdx
	movq	_color_yellow@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_9:
	leaq	L_.str.2(%rip), %rdx
	movq	_color_red@GOTPCREL(%rip), %rax
LBB0_10:
	movq	_UI_CENTER@GOTPCREL(%rip), %rsi
	movq	_UI_SMALLFONT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	movq	(%rax), %r8
	movl	$320, %edi                      ## imm = 0x140
	movl	$376, %esi                      ## imm = 0x178
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_UI_DrawProportionalString      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_UI_LEFT,4,2                    ## @UI_LEFT
	.comm	_color_yellow,8,3               ## @color_yellow
	.comm	_color_orange,8,3               ## @color_orange
	.comm	_BIGCHAR_WIDTH,4,2              ## @BIGCHAR_WIDTH
	.comm	_BIGCHAR_HEIGHT,4,2             ## @BIGCHAR_HEIGHT
	.comm	_listbar_color,4,2              ## @listbar_color
	.comm	_UI_PULSE,4,2                   ## @UI_PULSE
	.comm	_UI_BLINK,4,2                   ## @UI_BLINK
	.comm	_color_white,8,3                ## @color_white
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Please enter your CD Key"

	.comm	_UI_CENTER,4,2                  ## @UI_CENTER
	.comm	_UI_SMALLFONT,4,2               ## @UI_SMALLFONT
L_.str.1:                               ## @.str.1
	.asciz	"The CD Key appears to be valid, thank you"

L_.str.2:                               ## @.str.2
	.asciz	"The CD Key is not valid"

	.comm	_color_red,8,3                  ## @color_red
	.no_dead_strip	_UI_CDKeyMenu_DrawKey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function UI_CDKeyMenu_DrawKey
_UI_CDKeyMenu_DrawKey:                  ; @UI_CDKeyMenu_DrawKey
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x0
	ldp	x25, x8, [x0, #8]
	ldr	x26, [x8]
Lloh0:
	adrp	x8, _UI_LEFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UI_LEFT@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
Lloh3:
	adrp	x8, _color_yellow@GOTPAGE
Lloh4:
	ldr	x8, [x8, _color_yellow@GOTPAGEOFF]
Lloh5:
	adrp	x9, _color_orange@GOTPAGE
Lloh6:
	ldr	x9, [x9, _color_orange@GOTPAGEOFF]
	cmp	x26, x25
	csel	x8, x8, x9, eq
	ldr	x23, [x8]
Lloh7:
	adrp	x24, _BIGCHAR_WIDTH@GOTPAGE
Lloh8:
	ldr	x24, [x24, _BIGCHAR_WIDTH@GOTPAGEOFF]
	ldr	w8, [x24]
	mov	w9, #320
	sub	w22, w9, w8, lsl #3
Lloh9:
	adrp	x9, _BIGCHAR_HEIGHT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _BIGCHAR_HEIGHT@GOTPAGEOFF]
Lloh11:
	ldr	w3, [x9]
	cmp	w3, #0
	cinc	w9, w3, lt
	mov	w10, #240
	sub	w21, w10, w9, asr #1
	lsl	w2, w8, #4
Lloh12:
	adrp	x8, _listbar_color@GOTPAGE
Lloh13:
	ldr	x8, [x8, _listbar_color@GOTPAGEOFF]
Lloh14:
	ldr	w4, [x8]
	mov	x0, x22
	mov	x1, x21
	bl	_UI_FillRect
	ldr	w2, [x19, #4]
	mov	x0, x22
	mov	x1, x21
	mov	x3, x20
	mov	x4, x23
	bl	_UI_DrawString
	cmp	x26, x25
	b.ne	LBB0_2
; %bb.1:
Lloh15:
	adrp	x23, _color_white@GOTPAGE
Lloh16:
	ldr	x23, [x23, _color_white@GOTPAGEOFF]
	bl	_trap_Key_GetOverstrikeMode
Lloh17:
	adrp	x8, _UI_PULSE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _UI_PULSE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	bic	w8, w20, w8
Lloh20:
	adrp	x9, _UI_BLINK@GOTPAGE
Lloh21:
	ldr	x9, [x9, _UI_BLINK@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w3, w8, w9
	ldr	w8, [x19]
	ldr	w9, [x24]
	madd	w8, w9, w8, w22
Lloh23:
	ldr	x4, [x23]
	cmp	x0, #0
	mov	w9, #10
	cinc	w2, w9, ne
	mov	x0, x8
	mov	x1, x21
	bl	_UI_DrawChar
LBB0_2:
	ldr	w0, [x19, #4]
	bl	_UI_CDKeyMenu_PreValidateKey
Lloh24:
	adrp	x8, l_.str@PAGE
Lloh25:
	add	x8, x8, l_.str@PAGEOFF
Lloh26:
	adrp	x9, _color_yellow@GOTPAGE
Lloh27:
	ldr	x9, [x9, _color_yellow@GOTPAGEOFF]
Lloh28:
	adrp	x10, l_.str.2@PAGE
Lloh29:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh30:
	adrp	x11, _color_red@GOTPAGE
Lloh31:
	ldr	x11, [x11, _color_red@GOTPAGEOFF]
Lloh32:
	adrp	x12, l_.str.1@PAGE
Lloh33:
	add	x12, x12, l_.str.1@PAGEOFF
Lloh34:
	adrp	x13, _color_white@GOTPAGE
Lloh35:
	ldr	x13, [x13, _color_white@GOTPAGEOFF]
	cmp	w0, #0
	csel	x11, x11, x13, ne
	csel	x10, x10, x12, ne
	cmp	w0, #1
	csel	x9, x9, x11, eq
Lloh36:
	adrp	x11, _UI_CENTER@GOTPAGE
Lloh37:
	ldr	x11, [x11, _UI_CENTER@GOTPAGEOFF]
	csel	x2, x8, x10, eq
Lloh38:
	ldr	w8, [x11]
Lloh39:
	adrp	x10, _UI_SMALLFONT@GOTPAGE
Lloh40:
	ldr	x10, [x10, _UI_SMALLFONT@GOTPAGEOFF]
Lloh41:
	ldr	w10, [x10]
	orr	w3, w10, w8
	ldr	x4, [x9]
	mov	w0, #320
	mov	w1, #376
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_UI_DrawProportionalString
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh23
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpAdd	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_UI_LEFT,4,2                    ; @UI_LEFT
	.comm	_color_yellow,8,3               ; @color_yellow
	.comm	_color_orange,8,3               ; @color_orange
	.comm	_BIGCHAR_WIDTH,4,2              ; @BIGCHAR_WIDTH
	.comm	_BIGCHAR_HEIGHT,4,2             ; @BIGCHAR_HEIGHT
	.comm	_listbar_color,4,2              ; @listbar_color
	.comm	_UI_PULSE,4,2                   ; @UI_PULSE
	.comm	_UI_BLINK,4,2                   ; @UI_BLINK
	.comm	_color_white,8,3                ; @color_white
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Please enter your CD Key"

	.comm	_UI_CENTER,4,2                  ; @UI_CENTER
	.comm	_UI_SMALLFONT,4,2               ; @UI_SMALLFONT
l_.str.1:                               ; @.str.1
	.asciz	"The CD Key appears to be valid, thank you"

l_.str.2:                               ; @.str.2
	.asciz	"The CD Key is not valid"

	.comm	_color_red,8,3                  ; @color_red
	.no_dead_strip	_UI_CDKeyMenu_DrawKey
.subsections_via_symbols
