	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function make_bg
_make_bg:                               ## @make_bg
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_g_menubg_src_ptr@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	testq	%rsi, %rsi
	je	LBB0_14
## %bb.1:
	movq	_g_screen_width@GOTPCREL(%rip), %r13
	movslq	(%r13), %r9
	movl	%r9d, %r12d
	movq	_g_screen_height@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	movq	_g_menuscreen_w@GOTPCREL(%rip), %r10
	movl	(%r10), %ecx
	testl	%edi, %edi
	jne	LBB0_10
## %bb.2:
	movl	%ecx, %eax
	cltd
	idivl	%r9d
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.3:
	movq	_g_menuscreen_h@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, %eax
	cltd
	idivl	%r14d
	cmpl	$2, %eax
	jl	LBB0_10
## %bb.4:
	testl	%r14d, %r14d
	jle	LBB0_13
## %bb.5:
	movq	_g_menubg_ptr@GOTPCREL(%rip), %rax
	movl	%edi, %edx
	shrl	$31, %edx
	addl	%edi, %edx
	sarl	%edx
	subl	%r14d, %edx
	imull	%ecx, %edx
	movl	%edx, %edi
	shrl	$31, %edi
	addl	%edx, %edi
	sarl	%edi
	movslq	%edi, %rdx
	shlq	$2, %rdx
	addq	(%rax), %rdx
	movl	%ecx, %eax
	shrl	$31, %eax
	addl	%ecx, %eax
	sarl	%eax
	subl	%r12d, %eax
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	movslq	%edi, %rax
	leaq	(%rdx,%rax,4), %rax
	leaq	(%r9,%r9), %r8
	xorl	%r15d, %r15d
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_6 Depth=1
	incl	%r15d
	movslq	%ecx, %rdx
	leaq	(%rax,%rdx,4), %rax
	addq	%r8, %rsi
	cmpl	%r14d, %r15d
	je	LBB0_13
LBB0_6:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	testl	%r9d, %r9d
	jle	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_8:                                 ##   Parent Loop BB0_6 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movzwl	(%rsi,%rdi,2), %ebx
	movl	%ebx, %edx
	shrl	%edx
	andl	$31695, %edx                    ## imm = 0x7BCF
	shrl	$3, %ebx
	andl	$6339, %ebx                     ## imm = 0x18C3
	subl	%ebx, %edx
	movl	%edx, %ebx
	shll	$16, %ebx
	orl	%edx, %ebx
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	movslq	%edx, %rcx
	addq	%rdi, %rcx
	movl	%ebx, (%rax,%rcx,4)
	movl	%ebx, (%rax,%rdi,4)
	incq	%rdi
	movl	(%r10), %ecx
	cmpq	%rdi, %r12
	jne	LBB0_8
	jmp	LBB0_9
LBB0_10:
	cmpl	%ecx, %r12d
	cmovgel	%ecx, %r12d
	movq	_g_menuscreen_h@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %r14d
	cmovgel	%eax, %r14d
	testl	%r14d, %r14d
	jle	LBB0_13
## %bb.11:
	movq	_g_menubg_ptr@GOTPCREL(%rip), %rdx
	movl	%r14d, %ebx
	shrl	%ebx
	movl	%eax, %edi
	shrl	$31, %edi
	addl	%eax, %edi
	sarl	%edi
	subl	%ebx, %edi
	imull	%ecx, %edi
	movslq	%edi, %rax
	addq	%rax, %rax
	addq	(%rdx), %rax
	movl	%r12d, %edx
	shrl	$31, %edx
	addl	%r12d, %edx
	sarl	%edx
	movl	%ecx, %edi
	shrl	$31, %edi
	addl	%ecx, %edi
	sarl	%edi
	subl	%edx, %edi
	movslq	%edi, %rcx
	leaq	(%rax,%rcx,2), %rbx
	incl	%r14d
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movl	%r12d, %edx
	movl	$1, %ecx
	movl	%r14d, %r15d
	movq	%r10, %r14
	callq	_menu_darken_bg
	movq	%r14, %r10
	movl	%r15d, %r14d
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movslq	(%r10), %rax
	leaq	(%rbx,%rax,2), %rbx
	movslq	(%r13), %rax
	leaq	(%rsi,%rax,2), %rsi
	decl	%r14d
	cmpl	$1, %r14d
	ja	LBB0_12
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	_g_menubg_ptr@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	movq	_g_menuscreen_w@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_g_menuscreen_h@GOTPCREL(%rip), %rax
	imull	(%rax), %edx
	addl	%edx, %edx
	xorl	%esi, %esi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_memset                         ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_g_menubg_src_ptr,8,3           ## @g_menubg_src_ptr
	.comm	_g_screen_width,4,2             ## @g_screen_width
	.comm	_g_screen_height,4,2            ## @g_screen_height
	.comm	_g_menubg_ptr,8,3               ## @g_menubg_ptr
	.comm	_g_menuscreen_w,4,2             ## @g_menuscreen_w
	.comm	_g_menuscreen_h,4,2             ## @g_menuscreen_h
	.no_dead_strip	_make_bg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function make_bg
_make_bg:                               ; @make_bg
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
Lloh0:
	adrp	x8, _g_menubg_src_ptr@GOTPAGE
Lloh1:
	ldr	x8, [x8, _g_menubg_src_ptr@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	cbz	x19, LBB0_14
; %bb.1:
Lloh3:
	adrp	x23, _g_screen_width@GOTPAGE
Lloh4:
	ldr	x23, [x23, _g_screen_width@GOTPAGEOFF]
	ldrsw	x11, [x23]
	and	x9, x11, #0xffffffff
Lloh5:
	adrp	x8, _g_screen_height@GOTPAGE
Lloh6:
	ldr	x8, [x8, _g_screen_height@GOTPAGEOFF]
Lloh7:
	ldr	w10, [x8]
Lloh8:
	adrp	x22, _g_menuscreen_w@GOTPAGE
Lloh9:
	ldr	x22, [x22, _g_menuscreen_w@GOTPAGEOFF]
	ldr	w8, [x22]
Lloh10:
	adrp	x12, _g_menuscreen_h@GOTPAGE
Lloh11:
	ldr	x12, [x12, _g_menuscreen_h@GOTPAGEOFF]
	cbnz	w0, LBB0_10
; %bb.2:
	sdiv	w13, w8, w11
	cmp	w13, #1
	b.le	LBB0_10
; %bb.3:
	ldr	w13, [x12]
	sdiv	w14, w13, w10
	cmp	w14, #1
	b.le	LBB0_10
; %bb.4:
	cmp	w10, #1
	b.lt	LBB0_13
; %bb.5:
	mov	w12, #0
Lloh12:
	adrp	x14, _g_menubg_ptr@GOTPAGE
Lloh13:
	ldr	x14, [x14, _g_menubg_ptr@GOTPAGEOFF]
Lloh14:
	ldr	x14, [x14]
	cmp	w13, #0
	cinc	w13, w13, lt
	asr	w13, w13, #1
	sub	w13, w13, w10
	mul	w13, w13, w8
	cmp	w13, #0
	cinc	w13, w13, lt
	asr	w13, w13, #1
	add	x13, x14, w13, sxtw #2
	cmp	w8, #0
	cinc	w14, w8, lt
	asr	w14, w14, #1
	sub	w14, w14, w9
	cmp	w14, #0
	cinc	w14, w14, lt
	asr	w14, w14, #1
	add	x13, x13, w14, sxtw #2
	lsl	x14, x11, #1
	mov	w15, #31695
	mov	w16, #6339
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w12, w12, #1
	add	x13, x13, w8, sxtw #2
	add	x19, x19, x14
	cmp	w12, w10
	b.eq	LBB0_13
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	cmp	w11, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x17, #0
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldrh	w0, [x19, x17, lsl #1]
	and	w1, w15, w0, lsr #1
	and	w0, w16, w0, lsr #3
	sub	w0, w1, w0
	orr	w0, w0, w0, lsl #16
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	add	x8, x17, w8, sxtw
	str	w0, [x13, x8, lsl #2]
	str	w0, [x13, x17, lsl #2]
	add	x17, x17, #1
	ldr	w8, [x22]
	cmp	x9, x17
	b.ne	LBB0_9
	b	LBB0_6
LBB0_10:
	cmp	w9, w8
	csel	w20, w9, w8, lt
	ldr	w11, [x12]
	cmp	w10, w11
	csel	w9, w10, w11, lt
	cmp	w9, #1
	b.lt	LBB0_13
; %bb.11:
Lloh15:
	adrp	x10, _g_menubg_ptr@GOTPAGE
Lloh16:
	ldr	x10, [x10, _g_menubg_ptr@GOTPAGEOFF]
Lloh17:
	ldr	x10, [x10]
	cmp	w11, #0
	cinc	w11, w11, lt
	asr	w11, w11, #1
	sub	w11, w11, w9, lsr #1
	mul	w11, w11, w8
	add	x10, x10, w11, sxtw #1
	cmp	w20, #0
	cinc	w11, w20, lt
	cmp	w8, #0
	cinc	w8, w8, lt
	asr	w8, w8, #1
	sub	w8, w8, w11, asr #1
	add	x21, x10, w8, sxtw #1
	add	w24, w9, #1
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	mov	w3, #1
	bl	_menu_darken_bg
	ldrsw	x8, [x22]
	add	x21, x21, x8, lsl #1
	ldrsw	x8, [x23]
	add	x19, x19, x8, lsl #1
	sub	w24, w24, #1
	cmp	w24, #1
	b.hi	LBB0_12
LBB0_13:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_14:
Lloh18:
	adrp	x8, _g_menubg_ptr@GOTPAGE
Lloh19:
	ldr	x8, [x8, _g_menubg_ptr@GOTPAGEOFF]
Lloh20:
	ldr	x0, [x8]
Lloh21:
	adrp	x8, _g_menuscreen_w@GOTPAGE
Lloh22:
	ldr	x8, [x8, _g_menuscreen_w@GOTPAGEOFF]
Lloh23:
	ldr	w8, [x8]
Lloh24:
	adrp	x9, _g_menuscreen_h@GOTPAGE
Lloh25:
	ldr	x9, [x9, _g_menuscreen_h@GOTPAGEOFF]
Lloh26:
	ldr	w9, [x9]
	mul	w8, w8, w9
	lsl	w2, w8, #1
	mov	w1, #0
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_memset
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_g_menubg_src_ptr,8,3           ; @g_menubg_src_ptr
	.comm	_g_screen_width,4,2             ; @g_screen_width
	.comm	_g_screen_height,4,2            ; @g_screen_height
	.comm	_g_menubg_ptr,8,3               ; @g_menubg_ptr
	.comm	_g_menuscreen_w,4,2             ; @g_menuscreen_w
	.comm	_g_menuscreen_h,4,2             ; @g_menuscreen_h
	.no_dead_strip	_make_bg
.subsections_via_symbols
