	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ir_lirc_decode
_ir_lirc_decode:                        ## @ir_lirc_decode
	.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), %r15
	movq	_RC_TYPE_LIRC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	testl	%eax, (%r15)
	je	LBB0_19
## %bb.1:
	movq	16(%r15), %rax
	testq	%rax, %rax
	je	LBB0_3
## %bb.2:
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.4:
	leaq	16(%rbp), %r12
	cmpq	$0, 40(%r12)
	jne	LBB0_19
## %bb.5:
	movq	%rdi, %r14
	cmpq	$0, 32(%r12)
	je	LBB0_8
## %bb.6:
	movl	24(%r12), %edi
	callq	_LIRC_FREQUENCY
	movl	%eax, -36(%rbp)
	leaq	L_.str(%rip), %rsi
LBB0_7:
	movl	$2, %edi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_IR_dprintk
LBB0_18:
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movq	(%rax), %rdi
	leaq	-36(%rbp), %rsi
	callq	_lirc_buffer_write
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movq	(%rax), %rdi
	callq	_wake_up
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_19:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	cmpq	$0, 16(%r12)
	movl	8(%r15), %eax
	je	LBB0_12
## %bb.9:
	testl	%eax, %eax
	jne	LBB0_19
## %bb.10:
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ktime_get
	movl	%eax, 24(%r15)
	movl	$1, 8(%r15)
	movl	(%r12), %eax
	movl	%eax, 12(%r15)
	cmpl	$0, 28(%r15)
	je	LBB0_19
## %bb.11:
	cltq
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_LIRC_TIMEOUT
	movl	%eax, -36(%rbp)
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_7
LBB0_12:
	testl	%eax, %eax
	je	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	callq	_ktime_get
	movl	24(%r15), %esi
	movl	%eax, %edi
	callq	_ktime_sub
	movl	%eax, %edi
	callq	_ktime_to_ns
	addl	12(%r15), %eax
	movl	%eax, 12(%r15)
	movl	%eax, %edi
	movl	$1000, %esi                     ## imm = 0x3E8
	callq	_do_div
	movl	12(%r15), %edi
	movq	_LIRC_VALUE_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_min
	movl	%eax, 12(%r15)
	movl	%eax, %edi
	callq	_LIRC_SPACE
	movl	%eax, -40(%rbp)
	movq	(%r14), %rax
	movq	16(%rax), %rax
	movq	(%rax), %rdi
	leaq	-40(%rbp), %rsi
	callq	_lirc_buffer_write
	movl	$0, 8(%r15)
LBB0_14:
	movq	8(%r12), %r15
	movslq	(%r12), %rbx
	imulq	$274877907, %rbx, %rdi          ## imm = 0x10624DD3
	movq	%rdi, %rax
	shrq	$63, %rax
	sarq	$38, %rdi
	addl	%eax, %edi
                                        ## kill: def $edi killed $edi killed $rdi
	testq	%r15, %r15
	je	LBB0_16
## %bb.15:
	callq	_LIRC_PULSE
	jmp	LBB0_17
LBB0_16:
	callq	_LIRC_SPACE
LBB0_17:
	movl	%eax, -36(%rbp)
	movl	%ebx, %edi
	callq	_TO_US
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_TO_STR
	leaq	L_.str.2(%rip), %rsi
	movl	$2, %edi
	movl	%ebx, %edx
	movl	%eax, %ecx
	xorl	%eax, %eax
	callq	_IR_dprintk
	jmp	LBB0_18
	.cfi_endproc
                                        ## -- End function
	.comm	_RC_TYPE_LIRC,4,2               ## @RC_TYPE_LIRC
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"carrier report (freq: %d)\n"

L_.str.1:                               ## @.str.1
	.asciz	"timeout report (duration: %d)\n"

	.comm	_LIRC_VALUE_MASK,8,3            ## @LIRC_VALUE_MASK
L_.str.2:                               ## @.str.2
	.asciz	"delivering %uus %s to lirc_dev\n"

	.no_dead_strip	_ir_lirc_decode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ir_lirc_decode
_ir_lirc_decode:                        ; @ir_lirc_decode
	.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
	ldr	x21, [x0]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _RC_TYPE_LIRC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _RC_TYPE_LIRC@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_8
; %bb.1:
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_9
; %bb.2:
	ldr	x8, [x8]
	cbz	x8, LBB0_9
; %bb.3:
	mov	x20, x1
	ldr	x8, [x1, #40]
	cbnz	x8, LBB0_8
; %bb.4:
	mov	x19, x0
	ldr	x8, [x20, #32]
	cbz	x8, LBB0_11
; %bb.5:
	ldr	w0, [x20, #24]
	bl	_LIRC_FREQUENCY
	mov	x2, x0
	str	w0, [sp, #12]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
LBB0_6:
	mov	w0, #2
LBB0_7:
	bl	_IR_dprintk
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	ldr	x0, [x8]
	add	x1, sp, #12
	bl	_lirc_buffer_write
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	ldr	x0, [x8]
	bl	_wake_up
LBB0_8:
	mov	w0, #0
	b	LBB0_10
LBB0_9:
Lloh5:
	adrp	x8, _EINVAL@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_10:
	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
LBB0_11:
	ldr	x9, [x20, #16]
	ldr	w8, [x21, #8]
	cbz	x9, LBB0_15
; %bb.12:
	cbnz	w8, LBB0_8
; %bb.13:
	bl	_ktime_get
	str	w0, [x21, #24]
	mov	w9, #1
	ldr	w8, [x20]
	stp	w9, w8, [x21, #8]
	ldr	w9, [x21, #28]
	cbz	w9, LBB0_8
; %bb.14:
	mov	w9, #19923
	movk	w9, #4194, lsl #16
	smull	x8, w8, w9
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w0, w8, w9
	bl	_LIRC_TIMEOUT
	mov	x2, x0
	str	w0, [sp, #12]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_6
LBB0_15:
	cbz	w8, LBB0_17
; %bb.16:
	bl	_ktime_get
	ldr	w1, [x21, #24]
	bl	_ktime_sub
	bl	_ktime_to_ns
	ldr	w8, [x21, #12]
	add	w0, w8, w0
	str	w0, [x21, #12]
	mov	w1, #1000
	bl	_do_div
	ldr	w0, [x21, #12]
Lloh10:
	adrp	x8, _LIRC_VALUE_MASK@GOTPAGE
Lloh11:
	ldr	x8, [x8, _LIRC_VALUE_MASK@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_min
	str	w0, [x21, #12]
	bl	_LIRC_SPACE
	str	w0, [sp, #8]
	ldr	x8, [x19]
	ldr	x8, [x8, #16]
	ldr	x0, [x8]
	add	x1, sp, #8
	bl	_lirc_buffer_write
	str	wzr, [x21, #8]
LBB0_17:
	ldr	x8, [x20, #8]
	ldrsw	x9, [x20]
	mov	w10, #19923
	movk	w10, #4194, lsl #16
	mul	x9, x9, x10
	lsr	x10, x9, #63
	asr	x9, x9, #38
	add	w0, w9, w10
	cbz	x8, LBB0_19
; %bb.18:
	bl	_LIRC_PULSE
	b	LBB0_20
LBB0_19:
	bl	_LIRC_SPACE
LBB0_20:
	str	w0, [sp, #12]
	ldr	w0, [x20]
	bl	_TO_US
	mov	x21, x0
	ldr	x0, [x20, #8]
	bl	_TO_STR
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	w0, #2
	mov	x2, x21
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RC_TYPE_LIRC,4,2               ; @RC_TYPE_LIRC
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"carrier report (freq: %d)\n"

l_.str.1:                               ; @.str.1
	.asciz	"timeout report (duration: %d)\n"

	.comm	_LIRC_VALUE_MASK,8,3            ; @LIRC_VALUE_MASK
l_.str.2:                               ; @.str.2
	.asciz	"delivering %uus %s to lirc_dev\n"

	.no_dead_strip	_ir_lirc_decode
.subsections_via_symbols
