#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*/ clear_screen();
int /*<<< orphan*/ coordinates();
int /*<<< orphan*/ draw_pixel(int, int);
char getchar();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ sscanf(char *, char *, int *);
int main(void) {
  clear_screen();
  int dx, dy, p, end;
  float x1, x2, y1, y2, x, y;
  int a;
  int b;
  printf("f(x) = ax + b\n");
  printf("Ingresar valor de 'a':\n");
  char buffer[2000];
  char buffer2[2000];
  int index;
  char c;
  int state;
  while (state != 2) {
    if ((c = getchar()) != -1) {
      if (c == '\n') {
        buffer[index] = 0;
        state = 2;
      } else {
        buffer[index] = c;
        index++;
        buffer[index] = 0;
        putchar(buffer[index - 1]);
      }
    }
  }
  printf("\n");
  sscanf("%d", buffer, &a);
  state = 0;
  int index2;
  printf("Ingresar valor de 'b':\n");
  while (state != 2) {
    if ((c = getchar()) != -1) {
      if (c == '\n') {
        buffer2[index2] = 0;
        state = 2;
      } else {
        buffer2[index2] = c;
        index2++;
        buffer2[index2] = 0;
        putchar(buffer2[index2 - 1]);
      }
    }
  }
  sscanf("%d", buffer2, &b);
  clear_screen();
  coordinates();
  if (x1 > x2) {
    x = x2;
    y = y2;
    end = x1;
  } else {
    x = x1;
    y = y1;
    end = x2;
  }
  if (a == 0) {
    for (int i = 0; i < 1024; i++) {
      draw_pixel(i, 768 - b - 768 / 2);
    }
  } else {
    for (int i = 0; i < 1024 - (1024 / 2 - 768 / 2); i++) {
      y = a * i + b;
      draw_pixel(i + (1024 / 2 - 768 / 2), 768 - y);
    }
  }
  int i = 0;
  while (i < 50000000) {
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1000,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1090 <clear_screen@plt>
lea    0xe74(%rip),%rdi
call   1040 <printf@plt>
lea    0xe77(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x2,-0xfec(%rbp)
je     1249 <main+0xd9>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0xfe5(%rbp)
movsbl %al,%eax
cmp    $0xffffffff,%eax
je     1244 <main+0xd4>
movsbl -0xfe5(%rbp),%eax
cmp    $0xa,%eax
jne    11f5 <main+0x85>
movslq -0xfe4(%rbp),%rax
movb   $0x0,-0x810(%rbp,%rax,1)
movl   $0x2,-0xfec(%rbp)
jmp    123f <main+0xcf>
mov    -0xfe5(%rbp),%cl
movslq -0xfe4(%rbp),%rax
mov    %cl,-0x810(%rbp,%rax,1)
mov    -0xfe4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xfe4(%rbp)
movslq -0xfe4(%rbp),%rax
movb   $0x0,-0x810(%rbp,%rax,1)
mov    -0xfe4(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0x810(%rbp,%rax,1),%edi
ff
call   1030 <putchar@plt>
jmp    1244 <main+0xd4>
jmp    11a1 <main+0x31>
lea    0xdd9(%rip),%rdi
call   1040 <printf@plt>
lea    -0x810(%rbp),%rsi
lea    0xdc8(%rip),%rdi
lea    -0x30(%rbp),%rdx
call   1060 <sscanf@plt>
movl   $0x0,-0xfec(%rbp)
lea    0xdb1(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x2,-0xfec(%rbp)
je     132a <main+0x1ba>
mov    $0x0,%al
call   1050 <getchar@plt>
mov    %al,-0xfe5(%rbp)
movsbl %al,%eax
cmp    $0xffffffff,%eax
je     1325 <main+0x1b5>
movsbl -0xfe5(%rbp),%eax
cmp    $0xa,%eax
jne    12d6 <main+0x166>
movslq -0xff0(%rbp),%rax
movb   $0x0,-0xfe0(%rbp,%rax,1)
movl   $0x2,-0xfec(%rbp)
jmp    1320 <main+0x1b0>
mov    -0xfe5(%rbp),%cl
movslq -0xff0(%rbp),%rax
mov    %cl,-0xfe0(%rbp,%rax,1)
mov    -0xff0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xff0(%rbp)
movslq -0xff0(%rbp),%rax
movb   $0x0,-0xfe0(%rbp,%rax,1)
mov    -0xff0(%rbp),%eax
sub    $0x1,%eax
cltq
movsbl -0xfe0(%rbp,%rax,1),%edi
ff
call   1030 <putchar@plt>
jmp    1325 <main+0x1b5>
jmp    1282 <main+0x112>
lea    -0xfe0(%rbp),%rsi
lea    0xcf3(%rip),%rdi
lea    -0x34(%rbp),%rdx
call   1060 <sscanf@plt>
mov    $0x0,%al
call   1090 <clear_screen@plt>
mov    $0x0,%al
call   1070 <coordinates@plt>
movss  -0x18(%rbp),%xmm0
ucomiss -0x1c(%rbp),%xmm0
jbe    137f <main+0x20f>
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x24(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
cvttss2si -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    139b <main+0x22b>
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
cvttss2si -0x1c(%rbp),%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x30(%rbp)
jne    13f1 <main+0x281>
movl   $0x0,-0xff4(%rbp)
cmpl   $0x400,-0xff4(%rbp)
jge    13ec <main+0x27c>
mov    -0xff4(%rbp),%edi
mov    $0x300,%esi
sub    -0x34(%rbp),%esi
sub    $0x180,%esi
call   1080 <draw_pixel@plt>
mov    -0xff4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xff4(%rbp)
jmp    13af <main+0x23f>
jmp    145c <main+0x2ec>
movl   $0x0,-0xff8(%rbp)
cmpl   $0x380,-0xff8(%rbp)
jge    1457 <main+0x2e7>
mov    -0x30(%rbp),%eax
imul   -0xff8(%rbp),%eax
add    -0x34(%rbp),%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x2c(%rbp)
mov    -0xff8(%rbp),%edi
add    $0x80,%edi
movss  0xbcb(%rip),%xmm0
subss  -0x2c(%rbp),%xmm0
cvttss2si %xmm0,%esi
call   1080 <draw_pixel@plt>
mov    -0xff8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xff8(%rbp)
jmp    13fb <main+0x28b>
jmp    145c <main+0x2ec>
movl   $0x0,-0xffc(%rbp)
cmpl   $0x2faf080,-0xffc(%rbp)
f0 fa 02
jge    148a <main+0x31a>
mov    -0xffc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xffc(%rbp)
jmp    1466 <main+0x2f6>
xor    %eax,%eax
add    $0x1000,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xfb0,%rsp
xor    %eax,%eax
call   1090 <clear_screen@plt>
lea    0xe81(%rip),%rdi
call   1040 <puts@plt>
lea    0xe83(%rip),%rdi
call   1040 <puts@plt>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xff,%al
je     11a0 <main+0x30>
movslq %ebx,%rbx
cmp    $0xa,%al
je     11cf <main+0x5f>
mov    %al,0x7e0(%rsp,%rbx,1)
movb   $0x0,0x7e1(%rsp,%rbx,1)
add    $0x1,%rbx
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    11a0 <main+0x30>
movb   $0x0,0x7e0(%rsp,%rbx,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xe1c(%rip),%rdi
lea    0x7e0(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1060 <sscanf@plt>
lea    0xe2b(%rip),%rdi
call   1040 <puts@plt>
cs nopw 0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <getchar@plt>
cmp    $0xff,%al
je     1210 <main+0xa0>
movslq %ebx,%rbx
cmp    $0xa,%al
je     1239 <main+0xc9>
mov    %al,0x10(%rsp,%rbx,1)
movb   $0x0,0x11(%rsp,%rbx,1)
add    $0x1,%rbx
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1210 <main+0xa0>
movb   $0x0,0x10(%rsp,%rbx,1)
lea    0xdbf(%rip),%rdi
lea    0x10(%rsp),%rsi
lea    0x8(%rsp),%rdx
call   1060 <sscanf@plt>
xor    %ebx,%ebx
xor    %eax,%eax
call   1090 <clear_screen@plt>
xor    %eax,%eax
call   1070 <coordinates@plt>
cmpl   $0x0,0xc(%rsp)
je     12d0 <main+0x160>
cvtsi2ssl 0x8(%rsp),%xmm0
movss  0xd87(%rip),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%esi
mov    $0x80,%edi
call   1080 <draw_pixel@plt>
mov    $0x81,%ebx
lea    -0x80(%rbx),%eax
imul   0xc(%rsp),%eax
add    0x8(%rsp),%eax
xorps  %xmm0,%xmm0
cvtsi2ss %eax,%xmm0
movss  0xd55(%rip),%xmm1
subss  %xmm0,%xmm1
cvttss2si %xmm1,%esi
mov    %ebx,%edi
call   1080 <draw_pixel@plt>
add    $0x1,%ebx
cmp    $0x400,%ebx
jne    1290 <main+0x120>
jmp    12eb <main+0x17b>
nopw   0x0(%rax,%rax,1)
mov    $0x180,%esi
sub    0x8(%rsp),%esi
mov    %ebx,%edi
call   1080 <draw_pixel@plt>
add    $0x1,%ebx
cmp    $0x400,%ebx
jne    12d0 <main+0x160>
xor    %eax,%eax
add    $0xfb0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"f(x) = ax + b\0A\00"
@.str.1 = [24 x i8] c"Ingresar valor de 'a':\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [3 x i8] c"%d\00"
@.str.4 = [24 x i8] c"Ingresar valor de 'b':\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca i32
%13 = alloca i32
%14 = alloca [2000 x i8]
%15 = alloca [2000 x i8]
%16 = alloca i32
%17 = alloca i8
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i32 0, i32* %1
%23 = call i32 (...) @clear_screen()
%24 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%25 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %58, %0
%27 = load i32, i32* %18
%28 = icmp ne i32 %27, 2
br i1 %28, label %29, label %59
29: ; preds = %26
%30 = call signext i8 (...) @getchar()
store i8 %30, i8* %17
%31 = sext i8 %30 to i32
%32 = icmp ne i32 %31, -1
br i1 %32, label %33, label %58
33: ; preds = %29
%34 = load i8, i8* %17
%35 = sext i8 %34 to i32
%36 = icmp eq i32 %35, 10
br i1 %36, label %37, label %41
37: ; preds = %33
%38 = load i32, i32* %16
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds [2000 x i8], [2000 x i8]* %14, i64 0, i64 %39
store i8 0, i8* %40
store i32 2, i32* %18
br label %57
41: ; preds = %33
%42 = load i8, i8* %17
%43 = load i32, i32* %16
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [2000 x i8], [2000 x i8]* %14, i64 0, i64 %44
store i8 %42, i8* %45
%46 = load i32, i32* %16
%47 = add nsw i32 %46, 1
store i32 %47, i32* %16
%48 = load i32, i32* %16
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [2000 x i8], [2000 x i8]* %14, i64 0, i64 %49
store i8 0, i8* %50
%51 = load i32, i32* %16
%52 = sub nsw i32 %51, 1
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [2000 x i8], [2000 x i8]* %14, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = call i32 @putchar(i8 signext %55)
br label %57
57: ; preds = %41, %37
br label %58
58: ; preds = %57, %29
br label %26
59: ; preds = %26
%60 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%61 = getelementptr inbounds [2000 x i8], [2000 x i8]* %14, i64 0, i64 0
%62 = call i32 @sscanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %61, i32* %12)
store i32 0, i32* %18
%63 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %64
64: ; preds = %96, %59
%65 = load i32, i32* %18
%66 = icmp ne i32 %65, 2
br i1 %66, label %67, label %97
67: ; preds = %64
%68 = call signext i8 (...) @getchar()
store i8 %68, i8* %17
%69 = sext i8 %68 to i32
%70 = icmp ne i32 %69, -1
br i1 %70, label %71, label %96
71: ; preds = %67
%72 = load i8, i8* %17
%73 = sext i8 %72 to i32
%74 = icmp eq i32 %73, 10
br i1 %74, label %75, label %79
75: ; preds = %71
%76 = load i32, i32* %19
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds [2000 x i8], [2000 x i8]* %15, i64 0, i64 %77
store i8 0, i8* %78
store i32 2, i32* %18
br label %95
79: ; preds = %71
%80 = load i8, i8* %17
%81 = load i32, i32* %19
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [2000 x i8], [2000 x i8]* %15, i64 0, i64 %82
store i8 %80, i8* %83
%84 = load i32, i32* %19
%85 = add nsw i32 %84, 1
store i32 %85, i32* %19
%86 = load i32, i32* %19
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [2000 x i8], [2000 x i8]* %15, i64 0, i64 %87
store i8 0, i8* %88
%89 = load i32, i32* %19
%90 = sub nsw i32 %89, 1
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [2000 x i8], [2000 x i8]* %15, i64 0, i64 %91
%93 = load i8, i8* %92
%94 = call i32 @putchar(i8 signext %93)
br label %95
95: ; preds = %79, %75
br label %96
96: ; preds = %95, %67
br label %64
97: ; preds = %64
%98 = getelementptr inbounds [2000 x i8], [2000 x i8]* %15, i64 0, i64 0
%99 = call i32 @sscanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %98, i32* %13)
%100 = call i32 (...) @clear_screen()
%101 = call i32 (...) @coordinates()
%102 = load float, float* %6
%103 = load float, float* %7
%104 = fcmp ogt float %102, %103
br i1 %104, label %105, label %110
105: ; preds = %97
%106 = load float, float* %7
store float %106, float* %10
%107 = load float, float* %9
store float %107, float* %11
%108 = load float, float* %6
%109 = fptosi float %108 to i32
store i32 %109, i32* %5
br label %115
110: ; preds = %97
%111 = load float, float* %6
store float %111, float* %10
%112 = load float, float* %8
store float %112, float* %11
%113 = load float, float* %7
%114 = fptosi float %113 to i32
store i32 %114, i32* %5
br label %115
115: ; preds = %110, %105
%116 = load i32, i32* %12
%117 = icmp eq i32 %116, 0
br i1 %117, label %118, label %132
118: ; preds = %115
store i32 0, i32* %20
br label %119
119: ; preds = %128, %118
%120 = load i32, i32* %20
%121 = icmp slt i32 %120, 1024
br i1 %121, label %122, label %131
122: ; preds = %119
%123 = load i32, i32* %20
%124 = load i32, i32* %13
%125 = sub nsw i32 768, %124
%126 = sub nsw i32 %125, 384
%127 = call i32 @draw_pixel(i32 %123, i32 %126)
br label %128
128: ; preds = %122
%129 = load i32, i32* %20
%130 = add nsw i32 %129, 1
store i32 %130, i32* %20
br label %119
131: ; preds = %119
br label %153
132: ; preds = %115
store i32 0, i32* %21
br label %133
133: ; preds = %149, %132
%134 = load i32, i32* %21
%135 = icmp slt i32 %134, 896
br i1 %135, label %136, label %152
136: ; preds = %133
%137 = load i32, i32* %12
%138 = load i32, i32* %21
%139 = mul nsw i32 %137, %138
%140 = load i32, i32* %13
%141 = add nsw i32 %139, %140
%142 = sitofp i32 %141 to float
store float %142, float* %11
%143 = load i32, i32* %21
%144 = add nsw i32 %143, 128
%145 = load float, float* %11
%146 = fsub float 7.680000e+02, %145
%147 = fptosi float %146 to i32
%148 = call i32 @draw_pixel(i32 %144, i32 %147)
br label %149
149: ; preds = %136
%150 = load i32, i32* %21
%151 = add nsw i32 %150, 1
store i32 %151, i32* %21
br label %133
152: ; preds = %133
br label %153
153: ; preds = %152, %131
store i32 0, i32* %22
br label %154
154: ; preds = %157, %153
%155 = load i32, i32* %22
%156 = icmp slt i32 %155, 50000000
br i1 %156, label %157, label %160
157: ; preds = %154
%158 = load i32, i32* %22
%159 = add nsw i32 %158, 1
store i32 %159, i32* %22
br label %154
160: ; preds = %154
ret i32 0
}

LLVM IR (-O2):
@.str.3 = [3 x i8] c"%d\00"
@str = [14 x i8] c"f(x) = ax + b\00"
@str.5 = [23 x i8] c"Ingresar valor de 'a':\00"
@str.6 = [23 x i8] c"Ingresar valor de 'b':\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [2000 x i8]
%4 = alloca [2000 x i8]
%5 = tail call i32 (...) @clear_screen()
%6 = bitcast i32* %1 to i8*
%7 = bitcast i32* %2 to i8*
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.5, i64 0, i64 0))
%10 = getelementptr inbounds [2000 x i8], [2000 x i8]* %3, i64 0, i64 0
%11 = getelementptr inbounds [2000 x i8], [2000 x i8]* %4, i64 0, i64 0
br label %12
12: ; preds = %16, %0
%13 = phi i32 [ %19, %16 ], [ undef, %0 ]
br label %14
14: ; preds = %12, %14
%15 = tail call signext i8 (...) @getchar()
switch i8 %15, label %16 [
i8 -1, label %14
i8 10, label %23
]
16: ; preds = %14
%17 = sext i32 %13 to i64
%18 = getelementptr inbounds [2000 x i8], [2000 x i8]* %3, i64 0, i64 %17
store i8 %15, i8* %18
%19 = add nsw i32 %13, 1
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds [2000 x i8], [2000 x i8]* %3, i64 0, i64 %20
store i8 0, i8* %21
%22 = tail call i32 @putchar(i8 signext %15)
br label %12
23: ; preds = %14
%24 = sext i32 %13 to i64
%25 = getelementptr inbounds [2000 x i8], [2000 x i8]* %3, i64 0, i64 %24
store i8 0, i8* %25
%26 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 10)
%27 = call i32 @sscanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %10, i32* %1)
%28 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.6, i64 0, i64 0))
br label %29
29: ; preds = %33, %23
%30 = phi i32 [ %36, %33 ], [ undef, %23 ]
br label %31
31: ; preds = %29, %31
%32 = call signext i8 (...) @getchar()
switch i8 %32, label %33 [
i8 -1, label %31
i8 10, label %40
]
33: ; preds = %31
%34 = sext i32 %30 to i64
%35 = getelementptr inbounds [2000 x i8], [2000 x i8]* %4, i64 0, i64 %34
store i8 %32, i8* %35
%36 = add nsw i32 %30, 1
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds [2000 x i8], [2000 x i8]* %4, i64 0, i64 %37
store i8 0, i8* %38
%39 = call i32 @putchar(i8 signext %32)
br label %29
40: ; preds = %31
%41 = sext i32 %30 to i64
%42 = getelementptr inbounds [2000 x i8], [2000 x i8]* %4, i64 0, i64 %41
store i8 0, i8* %42
%43 = call i32 @sscanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %11, i32* %2)
%44 = call i32 (...) @clear_screen()
%45 = call i32 (...) @coordinates()
%46 = load i32, i32* %1
%47 = icmp eq i32 %46, 0
br i1 %47, label %54, label %48
48: ; preds = %40
%49 = load i32, i32* %2
%50 = sitofp i32 %49 to float
%51 = fsub float 7.680000e+02, %50
%52 = fptosi float %51 to i32
%53 = call i32 @draw_pixel(i32 128, i32 %52)
br label %61
54: ; preds = %40, %54
%55 = phi i32 [ %59, %54 ], [ 0, %40 ]
%56 = load i32, i32* %2
%57 = sub i32 384, %56
%58 = call i32 @draw_pixel(i32 %55, i32 %57)
%59 = add nuw nsw i32 %55, 1
%60 = icmp eq i32 %59, 1024
br i1 %60, label %74, label %54
61: ; preds = %48, %61
%62 = phi i32 [ 1, %48 ], [ %72, %61 ]
%63 = load i32, i32* %1
%64 = mul nsw i32 %63, %62
%65 = load i32, i32* %2
%66 = add nsw i32 %64, %65
%67 = sitofp i32 %66 to float
%68 = add nuw nsw i32 %62, 128
%69 = fsub float 7.680000e+02, %67
%70 = fptosi float %69 to i32
%71 = call i32 @draw_pixel(i32 %68, i32 %70)
%72 = add nuw nsw i32 %62, 1
%73 = icmp eq i32 %72, 896
br i1 %73, label %74, label %61
74: ; preds = %61, %54
ret i32 0
}