	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function redrat3_set_timeout
_redrat3_set_timeout:                   ## @redrat3_set_timeout
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %ebx
	movq	(%rdi), %rax
	movq	(%rax), %r14
	movq	8(%rax), %r12
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$4, %edi
	callq	_kmalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movl	%ebx, %eax
	imulq	$274877907, %rax, %rdi          ## imm = 0x10624DD3
	shrq	$38, %rdi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_redrat3_us_to_len
	movl	%eax, %edi
	callq	_cpu_to_be32
	movl	%eax, (%r13)
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_usb_sndctrlpipe
	movq	_RR3_SET_IR_PARAM@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_USB_TYPE_VENDOR@GOTPCREL(%rip), %rsi
	movq	_USB_RECIP_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rsi), %ecx
	movq	_USB_DIR_OUT@GOTPCREL(%rip), %rsi
	orl	(%rsi), %ecx
	movq	_RR3_IR_IO_SIG_TIMEOUT@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r8d
	movq	_HZ@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	leal	(%rsi,%rsi,4), %esi
	leal	(%rsi,%rsi,4), %ebx
	subq	$8, %rsp
	movq	%r12, %rdi
	movl	%eax, %esi
	xorl	%r9d, %r9d
	pushq	%rbx
	pushq	$4
	pushq	%r13
	callq	_usb_control_msg
	addq	$32, %rsp
	movl	%eax, %ebx
	movl	(%r13), %edi
	callq	_be32_to_cpu
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %edx
	movl	%ebx, %ecx
	callq	_dev_dbg
	cmpl	$4, %ebx
	je	LBB0_6
## %bb.3:
	testl	%ebx, %ebx
	js	LBB0_4
## %bb.5:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_6
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
	jmp	LBB0_7
LBB0_4:
	movl	%ebx, %r15d
LBB0_6:
	movq	%r13, %rdi
	callq	_kfree
LBB0_7:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_RR3_SET_IR_PARAM,4,2           ## @RR3_SET_IR_PARAM
	.comm	_USB_TYPE_VENDOR,4,2            ## @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ## @USB_RECIP_DEVICE
	.comm	_USB_DIR_OUT,4,2                ## @USB_DIR_OUT
	.comm	_RR3_IR_IO_SIG_TIMEOUT,4,2      ## @RR3_IR_IO_SIG_TIMEOUT
	.comm	_HZ,4,2                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set ir parm timeout %d ret 0x%02x\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_redrat3_set_timeout
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function redrat3_set_timeout
_redrat3_set_timeout:                   ; @redrat3_set_timeout
	.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
	mov	x22, x1
	ldr	x8, [x0]
	ldp	x20, x21, [x8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #4
	bl	_kmalloc
	cbz	x0, LBB0_5
; %bb.1:
	mov	x19, x0
	mov	w8, #19923
	movk	w8, #4194, lsl #16
	umull	x8, w22, w8
	lsr	x0, x8, #38
                                        ; kill: def $w0 killed $w0 killed $x0
	bl	_redrat3_us_to_len
	bl	_cpu_to_be32
	str	w0, [x19]
	mov	x0, x21
	mov	w1, #0
	bl	_usb_sndctrlpipe
	mov	x1, x0
Lloh3:
	adrp	x8, _RR3_SET_IR_PARAM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RR3_SET_IR_PARAM@GOTPAGEOFF]
Lloh5:
	adrp	x9, _USB_TYPE_VENDOR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _USB_TYPE_VENDOR@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
Lloh8:
	ldr	w8, [x9]
Lloh9:
	adrp	x9, _USB_RECIP_DEVICE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _USB_RECIP_DEVICE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _USB_DIR_OUT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _USB_DIR_OUT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w3, w8, w9
Lloh15:
	adrp	x8, _RR3_IR_IO_SIG_TIMEOUT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _RR3_IR_IO_SIG_TIMEOUT@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
Lloh18:
	adrp	x8, _HZ@GOTPAGE
Lloh19:
	ldr	x8, [x8, _HZ@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	mov	w9, #25
	mul	w8, w8, w9
	str	w8, [sp]
	mov	x0, x21
	mov	w5, #0
	mov	x6, x19
	mov	w7, #4
	bl	_usb_control_msg
	mov	x21, x0
	ldr	w0, [x19]
	bl	_be32_to_cpu
	mov	x2, x0
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x21
	bl	_dev_dbg
	mov	w20, #0
	cmp	w21, #4
	b.eq	LBB0_4
; %bb.2:
	mov	x20, x21
	tbnz	w21, #31, LBB0_4
; %bb.3:
Lloh23:
	adrp	x8, _EIO@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_4:
	mov	x0, x19
	bl	_kfree
	b	LBB0_6
LBB0_5:
Lloh26:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh7
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_RR3_SET_IR_PARAM,4,2           ; @RR3_SET_IR_PARAM
	.comm	_USB_TYPE_VENDOR,4,2            ; @USB_TYPE_VENDOR
	.comm	_USB_RECIP_DEVICE,4,2           ; @USB_RECIP_DEVICE
	.comm	_USB_DIR_OUT,4,2                ; @USB_DIR_OUT
	.comm	_RR3_IR_IO_SIG_TIMEOUT,4,2      ; @RR3_IR_IO_SIG_TIMEOUT
	.comm	_HZ,4,2                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set ir parm timeout %d ret 0x%02x\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_redrat3_set_timeout
.subsections_via_symbols
