#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 *, ...);
void main() {
  int i = 5;
  int x = 5, *p = &i;
  int y;
  char *s = "abcdefgh|   //hijklmn";
  printf("i=%d\n", i);
  printf("s=%s\n", s);
  int replacement, list;
  replacement = 1, list = 2;
  printf("\nreplacement=%d,list=%d", replacement, list);
  printf("\ny = x/*p %d %d", i / (*p), i / *p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x5,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    -0x4(%rbp),%esi
lea    0xed3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x20(%rbp),%rsi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x24(%rbp),%esi
mov    -0x28(%rbp),%edx
lea    0xeab(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cltd
idivl  (%rcx)
mov    %eax,%esi
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
cltd
idivl  (%rcx)
mov    %eax,%edx
lea    0xe9d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xefe(%rip),%rdi
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
lea    0xece(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
xor    %eax,%eax
pop    %rcx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"abcdefgh| //hijklmn\00"
@.str.1 = [6 x i8] c"i=%d\0A\00"
@.str.2 = [6 x i8] c"s=%s\0A\00"
@.str.3 = [24 x i8] c"\0Areplacement=%d,list=%d\00"
@.str.4 = [16 x i8] c"\0Ay = x/*p %d %d\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 5, i32* %1
store i32 5, i32* %2
store i32* %1, i32** %3
store i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8** %5
%8 = load i32, i32* %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %5
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %10)
store i32 1, i32* %6
store i32 2, i32* %7
%12 = load i32, i32* %6
%13 = load i32, i32* %7
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 %12, i32 %13)
%15 = load i32, i32* %1
%16 = load i32*, i32** %3
%17 = load i32, i32* %16
%18 = sdiv i32 %15, %17
%19 = load i32, i32* %1
%20 = load i32*, i32** %3
%21 = load i32, i32* %20
%22 = sdiv i32 %19, %21
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 %18, i32 %22)
ret void
}

LLVM IR (-O2):
@.str = [22 x i8] c"abcdefgh| //hijklmn\00"
@.str.1 = [6 x i8] c"i=%d\0A\00"
@.str.2 = [6 x i8] c"s=%s\0A\00"
@.str.3 = [24 x i8] c"\0Areplacement=%d,list=%d\00"
@.str.4 = [16 x i8] c"\0Ay = x/*p %d %d\00"
define void @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i32 1, i32 2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.4, i64 0, i64 0), i32 1, i32 1)
ret void
}