	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdi_find_track                 ## -- Begin function gdi_find_track
	.p2align	4, 0x90
_gdi_find_track:                        ## @gdi_find_track
	.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
	movq	%rcx, -96(%rbp)                 ## 8-byte Spill
	movq	%rdx, -88(%rbp)                 ## 8-byte Spill
	movl	%esi, -60(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	_MAX_TOKEN_LEN@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdi
	callq	_malloc
	movq	%rax, %r13
	movq	_INTFSTREAM_FILE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -56(%rbp)
	leaq	-56(%rbp), %rdi
	callq	_intfstream_init
	testq	%rax, %rax
	je	LBB0_25
## %bb.1:
	movq	%rax, %r14
	movq	_RETRO_VFS_FILE_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_intfstream_open
	testl	%eax, %eax
	je	LBB0_2
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movb	$0, (%r13)
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_get_token
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_19:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	callq	_free
	movq	%r12, %rdi
	callq	_free
	movq	-80(%rbp), %r12                 ## 8-byte Reload
LBB0_14:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	%r14, %rbx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_get_token
	testq	%rax, %rax
	jle	LBB0_7
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_get_token
	testq	%rax, %rax
	jle	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_get_token
	testq	%rax, %rax
	jle	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_get_token
	testq	%rax, %rax
	jle	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_atoi
	movl	%eax, %r15d
	movq	(%rbx), %rdx
	movq	%r14, %rdi
	movq	%r13, %rsi
	callq	_get_token
	testq	%rax, %rax
	jle	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	callq	_atoi
	movq	%rbx, %rcx
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%rcx, %r14
	movq	(%rcx), %rdx
	movq	%r13, %rsi
	callq	_get_token
	testq	%rax, %rax
	jle	LBB0_11
## %bb.12:                              ##   in Loop: Header=BB0_4 Depth=1
	testl	%r15d, %r15d
	jne	LBB0_15
## %bb.13:                              ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2352, %ebx                     ## imm = 0x930
	je	LBB0_14
LBB0_15:                                ##   in Loop: Header=BB0_4 Depth=1
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %r15
	movq	(%r15), %rdi
	incq	%rdi
	callq	_malloc
	movq	%r12, %rbx
	movq	%rax, %r12
	movq	(%r15), %rdi
	callq	_malloc
	movq	%rax, %r15
	movb	$0, (%rax)
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_fill_pathname_basedir
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r12, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_fill_pathname_join
	movq	%r12, %rdi
	callq	_intfstream_get_file_size
	testq	%rax, %rax
	js	LBB0_22
## %bb.16:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %rbx
	cmpq	-72(%rbp), %rax                 ## 8-byte Folded Reload
	jle	LBB0_19
## %bb.17:                              ##   in Loop: Header=BB0_4 Depth=1
	movq	-88(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	-96(%rbp), %rdx                 ## 8-byte Reload
	callq	_strlcpy
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_4 Depth=1
	movl	$0, -52(%rbp)                   ## 4-byte Folded Spill
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_19
LBB0_25:
	movq	%r13, %rdi
	jmp	LBB0_26
LBB0_2:
	movq	_errno@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	movq	%r12, %rsi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_RARCH_LOG
	jmp	LBB0_24
LBB0_7:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_24
LBB0_5:
	movl	-52(%rbp), %ebx                 ## 4-byte Reload
LBB0_21:
	movq	%r13, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_intfstream_close
	movq	%r14, %rdi
	callq	_free
	jmp	LBB0_27
LBB0_11:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_errno@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	jmp	LBB0_23
LBB0_22:
	movq	%r15, %rdi
	callq	_free
	movq	%r12, %rdi
	callq	_free
LBB0_23:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_24:
	movq	%r13, %rdi
	callq	_free
	movq	%r14, %rdi
	callq	_intfstream_close
	movq	%r14, %rdi
LBB0_26:
	callq	_free
	movq	_errno@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_27:
	movl	%ebx, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_20:
	movq	%r15, %rdi
	callq	_free
	movq	%r12, %rdi
	callq	_free
	xorl	%ebx, %ebx
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_21
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_TOKEN_LEN,8,3              ## @MAX_TOKEN_LEN
	.comm	_INTFSTREAM_FILE,4,2            ## @INTFSTREAM_FILE
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ## @RETRO_VFS_FILE_ACCESS_READ
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ## @RETRO_VFS_FILE_ACCESS_HINT_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not open GDI file '%s': %s\n"

	.comm	_errno,4,2                      ## @errno
L_.str.1:                               ## @.str.1
	.asciz	"Parsing GDI file '%s'...\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_PATH_MAX_LENGTH,8,3            ## @PATH_MAX_LENGTH
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_gdi_find_track                 ; -- Begin function gdi_find_track
	.p2align	2
_gdi_find_track:                        ; @gdi_find_track
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x23, x3
	mov	x24, x2
	mov	x25, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _MAX_TOKEN_LEN@GOTPAGE
Lloh1:
	ldr	x22, [x22, _MAX_TOKEN_LEN@GOTPAGEOFF]
	ldr	x0, [x22]
	bl	_malloc
	mov	x20, x0
Lloh2:
	adrp	x8, _INTFSTREAM_FILE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _INTFSTREAM_FILE@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	str	w8, [sp, #40]
	add	x0, sp, #40
	bl	_intfstream_init
	cbz	x0, LBB0_16
; %bb.1:
	mov	x19, x0
Lloh5:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGE
Lloh6:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGE
Lloh9:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x8]
	mov	x1, x21
	bl	_intfstream_open
	cbz	w0, LBB0_18
; %bb.2:
	str	w25, [sp, #20]                  ; 4-byte Folded Spill
	stp	x24, x23, [sp, #24]             ; 16-byte Folded Spill
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	bl	_RARCH_LOG
	strb	wzr, [x20]
Lloh13:
	adrp	x8, _EINVAL@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	neg	w25, w8
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_get_token
	mov	x24, #0
Lloh16:
	adrp	x23, _PATH_MAX_LENGTH@GOTPAGE
Lloh17:
	ldr	x23, [x23, _PATH_MAX_LENGTH@GOTPAGEOFF]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x27
	bl	_free
	mov	x0, x26
	bl	_free
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_get_token
	cmp	x0, #0
	b.le	LBB0_17
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_get_token
	cmp	x0, #1
	b.lt	LBB0_24
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_get_token
	cmp	x0, #0
	b.le	LBB0_17
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_get_token
	cmp	x0, #0
	b.le	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_atoi
	mov	x26, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_get_token
	cmp	x0, #0
	b.le	LBB0_17
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_atoi
	mov	x27, x0
	ldr	x2, [x22]
	mov	x0, x19
	mov	x1, x20
	bl	_get_token
	cmp	x0, #0
	b.le	LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	cbnz	w26, LBB0_12
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	cmp	w27, #2352
	b.eq	LBB0_4
LBB0_12:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x23]
	add	x0, x8, #1
	bl	_malloc
	mov	x26, x0
	ldr	x0, [x23]
	bl	_malloc
	mov	x27, x0
	strb	wzr, [x0]
	ldr	x2, [x23]
	mov	x1, x21
	bl	_fill_pathname_basedir
	ldr	x3, [x23]
	mov	x0, x26
	mov	x1, x27
	mov	x2, x20
	bl	_fill_pathname_join
	mov	x0, x26
	bl	_intfstream_get_file_size
	tbnz	x0, #63, LBB0_22
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x28, x0
	cmp	x0, x24
	b.le	LBB0_3
; %bb.14:                               ;   in Loop: Header=BB0_5 Depth=1
	ldp	x0, x2, [sp, #24]               ; 16-byte Folded Reload
	mov	x1, x26
	bl	_strlcpy
	ldr	w8, [sp, #20]                   ; 4-byte Folded Reload
	cbnz	w8, LBB0_23
; %bb.15:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	w25, #0
	mov	x24, x28
	b	LBB0_3
LBB0_16:
	mov	x0, x20
	b	LBB0_20
LBB0_17:
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
Lloh21:
	adrp	x9, _errno@GOTPAGE
Lloh22:
	ldr	x9, [x9, _errno@GOTPAGEOFF]
Lloh23:
	str	w8, [x9]
	b	LBB0_19
LBB0_18:
Lloh24:
	adrp	x8, _errno@GOTPAGE
Lloh25:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh27:
	adrp	x0, l_.str@PAGE
Lloh28:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x21
	bl	_RARCH_LOG
LBB0_19:
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_intfstream_close
	mov	x0, x19
LBB0_20:
	bl	_free
Lloh29:
	adrp	x8, _errno@GOTPAGE
Lloh30:
	ldr	x8, [x8, _errno@GOTPAGEOFF]
Lloh31:
	ldr	w8, [x8]
	neg	w25, w8
LBB0_21:
	mov	x0, x25
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_22:
	mov	x0, x27
	bl	_free
	mov	x0, x26
	bl	_free
	b	LBB0_19
LBB0_23:
	mov	x0, x27
	bl	_free
	mov	x0, x26
	bl	_free
	mov	w25, #0
LBB0_24:
	mov	x0, x20
	bl	_free
	mov	x0, x19
	bl	_intfstream_close
	mov	x0, x19
	bl	_free
	b	LBB0_21
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotStr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_TOKEN_LEN,8,3              ; @MAX_TOKEN_LEN
	.comm	_INTFSTREAM_FILE,4,2            ; @INTFSTREAM_FILE
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ; @RETRO_VFS_FILE_ACCESS_READ
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ; @RETRO_VFS_FILE_ACCESS_HINT_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not open GDI file '%s': %s\n"

	.comm	_errno,4,2                      ; @errno
l_.str.1:                               ; @.str.1
	.asciz	"Parsing GDI file '%s'...\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_PATH_MAX_LENGTH,8,3            ; @PATH_MAX_LENGTH
.subsections_via_symbols
