#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 */
typedef int /*<<< orphan*/ tmp;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strcmp(char *, char *);
int main() {
  char tmp[sizeof("a string literal for testing.")] =
      "a string literal for testing.";
  if (strcmp("a string literal for testing.", tmp)) {
    printf("Error %d\n", (int)1);
    exit(1);
  };
  if (sizeof(tmp) != 30) {
    printf("Error %d\n", (int)2);
    exit(2);
  };
  if (tmp[10] != ("a string literal for testing.")[10]) {
    printf("Error %d\n", (int)3);
    exit(3);
  };
  if (sizeof("Hello, world.") != 14) {
    printf("Error %d\n", (int)4);
    exit(4);
  };
  if (sizeof((char *)"Hello, world.") != sizeof(void *)) {
    printf("Error %d\n", (int)5);
    exit(5);
  };
  printf("%d\n", sizeof("ertewrtert"));
  {
    printf("Success\n");
    exit(0);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeba(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb2(%rip),%eax
mov    %eax,-0x18(%rbp)
mov    0xeac(%rip),%ax
mov    %ax,-0x14(%rbp)
lea    -0x30(%rbp),%rsi
lea    0xe9f(%rip),%rdi
call   1040 <strcmp@plt>
cmp    $0x0,%rax
je     11ab <main+0x7b>
lea    0xea7(%rip),%rdi
mov    $0x1,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
movsbl -0x26(%rbp),%eax
movsbl 0xe72(%rip),%ecx
cmp    %ecx,%eax
je     11db <main+0xab>
lea    0xe77(%rip),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x3,%edi
call   1050 <exit@plt>
lea    0xe60(%rip),%rdi
mov    $0xb,%esi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
movups 0xec3(%rip),%xmm0
movups %xmm0,0xe(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
lea    0xe9e(%rip),%rdi
mov    %rsp,%rsi
call   1050 <strcmp@plt>
test   %rax,%rax
jne    119c <main+0x5c>
cmpb   $0x69,0xa(%rsp)
jne    11b9 <main+0x79>
lea    0xea7(%rip),%rdi
mov    $0xb,%esi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe98(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xe7b(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
lea    0xe5e(%rip),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x3,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@__const.main.tmp = [30 x i8] c"a string literal for testing.\00"
@.str = [30 x i8] c"a string literal for testing.\00"
@.str.1 = [10 x i8] c"Error %d\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@.str.3 = [9 x i8] c"Success\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [30 x i8]
store i32 0, i32* %1
%3 = bitcast [30 x i8]* %2 to i8*
%4 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 0
%5 = call i64 @strcmp(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1)
%9 = call i32 @exit(i32 1)
unreachable
10: ; preds = %0
%11 = getelementptr inbounds [30 x i8], [30 x i8]* %2, i64 0, i64 10
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i8, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 10)
%15 = sext i8 %14 to i32
%16 = icmp ne i32 %13, %15
br i1 %16, label %17, label %20
17: ; preds = %10
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 3)
%19 = call i32 @exit(i32 3)
unreachable
20: ; preds = %10
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 11)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%23 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [30 x i8] c"a string literal for testing.\00"
@.str.1 = [10 x i8] c"Error %d\0A\00"
@.str.2 = [4 x i8] c"%d\0A\00"
@str = [8 x i8] c"Success\00"
define i32 @main() {
%1 = alloca [30 x i8]
%2 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 0
%3 = call i64 @strcmp(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 1)
%7 = call i32 @exit(i32 1)
unreachable
8: ; preds = %0
%9 = getelementptr inbounds [30 x i8], [30 x i8]* %1, i64 0, i64 10
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 105
br i1 %11, label %15, label %12
12: ; preds = %8
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 3)
%14 = call i32 @exit(i32 3)
unreachable
15: ; preds = %8
%16 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 11)
%17 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
%18 = call i32 @exit(i32 0)
unreachable
}