	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_set_gpio               ## -- Begin function saa7134_set_gpio
	.p2align	4, 0x90
_saa7134_set_gpio:                      ## @saa7134_set_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%edx, %r14d
	movl	$1, %ebx
	movl	%esi, %ecx
	shll	%cl, %ebx
	cmpl	$2, %edx
	jae	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rdi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_core_dbg
	testl	$12582912, %ebx                 ## imm = 0xC00000
	je	LBB0_5
## %bb.4:
	movq	_SAA7134_VIDEO_PORT_CTRL6@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$15, %esi
	xorl	%edx, %edx
	callq	_saa_andorb
LBB0_5:
	testl	%r14d, %r14d
	cmovnel	%ebx, %r14d
	movq	_SAA7134_GPIO_GPMODE0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	sarl	$2, %edi
	movl	%ebx, %esi
	movl	%ebx, %edx
	callq	_saa_andorl
	movq	_SAA7134_GPIO_GPSTATUS0@GOTPCREL(%rip), %rax
	jmp	LBB0_6
LBB0_1:
	cmpl	$3, %r14d
	jne	LBB0_7
## %bb.2:
	leaq	L_.str.1(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_core_dbg
	movq	_SAA7134_GPIO_GPMODE0@GOTPCREL(%rip), %rax
LBB0_6:
	movl	(%rax), %edi
	sarl	$2, %edi
	movl	%ebx, %esi
	movl	%r14d, %edx
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_saa_andorl                     ## TAILCALL
LBB0_7:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"setting GPIO%d to static %d\n"

	.comm	_SAA7134_VIDEO_PORT_CTRL6,4,2   ## @SAA7134_VIDEO_PORT_CTRL6
	.comm	_SAA7134_GPIO_GPMODE0,4,2       ## @SAA7134_GPIO_GPMODE0
	.comm	_SAA7134_GPIO_GPSTATUS0,4,2     ## @SAA7134_GPIO_GPSTATUS0
L_.str.1:                               ## @.str.1
	.asciz	"setting GPIO%d to tristate\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_saa7134_set_gpio               ; -- Begin function saa7134_set_gpio
	.p2align	2
_saa7134_set_gpio:                      ; @saa7134_set_gpio
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x20, x2
	mov	w8, #1
	lsl	w19, w8, w1
	cmp	w2, #2
	b.hs	LBB0_4
; %bb.1:
	str	x20, [sp]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_core_dbg
	tst	w19, #0xc00000
	b.eq	LBB0_3
; %bb.2:
Lloh2:
	adrp	x8, _SAA7134_VIDEO_PORT_CTRL6@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SAA7134_VIDEO_PORT_CTRL6@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #15
	mov	w2, #0
	bl	_saa_andorb
LBB0_3:
	cmp	w20, #0
	csel	w20, wzr, w19, eq
Lloh5:
	adrp	x8, _SAA7134_GPIO_GPMODE0@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SAA7134_GPIO_GPMODE0@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	asr	w0, w8, #2
	mov	x1, x19
	mov	x2, x19
	bl	_saa_andorl
Lloh8:
	adrp	x8, _SAA7134_GPIO_GPSTATUS0@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SAA7134_GPIO_GPSTATUS0@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	cmp	w20, #3
	b.ne	LBB0_7
; %bb.5:
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_core_dbg
	mov	w20, #0
Lloh12:
	adrp	x8, _SAA7134_GPIO_GPMODE0@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SAA7134_GPIO_GPMODE0@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	asr	w0, w8, #2
	mov	x1, x19
	mov	x2, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_saa_andorl
LBB0_7:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"setting GPIO%d to static %d\n"

	.comm	_SAA7134_VIDEO_PORT_CTRL6,4,2   ; @SAA7134_VIDEO_PORT_CTRL6
	.comm	_SAA7134_GPIO_GPMODE0,4,2       ; @SAA7134_GPIO_GPMODE0
	.comm	_SAA7134_GPIO_GPSTATUS0,4,2     ; @SAA7134_GPIO_GPSTATUS0
l_.str.1:                               ; @.str.1
	.asciz	"setting GPIO%d to tristate\n"

.subsections_via_symbols
