	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i2c_24xxx_ir
_i2c_24xxx_ir:                          ## @i2c_24xxx_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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%ebx, %ebx
	movq	%r9, %rax
	orq	%rcx, %rax
	je	LBB0_13
## %bb.1:
	testq	%rcx, %rcx
	jne	LBB0_3
## %bb.2:
	testq	%r9, %r9
	je	LBB0_3
## %bb.4:
	movq	%r8, %r14
	cmpq	$2, %r9
	jg	LBB0_8
## %bb.5:
	testq	%r9, %r9
	jle	LBB0_13
## %bb.6:
	movl	$0, (%r14)
	cmpq	$1, %r9
	je	LBB0_13
## %bb.7:
	movl	$0, 4(%r14)
	jmp	LBB0_12
LBB0_3:
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_8:
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_LOCK_TAKE
	movq	_FX2CMD_GET_IR_CODE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	(%r15), %rcx
	movl	%eax, (%rcx)
	movq	%r15, %rdi
	movq	%rcx, %rsi
	movl	$1, %edx
	movl	$4, %r8d
	callq	_pvr2_send_request
	movl	%eax, %ebx
	movq	(%r15), %rax
	movl	(%rax), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	8(%rax), %r13d
	movslq	4(%rax), %r12
	movl	8(%r15), %edi
	callq	_LOCK_GIVE
	testl	%ebx, %ebx
	jne	LBB0_13
## %bb.9:
	movl	$193, 8(%r14)
	cmpl	$1, -44(%rbp)                   ## 4-byte Folded Reload
	jne	LBB0_10
## %bb.11:
	shlq	$8, %r12
	orq	%r13, %r12
	shrq	%r12
	movl	%r12d, %eax
	shrl	$8, %eax
	orl	$128, %eax
	movzbl	%al, %eax
	movl	%eax, (%r14)
	andl	$252, %r12d
	movl	%r12d, 4(%r14)
	jmp	LBB0_12
LBB0_10:
	movq	$0, (%r14)
LBB0_12:
	xorl	%ebx, %ebx
LBB0_13:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_FX2CMD_GET_IR_CODE,4,2         ## @FX2CMD_GET_IR_CODE
	.no_dead_strip	_i2c_24xxx_ir
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_24xxx_ir
_i2c_24xxx_ir:                          ; @i2c_24xxx_ir
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	orr	x8, x5, x3
	cbz	x8, LBB0_7
; %bb.1:
	cbnz	x3, LBB0_8
; %bb.2:
	cbz	x5, LBB0_8
; %bb.3:
	mov	x19, x4
	cmp	x5, #2
	b.gt	LBB0_9
; %bb.4:
	cmp	x5, #1
	b.lt	LBB0_7
; %bb.5:
	mov	w20, #0
	str	wzr, [x19]
	cmp	x5, #1
	b.eq	LBB0_13
; %bb.6:
	mov	w20, #0
	str	wzr, [x19, #4]
	b	LBB0_13
LBB0_7:
	mov	w20, #0
	b	LBB0_13
LBB0_8:
Lloh0:
	adrp	x8, _EIO@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_13
LBB0_9:
	mov	x21, x0
	ldr	w0, [x0, #8]
	bl	_LOCK_TAKE
Lloh3:
	adrp	x8, _FX2CMD_GET_IR_CODE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FX2CMD_GET_IR_CODE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x1, [x21]
	str	w8, [x1]
	mov	x0, x21
	mov	w2, #1
	mov	x3, x1
	mov	w4, #4
	bl	_pvr2_send_request
	mov	x20, x0
	ldr	x8, [x21]
	ldp	w24, w22, [x8]
                                        ; kill: def $w22 killed $w22 def $x22
	sxtw	x22, w22
	ldr	w23, [x8, #8]
	ldr	w0, [x21, #8]
	bl	_LOCK_GIVE
	cbnz	w20, LBB0_13
; %bb.10:
	mov	w8, #193
	str	w8, [x19, #8]
	cmp	w24, #1
	b.ne	LBB0_12
; %bb.11:
	mov	w20, #0
	orr	x8, x23, x22, lsl #8
	lsr	x8, x8, #1
	mov	w9, #128
	bfxil	w9, w8, #8, #7
	and	w8, w8, #0xfc
	stp	w9, w8, [x19]
	b	LBB0_13
LBB0_12:
	mov	w20, #0
	str	xzr, [x19]
LBB0_13:
	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
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_FX2CMD_GET_IR_CODE,4,2         ; @FX2CMD_GET_IR_CODE
	.no_dead_strip	_i2c_24xxx_ir
.subsections_via_symbols
