#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*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ init();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stdout;
scalar_t__ testSubsystem(int, char *);
int main(int argc, char *argv[]) {
  init();
  {
    if (testSubsystem(5, "SYSA")) {
      printf("%s @ %u : ",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/alexhilton/miscellaneous/refs/heads/"
             "master/linux/linux-prog-24-codes/debug.c",
             93);
      printf("argv[0]='%s'\n", argv[0]);
      fflush(stdout);
    }
  };
  printf("Program debug.c\n");
  {
    if (testSubsystem(3, "SYSB")) {
      printf("%s @ %u : ",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/alexhilton/miscellaneous/refs/heads/"
             "master/linux/linux-prog-24-codes/debug.c",
             95);
      printf("argc=%d\n", argc);
      fflush(stdout);
    }
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
mov    $0x5,%edi
lea    0xe97(%rip),%rsi
call   1030 <testSubsystem@plt>
cmp    $0x0,%rax
je     11b5 <main+0x75>
lea    0xe86(%rip),%rdi
lea    0xe8a(%rip),%rsi
mov    $0x5d,%edx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xf17(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2e32(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
lea    0xf09(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x3,%edi
lea    0xf07(%rip),%rsi
call   1030 <testSubsystem@plt>
cmp    $0x0,%rax
je     1217 <main+0xd7>
lea    0xe20(%rip),%rdi
lea    0xe24(%rip),%rsi
mov    $0x5f,%edx
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%esi
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1060 <init@plt>
lea    0xe9a(%rip),%rsi
mov    $0x5,%edi
call   1040 <testSubsystem@plt>
test   %rax,%rax
je     11ae <main+0x5e>
lea    0xe89(%rip),%rdi
lea    0xe8d(%rip),%rsi
mov    $0x5d,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%rbx),%rsi
lea    0xf1e(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2e39(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
lea    0xf04(%rip),%rsi
mov    $0x3,%edi
call   1040 <testSubsystem@plt>
test   %rax,%rax
je     1208 <main+0xb8>
lea    0xe2e(%rip),%rdi
lea    0xe32(%rip),%rsi
mov    $0x5f,%edx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed9(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
call   1070 <fflush@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"SYSA\00"
@.str.1 = [11 x i8] c"%s @ %u : \00"
@.str.2 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/alexhilton/miscellaneous/refs/heads/master/linux/linux-prog-24-codes/debug.c\00"
@.str.3 = [14 x i8] c"argv[0]='%s'\0A\00"
@stdout = global i32 0
@.str.4 = [17 x i8] c"Program debug.c\0A\00"
@.str.5 = [5 x i8] c"SYSB\00"
@.str.6 = [9 x i8] c"argc=%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @init()
%7 = call i64 @testSubsystem(i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %17
9: ; preds = %2
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0), i32 93)
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %13)
%15 = load i32, i32* @stdout
%16 = call i32 @fflush(i32 %15)
br label %17
17: ; preds = %9, %2
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.4, i64 0, i64 0))
%19 = call i64 @testSubsystem(i32 3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %27
21: ; preds = %17
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0), i32 95)
%23 = load i32, i32* %4
%24 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %23)
%25 = load i32, i32* @stdout
%26 = call i32 @fflush(i32 %25)
br label %27
27: ; preds = %21, %17
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"SYSA\00"
@.str.1 = [11 x i8] c"%s @ %u : \00"
@.str.2 = [167 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/alexhilton/miscellaneous/refs/heads/master/linux/linux-prog-24-codes/debug.c\00"
@.str.3 = [14 x i8] c"argv[0]='%s'\0A\00"
@stdout = global i32 0
@.str.5 = [5 x i8] c"SYSB\00"
@.str.6 = [9 x i8] c"argc=%d\0A\00"
@str = [16 x i8] c"Program debug.c\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = tail call i32 (...) @init()
%4 = tail call i64 @testSubsystem(i32 5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
br i1 %5, label %12, label %6
6: ; preds = %2
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0), i32 93)
%8 = load i8*, i8** %1
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %8)
%10 = load i32, i32* @stdout
%11 = tail call i32 @fflush(i32 %10)
br label %12
12: ; preds = %6, %2
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%14 = tail call i64 @testSubsystem(i32 3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %21, label %16
16: ; preds = %12
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([167 x i8], [167 x i8]* @.str.2, i64 0, i64 0), i32 95)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0), i32 %0)
%19 = load i32, i32* @stdout
%20 = tail call i32 @fflush(i32 %19)
br label %21
21: ; preds = %16, %12
ret i32 0
}