	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_diva_card_read_xlog            ## -- Begin function diva_card_read_xlog
	.p2align	4, 0x90
_diva_card_read_xlog:                   ## @diva_card_read_xlog
	.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
	movl	$-1, %r14d
	cmpl	$0, 24(%rdi)
	je	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	leaq	16(%rdi), %r13
	cmpq	$0, (%r13)
	je	LBB0_9
## %bb.2:
	xorl	%edi, %edi
	movl	$4, %esi
	callq	_diva_os_malloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %r15
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$4, %edx
	callq	_memset
	xorl	%edi, %edi
	movl	$12, %esi
	callq	_diva_os_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %r12
	movl	$1024, (%rax)                   ## imm = 0x400
	movq	_LOG@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	movl	$0, 4(%r12)
	movq	%r13, %rdi
	movq	%r12, %rsi
	callq	*(%r13)
	cmpl	$0, 4(%r12)
	je	LBB0_7
## %bb.6:
	movq	%r12, %rsi
	addq	$8, %rsi
	cmpl	$0, (%rsi)
	je	LBB0_8
LBB0_7:
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_diva_os_free
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_diva_os_free
	jmp	LBB0_9
LBB0_4:
	xorl	%edi, %edi
	movq	%r15, %rsi
	callq	_diva_os_free
	jmp	LBB0_9
LBB0_8:
	movq	%r15, %rdi
	movl	$4, %edx
	callq	_memcpy
	xorl	%r14d, %r14d
	xorl	%edi, %edi
	movq	%r12, %rsi
	callq	_diva_os_free
	movl	$4, (%rbx)
	movq	%r15, 8(%rbx)
	movq	_DIVA_XDI_MBOX_BUSY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 4(%rbx)
LBB0_9:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_LOG,4,2                        ## @LOG
	.comm	_DIVA_XDI_MBOX_BUSY,4,2         ## @DIVA_XDI_MBOX_BUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function diva_card_read_xlog
lCPI0_0:
	.long	1024                            ; 0x400
	.long	0                               ; 0x0
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_diva_card_read_xlog
	.p2align	2
_diva_card_read_xlog:                   ; @diva_card_read_xlog
	.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
	ldr	w8, [x0, #24]
	cbz	w8, LBB0_9
; %bb.1:
	mov	x19, x0
	add	x22, x0, #16
	ldr	x8, [x22]
	cbz	x8, LBB0_9
; %bb.2:
	mov	w0, #0
	mov	w1, #4
	bl	_diva_os_malloc
	cbz	x0, LBB0_9
; %bb.3:
	mov	x20, x0
	mov	w1, #0
	mov	w2, #4
	bl	_memset
	mov	w0, #0
	mov	w1, #12
	bl	_diva_os_malloc
	cbz	x0, LBB0_7
; %bb.4:
	mov	x21, x0
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
Lloh2:
	adrp	x8, _LOG@GOTPAGE
Lloh3:
	ldr	x8, [x8, _LOG@GOTPAGEOFF]
	str	d0, [x0]
Lloh4:
	ldr	w8, [x8]
	mov	x23, x0
	str	w8, [x23, #8]!
	ldr	x8, [x22]
	mov	x0, x22
	mov	x1, x21
	blr	x8
	ldr	w8, [x21, #4]
	cbz	w8, LBB0_6
; %bb.5:
	ldr	w8, [x23]
	cbz	w8, LBB0_11
LBB0_6:
	mov	w0, #0
	mov	x1, x20
	bl	_diva_os_free
	mov	w0, #0
	mov	x1, x21
	b	LBB0_8
LBB0_7:
	mov	x1, x20
LBB0_8:
	bl	_diva_os_free
LBB0_9:
	mov	w0, #-1
LBB0_10:
	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_11:
	mov	w22, #4
	mov	x0, x20
	mov	x1, x23
	mov	w2, #4
	bl	_memcpy
	mov	w0, #0
	mov	x1, x21
	bl	_diva_os_free
	mov	w0, #0
	str	w22, [x19]
	str	x20, [x19, #8]
Lloh5:
	adrp	x8, _DIVA_XDI_MBOX_BUSY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DIVA_XDI_MBOX_BUSY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	str	w8, [x19, #4]
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdrp	Lloh0, Lloh2
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_LOG,4,2                        ; @LOG
	.comm	_DIVA_XDI_MBOX_BUSY,4,2         ; @DIVA_XDI_MBOX_BUSY
.subsections_via_symbols
