	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function technisat_usb2_get_ir
_technisat_usb2_get_ir:                 ## @technisat_usb2_get_ir
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	16(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rax), %r13
	movq	_GET_IR_DATA_VENDOR_REQUEST@GOTPCREL(%rip), %r12
	movl	(%r12), %eax
	movl	%eax, (%r13)
	movabsq	$614180323336, %rax             ## imm = 0x8F00000008
	movq	%rax, 4(%r13)
	movq	_MINIMUM_IR_BIT_TRANSITION_TICK_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%r13)
	movq	_MAXIMUM_IR_BIT_TIME_TICK_COUNT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%r13)
	leaq	4(%rdi), %r15
	movq	%r15, %rdi
	callq	_mutex_lock_interruptible
	testq	%rax, %rax
	js	LBB0_1
## %bb.2:
	movl	8(%r14), %ebx
	movl	%ebx, %edi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movl	(%r12), %edx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rsi
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	subq	$8, %rsp
	movl	%ebx, %edi
	movl	%eax, %esi
	xorl	%r8d, %r8d
	xorl	%r9d, %r9d
	pushq	$500                            ## imm = 0x1F4
	pushq	$5
	pushq	%r13
	callq	_usb_control_msg
	addq	$32, %rsp
	testl	%eax, %eax
	js	LBB0_3
## %bb.4:
	movq	$0, 4(%r13)
	movl	8(%r14), %r12d
	xorl	%ebx, %ebx
	movl	%r12d, %edi
	xorl	%esi, %esi
	callq	_usb_rcvctrlpipe
	movq	_GET_IR_DATA_VENDOR_REQUEST@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USB_DIR_IN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	subq	$8, %rsp
	movl	%r12d, %edi
	movl	%eax, %esi
	movl	$32896, %r8d                    ## imm = 0x8080
	xorl	%r9d, %r9d
	pushq	$500                            ## imm = 0x1F4
	pushq	$62
	pushq	%r13
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %r12d
	movq	%r15, %rdi
	callq	_mutex_unlock
	testl	%r12d, %r12d
	js	LBB0_5
## %bb.6:
	cmpl	$1, %r12d
	je	LBB0_13
## %bb.7:
	movl	$0, -48(%rbp)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	cmpl	$2, %eax
	jl	LBB0_12
## %bb.8:
	movl	$1, %ebx
	movq	_FIRMWARE_CLOCK_TICK@GOTPCREL(%rip), %r12
	leaq	-48(%rbp), %r15
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$255, (%r13,%rbx,4)
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%eax, %eax
	cmpl	$0, -48(%rbp)
	sete	%al
	movl	%eax, -48(%rbp)
	movq	_FIRMWARE_CLOCK_DIVISOR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	imull	(%r13,%rbx,4), %eax
	imull	(%r12), %eax
	cltq
	imulq	$274877907, %rax, %rax          ## imm = 0x10624DD3
	movq	%rax, %rcx
	shrq	$63, %rcx
	sarq	$38, %rax
	addl	%ecx, %eax
	movl	%eax, -44(%rbp)
	movl	(%r14), %edi
	movq	%r15, %rsi
	callq	_ir_raw_event_store
	incq	%rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jl	LBB0_9
	jmp	LBB0_12
LBB0_1:
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_mutex_unlock
	jmp	LBB0_13
LBB0_5:
	movl	%r12d, %ebx
	jmp	LBB0_13
LBB0_10:
	movabsq	$7635489779613696, %rax         ## imm = 0x1B207000000000
	movq	%rax, -48(%rbp)
	movl	(%r14), %edi
	leaq	-48(%rbp), %rsi
	callq	_ir_raw_event_store
LBB0_12:
	movl	(%r14), %edi
	callq	_ir_raw_event_handle
	movl	$1, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GET_IR_DATA_VENDOR_REQUEST,4,2 ## @GET_IR_DATA_VENDOR_REQUEST
	.comm	_MINIMUM_IR_BIT_TRANSITION_TICK_COUNT,4,2 ## @MINIMUM_IR_BIT_TRANSITION_TICK_COUNT
	.comm	_MAXIMUM_IR_BIT_TIME_TICK_COUNT,4,2 ## @MAXIMUM_IR_BIT_TIME_TICK_COUNT
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_USB_DIR_IN,4,2                 ## @USB_DIR_IN
	.comm	_FIRMWARE_CLOCK_DIVISOR,4,2     ## @FIRMWARE_CLOCK_DIVISOR
	.comm	_FIRMWARE_CLOCK_TICK,4,2        ## @FIRMWARE_CLOCK_TICK
	.no_dead_strip	_technisat_usb2_get_ir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function technisat_usb2_get_ir
lCPI0_0:
	.long	8                               ; 0x8
	.long	143                             ; 0x8f
lCPI0_1:
	.long	0                               ; 0x0
	.long	1777776                         ; 0x1b2070
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_technisat_usb2_get_ir:                 ; @technisat_usb2_get_ir
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	x23, [x0, #16]
	ldr	x20, [x23]
Lloh0:
	adrp	x24, _GET_IR_DATA_VENDOR_REQUEST@GOTPAGE
Lloh1:
	ldr	x24, [x24, _GET_IR_DATA_VENDOR_REQUEST@GOTPAGEOFF]
	ldr	w8, [x24]
	str	w8, [x20]
Lloh2:
	adrp	x8, lCPI0_0@PAGE
Lloh3:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	stur	d0, [x20, #4]
Lloh4:
	adrp	x8, _MINIMUM_IR_BIT_TRANSITION_TICK_COUNT@GOTPAGE
Lloh5:
	ldr	x8, [x8, _MINIMUM_IR_BIT_TRANSITION_TICK_COUNT@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x9, _MAXIMUM_IR_BIT_TIME_TICK_COUNT@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAXIMUM_IR_BIT_TIME_TICK_COUNT@GOTPAGEOFF]
Lloh9:
	ldr	w9, [x9]
	stp	w8, w9, [x20, #12]
	add	x21, x0, #4
	mov	x0, x21
	bl	_mutex_lock_interruptible
	tbnz	x0, #63, LBB0_5
; %bb.1:
	ldr	w22, [x19, #8]
	mov	x0, x22
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh10:
	adrp	x25, _USB_TYPE_VENDOR@GOTPAGE
Lloh11:
	ldr	x25, [x25, _USB_TYPE_VENDOR@GOTPAGEOFF]
	ldr	w2, [x24]
	ldr	w8, [x25]
Lloh12:
	adrp	x9, _USB_DIR_OUT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _USB_DIR_OUT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w9, w8
	mov	w26, #500
	str	w26, [sp]
	mov	x0, x22
	mov	w4, #0
	mov	w5, #0
	mov	x6, x20
	mov	w7, #5
	bl	_usb_control_msg
	tbnz	w0, #31, LBB0_6
; %bb.2:
	stp	wzr, wzr, [x20, #4]
	ldr	w22, [x19, #8]
	mov	x0, x22
	mov	w1, #0
	bl	_usb_rcvctrlpipe
	mov	x1, x0
	ldr	w2, [x24]
	ldr	w8, [x25]
Lloh15:
	adrp	x9, _USB_DIR_IN@GOTPAGE
Lloh16:
	ldr	x9, [x9, _USB_DIR_IN@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	orr	w3, w9, w8
	str	w26, [sp]
	mov	x0, x22
	mov	w4, #32896
	mov	w5, #0
	mov	x6, x20
	mov	w7, #62
	bl	_usb_control_msg
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	tbnz	w22, #31, LBB0_13
; %bb.3:
	cmp	w22, #1
	b.ne	LBB0_7
; %bb.4:
	mov	w22, #0
	b	LBB0_13
LBB0_5:
Lloh18:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w22, w8
	b	LBB0_13
LBB0_6:
	mov	x22, x0
	mov	x0, x21
	bl	_mutex_unlock
	b	LBB0_13
LBB0_7:
	str	wzr, [sp, #8]
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	w0, #2
	b.lt	LBB0_12
; %bb.8:
	mov	w21, #1
Lloh21:
	adrp	x22, _FIRMWARE_CLOCK_DIVISOR@GOTPAGE
Lloh22:
	ldr	x22, [x22, _FIRMWARE_CLOCK_DIVISOR@GOTPAGEOFF]
Lloh23:
	adrp	x24, _FIRMWARE_CLOCK_TICK@GOTPAGE
Lloh24:
	ldr	x24, [x24, _FIRMWARE_CLOCK_TICK@GOTPAGEOFF]
	mov	w25, #19923
	movk	w25, #4194, lsl #16
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x20, x21, lsl #2]
	cmp	w8, #255
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	w8, [sp, #8]
	cmp	w8, #0
	cset	w8, eq
	str	w8, [sp, #8]
	ldr	w8, [x20, x21, lsl #2]
	ldr	w9, [x22]
	mul	w8, w9, w8
	ldr	w9, [x24]
	mul	w8, w8, w9
	smull	x8, w8, w25
	lsr	x9, x8, #63
	asr	x8, x8, #38
	add	w8, w8, w9
	str	w8, [sp, #12]
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_ir_raw_event_store
	add	x21, x21, #1
	ldr	x0, [x23]
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.lt	LBB0_9
	b	LBB0_12
LBB0_11:
Lloh25:
	adrp	x8, lCPI0_1@PAGE
Lloh26:
	ldr	d0, [x8, lCPI0_1@PAGEOFF]
	str	d0, [sp, #8]
	ldr	w0, [x19]
	add	x1, sp, #8
	bl	_ir_raw_event_store
LBB0_12:
	ldr	w0, [x19]
	bl	_ir_raw_event_handle
	mov	w22, #1
LBB0_13:
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdrp	Lloh2, Lloh4
	.loh AdrpLdr	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh21, Lloh22
	.loh AdrpLdr	Lloh25, Lloh26
	.cfi_endproc
                                        ; -- End function
	.comm	_GET_IR_DATA_VENDOR_REQUEST,4,2 ; @GET_IR_DATA_VENDOR_REQUEST
	.comm	_MINIMUM_IR_BIT_TRANSITION_TICK_COUNT,4,2 ; @MINIMUM_IR_BIT_TRANSITION_TICK_COUNT
	.comm	_MAXIMUM_IR_BIT_TIME_TICK_COUNT,4,2 ; @MAXIMUM_IR_BIT_TIME_TICK_COUNT
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_USB_DIR_IN,4,2                 ; @USB_DIR_IN
	.comm	_FIRMWARE_CLOCK_DIVISOR,4,2     ; @FIRMWARE_CLOCK_DIVISOR
	.comm	_FIRMWARE_CLOCK_TICK,4,2        ; @FIRMWARE_CLOCK_TICK
	.no_dead_strip	_technisat_usb2_get_ir
.subsections_via_symbols
