	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xmb_layout
_xmb_layout:                            ## @xmb_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
	movq	%rdi, %r12
	xorl	%eax, %eax
	callq	_config_get_ptr
	movq	%rax, %rbx
	xorl	%edi, %edi
	callq	_menu_entries_get_selection_buf_ptr
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	xorl	%eax, %eax
	callq	_menu_navigation_get_selection
	movq	%rax, %r15
	leaq	-48(%rbp), %rdi
	leaq	-56(%rbp), %rsi
	callq	_video_driver_get_size
	movl	(%rbx), %eax
	cmpl	$2, %eax
	je	LBB0_6
## %bb.1:
	cmpl	$1, %eax
	je	LBB0_5
## %bb.2:
	testl	%eax, %eax
	jne	LBB0_8
## %bb.3:
	movl	-48(%rbp), %esi
	cmpl	$321, %esi                      ## imm = 0x141
	setae	%al
	cmpl	$241, -56(%rbp)
	setae	%cl
	andb	%al, %cl
	movzbl	%cl, %eax
	movl	%eax, (%r12)
	cmpb	$1, %al
	jne	LBB0_7
	jmp	LBB0_4
LBB0_6:
	movl	$0, (%r12)
	movl	-48(%rbp), %esi
LBB0_7:
	movq	%r12, %rdi
	callq	_xmb_layout_psp
	jmp	LBB0_8
LBB0_5:
	movl	$1, (%r12)
	movl	-48(%rbp), %esi
LBB0_4:
	movq	%r12, %rdi
	callq	_xmb_layout_ps3
LBB0_8:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_menu_entries_get_size
	movq	%rax, %r13
	testl	%r13d, %r13d
	jne	LBB0_9
LBB0_14:
	cmpl	$2, 60(%r12)
	jl	LBB0_22
## %bb.15:
	movl	72(%r12), %r14d
	movq	64(%r12), %rdi
	callq	_file_list_get_size
	movq	%rax, %r15
	testl	%r15d, %r15d
	je	LBB0_22
## %bb.16:
	xorl	%ebx, %ebx
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	movss	%xmm0, (%r14)
	movss	%xmm0, 4(%r14)
	movss	%xmm1, 8(%r14)
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r15d, %edx
	callq	_xmb_item_y
	movq	%rax, 16(%r14)
LBB0_13:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%ebx
	cmpl	%ebx, %r13d
	je	LBB0_14
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movss	48(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movss	52(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -52(%rbp)                ## 4-byte Spill
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	movl	%ebx, %esi
	callq	_file_list_get_userdata_at_offset
	testq	%rax, %rax
	je	LBB0_13
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %r14
	cmpl	%ebx, %r15d
	movss	-44(%rbp), %xmm0                ## 4-byte Reload
                                        ## xmm0 = mem[0],zero,zero,zero
	movss	-52(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	jne	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	movss	56(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm1
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_20:                                ##   in Loop: Header=BB0_17 Depth=1
	movss	%xmm0, (%r13)
	movl	$0, 4(%r13)
	movss	%xmm1, 8(%r13)
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%r14d, %edx
	callq	_xmb_item_y
	movq	%rax, 16(%r13)
	movl	44(%r12), %eax
	addl	%eax, %eax
	negl	%eax
	movl	%eax, 12(%r13)
LBB0_21:                                ##   in Loop: Header=BB0_17 Depth=1
	incl	%ebx
	cmpl	%ebx, %r15d
	je	LBB0_22
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movss	52(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -44(%rbp)                ## 4-byte Spill
	movq	64(%r12), %rdi
	movl	%ebx, %esi
	callq	_file_list_get_userdata_at_offset
	testq	%rax, %rax
	je	LBB0_21
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movq	%rax, %r13
	xorps	%xmm0, %xmm0
	cmpl	%ebx, %r14d
	movss	-44(%rbp), %xmm1                ## 4-byte Reload
                                        ## xmm1 = mem[0],zero,zero,zero
	jne	LBB0_20
## %bb.19:                              ##   in Loop: Header=BB0_17 Depth=1
	movss	56(%r12), %xmm0                 ## xmm0 = mem[0],zero,zero,zero
	movaps	%xmm0, %xmm1
	jmp	LBB0_20
LBB0_22:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_xmb_layout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xmb_layout
_xmb_layout:                            ; @xmb_layout
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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 b8, -72
	.cfi_offset b9, -80
	mov	x19, x0
	bl	_config_get_ptr
	mov	x22, x0
	mov	w0, #0
	bl	_menu_entries_get_selection_buf_ptr
	mov	x20, x0
	bl	_menu_navigation_get_selection
	mov	x21, x0
	add	x0, sp, #28
	add	x1, sp, #24
	bl	_video_driver_get_size
	ldr	w8, [x22]
	cmp	w8, #2
	b.eq	LBB0_4
; %bb.1:
	cmp	w8, #1
	b.eq	LBB0_6
; %bb.2:
	cbnz	w8, LBB0_8
; %bb.3:
	ldp	w8, w1, [sp, #24]
	cmp	w1, #320
	mov	w9, #240
	ccmp	w8, w9, #0, hi
	cset	w8, hi
	str	w8, [x19]
	cmp	w8, #1
	b.ne	LBB0_5
	b	LBB0_7
LBB0_4:
	str	wzr, [x19]
	ldr	w1, [sp, #28]
LBB0_5:
	mov	x0, x19
	bl	_xmb_layout_psp
	b	LBB0_8
LBB0_6:
	str	w8, [x19]
	ldr	w1, [sp, #28]
LBB0_7:
	mov	x0, x19
	bl	_xmb_layout_ps3
LBB0_8:
	bl	_menu_entries_get_size
	mov	x22, x0
	cbz	w22, LBB0_15
; %bb.9:
	mov	w23, #0
	b	LBB0_12
LBB0_10:                                ;   in Loop: Header=BB0_12 Depth=1
	str	s0, [x24]
	stur	d0, [x24, #4]
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_xmb_item_y
	str	x0, [x24, #16]
LBB0_11:                                ;   in Loop: Header=BB0_12 Depth=1
	add	w23, w23, #1
	cmp	w22, w23
	b.eq	LBB0_15
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	d0, [x19, #48]
	str	q0, [sp]                        ; 16-byte Folded Spill
	mov	x0, x20
	mov	x1, x23
	bl	_file_list_get_userdata_at_offset
	cbz	x0, LBB0_11
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	mov	x24, x0
	cmp	w21, w23
	ldr	q0, [sp]                        ; 16-byte Folded Reload
	b.ne	LBB0_10
; %bb.14:                               ;   in Loop: Header=BB0_12 Depth=1
	add	x8, x19, #56
	ld1r.2s	{ v0 }, [x8]
	b	LBB0_10
LBB0_15:
	ldr	w8, [x19, #60]
	cmp	w8, #2
	b.lt	LBB0_23
; %bb.16:
	ldr	w20, [x19, #72]
	ldr	x0, [x19, #64]
	bl	_file_list_get_size
	mov	x21, x0
	cbz	w21, LBB0_23
; %bb.17:
	mov	w22, #0
	b	LBB0_20
LBB0_18:                                ;   in Loop: Header=BB0_20 Depth=1
	str	s0, [x23]
	str	wzr, [x23, #4]
	str	s8, [x23, #8]
	mov	x0, x19
	mov	x1, x22
	mov	x2, x20
	bl	_xmb_item_y
	str	x0, [x23, #16]
	ldr	w8, [x19, #44]
	neg	w8, w8, lsl #1
	str	w8, [x23, #12]
LBB0_19:                                ;   in Loop: Header=BB0_20 Depth=1
	add	w22, w22, #1
	cmp	w21, w22
	b.eq	LBB0_23
LBB0_20:                                ; =>This Inner Loop Header: Depth=1
	ldr	s8, [x19, #52]
	ldr	x0, [x19, #64]
	mov	x1, x22
	bl	_file_list_get_userdata_at_offset
	cbz	x0, LBB0_19
; %bb.21:                               ;   in Loop: Header=BB0_20 Depth=1
	mov	x23, x0
	movi	d0, #0000000000000000
	cmp	w20, w22
	b.ne	LBB0_18
; %bb.22:                               ;   in Loop: Header=BB0_20 Depth=1
	ldr	s0, [x19, #56]
	fmov	s8, s0
	b	LBB0_18
LBB0_23:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_xmb_layout
.subsections_via_symbols
