	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cuda_shutdown
_cuda_shutdown:                         ## @cuda_shutdown
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_CUDA_PSEUDO@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -16(%rbp)
	movq	_RB_HALT@GOTPCREL(%rip), %rax
	andl	(%rax), %esi
	jne	LBB0_1
## %bb.2:
	movq	_CMD_RESET@GOTPCREL(%rip), %rax
	jmp	LBB0_3
LBB0_1:
	movq	_CMD_POWEROFF@GOTPCREL(%rip), %rax
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -12(%rbp)
	movl	(%rbx), %edi
	callq	_cuda_poll
	leaq	-16(%rbp), %rcx
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$2, %edx
	callq	_cuda_send
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rbx), %edi
	callq	_cuda_poll
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.comm	_CUDA_PSEUDO,4,2                ## @CUDA_PSEUDO
	.comm	_RB_HALT,4,2                    ## @RB_HALT
	.comm	_CMD_POWEROFF,4,2               ## @CMD_POWEROFF
	.comm	_CMD_RESET,4,2                  ## @CMD_RESET
	.no_dead_strip	_cuda_shutdown
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cuda_shutdown
_cuda_shutdown:                         ; @cuda_shutdown
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x8, _CUDA_PSEUDO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CUDA_PSEUDO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	str	w8, [sp, #8]
Lloh3:
	adrp	x8, _RB_HALT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RB_HALT@GOTPAGEOFF]
Lloh5:
	adrp	x9, _CMD_POWEROFF@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CMD_POWEROFF@GOTPAGEOFF]
Lloh7:
	adrp	x10, _CMD_RESET@GOTPAGE
Lloh8:
	ldr	x10, [x10, _CMD_RESET@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	tst	w8, w1
	csel	x8, x10, x9, eq
	ldr	w8, [x8]
	str	w8, [sp, #12]
	ldr	w0, [x0]
	bl	_cuda_poll
	add	x3, sp, #8
	mov	x0, x19
	mov	w1, #1
	mov	w2, #2
	bl	_cuda_send
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	bl	_cuda_poll
	b	LBB0_1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_CUDA_PSEUDO,4,2                ; @CUDA_PSEUDO
	.comm	_RB_HALT,4,2                    ; @RB_HALT
	.comm	_CMD_POWEROFF,4,2               ; @CMD_POWEROFF
	.comm	_CMD_RESET,4,2                  ; @CMD_RESET
	.no_dead_strip	_cuda_shutdown
.subsections_via_symbols
