	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cuda_device_create
_cuda_device_create:                    ## @cuda_device_create
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %r15
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.2:
	movq	%rsi, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_strtol
	movl	%eax, %r14d
	jmp	LBB0_3
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	movq	%rbx, %rdi
	callq	_cuda_device_init
	testq	%rax, %rax
	js	LBB0_8
## %bb.4:
	movq	(%r15), %rax
	movq	8(%rax), %r12
	xorl	%edi, %edi
	callq	*24(%r12)
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_8
## %bb.5:
	leaq	-36(%rbp), %rdi
	movl	%r14d, %esi
	callq	*16(%r12)
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_8
## %bb.6:
	leaq	16(%r15), %rdi
	movq	_CU_CTX_SCHED_BLOCKING_SYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-36(%rbp), %edx
	callq	*8(%r12)
	movl	%eax, %edi
	callq	_CHECK_CU
	testl	%eax, %eax
	js	LBB0_8
## %bb.7:
	movq	$0, 8(%r15)
	leaq	-40(%rbp), %rdi
	callq	*(%r12)
	movl	%eax, %edi
	callq	_CHECK_CU
	movq	(%r15), %rax
	movl	$1, (%rax)
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_8:
	movq	%rbx, %rdi
	callq	_cuda_device_uninit
	movq	_AVERROR_UNKNOWN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_9:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CU_CTX_SCHED_BLOCKING_SYNC,4,2 ## @CU_CTX_SCHED_BLOCKING_SYNC
	.comm	_AVERROR_UNKNOWN,4,2            ## @AVERROR_UNKNOWN
	.no_dead_strip	_cuda_device_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cuda_device_create
_cuda_device_create:                    ; @cuda_device_create
	.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	x19, x0
	ldr	x21, [x0]
	cbz	x1, LBB0_2
; %bb.1:
	mov	x0, x1
	mov	x1, #0
	mov	w2, #0
	bl	_strtol
	mov	x20, x0
	b	LBB0_3
LBB0_2:
	mov	w20, #0
LBB0_3:
	mov	x0, x19
	bl	_cuda_device_init
	tbnz	x0, #63, LBB0_8
; %bb.4:
	ldr	x8, [x21]
	ldr	x22, [x8, #8]
	ldr	x8, [x22, #24]
	mov	w0, #0
	blr	x8
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_8
; %bb.5:
	ldr	x8, [x22, #16]
	add	x0, sp, #12
	mov	x1, x20
	blr	x8
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_8
; %bb.6:
	ldr	x8, [x22, #8]
	add	x0, x21, #16
Lloh0:
	adrp	x9, _CU_CTX_SCHED_BLOCKING_SYNC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _CU_CTX_SCHED_BLOCKING_SYNC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	ldr	w2, [sp, #12]
	blr	x8
	bl	_CHECK_CU
	tbnz	w0, #31, LBB0_8
; %bb.7:
	str	xzr, [x21, #8]
	ldr	x8, [x22]
	add	x0, sp, #8
	blr	x8
	bl	_CHECK_CU
	mov	w0, #0
	ldr	x8, [x21]
	mov	w9, #1
	str	w9, [x8]
	b	LBB0_9
LBB0_8:
	mov	x0, x19
	bl	_cuda_device_uninit
Lloh3:
	adrp	x8, _AVERROR_UNKNOWN@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_UNKNOWN@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
LBB0_9:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_CU_CTX_SCHED_BLOCKING_SYNC,4,2 ; @CU_CTX_SCHED_BLOCKING_SYNC
	.comm	_AVERROR_UNKNOWN,4,2            ; @AVERROR_UNKNOWN
	.no_dead_strip	_cuda_device_create
.subsections_via_symbols
