	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_reset_ir_gpio             ## -- Begin function ivtv_reset_ir_gpio
	.p2align	4, 0x90
_ivtv_reset_ir_gpio:                    ## @ivtv_reset_ir_gpio
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	(%rax), %rax
	movq	_IVTV_CARD_PVR_150@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_1
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_IVTV_DEBUG_INFO
	movq	_IVTV_REG_GPIO_OUT@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	callq	_read_reg
	movl	%eax, %ebx
	movq	_IVTV_REG_GPIO_DIR@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_read_reg
	movl	%eax, %r14d
	movl	%eax, %edi
	orl	$128, %edi
	movl	(%r15), %esi
	callq	_write_reg
	andl	$-16, %ebx
	leal	1(%rbx), %edi
	movl	(%r12), %esi
	callq	_write_reg
	movl	$1, %edi
	callq	_msecs_to_jiffies
	movl	%eax, %edi
	callq	_schedule_timeout_interruptible
	orl	$3, %ebx
	movl	(%r12), %esi
	movl	%ebx, %edi
	callq	_write_reg
	andl	$-129, %r14d
	movl	(%r15), %esi
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_write_reg                      ## TAILCALL
LBB0_1:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IVTV_CARD_PVR_150,8,3          ## @IVTV_CARD_PVR_150
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Resetting PVR150 IR\n"

	.comm	_IVTV_REG_GPIO_OUT,4,2          ## @IVTV_REG_GPIO_OUT
	.comm	_IVTV_REG_GPIO_DIR,4,2          ## @IVTV_REG_GPIO_DIR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ivtv_reset_ir_gpio             ; -- Begin function ivtv_reset_ir_gpio
	.p2align	2
_ivtv_reset_ir_gpio:                    ; @ivtv_reset_ir_gpio
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x8, [x0]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _IVTV_CARD_PVR_150@GOTPAGE
Lloh1:
	ldr	x9, [x9, _IVTV_CARD_PVR_150@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_IVTV_DEBUG_INFO
Lloh5:
	adrp	x21, _IVTV_REG_GPIO_OUT@GOTPAGE
Lloh6:
	ldr	x21, [x21, _IVTV_REG_GPIO_OUT@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_read_reg
	mov	x19, x0
Lloh7:
	adrp	x22, _IVTV_REG_GPIO_DIR@GOTPAGE
Lloh8:
	ldr	x22, [x22, _IVTV_REG_GPIO_DIR@GOTPAGEOFF]
	ldr	w0, [x22]
	bl	_read_reg
	mov	x20, x0
	orr	w0, w0, #0x80
	ldr	w1, [x22]
	bl	_write_reg
	and	w19, w19, #0xfffffff0
	orr	w0, w19, #0x1
	ldr	w1, [x21]
	bl	_write_reg
	mov	w0, #1
	bl	_msecs_to_jiffies
	bl	_schedule_timeout_interruptible
	orr	w0, w19, #0x3
	ldr	w1, [x21]
	bl	_write_reg
	and	w0, w20, #0xffffff7f
	ldr	w1, [x22]
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_write_reg
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_IVTV_CARD_PVR_150,8,3          ; @IVTV_CARD_PVR_150
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Resetting PVR150 IR\n"

	.comm	_IVTV_REG_GPIO_OUT,4,2          ; @IVTV_REG_GPIO_OUT
	.comm	_IVTV_REG_GPIO_DIR,4,2          ; @IVTV_REG_GPIO_DIR
.subsections_via_symbols
