	.file	"extr_amdgpu_gem.c_amdgpu_gem_timeout.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	amdgpu_gem_timeout
	.type	amdgpu_gem_timeout, @function
amdgpu_gem_timeout:
.LFB0:
	.cfi_startproc
	endbr64
	test	rdi, rdi
	js	.L9
	push	r12
	.cfi_def_cfa_offset 16
	.cfi_offset 12, -16
	xor	eax, eax
	push	rbp
	.cfi_def_cfa_offset 24
	.cfi_offset 6, -24
	mov	rbp, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 32
	call	ktime_get@PLT
	mov	rdi, rbp
	mov	r12d, eax
	call	ns_to_ktime@PLT
	mov	esi, r12d
	mov	edi, eax
	call	ktime_sub@PLT
	mov	edi, eax
	mov	ebp, eax
	call	ktime_to_ns@PLT
	mov	r8, rax
	xor	eax, eax
	test	r8, r8
	js	.L1
	mov	edi, ebp
	call	ktime_to_ns@PLT
	mov	rdi, rax
	call	nsecs_to_jiffies@PLT
	mov	rdx, QWORD PTR MAX_SCHEDULE_TIMEOUT[rip]
	lea	rcx, -1[rdx]
	cmp	rdx, rax
	cmovb	rax, rcx
.L1:
	add	rsp, 8
	.cfi_def_cfa_offset 24
	pop	rbp
	.cfi_def_cfa_offset 16
	pop	r12
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L9:
	.cfi_restore 6
	.cfi_restore 12
	mov	rax, QWORD PTR MAX_SCHEDULE_TIMEOUT[rip]
	ret
	.cfi_endproc
.LFE0:
	.size	amdgpu_gem_timeout, .-amdgpu_gem_timeout
	.comm	MAX_SCHEDULE_TIMEOUT,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_amdgpu_gem.c_amdgpu_gem_timeout.c"
	.text
	.align	2
	.global	amdgpu_gem_timeout
	.syntax unified
	.arm
	.fpu softvfp
	.type	amdgpu_gem_timeout, %function
amdgpu_gem_timeout:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	cmp	r0, #0
	blt	.L9
	push	{r4, lr}
	bl	ns_to_ktime
	mov	r4, r0
	bl	ktime_get
	mov	r1, r0
	mov	r0, r4
	bl	ktime_sub
	mov	r4, r0
	bl	ktime_to_ns
	cmp	r0, #0
	blt	.L4
	mov	r0, r4
	bl	ktime_to_ns
	bl	nsecs_to_jiffies
	ldr	r3, .L10
	ldr	r3, [r3]
	cmp	r3, r0
	subcc	r0, r3, #1
	pop	{r4, pc}
.L4:
	mov	r0, #0
	pop	{r4, pc}
.L9:
	ldr	r3, .L10
	ldr	r0, [r3]
	bx	lr
.L11:
	.align	2
.L10:
	.word	MAX_SCHEDULE_TIMEOUT
	.size	amdgpu_gem_timeout, .-amdgpu_gem_timeout
	.comm	MAX_SCHEDULE_TIMEOUT,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
