	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_os_wait_semaphore         ## -- Begin function acpi_os_wait_semaphore
	.p2align	4, 0x90
_acpi_os_wait_semaphore:                ## @acpi_os_wait_semaphore
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_2
## %bb.1:
	testl	%esi, %esi
	jle	LBB0_2
## %bb.3:
	cmpl	$2, %esi
	jb	LBB0_5
## %bb.4:
	movq	_AE_SUPPORT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_14
LBB0_2:
	movq	_AE_BAD_PARAMETER@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_14
LBB0_5:
	movq	%rdx, %r14
	movq	%rdi, %rbx
	movq	_AE_OK@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	%r14d, %edi
	callq	_ACPI_DEBUG_PRINT
	movq	_ACPI_WAIT_FOREVER@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_7
## %bb.6:
	movq	_MAX_SCHEDULE_TIMEOUT@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	jmp	LBB0_8
LBB0_7:
	movq	%r14, %rdi
	callq	_msecs_to_jiffies
	movq	%rax, %rsi
LBB0_8:
	movq	%rbx, %rdi
	callq	_down_timeout
	testl	%eax, %eax
	je	LBB0_10
## %bb.9:
	movq	_AE_TIME@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
LBB0_10:
	movl	%r15d, %edi
	callq	_ACPI_FAILURE
	testq	%rax, %rax
	je	LBB0_12
## %bb.11:
	movl	%r15d, %edi
	callq	_acpi_format_exception
	movl	%eax, %edi
	jmp	LBB0_13
LBB0_12:
	movl	%r14d, %edi
LBB0_13:
	callq	_ACPI_DEBUG_PRINT
LBB0_14:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AE_OK,4,2                      ## @AE_OK
	.comm	_AE_BAD_PARAMETER,4,2           ## @AE_BAD_PARAMETER
	.comm	_AE_SUPPORT,4,2                 ## @AE_SUPPORT
	.comm	_ACPI_DB_MUTEX,4,2              ## @ACPI_DB_MUTEX
	.comm	_ACPI_WAIT_FOREVER,8,3          ## @ACPI_WAIT_FOREVER
	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ## @MAX_SCHEDULE_TIMEOUT
	.comm	_AE_TIME,4,2                    ## @AE_TIME
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_acpi_os_wait_semaphore         ; -- Begin function acpi_os_wait_semaphore
	.p2align	2
_acpi_os_wait_semaphore:                ; @acpi_os_wait_semaphore
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	cbz	x0, LBB0_4
; %bb.1:
	cmp	w1, #0
	b.le	LBB0_4
; %bb.2:
	cmp	w1, #2
	b.lo	LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _AE_SUPPORT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AE_SUPPORT@GOTPAGEOFF]
Lloh2:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_4:
Lloh3:
	adrp	x8, _AE_BAD_PARAMETER@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AE_BAD_PARAMETER@GOTPAGEOFF]
Lloh5:
	ldr	w20, [x8]
	b	LBB0_12
LBB0_5:
	mov	x19, x2
	mov	x20, x0
Lloh6:
	adrp	x8, _AE_OK@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AE_OK@GOTPAGEOFF]
Lloh8:
	ldr	w21, [x8]
	mov	x0, x19
	bl	_ACPI_DEBUG_PRINT
Lloh9:
	adrp	x8, _ACPI_WAIT_FOREVER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ACPI_WAIT_FOREVER@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_7
; %bb.6:
Lloh12:
	adrp	x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MAX_SCHEDULE_TIMEOUT@GOTPAGEOFF]
Lloh14:
	ldr	x1, [x8]
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	bl	_msecs_to_jiffies
	mov	x1, x0
LBB0_8:
	mov	x0, x20
	bl	_down_timeout
Lloh15:
	adrp	x8, _AE_TIME@GOTPAGE
Lloh16:
	ldr	x8, [x8, _AE_TIME@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	cmp	w0, #0
	csel	w20, w21, w8, eq
	mov	x0, x20
	bl	_ACPI_FAILURE
	cbz	x0, LBB0_10
; %bb.9:
	mov	x0, x20
	bl	_acpi_format_exception
	b	LBB0_11
LBB0_10:
	mov	x0, x19
LBB0_11:
	bl	_ACPI_DEBUG_PRINT
LBB0_12:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_AE_OK,4,2                      ; @AE_OK
	.comm	_AE_BAD_PARAMETER,4,2           ; @AE_BAD_PARAMETER
	.comm	_AE_SUPPORT,4,2                 ; @AE_SUPPORT
	.comm	_ACPI_DB_MUTEX,4,2              ; @ACPI_DB_MUTEX
	.comm	_ACPI_WAIT_FOREVER,8,3          ; @ACPI_WAIT_FOREVER
	.comm	_MAX_SCHEDULE_TIMEOUT,8,3       ; @MAX_SCHEDULE_TIMEOUT
	.comm	_AE_TIME,4,2                    ; @AE_TIME
.subsections_via_symbols
