	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_dev_close                   ## -- Begin function ub_dev_close
	.p2align	4, 0x90
_ub_dev_close:                          ## @ub_dev_close
	.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
	testl	%edi, %edi
	js	LBB0_2
## %bb.1:
	movq	_UB_MAX_DEV@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_2
## %bb.3:
	movq	_devices@GOTPCREL(%rip), %rax
	movl	%edi, %edx
	shlq	$2, %rdx
	addq	(%rax), %rdx
	movq	_API_DEV_CLOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_syscall
	cmpl	$1, %eax
	sbbl	%ebx, %ebx
	jmp	LBB0_4
LBB0_2:
	movq	_API_EINVAL@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
LBB0_4:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_UB_MAX_DEV,4,2                 ## @UB_MAX_DEV
	.comm	_API_EINVAL,4,2                 ## @API_EINVAL
	.comm	_devices,8,3                    ## @devices
	.comm	_API_DEV_CLOSE,4,2              ## @API_DEV_CLOSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ub_dev_close                   ; -- Begin function ub_dev_close
	.p2align	2
_ub_dev_close:                          ; @ub_dev_close
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	tbnz	w0, #31, LBB0_3
; %bb.1:
Lloh0:
	adrp	x8, _UB_MAX_DEV@GOTPAGE
Lloh1:
	ldr	x8, [x8, _UB_MAX_DEV@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _devices@GOTPAGE
Lloh4:
	ldr	x8, [x8, _devices@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	add	x2, x8, w0, uxtw #2
Lloh6:
	adrp	x8, _API_DEV_CLOSE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _API_DEV_CLOSE@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	mov	x1, #0
	bl	_syscall
	cmp	w0, #0
	csetm	w0, eq
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
LBB0_3:
Lloh9:
	adrp	x8, _API_EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _API_EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_UB_MAX_DEV,4,2                 ; @UB_MAX_DEV
	.comm	_API_EINVAL,4,2                 ; @API_EINVAL
	.comm	_devices,8,3                    ; @devices
	.comm	_API_DEV_CLOSE,4,2              ; @API_DEV_CLOSE
.subsections_via_symbols
