#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
int /*<<< orphan*/ adc(int /*<<< orphan*/, int);
scalar_t__ beq();
int /*<<< orphan*/ clc();
int /*<<< orphan*/ dec(int, int);
int /*<<< orphan*/ jsr_hplot();
int /*<<< orphan*/ lda(int, int);
int /*<<< orphan*/ sta(int, int);
void jsr_flush_line() {
flush_loop:
  lda(1, 0xf4);
  if (beq())
    goto end_flush;
  jsr_hplot();
  clc();
  lda(1, 0xf1);
  adc(0, 1);
  sta(1, 0xf1);
  lda(1, 0xf2);
  adc(0, 0);
  sta(1, 0xf2);
  dec(1, 0xf4);
  goto flush_loop;
end_flush:;
}


x86 assembly (clang, -O0):
<jsr_flush_line>:
push   %rbp
mov    %rsp,%rbp
jmp    1179 <jsr_flush_line+0x9>
mov    $0x1,%edi
mov    $0xf4,%esi
call   1090 <lda@plt>
mov    $0x0,%al
call   1050 <beq@plt>
cmp    $0x0,%rax
je     119e <jsr_flush_line+0x2e>
jmp    1211 <jsr_flush_line+0xa1>
mov    $0x0,%al
call   1060 <jsr_hplot@plt>
mov    $0x0,%al
call   1080 <clc@plt>
mov    $0x1,%edi
mov    $0xf1,%esi
call   1090 <lda@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1070 <adc@plt>
mov    $0x1,%edi
mov    $0xf1,%esi
call   1030 <sta@plt>
mov    $0x1,%edi
mov    $0xf2,%esi
call   1090 <lda@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1070 <adc@plt>
mov    $0x1,%edi
mov    $0xf2,%esi
call   1030 <sta@plt>
mov    $0x1,%edi
mov    $0xf4,%esi
call   1040 <dec@plt>
jmp    1179 <jsr_flush_line+0x9>
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsr_flush_line>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    $0x1,%edi
mov    $0xf4,%esi
call   1090 <lda@plt>
xor    %eax,%eax
call   1050 <beq@plt>
test   %rax,%rax
jne    120e <jsr_flush_line+0x9e>
xor    %eax,%eax
call   1060 <jsr_hplot@plt>
xor    %eax,%eax
call   1080 <clc@plt>
mov    $0x1,%edi
mov    $0xf1,%esi
call   1090 <lda@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1070 <adc@plt>
mov    $0x1,%edi
mov    $0xf1,%esi
call   1030 <sta@plt>
mov    $0x1,%edi
mov    $0xf2,%esi
call   1090 <lda@plt>
xor    %edi,%edi
xor    %esi,%esi
call   1070 <adc@plt>
mov    $0x1,%edi
mov    $0xf2,%esi
call   1030 <sta@plt>
mov    $0x1,%edi
mov    $0xf4,%esi
call   1040 <dec@plt>
jmp    1180 <jsr_flush_line+0x10>
pop    %rax
ret

LLVM IR (-O0):
define void @jsr_flush_line() {
br label %1
1: ; preds = %6, %0
%2 = call i32 @lda(i32 1, i32 244)
%3 = call i64 (...) @beq()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %16
6: ; preds = %1
%7 = call i32 (...) @jsr_hplot()
%8 = call i32 (...) @clc()
%9 = call i32 @lda(i32 1, i32 241)
%10 = call i32 @adc(i32 0, i32 1)
%11 = call i32 @sta(i32 1, i32 241)
%12 = call i32 @lda(i32 1, i32 242)
%13 = call i32 @adc(i32 0, i32 0)
%14 = call i32 @sta(i32 1, i32 242)
%15 = call i32 @dec(i32 1, i32 244)
br label %1
16: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @jsr_flush_line() {
%1 = tail call i32 @lda(i32 1, i32 244)
%2 = tail call i64 (...) @beq()
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %17
4: ; preds = %0, %4
%5 = tail call i32 (...) @jsr_hplot()
%6 = tail call i32 (...) @clc()
%7 = tail call i32 @lda(i32 1, i32 241)
%8 = tail call i32 @adc(i32 0, i32 1)
%9 = tail call i32 @sta(i32 1, i32 241)
%10 = tail call i32 @lda(i32 1, i32 242)
%11 = tail call i32 @adc(i32 0, i32 0)
%12 = tail call i32 @sta(i32 1, i32 242)
%13 = tail call i32 @dec(i32 1, i32 244)
%14 = tail call i32 @lda(i32 1, i32 244)
%15 = tail call i64 (...) @beq()
%16 = icmp eq i64 %15, 0
br i1 %16, label %4, label %17
17: ; preds = %4, %0
ret void
}