#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*/ printf(char *, int, int);
int main() {
  int i, j;
  int sum;
  for (i = 1; i < 50; i++)
    for (j = 1; j < 50; j++) {
      sum = 23 * i + 19 * j;
      if (sum == 823 && i < j) {
        printf("i = %d,j = %d\n", i, j);
      }
    }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x32,-0x8(%rbp)
jge    119f <main+0x8f>
movl   $0x1,-0xc(%rbp)
cmpl   $0x32,-0xc(%rbp)
jge    118c <main+0x7c>
imul   $0x17,-0x8(%rbp),%eax
imul   $0x13,-0xc(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
cmpl   $0x337,-0x10(%rbp)
jne    1179 <main+0x69>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1179 <main+0x69>
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
jmp    117e <main+0x6e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <main+0x27>
jmp    1191 <main+0x81>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    $0x1,%r12d
mov    $0x30d,%r15d
lea    0xed5(%rip),%r14
jmp    113e <main+0x2e>
nopl   (%rax)
add    $0x1,%r12d
add    $0xffffffe9,%r15d
cmp    $0x32,%r12d
je     1173 <main+0x63>
mov    %r15d,%ebx
mov    $0x1,%ebp
jmp    115b <main+0x4b>
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
add    $0xffffffed,%ebx
cmp    $0x32,%ebp
je     1130 <main+0x20>
test   %ebx,%ebx
jne    1150 <main+0x40>
cmp    %ebp,%r12d
jae    1150 <main+0x40>
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebp,%edx
call   1030 <printf@plt>
jmp    1150 <main+0x40>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [15 x i8] c"i = %d,j = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %5
5: ; preds = %33, %0
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 50
br i1 %7, label %8, label %36
8: ; preds = %5
store i32 1, i32* %3
br label %9
9: ; preds = %29, %8
%10 = load i32, i32* %3
%11 = icmp slt i32 %10, 50
br i1 %11, label %12, label %32
12: ; preds = %9
%13 = load i32, i32* %2
%14 = mul nsw i32 23, %13
%15 = load i32, i32* %3
%16 = mul nsw i32 19, %15
%17 = add nsw i32 %14, %16
store i32 %17, i32* %4
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 823
br i1 %19, label %20, label %28
20: ; preds = %12
%21 = load i32, i32* %2
%22 = load i32, i32* %3
%23 = icmp slt i32 %21, %22
br i1 %23, label %24, label %28
24: ; preds = %20
%25 = load i32, i32* %2
%26 = load i32, i32* %3
%27 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %25, i32 %26)
br label %28
28: ; preds = %24, %20, %12
br label %29
29: ; preds = %28
%30 = load i32, i32* %3
%31 = add nsw i32 %30, 1
store i32 %31, i32* %3
br label %9
32: ; preds = %9
br label %33
33: ; preds = %32
%34 = load i32, i32* %2
%35 = add nsw i32 %34, 1
store i32 %35, i32* %2
br label %5
36: ; preds = %5
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"i = %d,j = %d\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %16
%2 = phi i32 [ 1, %0 ], [ %17, %16 ]
%3 = mul nuw nsw i32 %2, 23
br label %4
4: ; preds = %1, %13
%5 = phi i32 [ 1, %1 ], [ %14, %13 ]
%6 = mul nuw nsw i32 %5, 19
%7 = add nuw nsw i32 %6, %3
%8 = icmp eq i32 %7, 823
%9 = icmp ult i32 %2, %5
%10 = select i1 %8, i1 %9, i1 false
br i1 %10, label %11, label %13
11: ; preds = %4
%12 = tail call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %5)
br label %13
13: ; preds = %4, %11
%14 = add nuw nsw i32 %5, 1
%15 = icmp eq i32 %14, 50
br i1 %15, label %16, label %4
16: ; preds = %13
%17 = add nuw nsw i32 %2, 1
%18 = icmp eq i32 %17, 50
br i1 %18, label %19, label %1
19: ; preds = %16
ret i32 0
}