	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function caca_gfx_create
_caca_gfx_create:                       ## @caca_gfx_create
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	xorl	%edi, %edi
	callq	_caca_create_display
	movq	_caca_display@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movl	%eax, %edi
	callq	_caca_get_canvas
	movq	_caca_cv@GOTPCREL(%rip), %r15
	movl	%eax, (%r15)
	movq	_caca_video_width@GOTPCREL(%rip), %rbx
	cmpq	$0, (%rbx)
	movq	_caca_video_height@GOTPCREL(%rip), %r14
	je	LBB0_2
## %bb.1:
	movq	(%r14), %rdx
	testq	%rdx, %rdx
	jne	LBB0_3
LBB0_2:
	movl	%eax, %edi
	callq	_caca_get_canvas_width
	movq	%rax, (%rbx)
	movl	(%r15), %edi
	callq	_caca_get_canvas_height
	movq	%rax, %rdx
	movq	%rax, (%r14)
LBB0_3:
	movq	_caca_rgb32@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	movq	(%rbx), %rsi
	movq	_caca_video_pitch@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	je	LBB0_5
## %bb.4:
	movl	$32, %edi
	movl	$16711680, %r8d                 ## imm = 0xFF0000
	movl	$65280, %r9d                    ## imm = 0xFF00
	pushq	$0
	pushq	$255
	jmp	LBB0_6
LBB0_5:
	movl	$16, %edi
	movl	$63488, %r8d                    ## imm = 0xF800
	movl	$2016, %r9d                     ## imm = 0x7E0
	pushq	$0
	pushq	$31
LBB0_6:
	callq	_caca_create_dither
	addq	$16, %rsp
	movq	_caca_dither@GOTPCREL(%rip), %rcx
	movl	%eax, (%rcx)
	movq	_caca_video_width@GOTPCREL(%rip), %rdi
	movq	_caca_video_height@GOTPCREL(%rip), %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_video_driver_set_size          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_caca_display,4,2               ## @caca_display
	.comm	_caca_cv,4,2                    ## @caca_cv
	.comm	_caca_video_width,8,3           ## @caca_video_width
	.comm	_caca_video_height,8,3          ## @caca_video_height
	.comm	_caca_rgb32,8,3                 ## @caca_rgb32
	.comm	_caca_video_pitch,4,2           ## @caca_video_pitch
	.comm	_caca_dither,4,2                ## @caca_dither
	.no_dead_strip	_caca_gfx_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function caca_gfx_create
_caca_gfx_create:                       ; @caca_gfx_create
	.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
	mov	x0, #0
	bl	_caca_create_display
Lloh0:
	adrp	x8, _caca_display@GOTPAGE
Lloh1:
	ldr	x8, [x8, _caca_display@GOTPAGEOFF]
Lloh2:
	str	w0, [x8]
	bl	_caca_get_canvas
Lloh3:
	adrp	x21, _caca_cv@GOTPAGE
Lloh4:
	ldr	x21, [x21, _caca_cv@GOTPAGEOFF]
	str	w0, [x21]
Lloh5:
	adrp	x19, _caca_video_width@GOTPAGE
Lloh6:
	ldr	x19, [x19, _caca_video_width@GOTPAGEOFF]
	ldr	x8, [x19]
Lloh7:
	adrp	x20, _caca_video_height@GOTPAGE
Lloh8:
	ldr	x20, [x20, _caca_video_height@GOTPAGEOFF]
	ldr	x2, [x20]
	cmp	x8, #0
	ccmp	x2, #0, #4, ne
	b.ne	LBB0_2
; %bb.1:
	bl	_caca_get_canvas_width
	str	x0, [x19]
	ldr	w0, [x21]
	bl	_caca_get_canvas_height
	mov	x2, x0
	str	x0, [x20]
LBB0_2:
Lloh9:
	adrp	x8, _caca_rgb32@GOTPAGE
Lloh10:
	ldr	x8, [x8, _caca_rgb32@GOTPAGEOFF]
Lloh11:
	ldr	x8, [x8]
	ldr	x1, [x19]
Lloh12:
	adrp	x9, _caca_video_pitch@GOTPAGE
Lloh13:
	ldr	x9, [x9, _caca_video_pitch@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x9]
	cbz	x8, LBB0_4
; %bb.3:
	mov	w0, #32
	mov	w4, #16711680
	mov	w5, #65280
	mov	w6, #255
	b	LBB0_5
LBB0_4:
	mov	w0, #16
	mov	w4, #63488
	mov	w5, #2016
	mov	w6, #31
LBB0_5:
	mov	w7, #0
	bl	_caca_create_dither
Lloh15:
	adrp	x8, _caca_dither@GOTPAGE
Lloh16:
	ldr	x8, [x8, _caca_dither@GOTPAGEOFF]
Lloh17:
	str	w0, [x8]
Lloh18:
	adrp	x0, _caca_video_width@GOTPAGE
Lloh19:
	ldr	x0, [x0, _caca_video_width@GOTPAGEOFF]
Lloh20:
	adrp	x1, _caca_video_height@GOTPAGE
Lloh21:
	ldr	x1, [x1, _caca_video_height@GOTPAGEOFF]
	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	_video_driver_set_size
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotStr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotStr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_caca_display,4,2               ; @caca_display
	.comm	_caca_cv,4,2                    ; @caca_cv
	.comm	_caca_video_width,8,3           ; @caca_video_width
	.comm	_caca_video_height,8,3          ; @caca_video_height
	.comm	_caca_rgb32,8,3                 ; @caca_rgb32
	.comm	_caca_video_pitch,4,2           ; @caca_video_pitch
	.comm	_caca_dither,4,2                ; @caca_dither
	.no_dead_strip	_caca_gfx_create
.subsections_via_symbols
