#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*/ timeSizes;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  const int timeSizes[5] = {604800, 86400, 3600, 60, 1};
  const char *timeNames[16] = {"uge", "dag", "time", "minut", "sekund"};
  const char *timeNamesPlural[16] = {"uger", "dage", "timer", "minutter",
                                     "sekunder"};
  int i = 0;
  int timeUnitCount = sizeof(timeSizes) / sizeof(int);
  int input;
  printf("Indtast et antal %s.\n", timeNamesPlural[timeUnitCount - 1]);
  scanf("%d", &input);
  if (input < 0) {
    printf("Godkender ikke negative tal.\n");
    return EXIT_SUCCESS;
  }
  int leftover = input;
  int values[timeUnitCount];
  for (i = 0; i < timeUnitCount; i++) {
    values[i] = leftover / timeSizes[i];
    leftover %= timeSizes[i];
  }
  int relevantUnits = 0;
  for (i = 0; i < timeUnitCount; i++) {
    if (values[i] != 0)
      relevantUnits++;
  }
  printf("%d %s svarer til: ", input,
         (input == 1) ? timeNames[timeUnitCount - 1]
                      : timeNamesPlural[timeUnitCount - 1]);
  if (relevantUnits == 0) {
    printf("ingenting.\n");
  } else {
    for (i = 0; i < timeUnitCount; i++) {
      if (values[i] > 0) {
        printf("%d %s%s", values[i],
               (values[i] > 1) ? timeNamesPlural[i] : timeNames[i],
               (relevantUnits == 1)   ? "\n"
               : (relevantUnits == 2) ? " og "
                                      : ", ");
        relevantUnits--;
      }
    }
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeb7(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xeb4(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeb2(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0xa0(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    0xe99(%rip),%rax
mov    %rax,-0xa0(%rbp)
lea    0xe8f(%rip),%rax
mov    %rax,-0x98(%rbp)
lea    0xe85(%rip),%rax
mov    %rax,-0x90(%rbp)
lea    0xe7c(%rip),%rax
mov    %rax,-0x88(%rbp)
lea    0xe74(%rip),%rax
mov    %rax,-0x80(%rbp)
lea    -0x120(%rbp),%rdi
xor    %esi,%esi
mov    $0x80,%edx
call   1040 <memset@plt>
lea    0xe5d(%rip),%rax
mov    %rax,-0x120(%rbp)
lea    0xe54(%rip),%rax
mov    %rax,-0x118(%rbp)
lea    0xe4b(%rip),%rax
mov    %rax,-0x110(%rbp)
lea    0xe43(%rip),%rax
mov    %rax,-0x108(%rbp)
lea    0xe3e(%rip),%rax
mov    %rax,-0x100(%rbp)
movl   $0x0,-0x124(%rbp)
movl   $0x5,-0x128(%rbp)
mov    -0x128(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x120(%rbp,%rax,8),%rsi
ff
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe1a(%rip),%rdi
lea    -0x12c(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x12c(%rbp)
jge    1284 <main+0x154>
lea    0xdfd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2d66(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1567 <main+0x437>
mov    -0x12c(%rbp),%eax
mov    %eax,-0x130(%rbp)
mov    -0x128(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x138(%rbp)
lea    0xf(,%rax,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x150(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x140(%rbp)
movl   $0x0,-0x124(%rbp)
mov    -0x124(%rbp),%eax
cmp    -0x128(%rbp),%eax
jge    1332 <main+0x202>
mov    -0x130(%rbp),%eax
movslq -0x124(%rbp),%rcx
cltd
idivl  -0x20(%rbp,%rcx,4)
mov    %eax,%edx
mov    -0x150(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
movslq -0x124(%rbp),%rax
mov    -0x20(%rbp,%rax,4),%ecx
mov    -0x130(%rbp),%eax
cltd
idiv   %ecx
mov    %edx,-0x130(%rbp)
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    12cd <main+0x19d>
movl   $0x0,-0x144(%rbp)
movl   $0x0,-0x124(%rbp)
mov    -0x124(%rbp),%eax
cmp    -0x128(%rbp),%eax
jge    1398 <main+0x268>
mov    -0x150(%rbp),%rax
movslq -0x124(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
je     137f <main+0x24f>
mov    -0x144(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x144(%rbp)
jmp    1384 <main+0x254>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    1346 <main+0x216>
mov    -0x12c(%rbp),%eax
mov    %eax,-0x154(%rbp)
cmpl   $0x1,-0x12c(%rbp)
jne    13d0 <main+0x2a0>
mov    -0x128(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0xa0(%rbp,%rax,8),%rax
ff
mov    %rax,-0x160(%rbp)
jmp    13ea <main+0x2ba>
mov    -0x128(%rbp),%eax
sub    $0x1,%eax
cltq
mov    -0x120(%rbp,%rax,8),%rax
ff
mov    %rax,-0x160(%rbp)
mov    -0x154(%rbp),%esi
mov    -0x160(%rbp),%rdx
lea    0xc89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpl   $0x0,-0x144(%rbp)
jne    1425 <main+0x2f5>
lea    0xc81(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1551 <main+0x421>
movl   $0x0,-0x124(%rbp)
mov    -0x124(%rbp),%eax
cmp    -0x128(%rbp),%eax
jge    154c <main+0x41c>
mov    -0x150(%rbp),%rax
movslq -0x124(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1533 <main+0x403>
mov    -0x150(%rbp),%rax
movslq -0x124(%rbp),%rcx
mov    (%rax,%rcx,4),%ecx
mov    %ecx,-0x164(%rbp)
movslq -0x124(%rbp),%rcx
cmpl   $0x1,(%rax,%rcx,4)
jle    149c <main+0x36c>
movslq -0x124(%rbp),%rax
mov    -0x120(%rbp,%rax,8),%rax
ff
mov    %rax,-0x170(%rbp)
jmp    14b2 <main+0x382>
movslq -0x124(%rbp),%rax
mov    -0xa0(%rbp,%rax,8),%rax
ff
mov    %rax,-0x170(%rbp)
mov    -0x170(%rbp),%rax
mov    %rax,-0x178(%rbp)
cmpl   $0x1,-0x144(%rbp)
jne    14e0 <main+0x3b0>
lea    0xbd0(%rip),%rax
mov    %rax,-0x180(%rbp)
jmp    1502 <main+0x3d2>
mov    -0x144(%rbp),%edx
lea    0xbc6(%rip),%rax
lea    0xbba(%rip),%rcx
cmp    $0x2,%edx
cmove  %rcx,%rax
mov    %rax,-0x180(%rbp)
mov    -0x178(%rbp),%rdx
mov    -0x164(%rbp),%esi
mov    -0x180(%rbp),%rcx
lea    0xb89(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x144(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x144(%rbp)
jmp    1538 <main+0x408>
mov    -0x124(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x124(%rbp)
jmp    142f <main+0x2ff>
jmp    1551 <main+0x421>
mov    0x2a88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x138(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
lea    0xef7(%rip),%rdi
lea    0xee7(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef5(%rip),%rdi
lea    0x10(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x10(%rsp),%r12d
test   %r12d,%r12d
js     143e <main+0x30e>
mov    %rsp,0x30(%rsp)
mov    %r12d,%eax
imul   $0x6ef5de4d,%rax,%rax
shr    $0x32,%rax
mov    %rax,0x20(%rsp)
imul   $0x93a80,%eax,%eax
mov    %r12d,%r13d
sub    %eax,%r13d
mov    $0xc22e4507,%ebp
imul   %r13,%rbp
shr    $0x30,%rbp
imul   $0x15180,%ebp,%ecx
mov    %r13d,%r15d
sub    %ecx,%r15d
mov    $0x91a2b3c5,%ecx
imul   %r15,%rcx
shr    $0x2b,%rcx
mov    %rcx,0x28(%rsp)
imul   $0xe10,%ecx,%ecx
mov    %r15d,%esi
sub    %ecx,%esi
imul   $0x8889,%esi,%edx
shr    $0x15,%edx
mov    %edx,0x1c(%rsp)
imul   $0x3c,%edx,%edx
mov    %esi,0x8(%rsp)
sub    %edx,%esi
lea    -0x93a80(%r12),%edi
ff
mov    %rbx,%rdx
xor    %ebx,%ebx
mov    %edi,0x14(%rsp)
cmp    $0xffed8b01,%edi
setb   %bl
neg    %eax
add    %r12d,%eax
add    $0xfffeae80,%eax
cmp    $0xfffd5d01,%eax
adc    $0x0,%ebx
lea    -0xe10(%r15),%eax
mov    %eax,0x18(%rsp)
cmp    $0xffffe3e1,%eax
adc    $0x0,%ebx
neg    %ecx
lea    (%r15,%rcx,1),%eax
add    $0xffffffc4,%eax
cmp    $0xffffff89,%eax
adc    $0x0,%ebx
xor    %r14d,%r14d
mov    %esi,0xc(%rsp)
test   %si,%si
setne  %r14b
mov    0x10(%rsp),%esi
cmp    $0x1,%esi
lea    0xdc4(%rip),%rax
cmove  %rax,%rdx
lea    0xdfb(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    %ebx,%r14d
je     1455 <main+0x325>
cmp    $0x93a7f,%r12d
jbe    12c9 <main+0x199>
cmpl   $0x93a80,0x14(%rsp)
lea    0xd7e(%rip),%rax
lea    0xd91(%rip),%rdx
cmovb  %rax,%rdx
cmp    $0x2,%r14d
lea    0xdd8(%rip),%rax
lea    0xdd6(%rip),%rsi
cmove  %rax,%rsi
cmp    $0x1,%r14d
lea    0xda2(%rip),%rcx
cmovne %rsi,%rcx
lea    0xdaf(%rip),%rdi
mov    0x20(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%r14d
cmp    $0x15180,%r13d
jb     132b <main+0x1fb>
add    $0xfffeae80,%r13d
cmp    $0x15180,%r13d
lea    0xd1d(%rip),%rax
lea    0xd31(%rip),%rdx
cmovb  %rax,%rdx
cmp    $0x2,%r14d
lea    0xd73(%rip),%rax
lea    0xd71(%rip),%rsi
cmove  %rax,%rsi
cmp    $0x1,%r14d
lea    0xd3d(%rip),%rcx
cmovne %rsi,%rcx
lea    0xd4a(%rip),%rdi
mov    %ebp,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%r14d
mov    0xc(%rsp),%ebp
cmp    $0xe10,%r15d
jb     138e <main+0x25e>
cmpl   $0xe10,0x18(%rsp)
lea    0xcc1(%rip),%rax
lea    0xcd6(%rip),%rdx
cmovb  %rax,%rdx
cmp    $0x2,%r14d
lea    0xd13(%rip),%rax
lea    0xd11(%rip),%rsi
cmove  %rax,%rsi
cmp    $0x1,%r14d
lea    0xcdd(%rip),%rcx
cmovne %rsi,%rcx
lea    0xcea(%rip),%rdi
mov    0x28(%rsp),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%r14d
mov    0x8(%rsp),%eax
movzwl %bp,%ebx
cmp    $0x3c,%eax
jb     13ed <main+0x2bd>
add    $0xffffffc4,%eax
cmp    $0x3c,%eax
lea    0xc66(%rip),%rax
lea    0xc7c(%rip),%rdx
cmovb  %rax,%rdx
cmp    $0x2,%r14d
lea    0xcb3(%rip),%rax
lea    0xcb1(%rip),%rsi
cmove  %rax,%rsi
cmp    $0x1,%r14d
lea    0xc7d(%rip),%rcx
cmovne %rsi,%rcx
lea    0xc8a(%rip),%rdi
mov    0x1c(%rsp),%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0xffffffff,%r14d
test   %ebx,%ebx
je     1461 <main+0x331>
cmp    $0x1,%bp
lea    0xc37(%rip),%rdx
lea    0xc10(%rip),%rax
cmove  %rax,%rdx
cmp    $0x2,%r14d
lea    0xc5e(%rip),%rax
lea    0xc5c(%rip),%rsi
cmove  %rax,%rsi
cmp    $0x1,%r14d
lea    0xc28(%rip),%rcx
cmovne %rsi,%rcx
lea    0xc35(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    1461 <main+0x331>
lea    0xc3e(%rip),%rdi
call   1030 <puts@plt>
mov    0x2b8f(%rip),%rax
mov    (%rax),%eax
jmp    146f <main+0x33f>
lea    0xc1c(%rip),%rdi
call   1030 <puts@plt>
mov    0x2b78(%rip),%rax
mov    (%rax),%eax
mov    0x30(%rsp),%rsp
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.timeSizes = [5 x i32] [i32 604800, i32 86400, i32 3600, i32 60, i32 1]
@.str = [4 x i8] c"uge\00"
@.str.1 = [4 x i8] c"dag\00"
@.str.2 = [5 x i8] c"time\00"
@.str.3 = [6 x i8] c"minut\00"
@.str.4 = [7 x i8] c"sekund\00"
@.str.5 = [5 x i8] c"uger\00"
@.str.6 = [5 x i8] c"dage\00"
@.str.7 = [6 x i8] c"timer\00"
@.str.8 = [9 x i8] c"minutter\00"
@.str.9 = [9 x i8] c"sekunder\00"
@.str.10 = [22 x i8] c"Indtast et antal %s.\0A\00"
@.str.11 = [3 x i8] c"%d\00"
@.str.12 = [30 x i8] c"Godkender ikke negative tal.\0A\00"
@EXIT_SUCCESS = global i32 0
@.str.13 = [19 x i8] c"%d %s svarer til: \00"
@.str.14 = [12 x i8] c"ingenting.\0A\00"
@.str.15 = [8 x i8] c"%d %s%s\00"
@.str.16 = [2 x i8] c"\0A\00"
@.str.17 = [5 x i8] c" og \00"
@.str.18 = [3 x i8] c", \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [5 x i32]
%3 = alloca [16 x i8*]
%4 = alloca [16 x i8*]
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i32
store i32 0, i32* %1
%12 = bitcast [5 x i32]* %2 to i8*
%13 = bitcast [16 x i8*]* %3 to i8*
%14 = bitcast i8* %13 to <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>*
%15 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %14, i32 0, i32 0
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0), i8** %15
%16 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %14, i32 0, i32 1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i32 0, i32 0), i8** %16
%17 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %14, i32 0, i32 2
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i32 0, i32 0), i8** %17
%18 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %14, i32 0, i32 3
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i32 0, i32 0), i8** %18
%19 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %14, i32 0, i32 4
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i32 0, i32 0), i8** %19
%20 = bitcast [16 x i8*]* %4 to i8*
%21 = bitcast i8* %20 to <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>*
%22 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %21, i32 0, i32 0
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i32 0, i32 0), i8** %22
%23 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %21, i32 0, i32 1
store i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0), i8** %23
%24 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %21, i32 0, i32 2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i32 0, i32 0), i8** %24
%25 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %21, i32 0, i32 3
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i32 0, i32 0), i8** %25
%26 = getelementptr inbounds <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>, <{ i8*, i8*, i8*, i8*, i8*, [11 x i8*] }>* %21, i32 0, i32 4
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i32 0, i32 0), i8** %26
store i32 0, i32* %5
store i32 5, i32* %6
%27 = load i32, i32* %6
%28 = sub nsw i32 %27, 1
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [16 x i8*], [16 x i8*]* %4, i64 0, i64 %29
%31 = load i8*, i8** %30
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8* %31)
%33 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %7)
%34 = load i32, i32* %7
%35 = icmp slt i32 %34, 0
br i1 %35, label %36, label %39
36: ; preds = %0
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0))
%38 = load i32, i32* @EXIT_SUCCESS
store i32 %38, i32* %1
br label %163
39: ; preds = %0
%40 = load i32, i32* %7
store i32 %40, i32* %8
%41 = load i32, i32* %6
%42 = zext i32 %41 to i64
%43 = call i8* @llvm.stacksave()
store i8* %43, i8** %9
%44 = alloca i32, i64 %42
store i64 %42, i64* %10
store i32 0, i32* %5
br label %45
45: ; preds = %65, %39
%46 = load i32, i32* %5
%47 = load i32, i32* %6
%48 = icmp slt i32 %46, %47
br i1 %48, label %49, label %68
49: ; preds = %45
%50 = load i32, i32* %8
%51 = load i32, i32* %5
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %52
%54 = load i32, i32* %53
%55 = sdiv i32 %50, %54
%56 = load i32, i32* %5
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %44, i64 %57
store i32 %55, i32* %58
%59 = load i32, i32* %5
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 %60
%62 = load i32, i32* %61
%63 = load i32, i32* %8
%64 = srem i32 %63, %62
store i32 %64, i32* %8
br label %65
65: ; preds = %49
%66 = load i32, i32* %5
%67 = add nsw i32 %66, 1
store i32 %67, i32* %5
br label %45
68: ; preds = %45
store i32 0, i32* %11
store i32 0, i32* %5
br label %69
69: ; preds = %83, %68
%70 = load i32, i32* %5
%71 = load i32, i32* %6
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %86
73: ; preds = %69
%74 = load i32, i32* %5
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32, i32* %44, i64 %75
%77 = load i32, i32* %76
%78 = icmp ne i32 %77, 0
br i1 %78, label %79, label %82
79: ; preds = %73
%80 = load i32, i32* %11
%81 = add nsw i32 %80, 1
store i32 %81, i32* %11
br label %82
82: ; preds = %79, %73
br label %83
83: ; preds = %82
%84 = load i32, i32* %5
%85 = add nsw i32 %84, 1
store i32 %85, i32* %5
br label %69
86: ; preds = %69
%87 = load i32, i32* %7
%88 = load i32, i32* %7
%89 = icmp eq i32 %88, 1
br i1 %89, label %90, label %96
90: ; preds = %86
%91 = load i32, i32* %6
%92 = sub nsw i32 %91, 1
%93 = sext i32 %92 to i64
%94 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 %93
%95 = load i8*, i8** %94
br label %102
96: ; preds = %86
%97 = load i32, i32* %6
%98 = sub nsw i32 %97, 1
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [16 x i8*], [16 x i8*]* %4, i64 0, i64 %99
%101 = load i8*, i8** %100
br label %102
102: ; preds = %96, %90
%103 = phi i8* [ %95, %90 ], [ %101, %96 ]
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32 %87, i8* %103)
%105 = load i32, i32* %11
%106 = icmp eq i32 %105, 0
br i1 %106, label %107, label %109
107: ; preds = %102
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.14, i64 0, i64 0))
br label %160
109: ; preds = %102
store i32 0, i32* %5
br label %110
110: ; preds = %156, %109
%111 = load i32, i32* %5
%112 = load i32, i32* %6
%113 = icmp slt i32 %111, %112
br i1 %113, label %114, label %159
114: ; preds = %110
%115 = load i32, i32* %5
%116 = sext i32 %115 to i64
%117 = getelementptr inbounds i32, i32* %44, i64 %116
%118 = load i32, i32* %117
%119 = icmp sgt i32 %118, 0
br i1 %119, label %120, label %155
120: ; preds = %114
%121 = load i32, i32* %5
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i32, i32* %44, i64 %122
%124 = load i32, i32* %123
%125 = load i32, i32* %5
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds i32, i32* %44, i64 %126
%128 = load i32, i32* %127
%129 = icmp sgt i32 %128, 1
br i1 %129, label %130, label %135
130: ; preds = %120
%131 = load i32, i32* %5
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [16 x i8*], [16 x i8*]* %4, i64 0, i64 %132
%134 = load i8*, i8** %133
br label %140
135: ; preds = %120
%136 = load i32, i32* %5
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds [16 x i8*], [16 x i8*]* %3, i64 0, i64 %137
%139 = load i8*, i8** %138
br label %140
140: ; preds = %135, %130
%141 = phi i8* [ %134, %130 ], [ %139, %135 ]
%142 = load i32, i32* %11
%143 = icmp eq i32 %142, 1
br i1 %143, label %144, label %145
144: ; preds = %140
br label %150
145: ; preds = %140
%146 = load i32, i32* %11
%147 = icmp eq i32 %146, 2
%148 = zext i1 %147 to i64
%149 = select i1 %147, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0)
br label %150
150: ; preds = %145, %144
%151 = phi i8* [ getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), %144 ], [ %149, %145 ]
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %124, i8* %141, i8* %151)
%153 = load i32, i32* %11
%154 = add nsw i32 %153, -1
store i32 %154, i32* %11
br label %155
155: ; preds = %150, %114
br label %156
156: ; preds = %155
%157 = load i32, i32* %5
%158 = add nsw i32 %157, 1
store i32 %158, i32* %5
br label %110
159: ; preds = %110
br label %160
160: ; preds = %159, %107
%161 = load i32, i32* @EXIT_SUCCESS
store i32 %161, i32* %1
%162 = load i8*, i8** %9
br label %163
163: ; preds = %160, %36
%164 = load i32, i32* %1
ret i32 %164
}

LLVM IR (-O2):
@.str = [4 x i8] c"uge\00"
@.str.1 = [4 x i8] c"dag\00"
@.str.2 = [5 x i8] c"time\00"
@.str.3 = [6 x i8] c"minut\00"
@.str.4 = [7 x i8] c"sekund\00"
@.str.5 = [5 x i8] c"uger\00"
@.str.6 = [5 x i8] c"dage\00"
@.str.7 = [6 x i8] c"timer\00"
@.str.8 = [9 x i8] c"minutter\00"
@.str.9 = [9 x i8] c"sekunder\00"
@.str.10 = [22 x i8] c"Indtast et antal %s.\0A\00"
@.str.11 = [3 x i8] c"%d\00"
@EXIT_SUCCESS = global i32 0
@.str.13 = [19 x i8] c"%d %s svarer til: \00"
@.str.15 = [8 x i8] c"%d %s%s\00"
@.str.16 = [2 x i8] c"\0A\00"
@.str.17 = [5 x i8] c" og \00"
@.str.18 = [3 x i8] c", \00"
@str = [11 x i8] c"ingenting.\00"
@str.19 = [29 x i8] c"Godkender ikke negative tal.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %0
%8 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str.19, i64 0, i64 0))
%9 = load i32, i32* @EXIT_SUCCESS
br label %113
10: ; preds = %0
%11 = call i8* @llvm.stacksave()
%12 = udiv i32 %5, 604800
%13 = urem i32 %5, 604800
%14 = udiv i32 %13, 86400
%15 = urem i32 %13, 86400
%16 = udiv i32 %15, 3600
%17 = urem i32 %15, 3600
%18 = trunc i32 %17 to i16
%19 = udiv i16 %18, 60
%20 = zext i16 %19 to i32
%21 = trunc i32 %17 to i16
%22 = urem i16 %21, 60
%23 = zext i16 %22 to i32
%24 = add nsw i32 %5, -604800
%25 = icmp ult i32 %24, -1209599
%26 = zext i1 %25 to i32
%27 = add nsw i32 %13, -86400
%28 = icmp ult i32 %27, -172799
%29 = zext i1 %28 to i32
%30 = add nuw nsw i32 %26, %29
%31 = add nsw i32 %15, -3600
%32 = icmp ult i32 %31, -7199
%33 = zext i1 %32 to i32
%34 = add nuw nsw i32 %30, %33
%35 = add nsw i32 %17, -60
%36 = icmp ult i32 %35, -119
%37 = zext i1 %36 to i32
%38 = add nuw nsw i32 %34, %37
%39 = icmp ne i16 %22, 0
%40 = zext i1 %39 to i32
%41 = add nuw nsw i32 %38, %40
%42 = load i32, i32* %1
%43 = icmp eq i32 %42, 1
%44 = select i1 %43, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0)
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.13, i64 0, i64 0), i32 %42, i8* %44)
%46 = icmp eq i32 %41, 0
br i1 %46, label %49, label %47
47: ; preds = %10
%48 = icmp ugt i32 %5, 604799
br i1 %48, label %51, label %61
49: ; preds = %10
%50 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %111
51: ; preds = %47
%52 = add nsw i32 %5, -604800
%53 = icmp ult i32 %52, 604800
%54 = select i1 %53, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0)
%55 = icmp eq i32 %41, 1
%56 = icmp eq i32 %41, 2
%57 = select i1 %56, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0)
%58 = select i1 %55, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8* %57
%59 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %12, i8* %54, i8* %58)
%60 = add nsw i32 %41, -1
br label %61
61: ; preds = %47, %51
%62 = phi i32 [ %60, %51 ], [ %41, %47 ]
%63 = icmp ugt i32 %13, 86399
br i1 %63, label %64, label %74
64: ; preds = %61
%65 = add nsw i32 %13, -86400
%66 = icmp ult i32 %65, 86400
%67 = select i1 %66, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0)
%68 = icmp eq i32 %62, 1
%69 = icmp eq i32 %62, 2
%70 = select i1 %69, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0)
%71 = select i1 %68, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8* %70
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %14, i8* %67, i8* %71)
%73 = add nsw i32 %62, -1
br label %74
74: ; preds = %64, %61
%75 = phi i32 [ %73, %64 ], [ %62, %61 ]
%76 = icmp ugt i32 %15, 3599
br i1 %76, label %77, label %87
77: ; preds = %74
%78 = add nsw i32 %15, -3600
%79 = icmp ult i32 %78, 3600
%80 = select i1 %79, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0)
%81 = icmp eq i32 %75, 1
%82 = icmp eq i32 %75, 2
%83 = select i1 %82, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0)
%84 = select i1 %81, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8* %83
%85 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %16, i8* %80, i8* %84)
%86 = add nsw i32 %75, -1
br label %87
87: ; preds = %77, %74
%88 = phi i32 [ %86, %77 ], [ %75, %74 ]
%89 = icmp ugt i32 %17, 59
br i1 %89, label %90, label %100
90: ; preds = %87
%91 = add nsw i32 %17, -60
%92 = icmp ult i32 %91, 60
%93 = select i1 %92, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0)
%94 = icmp eq i32 %88, 1
%95 = icmp eq i32 %88, 2
%96 = select i1 %95, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0)
%97 = select i1 %94, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8* %96
%98 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %20, i8* %93, i8* %97)
%99 = add nsw i32 %88, -1
br label %100
100: ; preds = %90, %87
%101 = phi i32 [ %99, %90 ], [ %88, %87 ]
%102 = icmp eq i16 %22, 0
br i1 %102, label %111, label %103
103: ; preds = %100
%104 = icmp eq i16 %22, 1
%105 = select i1 %104, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0)
%106 = icmp eq i32 %101, 1
%107 = icmp eq i32 %101, 2
%108 = select i1 %107, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.17, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.18, i64 0, i64 0)
%109 = select i1 %106, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.16, i64 0, i64 0), i8* %108
%110 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.15, i64 0, i64 0), i32 %23, i8* %105, i8* %109)
br label %111
111: ; preds = %100, %103, %49
%112 = load i32, i32* @EXIT_SUCCESS
br label %113
113: ; preds = %111, %7
%114 = phi i32 [ %9, %7 ], [ %112, %111 ]
ret i32 %114
}