	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function task_database_gdi_get_serial
_task_database_gdi_get_serial:          ## @task_database_gdi_get_serial
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	_PATH_MAX_LENGTH@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_malloc
	movq	%rax, %r15
	movb	$0, (%rax)
	movl	(%r12), %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movq	%rax, %rdx
	callq	_gdi_find_track
	testl	%eax, %eax
	js	LBB0_1
## %bb.2:
	movq	_MSG_READING_FIRST_DATA_TRACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.1(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_RARCH_LOG
	movq	_SIZE_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r15, %rdi
	xorl	%esi, %esi
	movq	%r14, %rcx
	callq	_intfstream_file_get_serial
	movl	%eax, %r14d
	jmp	LBB0_3
LBB0_1:
	movl	%eax, %ebx
	movq	_MSG_COULD_NOT_FIND_VALID_DATA_TRACK@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	movl	%eax, %r12d
	negl	%ebx
	movl	%ebx, %edi
	callq	_strerror
	leaq	L_.str(%rip), %rdi
	xorl	%r14d, %r14d
	movl	%r12d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_RARCH_LOG
LBB0_3:
	movq	%r15, %rdi
	callq	_free
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ## @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s: %s\n"

	.comm	_MSG_COULD_NOT_FIND_VALID_DATA_TRACK,4,2 ## @MSG_COULD_NOT_FIND_VALID_DATA_TRACK
L_.str.1:                               ## @.str.1
	.asciz	"%s\n"

	.comm	_MSG_READING_FIRST_DATA_TRACK,4,2 ## @MSG_READING_FIRST_DATA_TRACK
	.comm	_SIZE_MAX,4,2                   ## @SIZE_MAX
	.no_dead_strip	_task_database_gdi_get_serial
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function task_database_gdi_get_serial
_task_database_gdi_get_serial:          ; @task_database_gdi_get_serial
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x20, x1
	mov	x21, x0
Lloh0:
	adrp	x22, _PATH_MAX_LENGTH@GOTPAGE
Lloh1:
	ldr	x22, [x22, _PATH_MAX_LENGTH@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_malloc
	mov	x19, x0
	strb	wzr, [x0]
	ldr	w3, [x22]
	mov	x0, x21
	mov	w1, #1
	mov	x2, x19
	bl	_gdi_find_track
	tbnz	w0, #31, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _MSG_READING_FIRST_DATA_TRACK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _MSG_READING_FIRST_DATA_TRACK@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_LOG
Lloh7:
	adrp	x8, _SIZE_MAX@GOTPAGE
Lloh8:
	ldr	x8, [x8, _SIZE_MAX@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w1, #0
	mov	x3, x20
	bl	_intfstream_file_get_serial
	mov	x20, x0
	b	LBB0_3
LBB0_2:
	mov	x21, x0
Lloh10:
	adrp	x8, _MSG_COULD_NOT_FIND_VALID_DATA_TRACK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _MSG_COULD_NOT_FIND_VALID_DATA_TRACK@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x20, x0
	neg	w0, w21
	bl	_strerror
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x0, l_.str@PAGE
Lloh14:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	bl	_RARCH_LOG
	mov	w20, #0
LBB0_3:
	mov	x0, x19
	bl	_free
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_PATH_MAX_LENGTH,4,2            ; @PATH_MAX_LENGTH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s: %s\n"

	.comm	_MSG_COULD_NOT_FIND_VALID_DATA_TRACK,4,2 ; @MSG_COULD_NOT_FIND_VALID_DATA_TRACK
l_.str.1:                               ; @.str.1
	.asciz	"%s\n"

	.comm	_MSG_READING_FIRST_DATA_TRACK,4,2 ; @MSG_READING_FIRST_DATA_TRACK
	.comm	_SIZE_MAX,4,2                   ; @SIZE_MAX
	.no_dead_strip	_task_database_gdi_get_serial
.subsections_via_symbols
